diff --git a/.env b/.env index 9403b39152..1fa497f3e6 100644 --- a/.env +++ b/.env @@ -4,7 +4,7 @@ #### Prowler UI Configuration #### PROWLER_UI_VERSION="stable" -SITE_URL=http://localhost:3000 +AUTH_URL=http://localhost:3000 API_BASE_URL=http://prowler-api:8080/api/v1 NEXT_PUBLIC_API_DOCS_URL=http://prowler-api:8080/api/v1/docs AUTH_TRUST_HOST=true @@ -33,10 +33,10 @@ VALKEY_DB=0 # API scan settings # The path to the directory where scan output should be stored -DJANGO_TMP_OUTPUT_DIRECTORY = "/tmp/prowler_api_output" +DJANGO_TMP_OUTPUT_DIRECTORY="/tmp/prowler_api_output" # The maximum number of findings to process in a single batch -DJANGO_FINDINGS_BATCH_SIZE = 1000 +DJANGO_FINDINGS_BATCH_SIZE=1000 # The AWS access key to be used when uploading scan output to an S3 bucket # If left empty, default AWS credentials resolution behavior will be used @@ -123,4 +123,13 @@ SENTRY_ENVIRONMENT=local SENTRY_RELEASE=local #### Prowler release version #### -NEXT_PUBLIC_PROWLER_RELEASE_VERSION=v5.5.0 +NEXT_PUBLIC_PROWLER_RELEASE_VERSION=v5.6.0 + +# Social login credentials +SOCIAL_GOOGLE_OAUTH_CALLBACK_URL="${AUTH_URL}/api/auth/callback/google" +SOCIAL_GOOGLE_OAUTH_CLIENT_ID="" +SOCIAL_GOOGLE_OAUTH_CLIENT_SECRET="" + +SOCIAL_GITHUB_OAUTH_CALLBACK_URL="${AUTH_URL}/api/auth/callback/github" +SOCIAL_GITHUB_OAUTH_CLIENT_ID="" +SOCIAL_GITHUB_OAUTH_CLIENT_SECRET="" diff --git a/.github/dependabot.yml b/.github/dependabot.yml index dee1ed1f62..f4f12db90b 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,108 +9,112 @@ updates: - package-ecosystem: "pip" directory: "/" schedule: - interval: "daily" - open-pull-requests-limit: 10 + interval: "monthly" + open-pull-requests-limit: 25 target-branch: master labels: - "dependencies" - "pip" - - package-ecosystem: "pip" - directory: "/api" - schedule: - interval: "daily" - open-pull-requests-limit: 10 - target-branch: master - labels: - - "dependencies" - - "pip" - - "component/api" + # Dependabot Updates are temporary disabled - 2025/03/19 + # - package-ecosystem: "pip" + # directory: "/api" + # schedule: + # interval: "daily" + # open-pull-requests-limit: 10 + # target-branch: master + # labels: + # - "dependencies" + # - "pip" + # - "component/api" - package-ecosystem: "github-actions" directory: "/" schedule: - interval: "daily" - open-pull-requests-limit: 10 + interval: "monthly" + open-pull-requests-limit: 25 target-branch: master labels: - "dependencies" - "github_actions" - - package-ecosystem: "npm" - directory: "/ui" - schedule: - interval: "daily" - open-pull-requests-limit: 10 - target-branch: master - labels: - - "dependencies" - - "npm" - - "component/ui" + # Dependabot Updates are temporary disabled - 2025/03/19 + # - package-ecosystem: "npm" + # directory: "/ui" + # schedule: + # interval: "daily" + # open-pull-requests-limit: 10 + # target-branch: master + # labels: + # - "dependencies" + # - "npm" + # - "component/ui" - package-ecosystem: "docker" directory: "/" schedule: - interval: "weekly" - open-pull-requests-limit: 10 + interval: "monthly" + open-pull-requests-limit: 25 target-branch: master labels: - "dependencies" - "docker" + # Dependabot Updates are temporary disabled - 2025/04/15 # v4.6 - - package-ecosystem: "pip" - directory: "/" - schedule: - interval: "weekly" - open-pull-requests-limit: 10 - target-branch: v4.6 - labels: - - "dependencies" - - "pip" - - "v4" + # - package-ecosystem: "pip" + # directory: "/" + # schedule: + # interval: "weekly" + # open-pull-requests-limit: 10 + # target-branch: v4.6 + # labels: + # - "dependencies" + # - "pip" + # - "v4" - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "weekly" - open-pull-requests-limit: 10 - target-branch: v4.6 - labels: - - "dependencies" - - "github_actions" - - "v4" + # - package-ecosystem: "github-actions" + # directory: "/" + # schedule: + # interval: "weekly" + # open-pull-requests-limit: 10 + # target-branch: v4.6 + # labels: + # - "dependencies" + # - "github_actions" + # - "v4" - - package-ecosystem: "docker" - directory: "/" - schedule: - interval: "weekly" - open-pull-requests-limit: 10 - target-branch: v4.6 - labels: - - "dependencies" - - "docker" - - "v4" + # - package-ecosystem: "docker" + # directory: "/" + # schedule: + # interval: "weekly" + # open-pull-requests-limit: 10 + # target-branch: v4.6 + # labels: + # - "dependencies" + # - "docker" + # - "v4" + # Dependabot Updates are temporary disabled - 2025/03/19 # v3 - - package-ecosystem: "pip" - directory: "/" - schedule: - interval: "monthly" - open-pull-requests-limit: 10 - target-branch: v3 - labels: - - "dependencies" - - "pip" - - "v3" + # - package-ecosystem: "pip" + # directory: "/" + # schedule: + # interval: "monthly" + # open-pull-requests-limit: 10 + # target-branch: v3 + # labels: + # - "dependencies" + # - "pip" + # - "v3" - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "monthly" - open-pull-requests-limit: 10 - target-branch: v3 - labels: - - "dependencies" - - "github_actions" - - "v3" + # - package-ecosystem: "github-actions" + # directory: "/" + # schedule: + # interval: "monthly" + # open-pull-requests-limit: 10 + # target-branch: v3 + # labels: + # - "dependencies" + # - "github_actions" + # - "v3" diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 9a417cc5d0..f98e90fd03 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -16,6 +16,7 @@ Please include a summary of the change and which issue is fixed. List any depend - [ ] Review if code is being documented following this specification https://github.com/google/styleguide/blob/gh-pages/pyguide.md#38-comments-and-docstrings - [ ] Review if backport is needed. - [ ] Review if is needed to change the [Readme.md](https://github.com/prowler-cloud/prowler/blob/master/README.md) +- [ ] Ensure new entries are added to [CHANGELOG.md](https://github.com/prowler-cloud/prowler/blob/master/prowler/CHANGELOG.md), if applicable. #### API - [ ] Verify if API specs need to be regenerated. diff --git a/.github/workflows/api-build-lint-push-containers.yml b/.github/workflows/api-build-lint-push-containers.yml index 049a06866f..953bd032f1 100644 --- a/.github/workflows/api-build-lint-push-containers.yml +++ b/.github/workflows/api-build-lint-push-containers.yml @@ -61,7 +61,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Set short git commit SHA id: vars @@ -70,18 +70,18 @@ jobs: echo "SHORT_SHA=${shortSha}" >> $GITHUB_ENV - name: Login to DockerHub - uses: docker/login-action@v3 + uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0 - name: Build and push container image (latest) # Comment the following line for testing if: github.event_name == 'push' - uses: docker/build-push-action@v6 + uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 # v6.16.0 with: context: ${{ env.WORKING_DIRECTORY }} # Set push: false for testing @@ -94,7 +94,7 @@ jobs: - name: Build and push container image (release) if: github.event_name == 'release' - uses: docker/build-push-action@v6 + uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 # v6.16.0 with: context: ${{ env.WORKING_DIRECTORY }} push: true @@ -106,7 +106,7 @@ jobs: - name: Trigger deployment if: github.event_name == 'push' - uses: peter-evans/repository-dispatch@v3 + uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # v3.0.0 with: token: ${{ secrets.PROWLER_BOT_ACCESS_TOKEN }} repository: ${{ secrets.CLOUD_DISPATCH }} diff --git a/.github/workflows/api-codeql.yml b/.github/workflows/api-codeql.yml index b9b1b966ca..95b044007b 100644 --- a/.github/workflows/api-codeql.yml +++ b/.github/workflows/api-codeql.yml @@ -44,16 +44,16 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v3 + uses: github/codeql-action/init@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16 with: languages: ${{ matrix.language }} config-file: ./.github/codeql/api-codeql-config.yml - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 + uses: github/codeql-action/analyze@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16 with: category: "/language:${{matrix.language}}" diff --git a/.github/workflows/api-pull-request.yml b/.github/workflows/api-pull-request.yml index bbeddb1114..604c878bf6 100644 --- a/.github/workflows/api-pull-request.yml +++ b/.github/workflows/api-pull-request.yml @@ -71,11 +71,11 @@ jobs: --health-retries 5 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Test if changes are in not ignored paths id: are-non-ignored-files-changed - uses: tj-actions/changed-files@v45 + uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5 with: files: api/** files_ignore: | @@ -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,9 +100,15 @@ 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@v5 + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 with: python-version: ${{ matrix.python-version }} cache: "poetry" @@ -145,7 +159,7 @@ jobs: working-directory: ./api if: steps.are-non-ignored-files-changed.outputs.any_changed == 'true' run: | - poetry run safety check --ignore 70612,66963 + poetry run safety check --ignore 70612,66963,74429 - name: Vulture working-directory: ./api @@ -167,7 +181,7 @@ jobs: - name: Upload coverage reports to Codecov if: steps.are-non-ignored-files-changed.outputs.any_changed == 'true' - uses: codecov/codecov-action@v5 + uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d # v5.4.2 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} with: @@ -175,11 +189,11 @@ jobs: test-container-build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0 - name: Build Container - uses: docker/build-push-action@v6 + uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 # v6.16.0 with: context: ${{ env.API_WORKING_DIR }} push: false diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index d74b96f3f8..2aa0a49c09 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -23,7 +23,7 @@ jobs: steps: - name: Check labels id: preview_label_check - uses: docker://agilepathway/pull-request-label-checker:v1.6.55 + uses: agilepathway/label-checker@c3d16ad512e7cea5961df85ff2486bb774caf3c5 # v1.6.65 with: allow_failure: true prefix_mode: true @@ -33,7 +33,7 @@ jobs: - name: Backport Action if: steps.preview_label_check.outputs.label_check == 'success' - uses: sorenlouv/backport-github-action@v9.5.1 + uses: sorenlouv/backport-github-action@ad888e978060bc1b2798690dd9d03c4036560947 # v9.5.1 with: github_token: ${{ secrets.PROWLER_BOT_ACCESS_TOKEN }} auto_backport_label_prefix: ${{ env.BACKPORT_LABEL_PREFIX }} diff --git a/.github/workflows/build-documentation-on-pr.yml b/.github/workflows/build-documentation-on-pr.yml index 7ae58b9c85..25fc2910f9 100644 --- a/.github/workflows/build-documentation-on-pr.yml +++ b/.github/workflows/build-documentation-on-pr.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Leave PR comment with the Prowler Documentation URI - uses: peter-evans/create-or-update-comment@v4 + uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0 with: issue-number: ${{ env.PR_NUMBER }} body: | diff --git a/.github/workflows/conventional-commit.yml b/.github/workflows/conventional-commit.yml index 0a45e7fd30..cdc3e52de5 100644 --- a/.github/workflows/conventional-commit.yml +++ b/.github/workflows/conventional-commit.yml @@ -18,6 +18,6 @@ jobs: steps: - name: conventional-commit-check id: conventional-commit-check - uses: agenthunt/conventional-commit-checker-action@v2.0.0 + uses: agenthunt/conventional-commit-checker-action@9e552d650d0e205553ec7792d447929fc78e012b # v2.0.0 with: pr-title-regex: '^([^\s(]+)(?:\(([^)]+)\))?: (.+)' diff --git a/.github/workflows/create-backport-label.yml b/.github/workflows/create-backport-label.yml new file mode 100644 index 0000000000..0bc93bd45d --- /dev/null +++ b/.github/workflows/create-backport-label.yml @@ -0,0 +1,67 @@ +name: Create Backport Label + +on: + release: + types: [published] + +jobs: + create_label: + runs-on: ubuntu-latest + permissions: + contents: write + issues: write + steps: + - name: Create backport label + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + RELEASE_TAG: ${{ github.event.release.tag_name }} + OWNER_REPO: ${{ github.repository }} + run: | + VERSION_ONLY=${RELEASE_TAG#v} # Remove 'v' prefix if present (e.g., v3.2.0 -> 3.2.0) + + # Check if it's a minor version (X.Y.0) + if [[ "$VERSION_ONLY" =~ ^[0-9]+\.[0-9]+\.0$ ]]; then + echo "Release ${RELEASE_TAG} (version ${VERSION_ONLY}) is a minor version. Proceeding to create backport label." + + TWO_DIGIT_VERSION=${VERSION_ONLY%.0} # Extract X.Y from X.Y.0 (e.g., 5.6 from 5.6.0) + + FINAL_LABEL_NAME="backport-to-v${TWO_DIGIT_VERSION}" + FINAL_DESCRIPTION="Backport PR to the v${TWO_DIGIT_VERSION} branch" + + echo "Effective label name will be: ${FINAL_LABEL_NAME}" + echo "Effective description will be: ${FINAL_DESCRIPTION}" + + # Check if the label already exists + STATUS_CODE=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token ${GITHUB_TOKEN}" "https://api.github.com/repos/${OWNER_REPO}/labels/${FINAL_LABEL_NAME}") + + if [ "${STATUS_CODE}" -eq 200 ]; then + echo "Label '${FINAL_LABEL_NAME}' already exists." + elif [ "${STATUS_CODE}" -eq 404 ]; then + echo "Label '${FINAL_LABEL_NAME}' does not exist. Creating it..." + # Prepare JSON data payload + JSON_DATA=$(printf '{"name":"%s","description":"%s","color":"B60205"}' "${FINAL_LABEL_NAME}" "${FINAL_DESCRIPTION}") + + CREATE_STATUS_CODE=$(curl -s -o /tmp/curl_create_response.json -w "%{http_code}" -X POST \ + -H "Accept: application/vnd.github.v3+json" \ + -H "Authorization: token ${GITHUB_TOKEN}" \ + --data "${JSON_DATA}" \ + "https://api.github.com/repos/${OWNER_REPO}/labels") + + CREATE_RESPONSE_BODY=$(cat /tmp/curl_create_response.json) + rm -f /tmp/curl_create_response.json + + if [ "$CREATE_STATUS_CODE" -eq 201 ]; then + echo "Label '${FINAL_LABEL_NAME}' created successfully." + else + echo "Error creating label '${FINAL_LABEL_NAME}'. Status: $CREATE_STATUS_CODE" + echo "Response: $CREATE_RESPONSE_BODY" + exit 1 + fi + else + echo "Error checking for label '${FINAL_LABEL_NAME}'. HTTP Status: ${STATUS_CODE}" + exit 1 + fi + else + echo "Release ${RELEASE_TAG} (version ${VERSION_ONLY}) is not a minor version. Skipping backport label creation." + exit 0 + fi diff --git a/.github/workflows/find-secrets.yml b/.github/workflows/find-secrets.yml index 66f8f1802c..a6240297b6 100644 --- a/.github/workflows/find-secrets.yml +++ b/.github/workflows/find-secrets.yml @@ -7,11 +7,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: fetch-depth: 0 - name: TruffleHog OSS - uses: trufflesecurity/trufflehog@v3.88.16 + uses: trufflesecurity/trufflehog@b06f6d72a3791308bb7ba59c2b8cb7a083bd17e4 # v3.88.26 with: path: ./ base: ${{ github.event.repository.default_branch }} diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 199b17962d..6507474ec8 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -14,4 +14,4 @@ jobs: pull-requests: write runs-on: ubuntu-latest steps: - - uses: actions/labeler@v5 + - uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0 diff --git a/.github/workflows/pull-request-merged.yml b/.github/workflows/pull-request-merged.yml new file mode 100644 index 0000000000..090950f79b --- /dev/null +++ b/.github/workflows/pull-request-merged.yml @@ -0,0 +1,37 @@ +name: Prowler - Merged Pull Request + +on: + pull_request_target: + branches: ['master'] + types: ['closed'] + +jobs: + trigger-cloud-pull-request: + name: Trigger Cloud Pull Request + if: github.event.pull_request.merged == true && github.repository == 'prowler-cloud/prowler' + 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 + run: | + shortSha=$(git rev-parse --short ${{ github.sha }}) + echo "SHORT_SHA=${shortSha}" >> $GITHUB_ENV + + - name: Trigger pull request + uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # v3.0.0 + with: + token: ${{ secrets.PROWLER_BOT_ACCESS_TOKEN }} + repository: ${{ secrets.CLOUD_DISPATCH }} + event-type: prowler-pull-request-merged + client-payload: '{ + "PROWLER_COMMIT_SHA": "${{ github.sha }}", + "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_URL":${{ toJson(github.event.pull_request.html_url) }} + }' diff --git a/.github/workflows/sdk-build-lint-push-containers.yml b/.github/workflows/sdk-build-lint-push-containers.yml index 4536430255..f4314055ae 100644 --- a/.github/workflows/sdk-build-lint-push-containers.yml +++ b/.github/workflows/sdk-build-lint-push-containers.yml @@ -59,16 +59,16 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Setup Python - uses: actions/setup-python@v5 + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 with: python-version: ${{ env.PYTHON_VERSION }} - name: Install Poetry run: | - pipx install poetry==1.8.5 + pipx install poetry==2.* pipx inject poetry poetry-bumpversion - name: Get Prowler version @@ -108,13 +108,13 @@ jobs: esac - name: Login to DockerHub - uses: docker/login-action@v3 + uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Login to Public ECR - uses: docker/login-action@v3 + uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0 with: registry: public.ecr.aws username: ${{ secrets.PUBLIC_ECR_AWS_ACCESS_KEY_ID }} @@ -123,11 +123,11 @@ jobs: AWS_REGION: ${{ env.AWS_REGION }} - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0 - name: Build and push container image (latest) if: github.event_name == 'push' - uses: docker/build-push-action@v6 + uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 # v6.16.0 with: push: true tags: | @@ -140,7 +140,7 @@ jobs: - name: Build and push container image (release) if: github.event_name == 'release' - uses: docker/build-push-action@v6 + uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 # v6.16.0 with: # Use local context to get changes # https://github.com/docker/build-push-action#path-context diff --git a/.github/workflows/sdk-bump-version.yml b/.github/workflows/sdk-bump-version.yml new file mode 100644 index 0000000000..e5e5dba4e0 --- /dev/null +++ b/.github/workflows/sdk-bump-version.yml @@ -0,0 +1,145 @@ +name: SDK - Bump Version + +on: + release: + types: [published] + + +env: + PROWLER_VERSION: ${{ github.event.release.tag_name }} + BASE_BRANCH: master + +jobs: + bump-version: + name: Bump Version + if: github.repository == 'prowler-cloud/prowler' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - name: Get Prowler version + shell: bash + run: | + if [[ $PROWLER_VERSION =~ ^([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then + MAJOR_VERSION=${BASH_REMATCH[1]} + 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" + + BUMP_VERSION_TO=${MAJOR_VERSION}.${MINOR_VERSION}.$((FIX_VERSION + 1)) + echo "BUMP_VERSION_TO=${BUMP_VERSION_TO}" >> "${GITHUB_ENV}" + + TARGET_BRANCH=v${MAJOR_VERSION}.${MINOR_VERSION} + echo "TARGET_BRANCH=${TARGET_BRANCH}" >> "${GITHUB_ENV}" + + echo "Bumping to next patch version: ${BUMP_VERSION_TO} in branch ${TARGET_BRANCH}" + fi + else + echo "Releasing another Prowler major version, aborting..." + exit 1 + fi + else + echo "Invalid version syntax: '$PROWLER_VERSION' (must be N.N.N)" >&2 + exit 1 + fi + + - name: Bump versions in files + run: | + echo "Using PROWLER_VERSION=$PROWLER_VERSION" + echo "Using BUMP_VERSION_TO=$BUMP_VERSION_TO" + + set -e + + echo "Bumping version in pyproject.toml ..." + sed -i "s|version = \"${PROWLER_VERSION}\"|version = \"${BUMP_VERSION_TO}\"|" pyproject.toml + + echo "Bumping version in prowler/config/config.py ..." + sed -i "s|prowler_version = \"${PROWLER_VERSION}\"|prowler_version = \"${BUMP_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${BUMP_VERSION_TO}|" .env + + git --no-pager diff + + - name: Create Pull Request + 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.TARGET_BRANCH }} + commit-message: "chore(release): Bump version to v${{ env.BUMP_VERSION_TO }}" + branch: "version-bump-to-v${{ env.BUMP_VERSION_TO }}" + title: "chore(release): Bump version to v${{ env.BUMP_VERSION_TO }}" + body: | + ### Description + + Bump Prowler version to v${{ env.BUMP_VERSION_TO }} + + ### 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-codeql.yml b/.github/workflows/sdk-codeql.yml index 1c5663de5b..5634ead1e6 100644 --- a/.github/workflows/sdk-codeql.yml +++ b/.github/workflows/sdk-codeql.yml @@ -21,6 +21,7 @@ on: paths-ignore: - 'ui/**' - 'api/**' + - '.github/**' pull_request: branches: - "master" @@ -30,6 +31,7 @@ on: paths-ignore: - 'ui/**' - 'api/**' + - '.github/**' schedule: - cron: '00 12 * * *' @@ -50,16 +52,16 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v3 + uses: github/codeql-action/init@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16 with: languages: ${{ matrix.language }} config-file: ./.github/codeql/sdk-codeql-config.yml - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 + uses: github/codeql-action/analyze@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16 with: category: "/language:${{matrix.language}}" diff --git a/.github/workflows/sdk-pull-request.yml b/.github/workflows/sdk-pull-request.yml index 646277dec5..1fa3e9c592 100644 --- a/.github/workflows/sdk-pull-request.yml +++ b/.github/workflows/sdk-pull-request.yml @@ -21,11 +21,11 @@ jobs: python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Test if changes are in not ignored paths id: are-non-ignored-files-changed - uses: tj-actions/changed-files@v45 + uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5 with: files: ./** files_ignore: | @@ -34,6 +34,7 @@ jobs: permissions/** api/** ui/** + prowler/CHANGELOG.md README.md mkdocs.yml .backportrc.json @@ -50,7 +51,7 @@ jobs: - name: Set up Python ${{ matrix.python-version }} if: steps.are-non-ignored-files-changed.outputs.any_changed == 'true' - uses: actions/setup-python@v5 + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 with: python-version: ${{ matrix.python-version }} cache: "poetry" @@ -106,15 +107,128 @@ jobs: run: | /tmp/hadolint Dockerfile --ignore=DL3013 - - name: Test with pytest + # Test AWS + - name: AWS - Check if any file has changed + id: aws-changed-files + uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5 + with: + files: | + ./prowler/providers/aws/** + ./tests/providers/aws/** + .poetry.lock + + - name: AWS - Test + if: steps.aws-changed-files.outputs.any_changed == 'true' + run: | + poetry run pytest -n auto --cov=./prowler/providers/aws --cov-report=xml:aws_coverage.xml tests/providers/aws + + # Test Azure + - name: Azure - Check if any file has changed + id: azure-changed-files + uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5 + with: + files: | + ./prowler/providers/azure/** + ./tests/providers/azure/** + .poetry.lock + + - name: Azure - Test + if: steps.azure-changed-files.outputs.any_changed == 'true' + run: | + poetry run pytest -n auto --cov=./prowler/providers/azure --cov-report=xml:azure_coverage.xml tests/providers/azure + + # Test GCP + - name: GCP - Check if any file has changed + id: gcp-changed-files + uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5 + with: + files: | + ./prowler/providers/gcp/** + ./tests/providers/gcp/** + .poetry.lock + + - name: GCP - Test + if: steps.gcp-changed-files.outputs.any_changed == 'true' + run: | + poetry run pytest -n auto --cov=./prowler/providers/gcp --cov-report=xml:gcp_coverage.xml tests/providers/gcp + + # Test Kubernetes + - name: Kubernetes - Check if any file has changed + id: kubernetes-changed-files + uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5 + with: + 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 + uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5 + with: + files: | + ./prowler/providers/nhn/** + ./tests/providers/nhn/** + .poetry.lock + + - name: NHN - Test + if: steps.nhn-changed-files.outputs.any_changed == 'true' + run: | + poetry run pytest -n auto --cov=./prowler/providers/nhn --cov-report=xml:nhn_coverage.xml tests/providers/nhn + + # Test M365 + - name: M365 - Check if any file has changed + id: m365-changed-files + uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5 + with: + files: | + ./prowler/providers/m365/** + ./tests/providers/m365/** + .poetry.lock + + - name: M365 - Test + if: steps.m365-changed-files.outputs.any_changed == 'true' + run: | + poetry run pytest -n auto --cov=./prowler/providers/m365 --cov-report=xml:m365_coverage.xml tests/providers/m365 + + # Common Tests + - name: Lib - Test if: steps.are-non-ignored-files-changed.outputs.any_changed == 'true' run: | - poetry run pytest -n auto --cov=./prowler --cov-report=xml tests + poetry run pytest -n auto --cov=./prowler/lib --cov-report=xml:lib_coverage.xml tests/lib + - name: Config - Test + if: steps.are-non-ignored-files-changed.outputs.any_changed == 'true' + run: | + poetry run pytest -n auto --cov=./prowler/config --cov-report=xml:config_coverage.xml tests/config + + # Codecov - name: Upload coverage reports to Codecov if: steps.are-non-ignored-files-changed.outputs.any_changed == 'true' - uses: codecov/codecov-action@v5 + uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d # v5.4.2 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} with: flags: prowler + 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/.github/workflows/sdk-pypi-release.yml b/.github/workflows/sdk-pypi-release.yml index af44300179..07d6ca5a6f 100644 --- a/.github/workflows/sdk-pypi-release.yml +++ b/.github/workflows/sdk-pypi-release.yml @@ -7,7 +7,7 @@ on: env: RELEASE_TAG: ${{ github.event.release.tag_name }} PYTHON_VERSION: 3.11 - CACHE: "poetry" + # CACHE: "poetry" jobs: repository-check: @@ -64,17 +64,17 @@ jobs: ;; esac - - uses: actions/checkout@v4 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Install dependencies run: | - pipx install poetry==1.8.5 + pipx install poetry==2.1.1 - name: Setup Python - uses: actions/setup-python@v5 + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 with: python-version: ${{ env.PYTHON_VERSION }} - cache: ${{ env.CACHE }} + # cache: ${{ env.CACHE }} - name: Build Prowler package run: | diff --git a/.github/workflows/sdk-refresh-aws-services-regions.yml b/.github/workflows/sdk-refresh-aws-services-regions.yml index bf7af302e2..8ebc1b5db0 100644 --- a/.github/workflows/sdk-refresh-aws-services-regions.yml +++ b/.github/workflows/sdk-refresh-aws-services-regions.yml @@ -4,7 +4,7 @@ name: SDK - Refresh AWS services' regions on: schedule: - - cron: "0 9 * * *" #runs at 09:00 UTC everyday + - cron: "0 9 * * 1" # runs at 09:00 UTC every Monday env: GITHUB_BRANCH: "master" @@ -23,12 +23,12 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v4 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: ref: ${{ env.GITHUB_BRANCH }} - name: setup python - uses: actions/setup-python@v5 + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 with: python-version: 3.9 #install the python needed @@ -38,7 +38,7 @@ jobs: pip install boto3 - name: Configure AWS Credentials -- DEV - uses: aws-actions/configure-aws-credentials@v4 + uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0 with: aws-region: ${{ env.AWS_REGION_DEV }} role-to-assume: ${{ secrets.DEV_IAM_ROLE_ARN }} @@ -50,12 +50,13 @@ jobs: # Create pull request - name: Create Pull Request - uses: peter-evans/create-pull-request@v7 + 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 }} commit-message: "feat(regions_update): Update regions for AWS services" branch: "aws-services-regions-updated-${{ github.sha }}" - labels: "status/waiting-for-revision, severity/low, provider/aws, backport-to-v3" + labels: "status/waiting-for-revision, severity/low, provider/aws" title: "chore(regions_update): Changes in regions for AWS services" body: | ### Description diff --git a/.github/workflows/ui-build-lint-push-containers.yml b/.github/workflows/ui-build-lint-push-containers.yml index 572f06d027..6de0e6abf3 100644 --- a/.github/workflows/ui-build-lint-push-containers.yml +++ b/.github/workflows/ui-build-lint-push-containers.yml @@ -61,7 +61,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Set short git commit SHA id: vars @@ -70,18 +70,18 @@ jobs: echo "SHORT_SHA=${shortSha}" >> $GITHUB_ENV - name: Login to DockerHub - uses: docker/login-action@v3 + uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0 - name: Build and push container image (latest) # Comment the following line for testing if: github.event_name == 'push' - uses: docker/build-push-action@v6 + uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 # v6.16.0 with: context: ${{ env.WORKING_DIRECTORY }} build-args: | @@ -96,7 +96,7 @@ jobs: - name: Build and push container image (release) if: github.event_name == 'release' - uses: docker/build-push-action@v6 + uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 # v6.16.0 with: context: ${{ env.WORKING_DIRECTORY }} build-args: | @@ -110,7 +110,7 @@ jobs: - name: Trigger deployment if: github.event_name == 'push' - uses: peter-evans/repository-dispatch@v3 + uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # v3.0.0 with: token: ${{ secrets.PROWLER_BOT_ACCESS_TOKEN }} repository: ${{ secrets.CLOUD_DISPATCH }} diff --git a/.github/workflows/ui-codeql.yml b/.github/workflows/ui-codeql.yml index 6192713d39..a43f59c245 100644 --- a/.github/workflows/ui-codeql.yml +++ b/.github/workflows/ui-codeql.yml @@ -44,16 +44,16 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v3 + uses: github/codeql-action/init@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16 with: languages: ${{ matrix.language }} config-file: ./.github/codeql/ui-codeql-config.yml - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 + uses: github/codeql-action/analyze@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16 with: category: "/language:${{matrix.language}}" diff --git a/.github/workflows/ui-pull-request.yml b/.github/workflows/ui-pull-request.yml index 79e4c5e54b..942a4efade 100644 --- a/.github/workflows/ui-pull-request.yml +++ b/.github/workflows/ui-pull-request.yml @@ -27,11 +27,11 @@ jobs: node-version: [20.x] steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: false - name: Setup Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: ${{ matrix.node-version }} - name: Install dependencies @@ -46,11 +46,11 @@ jobs: test-container-build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0 - name: Build Container - uses: docker/build-push-action@v6 + uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 # v6.16.0 with: context: ${{ env.UI_WORKING_DIR }} # Always build using `prod` target diff --git a/.gitignore b/.gitignore index f28fa40b38..3e08f3580a 100644 --- a/.gitignore +++ b/.gitignore @@ -42,7 +42,8 @@ junit-reports/ # VSCode files .vscode/ -# Cursor +# Cursor files +.cursorignore .cursor/ # Terraform @@ -53,6 +54,7 @@ junit-reports/ # .env ui/.env* api/.env* +.env.local # Coverage .coverage* diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a5d011e23d..0382dd901d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -115,7 +115,7 @@ repos: - id: safety name: safety description: "Safety is a tool that checks your installed dependencies for known security vulnerabilities" - entry: bash -c 'safety check --ignore 70612,66963' + entry: bash -c 'safety check --ignore 70612,66963,74429' language: system - id: vulture diff --git a/Dockerfile b/Dockerfile index 02014d0203..0e9fb89a03 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,24 +1,43 @@ -FROM python:3.12.9-alpine3.20 +FROM python:3.12.10-slim-bookworm AS build LABEL maintainer="https://github.com/prowler-cloud/prowler" +LABEL org.opencontainers.image.source="https://github.com/prowler-cloud/prowler" -# Update system dependencies and install essential tools -#hadolint ignore=DL3018 -RUN apk --no-cache upgrade && apk --no-cache add curl git gcc python3-dev musl-dev linux-headers +ARG POWERSHELL_VERSION=7.5.0 + +# hadolint ignore=DL3008 +RUN apt-get update && apt-get install -y --no-install-recommends wget libicu72 \ + && rm -rf /var/lib/apt/lists/* + +# Install PowerShell +RUN ARCH=$(uname -m) && \ + if [ "$ARCH" = "x86_64" ]; then \ + wget --progress=dot:giga https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-x64.tar.gz -O /tmp/powershell.tar.gz ; \ + elif [ "$ARCH" = "aarch64" ]; then \ + wget --progress=dot:giga https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-arm64.tar.gz -O /tmp/powershell.tar.gz ; \ + else \ + echo "Unsupported architecture: $ARCH" && exit 1 ; \ + fi && \ + mkdir -p /opt/microsoft/powershell/7 && \ + tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7 && \ + chmod +x /opt/microsoft/powershell/7/pwsh && \ + ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh && \ + rm /tmp/powershell.tar.gz + +# Add prowler user +RUN addgroup --gid 1000 prowler && \ + adduser --uid 1000 --gid 1000 --disabled-password --gecos "" prowler -# Create non-root user -RUN mkdir -p /home/prowler && \ - echo 'prowler:x:1000:1000:prowler:/home/prowler:' > /etc/passwd && \ - echo 'prowler:x:1000:' > /etc/group && \ - chown -R prowler:prowler /home/prowler USER prowler -# Copy necessary files WORKDIR /home/prowler + +# Copy necessary files COPY prowler/ /home/prowler/prowler/ COPY dashboard/ /home/prowler/dashboard/ COPY pyproject.toml /home/prowler COPY README.md /home/prowler/ +COPY prowler/providers/m365/lib/powershell/m365_powershell.py /home/prowler/prowler/providers/m365/lib/powershell/m365_powershell.py # Install Python dependencies ENV HOME='/home/prowler' @@ -34,6 +53,9 @@ RUN pip install --no-cache-dir --upgrade pip && \ RUN poetry install --compile && \ rm -rf ~/.cache/pip +# Install PowerShell modules +RUN poetry run python prowler/providers/m365/lib/powershell/m365_powershell.py + # Remove deprecated dash dependencies RUN pip uninstall dash-html-components -y && \ pip uninstall dash-core-components -y diff --git a/README.md b/README.md index cb40861994..9064d36891 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 is the Open Cloud Security platform trusted by thousands to automate security and compliance in any cloud environment. With hundreds of ready-to-use checks and compliance frameworks, Prowler delivers real-time, customizable monitoring and seamless integrations, making cloud security simple, scalable, and cost-effective for organizations of any size.

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. ![Prowler App](docs/img/overview.png) ->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 CLI Execution](docs/img/short-display.png) + ## Prowler Dashboard ```console @@ -67,25 +82,28 @@ prowler dashboard ``` ![Prowler Dashboard](docs/img/dashboard.png) -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) | |---|---|---|---|---| -| AWS | 564 | 82 | 33 | 10 | -| GCP | 77 | 13 | 6 | 3 | -| Azure | 140 | 18 | 7 | 3 | -| Kubernetes | 83 | 7 | 4 | 7 | -| Microsoft365 | 5 | 2 | 1 | 0 | +| AWS | 564 | 82 | 34 | 10 | +| GCP | 79 | 13 | 7 | 3 | +| Azure | 140 | 18 | 8 | 3 | +| Kubernetes | 83 | 7 | 5 | 7 | +| 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 @@ -101,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 @@ -128,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** @@ -171,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: @@ -205,35 +233,56 @@ 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 cd prowler eval $(poetry env activate) poetry install -python prowler.py -v +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 App Architecture](docs/img/prowler-app-architecture.png) ## 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. ![Architecture](docs/img/architecture.png) @@ -241,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/.env.example b/api/.env.example index 62df0034c1..e97210816b 100644 --- a/api/.env.example +++ b/api/.env.example @@ -56,3 +56,6 @@ DJANGO_GOOGLE_OAUTH_CALLBACK_URL="" DJANGO_GITHUB_OAUTH_CLIENT_ID="" DJANGO_GITHUB_OAUTH_CLIENT_SECRET="" DJANGO_GITHUB_OAUTH_CALLBACK_URL="" + +# Deletion Task Batch Size +DJANGO_DELETION_BATCH_SIZE=5000 diff --git a/api/.pre-commit-config.yaml b/api/.pre-commit-config.yaml index 6859567eb5..1cd04529c3 100644 --- a/api/.pre-commit-config.yaml +++ b/api/.pre-commit-config.yaml @@ -80,7 +80,7 @@ repos: - id: safety name: safety description: "Safety is a tool that checks your installed dependencies for known security vulnerabilities" - entry: bash -c 'poetry run safety check --ignore 70612,66963' + entry: bash -c 'poetry run safety check --ignore 70612,66963,74429' language: system - id: vulture diff --git a/api/CHANGELOG.md b/api/CHANGELOG.md index 741f740c5e..2939de72d7 100644 --- a/api/CHANGELOG.md +++ b/api/CHANGELOG.md @@ -2,12 +2,80 @@ All notable changes to the **Prowler API** are documented in this file. +## [v1.9.0] (Prowler UNRELEASED) + +### Added +- Support for read only replicas in the database [(#7210)](https://github.com/prowler-cloud/prowler/pull/7210). + --- -## [v1.6.0] (Prowler UNRELEASED) +## [v1.8.1] (Prowler v5.7.1) + +### Fixed +- Added database index to improve performance on finding lookup. [(#7800)](https://github.com/prowler-cloud/prowler/pull/7800) + +--- + +## [v1.8.0] (Prowler v5.7.0) + +### 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). +- Added export support for Prowler ThreatScore in M365 [(7783)](https://github.com/prowler-cloud/prowler/pull/7783) + +--- + +## [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). + +--- + +## [v1.6.0] (Prowler v5.5.0) + ### Added - Support for developing new integrations [(#7167)](https://github.com/prowler-cloud/prowler/pull/7167). -- Support for read only replicas in the database [(#7210)](https://github.com/prowler-cloud/prowler/pull/7210). +- HTTP Security Headers [(#7289)](https://github.com/prowler-cloud/prowler/pull/7289). +- New endpoint to get the compliance overviews metadata [(#7333)](https://github.com/prowler-cloud/prowler/pull/7333). +- Support for muted findings [(#7378)](https://github.com/prowler-cloud/prowler/pull/7378). +- Added missing fields to API findings and resources [(#7318)](https://github.com/prowler-cloud/prowler/pull/7318). + +--- + +## [v1.5.4] (Prowler v5.4.4) + +### Fixed +- Fixed a bug with periodic tasks when trying to delete a provider ([#7466])(https://github.com/prowler-cloud/prowler/pull/7466). + +--- + +## [v1.5.3] (Prowler v5.4.3) + +### Fixed +- Added duplicated scheduled scans handling ([#7401])(https://github.com/prowler-cloud/prowler/pull/7401). +- Added environment variable to configure the deletion task batch size ([#7423])(https://github.com/prowler-cloud/prowler/pull/7423). + +--- + +## [v1.5.2] (Prowler v5.4.2) + +### Changed +- Refactored deletion logic and implemented retry mechanism for deletion tasks [(#7349)](https://github.com/prowler-cloud/prowler/pull/7349). + +--- + +## [v1.5.1] (Prowler v5.4.1) + +### Fixed +- Added a handled response in case local files are missing [(#7183)](https://github.com/prowler-cloud/prowler/pull/7183). +- Fixed a race condition when deleting export files after the S3 upload [(#7172)](https://github.com/prowler-cloud/prowler/pull/7172). +- Handled exception when a provider has no secret in test connection [(#7283)](https://github.com/prowler-cloud/prowler/pull/7283). --- diff --git a/api/Dockerfile b/api/Dockerfile index 3569d003e7..8291b14295 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -1,13 +1,33 @@ -FROM python:3.12.8-alpine3.20 AS build +FROM python:3.12.10-slim-bookworm AS build LABEL maintainer="https://github.com/prowler-cloud/api" -# hadolint ignore=DL3018 -RUN apk --no-cache add gcc python3-dev musl-dev linux-headers curl-dev +ARG POWERSHELL_VERSION=7.5.0 +ENV POWERSHELL_VERSION=${POWERSHELL_VERSION} + +# hadolint ignore=DL3008 +RUN apt-get update && apt-get install -y --no-install-recommends wget libicu72 \ + && rm -rf /var/lib/apt/lists/* + +# Install PowerShell +RUN ARCH=$(uname -m) && \ + if [ "$ARCH" = "x86_64" ]; then \ + wget --progress=dot:giga https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-x64.tar.gz -O /tmp/powershell.tar.gz ; \ + elif [ "$ARCH" = "aarch64" ]; then \ + wget --progress=dot:giga https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-arm64.tar.gz -O /tmp/powershell.tar.gz ; \ + else \ + echo "Unsupported architecture: $ARCH" && exit 1 ; \ + fi && \ + mkdir -p /opt/microsoft/powershell/7 && \ + tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7 && \ + chmod +x /opt/microsoft/powershell/7/pwsh && \ + ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh && \ + rm /tmp/powershell.tar.gz + +# Add prowler user +RUN addgroup --gid 1000 prowler && \ + adduser --uid 1000 --gid 1000 --disabled-password --gecos "" prowler -RUN apk --no-cache upgrade && \ - addgroup -g 1000 prowler && \ - adduser -D -u 1000 -G prowler prowler USER prowler WORKDIR /home/prowler @@ -17,7 +37,7 @@ COPY pyproject.toml ./ RUN pip install --no-cache-dir --upgrade pip && \ pip install --no-cache-dir poetry -COPY src/backend/ ./backend/ +COPY src/backend/ ./backend/ ENV PATH="/home/prowler/.local/bin:$PATH" @@ -27,18 +47,13 @@ RUN poetry install --no-root && \ COPY docker-entrypoint.sh ./docker-entrypoint.sh +RUN poetry run python "$(poetry env info --path)/src/prowler/prowler/providers/m365/lib/powershell/m365_powershell.py" + WORKDIR /home/prowler/backend # Development image -# hadolint ignore=DL3006 FROM build AS dev -USER 0 -# hadolint ignore=DL3018 -RUN apk --no-cache add curl vim - -USER prowler - ENTRYPOINT ["../docker-entrypoint.sh", "dev"] # Production image diff --git a/api/README.md b/api/README.md index 063d8342f6..a1241372ca 100644 --- a/api/README.md +++ b/api/README.md @@ -235,6 +235,7 @@ To view the logs for any component (e.g., Django, Celery worker), you can use th ```console docker logs -f $(docker ps --format "{{.Names}}" | grep 'api-') +``` ## Applying migrations 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 8e5d3173d9..a71c16b14b 100644 --- a/api/poetry.lock +++ b/api/poetry.lock @@ -14,105 +14,105 @@ files = [ [[package]] name = "aiohappyeyeballs" -version = "2.4.6" +version = "2.6.1" description = "Happy Eyeballs for asyncio" optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "aiohappyeyeballs-2.4.6-py3-none-any.whl", hash = "sha256:147ec992cf873d74f5062644332c539fcd42956dc69453fe5204195e560517e1"}, - {file = "aiohappyeyeballs-2.4.6.tar.gz", hash = "sha256:9b05052f9042985d32ecbe4b59a77ae19c006a78f1344d7fdad69d28ded3d0b0"}, + {file = "aiohappyeyeballs-2.6.1-py3-none-any.whl", hash = "sha256:f349ba8f4b75cb25c99c5c2d84e997e485204d2902a9597802b0371f09331fb8"}, + {file = "aiohappyeyeballs-2.6.1.tar.gz", hash = "sha256:c3f9d0113123803ccadfdf3f0faa505bc78e6a72d1cc4806cbd719826e943558"}, ] [[package]] name = "aiohttp" -version = "3.11.12" +version = "3.11.18" description = "Async http client/server framework (asyncio)" optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "aiohttp-3.11.12-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:aa8a8caca81c0a3e765f19c6953416c58e2f4cc1b84829af01dd1c771bb2f91f"}, - {file = "aiohttp-3.11.12-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:84ede78acde96ca57f6cf8ccb8a13fbaf569f6011b9a52f870c662d4dc8cd854"}, - {file = "aiohttp-3.11.12-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:584096938a001378484aa4ee54e05dc79c7b9dd933e271c744a97b3b6f644957"}, - {file = "aiohttp-3.11.12-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:392432a2dde22b86f70dd4a0e9671a349446c93965f261dbaecfaf28813e5c42"}, - {file = "aiohttp-3.11.12-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:88d385b8e7f3a870146bf5ea31786ef7463e99eb59e31db56e2315535d811f55"}, - {file = "aiohttp-3.11.12-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b10a47e5390c4b30a0d58ee12581003be52eedd506862ab7f97da7a66805befb"}, - {file = "aiohttp-3.11.12-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0b5263dcede17b6b0c41ef0c3ccce847d82a7da98709e75cf7efde3e9e3b5cae"}, - {file = "aiohttp-3.11.12-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:50c5c7b8aa5443304c55c262c5693b108c35a3b61ef961f1e782dd52a2f559c7"}, - {file = "aiohttp-3.11.12-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:d1c031a7572f62f66f1257db37ddab4cb98bfaf9b9434a3b4840bf3560f5e788"}, - {file = "aiohttp-3.11.12-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:7e44eba534381dd2687be50cbd5f2daded21575242ecfdaf86bbeecbc38dae8e"}, - {file = "aiohttp-3.11.12-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:145a73850926018ec1681e734cedcf2716d6a8697d90da11284043b745c286d5"}, - {file = "aiohttp-3.11.12-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:2c311e2f63e42c1bf86361d11e2c4a59f25d9e7aabdbdf53dc38b885c5435cdb"}, - {file = "aiohttp-3.11.12-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:ea756b5a7bac046d202a9a3889b9a92219f885481d78cd318db85b15cc0b7bcf"}, - {file = "aiohttp-3.11.12-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:526c900397f3bbc2db9cb360ce9c35134c908961cdd0ac25b1ae6ffcaa2507ff"}, - {file = "aiohttp-3.11.12-cp310-cp310-win32.whl", hash = "sha256:b8d3bb96c147b39c02d3db086899679f31958c5d81c494ef0fc9ef5bb1359b3d"}, - {file = "aiohttp-3.11.12-cp310-cp310-win_amd64.whl", hash = "sha256:7fe3d65279bfbee8de0fb4f8c17fc4e893eed2dba21b2f680e930cc2b09075c5"}, - {file = "aiohttp-3.11.12-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:87a2e00bf17da098d90d4145375f1d985a81605267e7f9377ff94e55c5d769eb"}, - {file = "aiohttp-3.11.12-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b34508f1cd928ce915ed09682d11307ba4b37d0708d1f28e5774c07a7674cac9"}, - {file = "aiohttp-3.11.12-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:936d8a4f0f7081327014742cd51d320296b56aa6d324461a13724ab05f4b2933"}, - {file = "aiohttp-3.11.12-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2de1378f72def7dfb5dbd73d86c19eda0ea7b0a6873910cc37d57e80f10d64e1"}, - {file = "aiohttp-3.11.12-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b9d45dbb3aaec05cf01525ee1a7ac72de46a8c425cb75c003acd29f76b1ffe94"}, - {file = "aiohttp-3.11.12-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:930ffa1925393381e1e0a9b82137fa7b34c92a019b521cf9f41263976666a0d6"}, - {file = "aiohttp-3.11.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8340def6737118f5429a5df4e88f440746b791f8f1c4ce4ad8a595f42c980bd5"}, - {file = "aiohttp-3.11.12-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4016e383f91f2814e48ed61e6bda7d24c4d7f2402c75dd28f7e1027ae44ea204"}, - {file = "aiohttp-3.11.12-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:3c0600bcc1adfaaac321422d615939ef300df81e165f6522ad096b73439c0f58"}, - {file = "aiohttp-3.11.12-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:0450ada317a65383b7cce9576096150fdb97396dcfe559109b403c7242faffef"}, - {file = "aiohttp-3.11.12-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:850ff6155371fd802a280f8d369d4e15d69434651b844bde566ce97ee2277420"}, - {file = "aiohttp-3.11.12-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:8fd12d0f989c6099e7b0f30dc6e0d1e05499f3337461f0b2b0dadea6c64b89df"}, - {file = "aiohttp-3.11.12-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:76719dd521c20a58a6c256d058547b3a9595d1d885b830013366e27011ffe804"}, - {file = "aiohttp-3.11.12-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:97fe431f2ed646a3b56142fc81d238abcbaff08548d6912acb0b19a0cadc146b"}, - {file = "aiohttp-3.11.12-cp311-cp311-win32.whl", hash = "sha256:e10c440d142fa8b32cfdb194caf60ceeceb3e49807072e0dc3a8887ea80e8c16"}, - {file = "aiohttp-3.11.12-cp311-cp311-win_amd64.whl", hash = "sha256:246067ba0cf5560cf42e775069c5d80a8989d14a7ded21af529a4e10e3e0f0e6"}, - {file = "aiohttp-3.11.12-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:e392804a38353900c3fd8b7cacbea5132888f7129f8e241915e90b85f00e3250"}, - {file = "aiohttp-3.11.12-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:8fa1510b96c08aaad49303ab11f8803787c99222288f310a62f493faf883ede1"}, - {file = "aiohttp-3.11.12-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:dc065a4285307607df3f3686363e7f8bdd0d8ab35f12226362a847731516e42c"}, - {file = "aiohttp-3.11.12-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cddb31f8474695cd61fc9455c644fc1606c164b93bff2490390d90464b4655df"}, - {file = "aiohttp-3.11.12-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9dec0000d2d8621d8015c293e24589d46fa218637d820894cb7356c77eca3259"}, - {file = "aiohttp-3.11.12-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e3552fe98e90fdf5918c04769f338a87fa4f00f3b28830ea9b78b1bdc6140e0d"}, - {file = "aiohttp-3.11.12-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6dfe7f984f28a8ae94ff3a7953cd9678550dbd2a1f9bda5dd9c5ae627744c78e"}, - {file = "aiohttp-3.11.12-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a481a574af914b6e84624412666cbfbe531a05667ca197804ecc19c97b8ab1b0"}, - {file = "aiohttp-3.11.12-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:1987770fb4887560363b0e1a9b75aa303e447433c41284d3af2840a2f226d6e0"}, - {file = "aiohttp-3.11.12-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:a4ac6a0f0f6402854adca4e3259a623f5c82ec3f0c049374133bcb243132baf9"}, - {file = "aiohttp-3.11.12-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:c96a43822f1f9f69cc5c3706af33239489a6294be486a0447fb71380070d4d5f"}, - {file = "aiohttp-3.11.12-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:a5e69046f83c0d3cb8f0d5bd9b8838271b1bc898e01562a04398e160953e8eb9"}, - {file = "aiohttp-3.11.12-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:68d54234c8d76d8ef74744f9f9fc6324f1508129e23da8883771cdbb5818cbef"}, - {file = "aiohttp-3.11.12-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c9fd9dcf9c91affe71654ef77426f5cf8489305e1c66ed4816f5a21874b094b9"}, - {file = "aiohttp-3.11.12-cp312-cp312-win32.whl", hash = "sha256:0ed49efcd0dc1611378beadbd97beb5d9ca8fe48579fc04a6ed0844072261b6a"}, - {file = "aiohttp-3.11.12-cp312-cp312-win_amd64.whl", hash = "sha256:54775858c7f2f214476773ce785a19ee81d1294a6bedc5cc17225355aab74802"}, - {file = "aiohttp-3.11.12-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:413ad794dccb19453e2b97c2375f2ca3cdf34dc50d18cc2693bd5aed7d16f4b9"}, - {file = "aiohttp-3.11.12-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:4a93d28ed4b4b39e6f46fd240896c29b686b75e39cc6992692e3922ff6982b4c"}, - {file = "aiohttp-3.11.12-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:d589264dbba3b16e8951b6f145d1e6b883094075283dafcab4cdd564a9e353a0"}, - {file = "aiohttp-3.11.12-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e5148ca8955affdfeb864aca158ecae11030e952b25b3ae15d4e2b5ba299bad2"}, - {file = "aiohttp-3.11.12-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:525410e0790aab036492eeea913858989c4cb070ff373ec3bc322d700bdf47c1"}, - {file = "aiohttp-3.11.12-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9bd8695be2c80b665ae3f05cb584093a1e59c35ecb7d794d1edd96e8cc9201d7"}, - {file = "aiohttp-3.11.12-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f0203433121484b32646a5f5ea93ae86f3d9559d7243f07e8c0eab5ff8e3f70e"}, - {file = "aiohttp-3.11.12-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:40cd36749a1035c34ba8d8aaf221b91ca3d111532e5ccb5fa8c3703ab1b967ed"}, - {file = "aiohttp-3.11.12-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a7442662afebbf7b4c6d28cb7aab9e9ce3a5df055fc4116cc7228192ad6cb484"}, - {file = "aiohttp-3.11.12-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:8a2fb742ef378284a50766e985804bd6adb5adb5aa781100b09befdbfa757b65"}, - {file = "aiohttp-3.11.12-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:2cee3b117a8d13ab98b38d5b6bdcd040cfb4181068d05ce0c474ec9db5f3c5bb"}, - {file = "aiohttp-3.11.12-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:f6a19bcab7fbd8f8649d6595624856635159a6527861b9cdc3447af288a00c00"}, - {file = "aiohttp-3.11.12-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:e4cecdb52aaa9994fbed6b81d4568427b6002f0a91c322697a4bfcc2b2363f5a"}, - {file = "aiohttp-3.11.12-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:30f546358dfa0953db92ba620101fefc81574f87b2346556b90b5f3ef16e55ce"}, - {file = "aiohttp-3.11.12-cp313-cp313-win32.whl", hash = "sha256:ce1bb21fc7d753b5f8a5d5a4bae99566386b15e716ebdb410154c16c91494d7f"}, - {file = "aiohttp-3.11.12-cp313-cp313-win_amd64.whl", hash = "sha256:f7914ab70d2ee8ab91c13e5402122edbc77821c66d2758abb53aabe87f013287"}, - {file = "aiohttp-3.11.12-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:7c3623053b85b4296cd3925eeb725e386644fd5bc67250b3bb08b0f144803e7b"}, - {file = "aiohttp-3.11.12-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:67453e603cea8e85ed566b2700efa1f6916aefbc0c9fcb2e86aaffc08ec38e78"}, - {file = "aiohttp-3.11.12-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:6130459189e61baac5a88c10019b21e1f0c6d00ebc770e9ce269475650ff7f73"}, - {file = "aiohttp-3.11.12-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9060addfa4ff753b09392efe41e6af06ea5dd257829199747b9f15bfad819460"}, - {file = "aiohttp-3.11.12-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:34245498eeb9ae54c687a07ad7f160053911b5745e186afe2d0c0f2898a1ab8a"}, - {file = "aiohttp-3.11.12-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8dc0fba9a74b471c45ca1a3cb6e6913ebfae416678d90529d188886278e7f3f6"}, - {file = "aiohttp-3.11.12-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a478aa11b328983c4444dacb947d4513cb371cd323f3845e53caeda6be5589d5"}, - {file = "aiohttp-3.11.12-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c160a04283c8c6f55b5bf6d4cad59bb9c5b9c9cd08903841b25f1f7109ef1259"}, - {file = "aiohttp-3.11.12-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:edb69b9589324bdc40961cdf0657815df674f1743a8d5ad9ab56a99e4833cfdd"}, - {file = "aiohttp-3.11.12-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:4ee84c2a22a809c4f868153b178fe59e71423e1f3d6a8cd416134bb231fbf6d3"}, - {file = "aiohttp-3.11.12-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:bf4480a5438f80e0f1539e15a7eb8b5f97a26fe087e9828e2c0ec2be119a9f72"}, - {file = "aiohttp-3.11.12-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:e6b2732ef3bafc759f653a98881b5b9cdef0716d98f013d376ee8dfd7285abf1"}, - {file = "aiohttp-3.11.12-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:f752e80606b132140883bb262a457c475d219d7163d996dc9072434ffb0784c4"}, - {file = "aiohttp-3.11.12-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:ab3247d58b393bda5b1c8f31c9edece7162fc13265334217785518dd770792b8"}, - {file = "aiohttp-3.11.12-cp39-cp39-win32.whl", hash = "sha256:0d5176f310a7fe6f65608213cc74f4228e4f4ce9fd10bcb2bb6da8fc66991462"}, - {file = "aiohttp-3.11.12-cp39-cp39-win_amd64.whl", hash = "sha256:74bd573dde27e58c760d9ca8615c41a57e719bff315c9adb6f2a4281a28e8798"}, - {file = "aiohttp-3.11.12.tar.gz", hash = "sha256:7603ca26d75b1b86160ce1bbe2787a0b706e592af5b2504e12caa88a217767b0"}, + {file = "aiohttp-3.11.18-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:96264854fedbea933a9ca4b7e0c745728f01380691687b7365d18d9e977179c4"}, + {file = "aiohttp-3.11.18-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:9602044ff047043430452bc3a2089743fa85da829e6fc9ee0025351d66c332b6"}, + {file = "aiohttp-3.11.18-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5691dc38750fcb96a33ceef89642f139aa315c8a193bbd42a0c33476fd4a1609"}, + {file = "aiohttp-3.11.18-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:554c918ec43f8480b47a5ca758e10e793bd7410b83701676a4782672d670da55"}, + {file = "aiohttp-3.11.18-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8a4076a2b3ba5b004b8cffca6afe18a3b2c5c9ef679b4d1e9859cf76295f8d4f"}, + {file = "aiohttp-3.11.18-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:767a97e6900edd11c762be96d82d13a1d7c4fc4b329f054e88b57cdc21fded94"}, + {file = "aiohttp-3.11.18-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f0ddc9337a0fb0e727785ad4f41163cc314376e82b31846d3835673786420ef1"}, + {file = "aiohttp-3.11.18-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f414f37b244f2a97e79b98d48c5ff0789a0b4b4609b17d64fa81771ad780e415"}, + {file = "aiohttp-3.11.18-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:fdb239f47328581e2ec7744ab5911f97afb10752332a6dd3d98e14e429e1a9e7"}, + {file = "aiohttp-3.11.18-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:f2c50bad73ed629cc326cc0f75aed8ecfb013f88c5af116f33df556ed47143eb"}, + {file = "aiohttp-3.11.18-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:0a8d8f20c39d3fa84d1c28cdb97f3111387e48209e224408e75f29c6f8e0861d"}, + {file = "aiohttp-3.11.18-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:106032eaf9e62fd6bc6578c8b9e6dc4f5ed9a5c1c7fb2231010a1b4304393421"}, + {file = "aiohttp-3.11.18-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:b491e42183e8fcc9901d8dcd8ae644ff785590f1727f76ca86e731c61bfe6643"}, + {file = "aiohttp-3.11.18-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:ad8c745ff9460a16b710e58e06a9dec11ebc0d8f4dd82091cefb579844d69868"}, + {file = "aiohttp-3.11.18-cp310-cp310-win32.whl", hash = "sha256:8e57da93e24303a883146510a434f0faf2f1e7e659f3041abc4e3fb3f6702a9f"}, + {file = "aiohttp-3.11.18-cp310-cp310-win_amd64.whl", hash = "sha256:cc93a4121d87d9f12739fc8fab0a95f78444e571ed63e40bfc78cd5abe700ac9"}, + {file = "aiohttp-3.11.18-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:427fdc56ccb6901ff8088544bde47084845ea81591deb16f957897f0f0ba1be9"}, + {file = "aiohttp-3.11.18-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:2c828b6d23b984255b85b9b04a5b963a74278b7356a7de84fda5e3b76866597b"}, + {file = "aiohttp-3.11.18-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5c2eaa145bb36b33af1ff2860820ba0589e165be4ab63a49aebfd0981c173b66"}, + {file = "aiohttp-3.11.18-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3d518ce32179f7e2096bf4e3e8438cf445f05fedd597f252de9f54c728574756"}, + {file = "aiohttp-3.11.18-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0700055a6e05c2f4711011a44364020d7a10fbbcd02fbf3e30e8f7e7fddc8717"}, + {file = "aiohttp-3.11.18-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8bd1cde83e4684324e6ee19adfc25fd649d04078179890be7b29f76b501de8e4"}, + {file = "aiohttp-3.11.18-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:73b8870fe1c9a201b8c0d12c94fe781b918664766728783241a79e0468427e4f"}, + {file = "aiohttp-3.11.18-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:25557982dd36b9e32c0a3357f30804e80790ec2c4d20ac6bcc598533e04c6361"}, + {file = "aiohttp-3.11.18-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:7e889c9df381a2433802991288a61e5a19ceb4f61bd14f5c9fa165655dcb1fd1"}, + {file = "aiohttp-3.11.18-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:9ea345fda05bae217b6cce2acf3682ce3b13d0d16dd47d0de7080e5e21362421"}, + {file = "aiohttp-3.11.18-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:9f26545b9940c4b46f0a9388fd04ee3ad7064c4017b5a334dd450f616396590e"}, + {file = "aiohttp-3.11.18-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:3a621d85e85dccabd700294494d7179ed1590b6d07a35709bb9bd608c7f5dd1d"}, + {file = "aiohttp-3.11.18-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:9c23fd8d08eb9c2af3faeedc8c56e134acdaf36e2117ee059d7defa655130e5f"}, + {file = "aiohttp-3.11.18-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:d9e6b0e519067caa4fd7fb72e3e8002d16a68e84e62e7291092a5433763dc0dd"}, + {file = "aiohttp-3.11.18-cp311-cp311-win32.whl", hash = "sha256:122f3e739f6607e5e4c6a2f8562a6f476192a682a52bda8b4c6d4254e1138f4d"}, + {file = "aiohttp-3.11.18-cp311-cp311-win_amd64.whl", hash = "sha256:e6f3c0a3a1e73e88af384b2e8a0b9f4fb73245afd47589df2afcab6b638fa0e6"}, + {file = "aiohttp-3.11.18-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:63d71eceb9cad35d47d71f78edac41fcd01ff10cacaa64e473d1aec13fa02df2"}, + {file = "aiohttp-3.11.18-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d1929da615840969929e8878d7951b31afe0bac883d84418f92e5755d7b49508"}, + {file = "aiohttp-3.11.18-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7d0aebeb2392f19b184e3fdd9e651b0e39cd0f195cdb93328bd124a1d455cd0e"}, + {file = "aiohttp-3.11.18-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3849ead845e8444f7331c284132ab314b4dac43bfae1e3cf350906d4fff4620f"}, + {file = "aiohttp-3.11.18-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5e8452ad6b2863709f8b3d615955aa0807bc093c34b8e25b3b52097fe421cb7f"}, + {file = "aiohttp-3.11.18-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3b8d2b42073611c860a37f718b3d61ae8b4c2b124b2e776e2c10619d920350ec"}, + {file = "aiohttp-3.11.18-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:40fbf91f6a0ac317c0a07eb328a1384941872f6761f2e6f7208b63c4cc0a7ff6"}, + {file = "aiohttp-3.11.18-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:44ff5625413fec55216da5eaa011cf6b0a2ed67a565914a212a51aa3755b0009"}, + {file = "aiohttp-3.11.18-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:7f33a92a2fde08e8c6b0c61815521324fc1612f397abf96eed86b8e31618fdb4"}, + {file = "aiohttp-3.11.18-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:11d5391946605f445ddafda5eab11caf310f90cdda1fd99865564e3164f5cff9"}, + {file = "aiohttp-3.11.18-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:3cc314245deb311364884e44242e00c18b5896e4fe6d5f942e7ad7e4cb640adb"}, + {file = "aiohttp-3.11.18-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:0f421843b0f70740772228b9e8093289924359d306530bcd3926f39acbe1adda"}, + {file = "aiohttp-3.11.18-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:e220e7562467dc8d589e31c1acd13438d82c03d7f385c9cd41a3f6d1d15807c1"}, + {file = "aiohttp-3.11.18-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ab2ef72f8605046115bc9aa8e9d14fd49086d405855f40b79ed9e5c1f9f4faea"}, + {file = "aiohttp-3.11.18-cp312-cp312-win32.whl", hash = "sha256:12a62691eb5aac58d65200c7ae94d73e8a65c331c3a86a2e9670927e94339ee8"}, + {file = "aiohttp-3.11.18-cp312-cp312-win_amd64.whl", hash = "sha256:364329f319c499128fd5cd2d1c31c44f234c58f9b96cc57f743d16ec4f3238c8"}, + {file = "aiohttp-3.11.18-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:474215ec618974054cf5dc465497ae9708543cbfc312c65212325d4212525811"}, + {file = "aiohttp-3.11.18-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:6ced70adf03920d4e67c373fd692123e34d3ac81dfa1c27e45904a628567d804"}, + {file = "aiohttp-3.11.18-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:2d9f6c0152f8d71361905aaf9ed979259537981f47ad099c8b3d81e0319814bd"}, + {file = "aiohttp-3.11.18-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a35197013ed929c0aed5c9096de1fc5a9d336914d73ab3f9df14741668c0616c"}, + {file = "aiohttp-3.11.18-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:540b8a1f3a424f1af63e0af2d2853a759242a1769f9f1ab053996a392bd70118"}, + {file = "aiohttp-3.11.18-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f9e6710ebebfce2ba21cee6d91e7452d1125100f41b906fb5af3da8c78b764c1"}, + {file = "aiohttp-3.11.18-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f8af2ef3b4b652ff109f98087242e2ab974b2b2b496304063585e3d78de0b000"}, + {file = "aiohttp-3.11.18-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:28c3f975e5ae3dbcbe95b7e3dcd30e51da561a0a0f2cfbcdea30fc1308d72137"}, + {file = "aiohttp-3.11.18-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:c28875e316c7b4c3e745172d882d8a5c835b11018e33432d281211af35794a93"}, + {file = "aiohttp-3.11.18-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:13cd38515568ae230e1ef6919e2e33da5d0f46862943fcda74e7e915096815f3"}, + {file = "aiohttp-3.11.18-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:0e2a92101efb9f4c2942252c69c63ddb26d20f46f540c239ccfa5af865197bb8"}, + {file = "aiohttp-3.11.18-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:e6d3e32b8753c8d45ac550b11a1090dd66d110d4ef805ffe60fa61495360b3b2"}, + {file = "aiohttp-3.11.18-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:ea4cf2488156e0f281f93cc2fd365025efcba3e2d217cbe3df2840f8c73db261"}, + {file = "aiohttp-3.11.18-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9d4df95ad522c53f2b9ebc07f12ccd2cb15550941e11a5bbc5ddca2ca56316d7"}, + {file = "aiohttp-3.11.18-cp313-cp313-win32.whl", hash = "sha256:cdd1bbaf1e61f0d94aced116d6e95fe25942f7a5f42382195fd9501089db5d78"}, + {file = "aiohttp-3.11.18-cp313-cp313-win_amd64.whl", hash = "sha256:bdd619c27e44382cf642223f11cfd4d795161362a5a1fc1fa3940397bc89db01"}, + {file = "aiohttp-3.11.18-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:469ac32375d9a716da49817cd26f1916ec787fc82b151c1c832f58420e6d3533"}, + {file = "aiohttp-3.11.18-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3cec21dd68924179258ae14af9f5418c1ebdbba60b98c667815891293902e5e0"}, + {file = "aiohttp-3.11.18-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b426495fb9140e75719b3ae70a5e8dd3a79def0ae3c6c27e012fc59f16544a4a"}, + {file = "aiohttp-3.11.18-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ad2f41203e2808616292db5d7170cccf0c9f9c982d02544443c7eb0296e8b0c7"}, + {file = "aiohttp-3.11.18-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5bc0ae0a5e9939e423e065a3e5b00b24b8379f1db46046d7ab71753dfc7dd0e1"}, + {file = "aiohttp-3.11.18-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fe7cdd3f7d1df43200e1c80f1aed86bb36033bf65e3c7cf46a2b97a253ef8798"}, + {file = "aiohttp-3.11.18-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5199be2a2f01ffdfa8c3a6f5981205242986b9e63eb8ae03fd18f736e4840721"}, + {file = "aiohttp-3.11.18-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7ccec9e72660b10f8e283e91aa0295975c7bd85c204011d9f5eb69310555cf30"}, + {file = "aiohttp-3.11.18-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:1596ebf17e42e293cbacc7a24c3e0dc0f8f755b40aff0402cb74c1ff6baec1d3"}, + {file = "aiohttp-3.11.18-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:eab7b040a8a873020113ba814b7db7fa935235e4cbaf8f3da17671baa1024863"}, + {file = "aiohttp-3.11.18-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:5d61df4a05476ff891cff0030329fee4088d40e4dc9b013fac01bc3c745542c2"}, + {file = "aiohttp-3.11.18-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:46533e6792e1410f9801d09fd40cbbff3f3518d1b501d6c3c5b218f427f6ff08"}, + {file = "aiohttp-3.11.18-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:c1b90407ced992331dd6d4f1355819ea1c274cc1ee4d5b7046c6761f9ec11829"}, + {file = "aiohttp-3.11.18-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:a2fd04ae4971b914e54fe459dd7edbbd3f2ba875d69e057d5e3c8e8cac094935"}, + {file = "aiohttp-3.11.18-cp39-cp39-win32.whl", hash = "sha256:b2f317d1678002eee6fe85670039fb34a757972284614638f82b903a03feacdc"}, + {file = "aiohttp-3.11.18-cp39-cp39-win_amd64.whl", hash = "sha256:5e7007b8d1d09bce37b54111f593d173691c530b80f27c6493b928dabed9e6ef"}, + {file = "aiohttp-3.11.18.tar.gz", hash = "sha256:ae856e1138612b7e412db63b7708735cff4d38d0399f6a5435d3dac2669f558a"}, ] [package.dependencies] @@ -175,14 +175,14 @@ vine = ">=5.0.0,<6.0.0" [[package]] name = "anyio" -version = "4.8.0" +version = "4.9.0" description = "High level compatibility layer for multiple asynchronous event loop implementations" optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "anyio-4.8.0-py3-none-any.whl", hash = "sha256:b5011f270ab5eb0abf13385f851315585cc37ef330dd88e27ec3d34d651fd47a"}, - {file = "anyio-4.8.0.tar.gz", hash = "sha256:1d9fe889df5212298c0c0723fa20479d1b94883a2df44bd3897aa91083316f7a"}, + {file = "anyio-4.9.0-py3-none-any.whl", hash = "sha256:9f76d541cad6e36af7beb62e978876f3b41e3e04f2c1fbf0884604c0a9c4d93c"}, + {file = "anyio-4.9.0.tar.gz", hash = "sha256:673c0c244e15788651a4ff38710fea9675823028a6f08a5eda409e0c9840a028"}, ] [package.dependencies] @@ -191,8 +191,8 @@ sniffio = ">=1.1" typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] -doc = ["Sphinx (>=7.4,<8.0)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx_rtd_theme"] -test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "trustme", "truststore (>=0.9.1) ; python_version >= \"3.10\"", "uvloop (>=0.21) ; platform_python_implementation == \"CPython\" and platform_system != \"Windows\" and python_version < \"3.14\""] +doc = ["Sphinx (>=8.2,<9.0)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx_rtd_theme"] +test = ["anyio[trio]", "blockbuster (>=1.5.23)", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "trustme", "truststore (>=0.9.1) ; python_version >= \"3.10\"", "uvloop (>=0.21) ; platform_python_implementation == \"CPython\" and platform_system != \"Windows\" and python_version < \"3.14\""] trio = ["trio (>=0.26.1)"] [[package]] @@ -237,34 +237,34 @@ files = [ [[package]] name = "attrs" -version = "25.1.0" +version = "25.3.0" description = "Classes Without Boilerplate" optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "attrs-25.1.0-py3-none-any.whl", hash = "sha256:c75a69e28a550a7e93789579c22aa26b0f5b83b75dc4e08fe092980051e1090a"}, - {file = "attrs-25.1.0.tar.gz", hash = "sha256:1c97078a80c814273a76b2a298a932eb681c87415c11dee0a6921de7f1b02c3e"}, + {file = "attrs-25.3.0-py3-none-any.whl", hash = "sha256:427318ce031701fea540783410126f03899a97ffc6f61596ad581ac2e40e3bc3"}, + {file = "attrs-25.3.0.tar.gz", hash = "sha256:75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b"}, ] [package.extras] benchmark = ["cloudpickle ; platform_python_implementation == \"CPython\"", "hypothesis", "mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pympler", "pytest (>=4.3.0)", "pytest-codspeed", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-xdist[psutil]"] cov = ["cloudpickle ; platform_python_implementation == \"CPython\"", "coverage[toml] (>=5.3)", "hypothesis", "mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-xdist[psutil]"] dev = ["cloudpickle ; platform_python_implementation == \"CPython\"", "hypothesis", "mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pre-commit-uv", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-xdist[psutil]"] -docs = ["cogapp", "furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier (<24.7)"] +docs = ["cogapp", "furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier"] tests = ["cloudpickle ; platform_python_implementation == \"CPython\"", "hypothesis", "mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-xdist[psutil]"] tests-mypy = ["mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\""] [[package]] name = "authlib" -version = "1.4.1" +version = "1.5.2" description = "The ultimate Python library in building OAuth and OpenID Connect servers and clients." optional = false python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "Authlib-1.4.1-py2.py3-none-any.whl", hash = "sha256:edc29c3f6a3e72cd9e9f45fff67fc663a2c364022eb0371c003f22d5405915c1"}, - {file = "authlib-1.4.1.tar.gz", hash = "sha256:30ead9ea4993cdbab821dc6e01e818362f92da290c04c7f6a1940f86507a790d"}, + {file = "authlib-1.5.2-py2.py3-none-any.whl", hash = "sha256:8804dd4402ac5e4a0435ac49e0b6e19e395357cfa632a3f624dcb4f6df13b4b1"}, + {file = "authlib-1.5.2.tar.gz", hash = "sha256:fe85ec7e50c5f86f1e2603518bb3b4f632985eb4a355e52256530790e326c512"}, ] [package.dependencies] @@ -311,14 +311,14 @@ files = [ [[package]] name = "azure-core" -version = "1.32.0" +version = "1.33.0" description = "Microsoft Azure Core Library for Python" optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "azure_core-1.32.0-py3-none-any.whl", hash = "sha256:eac191a0efb23bfa83fddf321b27b122b4ec847befa3091fa736a5c32c50d7b4"}, - {file = "azure_core-1.32.0.tar.gz", hash = "sha256:22b3c35d6b2dae14990f6c1be2912bf23ffe50b220e708a28ab1bb92b1c730e5"}, + {file = "azure_core-1.33.0-py3-none-any.whl", hash = "sha256:9b5b6d0223a1d38c37500e6971118c1e0f13f54951e6893968b38910bc9cda8f"}, + {file = "azure_core-1.33.0.tar.gz", hash = "sha256:f367aa07b5e3005fec2c1e184b882b0b039910733907d001c20fb08ebb8c0eb9"}, ] [package.dependencies] @@ -328,17 +328,18 @@ typing-extensions = ">=4.6.0" [package.extras] aio = ["aiohttp (>=3.0)"] +tracing = ["opentelemetry-api (>=1.26,<2.0)"] [[package]] name = "azure-identity" -version = "1.19.0" +version = "1.21.0" description = "Microsoft Azure Identity Library for Python" optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "azure_identity-1.19.0-py3-none-any.whl", hash = "sha256:e3f6558c181692d7509f09de10cca527c7dce426776454fb97df512a46527e81"}, - {file = "azure_identity-1.19.0.tar.gz", hash = "sha256:500144dc18197d7019b81501165d4fa92225f03778f17d7ca8a2a180129a9c83"}, + {file = "azure_identity-1.21.0-py3-none-any.whl", hash = "sha256:258ea6325537352440f71b35c3dffe9d240eae4a5126c1b7ce5efd5766bd9fd9"}, + {file = "azure_identity-1.21.0.tar.gz", hash = "sha256:ea22ce6e6b0f429bc1b8d9212d5b9f9877bd4c82f1724bfa910760612c07a9a6"}, ] [package.dependencies] @@ -368,20 +369,21 @@ typing-extensions = ">=4.0.1" [[package]] name = "azure-mgmt-applicationinsights" -version = "4.0.0" +version = "4.1.0" description = "Microsoft Azure Application Insights Management Client Library for Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" groups = ["main"] files = [ - {file = "azure-mgmt-applicationinsights-4.0.0.zip", hash = "sha256:50c3db05573e0cc2d56314a0556fb346ef05ec489ac000f4d720d92c6b647e06"}, - {file = "azure_mgmt_applicationinsights-4.0.0-py3-none-any.whl", hash = "sha256:2b1ffd9a0114974455795c73a3a5d17c849e32b961d707d2db393b99254b576f"}, + {file = "azure_mgmt_applicationinsights-4.1.0-py3-none-any.whl", hash = "sha256:9e71f29b01e505a773501451d12fd6a10482cf4b13e9ac2bff72f5380496d979"}, + {file = "azure_mgmt_applicationinsights-4.1.0.tar.gz", hash = "sha256:15531390f12ce3d767cd3f1949af36aa39077c145c952fec4d80303c86ec7b6c"}, ] [package.dependencies] -azure-common = ">=1.1,<2.0" -azure-mgmt-core = ">=1.3.2,<2.0.0" -isodate = ">=0.6.1,<1.0.0" +azure-common = ">=1.1" +azure-mgmt-core = ">=1.3.2" +isodate = ">=0.6.1" +typing-extensions = ">=4.6.0" [[package]] name = "azure-mgmt-authorization" @@ -420,31 +422,32 @@ typing-extensions = ">=4.6.0" [[package]] name = "azure-mgmt-containerregistry" -version = "10.3.0" +version = "12.0.0" description = "Microsoft Azure Container Registry Client Library for Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" groups = ["main"] files = [ - {file = "azure-mgmt-containerregistry-10.3.0.tar.gz", hash = "sha256:ae21651855dfb19c42d91d6b3a965c6c611e23f8bc4bf7138835e652d2f918e3"}, - {file = "azure_mgmt_containerregistry-10.3.0-py3-none-any.whl", hash = "sha256:851e1c57f9bc4a3589c6b21fb627c11fd6cbb57a0388b7dfccd530ba3160805f"}, + {file = "azure_mgmt_containerregistry-12.0.0-py3-none-any.whl", hash = "sha256:464abd4d3d9ecc0456ed8f63a6b9b93afc2e3e194f2d34f26a758afb67ad3b5c"}, + {file = "azure_mgmt_containerregistry-12.0.0.tar.gz", hash = "sha256:f19f8faa7881deaf2b5015c0eb050a92e2380cd9d18dee33cdb5f27d44a06c03"}, ] [package.dependencies] -azure-common = ">=1.1,<2.0" -azure-mgmt-core = ">=1.3.2,<2.0.0" -isodate = ">=0.6.1,<1.0.0" +azure-common = ">=1.1" +azure-mgmt-core = ">=1.3.2" +isodate = ">=0.6.1" +typing-extensions = ">=4.6.0" [[package]] name = "azure-mgmt-containerservice" -version = "34.0.0" +version = "34.1.0" description = "Microsoft Azure Container Service Management Client Library for Python" optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "azure_mgmt_containerservice-34.0.0-py3-none-any.whl", hash = "sha256:34be8172241e3c2c444682407970a938f60e3b2bd06304eaae0a1ba641f2262d"}, - {file = "azure_mgmt_containerservice-34.0.0.tar.gz", hash = "sha256:822d07828b746a5ea5408a8b3770f41dc424d6c4c28de53c29611b62bef8aea3"}, + {file = "azure_mgmt_containerservice-34.1.0-py3-none-any.whl", hash = "sha256:1faa1714e0100c6ee4cfb8d2eadb1c270b548a84b0070c74e9fe646056a5cb12"}, + {file = "azure_mgmt_containerservice-34.1.0.tar.gz", hash = "sha256:637a6cf8f06636c016ad151d76f9c7ba75bd05d4334b3dd7837eb8b517f30dbe"}, ] [package.dependencies] @@ -558,14 +561,14 @@ msrest = ">=0.6.21" [[package]] name = "azure-mgmt-resource" -version = "23.2.0" +version = "23.3.0" description = "Microsoft Azure Resource Management Client Library for Python" optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "azure_mgmt_resource-23.2.0-py3-none-any.whl", hash = "sha256:7af2bca928ecd58e57ea7f7731d245f45e9d927036d82f1d30b96baa0c26b569"}, - {file = "azure_mgmt_resource-23.2.0.tar.gz", hash = "sha256:747b750df7af23ab30e53d3f36247ab0c16de1e267d666b1a5077c39a4292529"}, + {file = "azure_mgmt_resource-23.3.0-py3-none-any.whl", hash = "sha256:ab216ee28e29db6654b989746e0c85a1181f66653929d2cb6e48fba66d9af323"}, + {file = "azure_mgmt_resource-23.3.0.tar.gz", hash = "sha256:fc4f1fd8b6aad23f8af4ed1f913df5f5c92df117449dc354fea6802a2829fea4"}, ] [package.dependencies] @@ -627,20 +630,21 @@ msrest = ">=0.6.21" [[package]] name = "azure-mgmt-storage" -version = "21.2.1" +version = "22.1.1" description = "Microsoft Azure Storage Management Client Library for Python" optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "azure-mgmt-storage-21.2.1.tar.gz", hash = "sha256:503a7ff9c31254092b0656445f5728bfdfda2d09d46a82e97019eaa9a1ecec64"}, - {file = "azure_mgmt_storage-21.2.1-py3-none-any.whl", hash = "sha256:f97df1fa39cde9dbacf2cd96c9cba1fc196932185e24853e276f74b18a0bd031"}, + {file = "azure_mgmt_storage-22.1.1-py3-none-any.whl", hash = "sha256:a4a4064918dcfa4f1cbebada5bf064935d66f2a3647a2f46a1f1c9348736f5d9"}, + {file = "azure_mgmt_storage-22.1.1.tar.gz", hash = "sha256:25aaa5ae8c40c30e2f91f8aae6f52906b0557e947d5c1b9817d4ff9decc11340"}, ] [package.dependencies] azure-common = ">=1.1" azure-mgmt-core = ">=1.3.2" isodate = ">=0.6.1" +typing-extensions = ">=4.6.0" [[package]] name = "azure-mgmt-subscription" @@ -789,14 +793,14 @@ crt = ["awscrt (==0.22.0)"] [[package]] name = "cachetools" -version = "5.5.1" +version = "5.5.2" description = "Extensible memoizing collections and decorators" optional = false python-versions = ">=3.7" groups = ["main"] files = [ - {file = "cachetools-5.5.1-py3-none-any.whl", hash = "sha256:b76651fdc3b24ead3c648bbdeeb940c1b04d365b38b4af66788f9ec4a81d42bb"}, - {file = "cachetools-5.5.1.tar.gz", hash = "sha256:70f238fbba50383ef62e55c6aff6d9673175fe59f7c6782c7a0b9e38f4a9df95"}, + {file = "cachetools-5.5.2-py3-none-any.whl", hash = "sha256:d26a22bcc62eb95c3beabd9f1ee5e820d3d2704fe2967cbe350e20c8ffcd3f0a"}, + {file = "cachetools-5.5.2.tar.gz", hash = "sha256:1a661caa9175d26759571b2e19580f9d6393969e5dfca11fdb1f947a23e640d4"}, ] [[package]] @@ -1356,38 +1360,38 @@ files = [ [[package]] name = "debugpy" -version = "1.8.12" +version = "1.8.14" description = "An implementation of the Debug Adapter Protocol for Python" optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "debugpy-1.8.12-cp310-cp310-macosx_14_0_x86_64.whl", hash = "sha256:a2ba7ffe58efeae5b8fad1165357edfe01464f9aef25e814e891ec690e7dd82a"}, - {file = "debugpy-1.8.12-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cbbd4149c4fc5e7d508ece083e78c17442ee13b0e69bfa6bd63003e486770f45"}, - {file = "debugpy-1.8.12-cp310-cp310-win32.whl", hash = "sha256:b202f591204023b3ce62ff9a47baa555dc00bb092219abf5caf0e3718ac20e7c"}, - {file = "debugpy-1.8.12-cp310-cp310-win_amd64.whl", hash = "sha256:9649eced17a98ce816756ce50433b2dd85dfa7bc92ceb60579d68c053f98dff9"}, - {file = "debugpy-1.8.12-cp311-cp311-macosx_14_0_universal2.whl", hash = "sha256:36f4829839ef0afdfdd208bb54f4c3d0eea86106d719811681a8627ae2e53dd5"}, - {file = "debugpy-1.8.12-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a28ed481d530e3138553be60991d2d61103ce6da254e51547b79549675f539b7"}, - {file = "debugpy-1.8.12-cp311-cp311-win32.whl", hash = "sha256:4ad9a94d8f5c9b954e0e3b137cc64ef3f579d0df3c3698fe9c3734ee397e4abb"}, - {file = "debugpy-1.8.12-cp311-cp311-win_amd64.whl", hash = "sha256:4703575b78dd697b294f8c65588dc86874ed787b7348c65da70cfc885efdf1e1"}, - {file = "debugpy-1.8.12-cp312-cp312-macosx_14_0_universal2.whl", hash = "sha256:7e94b643b19e8feb5215fa508aee531387494bf668b2eca27fa769ea11d9f498"}, - {file = "debugpy-1.8.12-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:086b32e233e89a2740c1615c2f775c34ae951508b28b308681dbbb87bba97d06"}, - {file = "debugpy-1.8.12-cp312-cp312-win32.whl", hash = "sha256:2ae5df899732a6051b49ea2632a9ea67f929604fd2b036613a9f12bc3163b92d"}, - {file = "debugpy-1.8.12-cp312-cp312-win_amd64.whl", hash = "sha256:39dfbb6fa09f12fae32639e3286112fc35ae976114f1f3d37375f3130a820969"}, - {file = "debugpy-1.8.12-cp313-cp313-macosx_14_0_universal2.whl", hash = "sha256:696d8ae4dff4cbd06bf6b10d671e088b66669f110c7c4e18a44c43cf75ce966f"}, - {file = "debugpy-1.8.12-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:898fba72b81a654e74412a67c7e0a81e89723cfe2a3ea6fcd3feaa3395138ca9"}, - {file = "debugpy-1.8.12-cp313-cp313-win32.whl", hash = "sha256:22a11c493c70413a01ed03f01c3c3a2fc4478fc6ee186e340487b2edcd6f4180"}, - {file = "debugpy-1.8.12-cp313-cp313-win_amd64.whl", hash = "sha256:fdb3c6d342825ea10b90e43d7f20f01535a72b3a1997850c0c3cefa5c27a4a2c"}, - {file = "debugpy-1.8.12-cp38-cp38-macosx_14_0_x86_64.whl", hash = "sha256:b0232cd42506d0c94f9328aaf0d1d0785f90f87ae72d9759df7e5051be039738"}, - {file = "debugpy-1.8.12-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9af40506a59450f1315168d47a970db1a65aaab5df3833ac389d2899a5d63b3f"}, - {file = "debugpy-1.8.12-cp38-cp38-win32.whl", hash = "sha256:5cc45235fefac57f52680902b7d197fb2f3650112379a6fa9aa1b1c1d3ed3f02"}, - {file = "debugpy-1.8.12-cp38-cp38-win_amd64.whl", hash = "sha256:557cc55b51ab2f3371e238804ffc8510b6ef087673303890f57a24195d096e61"}, - {file = "debugpy-1.8.12-cp39-cp39-macosx_14_0_x86_64.whl", hash = "sha256:b5c6c967d02fee30e157ab5227706f965d5c37679c687b1e7bbc5d9e7128bd41"}, - {file = "debugpy-1.8.12-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:88a77f422f31f170c4b7e9ca58eae2a6c8e04da54121900651dfa8e66c29901a"}, - {file = "debugpy-1.8.12-cp39-cp39-win32.whl", hash = "sha256:a4042edef80364239f5b7b5764e55fd3ffd40c32cf6753da9bda4ff0ac466018"}, - {file = "debugpy-1.8.12-cp39-cp39-win_amd64.whl", hash = "sha256:f30b03b0f27608a0b26c75f0bb8a880c752c0e0b01090551b9d87c7d783e2069"}, - {file = "debugpy-1.8.12-py2.py3-none-any.whl", hash = "sha256:274b6a2040349b5c9864e475284bce5bb062e63dce368a394b8cc865ae3b00c6"}, - {file = "debugpy-1.8.12.tar.gz", hash = "sha256:646530b04f45c830ceae8e491ca1c9320a2d2f0efea3141487c82130aba70dce"}, + {file = "debugpy-1.8.14-cp310-cp310-macosx_14_0_x86_64.whl", hash = "sha256:93fee753097e85623cab1c0e6a68c76308cd9f13ffdf44127e6fab4fbf024339"}, + {file = "debugpy-1.8.14-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d937d93ae4fa51cdc94d3e865f535f185d5f9748efb41d0d49e33bf3365bd79"}, + {file = "debugpy-1.8.14-cp310-cp310-win32.whl", hash = "sha256:c442f20577b38cc7a9aafecffe1094f78f07fb8423c3dddb384e6b8f49fd2987"}, + {file = "debugpy-1.8.14-cp310-cp310-win_amd64.whl", hash = "sha256:f117dedda6d969c5c9483e23f573b38f4e39412845c7bc487b6f2648df30fe84"}, + {file = "debugpy-1.8.14-cp311-cp311-macosx_14_0_universal2.whl", hash = "sha256:1b2ac8c13b2645e0b1eaf30e816404990fbdb168e193322be8f545e8c01644a9"}, + {file = "debugpy-1.8.14-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cf431c343a99384ac7eab2f763980724834f933a271e90496944195318c619e2"}, + {file = "debugpy-1.8.14-cp311-cp311-win32.whl", hash = "sha256:c99295c76161ad8d507b413cd33422d7c542889fbb73035889420ac1fad354f2"}, + {file = "debugpy-1.8.14-cp311-cp311-win_amd64.whl", hash = "sha256:7816acea4a46d7e4e50ad8d09d963a680ecc814ae31cdef3622eb05ccacf7b01"}, + {file = "debugpy-1.8.14-cp312-cp312-macosx_14_0_universal2.whl", hash = "sha256:8899c17920d089cfa23e6005ad9f22582fd86f144b23acb9feeda59e84405b84"}, + {file = "debugpy-1.8.14-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f6bb5c0dcf80ad5dbc7b7d6eac484e2af34bdacdf81df09b6a3e62792b722826"}, + {file = "debugpy-1.8.14-cp312-cp312-win32.whl", hash = "sha256:281d44d248a0e1791ad0eafdbbd2912ff0de9eec48022a5bfbc332957487ed3f"}, + {file = "debugpy-1.8.14-cp312-cp312-win_amd64.whl", hash = "sha256:5aa56ef8538893e4502a7d79047fe39b1dae08d9ae257074c6464a7b290b806f"}, + {file = "debugpy-1.8.14-cp313-cp313-macosx_14_0_universal2.whl", hash = "sha256:329a15d0660ee09fec6786acdb6e0443d595f64f5d096fc3e3ccf09a4259033f"}, + {file = "debugpy-1.8.14-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0f920c7f9af409d90f5fd26e313e119d908b0dd2952c2393cd3247a462331f15"}, + {file = "debugpy-1.8.14-cp313-cp313-win32.whl", hash = "sha256:3784ec6e8600c66cbdd4ca2726c72d8ca781e94bce2f396cc606d458146f8f4e"}, + {file = "debugpy-1.8.14-cp313-cp313-win_amd64.whl", hash = "sha256:684eaf43c95a3ec39a96f1f5195a7ff3d4144e4a18d69bb66beeb1a6de605d6e"}, + {file = "debugpy-1.8.14-cp38-cp38-macosx_14_0_x86_64.whl", hash = "sha256:d5582bcbe42917bc6bbe5c12db1bffdf21f6bfc28d4554b738bf08d50dc0c8c3"}, + {file = "debugpy-1.8.14-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5349b7c3735b766a281873fbe32ca9cca343d4cc11ba4a743f84cb854339ff35"}, + {file = "debugpy-1.8.14-cp38-cp38-win32.whl", hash = "sha256:7118d462fe9724c887d355eef395fae68bc764fd862cdca94e70dcb9ade8a23d"}, + {file = "debugpy-1.8.14-cp38-cp38-win_amd64.whl", hash = "sha256:d235e4fa78af2de4e5609073972700523e372cf5601742449970110d565ca28c"}, + {file = "debugpy-1.8.14-cp39-cp39-macosx_14_0_x86_64.whl", hash = "sha256:413512d35ff52c2fb0fd2d65e69f373ffd24f0ecb1fac514c04a668599c5ce7f"}, + {file = "debugpy-1.8.14-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4c9156f7524a0d70b7a7e22b2e311d8ba76a15496fb00730e46dcdeedb9e1eea"}, + {file = "debugpy-1.8.14-cp39-cp39-win32.whl", hash = "sha256:b44985f97cc3dd9d52c42eb59ee9d7ee0c4e7ecd62bca704891f997de4cef23d"}, + {file = "debugpy-1.8.14-cp39-cp39-win_amd64.whl", hash = "sha256:b1528cfee6c1b1c698eb10b6b096c598738a8238822d218173d21c3086de8123"}, + {file = "debugpy-1.8.14-py2.py3-none-any.whl", hash = "sha256:5cd9a579d553b6cb9759a7908a41988ee6280b961f24f63336835d9418216a20"}, + {file = "debugpy-1.8.14.tar.gz", hash = "sha256:7cd287184318416850aa8b60ac90105837bb1e59531898c07569d197d2ed5322"}, ] [[package]] @@ -1430,14 +1434,14 @@ word-list = ["pyahocorasick"] [[package]] name = "dill" -version = "0.3.9" +version = "0.4.0" description = "serialize all of Python" optional = false python-versions = ">=3.8" groups = ["dev"] files = [ - {file = "dill-0.3.9-py3-none-any.whl", hash = "sha256:468dff3b89520b474c0397703366b7b95eebe6303f108adf9b19da1f702be87a"}, - {file = "dill-0.3.9.tar.gz", hash = "sha256:81aa267dddf68cbfe8029c42ca9ec6a4ab3b22371d1c450abc54422577b4512c"}, + {file = "dill-0.4.0-py3-none-any.whl", hash = "sha256:44f54bf6412c2c8464c14e8243eb163690a9800dbe2c367330883b19c7561049"}, + {file = "dill-0.4.0.tar.gz", hash = "sha256:0633f1d2df477324f53a895b02c901fb961bdbf65a17122586ea7019292cbcf0"}, ] [package.extras] @@ -1465,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] @@ -1511,39 +1515,39 @@ steam = ["python3-openid (>=3.0.8)"] [[package]] name = "django-celery-beat" -version = "2.7.0" +version = "2.8.0" description = "Database-backed Periodic Tasks." optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "django_celery_beat-2.7.0-py3-none-any.whl", hash = "sha256:851c680d8fbf608ca5fecd5836622beea89fa017bc2b3f94a5b8c648c32d84b1"}, - {file = "django_celery_beat-2.7.0.tar.gz", hash = "sha256:8482034925e09b698c05ad61c36ed2a8dbc436724a3fe119215193a4ca6dc967"}, + {file = "django_celery_beat-2.8.0-py3-none-any.whl", hash = "sha256:f8fd2e1ffbfa8e570ab9439383b2cd15a6642b347662d0de79c62ba6f68d4b38"}, + {file = "django_celery_beat-2.8.0.tar.gz", hash = "sha256:955bfb3c4b8f1026a8d20144d0da39c941e1eb23acbaee9e12a7e7cc1f74959a"}, ] [package.dependencies] celery = ">=5.2.3,<6.0" cron-descriptor = ">=1.2.32" -Django = ">=2.2,<5.2" +Django = ">=2.2,<6.0" django-timezone-field = ">=5.0" python-crontab = ">=2.3.4" tzdata = "*" [[package]] name = "django-celery-results" -version = "2.5.1" +version = "2.6.0" description = "Celery result backends for Django." optional = false python-versions = "*" groups = ["main"] files = [ - {file = "django_celery_results-2.5.1-py3-none-any.whl", hash = "sha256:0da4cd5ecc049333e4524a23fcfc3460dfae91aa0a60f1fae4b6b2889c254e01"}, - {file = "django_celery_results-2.5.1.tar.gz", hash = "sha256:3ecb7147f773f34d0381bac6246337ce4cf88a2ea7b82774ed48e518b67bb8fd"}, + {file = "django_celery_results-2.6.0-py3-none-any.whl", hash = "sha256:b9ccdca2695b98c7cbbb8dea742311ba9a92773d71d7b4944a676e69a7df1c73"}, + {file = "django_celery_results-2.6.0.tar.gz", hash = "sha256:9abcd836ae6b61063779244d8887a88fe80bbfaba143df36d3cb07034671277c"}, ] [package.dependencies] celery = ">=5.2.7,<6.0" -Django = ">=3.2.18" +Django = ">=3.2.25" [[package]] name = "django-cors-headers" @@ -1702,26 +1706,26 @@ openapi = ["pyyaml (>=5.4)", "uritemplate (>=3.0.1)"] [[package]] name = "djangorestframework-simplejwt" -version = "5.4.0" +version = "5.5.0" description = "A minimal JSON Web Token authentication plugin for Django REST Framework" optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "djangorestframework_simplejwt-5.4.0-py3-none-any.whl", hash = "sha256:7aec953db9ed4163430c16d086eecb0f028f814ce6bba62b06c25919261e9077"}, - {file = "djangorestframework_simplejwt-5.4.0.tar.gz", hash = "sha256:cccecce1a0e1a4a240fae80da73e5fc23055bababb8b67de88fa47cd36822320"}, + {file = "djangorestframework_simplejwt-5.5.0-py3-none-any.whl", hash = "sha256:4ef6b38af20cdde4a4a51d1fd8e063cbbabb7b45f149cc885d38d905c5a62edb"}, + {file = "djangorestframework_simplejwt-5.5.0.tar.gz", hash = "sha256:474a1b737067e6462b3609627a392d13a4da8a08b1f0574104ac6d7b1406f90e"}, ] [package.dependencies] django = ">=4.2" djangorestframework = ">=3.14" -pyjwt = ">=1.7.1,<3" +pyjwt = ">=1.7.1,<2.10.0" [package.extras] crypto = ["cryptography (>=3.3.1)"] -dev = ["Sphinx (>=1.6.5,<2)", "cryptography", "flake8", "freezegun", "ipython", "isort", "pep8", "pytest", "pytest-cov", "pytest-django", "pytest-watch", "pytest-xdist", "python-jose (==3.3.0)", "sphinx_rtd_theme (>=0.1.9)", "tox", "twine", "wheel"] +dev = ["Sphinx (>=1.6.5,<2)", "cryptography", "freezegun", "ipython", "pre-commit", "pytest", "pytest-cov", "pytest-django", "pytest-watch", "pytest-xdist", "python-jose (==3.3.0)", "pyupgrade", "ruff", "sphinx_rtd_theme (>=0.1.9)", "tox", "twine", "wheel", "yesqa"] doc = ["Sphinx (>=1.6.5,<2)", "sphinx_rtd_theme (>=0.1.9)"] -lint = ["flake8", "isort", "pep8"] +lint = ["pre-commit", "pyupgrade", "ruff", "yesqa"] python-jose = ["python-jose (==3.3.0)"] test = ["cryptography", "freezegun", "pytest", "pytest-cov", "pytest-django", "pytest-xdist", "tox"] @@ -1792,18 +1796,20 @@ poetry = ["poetry"] [[package]] name = "drf-extensions" -version = "0.7.1" +version = "0.8.0" description = "Extensions for Django REST Framework" optional = false python-versions = "*" groups = ["main"] files = [ - {file = "drf-extensions-0.7.1.tar.gz", hash = "sha256:90abfc11a2221e8daf4cd54457e41ed38cd71134678de9622e806193db027db1"}, - {file = "drf_extensions-0.7.1-py2.py3-none-any.whl", hash = "sha256:007910437e64aa1d5ad6fc47266a4ac4280e31761e6458eb30fcac7494ac7d4e"}, + {file = "drf_extensions-0.8.0-py2.py3-none-any.whl", hash = "sha256:ab7bd854c9061c27ab55233b66d758001e5c2d81aaa9d117cbbe1c9ea49c77ab"}, + {file = "drf_extensions-0.8.0.tar.gz", hash = "sha256:c3f27bca74a2def53e8454a5c7b327595195df51e121743120b2f51ef5a52aaa"}, ] [package.dependencies] -djangorestframework = ">=3.9.3" +Django = ">=2.2,<6.0" +djangorestframework = ">=3.10.3" +packaging = ">=24.1" [[package]] name = "drf-nested-routers" @@ -1964,124 +1970,136 @@ python-dateutil = ">=2.7" [[package]] name = "frozenlist" -version = "1.5.0" +version = "1.6.0" description = "A list-like structure which implements collections.abc.MutableSequence" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["main"] files = [ - {file = "frozenlist-1.5.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:5b6a66c18b5b9dd261ca98dffcb826a525334b2f29e7caa54e182255c5f6a65a"}, - {file = "frozenlist-1.5.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d1b3eb7b05ea246510b43a7e53ed1653e55c2121019a97e60cad7efb881a97bb"}, - {file = "frozenlist-1.5.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:15538c0cbf0e4fa11d1e3a71f823524b0c46299aed6e10ebb4c2089abd8c3bec"}, - {file = "frozenlist-1.5.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e79225373c317ff1e35f210dd5f1344ff31066ba8067c307ab60254cd3a78ad5"}, - {file = "frozenlist-1.5.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9272fa73ca71266702c4c3e2d4a28553ea03418e591e377a03b8e3659d94fa76"}, - {file = "frozenlist-1.5.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:498524025a5b8ba81695761d78c8dd7382ac0b052f34e66939c42df860b8ff17"}, - {file = "frozenlist-1.5.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:92b5278ed9d50fe610185ecd23c55d8b307d75ca18e94c0e7de328089ac5dcba"}, - {file = "frozenlist-1.5.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f3c8c1dacd037df16e85227bac13cca58c30da836c6f936ba1df0c05d046d8d"}, - {file = "frozenlist-1.5.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:f2ac49a9bedb996086057b75bf93538240538c6d9b38e57c82d51f75a73409d2"}, - {file = "frozenlist-1.5.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e66cc454f97053b79c2ab09c17fbe3c825ea6b4de20baf1be28919460dd7877f"}, - {file = "frozenlist-1.5.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:5a3ba5f9a0dfed20337d3e966dc359784c9f96503674c2faf015f7fe8e96798c"}, - {file = "frozenlist-1.5.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:6321899477db90bdeb9299ac3627a6a53c7399c8cd58d25da094007402b039ab"}, - {file = "frozenlist-1.5.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:76e4753701248476e6286f2ef492af900ea67d9706a0155335a40ea21bf3b2f5"}, - {file = "frozenlist-1.5.0-cp310-cp310-win32.whl", hash = "sha256:977701c081c0241d0955c9586ffdd9ce44f7a7795df39b9151cd9a6fd0ce4cfb"}, - {file = "frozenlist-1.5.0-cp310-cp310-win_amd64.whl", hash = "sha256:189f03b53e64144f90990d29a27ec4f7997d91ed3d01b51fa39d2dbe77540fd4"}, - {file = "frozenlist-1.5.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:fd74520371c3c4175142d02a976aee0b4cb4a7cc912a60586ffd8d5929979b30"}, - {file = "frozenlist-1.5.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:2f3f7a0fbc219fb4455264cae4d9f01ad41ae6ee8524500f381de64ffaa077d5"}, - {file = "frozenlist-1.5.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f47c9c9028f55a04ac254346e92977bf0f166c483c74b4232bee19a6697e4778"}, - {file = "frozenlist-1.5.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0996c66760924da6e88922756d99b47512a71cfd45215f3570bf1e0b694c206a"}, - {file = "frozenlist-1.5.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a2fe128eb4edeabe11896cb6af88fca5346059f6c8d807e3b910069f39157869"}, - {file = "frozenlist-1.5.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1a8ea951bbb6cacd492e3948b8da8c502a3f814f5d20935aae74b5df2b19cf3d"}, - {file = "frozenlist-1.5.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:de537c11e4aa01d37db0d403b57bd6f0546e71a82347a97c6a9f0dcc532b3a45"}, - {file = "frozenlist-1.5.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c2623347b933fcb9095841f1cc5d4ff0b278addd743e0e966cb3d460278840d"}, - {file = "frozenlist-1.5.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:cee6798eaf8b1416ef6909b06f7dc04b60755206bddc599f52232606e18179d3"}, - {file = "frozenlist-1.5.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:f5f9da7f5dbc00a604fe74aa02ae7c98bcede8a3b8b9666f9f86fc13993bc71a"}, - {file = "frozenlist-1.5.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:90646abbc7a5d5c7c19461d2e3eeb76eb0b204919e6ece342feb6032c9325ae9"}, - {file = "frozenlist-1.5.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:bdac3c7d9b705d253b2ce370fde941836a5f8b3c5c2b8fd70940a3ea3af7f4f2"}, - {file = "frozenlist-1.5.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:03d33c2ddbc1816237a67f66336616416e2bbb6beb306e5f890f2eb22b959cdf"}, - {file = "frozenlist-1.5.0-cp311-cp311-win32.whl", hash = "sha256:237f6b23ee0f44066219dae14c70ae38a63f0440ce6750f868ee08775073f942"}, - {file = "frozenlist-1.5.0-cp311-cp311-win_amd64.whl", hash = "sha256:0cc974cc93d32c42e7b0f6cf242a6bd941c57c61b618e78b6c0a96cb72788c1d"}, - {file = "frozenlist-1.5.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:31115ba75889723431aa9a4e77d5f398f5cf976eea3bdf61749731f62d4a4a21"}, - {file = "frozenlist-1.5.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7437601c4d89d070eac8323f121fcf25f88674627505334654fd027b091db09d"}, - {file = "frozenlist-1.5.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7948140d9f8ece1745be806f2bfdf390127cf1a763b925c4a805c603df5e697e"}, - {file = "frozenlist-1.5.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:feeb64bc9bcc6b45c6311c9e9b99406660a9c05ca8a5b30d14a78555088b0b3a"}, - {file = "frozenlist-1.5.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:683173d371daad49cffb8309779e886e59c2f369430ad28fe715f66d08d4ab1a"}, - {file = "frozenlist-1.5.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7d57d8f702221405a9d9b40f9da8ac2e4a1a8b5285aac6100f3393675f0a85ee"}, - {file = "frozenlist-1.5.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:30c72000fbcc35b129cb09956836c7d7abf78ab5416595e4857d1cae8d6251a6"}, - {file = "frozenlist-1.5.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:000a77d6034fbad9b6bb880f7ec073027908f1b40254b5d6f26210d2dab1240e"}, - {file = "frozenlist-1.5.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:5d7f5a50342475962eb18b740f3beecc685a15b52c91f7d975257e13e029eca9"}, - {file = "frozenlist-1.5.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:87f724d055eb4785d9be84e9ebf0f24e392ddfad00b3fe036e43f489fafc9039"}, - {file = "frozenlist-1.5.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:6e9080bb2fb195a046e5177f10d9d82b8a204c0736a97a153c2466127de87784"}, - {file = "frozenlist-1.5.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:9b93d7aaa36c966fa42efcaf716e6b3900438632a626fb09c049f6a2f09fc631"}, - {file = "frozenlist-1.5.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:52ef692a4bc60a6dd57f507429636c2af8b6046db8b31b18dac02cbc8f507f7f"}, - {file = "frozenlist-1.5.0-cp312-cp312-win32.whl", hash = "sha256:29d94c256679247b33a3dc96cce0f93cbc69c23bf75ff715919332fdbb6a32b8"}, - {file = "frozenlist-1.5.0-cp312-cp312-win_amd64.whl", hash = "sha256:8969190d709e7c48ea386db202d708eb94bdb29207a1f269bab1196ce0dcca1f"}, - {file = "frozenlist-1.5.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:7a1a048f9215c90973402e26c01d1cff8a209e1f1b53f72b95c13db61b00f953"}, - {file = "frozenlist-1.5.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:dd47a5181ce5fcb463b5d9e17ecfdb02b678cca31280639255ce9d0e5aa67af0"}, - {file = "frozenlist-1.5.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:1431d60b36d15cda188ea222033eec8e0eab488f39a272461f2e6d9e1a8e63c2"}, - {file = "frozenlist-1.5.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6482a5851f5d72767fbd0e507e80737f9c8646ae7fd303def99bfe813f76cf7f"}, - {file = "frozenlist-1.5.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:44c49271a937625619e862baacbd037a7ef86dd1ee215afc298a417ff3270608"}, - {file = "frozenlist-1.5.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:12f78f98c2f1c2429d42e6a485f433722b0061d5c0b0139efa64f396efb5886b"}, - {file = "frozenlist-1.5.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ce3aa154c452d2467487765e3adc730a8c153af77ad84096bc19ce19a2400840"}, - {file = "frozenlist-1.5.0-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9b7dc0c4338e6b8b091e8faf0db3168a37101943e687f373dce00959583f7439"}, - {file = "frozenlist-1.5.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:45e0896250900b5aa25180f9aec243e84e92ac84bd4a74d9ad4138ef3f5c97de"}, - {file = "frozenlist-1.5.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:561eb1c9579d495fddb6da8959fd2a1fca2c6d060d4113f5844b433fc02f2641"}, - {file = "frozenlist-1.5.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:df6e2f325bfee1f49f81aaac97d2aa757c7646534a06f8f577ce184afe2f0a9e"}, - {file = "frozenlist-1.5.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:140228863501b44b809fb39ec56b5d4071f4d0aa6d216c19cbb08b8c5a7eadb9"}, - {file = "frozenlist-1.5.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:7707a25d6a77f5d27ea7dc7d1fc608aa0a478193823f88511ef5e6b8a48f9d03"}, - {file = "frozenlist-1.5.0-cp313-cp313-win32.whl", hash = "sha256:31a9ac2b38ab9b5a8933b693db4939764ad3f299fcaa931a3e605bc3460e693c"}, - {file = "frozenlist-1.5.0-cp313-cp313-win_amd64.whl", hash = "sha256:11aabdd62b8b9c4b84081a3c246506d1cddd2dd93ff0ad53ede5defec7886b28"}, - {file = "frozenlist-1.5.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:dd94994fc91a6177bfaafd7d9fd951bc8689b0a98168aa26b5f543868548d3ca"}, - {file = "frozenlist-1.5.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:2d0da8bbec082bf6bf18345b180958775363588678f64998c2b7609e34719b10"}, - {file = "frozenlist-1.5.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:73f2e31ea8dd7df61a359b731716018c2be196e5bb3b74ddba107f694fbd7604"}, - {file = "frozenlist-1.5.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:828afae9f17e6de596825cf4228ff28fbdf6065974e5ac1410cecc22f699d2b3"}, - {file = "frozenlist-1.5.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f1577515d35ed5649d52ab4319db757bb881ce3b2b796d7283e6634d99ace307"}, - {file = "frozenlist-1.5.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2150cc6305a2c2ab33299453e2968611dacb970d2283a14955923062c8d00b10"}, - {file = "frozenlist-1.5.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a72b7a6e3cd2725eff67cd64c8f13335ee18fc3c7befc05aed043d24c7b9ccb9"}, - {file = "frozenlist-1.5.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c16d2fa63e0800723139137d667e1056bee1a1cf7965153d2d104b62855e9b99"}, - {file = "frozenlist-1.5.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:17dcc32fc7bda7ce5875435003220a457bcfa34ab7924a49a1c19f55b6ee185c"}, - {file = "frozenlist-1.5.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:97160e245ea33d8609cd2b8fd997c850b56db147a304a262abc2b3be021a9171"}, - {file = "frozenlist-1.5.0-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:f1e6540b7fa044eee0bb5111ada694cf3dc15f2b0347ca125ee9ca984d5e9e6e"}, - {file = "frozenlist-1.5.0-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:91d6c171862df0a6c61479d9724f22efb6109111017c87567cfeb7b5d1449fdf"}, - {file = "frozenlist-1.5.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:c1fac3e2ace2eb1052e9f7c7db480818371134410e1f5c55d65e8f3ac6d1407e"}, - {file = "frozenlist-1.5.0-cp38-cp38-win32.whl", hash = "sha256:b97f7b575ab4a8af9b7bc1d2ef7f29d3afee2226bd03ca3875c16451ad5a7723"}, - {file = "frozenlist-1.5.0-cp38-cp38-win_amd64.whl", hash = "sha256:374ca2dabdccad8e2a76d40b1d037f5bd16824933bf7bcea3e59c891fd4a0923"}, - {file = "frozenlist-1.5.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:9bbcdfaf4af7ce002694a4e10a0159d5a8d20056a12b05b45cea944a4953f972"}, - {file = "frozenlist-1.5.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:1893f948bf6681733aaccf36c5232c231e3b5166d607c5fa77773611df6dc336"}, - {file = "frozenlist-1.5.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:2b5e23253bb709ef57a8e95e6ae48daa9ac5f265637529e4ce6b003a37b2621f"}, - {file = "frozenlist-1.5.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0f253985bb515ecd89629db13cb58d702035ecd8cfbca7d7a7e29a0e6d39af5f"}, - {file = "frozenlist-1.5.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:04a5c6babd5e8fb7d3c871dc8b321166b80e41b637c31a995ed844a6139942b6"}, - {file = "frozenlist-1.5.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a9fe0f1c29ba24ba6ff6abf688cb0b7cf1efab6b6aa6adc55441773c252f7411"}, - {file = "frozenlist-1.5.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:226d72559fa19babe2ccd920273e767c96a49b9d3d38badd7c91a0fdeda8ea08"}, - {file = "frozenlist-1.5.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15b731db116ab3aedec558573c1a5eec78822b32292fe4f2f0345b7f697745c2"}, - {file = "frozenlist-1.5.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:366d8f93e3edfe5a918c874702f78faac300209a4d5bf38352b2c1bdc07a766d"}, - {file = "frozenlist-1.5.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:1b96af8c582b94d381a1c1f51ffaedeb77c821c690ea5f01da3d70a487dd0a9b"}, - {file = "frozenlist-1.5.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:c03eff4a41bd4e38415cbed054bbaff4a075b093e2394b6915dca34a40d1e38b"}, - {file = "frozenlist-1.5.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:50cf5e7ee9b98f22bdecbabf3800ae78ddcc26e4a435515fc72d97903e8488e0"}, - {file = "frozenlist-1.5.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:1e76bfbc72353269c44e0bc2cfe171900fbf7f722ad74c9a7b638052afe6a00c"}, - {file = "frozenlist-1.5.0-cp39-cp39-win32.whl", hash = "sha256:666534d15ba8f0fda3f53969117383d5dc021266b3c1a42c9ec4855e4b58b9d3"}, - {file = "frozenlist-1.5.0-cp39-cp39-win_amd64.whl", hash = "sha256:5c28f4b5dbef8a0d8aad0d4de24d1e9e981728628afaf4ea0792f5d0939372f0"}, - {file = "frozenlist-1.5.0-py3-none-any.whl", hash = "sha256:d994863bba198a4a518b467bb971c56e1db3f180a25c6cf7bb1949c267f748c3"}, - {file = "frozenlist-1.5.0.tar.gz", hash = "sha256:81d5af29e61b9c8348e876d442253723928dce6433e0e76cd925cd83f1b4b817"}, + {file = "frozenlist-1.6.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:e6e558ea1e47fd6fa8ac9ccdad403e5dd5ecc6ed8dda94343056fa4277d5c65e"}, + {file = "frozenlist-1.6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f4b3cd7334a4bbc0c472164f3744562cb72d05002cc6fcf58adb104630bbc352"}, + {file = "frozenlist-1.6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9799257237d0479736e2b4c01ff26b5c7f7694ac9692a426cb717f3dc02fff9b"}, + {file = "frozenlist-1.6.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f3a7bb0fe1f7a70fb5c6f497dc32619db7d2cdd53164af30ade2f34673f8b1fc"}, + {file = "frozenlist-1.6.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:36d2fc099229f1e4237f563b2a3e0ff7ccebc3999f729067ce4e64a97a7f2869"}, + {file = "frozenlist-1.6.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f27a9f9a86dcf00708be82359db8de86b80d029814e6693259befe82bb58a106"}, + {file = "frozenlist-1.6.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:75ecee69073312951244f11b8627e3700ec2bfe07ed24e3a685a5979f0412d24"}, + {file = "frozenlist-1.6.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f2c7d5aa19714b1b01a0f515d078a629e445e667b9da869a3cd0e6fe7dec78bd"}, + {file = "frozenlist-1.6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:69bbd454f0fb23b51cadc9bdba616c9678e4114b6f9fa372d462ff2ed9323ec8"}, + {file = "frozenlist-1.6.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:7daa508e75613809c7a57136dec4871a21bca3080b3a8fc347c50b187df4f00c"}, + {file = "frozenlist-1.6.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:89ffdb799154fd4d7b85c56d5fa9d9ad48946619e0eb95755723fffa11022d75"}, + {file = "frozenlist-1.6.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:920b6bd77d209931e4c263223381d63f76828bec574440f29eb497cf3394c249"}, + {file = "frozenlist-1.6.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:d3ceb265249fb401702fce3792e6b44c1166b9319737d21495d3611028d95769"}, + {file = "frozenlist-1.6.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:52021b528f1571f98a7d4258c58aa8d4b1a96d4f01d00d51f1089f2e0323cb02"}, + {file = "frozenlist-1.6.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:0f2ca7810b809ed0f1917293050163c7654cefc57a49f337d5cd9de717b8fad3"}, + {file = "frozenlist-1.6.0-cp310-cp310-win32.whl", hash = "sha256:0e6f8653acb82e15e5443dba415fb62a8732b68fe09936bb6d388c725b57f812"}, + {file = "frozenlist-1.6.0-cp310-cp310-win_amd64.whl", hash = "sha256:f1a39819a5a3e84304cd286e3dc62a549fe60985415851b3337b6f5cc91907f1"}, + {file = "frozenlist-1.6.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:ae8337990e7a45683548ffb2fee1af2f1ed08169284cd829cdd9a7fa7470530d"}, + {file = "frozenlist-1.6.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:8c952f69dd524558694818a461855f35d36cc7f5c0adddce37e962c85d06eac0"}, + {file = "frozenlist-1.6.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:8f5fef13136c4e2dee91bfb9a44e236fff78fc2cd9f838eddfc470c3d7d90afe"}, + {file = "frozenlist-1.6.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:716bbba09611b4663ecbb7cd022f640759af8259e12a6ca939c0a6acd49eedba"}, + {file = "frozenlist-1.6.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:7b8c4dc422c1a3ffc550b465090e53b0bf4839047f3e436a34172ac67c45d595"}, + {file = "frozenlist-1.6.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b11534872256e1666116f6587a1592ef395a98b54476addb5e8d352925cb5d4a"}, + {file = "frozenlist-1.6.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1c6eceb88aaf7221f75be6ab498dc622a151f5f88d536661af3ffc486245a626"}, + {file = "frozenlist-1.6.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:62c828a5b195570eb4b37369fcbbd58e96c905768d53a44d13044355647838ff"}, + {file = "frozenlist-1.6.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e1c6bd2c6399920c9622362ce95a7d74e7f9af9bfec05fff91b8ce4b9647845a"}, + {file = "frozenlist-1.6.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:49ba23817781e22fcbd45fd9ff2b9b8cdb7b16a42a4851ab8025cae7b22e96d0"}, + {file = "frozenlist-1.6.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:431ef6937ae0f853143e2ca67d6da76c083e8b1fe3df0e96f3802fd37626e606"}, + {file = "frozenlist-1.6.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:9d124b38b3c299ca68433597ee26b7819209cb8a3a9ea761dfe9db3a04bba584"}, + {file = "frozenlist-1.6.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:118e97556306402e2b010da1ef21ea70cb6d6122e580da64c056b96f524fbd6a"}, + {file = "frozenlist-1.6.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:fb3b309f1d4086b5533cf7bbcf3f956f0ae6469664522f1bde4feed26fba60f1"}, + {file = "frozenlist-1.6.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:54dece0d21dce4fdb188a1ffc555926adf1d1c516e493c2914d7c370e454bc9e"}, + {file = "frozenlist-1.6.0-cp311-cp311-win32.whl", hash = "sha256:654e4ba1d0b2154ca2f096bed27461cf6160bc7f504a7f9a9ef447c293caf860"}, + {file = "frozenlist-1.6.0-cp311-cp311-win_amd64.whl", hash = "sha256:3e911391bffdb806001002c1f860787542f45916c3baf764264a52765d5a5603"}, + {file = "frozenlist-1.6.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:c5b9e42ace7d95bf41e19b87cec8f262c41d3510d8ad7514ab3862ea2197bfb1"}, + {file = "frozenlist-1.6.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:ca9973735ce9f770d24d5484dcb42f68f135351c2fc81a7a9369e48cf2998a29"}, + {file = "frozenlist-1.6.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6ac40ec76041c67b928ca8aaffba15c2b2ee3f5ae8d0cb0617b5e63ec119ca25"}, + {file = "frozenlist-1.6.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:95b7a8a3180dfb280eb044fdec562f9b461614c0ef21669aea6f1d3dac6ee576"}, + {file = "frozenlist-1.6.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c444d824e22da6c9291886d80c7d00c444981a72686e2b59d38b285617cb52c8"}, + {file = "frozenlist-1.6.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bb52c8166499a8150bfd38478248572c924c003cbb45fe3bcd348e5ac7c000f9"}, + {file = "frozenlist-1.6.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b35298b2db9c2468106278537ee529719228950a5fdda686582f68f247d1dc6e"}, + {file = "frozenlist-1.6.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d108e2d070034f9d57210f22fefd22ea0d04609fc97c5f7f5a686b3471028590"}, + {file = "frozenlist-1.6.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4e1be9111cb6756868ac242b3c2bd1f09d9aea09846e4f5c23715e7afb647103"}, + {file = "frozenlist-1.6.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:94bb451c664415f02f07eef4ece976a2c65dcbab9c2f1705b7031a3a75349d8c"}, + {file = "frozenlist-1.6.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:d1a686d0b0949182b8faddea596f3fc11f44768d1f74d4cad70213b2e139d821"}, + {file = "frozenlist-1.6.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:ea8e59105d802c5a38bdbe7362822c522230b3faba2aa35c0fa1765239b7dd70"}, + {file = "frozenlist-1.6.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:abc4e880a9b920bc5020bf6a431a6bb40589d9bca3975c980495f63632e8382f"}, + {file = "frozenlist-1.6.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:9a79713adfe28830f27a3c62f6b5406c37376c892b05ae070906f07ae4487046"}, + {file = "frozenlist-1.6.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:9a0318c2068e217a8f5e3b85e35899f5a19e97141a45bb925bb357cfe1daf770"}, + {file = "frozenlist-1.6.0-cp312-cp312-win32.whl", hash = "sha256:853ac025092a24bb3bf09ae87f9127de9fe6e0c345614ac92536577cf956dfcc"}, + {file = "frozenlist-1.6.0-cp312-cp312-win_amd64.whl", hash = "sha256:2bdfe2d7e6c9281c6e55523acd6c2bf77963cb422fdc7d142fb0cb6621b66878"}, + {file = "frozenlist-1.6.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:1d7fb014fe0fbfee3efd6a94fc635aeaa68e5e1720fe9e57357f2e2c6e1a647e"}, + {file = "frozenlist-1.6.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:01bcaa305a0fdad12745502bfd16a1c75b14558dabae226852f9159364573117"}, + {file = "frozenlist-1.6.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:8b314faa3051a6d45da196a2c495e922f987dc848e967d8cfeaee8a0328b1cd4"}, + {file = "frozenlist-1.6.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:da62fecac21a3ee10463d153549d8db87549a5e77eefb8c91ac84bb42bb1e4e3"}, + {file = "frozenlist-1.6.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:d1eb89bf3454e2132e046f9599fbcf0a4483ed43b40f545551a39316d0201cd1"}, + {file = "frozenlist-1.6.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d18689b40cb3936acd971f663ccb8e2589c45db5e2c5f07e0ec6207664029a9c"}, + {file = "frozenlist-1.6.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e67ddb0749ed066b1a03fba812e2dcae791dd50e5da03be50b6a14d0c1a9ee45"}, + {file = "frozenlist-1.6.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fc5e64626e6682638d6e44398c9baf1d6ce6bc236d40b4b57255c9d3f9761f1f"}, + {file = "frozenlist-1.6.0-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:437cfd39564744ae32ad5929e55b18ebd88817f9180e4cc05e7d53b75f79ce85"}, + {file = "frozenlist-1.6.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:62dd7df78e74d924952e2feb7357d826af8d2f307557a779d14ddf94d7311be8"}, + {file = "frozenlist-1.6.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:a66781d7e4cddcbbcfd64de3d41a61d6bdde370fc2e38623f30b2bd539e84a9f"}, + {file = "frozenlist-1.6.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:482fe06e9a3fffbcd41950f9d890034b4a54395c60b5e61fae875d37a699813f"}, + {file = "frozenlist-1.6.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:e4f9373c500dfc02feea39f7a56e4f543e670212102cc2eeb51d3a99c7ffbde6"}, + {file = "frozenlist-1.6.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:e69bb81de06827147b7bfbaeb284d85219fa92d9f097e32cc73675f279d70188"}, + {file = "frozenlist-1.6.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:7613d9977d2ab4a9141dde4a149f4357e4065949674c5649f920fec86ecb393e"}, + {file = "frozenlist-1.6.0-cp313-cp313-win32.whl", hash = "sha256:4def87ef6d90429f777c9d9de3961679abf938cb6b7b63d4a7eb8a268babfce4"}, + {file = "frozenlist-1.6.0-cp313-cp313-win_amd64.whl", hash = "sha256:37a8a52c3dfff01515e9bbbee0e6063181362f9de3db2ccf9bc96189b557cbfd"}, + {file = "frozenlist-1.6.0-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:46138f5a0773d064ff663d273b309b696293d7a7c00a0994c5c13a5078134b64"}, + {file = "frozenlist-1.6.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:f88bc0a2b9c2a835cb888b32246c27cdab5740059fb3688852bf91e915399b91"}, + {file = "frozenlist-1.6.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:777704c1d7655b802c7850255639672e90e81ad6fa42b99ce5ed3fbf45e338dd"}, + {file = "frozenlist-1.6.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:85ef8d41764c7de0dcdaf64f733a27352248493a85a80661f3c678acd27e31f2"}, + {file = "frozenlist-1.6.0-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:da5cb36623f2b846fb25009d9d9215322318ff1c63403075f812b3b2876c8506"}, + {file = "frozenlist-1.6.0-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cbb56587a16cf0fb8acd19e90ff9924979ac1431baea8681712716a8337577b0"}, + {file = "frozenlist-1.6.0-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c6154c3ba59cda3f954c6333025369e42c3acd0c6e8b6ce31eb5c5b8116c07e0"}, + {file = "frozenlist-1.6.0-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2e8246877afa3f1ae5c979fe85f567d220f86a50dc6c493b9b7d8191181ae01e"}, + {file = "frozenlist-1.6.0-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7b0f6cce16306d2e117cf9db71ab3a9e8878a28176aeaf0dbe35248d97b28d0c"}, + {file = "frozenlist-1.6.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:1b8e8cd8032ba266f91136d7105706ad57770f3522eac4a111d77ac126a25a9b"}, + {file = "frozenlist-1.6.0-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:e2ada1d8515d3ea5378c018a5f6d14b4994d4036591a52ceaf1a1549dec8e1ad"}, + {file = "frozenlist-1.6.0-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:cdb2c7f071e4026c19a3e32b93a09e59b12000751fc9b0b7758da899e657d215"}, + {file = "frozenlist-1.6.0-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:03572933a1969a6d6ab509d509e5af82ef80d4a5d4e1e9f2e1cdd22c77a3f4d2"}, + {file = "frozenlist-1.6.0-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:77effc978947548b676c54bbd6a08992759ea6f410d4987d69feea9cd0919911"}, + {file = "frozenlist-1.6.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:a2bda8be77660ad4089caf2223fdbd6db1858462c4b85b67fbfa22102021e497"}, + {file = "frozenlist-1.6.0-cp313-cp313t-win32.whl", hash = "sha256:a4d96dc5bcdbd834ec6b0f91027817214216b5b30316494d2b1aebffb87c534f"}, + {file = "frozenlist-1.6.0-cp313-cp313t-win_amd64.whl", hash = "sha256:e18036cb4caa17ea151fd5f3d70be9d354c99eb8cf817a3ccde8a7873b074348"}, + {file = "frozenlist-1.6.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:536a1236065c29980c15c7229fbb830dedf809708c10e159b8136534233545f0"}, + {file = "frozenlist-1.6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:ed5e3a4462ff25ca84fb09e0fada8ea267df98a450340ead4c91b44857267d70"}, + {file = "frozenlist-1.6.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e19c0fc9f4f030fcae43b4cdec9e8ab83ffe30ec10c79a4a43a04d1af6c5e1ad"}, + {file = "frozenlist-1.6.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c7c608f833897501dac548585312d73a7dca028bf3b8688f0d712b7acfaf7fb3"}, + {file = "frozenlist-1.6.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:0dbae96c225d584f834b8d3cc688825911960f003a85cb0fd20b6e5512468c42"}, + {file = "frozenlist-1.6.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:625170a91dd7261a1d1c2a0c1a353c9e55d21cd67d0852185a5fef86587e6f5f"}, + {file = "frozenlist-1.6.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1db8b2fc7ee8a940b547a14c10e56560ad3ea6499dc6875c354e2335812f739d"}, + {file = "frozenlist-1.6.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4da6fc43048b648275a220e3a61c33b7fff65d11bdd6dcb9d9c145ff708b804c"}, + {file = "frozenlist-1.6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6ef8e7e8f2f3820c5f175d70fdd199b79e417acf6c72c5d0aa8f63c9f721646f"}, + {file = "frozenlist-1.6.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:aa733d123cc78245e9bb15f29b44ed9e5780dc6867cfc4e544717b91f980af3b"}, + {file = "frozenlist-1.6.0-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:ba7f8d97152b61f22d7f59491a781ba9b177dd9f318486c5fbc52cde2db12189"}, + {file = "frozenlist-1.6.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:56a0b8dd6d0d3d971c91f1df75e824986667ccce91e20dca2023683814344791"}, + {file = "frozenlist-1.6.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:5c9e89bf19ca148efcc9e3c44fd4c09d5af85c8a7dd3dbd0da1cb83425ef4983"}, + {file = "frozenlist-1.6.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:1330f0a4376587face7637dfd245380a57fe21ae8f9d360c1c2ef8746c4195fa"}, + {file = "frozenlist-1.6.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:2187248203b59625566cac53572ec8c2647a140ee2738b4e36772930377a533c"}, + {file = "frozenlist-1.6.0-cp39-cp39-win32.whl", hash = "sha256:2b8cf4cfea847d6c12af06091561a89740f1f67f331c3fa8623391905e878530"}, + {file = "frozenlist-1.6.0-cp39-cp39-win_amd64.whl", hash = "sha256:1255d5d64328c5a0d066ecb0f02034d086537925f1f04b50b1ae60d37afbf572"}, + {file = "frozenlist-1.6.0-py3-none-any.whl", hash = "sha256:535eec9987adb04701266b92745d6cdcef2e77669299359c3009c3404dd5d191"}, + {file = "frozenlist-1.6.0.tar.gz", hash = "sha256:b99655c32c1c8e06d111e7f41c06c29a5318cb1835df23a45518e02a47c63b68"}, ] [[package]] name = "google-api-core" -version = "2.24.1" +version = "2.24.2" description = "Google API client core library" optional = false python-versions = ">=3.7" groups = ["main"] files = [ - {file = "google_api_core-2.24.1-py3-none-any.whl", hash = "sha256:bc78d608f5a5bf853b80bd70a795f703294de656c096c0968320830a4bc280f1"}, - {file = "google_api_core-2.24.1.tar.gz", hash = "sha256:f8b36f5456ab0dd99a1b693a40a31d1e7757beea380ad1b38faaf8941eae9d8a"}, + {file = "google_api_core-2.24.2-py3-none-any.whl", hash = "sha256:810a63ac95f3c441b7c0e43d344e372887f62ce9071ba972eacf32672e072de9"}, + {file = "google_api_core-2.24.2.tar.gz", hash = "sha256:81718493daf06d96d6bc76a91c23874dbf2fac0adbbf542831b805ee6e974696"}, ] [package.dependencies] -google-auth = ">=2.14.1,<3.0.dev0" -googleapis-common-protos = ">=1.56.2,<2.0.dev0" -proto-plus = ">=1.22.3,<2.0.0dev" -protobuf = ">=3.19.5,<3.20.0 || >3.20.0,<3.20.1 || >3.20.1,<4.21.0 || >4.21.0,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<6.0.0.dev0" -requests = ">=2.18.0,<3.0.0.dev0" +google-auth = ">=2.14.1,<3.0.0" +googleapis-common-protos = ">=1.56.2,<2.0.0" +proto-plus = ">=1.22.3,<2.0.0" +protobuf = ">=3.19.5,<3.20.0 || >3.20.0,<3.20.1 || >3.20.1,<4.21.0 || >4.21.0,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<7.0.0" +requests = ">=2.18.0,<3.0.0" [package.extras] async-rest = ["google-auth[aiohttp] (>=2.35.0,<3.0.dev0)"] @@ -2091,14 +2109,14 @@ grpcio-gcp = ["grpcio-gcp (>=0.2.2,<1.0.dev0)"] [[package]] name = "google-api-python-client" -version = "2.161.0" +version = "2.163.0" description = "Google API Client Library for Python" optional = false python-versions = ">=3.7" groups = ["main"] files = [ - {file = "google_api_python_client-2.161.0-py2.py3-none-any.whl", hash = "sha256:9476a5a4f200bae368140453df40f9cda36be53fa7d0e9a9aac4cdb859a26448"}, - {file = "google_api_python_client-2.161.0.tar.gz", hash = "sha256:324c0cce73e9ea0a0d2afd5937e01b7c2d6a4d7e2579cdb6c384f9699d6c9f37"}, + {file = "google_api_python_client-2.163.0-py2.py3-none-any.whl", hash = "sha256:080e8bc0669cb4c1fb8efb8da2f5b91a2625d8f0e7796cfad978f33f7016c6c4"}, + {file = "google_api_python_client-2.163.0.tar.gz", hash = "sha256:88dee87553a2d82176e2224648bf89272d536c8f04dcdda37ef0a71473886dd7"}, ] [package.dependencies] @@ -2110,14 +2128,14 @@ uritemplate = ">=3.0.1,<5" [[package]] name = "google-auth" -version = "2.38.0" +version = "2.39.0" description = "Google Authentication Library" optional = false python-versions = ">=3.7" groups = ["main"] files = [ - {file = "google_auth-2.38.0-py2.py3-none-any.whl", hash = "sha256:e7dae6694313f434a2727bf2906f27ad259bae090d7aa896590d86feec3d9d4a"}, - {file = "google_auth-2.38.0.tar.gz", hash = "sha256:8285113607d3b80a3f1543b75962447ba8a09fe85783432a784fdeef6ac094c4"}, + {file = "google_auth-2.39.0-py2.py3-none-any.whl", hash = "sha256:0150b6711e97fb9f52fe599f55648950cc4540015565d8fbb31be2ad6e1548a2"}, + {file = "google_auth-2.39.0.tar.gz", hash = "sha256:73222d43cdc35a3aeacbfdcaf73142a97839f10de930550d89ebfe1d0a00cde7"}, ] [package.dependencies] @@ -2126,12 +2144,14 @@ pyasn1-modules = ">=0.2.1" rsa = ">=3.1.4,<5" [package.extras] -aiohttp = ["aiohttp (>=3.6.2,<4.0.0.dev0)", "requests (>=2.20.0,<3.0.0.dev0)"] +aiohttp = ["aiohttp (>=3.6.2,<4.0.0)", "requests (>=2.20.0,<3.0.0)"] enterprise-cert = ["cryptography", "pyopenssl"] -pyjwt = ["cryptography (>=38.0.3)", "pyjwt (>=2.0)"] -pyopenssl = ["cryptography (>=38.0.3)", "pyopenssl (>=20.0.0)"] +pyjwt = ["cryptography (<39.0.0) ; python_version < \"3.8\"", "cryptography (>=38.0.3)", "pyjwt (>=2.0)"] +pyopenssl = ["cryptography (<39.0.0) ; python_version < \"3.8\"", "cryptography (>=38.0.3)", "pyopenssl (>=20.0.0)"] reauth = ["pyu2f (>=0.1.5)"] -requests = ["requests (>=2.20.0,<3.0.0.dev0)"] +requests = ["requests (>=2.20.0,<3.0.0)"] +testing = ["aiohttp (<3.10.0)", "aiohttp (>=3.6.2,<4.0.0)", "aioresponses", "cryptography (<39.0.0) ; python_version < \"3.8\"", "cryptography (>=38.0.3)", "flask", "freezegun", "grpcio", "mock", "oauth2client", "packaging", "pyjwt (>=2.0)", "pyopenssl (<24.3.0)", "pyopenssl (>=20.0.0)", "pytest", "pytest-asyncio", "pytest-cov", "pytest-localserver", "pyu2f (>=0.1.5)", "requests (>=2.20.0,<3.0.0)", "responses", "urllib3"] +urllib3 = ["packaging", "urllib3"] [[package]] name = "google-auth-httplib2" @@ -2151,32 +2171,32 @@ httplib2 = ">=0.19.0" [[package]] name = "googleapis-common-protos" -version = "1.66.0" +version = "1.70.0" description = "Common protobufs used in Google APIs" optional = false python-versions = ">=3.7" groups = ["main"] files = [ - {file = "googleapis_common_protos-1.66.0-py2.py3-none-any.whl", hash = "sha256:d7abcd75fabb2e0ec9f74466401f6c119a0b498e27370e9be4c94cb7e382b8ed"}, - {file = "googleapis_common_protos-1.66.0.tar.gz", hash = "sha256:c3e7b33d15fdca5374cc0a7346dd92ffa847425cc4ea941d970f13680052ec8c"}, + {file = "googleapis_common_protos-1.70.0-py3-none-any.whl", hash = "sha256:b8bfcca8c25a2bb253e0e0b0adaf8c00773e5e6af6fd92397576680b807e0fd8"}, + {file = "googleapis_common_protos-1.70.0.tar.gz", hash = "sha256:0e1b44e0ea153e6594f9f394fef15193a68aaaea2d843f83e2742717ca753257"}, ] [package.dependencies] -protobuf = ">=3.20.2,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<6.0.0.dev0" +protobuf = ">=3.20.2,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<7.0.0" [package.extras] -grpc = ["grpcio (>=1.44.0,<2.0.0.dev0)"] +grpc = ["grpcio (>=1.44.0,<2.0.0)"] [[package]] name = "gprof2dot" -version = "2024.6.6" +version = "2025.4.14" description = "Generate a dot graph from the output of several profilers." optional = false python-versions = ">=3.8" groups = ["dev"] files = [ - {file = "gprof2dot-2024.6.6-py2.py3-none-any.whl", hash = "sha256:45b14ad7ce64e299c8f526881007b9eb2c6b75505d5613e96e66ee4d5ab33696"}, - {file = "gprof2dot-2024.6.6.tar.gz", hash = "sha256:fa1420c60025a9eb7734f65225b4da02a10fc6dd741b37fa129bc6b41951e5ab"}, + {file = "gprof2dot-2025.4.14-py3-none-any.whl", hash = "sha256:0742e4c0b4409a5e8777e739388a11e1ed3750be86895655312ea7c20bd0090e"}, + {file = "gprof2dot-2025.4.14.tar.gz", hash = "sha256:35743e2d2ca027bf48fa7cba37021aaf4a27beeae1ae8e05a50b55f1f921a6ce"}, ] [[package]] @@ -2217,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]] @@ -2257,19 +2277,19 @@ files = [ [[package]] name = "httpcore" -version = "1.0.7" +version = "1.0.9" description = "A minimal low-level HTTP client." optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "httpcore-1.0.7-py3-none-any.whl", hash = "sha256:a3fff8f43dc260d5bd363d9f9cf1830fa3a458b332856f34282de498ed420edd"}, - {file = "httpcore-1.0.7.tar.gz", hash = "sha256:8551cb62a169ec7162ac7be8d4817d561f60e08eaa485234898414bb5a8a0b4c"}, + {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)"] @@ -2347,14 +2367,14 @@ all = ["flake8 (>=7.1.1)", "mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2 [[package]] name = "importlib-metadata" -version = "8.5.0" +version = "8.6.1" description = "Read metadata from Python packages" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["main"] files = [ - {file = "importlib_metadata-8.5.0-py3-none-any.whl", hash = "sha256:45e54197d28b7a7f1559e60b95e7c567032b602131fbd588f1497f47880aa68b"}, - {file = "importlib_metadata-8.5.0.tar.gz", hash = "sha256:71522656f0abace1d072b9e5481a48f07c138e00f079c38c8f883823f9c26bd7"}, + {file = "importlib_metadata-8.6.1-py3-none-any.whl", hash = "sha256:02a89390c1e15fdfdc0d7c6b25cb3e62650d0494005c97d6f148bf5b9787525e"}, + {file = "importlib_metadata-8.6.1.tar.gz", hash = "sha256:310b41d755445d74569f993ccfc22838295d9fe005425094fad953d7f15c8580"}, ] [package.dependencies] @@ -2366,7 +2386,7 @@ cover = ["pytest-cov"] doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] enabler = ["pytest-enabler (>=2.2)"] perf = ["ipython"] -test = ["flufl.flake8", "importlib-resources (>=1.3) ; python_version < \"3.9\"", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6,!=8.1.*)", "pytest-perf (>=0.9.2)"] +test = ["flufl.flake8", "importlib_resources (>=1.3) ; python_version < \"3.9\"", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6,!=8.1.*)", "pytest-perf (>=0.9.2)"] type = ["pytest-mypy"] [[package]] @@ -2383,14 +2403,14 @@ files = [ [[package]] name = "iniconfig" -version = "2.0.0" +version = "2.1.0" description = "brain-dead simple config-ini parsing" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" groups = ["main", "dev"] files = [ - {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, - {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, + {file = "iniconfig-2.1.0-py3-none-any.whl", hash = "sha256:9deba5723312380e77435581c6bf4935c94cbfab9b1ed33ef8d238ea168eb760"}, + {file = "iniconfig-2.1.0.tar.gz", hash = "sha256:3abbd2e30b36733fee78f9c7f7308f2d0050e88f0087fd25c2645f63c773e1c7"}, ] [[package]] @@ -2501,19 +2521,19 @@ referencing = ">=0.31.0" [[package]] name = "kombu" -version = "5.4.2" +version = "5.5.3" description = "Messaging library for Python." optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "kombu-5.4.2-py3-none-any.whl", hash = "sha256:14212f5ccf022fc0a70453bb025a1dcc32782a588c49ea866884047d66e14763"}, - {file = "kombu-5.4.2.tar.gz", hash = "sha256:eef572dd2fd9fc614b37580e3caeafdd5af46c1eff31e7fba89138cdb406f2cf"}, + {file = "kombu-5.5.3-py3-none-any.whl", hash = "sha256:5b0dbceb4edee50aa464f59469d34b97864be09111338cfb224a10b6a163909b"}, + {file = "kombu-5.5.3.tar.gz", hash = "sha256:021a0e11fcfcd9b0260ef1fb64088c0e92beb976eb59c1dfca7ddd4ad4562ea2"}, ] [package.dependencies] amqp = ">=5.1.1,<6.0.0" -tzdata = {version = "*", markers = "python_version >= \"3.9\""} +tzdata = {version = ">=2025.2", markers = "python_version >= \"3.9\""} vine = "5.1.0" [package.extras] @@ -2521,15 +2541,16 @@ azureservicebus = ["azure-servicebus (>=7.10.0)"] azurestoragequeues = ["azure-identity (>=1.12.0)", "azure-storage-queue (>=12.6.0)"] confluentkafka = ["confluent-kafka (>=2.2.0)"] consul = ["python-consul2 (==0.1.5)"] +gcpubsub = ["google-cloud-monitoring (>=2.16.0)", "google-cloud-pubsub (>=2.18.4)", "grpcio (==1.67.0)", "protobuf (==4.25.5)"] librabbitmq = ["librabbitmq (>=2.0.0) ; python_version < \"3.11\""] mongodb = ["pymongo (>=4.1.1)"] msgpack = ["msgpack (==1.1.0)"] pyro = ["pyro4 (==4.82)"] qpid = ["qpid-python (>=0.26)", "qpid-tools (>=0.26)"] -redis = ["redis (>=4.5.2,!=4.5.5,!=5.0.2)"] -slmq = ["softlayer-messaging (>=1.0.3)"] +redis = ["redis (>=4.5.2,!=4.5.5,!=5.0.2,<=5.2.1)"] +slmq = ["softlayer_messaging (>=1.0.3)"] sqlalchemy = ["sqlalchemy (>=1.4.48,<2.1)"] -sqs = ["boto3 (>=1.26.143)", "pycurl (>=7.43.0.5) ; sys_platform != \"win32\" and platform_python_implementation == \"CPython\"", "urllib3 (>=1.26.16)"] +sqs = ["boto3 (>=1.26.143)", "urllib3 (>=1.26.16)"] yaml = ["PyYAML (>=3.10)"] zookeeper = ["kazoo (>=2.8.0)"] @@ -2817,18 +2838,18 @@ microsoft-kiota-abstractions = ">=1.9.2,<1.10.0" [[package]] name = "msal" -version = "1.31.1" +version = "1.32.0" description = "The Microsoft Authentication Library (MSAL) for Python library enables your app to access the Microsoft Cloud by supporting authentication of users with Microsoft Azure Active Directory accounts (AAD) and Microsoft Accounts (MSA) using industry standard OAuth2 and OpenID Connect." optional = false python-versions = ">=3.7" groups = ["main"] files = [ - {file = "msal-1.31.1-py3-none-any.whl", hash = "sha256:29d9882de247e96db01386496d59f29035e5e841bcac892e6d7bf4390bf6bd17"}, - {file = "msal-1.31.1.tar.gz", hash = "sha256:11b5e6a3f802ffd3a72107203e20c4eac6ef53401961b880af2835b723d80578"}, + {file = "msal-1.32.0-py3-none-any.whl", hash = "sha256:9dbac5384a10bbbf4dae5c7ea0d707d14e087b92c5aa4954b3feaa2d1aa0bcb7"}, + {file = "msal-1.32.0.tar.gz", hash = "sha256:5445fe3af1da6be484991a7ab32eaa82461dc2347de105b76af92c610c3335c2"}, ] [package.dependencies] -cryptography = ">=2.5,<46" +cryptography = ">=2.5,<47" PyJWT = {version = ">=1.0.0,<3", extras = ["crypto"]} requests = ">=2.0.0,<3" @@ -2837,30 +2858,32 @@ broker = ["pymsalruntime (>=0.14,<0.18) ; python_version >= \"3.6\" and platform [[package]] name = "msal-extensions" -version = "1.2.0" +version = "1.3.1" description = "Microsoft Authentication Library extensions (MSAL EX) provides a persistence API that can save your data on disk, encrypted on Windows, macOS and Linux. Concurrent data access will be coordinated by a file lock mechanism." optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" groups = ["main"] files = [ - {file = "msal_extensions-1.2.0-py3-none-any.whl", hash = "sha256:cf5ba83a2113fa6dc011a254a72f1c223c88d7dfad74cc30617c4679a417704d"}, - {file = "msal_extensions-1.2.0.tar.gz", hash = "sha256:6f41b320bfd2933d631a215c91ca0dd3e67d84bd1a2f50ce917d5874ec646bef"}, + {file = "msal_extensions-1.3.1-py3-none-any.whl", hash = "sha256:96d3de4d034504e969ac5e85bae8106c8373b5c6568e4c8fa7af2eca9dbe6bca"}, + {file = "msal_extensions-1.3.1.tar.gz", hash = "sha256:c5b0fd10f65ef62b5f1d62f4251d51cbcaf003fcedae8c91b040a488614be1a4"}, ] [package.dependencies] msal = ">=1.29,<2" -portalocker = ">=1.4,<3" + +[package.extras] +portalocker = ["portalocker (>=1.4,<4)"] [[package]] name = "msgraph-core" -version = "1.3.1" +version = "1.3.3" description = "Core component of the Microsoft Graph Python SDK" optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "msgraph_core-1.3.1-py3-none-any.whl", hash = "sha256:a6e3c19c36d43d00edfb49225647a357f8189351c226c3b7c020c5dfaa24171b"}, - {file = "msgraph_core-1.3.1.tar.gz", hash = "sha256:91c721b4c741d0e9a536e3c43e1cbd2254928b4d207e4f994e9cc7cb7a25bd74"}, + {file = "msgraph_core-1.3.3-py3-none-any.whl", hash = "sha256:9dbbc0c88e174c1d5da1c17d286965d6b26ebaf24996c7af64a39e2069006cf6"}, + {file = "msgraph_core-1.3.3.tar.gz", hash = "sha256:a3226b08b4cf9b6dbb16b868be21d5f82d8ee514ae8e46d9f0cad896159ef8d3"}, ] [package.dependencies] @@ -2874,26 +2897,23 @@ dev = ["bumpver", "isort", "mypy", "pylint", "pytest", "yapf"] [[package]] name = "msgraph-sdk" -version = "1.18.0" +version = "1.23.0" description = "The Microsoft Graph Python SDK" optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "msgraph_sdk-1.18.0-py3-none-any.whl", hash = "sha256:f09b015bb9d7690bc6f30c9a28f9a414107aaf06be4952c27b3653dcdf33f2a3"}, - {file = "msgraph_sdk-1.18.0.tar.gz", hash = "sha256:ef49166ada7b459b5a843ceb3d253c1ab99d8987ebf3112147eb6cbcaa101793"}, + {file = "msgraph_sdk-1.23.0-py3-none-any.whl", hash = "sha256:58e0047b4ca59fd82022c02cd73fec0170a3d84f3b76721e3db2a0314df9a58a"}, + {file = "msgraph_sdk-1.23.0.tar.gz", hash = "sha256:6dd1ba9a46f5f0ce8599fd9610133adbd9d1493941438b5d3632fce9e55ed607"}, ] [package.dependencies] azure-identity = ">=1.12.0" -microsoft-kiota-abstractions = ">=1.3.0,<2.0.0" -microsoft-kiota-authentication-azure = ">=1.0.0,<2.0.0" -microsoft-kiota-http = ">=1.0.0,<2.0.0" -microsoft-kiota-serialization-form = ">=0.1.0" -microsoft-kiota-serialization-json = ">=1.3.0,<2.0.0" -microsoft-kiota-serialization-multipart = ">=0.1.0" -microsoft-kiota-serialization-text = ">=1.0.0,<2.0.0" -msgraph_core = ">=1.0.0" +microsoft-kiota-serialization-form = ">=1.8.0,<2.0.0" +microsoft-kiota-serialization-json = ">=1.8.0,<2.0.0" +microsoft-kiota-serialization-multipart = ">=1.8.0,<2.0.0" +microsoft-kiota-serialization-text = ">=1.8.0,<2.0.0" +msgraph_core = ">=1.3.1" [package.extras] dev = ["bumpver", "isort", "mypy", "pylint", "pytest", "yapf"] @@ -2922,104 +2942,116 @@ async = ["aiodns ; python_version >= \"3.5\"", "aiohttp (>=3.0) ; python_version [[package]] name = "multidict" -version = "6.1.0" +version = "6.4.3" description = "multidict implementation" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["main"] files = [ - {file = "multidict-6.1.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:3380252550e372e8511d49481bd836264c009adb826b23fefcc5dd3c69692f60"}, - {file = "multidict-6.1.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:99f826cbf970077383d7de805c0681799491cb939c25450b9b5b3ced03ca99f1"}, - {file = "multidict-6.1.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a114d03b938376557927ab23f1e950827c3b893ccb94b62fd95d430fd0e5cf53"}, - {file = "multidict-6.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b1c416351ee6271b2f49b56ad7f308072f6f44b37118d69c2cad94f3fa8a40d5"}, - {file = "multidict-6.1.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6b5d83030255983181005e6cfbac1617ce9746b219bc2aad52201ad121226581"}, - {file = "multidict-6.1.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3e97b5e938051226dc025ec80980c285b053ffb1e25a3db2a3aa3bc046bf7f56"}, - {file = "multidict-6.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d618649d4e70ac6efcbba75be98b26ef5078faad23592f9b51ca492953012429"}, - {file = "multidict-6.1.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:10524ebd769727ac77ef2278390fb0068d83f3acb7773792a5080f2b0abf7748"}, - {file = "multidict-6.1.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:ff3827aef427c89a25cc96ded1759271a93603aba9fb977a6d264648ebf989db"}, - {file = "multidict-6.1.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:06809f4f0f7ab7ea2cabf9caca7d79c22c0758b58a71f9d32943ae13c7ace056"}, - {file = "multidict-6.1.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:f179dee3b863ab1c59580ff60f9d99f632f34ccb38bf67a33ec6b3ecadd0fd76"}, - {file = "multidict-6.1.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:aaed8b0562be4a0876ee3b6946f6869b7bcdb571a5d1496683505944e268b160"}, - {file = "multidict-6.1.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:3c8b88a2ccf5493b6c8da9076fb151ba106960a2df90c2633f342f120751a9e7"}, - {file = "multidict-6.1.0-cp310-cp310-win32.whl", hash = "sha256:4a9cb68166a34117d6646c0023c7b759bf197bee5ad4272f420a0141d7eb03a0"}, - {file = "multidict-6.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:20b9b5fbe0b88d0bdef2012ef7dee867f874b72528cf1d08f1d59b0e3850129d"}, - {file = "multidict-6.1.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:3efe2c2cb5763f2f1b275ad2bf7a287d3f7ebbef35648a9726e3b69284a4f3d6"}, - {file = "multidict-6.1.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c7053d3b0353a8b9de430a4f4b4268ac9a4fb3481af37dfe49825bf45ca24156"}, - {file = "multidict-6.1.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:27e5fc84ccef8dfaabb09d82b7d179c7cf1a3fbc8a966f8274fcb4ab2eb4cadb"}, - {file = "multidict-6.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0e2b90b43e696f25c62656389d32236e049568b39320e2735d51f08fd362761b"}, - {file = "multidict-6.1.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d83a047959d38a7ff552ff94be767b7fd79b831ad1cd9920662db05fec24fe72"}, - {file = "multidict-6.1.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d1a9dd711d0877a1ece3d2e4fea11a8e75741ca21954c919406b44e7cf971304"}, - {file = "multidict-6.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ec2abea24d98246b94913b76a125e855eb5c434f7c46546046372fe60f666351"}, - {file = "multidict-6.1.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4867cafcbc6585e4b678876c489b9273b13e9fff9f6d6d66add5e15d11d926cb"}, - {file = "multidict-6.1.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:5b48204e8d955c47c55b72779802b219a39acc3ee3d0116d5080c388970b76e3"}, - {file = "multidict-6.1.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:d8fff389528cad1618fb4b26b95550327495462cd745d879a8c7c2115248e399"}, - {file = "multidict-6.1.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:a7a9541cd308eed5e30318430a9c74d2132e9a8cb46b901326272d780bf2d423"}, - {file = "multidict-6.1.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:da1758c76f50c39a2efd5e9859ce7d776317eb1dd34317c8152ac9251fc574a3"}, - {file = "multidict-6.1.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:c943a53e9186688b45b323602298ab727d8865d8c9ee0b17f8d62d14b56f0753"}, - {file = "multidict-6.1.0-cp311-cp311-win32.whl", hash = "sha256:90f8717cb649eea3504091e640a1b8568faad18bd4b9fcd692853a04475a4b80"}, - {file = "multidict-6.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:82176036e65644a6cc5bd619f65f6f19781e8ec2e5330f51aa9ada7504cc1926"}, - {file = "multidict-6.1.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:b04772ed465fa3cc947db808fa306d79b43e896beb677a56fb2347ca1a49c1fa"}, - {file = "multidict-6.1.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:6180c0ae073bddeb5a97a38c03f30c233e0a4d39cd86166251617d1bbd0af436"}, - {file = "multidict-6.1.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:071120490b47aa997cca00666923a83f02c7fbb44f71cf7f136df753f7fa8761"}, - {file = "multidict-6.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50b3a2710631848991d0bf7de077502e8994c804bb805aeb2925a981de58ec2e"}, - {file = "multidict-6.1.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b58c621844d55e71c1b7f7c498ce5aa6985d743a1a59034c57a905b3f153c1ef"}, - {file = "multidict-6.1.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:55b6d90641869892caa9ca42ff913f7ff1c5ece06474fbd32fb2cf6834726c95"}, - {file = "multidict-6.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4b820514bfc0b98a30e3d85462084779900347e4d49267f747ff54060cc33925"}, - {file = "multidict-6.1.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:10a9b09aba0c5b48c53761b7c720aaaf7cf236d5fe394cd399c7ba662d5f9966"}, - {file = "multidict-6.1.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:1e16bf3e5fc9f44632affb159d30a437bfe286ce9e02754759be5536b169b305"}, - {file = "multidict-6.1.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:76f364861c3bfc98cbbcbd402d83454ed9e01a5224bb3a28bf70002a230f73e2"}, - {file = "multidict-6.1.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:820c661588bd01a0aa62a1283f20d2be4281b086f80dad9e955e690c75fb54a2"}, - {file = "multidict-6.1.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:0e5f362e895bc5b9e67fe6e4ded2492d8124bdf817827f33c5b46c2fe3ffaca6"}, - {file = "multidict-6.1.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:3ec660d19bbc671e3a6443325f07263be452c453ac9e512f5eb935e7d4ac28b3"}, - {file = "multidict-6.1.0-cp312-cp312-win32.whl", hash = "sha256:58130ecf8f7b8112cdb841486404f1282b9c86ccb30d3519faf301b2e5659133"}, - {file = "multidict-6.1.0-cp312-cp312-win_amd64.whl", hash = "sha256:188215fc0aafb8e03341995e7c4797860181562380f81ed0a87ff455b70bf1f1"}, - {file = "multidict-6.1.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:d569388c381b24671589335a3be6e1d45546c2988c2ebe30fdcada8457a31008"}, - {file = "multidict-6.1.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:052e10d2d37810b99cc170b785945421141bf7bb7d2f8799d431e7db229c385f"}, - {file = "multidict-6.1.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f90c822a402cb865e396a504f9fc8173ef34212a342d92e362ca498cad308e28"}, - {file = "multidict-6.1.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b225d95519a5bf73860323e633a664b0d85ad3d5bede6d30d95b35d4dfe8805b"}, - {file = "multidict-6.1.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:23bfd518810af7de1116313ebd9092cb9aa629beb12f6ed631ad53356ed6b86c"}, - {file = "multidict-6.1.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5c09fcfdccdd0b57867577b719c69e347a436b86cd83747f179dbf0cc0d4c1f3"}, - {file = "multidict-6.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bf6bea52ec97e95560af5ae576bdac3aa3aae0b6758c6efa115236d9e07dae44"}, - {file = "multidict-6.1.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:57feec87371dbb3520da6192213c7d6fc892d5589a93db548331954de8248fd2"}, - {file = "multidict-6.1.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:0c3f390dc53279cbc8ba976e5f8035eab997829066756d811616b652b00a23a3"}, - {file = "multidict-6.1.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:59bfeae4b25ec05b34f1956eaa1cb38032282cd4dfabc5056d0a1ec4d696d3aa"}, - {file = "multidict-6.1.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:b2f59caeaf7632cc633b5cf6fc449372b83bbdf0da4ae04d5be36118e46cc0aa"}, - {file = "multidict-6.1.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:37bb93b2178e02b7b618893990941900fd25b6b9ac0fa49931a40aecdf083fe4"}, - {file = "multidict-6.1.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4e9f48f58c2c523d5a06faea47866cd35b32655c46b443f163d08c6d0ddb17d6"}, - {file = "multidict-6.1.0-cp313-cp313-win32.whl", hash = "sha256:3a37ffb35399029b45c6cc33640a92bef403c9fd388acce75cdc88f58bd19a81"}, - {file = "multidict-6.1.0-cp313-cp313-win_amd64.whl", hash = "sha256:e9aa71e15d9d9beaad2c6b9319edcdc0a49a43ef5c0a4c8265ca9ee7d6c67774"}, - {file = "multidict-6.1.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:db7457bac39421addd0c8449933ac32d8042aae84a14911a757ae6ca3eef1392"}, - {file = "multidict-6.1.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d094ddec350a2fb899fec68d8353c78233debde9b7d8b4beeafa70825f1c281a"}, - {file = "multidict-6.1.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:5845c1fd4866bb5dd3125d89b90e57ed3138241540897de748cdf19de8a2fca2"}, - {file = "multidict-6.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9079dfc6a70abe341f521f78405b8949f96db48da98aeb43f9907f342f627cdc"}, - {file = "multidict-6.1.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3914f5aaa0f36d5d60e8ece6a308ee1c9784cd75ec8151062614657a114c4478"}, - {file = "multidict-6.1.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c08be4f460903e5a9d0f76818db3250f12e9c344e79314d1d570fc69d7f4eae4"}, - {file = "multidict-6.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d093be959277cb7dee84b801eb1af388b6ad3ca6a6b6bf1ed7585895789d027d"}, - {file = "multidict-6.1.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3702ea6872c5a2a4eeefa6ffd36b042e9773f05b1f37ae3ef7264b1163c2dcf6"}, - {file = "multidict-6.1.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:2090f6a85cafc5b2db085124d752757c9d251548cedabe9bd31afe6363e0aff2"}, - {file = "multidict-6.1.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:f67f217af4b1ff66c68a87318012de788dd95fcfeb24cc889011f4e1c7454dfd"}, - {file = "multidict-6.1.0-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:189f652a87e876098bbc67b4da1049afb5f5dfbaa310dd67c594b01c10388db6"}, - {file = "multidict-6.1.0-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:6bb5992037f7a9eff7991ebe4273ea7f51f1c1c511e6a2ce511d0e7bdb754492"}, - {file = "multidict-6.1.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:ac10f4c2b9e770c4e393876e35a7046879d195cd123b4f116d299d442b335bcd"}, - {file = "multidict-6.1.0-cp38-cp38-win32.whl", hash = "sha256:e27bbb6d14416713a8bd7aaa1313c0fc8d44ee48d74497a0ff4c3a1b6ccb5167"}, - {file = "multidict-6.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:22f3105d4fb15c8f57ff3959a58fcab6ce36814486500cd7485651230ad4d4ef"}, - {file = "multidict-6.1.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:4e18b656c5e844539d506a0a06432274d7bd52a7487e6828c63a63d69185626c"}, - {file = "multidict-6.1.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a185f876e69897a6f3325c3f19f26a297fa058c5e456bfcff8015e9a27e83ae1"}, - {file = "multidict-6.1.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ab7c4ceb38d91570a650dba194e1ca87c2b543488fe9309b4212694174fd539c"}, - {file = "multidict-6.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e617fb6b0b6953fffd762669610c1c4ffd05632c138d61ac7e14ad187870669c"}, - {file = "multidict-6.1.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:16e5f4bf4e603eb1fdd5d8180f1a25f30056f22e55ce51fb3d6ad4ab29f7d96f"}, - {file = "multidict-6.1.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f4c035da3f544b1882bac24115f3e2e8760f10a0107614fc9839fd232200b875"}, - {file = "multidict-6.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:957cf8e4b6e123a9eea554fa7ebc85674674b713551de587eb318a2df3e00255"}, - {file = "multidict-6.1.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:483a6aea59cb89904e1ceabd2b47368b5600fb7de78a6e4a2c2987b2d256cf30"}, - {file = "multidict-6.1.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:87701f25a2352e5bf7454caa64757642734da9f6b11384c1f9d1a8e699758057"}, - {file = "multidict-6.1.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:682b987361e5fd7a139ed565e30d81fd81e9629acc7d925a205366877d8c8657"}, - {file = "multidict-6.1.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:ce2186a7df133a9c895dea3331ddc5ddad42cdd0d1ea2f0a51e5d161e4762f28"}, - {file = "multidict-6.1.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:9f636b730f7e8cb19feb87094949ba54ee5357440b9658b2a32a5ce4bce53972"}, - {file = "multidict-6.1.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:73eae06aa53af2ea5270cc066dcaf02cc60d2994bbb2c4ef5764949257d10f43"}, - {file = "multidict-6.1.0-cp39-cp39-win32.whl", hash = "sha256:1ca0083e80e791cffc6efce7660ad24af66c8d4079d2a750b29001b53ff59ada"}, - {file = "multidict-6.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:aa466da5b15ccea564bdab9c89175c762bc12825f4659c11227f515cee76fa4a"}, - {file = "multidict-6.1.0-py3-none-any.whl", hash = "sha256:48e171e52d1c4d33888e529b999e5900356b9ae588c2f09a52dcefb158b27506"}, - {file = "multidict-6.1.0.tar.gz", hash = "sha256:22ae2ebf9b0c69d206c003e2f6a914ea33f0a932d4aa16f236afc049d9958f4a"}, + {file = "multidict-6.4.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:32a998bd8a64ca48616eac5a8c1cc4fa38fb244a3facf2eeb14abe186e0f6cc5"}, + {file = "multidict-6.4.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:a54ec568f1fc7f3c313c2f3b16e5db346bf3660e1309746e7fccbbfded856188"}, + {file = "multidict-6.4.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a7be07e5df178430621c716a63151165684d3e9958f2bbfcb644246162007ab7"}, + {file = "multidict-6.4.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b128dbf1c939674a50dd0b28f12c244d90e5015e751a4f339a96c54f7275e291"}, + {file = "multidict-6.4.3-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:b9cb19dfd83d35b6ff24a4022376ea6e45a2beba8ef3f0836b8a4b288b6ad685"}, + {file = "multidict-6.4.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3cf62f8e447ea2c1395afa289b332e49e13d07435369b6f4e41f887db65b40bf"}, + {file = "multidict-6.4.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:909f7d43ff8f13d1adccb6a397094adc369d4da794407f8dd592c51cf0eae4b1"}, + {file = "multidict-6.4.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0bb8f8302fbc7122033df959e25777b0b7659b1fd6bcb9cb6bed76b5de67afef"}, + {file = "multidict-6.4.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:224b79471b4f21169ea25ebc37ed6f058040c578e50ade532e2066562597b8a9"}, + {file = "multidict-6.4.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:a7bd27f7ab3204f16967a6f899b3e8e9eb3362c0ab91f2ee659e0345445e0078"}, + {file = "multidict-6.4.3-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:99592bd3162e9c664671fd14e578a33bfdba487ea64bcb41d281286d3c870ad7"}, + {file = "multidict-6.4.3-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:a62d78a1c9072949018cdb05d3c533924ef8ac9bcb06cbf96f6d14772c5cd451"}, + {file = "multidict-6.4.3-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:3ccdde001578347e877ca4f629450973c510e88e8865d5aefbcb89b852ccc666"}, + {file = "multidict-6.4.3-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:eccb67b0e78aa2e38a04c5ecc13bab325a43e5159a181a9d1a6723db913cbb3c"}, + {file = "multidict-6.4.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:8b6fcf6054fc4114a27aa865f8840ef3d675f9316e81868e0ad5866184a6cba5"}, + {file = "multidict-6.4.3-cp310-cp310-win32.whl", hash = "sha256:f92c7f62d59373cd93bc9969d2da9b4b21f78283b1379ba012f7ee8127b3152e"}, + {file = "multidict-6.4.3-cp310-cp310-win_amd64.whl", hash = "sha256:b57e28dbc031d13916b946719f213c494a517b442d7b48b29443e79610acd887"}, + {file = "multidict-6.4.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:f6f19170197cc29baccd33ccc5b5d6a331058796485857cf34f7635aa25fb0cd"}, + {file = "multidict-6.4.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f2882bf27037eb687e49591690e5d491e677272964f9ec7bc2abbe09108bdfb8"}, + {file = "multidict-6.4.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:fbf226ac85f7d6b6b9ba77db4ec0704fde88463dc17717aec78ec3c8546c70ad"}, + {file = "multidict-6.4.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2e329114f82ad4b9dd291bef614ea8971ec119ecd0f54795109976de75c9a852"}, + {file = "multidict-6.4.3-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:1f4e0334d7a555c63f5c8952c57ab6f1c7b4f8c7f3442df689fc9f03df315c08"}, + {file = "multidict-6.4.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:740915eb776617b57142ce0bb13b7596933496e2f798d3d15a20614adf30d229"}, + {file = "multidict-6.4.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:255dac25134d2b141c944b59a0d2f7211ca12a6d4779f7586a98b4b03ea80508"}, + {file = "multidict-6.4.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d4e8535bd4d741039b5aad4285ecd9b902ef9e224711f0b6afda6e38d7ac02c7"}, + {file = "multidict-6.4.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:30c433a33be000dd968f5750722eaa0991037be0be4a9d453eba121774985bc8"}, + {file = "multidict-6.4.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:4eb33b0bdc50acd538f45041f5f19945a1f32b909b76d7b117c0c25d8063df56"}, + {file = "multidict-6.4.3-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:75482f43465edefd8a5d72724887ccdcd0c83778ded8f0cb1e0594bf71736cc0"}, + {file = "multidict-6.4.3-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:ce5b3082e86aee80b3925ab4928198450d8e5b6466e11501fe03ad2191c6d777"}, + {file = "multidict-6.4.3-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:e413152e3212c4d39f82cf83c6f91be44bec9ddea950ce17af87fbf4e32ca6b2"}, + {file = "multidict-6.4.3-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:8aac2eeff69b71f229a405c0a4b61b54bade8e10163bc7b44fcd257949620618"}, + {file = "multidict-6.4.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ab583ac203af1d09034be41458feeab7863c0635c650a16f15771e1386abf2d7"}, + {file = "multidict-6.4.3-cp311-cp311-win32.whl", hash = "sha256:1b2019317726f41e81154df636a897de1bfe9228c3724a433894e44cd2512378"}, + {file = "multidict-6.4.3-cp311-cp311-win_amd64.whl", hash = "sha256:43173924fa93c7486402217fab99b60baf78d33806af299c56133a3755f69589"}, + {file = "multidict-6.4.3-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:1f1c2f58f08b36f8475f3ec6f5aeb95270921d418bf18f90dffd6be5c7b0e676"}, + {file = "multidict-6.4.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:26ae9ad364fc61b936fb7bf4c9d8bd53f3a5b4417142cd0be5c509d6f767e2f1"}, + {file = "multidict-6.4.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:659318c6c8a85f6ecfc06b4e57529e5a78dfdd697260cc81f683492ad7e9435a"}, + {file = "multidict-6.4.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e1eb72c741fd24d5a28242ce72bb61bc91f8451877131fa3fe930edb195f7054"}, + {file = "multidict-6.4.3-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3cd06d88cb7398252284ee75c8db8e680aa0d321451132d0dba12bc995f0adcc"}, + {file = "multidict-6.4.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4543d8dc6470a82fde92b035a92529317191ce993533c3c0c68f56811164ed07"}, + {file = "multidict-6.4.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:30a3ebdc068c27e9d6081fca0e2c33fdf132ecea703a72ea216b81a66860adde"}, + {file = "multidict-6.4.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b038f10e23f277153f86f95c777ba1958bcd5993194fda26a1d06fae98b2f00c"}, + {file = "multidict-6.4.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c605a2b2dc14282b580454b9b5d14ebe0668381a3a26d0ac39daa0ca115eb2ae"}, + {file = "multidict-6.4.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8bd2b875f4ca2bb527fe23e318ddd509b7df163407b0fb717df229041c6df5d3"}, + {file = "multidict-6.4.3-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:c2e98c840c9c8e65c0e04b40c6c5066c8632678cd50c8721fdbcd2e09f21a507"}, + {file = "multidict-6.4.3-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:66eb80dd0ab36dbd559635e62fba3083a48a252633164857a1d1684f14326427"}, + {file = "multidict-6.4.3-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c23831bdee0a2a3cf21be057b5e5326292f60472fb6c6f86392bbf0de70ba731"}, + {file = "multidict-6.4.3-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:1535cec6443bfd80d028052e9d17ba6ff8a5a3534c51d285ba56c18af97e9713"}, + {file = "multidict-6.4.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:3b73e7227681f85d19dec46e5b881827cd354aabe46049e1a61d2f9aaa4e285a"}, + {file = "multidict-6.4.3-cp312-cp312-win32.whl", hash = "sha256:8eac0c49df91b88bf91f818e0a24c1c46f3622978e2c27035bfdca98e0e18124"}, + {file = "multidict-6.4.3-cp312-cp312-win_amd64.whl", hash = "sha256:11990b5c757d956cd1db7cb140be50a63216af32cd6506329c2c59d732d802db"}, + {file = "multidict-6.4.3-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:7a76534263d03ae0cfa721fea40fd2b5b9d17a6f85e98025931d41dc49504474"}, + {file = "multidict-6.4.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:805031c2f599eee62ac579843555ed1ce389ae00c7e9f74c2a1b45e0564a88dd"}, + {file = "multidict-6.4.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:c56c179839d5dcf51d565132185409d1d5dd8e614ba501eb79023a6cab25576b"}, + {file = "multidict-6.4.3-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9c64f4ddb3886dd8ab71b68a7431ad4aa01a8fa5be5b11543b29674f29ca0ba3"}, + {file = "multidict-6.4.3-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3002a856367c0b41cad6784f5b8d3ab008eda194ed7864aaa58f65312e2abcac"}, + {file = "multidict-6.4.3-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3d75e621e7d887d539d6e1d789f0c64271c250276c333480a9e1de089611f790"}, + {file = "multidict-6.4.3-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:995015cf4a3c0d72cbf453b10a999b92c5629eaf3a0c3e1efb4b5c1f602253bb"}, + {file = "multidict-6.4.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a2b0fabae7939d09d7d16a711468c385272fa1b9b7fb0d37e51143585d8e72e0"}, + {file = "multidict-6.4.3-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:61ed4d82f8a1e67eb9eb04f8587970d78fe7cddb4e4d6230b77eda23d27938f9"}, + {file = "multidict-6.4.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:062428944a8dc69df9fdc5d5fc6279421e5f9c75a9ee3f586f274ba7b05ab3c8"}, + {file = "multidict-6.4.3-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:b90e27b4674e6c405ad6c64e515a505c6d113b832df52fdacb6b1ffd1fa9a1d1"}, + {file = "multidict-6.4.3-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:7d50d4abf6729921e9613d98344b74241572b751c6b37feed75fb0c37bd5a817"}, + {file = "multidict-6.4.3-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:43fe10524fb0a0514be3954be53258e61d87341008ce4914f8e8b92bee6f875d"}, + {file = "multidict-6.4.3-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:236966ca6c472ea4e2d3f02f6673ebfd36ba3f23159c323f5a496869bc8e47c9"}, + {file = "multidict-6.4.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:422a5ec315018e606473ba1f5431e064cf8b2a7468019233dcf8082fabad64c8"}, + {file = "multidict-6.4.3-cp313-cp313-win32.whl", hash = "sha256:f901a5aace8e8c25d78960dcc24c870c8d356660d3b49b93a78bf38eb682aac3"}, + {file = "multidict-6.4.3-cp313-cp313-win_amd64.whl", hash = "sha256:1c152c49e42277bc9a2f7b78bd5fa10b13e88d1b0328221e7aef89d5c60a99a5"}, + {file = "multidict-6.4.3-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:be8751869e28b9c0d368d94f5afcb4234db66fe8496144547b4b6d6a0645cfc6"}, + {file = "multidict-6.4.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:0d4b31f8a68dccbcd2c0ea04f0e014f1defc6b78f0eb8b35f2265e8716a6df0c"}, + {file = "multidict-6.4.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:032efeab3049e37eef2ff91271884303becc9e54d740b492a93b7e7266e23756"}, + {file = "multidict-6.4.3-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9e78006af1a7c8a8007e4f56629d7252668344442f66982368ac06522445e375"}, + {file = "multidict-6.4.3-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:daeac9dd30cda8703c417e4fddccd7c4dc0c73421a0b54a7da2713be125846be"}, + {file = "multidict-6.4.3-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1f6f90700881438953eae443a9c6f8a509808bc3b185246992c4233ccee37fea"}, + {file = "multidict-6.4.3-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f84627997008390dd15762128dcf73c3365f4ec0106739cde6c20a07ed198ec8"}, + {file = "multidict-6.4.3-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3307b48cd156153b117c0ea54890a3bdbf858a5b296ddd40dc3852e5f16e9b02"}, + {file = "multidict-6.4.3-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ead46b0fa1dcf5af503a46e9f1c2e80b5d95c6011526352fa5f42ea201526124"}, + {file = "multidict-6.4.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:1748cb2743bedc339d63eb1bca314061568793acd603a6e37b09a326334c9f44"}, + {file = "multidict-6.4.3-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:acc9fa606f76fc111b4569348cc23a771cb52c61516dcc6bcef46d612edb483b"}, + {file = "multidict-6.4.3-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:31469d5832b5885adeb70982e531ce86f8c992334edd2f2254a10fa3182ac504"}, + {file = "multidict-6.4.3-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:ba46b51b6e51b4ef7bfb84b82f5db0dc5e300fb222a8a13b8cd4111898a869cf"}, + {file = "multidict-6.4.3-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:389cfefb599edf3fcfd5f64c0410da686f90f5f5e2c4d84e14f6797a5a337af4"}, + {file = "multidict-6.4.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:64bc2bbc5fba7b9db5c2c8d750824f41c6994e3882e6d73c903c2afa78d091e4"}, + {file = "multidict-6.4.3-cp313-cp313t-win32.whl", hash = "sha256:0ecdc12ea44bab2807d6b4a7e5eef25109ab1c82a8240d86d3c1fc9f3b72efd5"}, + {file = "multidict-6.4.3-cp313-cp313t-win_amd64.whl", hash = "sha256:7146a8742ea71b5d7d955bffcef58a9e6e04efba704b52a460134fefd10a8208"}, + {file = "multidict-6.4.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:5427a2679e95a642b7f8b0f761e660c845c8e6fe3141cddd6b62005bd133fc21"}, + {file = "multidict-6.4.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:24a8caa26521b9ad09732972927d7b45b66453e6ebd91a3c6a46d811eeb7349b"}, + {file = "multidict-6.4.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:6b5a272bc7c36a2cd1b56ddc6bff02e9ce499f9f14ee4a45c45434ef083f2459"}, + {file = "multidict-6.4.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:edf74dc5e212b8c75165b435c43eb0d5e81b6b300a938a4eb82827119115e840"}, + {file = "multidict-6.4.3-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:9f35de41aec4b323c71f54b0ca461ebf694fb48bec62f65221f52e0017955b39"}, + {file = "multidict-6.4.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ae93e0ff43b6f6892999af64097b18561691ffd835e21a8348a441e256592e1f"}, + {file = "multidict-6.4.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5e3929269e9d7eff905d6971d8b8c85e7dbc72c18fb99c8eae6fe0a152f2e343"}, + {file = "multidict-6.4.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fb6214fe1750adc2a1b801a199d64b5a67671bf76ebf24c730b157846d0e90d2"}, + {file = "multidict-6.4.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6d79cf5c0c6284e90f72123f4a3e4add52d6c6ebb4a9054e88df15b8d08444c6"}, + {file = "multidict-6.4.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:2427370f4a255262928cd14533a70d9738dfacadb7563bc3b7f704cc2360fc4e"}, + {file = "multidict-6.4.3-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:fbd8d737867912b6c5f99f56782b8cb81f978a97b4437a1c476de90a3e41c9a1"}, + {file = "multidict-6.4.3-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:0ee1bf613c448997f73fc4efb4ecebebb1c02268028dd4f11f011f02300cf1e8"}, + {file = "multidict-6.4.3-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:578568c4ba5f2b8abd956baf8b23790dbfdc953e87d5b110bce343b4a54fc9e7"}, + {file = "multidict-6.4.3-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:a059ad6b80de5b84b9fa02a39400319e62edd39d210b4e4f8c4f1243bdac4752"}, + {file = "multidict-6.4.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:dd53893675b729a965088aaadd6a1f326a72b83742b056c1065bdd2e2a42b4df"}, + {file = "multidict-6.4.3-cp39-cp39-win32.whl", hash = "sha256:abcfed2c4c139f25c2355e180bcc077a7cae91eefbb8b3927bb3f836c9586f1f"}, + {file = "multidict-6.4.3-cp39-cp39-win_amd64.whl", hash = "sha256:b1b389ae17296dd739015d5ddb222ee99fd66adeae910de21ac950e00979d897"}, + {file = "multidict-6.4.3-py3-none-any.whl", hash = "sha256:59fe01ee8e2a1e8ceb3f6dbb216b09c8d9f4ef1c22c4fc825d045a147fa2ebc9"}, + {file = "multidict-6.4.3.tar.gz", hash = "sha256:3ada0b058c9f213c5f95ba301f922d402ac234f1111a7d8fd70f1b99f3c281ec"}, ] [[package]] @@ -3071,42 +3103,39 @@ reports = ["lxml"] [[package]] name = "mypy-extensions" -version = "1.0.0" +version = "1.1.0" description = "Type system extensions for programs checked with the mypy type checker." optional = false -python-versions = ">=3.5" +python-versions = ">=3.8" groups = ["dev"] files = [ - {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"}, - {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, + {file = "mypy_extensions-1.1.0-py3-none-any.whl", hash = "sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505"}, + {file = "mypy_extensions-1.1.0.tar.gz", hash = "sha256:52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558"}, ] [[package]] name = "narwhals" -version = "1.25.2" +version = "1.35.0" description = "Extremely lightweight compatibility layer between dataframe libraries" optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "narwhals-1.25.2-py3-none-any.whl", hash = "sha256:e645f7fc1f8c0a3563a6cdcd0191586cdf88470ad90f0818abba7ceb6c181b00"}, - {file = "narwhals-1.25.2.tar.gz", hash = "sha256:37594746fc06fe4a588967a34a2974b1f3a7ad6ff1571b6e31ac5e58c9591000"}, + {file = "narwhals-1.35.0-py3-none-any.whl", hash = "sha256:7562af132fa3f8aaaf34dc96d7ec95bdca29d1c795e8fcf14e01edf1d32122bc"}, + {file = "narwhals-1.35.0.tar.gz", hash = "sha256:07477d18487fbc940243b69818a177ed7119b737910a8a254fb67688b48a7c96"}, ] [package.extras] -core = ["duckdb", "pandas", "polars", "pyarrow", "pyarrow-stubs"] cudf = ["cudf (>=24.10.0)"] dask = ["dask[dataframe] (>=2024.8)"] -dev = ["covdefaults", "hypothesis", "pre-commit", "pytest", "pytest-cov", "pytest-env", "pytest-randomly", "typing-extensions"] -docs = ["black", "duckdb", "jinja2", "markdown-exec[ansi]", "mkdocs", "mkdocs-autorefs", "mkdocs-material", "mkdocstrings[python]", "pandas", "polars (>=1.0.0)", "pyarrow"] duckdb = ["duckdb (>=1.0)"] -extra = ["scikit-learn"] ibis = ["ibis-framework (>=6.0.0)", "packaging", "pyarrow-hotfix", "rich"] modin = ["modin"] pandas = ["pandas (>=0.25.3)"] polars = ["polars (>=0.20.3)"] pyarrow = ["pyarrow (>=11.0.0)"] pyspark = ["pyspark (>=3.5.0)"] +sqlframe = ["sqlframe (>=3.22.0)"] [[package]] name = "nest-asyncio" @@ -3194,63 +3223,63 @@ signedtoken = ["cryptography (>=3.0.0)", "pyjwt (>=2.0.0,<3)"] [[package]] name = "opentelemetry-api" -version = "1.30.0" +version = "1.32.1" description = "OpenTelemetry Python API" optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "opentelemetry_api-1.30.0-py3-none-any.whl", hash = "sha256:d5f5284890d73fdf47f843dda3210edf37a38d66f44f2b5aedc1e89ed455dc09"}, - {file = "opentelemetry_api-1.30.0.tar.gz", hash = "sha256:375893400c1435bf623f7dfb3bcd44825fe6b56c34d0667c542ea8257b1a1240"}, + {file = "opentelemetry_api-1.32.1-py3-none-any.whl", hash = "sha256:bbd19f14ab9f15f0e85e43e6a958aa4cb1f36870ee62b7fd205783a112012724"}, + {file = "opentelemetry_api-1.32.1.tar.gz", hash = "sha256:a5be71591694a4d9195caf6776b055aa702e964d961051a0715d05f8632c32fb"}, ] [package.dependencies] deprecated = ">=1.2.6" -importlib-metadata = ">=6.0,<=8.5.0" +importlib-metadata = ">=6.0,<8.7.0" [[package]] name = "opentelemetry-sdk" -version = "1.30.0" +version = "1.32.1" description = "OpenTelemetry Python SDK" optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "opentelemetry_sdk-1.30.0-py3-none-any.whl", hash = "sha256:14fe7afc090caad881addb6926cec967129bd9260c4d33ae6a217359f6b61091"}, - {file = "opentelemetry_sdk-1.30.0.tar.gz", hash = "sha256:c9287a9e4a7614b9946e933a67168450b9ab35f08797eb9bc77d998fa480fa18"}, + {file = "opentelemetry_sdk-1.32.1-py3-none-any.whl", hash = "sha256:bba37b70a08038613247bc42beee5a81b0ddca422c7d7f1b097b32bf1c7e2f17"}, + {file = "opentelemetry_sdk-1.32.1.tar.gz", hash = "sha256:8ef373d490961848f525255a42b193430a0637e064dd132fd2a014d94792a092"}, ] [package.dependencies] -opentelemetry-api = "1.30.0" -opentelemetry-semantic-conventions = "0.51b0" +opentelemetry-api = "1.32.1" +opentelemetry-semantic-conventions = "0.53b1" typing-extensions = ">=3.7.4" [[package]] name = "opentelemetry-semantic-conventions" -version = "0.51b0" +version = "0.53b1" description = "OpenTelemetry Semantic Conventions" optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "opentelemetry_semantic_conventions-0.51b0-py3-none-any.whl", hash = "sha256:fdc777359418e8d06c86012c3dc92c88a6453ba662e941593adb062e48c2eeae"}, - {file = "opentelemetry_semantic_conventions-0.51b0.tar.gz", hash = "sha256:3fabf47f35d1fd9aebcdca7e6802d86bd5ebc3bc3408b7e3248dde6e87a18c47"}, + {file = "opentelemetry_semantic_conventions-0.53b1-py3-none-any.whl", hash = "sha256:21df3ed13f035f8f3ea42d07cbebae37020367a53b47f1ebee3b10a381a00208"}, + {file = "opentelemetry_semantic_conventions-0.53b1.tar.gz", hash = "sha256:4c5a6fede9de61211b2e9fc1e02e8acacce882204cd770177342b6a3be682992"}, ] [package.dependencies] deprecated = ">=1.2.6" -opentelemetry-api = "1.30.0" +opentelemetry-api = "1.32.1" [[package]] name = "packaging" -version = "24.2" +version = "25.0" description = "Core utilities for Python packages" optional = false python-versions = ">=3.8" groups = ["main", "dev"] files = [ - {file = "packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759"}, - {file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"}, + {file = "packaging-25.0-py3-none-any.whl", hash = "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484"}, + {file = "packaging-25.0.tar.gz", hash = "sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f"}, ] [[package]] @@ -3356,31 +3385,31 @@ setuptools = "*" [[package]] name = "platformdirs" -version = "4.3.6" +version = "4.3.7" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "platformdirs-4.3.6-py3-none-any.whl", hash = "sha256:73e575e1408ab8103900836b97580d5307456908a03e92031bab39e4554cc3fb"}, - {file = "platformdirs-4.3.6.tar.gz", hash = "sha256:357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907"}, + {file = "platformdirs-4.3.7-py3-none-any.whl", hash = "sha256:a03875334331946f13c549dbd8f4bac7a13a50a895a0eb1e8c6a8ace80d40a94"}, + {file = "platformdirs-4.3.7.tar.gz", hash = "sha256:eb437d586b6a0986388f0d6f74aa0cde27b48d0e3d66843640bfb6bdcdb6e351"}, ] [package.extras] -docs = ["furo (>=2024.8.6)", "proselint (>=0.14)", "sphinx (>=8.0.2)", "sphinx-autodoc-typehints (>=2.4)"] -test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=8.3.2)", "pytest-cov (>=5)", "pytest-mock (>=3.14)"] -type = ["mypy (>=1.11.2)"] +docs = ["furo (>=2024.8.6)", "proselint (>=0.14)", "sphinx (>=8.1.3)", "sphinx-autodoc-typehints (>=3)"] +test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=8.3.4)", "pytest-cov (>=6)", "pytest-mock (>=3.14)"] +type = ["mypy (>=1.14.1)"] [[package]] name = "plotly" -version = "6.0.0" -description = "An open-source, interactive data visualization library for Python" +version = "6.0.1" +description = "An open-source interactive data visualization library for Python" optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "plotly-6.0.0-py3-none-any.whl", hash = "sha256:f708871c3a9349a68791ff943a5781b1ec04de7769ea69068adcd9202e57653a"}, - {file = "plotly-6.0.0.tar.gz", hash = "sha256:c4aad38b8c3d65e4a5e7dd308b084143b9025c2cc9d5317fc1f1d30958db87d3"}, + {file = "plotly-6.0.1-py3-none-any.whl", hash = "sha256:4714db20fea57a435692c548a4eb4fae454f7daddf15f8d8ba7e1045681d7768"}, + {file = "plotly-6.0.1.tar.gz", hash = "sha256:dd8400229872b6e3c964b099be699f8d00c489a974f2cfccfad5e8240873366b"}, ] [package.dependencies] @@ -3407,35 +3436,15 @@ dev = ["pre-commit", "tox"] testing = ["pytest", "pytest-benchmark"] [[package]] -name = "portalocker" -version = "2.10.1" -description = "Wraps the portalocker recipe for easy usage" +name = "prompt-toolkit" +version = "3.0.51" +description = "Library for building powerful interactive command lines in Python" optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "portalocker-2.10.1-py3-none-any.whl", hash = "sha256:53a5984ebc86a025552264b459b46a2086e269b21823cb572f8f28ee759e45bf"}, - {file = "portalocker-2.10.1.tar.gz", hash = "sha256:ef1bf844e878ab08aee7e40184156e1151f228f103aa5c6bd0724cc330960f8f"}, -] - -[package.dependencies] -pywin32 = {version = ">=226", markers = "platform_system == \"Windows\""} - -[package.extras] -docs = ["sphinx (>=1.7.1)"] -redis = ["redis"] -tests = ["pytest (>=5.4.1)", "pytest-cov (>=2.8.1)", "pytest-mypy (>=0.8.0)", "pytest-timeout (>=2.1.0)", "redis", "sphinx (>=6.0.0)", "types-redis"] - -[[package]] -name = "prompt-toolkit" -version = "3.0.50" -description = "Library for building powerful interactive command lines in Python" -optional = false -python-versions = ">=3.8.0" -groups = ["main"] -files = [ - {file = "prompt_toolkit-3.0.50-py3-none-any.whl", hash = "sha256:9b6427eb19e479d98acff65196a307c555eb567989e6d88ebbb1b509d9779198"}, - {file = "prompt_toolkit-3.0.50.tar.gz", hash = "sha256:544748f3860a2623ca5cd6d2795e7a14f3d0e1c3c9728359013f79877fc89bab"}, + {file = "prompt_toolkit-3.0.51-py3-none-any.whl", hash = "sha256:52742911fde84e2d423e2f9a4cf1de7d7ac4e51958f648d9540e0fb8db077b07"}, + {file = "prompt_toolkit-3.0.51.tar.gz", hash = "sha256:931a162e3b27fc90c86f1b48bb1fb2c528c2761475e57c9c06de13311c7b54ed"}, ] [package.dependencies] @@ -3443,138 +3452,152 @@ wcwidth = "*" [[package]] name = "propcache" -version = "0.2.1" +version = "0.3.1" description = "Accelerated property cache" optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "propcache-0.2.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:6b3f39a85d671436ee3d12c017f8fdea38509e4f25b28eb25877293c98c243f6"}, - {file = "propcache-0.2.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:39d51fbe4285d5db5d92a929e3e21536ea3dd43732c5b177c7ef03f918dff9f2"}, - {file = "propcache-0.2.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6445804cf4ec763dc70de65a3b0d9954e868609e83850a47ca4f0cb64bd79fea"}, - {file = "propcache-0.2.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f9479aa06a793c5aeba49ce5c5692ffb51fcd9a7016e017d555d5e2b0045d212"}, - {file = "propcache-0.2.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d9631c5e8b5b3a0fda99cb0d29c18133bca1e18aea9effe55adb3da1adef80d3"}, - {file = "propcache-0.2.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3156628250f46a0895f1f36e1d4fbe062a1af8718ec3ebeb746f1d23f0c5dc4d"}, - {file = "propcache-0.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6b6fb63ae352e13748289f04f37868099e69dba4c2b3e271c46061e82c745634"}, - {file = "propcache-0.2.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:887d9b0a65404929641a9fabb6452b07fe4572b269d901d622d8a34a4e9043b2"}, - {file = "propcache-0.2.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:a96dc1fa45bd8c407a0af03b2d5218392729e1822b0c32e62c5bf7eeb5fb3958"}, - {file = "propcache-0.2.1-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:a7e65eb5c003a303b94aa2c3852ef130230ec79e349632d030e9571b87c4698c"}, - {file = "propcache-0.2.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:999779addc413181912e984b942fbcc951be1f5b3663cd80b2687758f434c583"}, - {file = "propcache-0.2.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:19a0f89a7bb9d8048d9c4370c9c543c396e894c76be5525f5e1ad287f1750ddf"}, - {file = "propcache-0.2.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:1ac2f5fe02fa75f56e1ad473f1175e11f475606ec9bd0be2e78e4734ad575034"}, - {file = "propcache-0.2.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:574faa3b79e8ebac7cb1d7930f51184ba1ccf69adfdec53a12f319a06030a68b"}, - {file = "propcache-0.2.1-cp310-cp310-win32.whl", hash = "sha256:03ff9d3f665769b2a85e6157ac8b439644f2d7fd17615a82fa55739bc97863f4"}, - {file = "propcache-0.2.1-cp310-cp310-win_amd64.whl", hash = "sha256:2d3af2e79991102678f53e0dbf4c35de99b6b8b58f29a27ca0325816364caaba"}, - {file = "propcache-0.2.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:1ffc3cca89bb438fb9c95c13fc874012f7b9466b89328c3c8b1aa93cdcfadd16"}, - {file = "propcache-0.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f174bbd484294ed9fdf09437f889f95807e5f229d5d93588d34e92106fbf6717"}, - {file = "propcache-0.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:70693319e0b8fd35dd863e3e29513875eb15c51945bf32519ef52927ca883bc3"}, - {file = "propcache-0.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b480c6a4e1138e1aa137c0079b9b6305ec6dcc1098a8ca5196283e8a49df95a9"}, - {file = "propcache-0.2.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d27b84d5880f6d8aa9ae3edb253c59d9f6642ffbb2c889b78b60361eed449787"}, - {file = "propcache-0.2.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:857112b22acd417c40fa4595db2fe28ab900c8c5fe4670c7989b1c0230955465"}, - {file = "propcache-0.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cf6c4150f8c0e32d241436526f3c3f9cbd34429492abddbada2ffcff506c51af"}, - {file = "propcache-0.2.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:66d4cfda1d8ed687daa4bc0274fcfd5267873db9a5bc0418c2da19273040eeb7"}, - {file = "propcache-0.2.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c2f992c07c0fca81655066705beae35fc95a2fa7366467366db627d9f2ee097f"}, - {file = "propcache-0.2.1-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:4a571d97dbe66ef38e472703067021b1467025ec85707d57e78711c085984e54"}, - {file = "propcache-0.2.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:bb6178c241278d5fe853b3de743087be7f5f4c6f7d6d22a3b524d323eecec505"}, - {file = "propcache-0.2.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:ad1af54a62ffe39cf34db1aa6ed1a1873bd548f6401db39d8e7cd060b9211f82"}, - {file = "propcache-0.2.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:e7048abd75fe40712005bcfc06bb44b9dfcd8e101dda2ecf2f5aa46115ad07ca"}, - {file = "propcache-0.2.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:160291c60081f23ee43d44b08a7e5fb76681221a8e10b3139618c5a9a291b84e"}, - {file = "propcache-0.2.1-cp311-cp311-win32.whl", hash = "sha256:819ce3b883b7576ca28da3861c7e1a88afd08cc8c96908e08a3f4dd64a228034"}, - {file = "propcache-0.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:edc9fc7051e3350643ad929df55c451899bb9ae6d24998a949d2e4c87fb596d3"}, - {file = "propcache-0.2.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:081a430aa8d5e8876c6909b67bd2d937bfd531b0382d3fdedb82612c618bc41a"}, - {file = "propcache-0.2.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d2ccec9ac47cf4e04897619c0e0c1a48c54a71bdf045117d3a26f80d38ab1fb0"}, - {file = "propcache-0.2.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:14d86fe14b7e04fa306e0c43cdbeebe6b2c2156a0c9ce56b815faacc193e320d"}, - {file = "propcache-0.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:049324ee97bb67285b49632132db351b41e77833678432be52bdd0289c0e05e4"}, - {file = "propcache-0.2.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1cd9a1d071158de1cc1c71a26014dcdfa7dd3d5f4f88c298c7f90ad6f27bb46d"}, - {file = "propcache-0.2.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:98110aa363f1bb4c073e8dcfaefd3a5cea0f0834c2aab23dda657e4dab2f53b5"}, - {file = "propcache-0.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:647894f5ae99c4cf6bb82a1bb3a796f6e06af3caa3d32e26d2350d0e3e3faf24"}, - {file = "propcache-0.2.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bfd3223c15bebe26518d58ccf9a39b93948d3dcb3e57a20480dfdd315356baff"}, - {file = "propcache-0.2.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:d71264a80f3fcf512eb4f18f59423fe82d6e346ee97b90625f283df56aee103f"}, - {file = "propcache-0.2.1-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:e73091191e4280403bde6c9a52a6999d69cdfde498f1fdf629105247599b57ec"}, - {file = "propcache-0.2.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:3935bfa5fede35fb202c4b569bb9c042f337ca4ff7bd540a0aa5e37131659348"}, - {file = "propcache-0.2.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:f508b0491767bb1f2b87fdfacaba5f7eddc2f867740ec69ece6d1946d29029a6"}, - {file = "propcache-0.2.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:1672137af7c46662a1c2be1e8dc78cb6d224319aaa40271c9257d886be4363a6"}, - {file = "propcache-0.2.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b74c261802d3d2b85c9df2dfb2fa81b6f90deeef63c2db9f0e029a3cac50b518"}, - {file = "propcache-0.2.1-cp312-cp312-win32.whl", hash = "sha256:d09c333d36c1409d56a9d29b3a1b800a42c76a57a5a8907eacdbce3f18768246"}, - {file = "propcache-0.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:c214999039d4f2a5b2073ac506bba279945233da8c786e490d411dfc30f855c1"}, - {file = "propcache-0.2.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:aca405706e0b0a44cc6bfd41fbe89919a6a56999157f6de7e182a990c36e37bc"}, - {file = "propcache-0.2.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:12d1083f001ace206fe34b6bdc2cb94be66d57a850866f0b908972f90996b3e9"}, - {file = "propcache-0.2.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:d93f3307ad32a27bda2e88ec81134b823c240aa3abb55821a8da553eed8d9439"}, - {file = "propcache-0.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ba278acf14471d36316159c94a802933d10b6a1e117b8554fe0d0d9b75c9d536"}, - {file = "propcache-0.2.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4e6281aedfca15301c41f74d7005e6e3f4ca143584ba696ac69df4f02f40d629"}, - {file = "propcache-0.2.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5b750a8e5a1262434fb1517ddf64b5de58327f1adc3524a5e44c2ca43305eb0b"}, - {file = "propcache-0.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bf72af5e0fb40e9babf594308911436c8efde3cb5e75b6f206c34ad18be5c052"}, - {file = "propcache-0.2.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b2d0a12018b04f4cb820781ec0dffb5f7c7c1d2a5cd22bff7fb055a2cb19ebce"}, - {file = "propcache-0.2.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:e800776a79a5aabdb17dcc2346a7d66d0777e942e4cd251defeb084762ecd17d"}, - {file = "propcache-0.2.1-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:4160d9283bd382fa6c0c2b5e017acc95bc183570cd70968b9202ad6d8fc48dce"}, - {file = "propcache-0.2.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:30b43e74f1359353341a7adb783c8f1b1c676367b011709f466f42fda2045e95"}, - {file = "propcache-0.2.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:58791550b27d5488b1bb52bc96328456095d96206a250d28d874fafe11b3dfaf"}, - {file = "propcache-0.2.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:0f022d381747f0dfe27e99d928e31bc51a18b65bb9e481ae0af1380a6725dd1f"}, - {file = "propcache-0.2.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:297878dc9d0a334358f9b608b56d02e72899f3b8499fc6044133f0d319e2ec30"}, - {file = "propcache-0.2.1-cp313-cp313-win32.whl", hash = "sha256:ddfab44e4489bd79bda09d84c430677fc7f0a4939a73d2bba3073036f487a0a6"}, - {file = "propcache-0.2.1-cp313-cp313-win_amd64.whl", hash = "sha256:556fc6c10989f19a179e4321e5d678db8eb2924131e64652a51fe83e4c3db0e1"}, - {file = "propcache-0.2.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:6a9a8c34fb7bb609419a211e59da8887eeca40d300b5ea8e56af98f6fbbb1541"}, - {file = "propcache-0.2.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:ae1aa1cd222c6d205853b3013c69cd04515f9d6ab6de4b0603e2e1c33221303e"}, - {file = "propcache-0.2.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:accb6150ce61c9c4b7738d45550806aa2b71c7668c6942f17b0ac182b6142fd4"}, - {file = "propcache-0.2.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5eee736daafa7af6d0a2dc15cc75e05c64f37fc37bafef2e00d77c14171c2097"}, - {file = "propcache-0.2.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f7a31fc1e1bd362874863fdeed71aed92d348f5336fd84f2197ba40c59f061bd"}, - {file = "propcache-0.2.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cba4cfa1052819d16699e1d55d18c92b6e094d4517c41dd231a8b9f87b6fa681"}, - {file = "propcache-0.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f089118d584e859c62b3da0892b88a83d611c2033ac410e929cb6754eec0ed16"}, - {file = "propcache-0.2.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:781e65134efaf88feb447e8c97a51772aa75e48b794352f94cb7ea717dedda0d"}, - {file = "propcache-0.2.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:31f5af773530fd3c658b32b6bdc2d0838543de70eb9a2156c03e410f7b0d3aae"}, - {file = "propcache-0.2.1-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:a7a078f5d37bee6690959c813977da5291b24286e7b962e62a94cec31aa5188b"}, - {file = "propcache-0.2.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:cea7daf9fc7ae6687cf1e2c049752f19f146fdc37c2cc376e7d0032cf4f25347"}, - {file = "propcache-0.2.1-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:8b3489ff1ed1e8315674d0775dc7d2195fb13ca17b3808721b54dbe9fd020faf"}, - {file = "propcache-0.2.1-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:9403db39be1393618dd80c746cb22ccda168efce239c73af13c3763ef56ffc04"}, - {file = "propcache-0.2.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:5d97151bc92d2b2578ff7ce779cdb9174337390a535953cbb9452fb65164c587"}, - {file = "propcache-0.2.1-cp39-cp39-win32.whl", hash = "sha256:9caac6b54914bdf41bcc91e7eb9147d331d29235a7c967c150ef5df6464fd1bb"}, - {file = "propcache-0.2.1-cp39-cp39-win_amd64.whl", hash = "sha256:92fc4500fcb33899b05ba73276dfb684a20d31caa567b7cb5252d48f896a91b1"}, - {file = "propcache-0.2.1-py3-none-any.whl", hash = "sha256:52277518d6aae65536e9cea52d4e7fd2f7a66f4aa2d30ed3f2fcea620ace3c54"}, - {file = "propcache-0.2.1.tar.gz", hash = "sha256:3f77ce728b19cb537714499928fe800c3dda29e8d9428778fc7c186da4c09a64"}, + {file = "propcache-0.3.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:f27785888d2fdd918bc36de8b8739f2d6c791399552333721b58193f68ea3e98"}, + {file = "propcache-0.3.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d4e89cde74154c7b5957f87a355bb9c8ec929c167b59c83d90654ea36aeb6180"}, + {file = "propcache-0.3.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:730178f476ef03d3d4d255f0c9fa186cb1d13fd33ffe89d39f2cda4da90ceb71"}, + {file = "propcache-0.3.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:967a8eec513dbe08330f10137eacb427b2ca52118769e82ebcfcab0fba92a649"}, + {file = "propcache-0.3.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5b9145c35cc87313b5fd480144f8078716007656093d23059e8993d3a8fa730f"}, + {file = "propcache-0.3.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9e64e948ab41411958670f1093c0a57acfdc3bee5cf5b935671bbd5313bcf229"}, + {file = "propcache-0.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:319fa8765bfd6a265e5fa661547556da381e53274bc05094fc9ea50da51bfd46"}, + {file = "propcache-0.3.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c66d8ccbc902ad548312b96ed8d5d266d0d2c6d006fd0f66323e9d8f2dd49be7"}, + {file = "propcache-0.3.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:2d219b0dbabe75e15e581fc1ae796109b07c8ba7d25b9ae8d650da582bed01b0"}, + {file = "propcache-0.3.1-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:cd6a55f65241c551eb53f8cf4d2f4af33512c39da5d9777694e9d9c60872f519"}, + {file = "propcache-0.3.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:9979643ffc69b799d50d3a7b72b5164a2e97e117009d7af6dfdd2ab906cb72cd"}, + {file = "propcache-0.3.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:4cf9e93a81979f1424f1a3d155213dc928f1069d697e4353edb8a5eba67c6259"}, + {file = "propcache-0.3.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:2fce1df66915909ff6c824bbb5eb403d2d15f98f1518e583074671a30fe0c21e"}, + {file = "propcache-0.3.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:4d0dfdd9a2ebc77b869a0b04423591ea8823f791293b527dc1bb896c1d6f1136"}, + {file = "propcache-0.3.1-cp310-cp310-win32.whl", hash = "sha256:1f6cc0ad7b4560e5637eb2c994e97b4fa41ba8226069c9277eb5ea7101845b42"}, + {file = "propcache-0.3.1-cp310-cp310-win_amd64.whl", hash = "sha256:47ef24aa6511e388e9894ec16f0fbf3313a53ee68402bc428744a367ec55b833"}, + {file = "propcache-0.3.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:7f30241577d2fef2602113b70ef7231bf4c69a97e04693bde08ddab913ba0ce5"}, + {file = "propcache-0.3.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:43593c6772aa12abc3af7784bff4a41ffa921608dd38b77cf1dfd7f5c4e71371"}, + {file = "propcache-0.3.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a75801768bbe65499495660b777e018cbe90c7980f07f8aa57d6be79ea6f71da"}, + {file = "propcache-0.3.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f6f1324db48f001c2ca26a25fa25af60711e09b9aaf4b28488602776f4f9a744"}, + {file = "propcache-0.3.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5cdb0f3e1eb6dfc9965d19734d8f9c481b294b5274337a8cb5cb01b462dcb7e0"}, + {file = "propcache-0.3.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1eb34d90aac9bfbced9a58b266f8946cb5935869ff01b164573a7634d39fbcb5"}, + {file = "propcache-0.3.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f35c7070eeec2cdaac6fd3fe245226ed2a6292d3ee8c938e5bb645b434c5f256"}, + {file = "propcache-0.3.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b23c11c2c9e6d4e7300c92e022046ad09b91fd00e36e83c44483df4afa990073"}, + {file = "propcache-0.3.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:3e19ea4ea0bf46179f8a3652ac1426e6dcbaf577ce4b4f65be581e237340420d"}, + {file = "propcache-0.3.1-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:bd39c92e4c8f6cbf5f08257d6360123af72af9f4da75a690bef50da77362d25f"}, + {file = "propcache-0.3.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:b0313e8b923b3814d1c4a524c93dfecea5f39fa95601f6a9b1ac96cd66f89ea0"}, + {file = "propcache-0.3.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:e861ad82892408487be144906a368ddbe2dc6297074ade2d892341b35c59844a"}, + {file = "propcache-0.3.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:61014615c1274df8da5991a1e5da85a3ccb00c2d4701ac6f3383afd3ca47ab0a"}, + {file = "propcache-0.3.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:71ebe3fe42656a2328ab08933d420df5f3ab121772eef78f2dc63624157f0ed9"}, + {file = "propcache-0.3.1-cp311-cp311-win32.whl", hash = "sha256:58aa11f4ca8b60113d4b8e32d37e7e78bd8af4d1a5b5cb4979ed856a45e62005"}, + {file = "propcache-0.3.1-cp311-cp311-win_amd64.whl", hash = "sha256:9532ea0b26a401264b1365146c440a6d78269ed41f83f23818d4b79497aeabe7"}, + {file = "propcache-0.3.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:f78eb8422acc93d7b69964012ad7048764bb45a54ba7a39bb9e146c72ea29723"}, + {file = "propcache-0.3.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:89498dd49c2f9a026ee057965cdf8192e5ae070ce7d7a7bd4b66a8e257d0c976"}, + {file = "propcache-0.3.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:09400e98545c998d57d10035ff623266927cb784d13dd2b31fd33b8a5316b85b"}, + {file = "propcache-0.3.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aa8efd8c5adc5a2c9d3b952815ff8f7710cefdcaf5f2c36d26aff51aeca2f12f"}, + {file = "propcache-0.3.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c2fe5c910f6007e716a06d269608d307b4f36e7babee5f36533722660e8c4a70"}, + {file = "propcache-0.3.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a0ab8cf8cdd2194f8ff979a43ab43049b1df0b37aa64ab7eca04ac14429baeb7"}, + {file = "propcache-0.3.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:563f9d8c03ad645597b8d010ef4e9eab359faeb11a0a2ac9f7b4bc8c28ebef25"}, + {file = "propcache-0.3.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fb6e0faf8cb6b4beea5d6ed7b5a578254c6d7df54c36ccd3d8b3eb00d6770277"}, + {file = "propcache-0.3.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:1c5c7ab7f2bb3f573d1cb921993006ba2d39e8621019dffb1c5bc94cdbae81e8"}, + {file = "propcache-0.3.1-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:050b571b2e96ec942898f8eb46ea4bfbb19bd5502424747e83badc2d4a99a44e"}, + {file = "propcache-0.3.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:e1c4d24b804b3a87e9350f79e2371a705a188d292fd310e663483af6ee6718ee"}, + {file = "propcache-0.3.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:e4fe2a6d5ce975c117a6bb1e8ccda772d1e7029c1cca1acd209f91d30fa72815"}, + {file = "propcache-0.3.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:feccd282de1f6322f56f6845bf1207a537227812f0a9bf5571df52bb418d79d5"}, + {file = "propcache-0.3.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ec314cde7314d2dd0510c6787326bbffcbdc317ecee6b7401ce218b3099075a7"}, + {file = "propcache-0.3.1-cp312-cp312-win32.whl", hash = "sha256:7d2d5a0028d920738372630870e7d9644ce437142197f8c827194fca404bf03b"}, + {file = "propcache-0.3.1-cp312-cp312-win_amd64.whl", hash = "sha256:88c423efef9d7a59dae0614eaed718449c09a5ac79a5f224a8b9664d603f04a3"}, + {file = "propcache-0.3.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:f1528ec4374617a7a753f90f20e2f551121bb558fcb35926f99e3c42367164b8"}, + {file = "propcache-0.3.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:dc1915ec523b3b494933b5424980831b636fe483d7d543f7afb7b3bf00f0c10f"}, + {file = "propcache-0.3.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a110205022d077da24e60b3df8bcee73971be9575dec5573dd17ae5d81751111"}, + {file = "propcache-0.3.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d249609e547c04d190e820d0d4c8ca03ed4582bcf8e4e160a6969ddfb57b62e5"}, + {file = "propcache-0.3.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5ced33d827625d0a589e831126ccb4f5c29dfdf6766cac441d23995a65825dcb"}, + {file = "propcache-0.3.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4114c4ada8f3181af20808bedb250da6bae56660e4b8dfd9cd95d4549c0962f7"}, + {file = "propcache-0.3.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:975af16f406ce48f1333ec5e912fe11064605d5c5b3f6746969077cc3adeb120"}, + {file = "propcache-0.3.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a34aa3a1abc50740be6ac0ab9d594e274f59960d3ad253cd318af76b996dd654"}, + {file = "propcache-0.3.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:9cec3239c85ed15bfaded997773fdad9fb5662b0a7cbc854a43f291eb183179e"}, + {file = "propcache-0.3.1-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:05543250deac8e61084234d5fc54f8ebd254e8f2b39a16b1dce48904f45b744b"}, + {file = "propcache-0.3.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:5cb5918253912e088edbf023788de539219718d3b10aef334476b62d2b53de53"}, + {file = "propcache-0.3.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:f3bbecd2f34d0e6d3c543fdb3b15d6b60dd69970c2b4c822379e5ec8f6f621d5"}, + {file = "propcache-0.3.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:aca63103895c7d960a5b9b044a83f544b233c95e0dcff114389d64d762017af7"}, + {file = "propcache-0.3.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:5a0a9898fdb99bf11786265468571e628ba60af80dc3f6eb89a3545540c6b0ef"}, + {file = "propcache-0.3.1-cp313-cp313-win32.whl", hash = "sha256:3a02a28095b5e63128bcae98eb59025924f121f048a62393db682f049bf4ac24"}, + {file = "propcache-0.3.1-cp313-cp313-win_amd64.whl", hash = "sha256:813fbb8b6aea2fc9659815e585e548fe706d6f663fa73dff59a1677d4595a037"}, + {file = "propcache-0.3.1-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:a444192f20f5ce8a5e52761a031b90f5ea6288b1eef42ad4c7e64fef33540b8f"}, + {file = "propcache-0.3.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:0fbe94666e62ebe36cd652f5fc012abfbc2342de99b523f8267a678e4dfdee3c"}, + {file = "propcache-0.3.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:f011f104db880f4e2166bcdcf7f58250f7a465bc6b068dc84c824a3d4a5c94dc"}, + {file = "propcache-0.3.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3e584b6d388aeb0001d6d5c2bd86b26304adde6d9bb9bfa9c4889805021b96de"}, + {file = "propcache-0.3.1-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8a17583515a04358b034e241f952f1715243482fc2c2945fd99a1b03a0bd77d6"}, + {file = "propcache-0.3.1-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5aed8d8308215089c0734a2af4f2e95eeb360660184ad3912686c181e500b2e7"}, + {file = "propcache-0.3.1-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d8e309ff9a0503ef70dc9a0ebd3e69cf7b3894c9ae2ae81fc10943c37762458"}, + {file = "propcache-0.3.1-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b655032b202028a582d27aeedc2e813299f82cb232f969f87a4fde491a233f11"}, + {file = "propcache-0.3.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9f64d91b751df77931336b5ff7bafbe8845c5770b06630e27acd5dbb71e1931c"}, + {file = "propcache-0.3.1-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:19a06db789a4bd896ee91ebc50d059e23b3639c25d58eb35be3ca1cbe967c3bf"}, + {file = "propcache-0.3.1-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:bef100c88d8692864651b5f98e871fb090bd65c8a41a1cb0ff2322db39c96c27"}, + {file = "propcache-0.3.1-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:87380fb1f3089d2a0b8b00f006ed12bd41bd858fabfa7330c954c70f50ed8757"}, + {file = "propcache-0.3.1-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:e474fc718e73ba5ec5180358aa07f6aded0ff5f2abe700e3115c37d75c947e18"}, + {file = "propcache-0.3.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:17d1c688a443355234f3c031349da69444be052613483f3e4158eef751abcd8a"}, + {file = "propcache-0.3.1-cp313-cp313t-win32.whl", hash = "sha256:359e81a949a7619802eb601d66d37072b79b79c2505e6d3fd8b945538411400d"}, + {file = "propcache-0.3.1-cp313-cp313t-win_amd64.whl", hash = "sha256:e7fb9a84c9abbf2b2683fa3e7b0d7da4d8ecf139a1c635732a8bda29c5214b0e"}, + {file = "propcache-0.3.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:ed5f6d2edbf349bd8d630e81f474d33d6ae5d07760c44d33cd808e2f5c8f4ae6"}, + {file = "propcache-0.3.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:668ddddc9f3075af019f784456267eb504cb77c2c4bd46cc8402d723b4d200bf"}, + {file = "propcache-0.3.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0c86e7ceea56376216eba345aa1fc6a8a6b27ac236181f840d1d7e6a1ea9ba5c"}, + {file = "propcache-0.3.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:83be47aa4e35b87c106fc0c84c0fc069d3f9b9b06d3c494cd404ec6747544894"}, + {file = "propcache-0.3.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:27c6ac6aa9fc7bc662f594ef380707494cb42c22786a558d95fcdedb9aa5d035"}, + {file = "propcache-0.3.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:64a956dff37080b352c1c40b2966b09defb014347043e740d420ca1eb7c9b908"}, + {file = "propcache-0.3.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:82de5da8c8893056603ac2d6a89eb8b4df49abf1a7c19d536984c8dd63f481d5"}, + {file = "propcache-0.3.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0c3c3a203c375b08fd06a20da3cf7aac293b834b6f4f4db71190e8422750cca5"}, + {file = "propcache-0.3.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:b303b194c2e6f171cfddf8b8ba30baefccf03d36a4d9cab7fd0bb68ba476a3d7"}, + {file = "propcache-0.3.1-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:916cd229b0150129d645ec51614d38129ee74c03293a9f3f17537be0029a9641"}, + {file = "propcache-0.3.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:a461959ead5b38e2581998700b26346b78cd98540b5524796c175722f18b0294"}, + {file = "propcache-0.3.1-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:069e7212890b0bcf9b2be0a03afb0c2d5161d91e1bf51569a64f629acc7defbf"}, + {file = "propcache-0.3.1-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:ef2e4e91fb3945769e14ce82ed53007195e616a63aa43b40fb7ebaaf907c8d4c"}, + {file = "propcache-0.3.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:8638f99dca15b9dff328fb6273e09f03d1c50d9b6512f3b65a4154588a7595fe"}, + {file = "propcache-0.3.1-cp39-cp39-win32.whl", hash = "sha256:6f173bbfe976105aaa890b712d1759de339d8a7cef2fc0a1714cc1a1e1c47f64"}, + {file = "propcache-0.3.1-cp39-cp39-win_amd64.whl", hash = "sha256:603f1fe4144420374f1a69b907494c3acbc867a581c2d49d4175b0de7cc64566"}, + {file = "propcache-0.3.1-py3-none-any.whl", hash = "sha256:9a8ecf38de50a7f518c21568c80f985e776397b902f1ce0b01f799aba1608b40"}, + {file = "propcache-0.3.1.tar.gz", hash = "sha256:40d980c33765359098837527e18eddefc9a24cea5b45e078a7f3bb5b032c6ecf"}, ] [[package]] name = "proto-plus" -version = "1.26.0" +version = "1.26.1" description = "Beautiful, Pythonic protocol buffers" optional = false python-versions = ">=3.7" groups = ["main"] files = [ - {file = "proto_plus-1.26.0-py3-none-any.whl", hash = "sha256:bf2dfaa3da281fc3187d12d224c707cb57214fb2c22ba854eb0c105a3fb2d4d7"}, - {file = "proto_plus-1.26.0.tar.gz", hash = "sha256:6e93d5f5ca267b54300880fff156b6a3386b3fa3f43b1da62e680fc0c586ef22"}, + {file = "proto_plus-1.26.1-py3-none-any.whl", hash = "sha256:13285478c2dcf2abb829db158e1047e2f1e8d63a077d94263c2b88b043c75a66"}, + {file = "proto_plus-1.26.1.tar.gz", hash = "sha256:21a515a4c4c0088a773899e23c7bbade3d18f9c66c73edd4c7ee3816bc96a012"}, ] [package.dependencies] -protobuf = ">=3.19.0,<6.0.0dev" +protobuf = ">=3.19.0,<7.0.0" [package.extras] testing = ["google-api-core (>=1.31.5)"] [[package]] name = "protobuf" -version = "5.29.3" +version = "6.30.2" description = "" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["main"] files = [ - {file = "protobuf-5.29.3-cp310-abi3-win32.whl", hash = "sha256:3ea51771449e1035f26069c4c7fd51fba990d07bc55ba80701c78f886bf9c888"}, - {file = "protobuf-5.29.3-cp310-abi3-win_amd64.whl", hash = "sha256:a4fa6f80816a9a0678429e84973f2f98cbc218cca434abe8db2ad0bffc98503a"}, - {file = "protobuf-5.29.3-cp38-abi3-macosx_10_9_universal2.whl", hash = "sha256:a8434404bbf139aa9e1300dbf989667a83d42ddda9153d8ab76e0d5dcaca484e"}, - {file = "protobuf-5.29.3-cp38-abi3-manylinux2014_aarch64.whl", hash = "sha256:daaf63f70f25e8689c072cfad4334ca0ac1d1e05a92fc15c54eb9cf23c3efd84"}, - {file = "protobuf-5.29.3-cp38-abi3-manylinux2014_x86_64.whl", hash = "sha256:c027e08a08be10b67c06bf2370b99c811c466398c357e615ca88c91c07f0910f"}, - {file = "protobuf-5.29.3-cp38-cp38-win32.whl", hash = "sha256:84a57163a0ccef3f96e4b6a20516cedcf5bb3a95a657131c5c3ac62200d23252"}, - {file = "protobuf-5.29.3-cp38-cp38-win_amd64.whl", hash = "sha256:b89c115d877892a512f79a8114564fb435943b59067615894c3b13cd3e1fa107"}, - {file = "protobuf-5.29.3-cp39-cp39-win32.whl", hash = "sha256:0eb32bfa5219fc8d4111803e9a690658aa2e6366384fd0851064b963b6d1f2a7"}, - {file = "protobuf-5.29.3-cp39-cp39-win_amd64.whl", hash = "sha256:6ce8cc3389a20693bfde6c6562e03474c40851b44975c9b2bf6df7d8c4f864da"}, - {file = "protobuf-5.29.3-py3-none-any.whl", hash = "sha256:0a18ed4a24198528f2333802eb075e59dea9d679ab7a6c5efb017a59004d849f"}, - {file = "protobuf-5.29.3.tar.gz", hash = "sha256:5da0f41edaf117bde316404bad1a486cb4ededf8e4a54891296f648e8e076620"}, + {file = "protobuf-6.30.2-cp310-abi3-win32.whl", hash = "sha256:b12ef7df7b9329886e66404bef5e9ce6a26b54069d7f7436a0853ccdeb91c103"}, + {file = "protobuf-6.30.2-cp310-abi3-win_amd64.whl", hash = "sha256:7653c99774f73fe6b9301b87da52af0e69783a2e371e8b599b3e9cb4da4b12b9"}, + {file = "protobuf-6.30.2-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:0eb523c550a66a09a0c20f86dd554afbf4d32b02af34ae53d93268c1f73bc65b"}, + {file = "protobuf-6.30.2-cp39-abi3-manylinux2014_aarch64.whl", hash = "sha256:50f32cc9fd9cb09c783ebc275611b4f19dfdfb68d1ee55d2f0c7fa040df96815"}, + {file = "protobuf-6.30.2-cp39-abi3-manylinux2014_x86_64.whl", hash = "sha256:4f6c687ae8efae6cf6093389a596548214467778146b7245e886f35e1485315d"}, + {file = "protobuf-6.30.2-cp39-cp39-win32.whl", hash = "sha256:524afedc03b31b15586ca7f64d877a98b184f007180ce25183d1a5cb230ee72b"}, + {file = "protobuf-6.30.2-cp39-cp39-win_amd64.whl", hash = "sha256:acec579c39c88bd8fbbacab1b8052c793efe83a0a5bd99db4a31423a25c0a0e2"}, + {file = "protobuf-6.30.2-py3-none-any.whl", hash = "sha256:ae86b030e69a98e08c77beab574cbcb9fff6d031d57209f574a5aea1445f4b51"}, + {file = "protobuf-6.30.2.tar.gz", hash = "sha256:35c859ae076d8c56054c25b59e5e59638d86545ed6e2b6efac6be0b6ea3ba048"}, ] [[package]] name = "prowler" -version = "5.4.0" +version = "5.6.0" description = "Prowler is an Open Source security tool to perform AWS, GCP and Azure security best practices assessments, audits, incident response, continuous monitoring, hardening and forensics readiness. 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." optional = false python-versions = ">3.9.1,<3.13" @@ -3585,23 +3608,23 @@ develop = false [package.dependencies] alive-progress = "3.2.0" awsipranges = "0.3.3" -azure-identity = "1.19.0" +azure-identity = "1.21.0" azure-keyvault-keys = "4.10.0" -azure-mgmt-applicationinsights = "4.0.0" +azure-mgmt-applicationinsights = "4.1.0" azure-mgmt-authorization = "4.0.0" azure-mgmt-compute = "34.0.0" -azure-mgmt-containerregistry = "10.3.0" -azure-mgmt-containerservice = "34.0.0" +azure-mgmt-containerregistry = "12.0.0" +azure-mgmt-containerservice = "34.1.0" azure-mgmt-cosmosdb = "9.7.0" azure-mgmt-keyvault = "10.3.1" azure-mgmt-monitor = "6.0.2" azure-mgmt-network = "28.1.0" azure-mgmt-rdbms = "10.1.0" -azure-mgmt-resource = "23.2.0" +azure-mgmt-resource = "23.3.0" azure-mgmt-search = "9.1.0" azure-mgmt-security = "7.0.0" azure-mgmt-sql = "3.0.1" -azure-mgmt-storage = "21.2.1" +azure-mgmt-storage = "22.1.1" azure-mgmt-subscription = "3.1.1" azure-mgmt-web = "8.0.0" azure-storage-blob = "12.24.1" @@ -3612,29 +3635,29 @@ cryptography = "44.0.1" dash = "2.18.2" dash-bootstrap-components = "1.6.0" detect-secrets = "1.5.0" -google-api-python-client = "2.161.0" +google-api-python-client = "2.163.0" google-auth-httplib2 = ">=0.1,<0.3" jsonschema = "4.23.0" kubernetes = "32.0.1" microsoft-kiota-abstractions = "1.9.2" -msgraph-sdk = "1.18.0" +msgraph-sdk = "1.23.0" numpy = "2.0.2" pandas = "2.2.3" py-ocsf-models = "0.3.1" pydantic = "1.10.21" -python-dateutil = "^2.9.0.post0" +python-dateutil = ">=2.9.0.post0,<3.0.0" pytz = "2025.1" schema = "0.7.7" shodan = "1.31.0" slack-sdk = "3.34.0" tabulate = "0.9.0" -tzlocal = "5.2" +tzlocal = "5.3.1" [package.source] type = "git" url = "https://github.com/prowler-cloud/prowler.git" reference = "master" -resolved_reference = "931df361bf5ee287139112f485580241099094cb" +resolved_reference = "9828824b737b8deda61f4a6646b54e0ad45033b9" [[package]] name = "psutil" @@ -3700,6 +3723,7 @@ files = [ {file = "psycopg2_binary-2.9.9-cp311-cp311-win32.whl", hash = "sha256:dc4926288b2a3e9fd7b50dc6a1909a13bbdadfc67d93f3374d984e56f885579d"}, {file = "psycopg2_binary-2.9.9-cp311-cp311-win_amd64.whl", hash = "sha256:b76bedd166805480ab069612119ea636f5ab8f8771e640ae103e05a4aae3e417"}, {file = "psycopg2_binary-2.9.9-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:8532fd6e6e2dc57bcb3bc90b079c60de896d2128c5d9d6f24a63875a95a088cf"}, + {file = "psycopg2_binary-2.9.9-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:b0605eaed3eb239e87df0d5e3c6489daae3f7388d455d0c0b4df899519c6a38d"}, {file = "psycopg2_binary-2.9.9-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8f8544b092a29a6ddd72f3556a9fcf249ec412e10ad28be6a0c0d948924f2212"}, {file = "psycopg2_binary-2.9.9-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2d423c8d8a3c82d08fe8af900ad5b613ce3632a1249fd6a223941d0735fce493"}, {file = "psycopg2_binary-2.9.9-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2e5afae772c00980525f6d6ecf7cbca55676296b580c0e6abb407f15f3706996"}, @@ -3708,6 +3732,8 @@ files = [ {file = "psycopg2_binary-2.9.9-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:cb16c65dcb648d0a43a2521f2f0a2300f40639f6f8c1ecbc662141e4e3e1ee07"}, {file = "psycopg2_binary-2.9.9-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:911dda9c487075abd54e644ccdf5e5c16773470a6a5d3826fda76699410066fb"}, {file = "psycopg2_binary-2.9.9-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:57fede879f08d23c85140a360c6a77709113efd1c993923c59fde17aa27599fe"}, + {file = "psycopg2_binary-2.9.9-cp312-cp312-win32.whl", hash = "sha256:64cf30263844fa208851ebb13b0732ce674d8ec6a0c86a4e160495d299ba3c93"}, + {file = "psycopg2_binary-2.9.9-cp312-cp312-win_amd64.whl", hash = "sha256:81ff62668af011f9a48787564ab7eded4e9fb17a4a6a74af5ffa6a457400d2ab"}, {file = "psycopg2_binary-2.9.9-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:2293b001e319ab0d869d660a704942c9e2cce19745262a8aba2115ef41a0a42a"}, {file = "psycopg2_binary-2.9.9-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:03ef7df18daf2c4c07e2695e8cfd5ee7f748a1d54d802330985a78d2a5a6dca9"}, {file = "psycopg2_binary-2.9.9-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0a602ea5aff39bb9fac6308e9c9d82b9a35c2bf288e184a816002c9fae930b77"}, @@ -3776,29 +3802,29 @@ files = [ [[package]] name = "pyasn1-modules" -version = "0.4.1" +version = "0.4.2" description = "A collection of ASN.1-based protocols modules" optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "pyasn1_modules-0.4.1-py3-none-any.whl", hash = "sha256:49bfa96b45a292b711e986f222502c1c9a5e1f4e568fc30e2574a6c7d07838fd"}, - {file = "pyasn1_modules-0.4.1.tar.gz", hash = "sha256:c28e2dbf9c06ad61c71a075c7e0f9fd0f1b0bb2d2ad4377f240d33ac2ab60a7c"}, + {file = "pyasn1_modules-0.4.2-py3-none-any.whl", hash = "sha256:29253a9207ce32b64c3ac6600edc75368f98473906e8fd1043bd6b5b1de2c14a"}, + {file = "pyasn1_modules-0.4.2.tar.gz", hash = "sha256:677091de870a80aae844b1ca6134f54652fa2c8c5a52aa396440ac3106e941e6"}, ] [package.dependencies] -pyasn1 = ">=0.4.6,<0.7.0" +pyasn1 = ">=0.6.1,<0.7.0" [[package]] name = "pycodestyle" -version = "2.12.1" +version = "2.13.0" description = "Python style guide checker" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "pycodestyle-2.12.1-py2.py3-none-any.whl", hash = "sha256:46f0fb92069a7c28ab7bb558f05bfc0110dac69a0cd23c61ea0040283a9d78b3"}, - {file = "pycodestyle-2.12.1.tar.gz", hash = "sha256:6838eae08bbce4f6accd5d5572075c63626a15ee3e6f842df996bf62f6d73521"}, + {file = "pycodestyle-2.13.0-py2.py3-none-any.whl", hash = "sha256:35863c5974a271c7a726ed228a14a4f6daf49df369d8c50cd9a6f58a5e143ba9"}, + {file = "pycodestyle-2.13.0.tar.gz", hash = "sha256:c8415bf09abe81d9c7f872502a6eee881fbe85d8763dd5b9924bb0a01d67efae"}, ] [[package]] @@ -3816,44 +3842,44 @@ files = [ [[package]] name = "pycurl" -version = "7.45.4" +version = "7.45.6" description = "PycURL -- A Python Interface To The cURL library" optional = false python-versions = ">=3.5" groups = ["main"] markers = "sys_platform != \"win32\" and platform_python_implementation == \"CPython\"" files = [ - {file = "pycurl-7.45.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:247b4af8eab7d04137a7f1a98391930e04ea93dc669b64db5625070fe15f80a3"}, - {file = "pycurl-7.45.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:561f88697f7540634b1c750146f37bdc0da367b15f6b4ab2bb780871ee6ab005"}, - {file = "pycurl-7.45.4-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:b485fdaf78553f0b8e1c2803bb7dcbe47a7b47594f846fc7e9d3b94d794cfc89"}, - {file = "pycurl-7.45.4-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:e7ae49b88a5d57485fbabef004534225dfe04dc15716a61fae1a0c7f46f2279e"}, - {file = "pycurl-7.45.4-cp310-cp310-win32.whl", hash = "sha256:d14f954ecd21a070038d65ef1c6d1d3ab220f952ff703d48313123222097615c"}, - {file = "pycurl-7.45.4-cp310-cp310-win_amd64.whl", hash = "sha256:2548c3291a33c821f0f80bf9989fc43b5d90fb78b534a7015c8419b83c6f5803"}, - {file = "pycurl-7.45.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f6c0e22052946bbfa25be67f9d1d6639eff10781c89f0cf6f3ff2099273d1bad"}, - {file = "pycurl-7.45.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:acf25cfdaf914db21a2a6e9e274b6d95e3fa2b6018c38f2c58c94b5d8ac3d1b7"}, - {file = "pycurl-7.45.4-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:a39f28f031885485325034918386be352036c220ca45625c7e286d3938eb579d"}, - {file = "pycurl-7.45.4-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:9940e3234c1ca3d30f27a2202d325dbc25291605c98e9585100a351cacd935e8"}, - {file = "pycurl-7.45.4-cp311-cp311-win32.whl", hash = "sha256:ffd3262f98b8997ad04940061d5ebd8bab2362169b9440939c397e24a4a135b0"}, - {file = "pycurl-7.45.4-cp311-cp311-win_amd64.whl", hash = "sha256:1324a859b50bdb0abdbd5620e42f74240d0b7daf2d5925fa303695d9fc3ece18"}, - {file = "pycurl-7.45.4-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:731c46e7c0acffaab19f7c2ecc3d9e7ee337500e87b260b4e0b9fae2d90fa133"}, - {file = "pycurl-7.45.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:13eb1643ab0bf4fdc539a2cdf1021029b07095d3196c5cee5a4271af268d3d31"}, - {file = "pycurl-7.45.4-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:df5f94c051c5a163fa85064559ca94979575e2da26740ff91c078c50c541c465"}, - {file = "pycurl-7.45.4-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:688d09ba2c6a0d4a749d192c43422839d73c40c85143c50cc65c944258fe0ba8"}, - {file = "pycurl-7.45.4-cp312-cp312-win32.whl", hash = "sha256:236600bfe2cd72efe47333add621286667e8fa027dadf1247349afbf30333e95"}, - {file = "pycurl-7.45.4-cp312-cp312-win_amd64.whl", hash = "sha256:26745c6c5ebdccfe8a828ac3fd4e6da6f5d2245696604f04529eb7894a02f4db"}, - {file = "pycurl-7.45.4-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:9bd493ce598f1dc76c8e50043c47debec27c583fa313a836b2d3667640f875d5"}, - {file = "pycurl-7.45.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:4f25d52c97dbca6ebea786f0961b49c1998fa05178abf1964a977c825b3d8ae6"}, - {file = "pycurl-7.45.4-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:13c4b18f44637859f34639493efd297a08670f45e4eec34ab2dcba724e3cb5fc"}, - {file = "pycurl-7.45.4-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:0470bff6cc24d8c2f63c80931aa239463800871609dafc6bcc9ca10f5a12a04e"}, - {file = "pycurl-7.45.4-cp313-cp313-win32.whl", hash = "sha256:3452459668bd01d646385482362b021834a31c036aa1c02acd88924ddeff7d0d"}, - {file = "pycurl-7.45.4-cp313-cp313-win_amd64.whl", hash = "sha256:fd167f73d34beb0cb8064334aee76d9bdd13167b30be6d5d36fb07d0c8223b71"}, - {file = "pycurl-7.45.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b0e38e3eb83b0c891f391853f798fc6a97cb5a86a4a731df0b6320e539ae54ae"}, - {file = "pycurl-7.45.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:d192a48b3cec2e13ad432196b65c22e99620db92feae39c0476635354eff68c6"}, - {file = "pycurl-7.45.4-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:57971d7215fc6fdedcfc092f880a59f04f52fcaf2fd329151b931623d7b59a9c"}, - {file = "pycurl-7.45.4-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:73df3eb5940a7fbf4cf62f7271e9f23a8e9f80e352c838ee9a8448a70c01d3f5"}, - {file = "pycurl-7.45.4-cp39-cp39-win32.whl", hash = "sha256:587a4891039803b5f48392066f97b7cd5e7e9a166187abb5cb4b4806fdb8fbef"}, - {file = "pycurl-7.45.4-cp39-cp39-win_amd64.whl", hash = "sha256:caec8b634763351dd4e1b729a71542b1e2de885d39710ba8e7202817a381b453"}, - {file = "pycurl-7.45.4.tar.gz", hash = "sha256:32c8e237069273f4260b6ae13d1e0f99daae938977016021565dc6e11050e803"}, + {file = "pycurl-7.45.6-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c31b390f1e2cd4525828f1bb78c1f825c0aab5d1588228ed71b22c4784bdb593"}, + {file = "pycurl-7.45.6-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:942b352b69184cb26920db48e0c5cb95af39874b57dbe27318e60f1e68564e37"}, + {file = "pycurl-7.45.6-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:3441ee77e830267aa6e2bb43b29fd5f8a6bd6122010c76a6f0bf84462e9ea9c7"}, + {file = "pycurl-7.45.6-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:2a21e13278d7553a04b421676c458449f6c10509bebf04993f35154b06ee2b20"}, + {file = "pycurl-7.45.6-cp310-cp310-win32.whl", hash = "sha256:d0b5501d527901369aba307354530050f56cd102410f2a3bacd192dc12c645e3"}, + {file = "pycurl-7.45.6-cp310-cp310-win_amd64.whl", hash = "sha256:abe1b204a2f96f2eebeaf93411f03505b46d151ef6d9d89326e6dece7b3a008a"}, + {file = "pycurl-7.45.6-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6f57ad26d6ab390391ad5030790e3f1a831c1ee54ad3bf969eb378f5957eeb0a"}, + {file = "pycurl-7.45.6-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c6fd295f03c928da33a00f56c91765195155d2ac6f12878f6e467830b5dce5f5"}, + {file = "pycurl-7.45.6-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:334721ce1ccd71ff8e405470768b3d221b4393570ccc493fcbdbef4cd62e91ed"}, + {file = "pycurl-7.45.6-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:0cd6b7794268c17f3c660162ed6381769ce0ad260331ef49191418dfc3a2d61a"}, + {file = "pycurl-7.45.6-cp311-cp311-win32.whl", hash = "sha256:357ea634395310085b9d5116226ac5ec218a6ceebf367c2451ebc8d63a6e9939"}, + {file = "pycurl-7.45.6-cp311-cp311-win_amd64.whl", hash = "sha256:878ae64484db18f8f10ba99bffc83fefb4fe8f5686448754f93ec32fa4e4ee93"}, + {file = "pycurl-7.45.6-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:c872d4074360964697c39c1544fe8c91bfecbff27c1cdda1fee5498e5fdadcda"}, + {file = "pycurl-7.45.6-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:56d1197eadd5774582b259cde4364357da71542758d8e917f91cc6ed7ed5b262"}, + {file = "pycurl-7.45.6-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:8a99e56d2575aa74c48c0cd08852a65d5fc952798f76a34236256d5589bf5aa0"}, + {file = "pycurl-7.45.6-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:c04230b9e9cfdca9cf3eb09a0bec6cf2f084640f1f1ca1929cca51411af85de2"}, + {file = "pycurl-7.45.6-cp312-cp312-win32.whl", hash = "sha256:ae893144b82d72d95c932ebdeb81fc7e9fde758e5ecd5dd10ad5b67f34a8b8ee"}, + {file = "pycurl-7.45.6-cp312-cp312-win_amd64.whl", hash = "sha256:56f841b6f2f7a8b2d3051b9ceebd478599dbea3c8d1de8fb9333c895d0c1eea5"}, + {file = "pycurl-7.45.6-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:7c09b7180799af70fc1d4eed580cfb1b9f34fda9081f73a3e3bc9a0e5a4c0e9b"}, + {file = "pycurl-7.45.6-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:361bf94b2a057c7290f9ab84e935793ca515121fc012f4b6bef6c3b5e4ea4397"}, + {file = "pycurl-7.45.6-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:bb9eff0c7794af972da769a887c87729f1bcd8869297b1c01a2732febbb75876"}, + {file = "pycurl-7.45.6-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:26839d43dc7fff6b80e0067f185cc1d0e9be2ae6e2e2361ae8488cead5901c04"}, + {file = "pycurl-7.45.6-cp313-cp313-win32.whl", hash = "sha256:a721c2696a71b1aa5ecf82e6d0ade64bc7211b7317f1c9c66e82f82e2264d8b4"}, + {file = "pycurl-7.45.6-cp313-cp313-win_amd64.whl", hash = "sha256:f0198ebcda8686b3a0c66d490a687fa5fd466f8ecc2f20a0ed0931579538ae3d"}, + {file = "pycurl-7.45.6-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a554a2813d415a7bb9a996a6298f3829f57e987635dcab9f1197b2dccd0ab3b2"}, + {file = "pycurl-7.45.6-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:9f721e3394e5bd7079802ec1819b19c5be4842012268cc45afcb3884efb31cf0"}, + {file = "pycurl-7.45.6-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:81005c0f681d31d5af694d1d3c18bbf1bed0bc8b2bb10fb7388cb1378ba9bd6a"}, + {file = "pycurl-7.45.6-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:3fc0b505c37c7c54d88ced27e1d9e3241130987c24bf1611d9bbd9a3e499e07c"}, + {file = "pycurl-7.45.6-cp39-cp39-win32.whl", hash = "sha256:1309fc0f558a80ca444a3a5b0bdb1572a4d72b195233f0e65413b4d4dd78809b"}, + {file = "pycurl-7.45.6-cp39-cp39-win_amd64.whl", hash = "sha256:2d1a49418b8b4c61f52e06d97b9c16142b425077bd997a123a2ba9ef82553203"}, + {file = "pycurl-7.45.6.tar.gz", hash = "sha256:2b73e66b22719ea48ac08a93fc88e57ef36d46d03cb09d972063c9aa86bb74e6"}, ] [[package]] @@ -3940,14 +3966,14 @@ windows-terminal = ["colorama (>=0.4.6)"] [[package]] name = "pyjwt" -version = "2.10.1" +version = "2.9.0" description = "JSON Web Token implementation in Python" optional = false -python-versions = ">=3.9" +python-versions = ">=3.8" groups = ["main"] files = [ - {file = "PyJWT-2.10.1-py3-none-any.whl", hash = "sha256:dcdd193e30abefd5debf142f9adfcdd2b58004e644f25406ffaebd50bd98dacb"}, - {file = "pyjwt-2.10.1.tar.gz", hash = "sha256:3cc5772eb20009233caf06e9d8a0577824723b44e6648ee0a2aedb6cf9381953"}, + {file = "PyJWT-2.9.0-py3-none-any.whl", hash = "sha256:3b02fb0f44517787776cf48f2ae25d8e14f300e6d7545a4315cee571a415e850"}, + {file = "pyjwt-2.9.0.tar.gz", hash = "sha256:7e1e5b56cc735432a7369cbfa0efe50fa113ebecdc04ae6922deba8b84582d0c"}, ] [package.dependencies] @@ -3989,14 +4015,14 @@ testutils = ["gitpython (>3)"] [[package]] name = "pyparsing" -version = "3.2.1" +version = "3.2.3" description = "pyparsing module - Classes and methods to define and execute parsing grammars" optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "pyparsing-3.2.1-py3-none-any.whl", hash = "sha256:506ff4f4386c4cec0590ec19e6302d3aedb992fdc02c761e90416f158dacf8e1"}, - {file = "pyparsing-3.2.1.tar.gz", hash = "sha256:61980854fd66de3a90028d679a954d5f2623e83144b5afe5ee86f43d762e5f0a"}, + {file = "pyparsing-3.2.3-py3-none-any.whl", hash = "sha256:a749938e02d6fd0b59b356ca504a24982314bb090c383e3cf201c95ef7e2bfcf"}, + {file = "pyparsing-3.2.3.tar.gz", hash = "sha256:b9c13f1ab8b3b542f72e28f634bad4de758ab3ce4546e4301970ad6fa77c38be"}, ] [package.extras] @@ -4096,14 +4122,14 @@ testing = ["Django", "django-configurations (>=2.0)"] [[package]] name = "pytest-docker-tools" -version = "3.1.3" +version = "3.1.9" description = "Docker integration tests for pytest" optional = false -python-versions = ">=3.7.0,<4.0.0" +python-versions = "<4.0.0,>=3.9.0" groups = ["main"] files = [ - {file = "pytest_docker_tools-3.1.3-py3-none-any.whl", hash = "sha256:63e659043160f41d89f94ea42616102594bcc85682aac394fcbc14f14cd1b189"}, - {file = "pytest_docker_tools-3.1.3.tar.gz", hash = "sha256:c7e28841839d67b3ac80ad7b345b953701d5ae61ffda97586114244292aeacc0"}, + {file = "pytest_docker_tools-3.1.9-py2.py3-none-any.whl", hash = "sha256:36f8e88d56d84ea177df68a175673681243dd991d2807fbf551d90f60341bfdb"}, + {file = "pytest_docker_tools-3.1.9.tar.gz", hash = "sha256:1b6a0cb633c20145731313335ef15bcf5571839c06726764e60cbe495324782b"}, ] [package.dependencies] @@ -4224,32 +4250,30 @@ files = [ [[package]] name = "pywin32" -version = "308" +version = "310" description = "Python for Window Extensions" optional = false python-versions = "*" groups = ["main", "dev"] +markers = "sys_platform == \"win32\"" files = [ - {file = "pywin32-308-cp310-cp310-win32.whl", hash = "sha256:796ff4426437896550d2981b9c2ac0ffd75238ad9ea2d3bfa67a1abd546d262e"}, - {file = "pywin32-308-cp310-cp310-win_amd64.whl", hash = "sha256:4fc888c59b3c0bef905ce7eb7e2106a07712015ea1c8234b703a088d46110e8e"}, - {file = "pywin32-308-cp310-cp310-win_arm64.whl", hash = "sha256:a5ab5381813b40f264fa3495b98af850098f814a25a63589a8e9eb12560f450c"}, - {file = "pywin32-308-cp311-cp311-win32.whl", hash = "sha256:5d8c8015b24a7d6855b1550d8e660d8daa09983c80e5daf89a273e5c6fb5095a"}, - {file = "pywin32-308-cp311-cp311-win_amd64.whl", hash = "sha256:575621b90f0dc2695fec346b2d6302faebd4f0f45c05ea29404cefe35d89442b"}, - {file = "pywin32-308-cp311-cp311-win_arm64.whl", hash = "sha256:100a5442b7332070983c4cd03f2e906a5648a5104b8a7f50175f7906efd16bb6"}, - {file = "pywin32-308-cp312-cp312-win32.whl", hash = "sha256:587f3e19696f4bf96fde9d8a57cec74a57021ad5f204c9e627e15c33ff568897"}, - {file = "pywin32-308-cp312-cp312-win_amd64.whl", hash = "sha256:00b3e11ef09ede56c6a43c71f2d31857cf7c54b0ab6e78ac659497abd2834f47"}, - {file = "pywin32-308-cp312-cp312-win_arm64.whl", hash = "sha256:9b4de86c8d909aed15b7011182c8cab38c8850de36e6afb1f0db22b8959e3091"}, - {file = "pywin32-308-cp313-cp313-win32.whl", hash = "sha256:1c44539a37a5b7b21d02ab34e6a4d314e0788f1690d65b48e9b0b89f31abbbed"}, - {file = "pywin32-308-cp313-cp313-win_amd64.whl", hash = "sha256:fd380990e792eaf6827fcb7e187b2b4b1cede0585e3d0c9e84201ec27b9905e4"}, - {file = "pywin32-308-cp313-cp313-win_arm64.whl", hash = "sha256:ef313c46d4c18dfb82a2431e3051ac8f112ccee1a34f29c263c583c568db63cd"}, - {file = "pywin32-308-cp37-cp37m-win32.whl", hash = "sha256:1f696ab352a2ddd63bd07430080dd598e6369152ea13a25ebcdd2f503a38f1ff"}, - {file = "pywin32-308-cp37-cp37m-win_amd64.whl", hash = "sha256:13dcb914ed4347019fbec6697a01a0aec61019c1046c2b905410d197856326a6"}, - {file = "pywin32-308-cp38-cp38-win32.whl", hash = "sha256:5794e764ebcabf4ff08c555b31bd348c9025929371763b2183172ff4708152f0"}, - {file = "pywin32-308-cp38-cp38-win_amd64.whl", hash = "sha256:3b92622e29d651c6b783e368ba7d6722b1634b8e70bd376fd7610fe1992e19de"}, - {file = "pywin32-308-cp39-cp39-win32.whl", hash = "sha256:7873ca4dc60ab3287919881a7d4f88baee4a6e639aa6962de25a98ba6b193341"}, - {file = "pywin32-308-cp39-cp39-win_amd64.whl", hash = "sha256:71b3322d949b4cc20776436a9c9ba0eeedcbc9c650daa536df63f0ff111bb920"}, + {file = "pywin32-310-cp310-cp310-win32.whl", hash = "sha256:6dd97011efc8bf51d6793a82292419eba2c71cf8e7250cfac03bba284454abc1"}, + {file = "pywin32-310-cp310-cp310-win_amd64.whl", hash = "sha256:c3e78706e4229b915a0821941a84e7ef420bf2b77e08c9dae3c76fd03fd2ae3d"}, + {file = "pywin32-310-cp310-cp310-win_arm64.whl", hash = "sha256:33babed0cf0c92a6f94cc6cc13546ab24ee13e3e800e61ed87609ab91e4c8213"}, + {file = "pywin32-310-cp311-cp311-win32.whl", hash = "sha256:1e765f9564e83011a63321bb9d27ec456a0ed90d3732c4b2e312b855365ed8bd"}, + {file = "pywin32-310-cp311-cp311-win_amd64.whl", hash = "sha256:126298077a9d7c95c53823934f000599f66ec9296b09167810eb24875f32689c"}, + {file = "pywin32-310-cp311-cp311-win_arm64.whl", hash = "sha256:19ec5fc9b1d51c4350be7bb00760ffce46e6c95eaf2f0b2f1150657b1a43c582"}, + {file = "pywin32-310-cp312-cp312-win32.whl", hash = "sha256:8a75a5cc3893e83a108c05d82198880704c44bbaee4d06e442e471d3c9ea4f3d"}, + {file = "pywin32-310-cp312-cp312-win_amd64.whl", hash = "sha256:bf5c397c9a9a19a6f62f3fb821fbf36cac08f03770056711f765ec1503972060"}, + {file = "pywin32-310-cp312-cp312-win_arm64.whl", hash = "sha256:2349cc906eae872d0663d4d6290d13b90621eaf78964bb1578632ff20e152966"}, + {file = "pywin32-310-cp313-cp313-win32.whl", hash = "sha256:5d241a659c496ada3253cd01cfaa779b048e90ce4b2b38cd44168ad555ce74ab"}, + {file = "pywin32-310-cp313-cp313-win_amd64.whl", hash = "sha256:667827eb3a90208ddbdcc9e860c81bde63a135710e21e4cb3348968e4bd5249e"}, + {file = "pywin32-310-cp313-cp313-win_arm64.whl", hash = "sha256:e308f831de771482b7cf692a1f308f8fca701b2d8f9dde6cc440c7da17e47b33"}, + {file = "pywin32-310-cp38-cp38-win32.whl", hash = "sha256:0867beb8addefa2e3979d4084352e4ac6e991ca45373390775f7084cc0209b9c"}, + {file = "pywin32-310-cp38-cp38-win_amd64.whl", hash = "sha256:30f0a9b3138fb5e07eb4973b7077e1883f558e40c578c6925acc7a94c34eaa36"}, + {file = "pywin32-310-cp39-cp39-win32.whl", hash = "sha256:851c8d927af0d879221e616ae1f66145253537bbdd321a77e8ef701b443a9a1a"}, + {file = "pywin32-310-cp39-cp39-win_amd64.whl", hash = "sha256:96867217335559ac619f00ad70e513c0fcf84b8a3af9fc2bba3b59b97da70475"}, ] -markers = {main = "sys_platform == \"win32\" or platform_system == \"Windows\"", dev = "sys_platform == \"win32\""} [[package]] name = "pyyaml" @@ -4423,14 +4447,14 @@ six = ">=1.7.0" [[package]] name = "rich" -version = "13.9.4" +version = "14.0.0" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" optional = false python-versions = ">=3.8.0" groups = ["dev"] files = [ - {file = "rich-13.9.4-py3-none-any.whl", hash = "sha256:6049d5e6ec054bf2779ab3358186963bac2ea89175919d699e378b99738c2a90"}, - {file = "rich-13.9.4.tar.gz", hash = "sha256:439594978a49a09530cff7ebc4b5c7103ef57baf48d5ea3184f21d9a2befa098"}, + {file = "rich-14.0.0-py3-none-any.whl", hash = "sha256:1c9491e1951aac09caffd42f448ee3d04e58923ffe14993f6e83068dc395d7e0"}, + {file = "rich-14.0.0.tar.gz", hash = "sha256:82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725"}, ] [package.dependencies] @@ -4442,127 +4466,138 @@ jupyter = ["ipywidgets (>=7.5.1,<9)"] [[package]] name = "rpds-py" -version = "0.22.3" +version = "0.24.0" description = "Python bindings to Rust's persistent data structures (rpds)" optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "rpds_py-0.22.3-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:6c7b99ca52c2c1752b544e310101b98a659b720b21db00e65edca34483259967"}, - {file = "rpds_py-0.22.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:be2eb3f2495ba669d2a985f9b426c1797b7d48d6963899276d22f23e33d47e37"}, - {file = "rpds_py-0.22.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:70eb60b3ae9245ddea20f8a4190bd79c705a22f8028aaf8bbdebe4716c3fab24"}, - {file = "rpds_py-0.22.3-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:4041711832360a9b75cfb11b25a6a97c8fb49c07b8bd43d0d02b45d0b499a4ff"}, - {file = "rpds_py-0.22.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:64607d4cbf1b7e3c3c8a14948b99345eda0e161b852e122c6bb71aab6d1d798c"}, - {file = "rpds_py-0.22.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:81e69b0a0e2537f26d73b4e43ad7bc8c8efb39621639b4434b76a3de50c6966e"}, - {file = "rpds_py-0.22.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc27863442d388870c1809a87507727b799c8460573cfbb6dc0eeaef5a11b5ec"}, - {file = "rpds_py-0.22.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e79dd39f1e8c3504be0607e5fc6e86bb60fe3584bec8b782578c3b0fde8d932c"}, - {file = "rpds_py-0.22.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:e0fa2d4ec53dc51cf7d3bb22e0aa0143966119f42a0c3e4998293a3dd2856b09"}, - {file = "rpds_py-0.22.3-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:fda7cb070f442bf80b642cd56483b5548e43d366fe3f39b98e67cce780cded00"}, - {file = "rpds_py-0.22.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:cff63a0272fcd259dcc3be1657b07c929c466b067ceb1c20060e8d10af56f5bf"}, - {file = "rpds_py-0.22.3-cp310-cp310-win32.whl", hash = "sha256:9bd7228827ec7bb817089e2eb301d907c0d9827a9e558f22f762bb690b131652"}, - {file = "rpds_py-0.22.3-cp310-cp310-win_amd64.whl", hash = "sha256:9beeb01d8c190d7581a4d59522cd3d4b6887040dcfc744af99aa59fef3e041a8"}, - {file = "rpds_py-0.22.3-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:d20cfb4e099748ea39e6f7b16c91ab057989712d31761d3300d43134e26e165f"}, - {file = "rpds_py-0.22.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:68049202f67380ff9aa52f12e92b1c30115f32e6895cd7198fa2a7961621fc5a"}, - {file = "rpds_py-0.22.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fb4f868f712b2dd4bcc538b0a0c1f63a2b1d584c925e69a224d759e7070a12d5"}, - {file = "rpds_py-0.22.3-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bc51abd01f08117283c5ebf64844a35144a0843ff7b2983e0648e4d3d9f10dbb"}, - {file = "rpds_py-0.22.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0f3cec041684de9a4684b1572fe28c7267410e02450f4561700ca5a3bc6695a2"}, - {file = "rpds_py-0.22.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7ef9d9da710be50ff6809fed8f1963fecdfecc8b86656cadfca3bc24289414b0"}, - {file = "rpds_py-0.22.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:59f4a79c19232a5774aee369a0c296712ad0e77f24e62cad53160312b1c1eaa1"}, - {file = "rpds_py-0.22.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1a60bce91f81ddaac922a40bbb571a12c1070cb20ebd6d49c48e0b101d87300d"}, - {file = "rpds_py-0.22.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:e89391e6d60251560f0a8f4bd32137b077a80d9b7dbe6d5cab1cd80d2746f648"}, - {file = "rpds_py-0.22.3-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:e3fb866d9932a3d7d0c82da76d816996d1667c44891bd861a0f97ba27e84fc74"}, - {file = "rpds_py-0.22.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:1352ae4f7c717ae8cba93421a63373e582d19d55d2ee2cbb184344c82d2ae55a"}, - {file = "rpds_py-0.22.3-cp311-cp311-win32.whl", hash = "sha256:b0b4136a252cadfa1adb705bb81524eee47d9f6aab4f2ee4fa1e9d3cd4581f64"}, - {file = "rpds_py-0.22.3-cp311-cp311-win_amd64.whl", hash = "sha256:8bd7c8cfc0b8247c8799080fbff54e0b9619e17cdfeb0478ba7295d43f635d7c"}, - {file = "rpds_py-0.22.3-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:27e98004595899949bd7a7b34e91fa7c44d7a97c40fcaf1d874168bb652ec67e"}, - {file = "rpds_py-0.22.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1978d0021e943aae58b9b0b196fb4895a25cc53d3956b8e35e0b7682eefb6d56"}, - {file = "rpds_py-0.22.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:655ca44a831ecb238d124e0402d98f6212ac527a0ba6c55ca26f616604e60a45"}, - {file = "rpds_py-0.22.3-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:feea821ee2a9273771bae61194004ee2fc33f8ec7db08117ef9147d4bbcbca8e"}, - {file = "rpds_py-0.22.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:22bebe05a9ffc70ebfa127efbc429bc26ec9e9b4ee4d15a740033efda515cf3d"}, - {file = "rpds_py-0.22.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3af6e48651c4e0d2d166dc1b033b7042ea3f871504b6805ba5f4fe31581d8d38"}, - {file = "rpds_py-0.22.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e67ba3c290821343c192f7eae1d8fd5999ca2dc99994114643e2f2d3e6138b15"}, - {file = "rpds_py-0.22.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:02fbb9c288ae08bcb34fb41d516d5eeb0455ac35b5512d03181d755d80810059"}, - {file = "rpds_py-0.22.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:f56a6b404f74ab372da986d240e2e002769a7d7102cc73eb238a4f72eec5284e"}, - {file = "rpds_py-0.22.3-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:0a0461200769ab3b9ab7e513f6013b7a97fdeee41c29b9db343f3c5a8e2b9e61"}, - {file = "rpds_py-0.22.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:8633e471c6207a039eff6aa116e35f69f3156b3989ea3e2d755f7bc41754a4a7"}, - {file = "rpds_py-0.22.3-cp312-cp312-win32.whl", hash = "sha256:593eba61ba0c3baae5bc9be2f5232430453fb4432048de28399ca7376de9c627"}, - {file = "rpds_py-0.22.3-cp312-cp312-win_amd64.whl", hash = "sha256:d115bffdd417c6d806ea9069237a4ae02f513b778e3789a359bc5856e0404cc4"}, - {file = "rpds_py-0.22.3-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:ea7433ce7e4bfc3a85654aeb6747babe3f66eaf9a1d0c1e7a4435bbdf27fea84"}, - {file = "rpds_py-0.22.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:6dd9412824c4ce1aca56c47b0991e65bebb7ac3f4edccfd3f156150c96a7bf25"}, - {file = "rpds_py-0.22.3-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:20070c65396f7373f5df4005862fa162db5d25d56150bddd0b3e8214e8ef45b4"}, - {file = "rpds_py-0.22.3-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0b09865a9abc0ddff4e50b5ef65467cd94176bf1e0004184eb915cbc10fc05c5"}, - {file = "rpds_py-0.22.3-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3453e8d41fe5f17d1f8e9c383a7473cd46a63661628ec58e07777c2fff7196dc"}, - {file = "rpds_py-0.22.3-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f5d36399a1b96e1a5fdc91e0522544580dbebeb1f77f27b2b0ab25559e103b8b"}, - {file = "rpds_py-0.22.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:009de23c9c9ee54bf11303a966edf4d9087cd43a6003672e6aa7def643d06518"}, - {file = "rpds_py-0.22.3-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1aef18820ef3e4587ebe8b3bc9ba6e55892a6d7b93bac6d29d9f631a3b4befbd"}, - {file = "rpds_py-0.22.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f60bd8423be1d9d833f230fdbccf8f57af322d96bcad6599e5a771b151398eb2"}, - {file = "rpds_py-0.22.3-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:62d9cfcf4948683a18a9aff0ab7e1474d407b7bab2ca03116109f8464698ab16"}, - {file = "rpds_py-0.22.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9253fc214112405f0afa7db88739294295f0e08466987f1d70e29930262b4c8f"}, - {file = "rpds_py-0.22.3-cp313-cp313-win32.whl", hash = "sha256:fb0ba113b4983beac1a2eb16faffd76cb41e176bf58c4afe3e14b9c681f702de"}, - {file = "rpds_py-0.22.3-cp313-cp313-win_amd64.whl", hash = "sha256:c58e2339def52ef6b71b8f36d13c3688ea23fa093353f3a4fee2556e62086ec9"}, - {file = "rpds_py-0.22.3-cp313-cp313t-macosx_10_12_x86_64.whl", hash = "sha256:f82a116a1d03628a8ace4859556fb39fd1424c933341a08ea3ed6de1edb0283b"}, - {file = "rpds_py-0.22.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:3dfcbc95bd7992b16f3f7ba05af8a64ca694331bd24f9157b49dadeeb287493b"}, - {file = "rpds_py-0.22.3-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:59259dc58e57b10e7e18ce02c311804c10c5a793e6568f8af4dead03264584d1"}, - {file = "rpds_py-0.22.3-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5725dd9cc02068996d4438d397e255dcb1df776b7ceea3b9cb972bdb11260a83"}, - {file = "rpds_py-0.22.3-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:99b37292234e61325e7a5bb9689e55e48c3f5f603af88b1642666277a81f1fbd"}, - {file = "rpds_py-0.22.3-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:27b1d3b3915a99208fee9ab092b8184c420f2905b7d7feb4aeb5e4a9c509b8a1"}, - {file = "rpds_py-0.22.3-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f612463ac081803f243ff13cccc648578e2279295048f2a8d5eb430af2bae6e3"}, - {file = "rpds_py-0.22.3-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f73d3fef726b3243a811121de45193c0ca75f6407fe66f3f4e183c983573e130"}, - {file = "rpds_py-0.22.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:3f21f0495edea7fdbaaa87e633a8689cd285f8f4af5c869f27bc8074638ad69c"}, - {file = "rpds_py-0.22.3-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:1e9663daaf7a63ceccbbb8e3808fe90415b0757e2abddbfc2e06c857bf8c5e2b"}, - {file = "rpds_py-0.22.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:a76e42402542b1fae59798fab64432b2d015ab9d0c8c47ba7addddbaf7952333"}, - {file = "rpds_py-0.22.3-cp313-cp313t-win32.whl", hash = "sha256:69803198097467ee7282750acb507fba35ca22cc3b85f16cf45fb01cb9097730"}, - {file = "rpds_py-0.22.3-cp313-cp313t-win_amd64.whl", hash = "sha256:f5cf2a0c2bdadf3791b5c205d55a37a54025c6e18a71c71f82bb536cf9a454bf"}, - {file = "rpds_py-0.22.3-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:378753b4a4de2a7b34063d6f95ae81bfa7b15f2c1a04a9518e8644e81807ebea"}, - {file = "rpds_py-0.22.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3445e07bf2e8ecfeef6ef67ac83de670358abf2996916039b16a218e3d95e97e"}, - {file = "rpds_py-0.22.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7b2513ba235829860b13faa931f3b6846548021846ac808455301c23a101689d"}, - {file = "rpds_py-0.22.3-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:eaf16ae9ae519a0e237a0f528fd9f0197b9bb70f40263ee57ae53c2b8d48aeb3"}, - {file = "rpds_py-0.22.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:583f6a1993ca3369e0f80ba99d796d8e6b1a3a2a442dd4e1a79e652116413091"}, - {file = "rpds_py-0.22.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4617e1915a539a0d9a9567795023de41a87106522ff83fbfaf1f6baf8e85437e"}, - {file = "rpds_py-0.22.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0c150c7a61ed4a4f4955a96626574e9baf1adf772c2fb61ef6a5027e52803543"}, - {file = "rpds_py-0.22.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2fa4331c200c2521512595253f5bb70858b90f750d39b8cbfd67465f8d1b596d"}, - {file = "rpds_py-0.22.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:214b7a953d73b5e87f0ebece4a32a5bd83c60a3ecc9d4ec8f1dca968a2d91e99"}, - {file = "rpds_py-0.22.3-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:f47ad3d5f3258bd7058d2d506852217865afefe6153a36eb4b6928758041d831"}, - {file = "rpds_py-0.22.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:f276b245347e6e36526cbd4a266a417796fc531ddf391e43574cf6466c492520"}, - {file = "rpds_py-0.22.3-cp39-cp39-win32.whl", hash = "sha256:bbb232860e3d03d544bc03ac57855cd82ddf19c7a07651a7c0fdb95e9efea8b9"}, - {file = "rpds_py-0.22.3-cp39-cp39-win_amd64.whl", hash = "sha256:cfbc454a2880389dbb9b5b398e50d439e2e58669160f27b60e5eca11f68ae17c"}, - {file = "rpds_py-0.22.3-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:d48424e39c2611ee1b84ad0f44fb3b2b53d473e65de061e3f460fc0be5f1939d"}, - {file = "rpds_py-0.22.3-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:24e8abb5878e250f2eb0d7859a8e561846f98910326d06c0d51381fed59357bd"}, - {file = "rpds_py-0.22.3-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4b232061ca880db21fa14defe219840ad9b74b6158adb52ddf0e87bead9e8493"}, - {file = "rpds_py-0.22.3-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ac0a03221cdb5058ce0167ecc92a8c89e8d0decdc9e99a2ec23380793c4dcb96"}, - {file = "rpds_py-0.22.3-pp310-pypy310_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:eb0c341fa71df5a4595f9501df4ac5abfb5a09580081dffbd1ddd4654e6e9123"}, - {file = "rpds_py-0.22.3-pp310-pypy310_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bf9db5488121b596dbfc6718c76092fda77b703c1f7533a226a5a9f65248f8ad"}, - {file = "rpds_py-0.22.3-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0b8db6b5b2d4491ad5b6bdc2bc7c017eec108acbf4e6785f42a9eb0ba234f4c9"}, - {file = "rpds_py-0.22.3-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b3d504047aba448d70cf6fa22e06cb09f7cbd761939fdd47604f5e007675c24e"}, - {file = "rpds_py-0.22.3-pp310-pypy310_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:e61b02c3f7a1e0b75e20c3978f7135fd13cb6cf551bf4a6d29b999a88830a338"}, - {file = "rpds_py-0.22.3-pp310-pypy310_pp73-musllinux_1_2_i686.whl", hash = "sha256:e35ba67d65d49080e8e5a1dd40101fccdd9798adb9b050ff670b7d74fa41c566"}, - {file = "rpds_py-0.22.3-pp310-pypy310_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:26fd7cac7dd51011a245f29a2cc6489c4608b5a8ce8d75661bb4a1066c52dfbe"}, - {file = "rpds_py-0.22.3-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:177c7c0fce2855833819c98e43c262007f42ce86651ffbb84f37883308cb0e7d"}, - {file = "rpds_py-0.22.3-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:bb47271f60660803ad11f4c61b42242b8c1312a31c98c578f79ef9387bbde21c"}, - {file = "rpds_py-0.22.3-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:70fb28128acbfd264eda9bf47015537ba3fe86e40d046eb2963d75024be4d055"}, - {file = "rpds_py-0.22.3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:44d61b4b7d0c2c9ac019c314e52d7cbda0ae31078aabd0f22e583af3e0d79723"}, - {file = "rpds_py-0.22.3-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5f0e260eaf54380380ac3808aa4ebe2d8ca28b9087cf411649f96bad6900c728"}, - {file = "rpds_py-0.22.3-pp39-pypy39_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b25bc607423935079e05619d7de556c91fb6adeae9d5f80868dde3468657994b"}, - {file = "rpds_py-0.22.3-pp39-pypy39_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fb6116dfb8d1925cbdb52595560584db42a7f664617a1f7d7f6e32f138cdf37d"}, - {file = "rpds_py-0.22.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a63cbdd98acef6570c62b92a1e43266f9e8b21e699c363c0fef13bd530799c11"}, - {file = "rpds_py-0.22.3-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2b8f60e1b739a74bab7e01fcbe3dddd4657ec685caa04681df9d562ef15b625f"}, - {file = "rpds_py-0.22.3-pp39-pypy39_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:2e8b55d8517a2fda8d95cb45d62a5a8bbf9dd0ad39c5b25c8833efea07b880ca"}, - {file = "rpds_py-0.22.3-pp39-pypy39_pp73-musllinux_1_2_i686.whl", hash = "sha256:2de29005e11637e7a2361fa151f780ff8eb2543a0da1413bb951e9f14b699ef3"}, - {file = "rpds_py-0.22.3-pp39-pypy39_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:666ecce376999bf619756a24ce15bb14c5bfaf04bf00abc7e663ce17c3f34fe7"}, - {file = "rpds_py-0.22.3-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:5246b14ca64a8675e0a7161f7af68fe3e910e6b90542b4bfb5439ba752191df6"}, - {file = "rpds_py-0.22.3.tar.gz", hash = "sha256:e32fee8ab45d3c2db6da19a5323bc3362237c8b653c70194414b892fd06a080d"}, + {file = "rpds_py-0.24.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:006f4342fe729a368c6df36578d7a348c7c716be1da0a1a0f86e3021f8e98724"}, + {file = "rpds_py-0.24.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2d53747da70a4e4b17f559569d5f9506420966083a31c5fbd84e764461c4444b"}, + {file = "rpds_py-0.24.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e8acd55bd5b071156bae57b555f5d33697998752673b9de554dd82f5b5352727"}, + {file = "rpds_py-0.24.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7e80d375134ddb04231a53800503752093dbb65dad8dabacce2c84cccc78e964"}, + {file = "rpds_py-0.24.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:60748789e028d2a46fc1c70750454f83c6bdd0d05db50f5ae83e2db500b34da5"}, + {file = "rpds_py-0.24.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6e1daf5bf6c2be39654beae83ee6b9a12347cb5aced9a29eecf12a2d25fff664"}, + {file = "rpds_py-0.24.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1b221c2457d92a1fb3c97bee9095c874144d196f47c038462ae6e4a14436f7bc"}, + {file = "rpds_py-0.24.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:66420986c9afff67ef0c5d1e4cdc2d0e5262f53ad11e4f90e5e22448df485bf0"}, + {file = "rpds_py-0.24.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:43dba99f00f1d37b2a0265a259592d05fcc8e7c19d140fe51c6e6f16faabeb1f"}, + {file = "rpds_py-0.24.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:a88c0d17d039333a41d9bf4616bd062f0bd7aa0edeb6cafe00a2fc2a804e944f"}, + {file = "rpds_py-0.24.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:cc31e13ce212e14a539d430428cd365e74f8b2d534f8bc22dd4c9c55b277b875"}, + {file = "rpds_py-0.24.0-cp310-cp310-win32.whl", hash = "sha256:fc2c1e1b00f88317d9de6b2c2b39b012ebbfe35fe5e7bef980fd2a91f6100a07"}, + {file = "rpds_py-0.24.0-cp310-cp310-win_amd64.whl", hash = "sha256:c0145295ca415668420ad142ee42189f78d27af806fcf1f32a18e51d47dd2052"}, + {file = "rpds_py-0.24.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:2d3ee4615df36ab8eb16c2507b11e764dcc11fd350bbf4da16d09cda11fcedef"}, + {file = "rpds_py-0.24.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e13ae74a8a3a0c2f22f450f773e35f893484fcfacb00bb4344a7e0f4f48e1f97"}, + {file = "rpds_py-0.24.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cf86f72d705fc2ef776bb7dd9e5fbba79d7e1f3e258bf9377f8204ad0fc1c51e"}, + {file = "rpds_py-0.24.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c43583ea8517ed2e780a345dd9960896afc1327e8cf3ac8239c167530397440d"}, + {file = "rpds_py-0.24.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4cd031e63bc5f05bdcda120646a0d32f6d729486d0067f09d79c8db5368f4586"}, + {file = "rpds_py-0.24.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:34d90ad8c045df9a4259c47d2e16a3f21fdb396665c94520dbfe8766e62187a4"}, + {file = "rpds_py-0.24.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e838bf2bb0b91ee67bf2b889a1a841e5ecac06dd7a2b1ef4e6151e2ce155c7ae"}, + {file = "rpds_py-0.24.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:04ecf5c1ff4d589987b4d9882872f80ba13da7d42427234fce8f22efb43133bc"}, + {file = "rpds_py-0.24.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:630d3d8ea77eabd6cbcd2ea712e1c5cecb5b558d39547ac988351195db433f6c"}, + {file = "rpds_py-0.24.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:ebcb786b9ff30b994d5969213a8430cbb984cdd7ea9fd6df06663194bd3c450c"}, + {file = "rpds_py-0.24.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:174e46569968ddbbeb8a806d9922f17cd2b524aa753b468f35b97ff9c19cb718"}, + {file = "rpds_py-0.24.0-cp311-cp311-win32.whl", hash = "sha256:5ef877fa3bbfb40b388a5ae1cb00636a624690dcb9a29a65267054c9ea86d88a"}, + {file = "rpds_py-0.24.0-cp311-cp311-win_amd64.whl", hash = "sha256:e274f62cbd274359eff63e5c7e7274c913e8e09620f6a57aae66744b3df046d6"}, + {file = "rpds_py-0.24.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:d8551e733626afec514b5d15befabea0dd70a343a9f23322860c4f16a9430205"}, + {file = "rpds_py-0.24.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0e374c0ce0ca82e5b67cd61fb964077d40ec177dd2c4eda67dba130de09085c7"}, + {file = "rpds_py-0.24.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d69d003296df4840bd445a5d15fa5b6ff6ac40496f956a221c4d1f6f7b4bc4d9"}, + {file = "rpds_py-0.24.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8212ff58ac6dfde49946bea57474a386cca3f7706fc72c25b772b9ca4af6b79e"}, + {file = "rpds_py-0.24.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:528927e63a70b4d5f3f5ccc1fa988a35456eb5d15f804d276709c33fc2f19bda"}, + {file = "rpds_py-0.24.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a824d2c7a703ba6daaca848f9c3d5cb93af0505be505de70e7e66829affd676e"}, + {file = "rpds_py-0.24.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:44d51febb7a114293ffd56c6cf4736cb31cd68c0fddd6aa303ed09ea5a48e029"}, + {file = "rpds_py-0.24.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:3fab5f4a2c64a8fb64fc13b3d139848817a64d467dd6ed60dcdd6b479e7febc9"}, + {file = "rpds_py-0.24.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:9be4f99bee42ac107870c61dfdb294d912bf81c3c6d45538aad7aecab468b6b7"}, + {file = "rpds_py-0.24.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:564c96b6076a98215af52f55efa90d8419cc2ef45d99e314fddefe816bc24f91"}, + {file = "rpds_py-0.24.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:75a810b7664c17f24bf2ffd7f92416c00ec84b49bb68e6a0d93e542406336b56"}, + {file = "rpds_py-0.24.0-cp312-cp312-win32.whl", hash = "sha256:f6016bd950be4dcd047b7475fdf55fb1e1f59fc7403f387be0e8123e4a576d30"}, + {file = "rpds_py-0.24.0-cp312-cp312-win_amd64.whl", hash = "sha256:998c01b8e71cf051c28f5d6f1187abbdf5cf45fc0efce5da6c06447cba997034"}, + {file = "rpds_py-0.24.0-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:3d2d8e4508e15fc05b31285c4b00ddf2e0eb94259c2dc896771966a163122a0c"}, + {file = "rpds_py-0.24.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:0f00c16e089282ad68a3820fd0c831c35d3194b7cdc31d6e469511d9bffc535c"}, + {file = "rpds_py-0.24.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:951cc481c0c395c4a08639a469d53b7d4afa252529a085418b82a6b43c45c240"}, + {file = "rpds_py-0.24.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c9ca89938dff18828a328af41ffdf3902405a19f4131c88e22e776a8e228c5a8"}, + {file = "rpds_py-0.24.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ed0ef550042a8dbcd657dfb284a8ee00f0ba269d3f2286b0493b15a5694f9fe8"}, + {file = "rpds_py-0.24.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2b2356688e5d958c4d5cb964af865bea84db29971d3e563fb78e46e20fe1848b"}, + {file = "rpds_py-0.24.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:78884d155fd15d9f64f5d6124b486f3d3f7fd7cd71a78e9670a0f6f6ca06fb2d"}, + {file = "rpds_py-0.24.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6a4a535013aeeef13c5532f802708cecae8d66c282babb5cd916379b72110cf7"}, + {file = "rpds_py-0.24.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:84e0566f15cf4d769dade9b366b7b87c959be472c92dffb70462dd0844d7cbad"}, + {file = "rpds_py-0.24.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:823e74ab6fbaa028ec89615ff6acb409e90ff45580c45920d4dfdddb069f2120"}, + {file = "rpds_py-0.24.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:c61a2cb0085c8783906b2f8b1f16a7e65777823c7f4d0a6aaffe26dc0d358dd9"}, + {file = "rpds_py-0.24.0-cp313-cp313-win32.whl", hash = "sha256:60d9b630c8025b9458a9d114e3af579a2c54bd32df601c4581bd054e85258143"}, + {file = "rpds_py-0.24.0-cp313-cp313-win_amd64.whl", hash = "sha256:6eea559077d29486c68218178ea946263b87f1c41ae7f996b1f30a983c476a5a"}, + {file = "rpds_py-0.24.0-cp313-cp313t-macosx_10_12_x86_64.whl", hash = "sha256:d09dc82af2d3c17e7dd17120b202a79b578d79f2b5424bda209d9966efeed114"}, + {file = "rpds_py-0.24.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:5fc13b44de6419d1e7a7e592a4885b323fbc2f46e1f22151e3a8ed3b8b920405"}, + {file = "rpds_py-0.24.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c347a20d79cedc0a7bd51c4d4b7dbc613ca4e65a756b5c3e57ec84bd43505b47"}, + {file = "rpds_py-0.24.0-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:20f2712bd1cc26a3cc16c5a1bfee9ed1abc33d4cdf1aabd297fe0eb724df4272"}, + {file = "rpds_py-0.24.0-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:aad911555286884be1e427ef0dc0ba3929e6821cbeca2194b13dc415a462c7fd"}, + {file = "rpds_py-0.24.0-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0aeb3329c1721c43c58cae274d7d2ca85c1690d89485d9c63a006cb79a85771a"}, + {file = "rpds_py-0.24.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2a0f156e9509cee987283abd2296ec816225145a13ed0391df8f71bf1d789e2d"}, + {file = "rpds_py-0.24.0-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:aa6800adc8204ce898c8a424303969b7aa6a5e4ad2789c13f8648739830323b7"}, + {file = "rpds_py-0.24.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:a18fc371e900a21d7392517c6f60fe859e802547309e94313cd8181ad9db004d"}, + {file = "rpds_py-0.24.0-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:9168764133fd919f8dcca2ead66de0105f4ef5659cbb4fa044f7014bed9a1797"}, + {file = "rpds_py-0.24.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:5f6e3cec44ba05ee5cbdebe92d052f69b63ae792e7d05f1020ac5e964394080c"}, + {file = "rpds_py-0.24.0-cp313-cp313t-win32.whl", hash = "sha256:8ebc7e65ca4b111d928b669713865f021b7773350eeac4a31d3e70144297baba"}, + {file = "rpds_py-0.24.0-cp313-cp313t-win_amd64.whl", hash = "sha256:675269d407a257b8c00a6b58205b72eec8231656506c56fd429d924ca00bb350"}, + {file = "rpds_py-0.24.0-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:a36b452abbf29f68527cf52e181fced56685731c86b52e852053e38d8b60bc8d"}, + {file = "rpds_py-0.24.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:8b3b397eefecec8e8e39fa65c630ef70a24b09141a6f9fc17b3c3a50bed6b50e"}, + {file = "rpds_py-0.24.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cdabcd3beb2a6dca7027007473d8ef1c3b053347c76f685f5f060a00327b8b65"}, + {file = "rpds_py-0.24.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5db385bacd0c43f24be92b60c857cf760b7f10d8234f4bd4be67b5b20a7c0b6b"}, + {file = "rpds_py-0.24.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8097b3422d020ff1c44effc40ae58e67d93e60d540a65649d2cdaf9466030791"}, + {file = "rpds_py-0.24.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:493fe54318bed7d124ce272fc36adbf59d46729659b2c792e87c3b95649cdee9"}, + {file = "rpds_py-0.24.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8aa362811ccdc1f8dadcc916c6d47e554169ab79559319ae9fae7d7752d0d60c"}, + {file = "rpds_py-0.24.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d8f9a6e7fd5434817526815f09ea27f2746c4a51ee11bb3439065f5fc754db58"}, + {file = "rpds_py-0.24.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:8205ee14463248d3349131bb8099efe15cd3ce83b8ef3ace63c7e976998e7124"}, + {file = "rpds_py-0.24.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:921ae54f9ecba3b6325df425cf72c074cd469dea843fb5743a26ca7fb2ccb149"}, + {file = "rpds_py-0.24.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:32bab0a56eac685828e00cc2f5d1200c548f8bc11f2e44abf311d6b548ce2e45"}, + {file = "rpds_py-0.24.0-cp39-cp39-win32.whl", hash = "sha256:f5c0ed12926dec1dfe7d645333ea59cf93f4d07750986a586f511c0bc61fe103"}, + {file = "rpds_py-0.24.0-cp39-cp39-win_amd64.whl", hash = "sha256:afc6e35f344490faa8276b5f2f7cbf71f88bc2cda4328e00553bd451728c571f"}, + {file = "rpds_py-0.24.0-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:619ca56a5468f933d940e1bf431c6f4e13bef8e688698b067ae68eb4f9b30e3a"}, + {file = "rpds_py-0.24.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:4b28e5122829181de1898c2c97f81c0b3246d49f585f22743a1246420bb8d399"}, + {file = "rpds_py-0.24.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e8e5ab32cf9eb3647450bc74eb201b27c185d3857276162c101c0f8c6374e098"}, + {file = "rpds_py-0.24.0-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:208b3a70a98cf3710e97cabdc308a51cd4f28aa6e7bb11de3d56cd8b74bab98d"}, + {file = "rpds_py-0.24.0-pp310-pypy310_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bbc4362e06f950c62cad3d4abf1191021b2ffaf0b31ac230fbf0526453eee75e"}, + {file = "rpds_py-0.24.0-pp310-pypy310_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ebea2821cdb5f9fef44933617be76185b80150632736f3d76e54829ab4a3b4d1"}, + {file = "rpds_py-0.24.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b9a4df06c35465ef4d81799999bba810c68d29972bf1c31db61bfdb81dd9d5bb"}, + {file = "rpds_py-0.24.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d3aa13bdf38630da298f2e0d77aca967b200b8cc1473ea05248f6c5e9c9bdb44"}, + {file = "rpds_py-0.24.0-pp310-pypy310_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:041f00419e1da7a03c46042453598479f45be3d787eb837af382bfc169c0db33"}, + {file = "rpds_py-0.24.0-pp310-pypy310_pp73-musllinux_1_2_i686.whl", hash = "sha256:d8754d872a5dfc3c5bf9c0e059e8107451364a30d9fd50f1f1a85c4fb9481164"}, + {file = "rpds_py-0.24.0-pp310-pypy310_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:896c41007931217a343eff197c34513c154267636c8056fb409eafd494c3dcdc"}, + {file = "rpds_py-0.24.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:92558d37d872e808944c3c96d0423b8604879a3d1c86fdad508d7ed91ea547d5"}, + {file = "rpds_py-0.24.0-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:f9e0057a509e096e47c87f753136c9b10d7a91842d8042c2ee6866899a717c0d"}, + {file = "rpds_py-0.24.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:d6e109a454412ab82979c5b1b3aee0604eca4bbf9a02693bb9df027af2bfa91a"}, + {file = "rpds_py-0.24.0-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fc1c892b1ec1f8cbd5da8de287577b455e388d9c328ad592eabbdcb6fc93bee5"}, + {file = "rpds_py-0.24.0-pp311-pypy311_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:9c39438c55983d48f4bb3487734d040e22dad200dab22c41e331cee145e7a50d"}, + {file = "rpds_py-0.24.0-pp311-pypy311_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9d7e8ce990ae17dda686f7e82fd41a055c668e13ddcf058e7fb5e9da20b57793"}, + {file = "rpds_py-0.24.0-pp311-pypy311_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9ea7f4174d2e4194289cb0c4e172d83e79a6404297ff95f2875cf9ac9bced8ba"}, + {file = "rpds_py-0.24.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bb2954155bb8f63bb19d56d80e5e5320b61d71084617ed89efedb861a684baea"}, + {file = "rpds_py-0.24.0-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:04f2b712a2206e13800a8136b07aaedc23af3facab84918e7aa89e4be0260032"}, + {file = "rpds_py-0.24.0-pp311-pypy311_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:eda5c1e2a715a4cbbca2d6d304988460942551e4e5e3b7457b50943cd741626d"}, + {file = "rpds_py-0.24.0-pp311-pypy311_pp73-musllinux_1_2_i686.whl", hash = "sha256:9abc80fe8c1f87218db116016de575a7998ab1629078c90840e8d11ab423ee25"}, + {file = "rpds_py-0.24.0-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:6a727fd083009bc83eb83d6950f0c32b3c94c8b80a9b667c87f4bd1274ca30ba"}, + {file = "rpds_py-0.24.0-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:e0f3ef95795efcd3b2ec3fe0a5bcfb5dadf5e3996ea2117427e524d4fbf309c6"}, + {file = "rpds_py-0.24.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:2c13777ecdbbba2077670285dd1fe50828c8742f6a4119dbef6f83ea13ad10fb"}, + {file = "rpds_py-0.24.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:79e8d804c2ccd618417e96720ad5cd076a86fa3f8cb310ea386a3e6229bae7d1"}, + {file = "rpds_py-0.24.0-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:fd822f019ccccd75c832deb7aa040bb02d70a92eb15a2f16c7987b7ad4ee8d83"}, + {file = "rpds_py-0.24.0-pp39-pypy39_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0047638c3aa0dbcd0ab99ed1e549bbf0e142c9ecc173b6492868432d8989a046"}, + {file = "rpds_py-0.24.0-pp39-pypy39_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a5b66d1b201cc71bc3081bc2f1fc36b0c1f268b773e03bbc39066651b9e18391"}, + {file = "rpds_py-0.24.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dbcbb6db5582ea33ce46a5d20a5793134b5365110d84df4e30b9d37c6fd40ad3"}, + {file = "rpds_py-0.24.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:63981feca3f110ed132fd217bf7768ee8ed738a55549883628ee3da75bb9cb78"}, + {file = "rpds_py-0.24.0-pp39-pypy39_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:3a55fc10fdcbf1a4bd3c018eea422c52cf08700cf99c28b5cb10fe97ab77a0d3"}, + {file = "rpds_py-0.24.0-pp39-pypy39_pp73-musllinux_1_2_i686.whl", hash = "sha256:c30ff468163a48535ee7e9bf21bd14c7a81147c0e58a36c1078289a8ca7af0bd"}, + {file = "rpds_py-0.24.0-pp39-pypy39_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:369d9c6d4c714e36d4a03957b4783217a3ccd1e222cdd67d464a3a479fc17796"}, + {file = "rpds_py-0.24.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:24795c099453e3721fda5d8ddd45f5dfcc8e5a547ce7b8e9da06fecc3832e26f"}, + {file = "rpds_py-0.24.0.tar.gz", hash = "sha256:772cc1b2cd963e7e17e6cc55fe0371fb9c704d63e44cacec7b9b7f523b78919e"}, ] [[package]] name = "rsa" -version = "4.9" +version = "4.9.1" description = "Pure-Python RSA implementation" optional = false -python-versions = ">=3.6,<4" +python-versions = "<4,>=3.6" groups = ["main"] files = [ - {file = "rsa-4.9-py3-none-any.whl", hash = "sha256:90260d9058e514786967344d0ef75fa8727eed8a7d2e43ce9f4bcf1b536174f7"}, - {file = "rsa-4.9.tar.gz", hash = "sha256:e38464a49c6c85d7f1351b0126661487a7e0a14a50f1675ec50eb34d4f20ef21"}, + {file = "rsa-4.9.1-py3-none-any.whl", hash = "sha256:68635866661c6836b8d39430f97a996acbd61bfa49406748ea243539fe239762"}, + {file = "rsa-4.9.1.tar.gz", hash = "sha256:e7bdbfdb5497da4c07dfd35530e1a902659db6ff241e39d9953cad06ebd0ae75"}, ] [package.dependencies] @@ -4754,14 +4789,14 @@ files = [ [[package]] name = "sentry-sdk" -version = "2.20.0" +version = "2.26.1" description = "Python client for Sentry (https://sentry.io)" optional = false python-versions = ">=3.6" groups = ["main"] files = [ - {file = "sentry_sdk-2.20.0-py2.py3-none-any.whl", hash = "sha256:c359a1edf950eb5e80cffd7d9111f3dbeef57994cb4415df37d39fda2cf22364"}, - {file = "sentry_sdk-2.20.0.tar.gz", hash = "sha256:afa82713a92facf847df3c6f63cec71eb488d826a50965def3d7722aa6f0fdab"}, + {file = "sentry_sdk-2.26.1-py2.py3-none-any.whl", hash = "sha256:e99390e3f217d13ddcbaeaed08789f1ca614d663b345b9da42e35ad6b60d696a"}, + {file = "sentry_sdk-2.26.1.tar.gz", hash = "sha256:759e019c41551a21519a95e6cef6d91fb4af1054761923dadaee2e6eca9c02c7"}, ] [package.dependencies] @@ -4806,24 +4841,25 @@ sanic = ["sanic (>=0.8)"] sqlalchemy = ["sqlalchemy (>=1.2)"] starlette = ["starlette (>=0.19.1)"] starlite = ["starlite (>=1.48)"] +statsig = ["statsig (>=0.55.3)"] tornado = ["tornado (>=6)"] unleash = ["UnleashClient (>=6.0.1)"] [[package]] name = "setuptools" -version = "75.8.0" +version = "79.0.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" optional = false python-versions = ">=3.9" groups = ["main", "dev"] files = [ - {file = "setuptools-75.8.0-py3-none-any.whl", hash = "sha256:e3982f444617239225d675215d51f6ba05f845d4eec313da4418fdbb56fb27e3"}, - {file = "setuptools-75.8.0.tar.gz", hash = "sha256:c5afc8f407c626b8313a86e10311dd3f661c6cd9c09d4bf8c15c0e11f9f2b0e6"}, + {file = "setuptools-79.0.0-py3-none-any.whl", hash = "sha256:b9ab3a104bedb292323f53797b00864e10e434a3ab3906813a7169e4745b912a"}, + {file = "setuptools-79.0.0.tar.gz", hash = "sha256:9828422e7541213b0aacb6e10bbf9dd8febeaa45a48570e09b6d100e063fc9f9"}, ] [package.extras] check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1) ; sys_platform != \"cygwin\"", "ruff (>=0.8.0) ; sys_platform != \"cygwin\""] -core = ["importlib_metadata (>=6) ; python_version < \"3.10\"", "jaraco.collections", "jaraco.functools (>=4)", "jaraco.text (>=3.7)", "more_itertools", "more_itertools (>=8.8)", "packaging", "packaging (>=24.2)", "platformdirs (>=4.2.2)", "tomli (>=2.0.1) ; python_version < \"3.11\"", "wheel (>=0.43.0)"] +core = ["importlib_metadata (>=6) ; python_version < \"3.10\"", "jaraco.functools (>=4)", "jaraco.text (>=3.7)", "more_itertools", "more_itertools (>=8.8)", "packaging (>=24.2)", "platformdirs (>=4.2.2)", "tomli (>=2.0.1) ; python_version < \"3.11\"", "wheel (>=0.43.0)"] cover = ["pytest-cov"] doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "pyproject-hooks (!=1.1)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier", "towncrier (<24.7)"] enabler = ["pytest-enabler (>=2.2)"] @@ -4930,14 +4966,14 @@ files = [ [[package]] name = "stevedore" -version = "5.4.0" +version = "5.4.1" description = "Manage dynamic plugins for Python applications" optional = false python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "stevedore-5.4.0-py3-none-any.whl", hash = "sha256:b0be3c4748b3ea7b854b265dcb4caa891015e442416422be16f8b31756107857"}, - {file = "stevedore-5.4.0.tar.gz", hash = "sha256:79e92235ecb828fe952b6b8b0c6c87863248631922c8e8e0fa5b17b232c4514d"}, + {file = "stevedore-5.4.1-py3-none-any.whl", hash = "sha256:d10a31c7b86cba16c1f6e8d15416955fc797052351a56af15e608ad20811fcfe"}, + {file = "stevedore-5.4.1.tar.gz", hash = "sha256:3135b5ae50fe12816ef291baff420acb727fcd356106e3e9cbfa9e5985cd6f4b"}, ] [package.dependencies] @@ -4960,14 +4996,14 @@ widechars = ["wcwidth"] [[package]] name = "tenacity" -version = "9.0.0" +version = "9.1.2" description = "Retry code until it succeeds" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["main"] files = [ - {file = "tenacity-9.0.0-py3-none-any.whl", hash = "sha256:93de0c98785b27fcf659856aa9f54bfbd399e29969b0621bc7f762bd441b4539"}, - {file = "tenacity-9.0.0.tar.gz", hash = "sha256:807f37ca97d62aa361264d497b0e31e92b8027044942bfa756160d908320d73b"}, + {file = "tenacity-9.1.2-py3-none-any.whl", hash = "sha256:f77bf36710d8b73a50b2dd155c97b870017ad21afe6ab300326b0371b3b05138"}, + {file = "tenacity-9.1.2.tar.gz", hash = "sha256:1169d376c297e7de388d18b4481760d478b0e99a777cad3a9c86e556f4b697cb"}, ] [package.extras] @@ -4976,14 +5012,14 @@ test = ["pytest", "tornado (>=4.5)", "typeguard"] [[package]] name = "tldextract" -version = "5.1.3" +version = "5.3.0" description = "Accurately separates a URL's subdomain, domain, and public suffix, using the Public Suffix List (PSL). By default, this includes the public ICANN TLDs and their exceptions. You can optionally support the Public Suffix List's private domains as well." optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "tldextract-5.1.3-py3-none-any.whl", hash = "sha256:78de310cc2ca018692de5ddf320f9d6bd7c5cf857d0fd4f2175f0cdf4440ea75"}, - {file = "tldextract-5.1.3.tar.gz", hash = "sha256:d43c7284c23f5dc8a42fd0fee2abede2ff74cc622674e4cb07f514ab3330c338"}, + {file = "tldextract-5.3.0-py3-none-any.whl", hash = "sha256:f70f31d10b55c83993f55e91ecb7c5d84532a8972f22ec578ecfbe5ea2292db2"}, + {file = "tldextract-5.3.0.tar.gz", hash = "sha256:b3d2b70a1594a0ecfa6967d57251527d58e00bb5a91a74387baa0d87a0678609"}, ] [package.dependencies] @@ -5032,14 +5068,14 @@ telegram = ["requests"] [[package]] name = "typer" -version = "0.15.1" +version = "0.15.2" description = "Typer, build great CLIs. Easy to code. Based on Python type hints." optional = false python-versions = ">=3.7" groups = ["dev"] files = [ - {file = "typer-0.15.1-py3-none-any.whl", hash = "sha256:7994fb7b8155b64d3402518560648446072864beefd44aa2dc36972a5972e847"}, - {file = "typer-0.15.1.tar.gz", hash = "sha256:a0588c0a7fa68a1978a069818657778f86abe6ff5ea6abf472f940a08bfe4f0a"}, + {file = "typer-0.15.2-py3-none-any.whl", hash = "sha256:46a499c6107d645a9c13f7ee46c5d5096cae6f5fc57dd11eccbbb9ae3e44ddfc"}, + {file = "typer-0.15.2.tar.gz", hash = "sha256:ab2fab47533a813c49fe1f16b1a370fd5819099c00b119e0633df65f22144ba5"}, ] [package.dependencies] @@ -5050,39 +5086,39 @@ typing-extensions = ">=3.7.4.3" [[package]] name = "typing-extensions" -version = "4.12.2" +version = "4.13.2" description = "Backported and Experimental Type Hints for Python 3.8+" optional = false python-versions = ">=3.8" groups = ["main", "dev"] files = [ - {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, - {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, + {file = "typing_extensions-4.13.2-py3-none-any.whl", hash = "sha256:a439e7c04b49fec3e5d3e2beaa21755cadbbdc391694e28ccdd36ca4a1408f8c"}, + {file = "typing_extensions-4.13.2.tar.gz", hash = "sha256:e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef"}, ] [[package]] name = "tzdata" -version = "2025.1" +version = "2025.2" description = "Provider of IANA time zone data" optional = false python-versions = ">=2" groups = ["main", "dev"] files = [ - {file = "tzdata-2025.1-py2.py3-none-any.whl", hash = "sha256:7e127113816800496f027041c570f50bcd464a020098a3b6b199517772303639"}, - {file = "tzdata-2025.1.tar.gz", hash = "sha256:24894909e88cdb28bd1636c6887801df64cb485bd593f2fd83ef29075a81d694"}, + {file = "tzdata-2025.2-py2.py3-none-any.whl", hash = "sha256:1a403fada01ff9221ca8044d701868fa132215d84beb92242d9acd2147f667a8"}, + {file = "tzdata-2025.2.tar.gz", hash = "sha256:b60a638fcc0daffadf82fe0f57e53d06bdec2f36c4df66280ae79bce6bd6f2b9"}, ] markers = {dev = "sys_platform == \"win32\""} [[package]] name = "tzlocal" -version = "5.2" +version = "5.3.1" description = "tzinfo object for the local timezone" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["main"] files = [ - {file = "tzlocal-5.2-py3-none-any.whl", hash = "sha256:49816ef2fe65ea8ac19d19aa7a1ae0551c834303d5014c6d5a62e4cbda8047b8"}, - {file = "tzlocal-5.2.tar.gz", hash = "sha256:8d399205578f1a9342816409cc1e46a93ebd5755e39ea2d85334bea911bf0e6e"}, + {file = "tzlocal-5.3.1-py3-none-any.whl", hash = "sha256:eb1a66c3ef5847adf7a834f1be0800581b683b5608e74f86ecbcef8ab91bb85d"}, + {file = "tzlocal-5.3.1.tar.gz", hash = "sha256:cceffc7edecefea1f595541dbd6e990cb1ea3d19bf01b2809f362a03dd7921fd"}, ] [package.dependencies] @@ -5105,14 +5141,14 @@ files = [ [[package]] name = "urllib3" -version = "2.3.0" +version = "2.4.0" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false python-versions = ">=3.9" groups = ["main", "dev"] files = [ - {file = "urllib3-2.3.0-py3-none-any.whl", hash = "sha256:1cee9ad369867bfdbbb48b7dd50374c0967a0bb7710050facf0dd6911440e3df"}, - {file = "urllib3-2.3.0.tar.gz", hash = "sha256:f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d"}, + {file = "urllib3-2.4.0-py3-none-any.whl", hash = "sha256:4e16665048960a0900c702d4a66415956a584919c03361cac9f1df5c5dd7e813"}, + {file = "urllib3-2.4.0.tar.gz", hash = "sha256:414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466"}, ] [package.extras] @@ -5295,112 +5331,134 @@ files = [ [[package]] name = "xlsxwriter" -version = "3.2.2" +version = "3.2.3" description = "A Python module for creating Excel XLSX files." optional = false python-versions = ">=3.6" groups = ["main"] files = [ - {file = "XlsxWriter-3.2.2-py3-none-any.whl", hash = "sha256:272ce861e7fa5e82a4a6ebc24511f2cb952fde3461f6c6e1a1e81d3272db1471"}, - {file = "xlsxwriter-3.2.2.tar.gz", hash = "sha256:befc7f92578a85fed261639fb6cde1fd51b79c5e854040847dde59d4317077dc"}, + {file = "XlsxWriter-3.2.3-py3-none-any.whl", hash = "sha256:593f8296e8a91790c6d0378ab08b064f34a642b3feb787cf6738236bd0a4860d"}, + {file = "xlsxwriter-3.2.3.tar.gz", hash = "sha256:ad6fd41bdcf1b885876b1f6b7087560aecc9ae5a9cc2ba97dcac7ab2e210d3d5"}, ] [[package]] name = "yarl" -version = "1.18.3" +version = "1.20.0" description = "Yet another URL library" optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "yarl-1.18.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7df647e8edd71f000a5208fe6ff8c382a1de8edfbccdbbfe649d263de07d8c34"}, - {file = "yarl-1.18.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c69697d3adff5aa4f874b19c0e4ed65180ceed6318ec856ebc423aa5850d84f7"}, - {file = "yarl-1.18.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:602d98f2c2d929f8e697ed274fbadc09902c4025c5a9963bf4e9edfc3ab6f7ed"}, - {file = "yarl-1.18.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c654d5207c78e0bd6d749f6dae1dcbbfde3403ad3a4b11f3c5544d9906969dde"}, - {file = "yarl-1.18.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5094d9206c64181d0f6e76ebd8fb2f8fe274950a63890ee9e0ebfd58bf9d787b"}, - {file = "yarl-1.18.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:35098b24e0327fc4ebdc8ffe336cee0a87a700c24ffed13161af80124b7dc8e5"}, - {file = "yarl-1.18.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3236da9272872443f81fedc389bace88408f64f89f75d1bdb2256069a8730ccc"}, - {file = "yarl-1.18.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e2c08cc9b16f4f4bc522771d96734c7901e7ebef70c6c5c35dd0f10845270bcd"}, - {file = "yarl-1.18.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:80316a8bd5109320d38eef8833ccf5f89608c9107d02d2a7f985f98ed6876990"}, - {file = "yarl-1.18.3-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:c1e1cc06da1491e6734f0ea1e6294ce00792193c463350626571c287c9a704db"}, - {file = "yarl-1.18.3-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:fea09ca13323376a2fdfb353a5fa2e59f90cd18d7ca4eaa1fd31f0a8b4f91e62"}, - {file = "yarl-1.18.3-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:e3b9fd71836999aad54084906f8663dffcd2a7fb5cdafd6c37713b2e72be1760"}, - {file = "yarl-1.18.3-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:757e81cae69244257d125ff31663249b3013b5dc0a8520d73694aed497fb195b"}, - {file = "yarl-1.18.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b1771de9944d875f1b98a745bc547e684b863abf8f8287da8466cf470ef52690"}, - {file = "yarl-1.18.3-cp310-cp310-win32.whl", hash = "sha256:8874027a53e3aea659a6d62751800cf6e63314c160fd607489ba5c2edd753cf6"}, - {file = "yarl-1.18.3-cp310-cp310-win_amd64.whl", hash = "sha256:93b2e109287f93db79210f86deb6b9bbb81ac32fc97236b16f7433db7fc437d8"}, - {file = "yarl-1.18.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:8503ad47387b8ebd39cbbbdf0bf113e17330ffd339ba1144074da24c545f0069"}, - {file = "yarl-1.18.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:02ddb6756f8f4517a2d5e99d8b2f272488e18dd0bfbc802f31c16c6c20f22193"}, - {file = "yarl-1.18.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:67a283dd2882ac98cc6318384f565bffc751ab564605959df4752d42483ad889"}, - {file = "yarl-1.18.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d980e0325b6eddc81331d3f4551e2a333999fb176fd153e075c6d1c2530aa8a8"}, - {file = "yarl-1.18.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b643562c12680b01e17239be267bc306bbc6aac1f34f6444d1bded0c5ce438ca"}, - {file = "yarl-1.18.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c017a3b6df3a1bd45b9fa49a0f54005e53fbcad16633870104b66fa1a30a29d8"}, - {file = "yarl-1.18.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:75674776d96d7b851b6498f17824ba17849d790a44d282929c42dbb77d4f17ae"}, - {file = "yarl-1.18.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ccaa3a4b521b780a7e771cc336a2dba389a0861592bbce09a476190bb0c8b4b3"}, - {file = "yarl-1.18.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:2d06d3005e668744e11ed80812e61efd77d70bb7f03e33c1598c301eea20efbb"}, - {file = "yarl-1.18.3-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:9d41beda9dc97ca9ab0b9888cb71f7539124bc05df02c0cff6e5acc5a19dcc6e"}, - {file = "yarl-1.18.3-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:ba23302c0c61a9999784e73809427c9dbedd79f66a13d84ad1b1943802eaaf59"}, - {file = "yarl-1.18.3-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:6748dbf9bfa5ba1afcc7556b71cda0d7ce5f24768043a02a58846e4a443d808d"}, - {file = "yarl-1.18.3-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:0b0cad37311123211dc91eadcb322ef4d4a66008d3e1bdc404808992260e1a0e"}, - {file = "yarl-1.18.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:0fb2171a4486bb075316ee754c6d8382ea6eb8b399d4ec62fde2b591f879778a"}, - {file = "yarl-1.18.3-cp311-cp311-win32.whl", hash = "sha256:61b1a825a13bef4a5f10b1885245377d3cd0bf87cba068e1d9a88c2ae36880e1"}, - {file = "yarl-1.18.3-cp311-cp311-win_amd64.whl", hash = "sha256:b9d60031cf568c627d028239693fd718025719c02c9f55df0a53e587aab951b5"}, - {file = "yarl-1.18.3-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:1dd4bdd05407ced96fed3d7f25dbbf88d2ffb045a0db60dbc247f5b3c5c25d50"}, - {file = "yarl-1.18.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7c33dd1931a95e5d9a772d0ac5e44cac8957eaf58e3c8da8c1414de7dd27c576"}, - {file = "yarl-1.18.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:25b411eddcfd56a2f0cd6a384e9f4f7aa3efee14b188de13048c25b5e91f1640"}, - {file = "yarl-1.18.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:436c4fc0a4d66b2badc6c5fc5ef4e47bb10e4fd9bf0c79524ac719a01f3607c2"}, - {file = "yarl-1.18.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e35ef8683211db69ffe129a25d5634319a677570ab6b2eba4afa860f54eeaf75"}, - {file = "yarl-1.18.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:84b2deecba4a3f1a398df819151eb72d29bfeb3b69abb145a00ddc8d30094512"}, - {file = "yarl-1.18.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:00e5a1fea0fd4f5bfa7440a47eff01d9822a65b4488f7cff83155a0f31a2ecba"}, - {file = "yarl-1.18.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d0e883008013c0e4aef84dcfe2a0b172c4d23c2669412cf5b3371003941f72bb"}, - {file = "yarl-1.18.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:5a3f356548e34a70b0172d8890006c37be92995f62d95a07b4a42e90fba54272"}, - {file = "yarl-1.18.3-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:ccd17349166b1bee6e529b4add61727d3f55edb7babbe4069b5764c9587a8cc6"}, - {file = "yarl-1.18.3-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:b958ddd075ddba5b09bb0be8a6d9906d2ce933aee81100db289badbeb966f54e"}, - {file = "yarl-1.18.3-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c7d79f7d9aabd6011004e33b22bc13056a3e3fb54794d138af57f5ee9d9032cb"}, - {file = "yarl-1.18.3-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:4891ed92157e5430874dad17b15eb1fda57627710756c27422200c52d8a4e393"}, - {file = "yarl-1.18.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ce1af883b94304f493698b00d0f006d56aea98aeb49d75ec7d98cd4a777e9285"}, - {file = "yarl-1.18.3-cp312-cp312-win32.whl", hash = "sha256:f91c4803173928a25e1a55b943c81f55b8872f0018be83e3ad4938adffb77dd2"}, - {file = "yarl-1.18.3-cp312-cp312-win_amd64.whl", hash = "sha256:7e2ee16578af3b52ac2f334c3b1f92262f47e02cc6193c598502bd46f5cd1477"}, - {file = "yarl-1.18.3-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:90adb47ad432332d4f0bc28f83a5963f426ce9a1a8809f5e584e704b82685dcb"}, - {file = "yarl-1.18.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:913829534200eb0f789d45349e55203a091f45c37a2674678744ae52fae23efa"}, - {file = "yarl-1.18.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:ef9f7768395923c3039055c14334ba4d926f3baf7b776c923c93d80195624782"}, - {file = "yarl-1.18.3-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:88a19f62ff30117e706ebc9090b8ecc79aeb77d0b1f5ec10d2d27a12bc9f66d0"}, - {file = "yarl-1.18.3-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e17c9361d46a4d5addf777c6dd5eab0715a7684c2f11b88c67ac37edfba6c482"}, - {file = "yarl-1.18.3-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1a74a13a4c857a84a845505fd2d68e54826a2cd01935a96efb1e9d86c728e186"}, - {file = "yarl-1.18.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:41f7ce59d6ee7741af71d82020346af364949314ed3d87553763a2df1829cc58"}, - {file = "yarl-1.18.3-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f52a265001d830bc425f82ca9eabda94a64a4d753b07d623a9f2863fde532b53"}, - {file = "yarl-1.18.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:82123d0c954dc58db301f5021a01854a85bf1f3bb7d12ae0c01afc414a882ca2"}, - {file = "yarl-1.18.3-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:2ec9bbba33b2d00999af4631a3397d1fd78290c48e2a3e52d8dd72db3a067ac8"}, - {file = "yarl-1.18.3-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:fbd6748e8ab9b41171bb95c6142faf068f5ef1511935a0aa07025438dd9a9bc1"}, - {file = "yarl-1.18.3-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:877d209b6aebeb5b16c42cbb377f5f94d9e556626b1bfff66d7b0d115be88d0a"}, - {file = "yarl-1.18.3-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:b464c4ab4bfcb41e3bfd3f1c26600d038376c2de3297760dfe064d2cb7ea8e10"}, - {file = "yarl-1.18.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:8d39d351e7faf01483cc7ff7c0213c412e38e5a340238826be7e0e4da450fdc8"}, - {file = "yarl-1.18.3-cp313-cp313-win32.whl", hash = "sha256:61ee62ead9b68b9123ec24bc866cbef297dd266175d53296e2db5e7f797f902d"}, - {file = "yarl-1.18.3-cp313-cp313-win_amd64.whl", hash = "sha256:578e281c393af575879990861823ef19d66e2b1d0098414855dd367e234f5b3c"}, - {file = "yarl-1.18.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:61e5e68cb65ac8f547f6b5ef933f510134a6bf31bb178be428994b0cb46c2a04"}, - {file = "yarl-1.18.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:fe57328fbc1bfd0bd0514470ac692630f3901c0ee39052ae47acd1d90a436719"}, - {file = "yarl-1.18.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a440a2a624683108a1b454705ecd7afc1c3438a08e890a1513d468671d90a04e"}, - {file = "yarl-1.18.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:09c7907c8548bcd6ab860e5f513e727c53b4a714f459b084f6580b49fa1b9cee"}, - {file = "yarl-1.18.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b4f6450109834af88cb4cc5ecddfc5380ebb9c228695afc11915a0bf82116789"}, - {file = "yarl-1.18.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a9ca04806f3be0ac6d558fffc2fdf8fcef767e0489d2684a21912cc4ed0cd1b8"}, - {file = "yarl-1.18.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:77a6e85b90a7641d2e07184df5557132a337f136250caafc9ccaa4a2a998ca2c"}, - {file = "yarl-1.18.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6333c5a377c8e2f5fae35e7b8f145c617b02c939d04110c76f29ee3676b5f9a5"}, - {file = "yarl-1.18.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:0b3c92fa08759dbf12b3a59579a4096ba9af8dd344d9a813fc7f5070d86bbab1"}, - {file = "yarl-1.18.3-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:4ac515b860c36becb81bb84b667466885096b5fc85596948548b667da3bf9f24"}, - {file = "yarl-1.18.3-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:045b8482ce9483ada4f3f23b3774f4e1bf4f23a2d5c912ed5170f68efb053318"}, - {file = "yarl-1.18.3-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:a4bb030cf46a434ec0225bddbebd4b89e6471814ca851abb8696170adb163985"}, - {file = "yarl-1.18.3-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:54d6921f07555713b9300bee9c50fb46e57e2e639027089b1d795ecd9f7fa910"}, - {file = "yarl-1.18.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:1d407181cfa6e70077df3377938c08012d18893f9f20e92f7d2f314a437c30b1"}, - {file = "yarl-1.18.3-cp39-cp39-win32.whl", hash = "sha256:ac36703a585e0929b032fbaab0707b75dc12703766d0b53486eabd5139ebadd5"}, - {file = "yarl-1.18.3-cp39-cp39-win_amd64.whl", hash = "sha256:ba87babd629f8af77f557b61e49e7c7cac36f22f871156b91e10a6e9d4f829e9"}, - {file = "yarl-1.18.3-py3-none-any.whl", hash = "sha256:b57f4f58099328dfb26c6a771d09fb20dbbae81d20cfb66141251ea063bd101b"}, - {file = "yarl-1.18.3.tar.gz", hash = "sha256:ac1801c45cbf77b6c99242eeff4fffb5e4e73a800b5c4ad4fc0be5def634d2e1"}, + {file = "yarl-1.20.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:f1f6670b9ae3daedb325fa55fbe31c22c8228f6e0b513772c2e1c623caa6ab22"}, + {file = "yarl-1.20.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:85a231fa250dfa3308f3c7896cc007a47bc76e9e8e8595c20b7426cac4884c62"}, + {file = "yarl-1.20.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1a06701b647c9939d7019acdfa7ebbfbb78ba6aa05985bb195ad716ea759a569"}, + {file = "yarl-1.20.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7595498d085becc8fb9203aa314b136ab0516c7abd97e7d74f7bb4eb95042abe"}, + {file = "yarl-1.20.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:af5607159085dcdb055d5678fc2d34949bd75ae6ea6b4381e784bbab1c3aa195"}, + {file = "yarl-1.20.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:95b50910e496567434cb77a577493c26bce0f31c8a305135f3bda6a2483b8e10"}, + {file = "yarl-1.20.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b594113a301ad537766b4e16a5a6750fcbb1497dcc1bc8a4daae889e6402a634"}, + {file = "yarl-1.20.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:083ce0393ea173cd37834eb84df15b6853b555d20c52703e21fbababa8c129d2"}, + {file = "yarl-1.20.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4f1a350a652bbbe12f666109fbddfdf049b3ff43696d18c9ab1531fbba1c977a"}, + {file = "yarl-1.20.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:fb0caeac4a164aadce342f1597297ec0ce261ec4532bbc5a9ca8da5622f53867"}, + {file = "yarl-1.20.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:d88cc43e923f324203f6ec14434fa33b85c06d18d59c167a0637164863b8e995"}, + {file = "yarl-1.20.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e52d6ed9ea8fd3abf4031325dc714aed5afcbfa19ee4a89898d663c9976eb487"}, + {file = "yarl-1.20.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:ce360ae48a5e9961d0c730cf891d40698a82804e85f6e74658fb175207a77cb2"}, + {file = "yarl-1.20.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:06d06c9d5b5bc3eb56542ceeba6658d31f54cf401e8468512447834856fb0e61"}, + {file = "yarl-1.20.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:c27d98f4e5c4060582f44e58309c1e55134880558f1add7a87c1bc36ecfade19"}, + {file = "yarl-1.20.0-cp310-cp310-win32.whl", hash = "sha256:f4d3fa9b9f013f7050326e165c3279e22850d02ae544ace285674cb6174b5d6d"}, + {file = "yarl-1.20.0-cp310-cp310-win_amd64.whl", hash = "sha256:bc906b636239631d42eb8a07df8359905da02704a868983265603887ed68c076"}, + {file = "yarl-1.20.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:fdb5204d17cb32b2de2d1e21c7461cabfacf17f3645e4b9039f210c5d3378bf3"}, + {file = "yarl-1.20.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:eaddd7804d8e77d67c28d154ae5fab203163bd0998769569861258e525039d2a"}, + {file = "yarl-1.20.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:634b7ba6b4a85cf67e9df7c13a7fb2e44fa37b5d34501038d174a63eaac25ee2"}, + {file = "yarl-1.20.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6d409e321e4addf7d97ee84162538c7258e53792eb7c6defd0c33647d754172e"}, + {file = "yarl-1.20.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:ea52f7328a36960ba3231c6677380fa67811b414798a6e071c7085c57b6d20a9"}, + {file = "yarl-1.20.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c8703517b924463994c344dcdf99a2d5ce9eca2b6882bb640aa555fb5efc706a"}, + {file = "yarl-1.20.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:077989b09ffd2f48fb2d8f6a86c5fef02f63ffe6b1dd4824c76de7bb01e4f2e2"}, + {file = "yarl-1.20.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0acfaf1da020253f3533526e8b7dd212838fdc4109959a2c53cafc6db611bff2"}, + {file = "yarl-1.20.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b4230ac0b97ec5eeb91d96b324d66060a43fd0d2a9b603e3327ed65f084e41f8"}, + {file = "yarl-1.20.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0a6a1e6ae21cdd84011c24c78d7a126425148b24d437b5702328e4ba640a8902"}, + {file = "yarl-1.20.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:86de313371ec04dd2531f30bc41a5a1a96f25a02823558ee0f2af0beaa7ca791"}, + {file = "yarl-1.20.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:dd59c9dd58ae16eaa0f48c3d0cbe6be8ab4dc7247c3ff7db678edecbaf59327f"}, + {file = "yarl-1.20.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:a0bc5e05f457b7c1994cc29e83b58f540b76234ba6b9648a4971ddc7f6aa52da"}, + {file = "yarl-1.20.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:c9471ca18e6aeb0e03276b5e9b27b14a54c052d370a9c0c04a68cefbd1455eb4"}, + {file = "yarl-1.20.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:40ed574b4df723583a26c04b298b283ff171bcc387bc34c2683235e2487a65a5"}, + {file = "yarl-1.20.0-cp311-cp311-win32.whl", hash = "sha256:db243357c6c2bf3cd7e17080034ade668d54ce304d820c2a58514a4e51d0cfd6"}, + {file = "yarl-1.20.0-cp311-cp311-win_amd64.whl", hash = "sha256:8c12cd754d9dbd14204c328915e23b0c361b88f3cffd124129955e60a4fbfcfb"}, + {file = "yarl-1.20.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:e06b9f6cdd772f9b665e5ba8161968e11e403774114420737f7884b5bd7bdf6f"}, + {file = "yarl-1.20.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:b9ae2fbe54d859b3ade40290f60fe40e7f969d83d482e84d2c31b9bff03e359e"}, + {file = "yarl-1.20.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6d12b8945250d80c67688602c891237994d203d42427cb14e36d1a732eda480e"}, + {file = "yarl-1.20.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:087e9731884621b162a3e06dc0d2d626e1542a617f65ba7cc7aeab279d55ad33"}, + {file = "yarl-1.20.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:69df35468b66c1a6e6556248e6443ef0ec5f11a7a4428cf1f6281f1879220f58"}, + {file = "yarl-1.20.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b2992fe29002fd0d4cbaea9428b09af9b8686a9024c840b8a2b8f4ea4abc16f"}, + {file = "yarl-1.20.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4c903e0b42aab48abfbac668b5a9d7b6938e721a6341751331bcd7553de2dcae"}, + {file = "yarl-1.20.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bf099e2432131093cc611623e0b0bcc399b8cddd9a91eded8bfb50402ec35018"}, + {file = "yarl-1.20.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8a7f62f5dc70a6c763bec9ebf922be52aa22863d9496a9a30124d65b489ea672"}, + {file = "yarl-1.20.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:54ac15a8b60382b2bcefd9a289ee26dc0920cf59b05368c9b2b72450751c6eb8"}, + {file = "yarl-1.20.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:25b3bc0763a7aca16a0f1b5e8ef0f23829df11fb539a1b70476dcab28bd83da7"}, + {file = "yarl-1.20.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:b2586e36dc070fc8fad6270f93242124df68b379c3a251af534030a4a33ef594"}, + {file = "yarl-1.20.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:866349da9d8c5290cfefb7fcc47721e94de3f315433613e01b435473be63daa6"}, + {file = "yarl-1.20.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:33bb660b390a0554d41f8ebec5cd4475502d84104b27e9b42f5321c5192bfcd1"}, + {file = "yarl-1.20.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:737e9f171e5a07031cbee5e9180f6ce21a6c599b9d4b2c24d35df20a52fabf4b"}, + {file = "yarl-1.20.0-cp312-cp312-win32.whl", hash = "sha256:839de4c574169b6598d47ad61534e6981979ca2c820ccb77bf70f4311dd2cc64"}, + {file = "yarl-1.20.0-cp312-cp312-win_amd64.whl", hash = "sha256:3d7dbbe44b443b0c4aa0971cb07dcb2c2060e4a9bf8d1301140a33a93c98e18c"}, + {file = "yarl-1.20.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:2137810a20b933b1b1b7e5cf06a64c3ed3b4747b0e5d79c9447c00db0e2f752f"}, + {file = "yarl-1.20.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:447c5eadd750db8389804030d15f43d30435ed47af1313303ed82a62388176d3"}, + {file = "yarl-1.20.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:42fbe577272c203528d402eec8bf4b2d14fd49ecfec92272334270b850e9cd7d"}, + {file = "yarl-1.20.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:18e321617de4ab170226cd15006a565d0fa0d908f11f724a2c9142d6b2812ab0"}, + {file = "yarl-1.20.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:4345f58719825bba29895011e8e3b545e6e00257abb984f9f27fe923afca2501"}, + {file = "yarl-1.20.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5d9b980d7234614bc4674468ab173ed77d678349c860c3af83b1fffb6a837ddc"}, + {file = "yarl-1.20.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:af4baa8a445977831cbaa91a9a84cc09debb10bc8391f128da2f7bd070fc351d"}, + {file = "yarl-1.20.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:123393db7420e71d6ce40d24885a9e65eb1edefc7a5228db2d62bcab3386a5c0"}, + {file = "yarl-1.20.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ab47acc9332f3de1b39e9b702d9c916af7f02656b2a86a474d9db4e53ef8fd7a"}, + {file = "yarl-1.20.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:4a34c52ed158f89876cba9c600b2c964dfc1ca52ba7b3ab6deb722d1d8be6df2"}, + {file = "yarl-1.20.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:04d8cfb12714158abf2618f792c77bc5c3d8c5f37353e79509608be4f18705c9"}, + {file = "yarl-1.20.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:7dc63ad0d541c38b6ae2255aaa794434293964677d5c1ec5d0116b0e308031f5"}, + {file = "yarl-1.20.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:f9d02b591a64e4e6ca18c5e3d925f11b559c763b950184a64cf47d74d7e41877"}, + {file = "yarl-1.20.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:95fc9876f917cac7f757df80a5dda9de59d423568460fe75d128c813b9af558e"}, + {file = "yarl-1.20.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:bb769ae5760cd1c6a712135ee7915f9d43f11d9ef769cb3f75a23e398a92d384"}, + {file = "yarl-1.20.0-cp313-cp313-win32.whl", hash = "sha256:70e0c580a0292c7414a1cead1e076c9786f685c1fc4757573d2967689b370e62"}, + {file = "yarl-1.20.0-cp313-cp313-win_amd64.whl", hash = "sha256:4c43030e4b0af775a85be1fa0433119b1565673266a70bf87ef68a9d5ba3174c"}, + {file = "yarl-1.20.0-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:b6c4c3d0d6a0ae9b281e492b1465c72de433b782e6b5001c8e7249e085b69051"}, + {file = "yarl-1.20.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:8681700f4e4df891eafa4f69a439a6e7d480d64e52bf460918f58e443bd3da7d"}, + {file = "yarl-1.20.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:84aeb556cb06c00652dbf87c17838eb6d92cfd317799a8092cee0e570ee11229"}, + {file = "yarl-1.20.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f166eafa78810ddb383e930d62e623d288fb04ec566d1b4790099ae0f31485f1"}, + {file = "yarl-1.20.0-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:5d3d6d14754aefc7a458261027a562f024d4f6b8a798adb472277f675857b1eb"}, + {file = "yarl-1.20.0-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2a8f64df8ed5d04c51260dbae3cc82e5649834eebea9eadfd829837b8093eb00"}, + {file = "yarl-1.20.0-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4d9949eaf05b4d30e93e4034a7790634bbb41b8be2d07edd26754f2e38e491de"}, + {file = "yarl-1.20.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c366b254082d21cc4f08f522ac201d0d83a8b8447ab562732931d31d80eb2a5"}, + {file = "yarl-1.20.0-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:91bc450c80a2e9685b10e34e41aef3d44ddf99b3a498717938926d05ca493f6a"}, + {file = "yarl-1.20.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9c2aa4387de4bc3a5fe158080757748d16567119bef215bec643716b4fbf53f9"}, + {file = "yarl-1.20.0-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:d2cbca6760a541189cf87ee54ff891e1d9ea6406079c66341008f7ef6ab61145"}, + {file = "yarl-1.20.0-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:798a5074e656f06b9fad1a162be5a32da45237ce19d07884d0b67a0aa9d5fdda"}, + {file = "yarl-1.20.0-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:f106e75c454288472dbe615accef8248c686958c2e7dd3b8d8ee2669770d020f"}, + {file = "yarl-1.20.0-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:3b60a86551669c23dc5445010534d2c5d8a4e012163218fc9114e857c0586fdd"}, + {file = "yarl-1.20.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:3e429857e341d5e8e15806118e0294f8073ba9c4580637e59ab7b238afca836f"}, + {file = "yarl-1.20.0-cp313-cp313t-win32.whl", hash = "sha256:65a4053580fe88a63e8e4056b427224cd01edfb5f951498bfefca4052f0ce0ac"}, + {file = "yarl-1.20.0-cp313-cp313t-win_amd64.whl", hash = "sha256:53b2da3a6ca0a541c1ae799c349788d480e5144cac47dba0266c7cb6c76151fe"}, + {file = "yarl-1.20.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:119bca25e63a7725b0c9d20ac67ca6d98fa40e5a894bd5d4686010ff73397914"}, + {file = "yarl-1.20.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:35d20fb919546995f1d8c9e41f485febd266f60e55383090010f272aca93edcc"}, + {file = "yarl-1.20.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:484e7a08f72683c0f160270566b4395ea5412b4359772b98659921411d32ad26"}, + {file = "yarl-1.20.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8d8a3d54a090e0fff5837cd3cc305dd8a07d3435a088ddb1f65e33b322f66a94"}, + {file = "yarl-1.20.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:f0cf05ae2d3d87a8c9022f3885ac6dea2b751aefd66a4f200e408a61ae9b7f0d"}, + {file = "yarl-1.20.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a884b8974729e3899d9287df46f015ce53f7282d8d3340fa0ed57536b440621c"}, + {file = "yarl-1.20.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f8d8aa8dd89ffb9a831fedbcb27d00ffd9f4842107d52dc9d57e64cb34073d5c"}, + {file = "yarl-1.20.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3b4e88d6c3c8672f45a30867817e4537df1bbc6f882a91581faf1f6d9f0f1b5a"}, + {file = "yarl-1.20.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bdb77efde644d6f1ad27be8a5d67c10b7f769804fff7a966ccb1da5a4de4b656"}, + {file = "yarl-1.20.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:4ba5e59f14bfe8d261a654278a0f6364feef64a794bd456a8c9e823071e5061c"}, + {file = "yarl-1.20.0-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:d0bf955b96ea44ad914bc792c26a0edcd71b4668b93cbcd60f5b0aeaaed06c64"}, + {file = "yarl-1.20.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:27359776bc359ee6eaefe40cb19060238f31228799e43ebd3884e9c589e63b20"}, + {file = "yarl-1.20.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:04d9c7a1dc0a26efb33e1acb56c8849bd57a693b85f44774356c92d610369efa"}, + {file = "yarl-1.20.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:faa709b66ae0e24c8e5134033187a972d849d87ed0a12a0366bedcc6b5dc14a5"}, + {file = "yarl-1.20.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:44869ee8538208fe5d9342ed62c11cc6a7a1af1b3d0bb79bb795101b6e77f6e0"}, + {file = "yarl-1.20.0-cp39-cp39-win32.whl", hash = "sha256:b7fa0cb9fd27ffb1211cde944b41f5c67ab1c13a13ebafe470b1e206b8459da8"}, + {file = "yarl-1.20.0-cp39-cp39-win_amd64.whl", hash = "sha256:d4fad6e5189c847820288286732075f213eabf81be4d08d6cc309912e62be5b7"}, + {file = "yarl-1.20.0-py3-none-any.whl", hash = "sha256:5d0fe6af927a47a230f31e6004621fd0959eaa915fc62acfafa67ff7229a3124"}, + {file = "yarl-1.20.0.tar.gz", hash = "sha256:686d51e51ee5dfe62dec86e4866ee0e9ed66df700d55c828a615640adc885307"}, ] [package.dependencies] idna = ">=2.0" multidict = ">=4.0" -propcache = ">=0.2.0" +propcache = ">=0.2.1" [[package]] name = "zipp" @@ -5425,4 +5483,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.1" python-versions = ">=3.11,<3.13" -content-hash = "5892eb6b702f29a7eebff3f9dc899ea8d78cac622aa8f299ef4c662df8f5b51d" +content-hash = "051924735a7069c8393fefc18fc2c310b196ea24ad41b8c984dc5852683d0407" diff --git a/api/pyproject.toml b/api/pyproject.toml index fa9c14148a..19190f8893 100644 --- a/api/pyproject.toml +++ b/api/pyproject.toml @@ -7,7 +7,8 @@ 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)", "django-cors-headers==4.4.0", @@ -34,7 +35,7 @@ name = "prowler-api" package-mode = false # Needed for the SDK compatibility requires-python = ">=3.11,<3.13" -version = "1.5.0" +version = "1.8.1" [project.scripts] celery = "src.backend.config.settings.celery" @@ -45,6 +46,7 @@ coverage = "7.5.4" django-silk = "5.3.2" docker = "7.1.0" freezegun = "1.5.1" +marshmallow = ">=3.15.0,<4.0.0" mypy = "1.10.1" pylint = "3.2.5" pytest = "8.2.2" diff --git a/api/src/backend/api/adapters.py b/api/src/backend/api/adapters.py index 9a8cb2f044..7ccda0336c 100644 --- a/api/src/backend/api/adapters.py +++ b/api/src/backend/api/adapters.py @@ -30,6 +30,10 @@ class ProwlerSocialAccountAdapter(DefaultSocialAccountAdapter): with transaction.atomic(using=MainRouter.admin_db): user = super().save_user(request, sociallogin, form) user.save(using=MainRouter.admin_db) + social_account_name = sociallogin.account.extra_data.get("name") + if social_account_name: + user.name = social_account_name + user.save(using=MainRouter.admin_db) tenant = Tenant.objects.using(MainRouter.admin_db).create( name=f"{user.email.split('@')[0]} default tenant" 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 a7dfee863f..ca98b6b592 100644 --- a/api/src/backend/api/db_utils.py +++ b/api/src/backend/api/db_utils.py @@ -6,6 +6,7 @@ from datetime import datetime, timedelta, timezone from django.conf import settings from django.contrib.auth.models import BaseUserManager from django.db import connection, models, transaction +from django_celery_beat.models import PeriodicTask from psycopg2 import connect as psycopg2_connect from psycopg2.extensions import AsIs, new_type, register_adapter, register_type from rest_framework_json_api.serializers import ValidationError @@ -105,11 +106,12 @@ def generate_random_token(length: int = 14, symbols: str | None = None) -> str: return "".join(secrets.choice(symbols or _symbols) for _ in range(length)) -def batch_delete(queryset, batch_size=5000): +def batch_delete(tenant_id, queryset, batch_size=settings.DJANGO_DELETION_BATCH_SIZE): """ Deletes objects in batches and returns the total number of deletions and a summary. Args: + tenant_id (str): Tenant ID the queryset belongs to. queryset (QuerySet): The queryset of objects to delete. batch_size (int): The number of objects to delete in each batch. @@ -120,15 +122,16 @@ def batch_delete(queryset, batch_size=5000): deletion_summary = {} while True: - # Get a batch of IDs to delete - batch_ids = set( - queryset.values_list("id", flat=True).order_by("id")[:batch_size] - ) - if not batch_ids: - # No more objects to delete - break + with rls_transaction(tenant_id, POSTGRES_TENANT_VAR): + # Get a batch of IDs to delete + batch_ids = set( + queryset.values_list("id", flat=True).order_by("id")[:batch_size] + ) + if not batch_ids: + # No more objects to delete + break - deleted_count, deleted_info = queryset.filter(id__in=batch_ids).delete() + deleted_count, deleted_info = queryset.filter(id__in=batch_ids).delete() total_deleted += deleted_count for model_label, count in deleted_info.items(): @@ -137,6 +140,18 @@ def batch_delete(queryset, batch_size=5000): return total_deleted, deletion_summary +def delete_related_daily_task(provider_id: str): + """ + Deletes the periodic task associated with a specific provider. + + Args: + provider_id (str): The unique identifier for the provider + whose related periodic task should be deleted. + """ + task_name = f"scan-perform-scheduled-{provider_id}" + PeriodicTask.objects.filter(name=task_name).delete() + + # Postgres Enums @@ -212,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 dbd73b41db..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,91 +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) - - 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") @@ -382,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") @@ -500,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 @@ -518,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") @@ -614,12 +662,6 @@ class ScanSummaryFilter(FilterSet): field_name="scan__provider__provider", choices=Provider.ProviderChoices.choices ) region = CharFilter(field_name="region") - muted_findings = BooleanFilter(method="filter_muted_findings") - - def filter_muted_findings(self, queryset, name, value): - if not value: - return queryset.exclude(muted__gt=0) - return queryset class Meta: model = ScanSummary @@ -630,8 +672,6 @@ class ScanSummaryFilter(FilterSet): class ServiceOverviewFilter(ScanSummaryFilter): - muted_findings = None - def is_valid(self): # Check if at least one of the inserted_at filters is present inserted_at_filters = [ 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/0015_finding_muted.py b/api/src/backend/api/migrations/0015_finding_muted.py new file mode 100644 index 0000000000..3cb20f871b --- /dev/null +++ b/api/src/backend/api/migrations/0015_finding_muted.py @@ -0,0 +1,26 @@ +# Generated by Django 5.1.5 on 2025-03-25 11:29 + +from django.db import migrations, models + +import api.db_utils + + +class Migration(migrations.Migration): + dependencies = [ + ("api", "0014_integrations"), + ] + + operations = [ + migrations.AddField( + model_name="finding", + name="muted", + field=models.BooleanField(default=False), + ), + migrations.AlterField( + model_name="finding", + name="status", + field=api.db_utils.StatusEnumField( + choices=[("FAIL", "Fail"), ("PASS", "Pass"), ("MANUAL", "Manual")] + ), + ), + ] diff --git a/api/src/backend/api/migrations/0016_finding_compliance_resource_details_and_more.py b/api/src/backend/api/migrations/0016_finding_compliance_resource_details_and_more.py new file mode 100644 index 0000000000..0d0c5b9ca2 --- /dev/null +++ b/api/src/backend/api/migrations/0016_finding_compliance_resource_details_and_more.py @@ -0,0 +1,32 @@ +# Generated by Django 5.1.5 on 2025-03-31 10:46 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("api", "0015_finding_muted"), + ] + + operations = [ + migrations.AddField( + model_name="finding", + name="compliance", + field=models.JSONField(blank=True, default=dict, null=True), + ), + migrations.AddField( + model_name="resource", + name="details", + field=models.TextField(blank=True, null=True), + ), + migrations.AddField( + model_name="resource", + name="metadata", + field=models.TextField(blank=True, null=True), + ), + migrations.AddField( + model_name="resource", + name="partition", + field=models.TextField(blank=True, null=True), + ), + ] diff --git a/api/src/backend/api/migrations/0017_m365_provider.py b/api/src/backend/api/migrations/0017_m365_provider.py new file mode 100644 index 0000000000..62817560c5 --- /dev/null +++ b/api/src/backend/api/migrations/0017_m365_provider.py @@ -0,0 +1,32 @@ +# Generated by Django 5.1.7 on 2025-04-16 08:47 + +from django.db import migrations + +import api.db_utils + + +class Migration(migrations.Migration): + dependencies = [ + ("api", "0016_finding_compliance_resource_details_and_more"), + ] + + operations = [ + migrations.AlterField( + model_name="provider", + name="provider", + field=api.db_utils.ProviderEnumField( + choices=[ + ("aws", "AWS"), + ("azure", "Azure"), + ("gcp", "GCP"), + ("kubernetes", "Kubernetes"), + ("m365", "M365"), + ], + default="aws", + ), + ), + migrations.RunSQL( + "ALTER TYPE provider ADD VALUE IF NOT EXISTS 'm365';", + reverse_sql=migrations.RunSQL.noop, + ), + ] 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/migrations/0024_findings_uid_index_partitions.py b/api/src/backend/api/migrations/0024_findings_uid_index_partitions.py new file mode 100644 index 0000000000..d0e237453e --- /dev/null +++ b/api/src/backend/api/migrations/0024_findings_uid_index_partitions.py @@ -0,0 +1,29 @@ +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", "0023_resources_lookup_optimization"), + ] + + operations = [ + migrations.RunPython( + partial( + create_index_on_partitions, + parent_table="findings", + index_name="find_tenant_uid_inserted_idx", + columns="tenant_id, uid, inserted_at DESC", + ), + reverse_code=partial( + drop_index_on_partitions, + parent_table="findings", + index_name="find_tenant_uid_inserted_idx", + ), + ) + ] diff --git a/api/src/backend/api/migrations/0025_findings_uid_index_parent.py b/api/src/backend/api/migrations/0025_findings_uid_index_parent.py new file mode 100644 index 0000000000..fa64ae925b --- /dev/null +++ b/api/src/backend/api/migrations/0025_findings_uid_index_parent.py @@ -0,0 +1,17 @@ +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("api", "0024_findings_uid_index_partitions"), + ] + + operations = [ + migrations.AddIndex( + model_name="finding", + index=models.Index( + fields=["tenant_id", "uid", "-inserted_at"], + name="find_tenant_uid_inserted_idx", + ), + ), + ] diff --git a/api/src/backend/api/models.py b/api/src/backend/api/models.py index 0ac9f912a0..a427bcf9c9 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 @@ -59,7 +60,6 @@ class StatusChoices(models.TextChoices): FAIL = "FAIL", _("Fail") PASS = "PASS", _("Pass") MANUAL = "MANUAL", _("Manual") - MUTED = "MUTED", _("Muted") class StateChoices(models.TextChoices): @@ -192,6 +192,7 @@ class Provider(RowLevelSecurityProtectedModel): AZURE = "azure", _("Azure") GCP = "gcp", _("GCP") KUBERNETES = "kubernetes", _("Kubernetes") + M365 = "m365", _("M365") @staticmethod def validate_aws_uid(value): @@ -215,6 +216,19 @@ class Provider(RowLevelSecurityProtectedModel): pointer="/data/attributes/uid", ) + @staticmethod + def validate_m365_uid(value): + if not re.match( + r"""^(?!-)[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\.(?!-)[A-Za-z0-9]""" + r"""(?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*\.[A-Za-z]{2,}$""", + value, + ): + raise ModelValidationError( + detail="M365 domain ID must be a valid domain.", + code="m365-uid", + pointer="/data/attributes/uid", + ) + @staticmethod def validate_gcp_uid(value): if not re.match(r"^[a-z][a-z0-9-]{5,29}$", value): @@ -416,6 +430,7 @@ class Scan(RowLevelSecurityProtectedModel): PeriodicTask, on_delete=models.CASCADE, null=True, blank=True ) output_location = models.CharField(blank=True, null=True, max_length=200) + # TODO: mutelist foreign key class Meta(RowLevelSecurityProtectedModel.Meta): @@ -438,6 +453,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: @@ -519,6 +539,11 @@ class Resource(RowLevelSecurityProtectedModel): editable=False, ) + metadata = models.TextField(blank=True, null=True) + details = models.TextField(blank=True, null=True) + partition = models.TextField(blank=True, null=True) + + # Relationships tags = models.ManyToManyField( ResourceTag, verbose_name="Tags associated with the resource, by provider", @@ -559,6 +584,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 = [ @@ -656,6 +686,23 @@ class Finding(PostgresPartitionedModel, RowLevelSecurityProtectedModel): tags = models.JSONField(default=dict, null=True, blank=True) check_id = models.CharField(max_length=100, blank=False, null=False) check_metadata = models.JSONField(default=dict, null=False) + 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) @@ -697,18 +744,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"), @@ -720,19 +755,42 @@ class Finding(PostgresPartitionedModel, RowLevelSecurityProtectedModel): condition=Q(delta="new"), name="find_delta_new_idx", ), + models.Index( + fields=["tenant_id", "uid", "-inserted_at"], + name="find_tenant_uid_inserted_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() @@ -1134,7 +1192,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: @@ -1216,3 +1282,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/signals.py b/api/src/backend/api/signals.py index 44c2e0b4fd..d9dc0a72d9 100644 --- a/api/src/backend/api/signals.py +++ b/api/src/backend/api/signals.py @@ -1,12 +1,12 @@ from celery import states from celery.signals import before_task_publish +from config.celery import celery_app from django.db.models.signals import post_delete from django.dispatch import receiver -from django_celery_beat.models import PeriodicTask from django_celery_results.backends.database import DatabaseBackend +from api.db_utils import delete_related_daily_task from api.models import Provider -from config.celery import celery_app def create_task_result_on_publish(sender=None, headers=None, **kwargs): # noqa: F841 @@ -31,5 +31,4 @@ before_task_publish.connect( @receiver(post_delete, sender=Provider) def delete_provider_scan_task(sender, instance, **kwargs): # noqa: F841 # Delete the associated periodic task when the provider is deleted - task_name = f"scan-perform-scheduled-{instance.id}" - PeriodicTask.objects.filter(name=task_name).delete() + delete_related_daily_task(instance.id) diff --git a/api/src/backend/api/specs/v1.yaml b/api/src/backend/api/specs/v1.yaml index 99f2ce68b2..3f90c28cb1 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.6.0 + version: 1.8.1 description: |- Prowler API specification. @@ -83,11 +83,13 @@ paths: - azure - gcp - kubernetes + - m365 description: |- * `aws` - AWS * `azure` - Azure * `gcp` - GCP * `kubernetes` - Kubernetes + * `m365` - M365 - in: query name: filter[provider_type__in] schema: @@ -99,6 +101,7 @@ paths: - azure - gcp - kubernetes + - m365 description: |- Multiple values may be separated by commas. @@ -106,6 +109,7 @@ paths: * `azure` - Azure * `gcp` - GCP * `kubernetes` - Kubernetes + * `m365` - M365 explode: false style: form - in: query @@ -233,6 +237,42 @@ paths: schema: $ref: '#/components/schemas/ComplianceOverviewFullResponse' description: '' + /api/v1/compliance-overviews/metadata: + get: + operationId: compliance_overviews_metadata_retrieve + description: Fetch unique metadata values from a set of compliance overviews. + This is useful for dynamic filtering. + summary: Retrieve metadata values from compliance overviews + parameters: + - in: query + name: fields[compliance-overviews-metadata] + schema: + type: array + items: + type: string + enum: + - regions + 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[scan_id] + schema: + type: string + format: uuid + description: Related scan ID. + required: true + tags: + - Compliance Overview + security: + - jwtAuth: [] + responses: + '200': + content: + application/vnd.api+json: + schema: + $ref: '#/components/schemas/ComplianceOverviewMetadataResponse' + description: '' /api/v1/findings: get: operationId: findings_list @@ -258,6 +298,7 @@ paths: - inserted_at - updated_at - first_seen_at + - muted - url - scan - resources @@ -366,6 +407,12 @@ paths: type: string format: date description: Maximum date range is 7 days. + - 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: @@ -407,11 +454,13 @@ paths: - azure - gcp - kubernetes + - m365 description: |- * `aws` - AWS * `azure` - Azure * `gcp` - GCP * `kubernetes` - Kubernetes + * `m365` - M365 - in: query name: filter[provider_type__in] schema: @@ -423,6 +472,7 @@ paths: - azure - gcp - kubernetes + - m365 description: |- Multiple values may be separated by commas. @@ -430,6 +480,7 @@ paths: * `azure` - Azure * `gcp` - GCP * `kubernetes` - Kubernetes + * `m365` - M365 explode: false style: form - in: query @@ -597,13 +648,11 @@ paths: enum: - FAIL - MANUAL - - MUTED - PASS description: |- * `FAIL` - Fail * `PASS` - Pass * `MANUAL` - Manual - * `MUTED` - Muted - in: query name: filter[status__in] schema: @@ -720,6 +769,7 @@ paths: - inserted_at - updated_at - first_seen_at + - muted - url - scan - resources @@ -873,6 +923,12 @@ paths: type: string format: date description: Maximum date range is 7 days. + - 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: @@ -914,11 +970,13 @@ paths: - azure - gcp - kubernetes + - m365 description: |- * `aws` - AWS * `azure` - Azure * `gcp` - GCP * `kubernetes` - Kubernetes + * `m365` - M365 - in: query name: filter[provider_type__in] schema: @@ -930,6 +988,7 @@ paths: - azure - gcp - kubernetes + - m365 description: |- Multiple values may be separated by commas. @@ -937,6 +996,7 @@ paths: * `azure` - Azure * `gcp` - GCP * `kubernetes` - Kubernetes + * `m365` - M365 explode: false style: form - in: query @@ -1104,13 +1164,11 @@ paths: enum: - FAIL - MANUAL - - MUTED - PASS description: |- * `FAIL` - Fail * `PASS` - Pass * `MANUAL` - Manual - * `MUTED` - Muted - in: query name: filter[status__in] schema: @@ -1180,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 @@ -1302,6 +1770,12 @@ paths: type: string format: date description: Maximum date range is 7 days. + - 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: @@ -1343,11 +1817,13 @@ paths: - azure - gcp - kubernetes + - m365 description: |- * `aws` - AWS * `azure` - Azure * `gcp` - GCP * `kubernetes` - Kubernetes + * `m365` - M365 - in: query name: filter[provider_type__in] schema: @@ -1359,6 +1835,7 @@ paths: - azure - gcp - kubernetes + - m365 description: |- Multiple values may be separated by commas. @@ -1366,6 +1843,7 @@ paths: * `azure` - Azure * `gcp` - GCP * `kubernetes` - Kubernetes + * `m365` - M365 explode: false style: form - in: query @@ -1533,13 +2011,11 @@ paths: enum: - FAIL - MANUAL - - MUTED - PASS description: |- * `FAIL` - Fail * `PASS` - Pass * `MANUAL` - Manual - * `MUTED` - Muted - in: query name: filter[status__in] schema: @@ -1608,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 @@ -1983,10 +2845,6 @@ paths: schema: type: string format: date-time - - in: query - name: filter[muted_findings] - schema: - type: boolean - in: query name: filter[provider_id] schema: @@ -2001,11 +2859,13 @@ paths: - azure - gcp - kubernetes + - m365 description: |- * `aws` - AWS * `azure` - Azure * `gcp` - GCP * `kubernetes` - Kubernetes + * `m365` - M365 - in: query name: filter[provider_type__in] schema: @@ -2017,6 +2877,7 @@ paths: - azure - gcp - kubernetes + - m365 description: |- Multiple values may be separated by commas. @@ -2024,6 +2885,7 @@ paths: * `azure` - Azure * `gcp` - GCP * `kubernetes` - Kubernetes + * `m365` - M365 explode: false style: form - in: query @@ -2144,10 +3006,6 @@ paths: schema: type: string format: date-time - - in: query - name: filter[muted_findings] - schema: - type: boolean - in: query name: filter[provider_id] schema: @@ -2162,11 +3020,13 @@ paths: - azure - gcp - kubernetes + - m365 description: |- * `aws` - AWS * `azure` - Azure * `gcp` - GCP * `kubernetes` - Kubernetes + * `m365` - M365 - in: query name: filter[provider_type__in] schema: @@ -2178,6 +3038,7 @@ paths: - azure - gcp - kubernetes + - m365 description: |- Multiple values may be separated by commas. @@ -2185,6 +3046,7 @@ paths: * `azure` - Azure * `gcp` - GCP * `kubernetes` - Kubernetes + * `m365` - M365 explode: false style: form - in: query @@ -2335,11 +3197,13 @@ paths: - azure - gcp - kubernetes + - m365 description: |- * `aws` - AWS * `azure` - Azure * `gcp` - GCP * `kubernetes` - Kubernetes + * `m365` - M365 - in: query name: filter[provider_type__in] schema: @@ -2351,6 +3215,7 @@ paths: - azure - gcp - kubernetes + - m365 description: |- Multiple values may be separated by commas. @@ -2358,6 +3223,7 @@ paths: * `azure` - Azure * `gcp` - GCP * `kubernetes` - Kubernetes + * `m365` - M365 explode: false style: form - in: query @@ -2821,11 +3687,13 @@ paths: - azure - gcp - kubernetes + - m365 description: |- * `aws` - AWS * `azure` - Azure * `gcp` - GCP * `kubernetes` - Kubernetes + * `m365` - M365 - in: query name: filter[provider__in] schema: @@ -3399,11 +4267,13 @@ paths: - azure - gcp - kubernetes + - m365 description: |- * `aws` - AWS * `azure` - Azure * `gcp` - GCP * `kubernetes` - Kubernetes + * `m365` - M365 - in: query name: filter[provider_type__in] schema: @@ -3415,6 +4285,7 @@ paths: - azure - gcp - kubernetes + - m365 description: |- Multiple values may be separated by commas. @@ -3422,6 +4293,7 @@ paths: * `azure` - Azure * `gcp` - GCP * `kubernetes` - Kubernetes + * `m365` - M365 explode: false style: form - in: query @@ -3674,6 +4546,7 @@ paths: - name - manage_users - manage_account + - manage_integrations - manage_providers - manage_scans - permission_state @@ -3792,6 +4665,8 @@ paths: - -manage_users - manage_account - -manage_account + - manage_integrations + - -manage_integrations - manage_providers - -manage_providers - manage_scans @@ -3867,6 +4742,7 @@ paths: - name - manage_users - manage_account + - manage_integrations - manage_providers - manage_scans - permission_state @@ -4121,11 +4997,13 @@ paths: - azure - gcp - kubernetes + - m365 description: |- * `aws` - AWS * `azure` - Azure * `gcp` - GCP * `kubernetes` - Kubernetes + * `m365` - M365 - in: query name: filter[provider_type__in] schema: @@ -4137,6 +5015,7 @@ paths: - azure - gcp - kubernetes + - m365 description: |- Multiple values may be separated by commas. @@ -4144,6 +5023,7 @@ paths: * `azure` - Azure * `gcp` - GCP * `kubernetes` - Kubernetes + * `m365` - M365 explode: false style: form - in: query @@ -4236,6 +5116,17 @@ paths: description: |- * `scheduled` - Scheduled * `manual` - Manual + - in: query + name: include + schema: + type: array + items: + type: string + enum: + - provider + description: include query parameter to allow the client to customize which + related resources should be returned. + explode: false - name: page[number] required: false in: query @@ -4350,6 +5241,17 @@ paths: format: uuid description: A UUID string identifying this scan. required: true + - in: query + name: include + schema: + type: array + items: + type: string + enum: + - provider + description: include query parameter to allow the client to customize which + related resources should be returned. + explode: false tags: - Scan security: @@ -4397,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 @@ -6105,6 +7048,40 @@ components: $ref: '#/components/schemas/ComplianceOverviewFull' required: - data + ComplianceOverviewMetadata: + type: object + required: + - type + - id + additionalProperties: false + properties: + type: + allOf: + - $ref: '#/components/schemas/ComplianceOverviewMetadataTypeEnum' + description: The [type](https://jsonapi.org/format/#document-resource-object-identification) + member is used to describe resource objects that share common attributes + and relationships. + id: {} + attributes: + type: object + properties: + regions: + type: array + items: + type: string + required: + - regions + ComplianceOverviewMetadataResponse: + type: object + properties: + data: + $ref: '#/components/schemas/ComplianceOverviewMetadata' + required: + - data + ComplianceOverviewMetadataTypeEnum: + type: string + enum: + - compliance-overviews-metadata Finding: type: object required: @@ -6142,13 +7119,11 @@ components: - FAIL - PASS - MANUAL - - MUTED type: string description: |- * `FAIL` - Fail * `PASS` - Pass * `MANUAL` - Manual - * `MUTED` - Muted status_extended: type: string nullable: true @@ -6184,6 +7159,8 @@ components: format: date-time readOnly: true nullable: true + muted: + type: boolean required: - uid - status @@ -8245,6 +9222,33 @@ components: - client_id - client_secret - tenant_id + - type: object + title: M365 Static Credentials + properties: + client_id: + type: string + description: The Azure application (client) ID for authentication + in Azure AD. + client_secret: + type: string + description: The client secret associated with the application + (client) ID, providing secure access. + tenant_id: + type: string + description: The Azure tenant ID, representing the directory + where the application is registered. + user: + type: email + description: User microsoft email address. + encrypted_password: + type: string + description: User encrypted password. + required: + - client_id + - client_secret + - tenant_id + - user + - encrypted_password - type: object title: GCP Static Credentials properties: @@ -8398,6 +9402,8 @@ components: type: boolean manage_account: type: boolean + manage_integrations: + type: boolean manage_providers: type: boolean manage_scans: @@ -8710,12 +9716,14 @@ components: - azure - gcp - kubernetes + - m365 type: string description: |- * `aws` - AWS * `azure` - Azure * `gcp` - GCP * `kubernetes` - Kubernetes + * `m365` - M365 uid: type: string title: Unique identifier for the provider, set by the provider @@ -8822,12 +9830,14 @@ components: - azure - gcp - kubernetes + - m365 type: string description: |- * `aws` - AWS * `azure` - Azure * `gcp` - GCP * `kubernetes` - Kubernetes + * `m365` - M365 uid: type: string title: Unique identifier for the provider, set by the provider @@ -8865,12 +9875,14 @@ components: - azure - gcp - kubernetes + - m365 type: string description: |- * `aws` - AWS * `azure` - Azure * `gcp` - GCP * `kubernetes` - Kubernetes + * `m365` - M365 uid: type: string minLength: 3 @@ -9455,6 +10467,33 @@ components: - client_id - client_secret - tenant_id + - type: object + title: M365 Static Credentials + properties: + client_id: + type: string + description: The Azure application (client) ID for authentication + in Azure AD. + client_secret: + type: string + description: The client secret associated with the application + (client) ID, providing secure access. + tenant_id: + type: string + description: The Azure tenant ID, representing the directory where + the application is registered. + user: + type: email + description: User microsoft email address. + encrypted_password: + type: string + description: User encrypted password. + required: + - client_id + - client_secret + - tenant_id + - user + - encrypted_password - type: object title: GCP Static Credentials properties: @@ -9637,6 +10676,33 @@ components: - client_id - client_secret - tenant_id + - type: object + title: M365 Static Credentials + properties: + client_id: + type: string + description: The Azure application (client) ID for authentication + in Azure AD. + client_secret: + type: string + description: The client secret associated with the application + (client) ID, providing secure access. + tenant_id: + type: string + description: The Azure tenant ID, representing the directory + where the application is registered. + user: + type: email + description: User microsoft email address. + encrypted_password: + type: string + description: User encrypted password. + required: + - client_id + - client_secret + - tenant_id + - user + - encrypted_password - type: object title: GCP Static Credentials properties: @@ -9835,6 +10901,33 @@ components: - client_id - client_secret - tenant_id + - type: object + title: M365 Static Credentials + properties: + client_id: + type: string + description: The Azure application (client) ID for authentication + in Azure AD. + client_secret: + type: string + description: The client secret associated with the application + (client) ID, providing secure access. + tenant_id: + type: string + description: The Azure tenant ID, representing the directory where + the application is registered. + user: + type: email + description: User microsoft email address. + encrypted_password: + type: string + description: User encrypted password. + required: + - client_id + - client_secret + - tenant_id + - user + - encrypted_password - type: object title: GCP Static Credentials properties: @@ -10050,6 +11143,8 @@ components: type: boolean manage_account: type: boolean + manage_integrations: + type: boolean manage_providers: type: boolean manage_scans: @@ -10179,6 +11274,8 @@ components: type: boolean manage_account: type: boolean + manage_integrations: + type: boolean manage_providers: type: boolean manage_scans: @@ -10313,6 +11410,8 @@ components: type: boolean manage_account: type: boolean + manage_integrations: + type: boolean manage_providers: type: boolean manage_scans: diff --git a/api/src/backend/api/tests/test_db_utils.py b/api/src/backend/api/tests/test_db_utils.py index 6c2364600a..e22b1417bc 100644 --- a/api/src/backend/api/tests/test_db_utils.py +++ b/api/src/backend/api/tests/test_db_utils.py @@ -131,9 +131,10 @@ class TestBatchDelete: return provider_count @pytest.mark.django_db - def test_batch_delete(self, create_test_providers): + def test_batch_delete(self, tenants_fixture, create_test_providers): + tenant_id = str(tenants_fixture[0].id) _, summary = batch_delete( - Provider.objects.all(), batch_size=create_test_providers // 2 + tenant_id, Provider.objects.all(), batch_size=create_test_providers // 2 ) assert Provider.objects.all().count() == 0 assert summary == {"api.Provider": create_test_providers} diff --git a/api/src/backend/api/tests/test_models.py b/api/src/backend/api/tests/test_models.py index b6ef1a66c9..c2beeb3583 100644 --- a/api/src/backend/api/tests/test_models.py +++ b/api/src/backend/api/tests/test_models.py @@ -92,3 +92,31 @@ class TestResourceModel: assert len(resource.tags.filter(tenant_id=tenant_id)) == 0 assert resource.get_tags(tenant_id=tenant_id) == {} + + +# @pytest.mark.django_db +# class TestFindingModel: +# def test_add_finding_with_long_uid( +# self, providers_fixture, scans_fixture, resources_fixture +# ): +# provider, *_ = providers_fixture +# tenant_id = provider.tenant_id + +# long_uid = "1" * 500 +# _ = Finding.objects.create( +# tenant_id=tenant_id, +# uid=long_uid, +# delta=Finding.DeltaChoices.NEW, +# check_metadata={}, +# status=StatusChoices.PASS, +# status_extended="", +# severity="high", +# impact="high", +# raw_result={}, +# check_id="test_check", +# scan=scans_fixture[0], +# first_seen_at=None, +# muted=False, +# compliance={}, +# ) +# assert Finding.objects.filter(uid=long_uid).exists() diff --git a/api/src/backend/api/tests/test_utils.py b/api/src/backend/api/tests/test_utils.py index bfeec54852..0777267484 100644 --- a/api/src/backend/api/tests/test_utils.py +++ b/api/src/backend/api/tests/test_utils.py @@ -1,25 +1,25 @@ from datetime import datetime, timedelta, timezone -from unittest.mock import patch, MagicMock +from unittest.mock import MagicMock, patch import pytest +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.utils import ( + get_prowler_provider_kwargs, + initialize_prowler_provider, + merge_dicts, + prowler_provider_connection_test, + return_prowler_provider, + validate_invitation, +) from prowler.providers.aws.aws_provider import AwsProvider from prowler.providers.azure.azure_provider import AzureProvider from prowler.providers.gcp.gcp_provider import GcpProvider from prowler.providers.kubernetes.kubernetes_provider import KubernetesProvider -from rest_framework.exceptions import ValidationError, NotFound - -from api.db_router import MainRouter -from api.exceptions import InvitationTokenExpiredException -from api.models import Invitation -from api.models import Provider -from api.utils import ( - merge_dicts, - return_prowler_provider, - initialize_prowler_provider, - prowler_provider_connection_test, - get_prowler_provider_kwargs, -) -from api.utils import validate_invitation +from prowler.providers.m365.m365_provider import M365Provider class TestMergeDicts: @@ -105,6 +105,7 @@ class TestReturnProwlerProvider: (Provider.ProviderChoices.GCP.value, GcpProvider), (Provider.ProviderChoices.AZURE.value, AzureProvider), (Provider.ProviderChoices.KUBERNETES.value, KubernetesProvider), + (Provider.ProviderChoices.M365.value, M365Provider), ], ) def test_return_prowler_provider(self, provider_type, expected_provider): @@ -144,6 +145,18 @@ class TestProwlerProviderConnectionTest: key="value", provider_id="1234567890", raise_on_exception=False ) + @pytest.mark.django_db + @patch("api.utils.return_prowler_provider") + def test_prowler_provider_connection_test_without_secret( + self, mock_return_prowler_provider, providers_fixture + ): + mock_return_prowler_provider.return_value = MagicMock() + connection = prowler_provider_connection_test(providers_fixture[0]) + + assert connection.is_connected is False + assert isinstance(connection.error, Provider.secret.RelatedObjectDoesNotExist) + assert str(connection.error) == "Provider has no secret." + class TestGetProwlerProviderKwargs: @pytest.mark.parametrize( @@ -165,6 +178,10 @@ class TestGetProwlerProviderKwargs: Provider.ProviderChoices.KUBERNETES.value, {"context": "provider_uid"}, ), + ( + Provider.ProviderChoices.M365.value, + {}, + ), ], ) def test_get_prowler_provider_kwargs(self, provider_type, expected_extra_kwargs): diff --git a/api/src/backend/api/tests/test_views.py b/api/src/backend/api/tests/test_views.py index 597561b310..80ab44b946 100644 --- a/api/src/backend/api/tests/test_views.py +++ b/api/src/backend/api/tests/test_views.py @@ -2,18 +2,22 @@ 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, Invitation, Membership, @@ -40,6 +44,14 @@ def today_after_n_days(n_days: int) -> str: ) +class TestViewSet: + def test_security_headers(self, client): + response = client.get("/") + assert response.headers["X-Content-Type-Options"] == "nosniff" + assert response.headers["X-Frame-Options"] == "DENY" + assert response.headers["Referrer-Policy"] == "strict-origin-when-cross-origin" + + @pytest.mark.django_db class TestUserViewSet: def test_users_list(self, authenticated_client, create_test_user): @@ -906,6 +918,26 @@ class TestProviderViewSet: "uid": "8851db6b-42e5-4533-aa9e-30a32d67e875", "alias": "test", }, + { + "provider": "m365", + "uid": "TestingPro.onMirosoft.com", + "alias": "test", + }, + { + "provider": "m365", + "uid": "subdomain.domain.es", + "alias": "test", + }, + { + "provider": "m365", + "uid": "microsoft.net", + "alias": "test", + }, + { + "provider": "m365", + "uid": "subdomain1.subdomain2.subdomain3.subdomain4.domain.net", + "alias": "test", + }, ] ), ) @@ -974,6 +1006,51 @@ class TestProviderViewSet: "invalid_choice", "provider", ), + ( + { + "provider": "m365", + "uid": "https://test.com", + "alias": "test", + }, + "m365-uid", + "uid", + ), + ( + { + "provider": "m365", + "uid": "thisisnotadomain", + "alias": "test", + }, + "m365-uid", + "uid", + ), + ( + { + "provider": "m365", + "uid": "http://test.com", + "alias": "test", + }, + "m365-uid", + "uid", + ), + ( + { + "provider": "m365", + "uid": f"{'a' * 64}.domain.com", + "alias": "test", + }, + "m365-uid", + "uid", + ), + ( + { + "provider": "m365", + "uid": f"subdomain.{'a' * 64}.com", + "alias": "test", + }, + "m365-uid", + "uid", + ), ] ), ) @@ -2268,7 +2345,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: @@ -2288,35 +2366,315 @@ class TestScanViewSet: assert f'filename="{expected_filename}"' in content_disposition assert response.content == b"s3 zip content" - def test_report_local_file( - self, authenticated_client, scans_fixture, tmp_path, monkeypatch + def test_report_s3_success_no_local_files( + self, authenticated_client, scans_fixture, monkeypatch ): """ - When output_location is a local file path, the view should read the file from disk - and return it with proper headers. + When output_location is a local path and glob.glob returns an empty list, + the view should return HTTP 404 with detail "The scan has no reports." """ scan = scans_fixture[0] - file_content = b"local zip file content" - file_path = tmp_path / "report.zip" - file_path.write_bytes(file_content) + scan.output_location = "/tmp/nonexistent_report_pattern.zip" + scan.state = StateChoices.COMPLETED + scan.save() + monkeypatch.setattr("api.v1.views.glob.glob", lambda pattern: []) - scan.output_location = str(file_path) + url = reverse("scan-report", kwargs={"pk": scan.id}) + response = authenticated_client.get(url) + + 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, monkeypatch): + scan = scans_fixture[0] + with tempfile.TemporaryDirectory() as tmp: + tmp_path = Path(tmp) + base_tmp = tmp_path / "report_local_file" + base_tmp.mkdir(parents=True, exist_ok=True) + + 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 @@ -2665,6 +3023,8 @@ class TestFindingViewSet: # ("resource_tags", "key:value", 2), # ("resource_tags", "not:exists", 0), # ("resource_tags", "not:exists,key:value", 2), + ("muted", True, 1), + ("muted", False, 1), ] ), ) @@ -2807,7 +3167,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"), @@ -2830,14 +3192,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"), }, ) @@ -2888,6 +3250,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: @@ -4481,6 +4866,33 @@ class TestComplianceOverviewViewSet: assert len(response.json()["data"]) == 1 assert response.json()["data"][0]["id"] == str(compliance_overview1.id) + def test_compliance_overview_metadata( + self, authenticated_client, compliance_overviews_fixture + ): + response = authenticated_client.get( + reverse("complianceoverview-metadata"), + {"filter[scan_id]": str(compliance_overviews_fixture[0].scan_id)}, + ) + data = response.json() + + expected_regions = set( + ComplianceOverview.objects.all() + .values_list("region", flat=True) + .distinct("region") + ) + + assert response.status_code == status.HTTP_200_OK + assert data["data"]["type"] == "compliance-overviews-metadata" + assert data["data"]["id"] is None + assert set(data["data"]["attributes"]["regions"]) == expected_regions + + def test_compliance_overview_metadata_missing_scan_id(self, authenticated_client): + # Attempt to list compliance overviews without providing filter[scan_id] + response = authenticated_client.get(reverse("complianceoverview-metadata")) + assert response.status_code == status.HTTP_400_BAD_REQUEST + assert response.json()["errors"][0]["source"]["pointer"] == "filter[scan_id]" + assert response.json()["errors"][0]["code"] == "required" + @pytest.mark.django_db class TestOverviewViewSet: @@ -4498,9 +4910,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 1dec5b8c9e..92d4f7ce75 100644 --- a/api/src/backend/api/utils.py +++ b/api/src/backend/api/utils.py @@ -1,16 +1,20 @@ 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 from prowler.providers.gcp.gcp_provider import GcpProvider from prowler.providers.kubernetes.kubernetes_provider import KubernetesProvider +from prowler.providers.m365.m365_provider import M365Provider class CustomOAuth2Client(OAuth2Client): @@ -51,14 +55,14 @@ def merge_dicts(default_dict: dict, replacement_dict: dict) -> dict: def return_prowler_provider( provider: Provider, -) -> [AwsProvider | AzureProvider | GcpProvider | KubernetesProvider]: +) -> [AwsProvider | AzureProvider | GcpProvider | KubernetesProvider | M365Provider]: """Return the Prowler provider class based on the given provider type. Args: provider (Provider): The provider object containing the provider type and associated secrets. Returns: - AwsProvider | AzureProvider | GcpProvider | KubernetesProvider: The corresponding provider class. + AwsProvider | AzureProvider | GcpProvider | KubernetesProvider | M365Provider: The corresponding provider class. Raises: ValueError: If the provider type specified in `provider.provider` is not supported. @@ -72,6 +76,8 @@ def return_prowler_provider( prowler_provider = AzureProvider case Provider.ProviderChoices.KUBERNETES.value: prowler_provider = KubernetesProvider + case Provider.ProviderChoices.M365.value: + prowler_provider = M365Provider case _: raise ValueError(f"Provider type {provider.provider} not supported") return prowler_provider @@ -104,15 +110,15 @@ def get_prowler_provider_kwargs(provider: Provider) -> dict: def initialize_prowler_provider( provider: Provider, -) -> AwsProvider | AzureProvider | GcpProvider | KubernetesProvider: +) -> AwsProvider | AzureProvider | GcpProvider | KubernetesProvider | M365Provider: """Initialize a Prowler provider instance based on the given provider type. Args: provider (Provider): The provider object containing the provider type and associated secrets. Returns: - AwsProvider | AzureProvider | GcpProvider | KubernetesProvider: An instance of the corresponding provider class - (`AwsProvider`, `AzureProvider`, `GcpProvider`, or `KubernetesProvider`) initialized with the + AwsProvider | AzureProvider | GcpProvider | KubernetesProvider | M365Provider: An instance of the corresponding provider class + (`AwsProvider`, `AzureProvider`, `GcpProvider`, `KubernetesProvider` or `M365Provider`) initialized with the provider's secrets. """ prowler_provider = return_prowler_provider(provider) @@ -130,7 +136,12 @@ def prowler_provider_connection_test(provider: Provider) -> Connection: Connection: A connection object representing the result of the connection test for the specified provider. """ prowler_provider = return_prowler_provider(provider) - prowler_provider_kwargs = provider.secret.secret + + try: + prowler_provider_kwargs = provider.secret.secret + except Provider.secret.RelatedObjectDoesNotExist as secret_error: + return Connection(is_connected=False, error=secret_error) + return prowler_provider.test_connection( **prowler_provider_kwargs, provider_id=provider.uid, raise_on_exception=False ) @@ -197,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/serializer_utils/providers.py b/api/src/backend/api/v1/serializer_utils/providers.py new file mode 100644 index 0000000000..231e5dc1bb --- /dev/null +++ b/api/src/backend/api/v1/serializer_utils/providers.py @@ -0,0 +1,172 @@ +from drf_spectacular.utils import extend_schema_field +from rest_framework_json_api import serializers + + +@extend_schema_field( + { + "oneOf": [ + { + "type": "object", + "title": "AWS Static Credentials", + "properties": { + "aws_access_key_id": { + "type": "string", + "description": "The AWS access key ID. Required for environments where no IAM role is being " + "assumed and direct AWS access is needed.", + }, + "aws_secret_access_key": { + "type": "string", + "description": "The AWS secret access key. Must accompany 'aws_access_key_id' to authorize " + "access to AWS resources.", + }, + "aws_session_token": { + "type": "string", + "description": "The session token associated with temporary credentials. Only needed for " + "session-based or temporary AWS access.", + }, + }, + "required": ["aws_access_key_id", "aws_secret_access_key"], + }, + { + "type": "object", + "title": "AWS Assume Role", + "properties": { + "role_arn": { + "type": "string", + "description": "The Amazon Resource Name (ARN) of the role to assume. Required for AWS role " + "assumption.", + }, + "external_id": { + "type": "string", + "description": "An identifier to enhance security for role assumption.", + }, + "aws_access_key_id": { + "type": "string", + "description": "The AWS access key ID. Only required if the environment lacks pre-configured " + "AWS credentials.", + }, + "aws_secret_access_key": { + "type": "string", + "description": "The AWS secret access key. Required if 'aws_access_key_id' is provided or if " + "no AWS credentials are pre-configured.", + }, + "aws_session_token": { + "type": "string", + "description": "The session token for temporary credentials, if applicable.", + }, + "session_duration": { + "type": "integer", + "minimum": 900, + "maximum": 43200, + "default": 3600, + "description": "The duration (in seconds) for the role session.", + }, + "role_session_name": { + "type": "string", + "description": "An identifier for the role session, useful for tracking sessions in AWS logs. " + "The regex used to validate this parameter is a string of characters consisting of " + "upper- and lower-case alphanumeric characters with no spaces. You can also include " + "underscores or any of the following characters: =,.@-\n\n" + "Examples:\n" + "- MySession123\n" + "- User_Session-1\n" + "- Test.Session@2", + "pattern": "^[a-zA-Z0-9=,.@_-]+$", + }, + }, + "required": ["role_arn", "external_id"], + }, + { + "type": "object", + "title": "Azure Static Credentials", + "properties": { + "client_id": { + "type": "string", + "description": "The Azure application (client) ID for authentication in Azure AD.", + }, + "client_secret": { + "type": "string", + "description": "The client secret associated with the application (client) ID, providing " + "secure access.", + }, + "tenant_id": { + "type": "string", + "description": "The Azure tenant ID, representing the directory where the application is " + "registered.", + }, + }, + "required": ["client_id", "client_secret", "tenant_id"], + }, + { + "type": "object", + "title": "M365 Static Credentials", + "properties": { + "client_id": { + "type": "string", + "description": "The Azure application (client) ID for authentication in Azure AD.", + }, + "client_secret": { + "type": "string", + "description": "The client secret associated with the application (client) ID, providing " + "secure access.", + }, + "tenant_id": { + "type": "string", + "description": "The Azure tenant ID, representing the directory where the application is " + "registered.", + }, + "user": { + "type": "email", + "description": "User microsoft email address.", + }, + "encrypted_password": { + "type": "string", + "description": "User encrypted password.", + }, + }, + "required": [ + "client_id", + "client_secret", + "tenant_id", + "user", + "encrypted_password", + ], + }, + { + "type": "object", + "title": "GCP Static Credentials", + "properties": { + "client_id": { + "type": "string", + "description": "The client ID from Google Cloud, used to identify the application for GCP " + "access.", + }, + "client_secret": { + "type": "string", + "description": "The client secret associated with the GCP client ID, required for secure " + "access.", + }, + "refresh_token": { + "type": "string", + "description": "A refresh token that allows the application to obtain new access tokens for " + "extended use.", + }, + }, + "required": ["client_id", "client_secret", "refresh_token"], + }, + { + "type": "object", + "title": "Kubernetes Static Credentials", + "properties": { + "kubeconfig_content": { + "type": "string", + "description": "The content of the Kubernetes kubeconfig file, encoded as a string.", + } + }, + "required": ["kubeconfig_content"], + }, + ] + } +) +class ProviderSecretField(serializers.JSONField): + pass diff --git a/api/src/backend/api/v1/serializers.py b/api/src/backend/api/v1/serializers.py index 333a6474bf..c0440f3ef0 100644 --- a/api/src/backend/api/v1/serializers.py +++ b/api/src/backend/api/v1/serializers.py @@ -42,6 +42,7 @@ from api.v1.serializer_utils.integrations import ( IntegrationCredentialField, S3ConfigSerializer, ) +from api.v1.serializer_utils.providers import ProviderSecretField # Tokens @@ -851,6 +852,10 @@ class ScanSerializer(RLSSerializer): "url", ] + included_serializers = { + "provider": "api.v1.serializers.ProviderIncludeSerializer", + } + class ScanIncludeSerializer(RLSSerializer): trigger = serializers.ChoiceField( @@ -955,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 @@ -1087,6 +1101,7 @@ class FindingSerializer(RLSSerializer): "inserted_at", "updated_at", "first_seen_at", + "muted", "url", # Relationships "scan", @@ -1136,6 +1151,8 @@ class BaseWriteProviderSecretSerializer(BaseWriteSerializer): serializer = GCPProviderSecret(data=secret) elif provider_type == Provider.ProviderChoices.KUBERNETES.value: serializer = KubernetesProviderSecret(data=secret) + elif provider_type == Provider.ProviderChoices.M365.value: + serializer = M365ProviderSecret(data=secret) else: raise serializers.ValidationError( {"provider": f"Provider type not supported {provider_type}"} @@ -1175,6 +1192,17 @@ class AzureProviderSecret(serializers.Serializer): resource_name = "provider-secrets" +class M365ProviderSecret(serializers.Serializer): + client_id = serializers.CharField() + client_secret = serializers.CharField() + tenant_id = serializers.CharField() + user = serializers.EmailField() + encrypted_password = serializers.CharField() + + class Meta: + resource_name = "provider-secrets" + + class GCPProviderSecret(serializers.Serializer): client_id = serializers.CharField() client_secret = serializers.CharField() @@ -1206,141 +1234,6 @@ class AWSRoleAssumptionProviderSecret(serializers.Serializer): resource_name = "provider-secrets" -@extend_schema_field( - { - "oneOf": [ - { - "type": "object", - "title": "AWS Static Credentials", - "properties": { - "aws_access_key_id": { - "type": "string", - "description": "The AWS access key ID. Required for environments where no IAM role is being " - "assumed and direct AWS access is needed.", - }, - "aws_secret_access_key": { - "type": "string", - "description": "The AWS secret access key. Must accompany 'aws_access_key_id' to authorize " - "access to AWS resources.", - }, - "aws_session_token": { - "type": "string", - "description": "The session token associated with temporary credentials. Only needed for " - "session-based or temporary AWS access.", - }, - }, - "required": ["aws_access_key_id", "aws_secret_access_key"], - }, - { - "type": "object", - "title": "AWS Assume Role", - "properties": { - "role_arn": { - "type": "string", - "description": "The Amazon Resource Name (ARN) of the role to assume. Required for AWS role " - "assumption.", - }, - "external_id": { - "type": "string", - "description": "An identifier to enhance security for role assumption.", - }, - "aws_access_key_id": { - "type": "string", - "description": "The AWS access key ID. Only required if the environment lacks pre-configured " - "AWS credentials.", - }, - "aws_secret_access_key": { - "type": "string", - "description": "The AWS secret access key. Required if 'aws_access_key_id' is provided or if " - "no AWS credentials are pre-configured.", - }, - "aws_session_token": { - "type": "string", - "description": "The session token for temporary credentials, if applicable.", - }, - "session_duration": { - "type": "integer", - "minimum": 900, - "maximum": 43200, - "default": 3600, - "description": "The duration (in seconds) for the role session.", - }, - "role_session_name": { - "type": "string", - "description": "An identifier for the role session, useful for tracking sessions in AWS logs. " - "The regex used to validate this parameter is a string of characters consisting of " - "upper- and lower-case alphanumeric characters with no spaces. You can also include " - "underscores or any of the following characters: =,.@-\n\n" - "Examples:\n" - "- MySession123\n" - "- User_Session-1\n" - "- Test.Session@2", - "pattern": "^[a-zA-Z0-9=,.@_-]+$", - }, - }, - "required": ["role_arn", "external_id"], - }, - { - "type": "object", - "title": "Azure Static Credentials", - "properties": { - "client_id": { - "type": "string", - "description": "The Azure application (client) ID for authentication in Azure AD.", - }, - "client_secret": { - "type": "string", - "description": "The client secret associated with the application (client) ID, providing " - "secure access.", - }, - "tenant_id": { - "type": "string", - "description": "The Azure tenant ID, representing the directory where the application is " - "registered.", - }, - }, - "required": ["client_id", "client_secret", "tenant_id"], - }, - { - "type": "object", - "title": "GCP Static Credentials", - "properties": { - "client_id": { - "type": "string", - "description": "The client ID from Google Cloud, used to identify the application for GCP " - "access.", - }, - "client_secret": { - "type": "string", - "description": "The client secret associated with the GCP client ID, required for secure " - "access.", - }, - "refresh_token": { - "type": "string", - "description": "A refresh token that allows the application to obtain new access tokens for " - "extended use.", - }, - }, - "required": ["client_id", "client_secret", "refresh_token"], - }, - { - "type": "object", - "title": "Kubernetes Static Credentials", - "properties": { - "kubeconfig_content": { - "type": "string", - "description": "The content of the Kubernetes kubeconfig file, encoded as a string.", - } - }, - "required": ["kubeconfig_content"], - }, - ] - } -) -class ProviderSecretField(serializers.JSONField): - pass - - class ProviderSecretSerializer(RLSSerializer): """ Serializer for the ProviderSecret model. @@ -1897,6 +1790,13 @@ class ComplianceOverviewFullSerializer(ComplianceOverviewSerializer): return obj.requirements +class ComplianceOverviewMetadataSerializer(serializers.Serializer): + regions = serializers.ListField(child=serializers.CharField(), allow_empty=True) + + class Meta: + resource_name = "compliance-overviews-metadata" + + # Overviews diff --git a/api/src/backend/api/v1/views.py b/api/src/backend/api/v1/views.py index df465f3169..1e3a241a28 100644 --- a/api/src/backend/api/v1/views.py +++ b/api/src/backend/api/v1/views.py @@ -1,6 +1,8 @@ import glob import os +from datetime import datetime, timedelta, timezone +import sentry_sdk from allauth.socialaccount.providers.github.views import GitHubOAuth2Adapter from allauth.socialaccount.providers.google.views import GoogleOAuth2Adapter from botocore.exceptions import ClientError, NoCredentialsError, ParamValidationError @@ -19,8 +21,10 @@ 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 from drf_spectacular.settings import spectacular_settings from drf_spectacular.utils import ( OpenApiParameter, @@ -46,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, @@ -53,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, @@ -84,6 +91,7 @@ from api.models import ( ProviderSecret, Resource, ResourceFindingMapping, + ResourceScanSummary, Role, RoleProviderGroupRelationship, Scan, @@ -97,9 +105,16 @@ 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, ComplianceOverviewSerializer, FindingDynamicFilterSerializer, FindingMetadataSerializer, @@ -131,6 +146,7 @@ from api.v1.serializers import ( RoleProviderGroupRelationshipSerializer, RoleSerializer, RoleUpdateSerializer, + ScanComplianceReportSerializer, ScanCreateSerializer, ScanReportSerializer, ScanSerializer, @@ -244,7 +260,7 @@ class SchemaView(SpectacularAPIView): def get(self, request, *args, **kwargs): spectacular_settings.TITLE = "Prowler API" - spectacular_settings.VERSION = "1.6.0" + spectacular_settings.VERSION = "1.8.1" spectacular_settings.DESCRIPTION = ( "Prowler API specification.\n\nThis file is auto-generated." ) @@ -1086,6 +1102,8 @@ class ProviderViewSet(BaseRLSViewSet): provider = get_object_or_404(Provider, pk=pk) provider.is_deleted = True provider.save() + task_name = f"scan-perform-scheduled-{pk}" + PeriodicTask.objects.filter(name=task_name).update(enabled=False) with transaction.atomic(): task = delete_provider_task.delay( @@ -1145,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") @@ -1197,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): @@ -1214,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, @@ -1286,21 +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) - file_path = zip_files[0] - with open(file_path, "rb") as f: - file_content = f.read() - filename = os.path.basename(file_path) + files = glob.glob(path_pattern) + if not files: + return Response( + {"detail": "The scan has no reports."}, + status=status.HTTP_404_NOT_FOUND, + ) + 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) @@ -1513,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 @@ -1548,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) @@ -1592,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): @@ -1631,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, @@ -1659,7 +1909,108 @@ 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): + tenant_id = request.tenant_id + query_params = request.query_params + + latest_scans_queryset = ( + Scan.all_objects.filter(tenant_id=tenant_id, state=StateChoices.COMPLETED) + .order_by("provider_id", "-inserted_at") + .distinct("provider_id") + ) + latest_scans_ids = list(latest_scans_queryset.values_list("id", flat=True)) + + queryset = ResourceScanSummary.objects.filter( + tenant_id=tenant_id, + scan_id__in=latest_scans_queryset.values_list("id", flat=True), + ) + # ToRemove: Temporary fallback mechanism + present_ids = set( + ResourceScanSummary.objects.filter( + tenant_id=tenant_id, scan_id__in=latest_scans_ids + ) + .values_list("scan_id", flat=True) + .distinct() + ) + missing_scan_ids = [sid for sid in latest_scans_ids if sid not in present_ids] + if missing_scan_ids: + 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, self.filter_queryset(self.get_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( @@ -2046,6 +2397,21 @@ class RoleProviderGroupRelationshipView(RelationshipView, BaseRLSViewSet): description="Fetch detailed information about a specific compliance overview by its ID, including detailed " "requirement information and check's status.", ), + metadata=extend_schema( + tags=["Compliance Overview"], + summary="Retrieve metadata values from compliance overviews", + description="Fetch unique metadata values from a set of compliance overviews. This is useful for dynamic " + "filtering.", + parameters=[ + OpenApiParameter( + name="filter[scan_id]", + required=True, + type=OpenApiTypes.UUID, + location=OpenApiParameter.QUERY, + description="Related scan ID.", + ), + ], + ), ) @method_decorator(CACHE_DECORATOR, name="list") @method_decorator(CACHE_DECORATOR, name="retrieve") @@ -2107,6 +2473,8 @@ class ComplianceOverviewViewSet(BaseRLSViewSet): def get_serializer_class(self): if self.action == "retrieve": return ComplianceOverviewFullSerializer + elif self.action == "metadata": + return ComplianceOverviewMetadataSerializer return super().get_serializer_class() def list(self, request, *args, **kwargs): @@ -2123,6 +2491,35 @@ class ComplianceOverviewViewSet(BaseRLSViewSet): ) return super().list(request, *args, **kwargs) + @action(detail=False, methods=["get"], url_name="metadata") + def metadata(self, request): + scan_id = request.query_params.get("filter[scan_id]") + if not scan_id: + raise ValidationError( + [ + { + "detail": "This query parameter is required.", + "status": 400, + "source": {"pointer": "filter[scan_id]"}, + "code": "required", + } + ] + ) + + tenant_id = self.request.tenant_id + + regions = list( + ComplianceOverview.objects.filter(tenant_id=tenant_id, scan_id=scan_id) + .values_list("region", flat=True) + .order_by("region") + .distinct() + ) + result = {"regions": regions} + + serializer = self.get_serializer(data=result) + serializer.is_valid(raise_exception=True) + return Response(serializer.data, status=status.HTTP_200_OK) + @extend_schema(tags=["Overview"]) @extend_schema_view( @@ -2180,8 +2577,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 ) @@ -2225,18 +2622,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), @@ -2246,22 +2645,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"], @@ -2269,8 +2666,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): @@ -2278,22 +2677,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, @@ -2323,22 +2716,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")) @@ -2359,22 +2746,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/celery.py b/api/src/backend/config/celery.py index 4486a0bf97..4c667b7bc5 100644 --- a/api/src/backend/config/celery.py +++ b/api/src/backend/config/celery.py @@ -50,9 +50,9 @@ class RLSTask(Task): tenant_id = kwargs.get("tenant_id") with rls_transaction(tenant_id): - APITask.objects.create( + APITask.objects.update_or_create( id=task_result_instance.task_id, tenant_id=tenant_id, - task_runner_task=task_result_instance, + defaults={"task_runner_task": task_result_instance}, ) return result diff --git a/api/src/backend/config/django/base.py b/api/src/backend/config/django/base.py index 1afa12ec65..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" @@ -236,3 +237,10 @@ DJANGO_OUTPUT_S3_AWS_SECRET_ACCESS_KEY = env.str( ) DJANGO_OUTPUT_S3_AWS_SESSION_TOKEN = env.str("DJANGO_OUTPUT_S3_AWS_SESSION_TOKEN", "") DJANGO_OUTPUT_S3_AWS_DEFAULT_REGION = env.str("DJANGO_OUTPUT_S3_AWS_DEFAULT_REGION", "") + +# HTTP Security Headers +SECURE_CONTENT_TYPE_NOSNIFF = True +X_FRAME_OPTIONS = "DENY" +SECURE_REFERRER_POLICY = "strict-origin-when-cross-origin" + +DJANGO_DELETION_BATCH_SIZE = env.int("DJANGO_DELETION_BATCH_SIZE", 5000) diff --git a/api/src/backend/config/settings/sentry.py b/api/src/backend/config/settings/sentry.py index bb76173b6c..87d08bd6ee 100644 --- a/api/src/backend/config/settings/sentry.py +++ b/api/src/backend/config/settings/sentry.py @@ -12,6 +12,8 @@ IGNORED_EXCEPTIONS = [ "UnauthorizedOperation", "AuthFailure", "InvalidClientTokenId", + "AWSInvalidProviderIdError", + "InternalServerErrorException", "AccessDenied", "No Shodan API Key", # Shodan Check "RequestLimitExceeded", # For now we don't want to log the RequestLimitExceeded errors @@ -33,6 +35,13 @@ IGNORED_EXCEPTIONS = [ "ValidationException", "AWSSecretAccessKeyInvalidError", "InvalidAction", + "InvalidRequestException", + "RequestExpired", + "ConnectionClosedError", + "MaxRetryError", + "AWSAccessKeyIDInvalidError", + "AWSSessionTokenExpiredError", + "EndpointConnectionError", # AWS Service is not available in a region "Pool is closed", # The following comes from urllib3: eu-west-1 -- HTTPClientError[126]: An HTTP Client raised an unhandled exception: AWSHTTPSConnectionPool(host='hostname.s3.eu-west-1.amazonaws.com', port=443): Pool is closed. # Authentication Errors from GCP "ClientAuthenticationError", @@ -41,6 +50,8 @@ IGNORED_EXCEPTIONS = [ "Permission denied to get service", "API has not been used in project", "HttpError 404 when requesting", + "HttpError 403 when requesting", + "HttpError 400 when requesting", "GCPNoAccesibleProjectsError", # Authentication Errors from Azure "ClientAuthenticationError", @@ -49,6 +60,7 @@ IGNORED_EXCEPTIONS = [ "AzureNotValidClientIdError", "AzureNotValidClientSecretError", "AzureNotValidTenantIdError", + "AzureInvalidProviderIdError", "AzureTenantIdAndClientSecretNotBelongingToClientIdError", "AzureTenantIdAndClientIdNotBelongingToClientSecretError", "AzureClientIdAndClientSecretNotBelongingToTenantIdError", @@ -85,4 +97,6 @@ sentry_sdk.init( # possible. "continuous_profiling_auto_start": True, }, + attach_stacktrace=True, + ignore_errors=IGNORED_EXCEPTIONS, ) diff --git a/api/src/backend/config/settings/social_login.py b/api/src/backend/config/settings/social_login.py index 035a166279..6a48a0c38f 100644 --- a/api/src/backend/config/settings/social_login.py +++ b/api/src/backend/config/settings/social_login.py @@ -1,13 +1,13 @@ from config.env import env -# Google Oauth settings -GOOGLE_OAUTH_CLIENT_ID = env("DJANGO_GOOGLE_OAUTH_CLIENT_ID", default="") -GOOGLE_OAUTH_CLIENT_SECRET = env("DJANGO_GOOGLE_OAUTH_CLIENT_SECRET", default="") -GOOGLE_OAUTH_CALLBACK_URL = env("DJANGO_GOOGLE_OAUTH_CALLBACK_URL", default="") +# Provider Oauth settings +GOOGLE_OAUTH_CLIENT_ID = env("SOCIAL_GOOGLE_OAUTH_CLIENT_ID", default="") +GOOGLE_OAUTH_CLIENT_SECRET = env("SOCIAL_GOOGLE_OAUTH_CLIENT_SECRET", default="") +GOOGLE_OAUTH_CALLBACK_URL = env("SOCIAL_GOOGLE_OAUTH_CALLBACK_URL", default="") -GITHUB_OAUTH_CLIENT_ID = env("DJANGO_GITHUB_OAUTH_CLIENT_ID", default="") -GITHUB_OAUTH_CLIENT_SECRET = env("DJANGO_GITHUB_OAUTH_CLIENT_SECRET", default="") -GITHUB_OAUTH_CALLBACK_URL = env("DJANGO_GITHUB_OAUTH_CALLBACK_URL", default="") +GITHUB_OAUTH_CLIENT_ID = env("SOCIAL_GITHUB_OAUTH_CLIENT_ID", default="") +GITHUB_OAUTH_CLIENT_SECRET = env("SOCIAL_GITHUB_OAUTH_CLIENT_SECRET", default="") +GITHUB_OAUTH_CALLBACK_URL = env("SOCIAL_GITHUB_OAUTH_CALLBACK_URL", default="") # Allauth settings ACCOUNT_LOGIN_METHODS = {"email"} # Use Email / Password authentication diff --git a/api/src/backend/conftest.py b/api/src/backend/conftest.py index 9dc406ab5d..e47357f0e4 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 ( @@ -655,6 +656,7 @@ def findings_fixture(scans_fixture, resources_fixture): "Description": "test description orange juice", }, first_seen_at="2024-01-02T00:00:00Z", + muted=True, ) finding2.add_resources([resource2]) @@ -919,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/deletion.py b/api/src/backend/tasks/jobs/deletion.py index 74485c8765..1eeb323ab2 100644 --- a/api/src/backend/tasks/jobs/deletion.py +++ b/api/src/backend/tasks/jobs/deletion.py @@ -1,5 +1,5 @@ from celery.utils.log import get_task_logger -from django.db import transaction +from django.db import DatabaseError from api.db_router import MainRouter from api.db_utils import batch_delete, rls_transaction @@ -8,11 +8,12 @@ from api.models import Finding, Provider, Resource, Scan, ScanSummary, Tenant logger = get_task_logger(__name__) -def delete_provider(pk: str): +def delete_provider(tenant_id: str, pk: str): """ Gracefully deletes an instance of a provider along with its related data. Args: + tenant_id (str): Tenant ID the resources belong to. pk (str): The primary key of the Provider instance to delete. Returns: @@ -22,33 +23,31 @@ def delete_provider(pk: str): Raises: Provider.DoesNotExist: If no instance with the provided primary key exists. """ - instance = Provider.all_objects.get(pk=pk) - deletion_summary = {} + with rls_transaction(tenant_id): + instance = Provider.all_objects.get(pk=pk) + deletion_summary = {} + deletion_steps = [ + ("Scan Summaries", ScanSummary.all_objects.filter(scan__provider=instance)), + ("Findings", Finding.all_objects.filter(scan__provider=instance)), + ("Resources", Resource.all_objects.filter(provider=instance)), + ("Scans", Scan.all_objects.filter(provider=instance)), + ] - with transaction.atomic(): - # Delete Scan Summaries - scan_summaries_qs = ScanSummary.all_objects.filter(scan__provider=instance) - _, scans_summ_summary = batch_delete(scan_summaries_qs) - deletion_summary.update(scans_summ_summary) + for step_name, queryset in deletion_steps: + try: + _, step_summary = batch_delete(tenant_id, queryset) + deletion_summary.update(step_summary) + except DatabaseError as db_error: + logger.error(f"Error deleting {step_name}: {db_error}") + raise - # Delete Findings - findings_qs = Finding.all_objects.filter(scan__provider=instance) - _, findings_summary = batch_delete(findings_qs) - deletion_summary.update(findings_summary) - - # Delete Resources - resources_qs = Resource.all_objects.filter(provider=instance) - _, resources_summary = batch_delete(resources_qs) - deletion_summary.update(resources_summary) - - # Delete Scans - scans_qs = Scan.all_objects.filter(provider=instance) - _, scans_summary = batch_delete(scans_qs) - deletion_summary.update(scans_summary) - - provider_deleted_count, provider_summary = instance.delete() + try: + with rls_transaction(tenant_id): + _, provider_summary = instance.delete() deletion_summary.update(provider_summary) - + except DatabaseError as db_error: + logger.error(f"Error deleting Provider: {db_error}") + raise return deletion_summary @@ -66,9 +65,8 @@ def delete_tenant(pk: str): deletion_summary = {} for provider in Provider.objects.using(MainRouter.admin_read).filter(tenant_id=pk): - with rls_transaction(pk): - summary = delete_provider(provider.id) - deletion_summary.update(summary) + summary = delete_provider(pk, provider.id) + deletion_summary.update(summary) Tenant.objects.using(MainRouter.admin_db).filter(id=pk).delete() diff --git a/api/src/backend/tasks/jobs/export.py b/api/src/backend/tasks/jobs/export.py index 11c9e5c4cf..2bda9d6def 100644 --- a/api/src/backend/tasks/jobs/export.py +++ b/api/src/backend/tasks/jobs/export.py @@ -13,6 +13,41 @@ 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.compliance.prowler_threatscore.prowler_threatscore_m365 import ( + ProwlerThreatScoreM365, +) 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 +55,44 @@ 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), + (lambda name: name == "prowler_threatscore_m365", ProwlerThreatScoreM365), + ], +} + + # Predefined mapping for output formats and their configurations OUTPUT_FORMATS_MAPPING = { "csv": { @@ -43,13 +116,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 +179,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 +235,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 +244,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 5c165b4cb4..81fbfbb0e9 100644 --- a/api/src/backend/tasks/jobs/scan.py +++ b/api/src/backend/tasks/jobs/scan.py @@ -1,3 +1,4 @@ +import json import time from copy import deepcopy from datetime import datetime, timezone @@ -6,6 +7,7 @@ from celery.utils.log import get_task_logger from config.settings.celery import CELERY_DEADLOCK_ATTEMPTS from django.db import IntegrityError, OperationalError from django.db.models import Case, Count, IntegerField, Sum, When +from tasks.utils import CustomEncoder from api.compliance import ( PROWLER_COMPLIANCE_OVERVIEW_TEMPLATE, @@ -17,6 +19,7 @@ from api.models import ( Finding, Provider, Resource, + ResourceScanSummary, ResourceTag, Scan, ScanSummary, @@ -119,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): @@ -191,6 +195,17 @@ def perform_prowler_scan( if resource_instance.type != finding.resource_type: resource_instance.type = finding.resource_type updated_fields.append("type") + if resource_instance.metadata != finding.resource_metadata: + resource_instance.metadata = json.dumps( + finding.resource_metadata, cls=CustomEncoder + ) + updated_fields.append("metadata") + if resource_instance.details != finding.resource_details: + resource_instance.details = finding.resource_details + updated_fields.append("details") + if resource_instance.partition != finding.partition: + resource_instance.partition = finding.partition + updated_fields.append("partition") if updated_fields: with rls_transaction(tenant_id): resource_instance.save(update_fields=updated_fields) @@ -267,6 +282,8 @@ def perform_prowler_scan( check_id=finding.check_id, scan=scan_instance, first_seen_at=last_first_seen_at, + muted=finding.muted, + compliance=finding.compliance, ) finding_instance.add_resources([resource_instance]) @@ -280,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 @@ -299,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 @@ -402,21 +453,21 @@ def aggregate_findings(tenant_id: str, scan_id: str): ).annotate( fail=Sum( Case( - When(status="FAIL", then=1), + When(status="FAIL", muted=False, then=1), default=0, output_field=IntegerField(), ) ), _pass=Sum( Case( - When(status="PASS", then=1), + When(status="PASS", muted=False, then=1), default=0, output_field=IntegerField(), ) ), - muted=Sum( + muted_count=Sum( Case( - When(status="MUTED", then=1), + When(muted=True, then=1), default=0, output_field=IntegerField(), ) @@ -424,63 +475,63 @@ def aggregate_findings(tenant_id: str, scan_id: str): total=Count("id"), new=Sum( Case( - When(delta="new", then=1), + When(delta="new", muted=False, then=1), default=0, output_field=IntegerField(), ) ), changed=Sum( Case( - When(delta="changed", then=1), + When(delta="changed", muted=False, then=1), default=0, output_field=IntegerField(), ) ), unchanged=Sum( Case( - When(delta__isnull=True, then=1), + When(delta__isnull=True, muted=False, then=1), default=0, output_field=IntegerField(), ) ), fail_new=Sum( Case( - When(delta="new", status="FAIL", then=1), + When(delta="new", status="FAIL", muted=False, then=1), default=0, output_field=IntegerField(), ) ), fail_changed=Sum( Case( - When(delta="changed", status="FAIL", then=1), + When(delta="changed", status="FAIL", muted=False, then=1), default=0, output_field=IntegerField(), ) ), pass_new=Sum( Case( - When(delta="new", status="PASS", then=1), + When(delta="new", status="PASS", muted=False, then=1), default=0, output_field=IntegerField(), ) ), pass_changed=Sum( Case( - When(delta="changed", status="PASS", then=1), + When(delta="changed", status="PASS", muted=False, then=1), default=0, output_field=IntegerField(), ) ), muted_new=Sum( Case( - When(delta="new", status="MUTED", then=1), + When(delta="new", muted=True, then=1), default=0, output_field=IntegerField(), ) ), muted_changed=Sum( Case( - When(delta="changed", status="MUTED", then=1), + When(delta="changed", muted=True, then=1), default=0, output_field=IntegerField(), ) @@ -498,7 +549,7 @@ def aggregate_findings(tenant_id: str, scan_id: str): region=agg["resources__region"], fail=agg["fail"], _pass=agg["_pass"], - muted=agg["muted"], + muted=agg["muted_count"], total=agg["total"], new=agg["new"], changed=agg["changed"], diff --git a/api/src/backend/tasks/tasks.py b/api/src/backend/tasks/tasks.py index 607f3cacdd..090c0c33d3 100644 --- a/api/src/backend/tasks/tasks.py +++ b/api/src/backend/tasks/tasks.py @@ -1,3 +1,5 @@ +from datetime import datetime, timedelta, timezone +from pathlib import Path from shutil import rmtree from celery import chain, shared_task @@ -5,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, @@ -16,10 +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__) @@ -42,9 +50,10 @@ def check_provider_connection_task(provider_id: str): return check_provider_connection(provider_id=provider_id) -@shared_task(base=RLSTask, name="provider-deletion", queue="deletion") -@set_tenant -def delete_provider_task(provider_id: str): +@shared_task( + base=RLSTask, name="provider-deletion", queue="deletion", autoretry_for=(Exception,) +) +def delete_provider_task(provider_id: str, tenant_id: str): """ Task to delete a specific Provider instance. @@ -52,6 +61,7 @@ def delete_provider_task(provider_id: str): Args: provider_id (str): The primary key of the `Provider` instance to be deleted. + tenant_id (str): Tenant ID the provider belongs to. Returns: tuple: A tuple containing: @@ -59,7 +69,7 @@ def delete_provider_task(provider_id: str): - A dictionary with the count of deleted instances per model, including related models if cascading deletes were triggered. """ - return delete_provider(pk=provider_id) + return delete_provider(tenant_id=tenant_id, pk=provider_id) @shared_task(base=RLSTask, name="scan-perform", queue="scans") @@ -125,6 +135,43 @@ def perform_scheduled_scan_task(self, tenant_id: str, provider_id: str): periodic_task_instance = PeriodicTask.objects.get( name=f"scan-perform-scheduled-{provider_id}" ) + + executed_scan = Scan.objects.filter( + tenant_id=tenant_id, + provider_id=provider_id, + task__task_runner_task__task_id=task_id, + ).order_by("completed_at") + + if ( + Scan.objects.filter( + tenant_id=tenant_id, + provider_id=provider_id, + trigger=Scan.TriggerChoices.SCHEDULED, + state=StateChoices.EXECUTING, + scheduler_task_id=periodic_task_instance.id, + scheduled_at__date=datetime.now(timezone.utc).date(), + ).exists() + or executed_scan.exists() + ): + # Duplicated task execution due to visibility timeout or scan is already running + logger.warning(f"Duplicated scheduled scan for provider {provider_id}.") + try: + affected_scan = executed_scan.first() + if not affected_scan: + raise ValueError( + "Error retrieving affected scan details after detecting duplicated scheduled " + "scan." + ) + # Return the affected scan details to avoid losing data + serializer = ScanTaskSerializer(instance=affected_scan) + except Exception as duplicated_scan_exception: + logger.error( + f"Duplicated scheduled scan for provider {provider_id}. Error retrieving affected scan details: " + f"{str(duplicated_scan_exception)}" + ) + raise duplicated_scan_exception + return serializer.data + next_scan_datetime = get_next_execution_datetime(task_id, provider_id) scan_instance, _ = Scan.objects.get_or_create( tenant_id=tenant_id, @@ -132,7 +179,11 @@ def perform_scheduled_scan_task(self, tenant_id: str, provider_id: str): trigger=Scan.TriggerChoices.SCHEDULED, state__in=(StateChoices.SCHEDULED, StateChoices.AVAILABLE), scheduler_task_id=periodic_task_instance.id, - defaults={"state": StateChoices.SCHEDULED}, + defaults={ + "state": StateChoices.SCHEDULED, + "name": "Daily scheduled scan", + "scheduled_at": next_scan_datetime - timedelta(days=1), + }, ) scan_instance.task_id = task_id @@ -173,7 +224,7 @@ def perform_scan_summary_task(tenant_id: str, scan_id: str): return aggregate_findings(tenant_id=tenant_id, scan_id=scan_id) -@shared_task(name="tenant-deletion", queue="deletion") +@shared_task(name="tenant-deletion", queue="deletion", autoretry_for=(Exception,)) def delete_tenant_task(tenant_id: str): return delete_tenant(pk=tenant_id) @@ -200,80 +251,123 @@ def generate_outputs(scan_id: str, provider_id: str, tenant_id: str): scan_id (str): The scan identifier. provider_id (str): The provider_id id to be used in generating outputs. """ - # Initialize the prowler provider - prowler_provider = initialize_prowler_provider(Provider.objects.get(id=provider_id)) + # Check if the scan has findings + if not ScanSummary.objects.filter(scan_id=scan_id).exists(): + logger.info(f"No findings found for scan {scan_id}") + return {"upload": False} - # Get the provider UID - provider_uid = Provider.objects.get(id=provider_id).uid + 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 - # 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: - output_directory = uploaded - uploaded = True - # Remove the local files after upload - rmtree(DJANGO_TMP_OUTPUT_DIRECTORY, ignore_errors=True) + compressed = _compress_output_files(out_dir) + upload_uri = _upload_to_s3(tenant_id, compressed, scan_id) + + if upload_uri: + try: + rmtree(Path(compressed).parent, ignore_errors=True) + except Exception as e: + logger.error(f"Error deleting output files: {e}") + 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_deletion.py b/api/src/backend/tasks/tests/test_deletion.py index 00d218e192..81cdb44daa 100644 --- a/api/src/backend/tasks/tests/test_deletion.py +++ b/api/src/backend/tasks/tests/test_deletion.py @@ -9,17 +9,19 @@ from api.models import Provider, Tenant class TestDeleteProvider: def test_delete_provider_success(self, providers_fixture): instance = providers_fixture[0] - result = delete_provider(instance.id) + tenant_id = str(instance.tenant_id) + result = delete_provider(tenant_id, instance.id) assert result with pytest.raises(ObjectDoesNotExist): Provider.objects.get(pk=instance.id) - def test_delete_provider_does_not_exist(self): + def test_delete_provider_does_not_exist(self, tenants_fixture): + tenant_id = str(tenants_fixture[0].id) non_existent_pk = "babf6796-cfcc-4fd3-9dcf-88d012247645" with pytest.raises(ObjectDoesNotExist): - delete_provider(non_existent_pk) + delete_provider(tenant_id, non_existent_pk) @pytest.mark.django_db 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_scan.py b/api/src/backend/tasks/tests/test_scan.py index 78ba36fde8..8880b8bd03 100644 --- a/api/src/backend/tasks/tests/test_scan.py +++ b/api/src/backend/tasks/tests/test_scan.py @@ -1,3 +1,4 @@ +import json import uuid from unittest.mock import MagicMock, patch @@ -7,6 +8,7 @@ from tasks.jobs.scan import ( _store_resources, perform_prowler_scan, ) +from tasks.utils import CustomEncoder from api.models import ( Finding, @@ -107,7 +109,13 @@ class TestPerformScan: finding.service_name = "service_name" finding.resource_type = "resource_type" finding.resource_tags = {"tag1": "value1", "tag2": "value2"} + finding.muted = False finding.raw = {} + finding.resource_metadata = {"test": "metadata"} + finding.resource_details = {"details": "test"} + finding.partition = "partition" + finding.muted = True + finding.compliance = {"compliance1": "PASS"} # Mock the ProwlerScan instance mock_prowler_scan_instance = MagicMock() @@ -145,6 +153,8 @@ class TestPerformScan: assert scan_finding.severity == finding.severity assert scan_finding.check_id == finding.check_id assert scan_finding.raw_result == finding.raw + assert scan_finding.muted + assert scan_finding.compliance == finding.compliance assert scan_resource.tenant == tenant assert scan_resource.uid == finding.resource_uid @@ -152,6 +162,11 @@ class TestPerformScan: assert scan_resource.service == finding.service_name assert scan_resource.type == finding.resource_type assert scan_resource.name == finding.resource_name + assert scan_resource.metadata == json.dumps( + finding.resource_metadata, cls=CustomEncoder + ) + assert scan_resource.details == f"{finding.resource_details}" + assert scan_resource.partition == finding.partition # Assert that the resource tags have been created and associated tags = scan_resource.tags.all() 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/src/backend/tasks/utils.py b/api/src/backend/tasks/utils.py index 26a5aac01f..21e30c9e29 100644 --- a/api/src/backend/tasks/utils.py +++ b/api/src/backend/tasks/utils.py @@ -1,9 +1,32 @@ +import json from datetime import datetime, timedelta, timezone +from enum import Enum from django_celery_beat.models import PeriodicTask from django_celery_results.models import TaskResult +class CustomEncoder(json.JSONEncoder): + def default(self, o): + # Enum serialization + if isinstance(o, Enum): + return o.value + # Datetime and timedelta serialization + if isinstance(o, datetime): + return o.isoformat(timespec="seconds") + if isinstance(o, timedelta): + return o.total_seconds() + + # Custom object serialization + try: + return super().default(o) + except TypeError: + try: + return o.__dict__ + except AttributeError: + return str(o) + + def get_next_execution_datetime(task_id: int, provider_id: str) -> datetime: task_instance = TaskResult.objects.get(task_id=task_id) try: diff --git a/prowler/compliance/microsoft365/__init__.py b/api/tests/performance/__init__.py similarity index 100% rename from prowler/compliance/microsoft365/__init__.py rename to api/tests/performance/__init__.py diff --git a/api/tests/performance/benchmark.py b/api/tests/performance/benchmark.py new file mode 100644 index 0000000000..c527a3c729 --- /dev/null +++ b/api/tests/performance/benchmark.py @@ -0,0 +1,156 @@ +#!/usr/bin/env python3 +import argparse +import os +import re +import subprocess +import sys +from pathlib import Path + +import matplotlib.pyplot as plt +import pandas as pd + +plt.style.use("ggplot") + + +def run_locust( + locust_file: str, + host: str, + users: int, + hatch_rate: int, + run_time: str, + csv_prefix: Path, +) -> Path: + artifacts_dir = Path("artifacts") + artifacts_dir.mkdir(parents=True, exist_ok=True) + + cmd = [ + "locust", + "-f", + f"scenarios/{locust_file}", + "--headless", + "-u", + str(users), + "-r", + str(hatch_rate), + "-t", + run_time, + "--host", + host, + "--csv", + str(artifacts_dir / csv_prefix.name), + ] + print(f"Running Locust: {' '.join(cmd)}") + process = subprocess.run(cmd) + if process.returncode: + sys.exit("Locust execution failed") + + stats_file = artifacts_dir / f"{csv_prefix.stem}_stats.csv" + if not stats_file.exists(): + sys.exit(f"Stats CSV not found: {stats_file}") + return stats_file + + +def load_percentiles(csv_path: Path) -> pd.DataFrame: + df = pd.read_csv(csv_path) + mapping = {"50%": "p50", "75%": "p75", "90%": "p90", "95%": "p95"} + available = [col for col in mapping if col in df.columns] + renamed = {col: mapping[col] for col in available} + df = df.rename(columns=renamed).set_index("Name")[renamed.values()] + return df.drop(index=["Aggregated"], errors="ignore") + + +def sanitize_label(label: str) -> str: + text = re.sub(r"[^\w]+", "_", label.strip().lower()) + return text.strip("_") + + +def plot_multi_comparison(metrics: dict[str, pd.DataFrame]) -> None: + common = sorted(set.intersection(*(set(df.index) for df in metrics.values()))) + percentiles = list(next(iter(metrics.values())).columns) + groups = len(metrics) + width = 0.8 / groups + + for endpoint in common: + fig, ax = plt.subplots(figsize=(10, 5), dpi=100) + for idx, (label, df) in enumerate(metrics.items()): + series = df.loc[endpoint] + positions = [ + i + (idx - groups / 2) * width + width / 2 + for i in range(len(percentiles)) + ] + bars = ax.bar(positions, series.values, width, label=label) + for bar in bars: + height = bar.get_height() + ax.annotate( + f"{int(height)}", + xy=(bar.get_x() + bar.get_width() / 2, height), + xytext=(0, 3), + textcoords="offset points", + ha="center", + va="bottom", + fontsize=8, + ) + + ax.set_xticks(range(len(percentiles))) + ax.set_xticklabels(percentiles) + ax.set_ylabel("Latency (ms)") + ax.set_title(endpoint, fontsize=12) + ax.grid(True, axis="y", linestyle="--", alpha=0.7) + + fig.tight_layout() + fig.subplots_adjust(right=0.75) + ax.legend(loc="center left", bbox_to_anchor=(1, 0.5), framealpha=0.9) + + output = Path("artifacts") / f"comparison_{sanitize_label(endpoint)}.png" + plt.savefig(output) + plt.close(fig) + print(f"Saved chart: {output}") + + +def main() -> None: + parser = argparse.ArgumentParser(description="Run Locust and compare metrics") + parser.add_argument("--locustfile", required=True, help="Locust file in scenarios/") + parser.add_argument("--host", required=True, help="Target host URL") + parser.add_argument( + "--users", type=int, default=10, help="Number of simulated users" + ) + parser.add_argument("--rate", type=int, default=1, help="Hatch rate per second") + parser.add_argument("--time", default="1m", help="Test duration (e.g. 30s, 1m)") + parser.add_argument( + "--metrics-dir", default="baselines", help="Directory with CSV baselines" + ) + parser.add_argument("--version", default="current", help="Test version") + args = parser.parse_args() + + metrics_dir = Path(args.metrics_dir) + os.makedirs(metrics_dir, exist_ok=True) + + metrics_data: dict[str, pd.DataFrame] = {} + for csv_file in sorted(metrics_dir.glob("*.csv")): + metrics_data[csv_file.stem] = load_percentiles(csv_file) + + current_prefix = Path(args.version) + current_csv = run_locust( + locust_file=args.locustfile, + host=args.host, + users=args.users, + hatch_rate=args.rate, + run_time=args.time, + csv_prefix=current_prefix, + ) + metrics_data[args.version] = load_percentiles(current_csv) + + for endpoint in sorted( + set.intersection(*(set(df.index) for df in metrics_data.values())) + ): + parts = [endpoint] + for label, df in metrics_data.items(): + s = df.loc[endpoint] + parts.append(f"{label}: p50 {s.p50}, p75 {s.p75}, p90 {s.p90}, p95 {s.p95}") + print(" | ".join(parts)) + + plot_multi_comparison(metrics_data) + + +if __name__ == "__main__": + main() diff --git a/api/tests/performance/requirements.txt b/api/tests/performance/requirements.txt new file mode 100644 index 0000000000..3b713953c7 --- /dev/null +++ b/api/tests/performance/requirements.txt @@ -0,0 +1,3 @@ +locust==2.34.1 +matplotlib==3.10.1 +pandas==2.2.3 diff --git a/prowler/providers/microsoft365/__init__.py b/api/tests/performance/scenarios/__init__.py similarity index 100% rename from prowler/providers/microsoft365/__init__.py rename to api/tests/performance/scenarios/__init__.py diff --git a/api/tests/performance/scenarios/findings.py b/api/tests/performance/scenarios/findings.py new file mode 100644 index 0000000000..acd32f2497 --- /dev/null +++ b/api/tests/performance/scenarios/findings.py @@ -0,0 +1,216 @@ +from locust import events, task +from utils.config import ( + FINDINGS_UI_SORT_VALUES, + L_PROVIDER_NAME, + M_PROVIDER_NAME, + S_PROVIDER_NAME, + TARGET_INSERTED_AT, +) +from utils.helpers import ( + APIUserBase, + get_api_token, + get_auth_headers, + get_next_resource_filter, + get_resource_filters_pairs, + get_scan_id_from_provider_name, + get_sort_value, +) + +GLOBAL = { + "token": None, + "scan_ids": {}, + "resource_filters": None, + "large_resource_filters": None, +} + + +@events.test_start.add_listener +def on_test_start(environment, **kwargs): + GLOBAL["token"] = get_api_token(environment.host) + + GLOBAL["scan_ids"]["small"] = get_scan_id_from_provider_name( + environment.host, GLOBAL["token"], S_PROVIDER_NAME + ) + GLOBAL["scan_ids"]["medium"] = get_scan_id_from_provider_name( + environment.host, GLOBAL["token"], M_PROVIDER_NAME + ) + GLOBAL["scan_ids"]["large"] = get_scan_id_from_provider_name( + environment.host, GLOBAL["token"], L_PROVIDER_NAME + ) + + GLOBAL["resource_filters"] = get_resource_filters_pairs( + environment.host, GLOBAL["token"] + ) + GLOBAL["large_resource_filters"] = get_resource_filters_pairs( + environment.host, GLOBAL["token"], GLOBAL["scan_ids"]["large"] + ) + + +class APIUser(APIUserBase): + def on_start(self): + self.token = GLOBAL["token"] + self.s_scan_id = GLOBAL["scan_ids"]["small"] + self.m_scan_id = GLOBAL["scan_ids"]["medium"] + self.l_scan_id = GLOBAL["scan_ids"]["large"] + self.available_resource_filters = GLOBAL["resource_filters"] + self.available_resource_filters_large_scan = GLOBAL["large_resource_filters"] + + @task + def findings_default(self): + name = "/findings" + page_number = self._next_page(name) + endpoint = ( + f"/findings?page[number]={page_number}" + f"&{get_sort_value(FINDINGS_UI_SORT_VALUES)}" + f"&filter[inserted_at]={TARGET_INSERTED_AT}" + ) + self.client.get(endpoint, headers=get_auth_headers(self.token), name=name) + + @task(3) + def findings_default_include(self): + name = "/findings?include" + page = self._next_page(name) + endpoint = ( + f"/findings?page[number]={page}" + f"&{get_sort_value(FINDINGS_UI_SORT_VALUES)}" + f"&filter[inserted_at]={TARGET_INSERTED_AT}" + f"&include=scan.provider,resources" + ) + self.client.get(endpoint, headers=get_auth_headers(self.token), name=name) + + @task(3) + def findings_metadata(self): + endpoint = f"/findings/metadata?" f"filter[inserted_at]={TARGET_INSERTED_AT}" + self.client.get( + endpoint, headers=get_auth_headers(self.token), name="/findings/metadata" + ) + + @task + def findings_scan_small(self): + name = "/findings?filter[scan_id] - 50k" + page_number = self._next_page(name) + endpoint = ( + f"/findings?page[number]={page_number}" + f"&{get_sort_value(FINDINGS_UI_SORT_VALUES)}" + f"&filter[scan]={self.s_scan_id}" + ) + self.client.get(endpoint, headers=get_auth_headers(self.token), name=name) + + @task + def findings_metadata_scan_small(self): + endpoint = f"/findings/metadata?" f"&filter[scan]={self.s_scan_id}" + self.client.get( + endpoint, + headers=get_auth_headers(self.token), + name="/findings/metadata?filter[scan_id] - 50k", + ) + + @task(2) + def findings_scan_medium(self): + name = "/findings?filter[scan_id] - 250k" + page_number = self._next_page(name) + endpoint = ( + f"/findings?page[number]={page_number}" + f"&{get_sort_value(FINDINGS_UI_SORT_VALUES)}" + f"&filter[scan]={self.m_scan_id}" + ) + self.client.get(endpoint, headers=get_auth_headers(self.token), name=name) + + @task + def findings_metadata_scan_medium(self): + endpoint = f"/findings/metadata?" f"&filter[scan]={self.m_scan_id}" + self.client.get( + endpoint, + headers=get_auth_headers(self.token), + name="/findings/metadata?filter[scan_id] - 250k", + ) + + @task + def findings_scan_large(self): + name = "/findings?filter[scan_id] - 500k" + page_number = self._next_page(name) + endpoint = ( + f"/findings?page[number]={page_number}" + f"&{get_sort_value(FINDINGS_UI_SORT_VALUES)}" + f"&filter[scan]={self.l_scan_id}" + ) + self.client.get(endpoint, headers=get_auth_headers(self.token), name=name) + + @task + def findings_scan_large_include(self): + name = "/findings?filter[scan_id]&include - 500k" + page_number = self._next_page(name) + endpoint = ( + f"/findings?page[number]={page_number}" + f"&{get_sort_value(FINDINGS_UI_SORT_VALUES)}" + f"&filter[scan]={self.l_scan_id}" + f"&include=scan.provider,resources" + ) + self.client.get(endpoint, headers=get_auth_headers(self.token), name=name) + + @task + def findings_metadata_scan_large(self): + endpoint = f"/findings/metadata?" f"&filter[scan]={self.l_scan_id}" + self.client.get( + endpoint, + headers=get_auth_headers(self.token), + name="/findings/metadata?filter[scan_id] - 500k", + ) + + @task(2) + def findings_resource_filter(self): + name = "/findings?filter[resource_filter]&include" + filter_name, filter_value = get_next_resource_filter( + self.available_resource_filters + ) + + endpoint = ( + f"/findings?filter[{filter_name}]={filter_value}" + f"&filter[inserted_at]={TARGET_INSERTED_AT}" + f"&{get_sort_value(FINDINGS_UI_SORT_VALUES)}" + f"&include=scan.provider,resources" + ) + self.client.get(endpoint, headers=get_auth_headers(self.token), name=name) + + @task(3) + def findings_metadata_resource_filter(self): + name = "/findings/metadata?filter[resource_filter]" + filter_name, filter_value = get_next_resource_filter( + self.available_resource_filters + ) + + endpoint = ( + 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(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( + self.available_resource_filters + ) + + endpoint = ( + f"/findings?filter[{filter_name}]={filter_value}" + f"&{get_sort_value(FINDINGS_UI_SORT_VALUES)}" + f"&filter[scan]={self.l_scan_id}" + f"&include=scan.provider,resources" + ) + self.client.get(endpoint, headers=get_auth_headers(self.token), name=name) diff --git a/prowler/providers/microsoft365/lib/__init__.py b/api/tests/performance/utils/__init__.py similarity index 100% rename from prowler/providers/microsoft365/lib/__init__.py rename to api/tests/performance/utils/__init__.py diff --git a/api/tests/performance/utils/config.py b/api/tests/performance/utils/config.py new file mode 100644 index 0000000000..febc5e0a24 --- /dev/null +++ b/api/tests/performance/utils/config.py @@ -0,0 +1,19 @@ +import os + +USER_EMAIL = os.environ.get("USER_EMAIL") +USER_PASSWORD = os.environ.get("USER_PASSWORD") + +BASE_HEADERS = {"Content-Type": "application/vnd.api+json"} + +FINDINGS_UI_SORT_VALUES = ["severity", "status", "-inserted_at"] +TARGET_INSERTED_AT = os.environ.get("TARGET_INSERTED_AT", "2025-04-22") + +FINDINGS_RESOURCE_METADATA = { + "regions": "region", + "resource_types": "resource_type", + "services": "service", +} + +S_PROVIDER_NAME = "provider-50k" +M_PROVIDER_NAME = "provider-250k" +L_PROVIDER_NAME = "provider-500k" diff --git a/api/tests/performance/utils/helpers.py b/api/tests/performance/utils/helpers.py new file mode 100644 index 0000000000..999a2d55c8 --- /dev/null +++ b/api/tests/performance/utils/helpers.py @@ -0,0 +1,168 @@ +import random +from collections import defaultdict +from threading import Lock + +import requests +from locust import HttpUser, between +from utils.config import ( + BASE_HEADERS, + FINDINGS_RESOURCE_METADATA, + TARGET_INSERTED_AT, + USER_EMAIL, + USER_PASSWORD, +) + +_global_page_counters = defaultdict(int) +_page_lock = Lock() + + +class APIUserBase(HttpUser): + """ + Base class for API user simulation in Locust performance tests. + + Attributes: + abstract (bool): Indicates this is an abstract user class. + wait_time: Time between task executions, randomized between 1 and 5 seconds. + """ + + abstract = True + wait_time = between(1, 5) + + def _next_page(self, endpoint_name: str) -> int: + """ + Returns the next page number for a given endpoint. Thread-safe. + + Args: + endpoint_name (str): Name of the API endpoint being paginated. + + Returns: + int: The next page number for the given endpoint. + """ + with _page_lock: + _global_page_counters[endpoint_name] += 1 + return _global_page_counters[endpoint_name] + + +def get_next_resource_filter(available_values: dict) -> tuple: + """ + Randomly selects a filter type and value from available options. + + Args: + available_values (dict): Dictionary with filter types as keys and list of possible values. + + Returns: + tuple: A (filter_type, filter_value) pair randomly selected. + """ + filter_type = random.choice(list(available_values.keys())) + filter_value = random.choice(available_values[filter_type]) + return filter_type, filter_value + + +def get_auth_headers(token: str) -> dict: + """ + Returns the headers for the API requests. + + Args: + token (str): The token to be included in the headers. + + Returns: + dict: The headers for the API requests. + """ + return { + "Authorization": f"Bearer {token}", + **BASE_HEADERS, + } + + +def get_api_token(host: str) -> str: + """ + Authenticates with the API and retrieves a bearer token. + + Args: + host (str): The host URL of the API. + + Returns: + str: The access token for authenticated requests. + + Raises: + AssertionError: If the request fails or does not return a 200 status code. + """ + login_payload = { + "data": { + "type": "tokens", + "attributes": {"email": USER_EMAIL, "password": USER_PASSWORD}, + } + } + response = requests.post(f"{host}/tokens", json=login_payload, headers=BASE_HEADERS) + assert response.status_code == 200, f"Failed to get token: {response.text}" + return response.json()["data"]["attributes"]["access"] + + +def get_scan_id_from_provider_name(host: str, token: str, provider_name: str) -> str: + """ + Retrieves the scan ID associated with a specific provider name. + + Args: + host (str): The host URL of the API. + token (str): Bearer token for authentication. + provider_name (str): Name of the provider to filter scans by. + + Returns: + str: The ID of the scan. + + Raises: + AssertionError: If the request fails or does not return a 200 status code. + """ + response = requests.get( + f"{host}/scans?fields[scans]=id&filter[provider_alias]={provider_name}", + headers=get_auth_headers(token), + ) + assert response.status_code == 200, f"Failed to get scan: {response.text}" + return response.json()["data"][0]["id"] + + +def get_resource_filters_pairs(host: str, token: str, scan_id: str = "") -> dict: + """ + Retrieves and maps resource metadata filter values from the findings endpoint. + + Args: + host (str): The host URL of the API. + token (str): Bearer token for authentication. + scan_id (str, optional): Optional scan ID to filter metadata. Defaults to using inserted_at timestamp. + + Returns: + dict: A dictionary of resource filter metadata. + + Raises: + AssertionError: If the request fails or does not return a 200 status code. + """ + metadata_filters = ( + f"filter[scan]={scan_id}" + if scan_id + else f"filter[inserted_at]={TARGET_INSERTED_AT}" + ) + response = requests.get( + f"{host}/findings/metadata?{metadata_filters}", headers=get_auth_headers(token) + ) + assert ( + response.status_code == 200 + ), f"Failed to get resource filters values: {response.text}" + attributes = response.json()["data"]["attributes"] + return { + FINDINGS_RESOURCE_METADATA[key]: values + for key, values in attributes.items() + if key in FINDINGS_RESOURCE_METADATA.keys() + } + + +def get_sort_value(sort_values: list) -> str: + """ + Constructs a sort query string from a list of sort keys. + + Args: + sort_values (list): The list of sort values to include in the query. + + Returns: + str: A formatted sort query string (e.g., "sort=created_at,-severity"). + """ + return f"sort={','.join(sort_values)}" diff --git a/contrib/aws/multi-account-securityhub/run-prowler-securityhub.sh b/contrib/aws/multi-account-securityhub/run-prowler-securityhub.sh index 51fef78f77..c101da8613 100755 --- a/contrib/aws/multi-account-securityhub/run-prowler-securityhub.sh +++ b/contrib/aws/multi-account-securityhub/run-prowler-securityhub.sh @@ -1,6 +1,9 @@ #!/bin/bash # Run Prowler against All AWS Accounts in an AWS Organization +# Activate Poetry Environment +eval "$(poetry env activate)" + # Show Prowler Version prowler -v diff --git a/contrib/aws/org-multi-account/src/run-prowler-reports.sh b/contrib/aws/org-multi-account/src/run-prowler-reports.sh index 350ceefb6b..b7488b12e2 100644 --- a/contrib/aws/org-multi-account/src/run-prowler-reports.sh +++ b/contrib/aws/org-multi-account/src/run-prowler-reports.sh @@ -89,7 +89,7 @@ for accountId in $ACCOUNTS_IN_ORGS; do # Run Prowler echo -e "Assessing AWS Account: $accountId, using Role: $ROLE on $(date)" # remove -g cislevel for a full report and add other formats if needed - ./prowler/prowler.py --role arn:"$PARTITION":iam::"$accountId":role/"$ROLE" --compliance cis_1.5_aws -M html + ./prowler/prowler-cli.py --role arn:"$PARTITION":iam::"$accountId":role/"$ROLE" --compliance cis_1.5_aws -M html echo "Report stored locally at: prowler/output/ directory" TOTAL_SEC=$((SECONDS - START_TIME)) echo -e "Completed AWS Account: $accountId, using Role: $ROLE on $(date)" diff --git a/contrib/k8s/cronjob.yml b/contrib/k8s/cronjob.yml index 26bf13a6b5..87ad6d05f2 100644 --- a/contrib/k8s/cronjob.yml +++ b/contrib/k8s/cronjob.yml @@ -17,7 +17,7 @@ spec: image: toniblyx/prowler:latest imagePullPolicy: Always command: - - "./prowler.py" + - "./prowler-cli.py" args: [ "-B", "$(awsS3Bucket)" ] env: - name: AWS_ACCESS_KEY_ID diff --git a/contrib/k8s/helm/prowler-api/values.yaml b/contrib/k8s/helm/prowler-api/values.yaml index 16cd48058c..40a7fda298 100644 --- a/contrib/k8s/helm/prowler-api/values.yaml +++ b/contrib/k8s/helm/prowler-api/values.yaml @@ -399,7 +399,6 @@ mainConfig: [ "RSA-1024", "P-192", - "SHA-1", ] # AWS EKS Configuration diff --git a/contrib/k8s/helm/prowler-cli/templates/job.yaml b/contrib/k8s/helm/prowler-cli/templates/job.yaml index 1cb0c078ea..408c28dfac 100644 --- a/contrib/k8s/helm/prowler-cli/templates/job.yaml +++ b/contrib/k8s/helm/prowler-cli/templates/job.yaml @@ -16,7 +16,6 @@ spec: containers: - name: prowler image: {{ .Values.image.repository }}:{{ .Values.image.tag }} - command: ["prowler"] args: ["kubernetes", "-z", "-b"] imagePullPolicy: {{ .Values.image.pullPolicy }} volumeMounts: diff --git a/dashboard/__main__.py b/dashboard/__main__.py index 3bfb4c623a..dac536ccdf 100644 --- a/dashboard/__main__.py +++ b/dashboard/__main__.py @@ -161,7 +161,7 @@ def update_nav_bar(pathname): html.Span( [ html.Img(src="assets/favicon.ico", className="w-5"), - "Subscribe to prowler SaaS", + "Subscribe to Prowler Cloud", ], className="flex items-center gap-x-3 text-white", ), diff --git a/dashboard/assets/images/providers/m365_provider.png b/dashboard/assets/images/providers/m365_provider.png new file mode 100644 index 0000000000..d5bc8bbe5f Binary files /dev/null and b/dashboard/assets/images/providers/m365_provider.png differ diff --git a/dashboard/assets/styles/dist/output.css b/dashboard/assets/styles/dist/output.css index 62954fc771..37505d12e2 100644 --- a/dashboard/assets/styles/dist/output.css +++ b/dashboard/assets/styles/dist/output.css @@ -1361,6 +1361,9 @@ video { .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } + .lg\:grid-cols-5 { + grid-template-columns: repeat(5, minmax(0, 1fr)); + } .lg\:justify-normal { justify-content: normal; @@ -1403,4 +1406,4 @@ video { .\32xl\:w-\[9\%\] { width: 9%; } -} \ No newline at end of file +} diff --git a/dashboard/common_methods.py b/dashboard/common_methods.py index cff28b62d9..338b6e6473 100644 --- a/dashboard/common_methods.py +++ b/dashboard/common_methods.py @@ -2228,13 +2228,356 @@ def get_section_containers_ens(data, section_1, section_2, section_3, section_4) return html.Div(section_containers, className="compliance-data-layout") +def get_section_containers_3_levels(data, section_1, section_2, section_3): + data["STATUS"] = data["STATUS"].apply(map_status_to_icon) + findings_counts_marco = ( + data.groupby([section_1, "STATUS"]).size().unstack(fill_value=0) + ) + section_containers = [] + data[section_1] = data[section_1].astype(str) + data[section_2] = data[section_2].astype(str) + data[section_3] = data[section_3].astype(str) + + data.sort_values( + by=section_3, + key=lambda x: x.map(extract_numeric_values), + ascending=True, + inplace=True, + ) + + for marco in data[section_1].unique(): + success_marco = findings_counts_marco.loc[marco].get(pass_emoji, 0) + failed_marco = findings_counts_marco.loc[marco].get(fail_emoji, 0) + + fig_name = go.Figure( + [ + go.Bar( + name="Failed", + x=[failed_marco], + y=[""], + orientation="h", + marker=dict(color="#e77676"), + width=[0.8], + ), + go.Bar( + name="Success", + x=[success_marco], + y=[""], + orientation="h", + marker=dict(color="#45cc6e"), + width=[0.8], + ), + ] + ) + fig_name.update_layout( + barmode="stack", + margin=dict(l=10, r=10, t=10, b=10), + paper_bgcolor="rgba(0,0,0,0)", + plot_bgcolor="rgba(0,0,0,0)", + showlegend=False, + width=350, + height=30, + xaxis=dict(showticklabels=False, showgrid=False, zeroline=False), + yaxis=dict(showticklabels=False, showgrid=False, zeroline=False), + annotations=[ + dict( + x=success_marco + failed_marco, + y=0, + xref="x", + yref="y", + text=str(success_marco), + showarrow=False, + font=dict(color="#45cc6e", size=14), + xanchor="left", + yanchor="middle", + ), + dict( + x=0, + y=0, + xref="x", + yref="y", + text=str(failed_marco), + showarrow=False, + font=dict(color="#e77676", size=14), + xanchor="right", + yanchor="middle", + ), + ], + ) + fig_name.add_annotation( + x=failed_marco, + y=0.3, + text="|", + showarrow=False, + font=dict(size=20), + xanchor="center", + yanchor="middle", + ) + + graph_div = html.Div( + dcc.Graph( + figure=fig_name, config={"staticPlot": True}, className="info-bar" + ), + className="graph-section", + ) + direct_internal_items = [] + + for categoria in data[data[section_1] == marco][section_2].unique(): + specific_data = data[ + (data[section_1] == marco) & (data[section_2] == categoria) + ] + findings_counts_categoria = ( + specific_data.groupby([section_2, "STATUS"]) + .size() + .unstack(fill_value=0) + ) + success_categoria = findings_counts_categoria.loc[categoria].get( + pass_emoji, 0 + ) + failed_categoria = findings_counts_categoria.loc[categoria].get( + fail_emoji, 0 + ) + + fig_section = go.Figure( + [ + go.Bar( + name="Failed", + x=[failed_categoria], + y=[""], + orientation="h", + marker=dict(color="#e77676"), + width=[0.8], + ), + go.Bar( + name="Success", + x=[success_categoria], + y=[""], + orientation="h", + marker=dict(color="#45cc6e"), + width=[0.8], + ), + ] + ) + fig_section.update_layout( + barmode="stack", + margin=dict(l=10, r=10, t=10, b=10), + paper_bgcolor="rgba(0,0,0,0)", + plot_bgcolor="rgba(0,0,0,0)", + showlegend=False, + width=350, + height=30, + xaxis=dict(showticklabels=False, showgrid=False, zeroline=False), + yaxis=dict(showticklabels=False, showgrid=False, zeroline=False), + annotations=[ + dict( + x=success_categoria + failed_categoria, + y=0, + xref="x", + yref="y", + text=str(success_categoria), + showarrow=False, + font=dict(color="#45cc6e", size=14), + xanchor="left", + yanchor="middle", + ), + dict( + x=0, + y=0, + xref="x", + yref="y", + text=str(failed_categoria), + showarrow=False, + font=dict(color="#e77676", size=14), + xanchor="right", + yanchor="middle", + ), + ], + ) + fig_section.add_annotation( + x=failed_categoria, + y=0.3, + text="|", + showarrow=False, + font=dict(size=20), + xanchor="center", + yanchor="middle", + ) + + graph_div_section = html.Div( + dcc.Graph( + figure=fig_section, + config={"staticPlot": True}, + className="info-bar-child", + ), + className="graph-section-req", + ) + direct_internal_items_idgrupocontrol = [] + + for idgrupocontrol in specific_data[section_3].unique(): + specific_data2 = specific_data[ + specific_data[section_3] == idgrupocontrol + ] + findings_counts_idgrupocontrol = ( + specific_data2.groupby([section_3, "STATUS"]) + .size() + .unstack(fill_value=0) + ) + success_idgrupocontrol = findings_counts_idgrupocontrol.loc[ + idgrupocontrol + ].get(pass_emoji, 0) + failed_idgrupocontrol = findings_counts_idgrupocontrol.loc[ + idgrupocontrol + ].get(fail_emoji, 0) + + fig_idgrupocontrol = go.Figure( + [ + go.Bar( + name="Failed", + x=[failed_idgrupocontrol], + y=[""], + orientation="h", + marker=dict(color="#e77676"), + width=[0.8], + ), + go.Bar( + name="Success", + x=[success_idgrupocontrol], + y=[""], + orientation="h", + marker=dict(color="#45cc6e"), + width=[0.8], + ), + ] + ) + fig_idgrupocontrol.update_layout( + barmode="stack", + margin=dict(l=10, r=10, t=10, b=10), + paper_bgcolor="rgba(0,0,0,0)", + plot_bgcolor="rgba(0,0,0,0)", + showlegend=False, + width=350, + height=30, + xaxis=dict(showticklabels=False, showgrid=False, zeroline=False), + yaxis=dict(showticklabels=False, showgrid=False, zeroline=False), + annotations=[ + dict( + x=success_idgrupocontrol + failed_idgrupocontrol, + y=0, + xref="x", + yref="y", + text=str(success_idgrupocontrol), + showarrow=False, + font=dict(color="#45cc6e", size=14), + xanchor="left", + yanchor="middle", + ), + dict( + x=0, + y=0, + xref="x", + yref="y", + text=str(failed_idgrupocontrol), + showarrow=False, + font=dict(color="#e77676", size=14), + xanchor="right", + yanchor="middle", + ), + ], + ) + fig_idgrupocontrol.add_annotation( + x=failed_idgrupocontrol, + y=0.3, + text="|", + showarrow=False, + font=dict(size=20), + xanchor="center", + yanchor="middle", + ) + + graph_div_idgrupocontrol = html.Div( + dcc.Graph( + figure=fig_idgrupocontrol, + config={"staticPlot": True}, + className="info-bar-child", + ), + className="graph-section-req", + ) + + data_table = dash_table.DataTable( + data=specific_data2.to_dict("records"), + columns=[ + {"name": i, "id": i} + for i in [ + "CHECKID", + "STATUS", + "REGION", + "ACCOUNTID", + "RESOURCEID", + ] + ], + style_table={"overflowX": "auto"}, + style_as_list_view=True, + style_cell={"textAlign": "left", "padding": "5px"}, + ) + + internal_accordion_item_2 = dbc.AccordionItem( + title=idgrupocontrol, + children=[ + graph_div_idgrupocontrol, + html.Div([data_table], className="inner-accordion-content"), + ], + ) + direct_internal_items_idgrupocontrol.append( + html.Div( + [ + graph_div_idgrupocontrol, + dbc.Accordion( + [internal_accordion_item_2], + start_collapsed=True, + flush=True, + ), + ], + className="accordion-inner--child", + ) + ) + + internal_accordion_item = dbc.AccordionItem( + title=categoria, + children=direct_internal_items_idgrupocontrol, + ) + internal_section_container = html.Div( + [ + graph_div_section, + dbc.Accordion( + [internal_accordion_item], start_collapsed=True, flush=True + ), + ], + className="accordion-inner--child", + ) + direct_internal_items.append(internal_section_container) + + accordion_item = dbc.AccordionItem(title=marco, children=direct_internal_items) + section_container = html.Div( + [ + graph_div, + dbc.Accordion([accordion_item], start_collapsed=True, flush=True), + ], + className="accordion-inner", + ) + section_containers.append(section_container) + + return html.Div(section_containers, className="compliance-data-layout") + + # This function extracts and compares up to two numeric values, ensuring correct sorting for version-like strings. def extract_numeric_values(value): numbers = re.findall(r"\d+", str(value)) - if len(numbers) >= 2: + if len(numbers) == 3: + return int(numbers[0]), int(numbers[1]), int(numbers[2]) + elif len(numbers) == 2: return int(numbers[0]), int(numbers[1]) elif len(numbers) == 1: - return int(numbers[0]), 0 + return int(numbers[0]) return 0, 0 diff --git a/dashboard/compliance/aws_well_architected_framework_reliability_pillar_aws.py b/dashboard/compliance/aws_well_architected_framework_reliability_pillar_aws.py index 02fae31d81..d2c3272352 100644 --- a/dashboard/compliance/aws_well_architected_framework_reliability_pillar_aws.py +++ b/dashboard/compliance/aws_well_architected_framework_reliability_pillar_aws.py @@ -1,6 +1,6 @@ import warnings -from dashboard.common_methods import get_section_containers_format2 +from dashboard.common_methods import get_section_containers_3_levels warnings.filterwarnings("ignore") @@ -10,6 +10,7 @@ def get_table(data): [ "REQUIREMENTS_ATTRIBUTES_NAME", "REQUIREMENTS_ATTRIBUTES_SECTION", + "REQUIREMENTS_ATTRIBUTES_SUBSECTION", "CHECKID", "STATUS", "REGION", @@ -17,6 +18,10 @@ def get_table(data): "RESOURCEID", ] ] - return get_section_containers_format2( - aux, "REQUIREMENTS_ATTRIBUTES_NAME", "REQUIREMENTS_ATTRIBUTES_SECTION" + + return get_section_containers_3_levels( + aux, + "REQUIREMENTS_ATTRIBUTES_SECTION", + "REQUIREMENTS_ATTRIBUTES_SUBSECTION", + "REQUIREMENTS_ATTRIBUTES_NAME", ) diff --git a/dashboard/compliance/aws_well_architected_framework_security_pillar_aws.py b/dashboard/compliance/aws_well_architected_framework_security_pillar_aws.py index cfa7ecab40..d2c3272352 100644 --- a/dashboard/compliance/aws_well_architected_framework_security_pillar_aws.py +++ b/dashboard/compliance/aws_well_architected_framework_security_pillar_aws.py @@ -1,6 +1,6 @@ import warnings -from dashboard.common_methods import get_section_containers_format2 +from dashboard.common_methods import get_section_containers_3_levels warnings.filterwarnings("ignore") @@ -10,6 +10,7 @@ def get_table(data): [ "REQUIREMENTS_ATTRIBUTES_NAME", "REQUIREMENTS_ATTRIBUTES_SECTION", + "REQUIREMENTS_ATTRIBUTES_SUBSECTION", "CHECKID", "STATUS", "REGION", @@ -18,6 +19,9 @@ def get_table(data): ] ] - return get_section_containers_format2( - aux, "REQUIREMENTS_ATTRIBUTES_SECTION", "REQUIREMENTS_ATTRIBUTES_NAME" + return get_section_containers_3_levels( + aux, + "REQUIREMENTS_ATTRIBUTES_SECTION", + "REQUIREMENTS_ATTRIBUTES_SUBSECTION", + "REQUIREMENTS_ATTRIBUTES_NAME", ) diff --git a/dashboard/compliance/cis_1_11_kubernetes.py b/dashboard/compliance/cis_1_11_kubernetes.py new file mode 100644 index 0000000000..94558f33ad --- /dev/null +++ b/dashboard/compliance/cis_1_11_kubernetes.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/compliance/cis_4_0_m365.py b/dashboard/compliance/cis_4_0_m365.py new file mode 100644 index 0000000000..94558f33ad --- /dev/null +++ b/dashboard/compliance/cis_4_0_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/compliance/cis_5_0_aws.py b/dashboard/compliance/cis_5_0_aws.py new file mode 100644 index 0000000000..94558f33ad --- /dev/null +++ b/dashboard/compliance/cis_5_0_aws.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/compliance/kisa_isms_p_2023_aws.py b/dashboard/compliance/kisa_isms_p_2023_aws.py index 1d079d46af..66643dab04 100644 --- a/dashboard/compliance/kisa_isms_p_2023_aws.py +++ b/dashboard/compliance/kisa_isms_p_2023_aws.py @@ -1,6 +1,6 @@ import warnings -from dashboard.common_methods import get_section_containers_kisa_ismsp +from dashboard.common_methods import get_section_containers_3_levels warnings.filterwarnings("ignore") @@ -8,7 +8,7 @@ warnings.filterwarnings("ignore") def get_table(data): aux = data[ [ - "REQUIREMENTS_ID", + "REQUIREMENTS_ATTRIBUTES_DOMAIN", "REQUIREMENTS_ATTRIBUTES_SUBDOMAIN", "REQUIREMENTS_ATTRIBUTES_SECTION", # "REQUIREMENTS_DESCRIPTION", @@ -20,6 +20,9 @@ def get_table(data): ] ].copy() - return get_section_containers_kisa_ismsp( - aux, "REQUIREMENTS_ATTRIBUTES_SUBDOMAIN", "REQUIREMENTS_ATTRIBUTES_SECTION" + return get_section_containers_3_levels( + aux, + "REQUIREMENTS_ATTRIBUTES_DOMAIN", + "REQUIREMENTS_ATTRIBUTES_SUBDOMAIN", + "REQUIREMENTS_ATTRIBUTES_SECTION", ) diff --git a/dashboard/compliance/kisa_isms_p_2023_korean_aws.py b/dashboard/compliance/kisa_isms_p_2023_korean_aws.py index 1d079d46af..66643dab04 100644 --- a/dashboard/compliance/kisa_isms_p_2023_korean_aws.py +++ b/dashboard/compliance/kisa_isms_p_2023_korean_aws.py @@ -1,6 +1,6 @@ import warnings -from dashboard.common_methods import get_section_containers_kisa_ismsp +from dashboard.common_methods import get_section_containers_3_levels warnings.filterwarnings("ignore") @@ -8,7 +8,7 @@ warnings.filterwarnings("ignore") def get_table(data): aux = data[ [ - "REQUIREMENTS_ID", + "REQUIREMENTS_ATTRIBUTES_DOMAIN", "REQUIREMENTS_ATTRIBUTES_SUBDOMAIN", "REQUIREMENTS_ATTRIBUTES_SECTION", # "REQUIREMENTS_DESCRIPTION", @@ -20,6 +20,9 @@ def get_table(data): ] ].copy() - return get_section_containers_kisa_ismsp( - aux, "REQUIREMENTS_ATTRIBUTES_SUBDOMAIN", "REQUIREMENTS_ATTRIBUTES_SECTION" + return get_section_containers_3_levels( + aux, + "REQUIREMENTS_ATTRIBUTES_DOMAIN", + "REQUIREMENTS_ATTRIBUTES_SUBDOMAIN", + "REQUIREMENTS_ATTRIBUTES_SECTION", ) diff --git a/dashboard/compliance/prowler_threatscore_aws.py b/dashboard/compliance/prowler_threatscore_aws.py new file mode 100644 index 0000000000..94558f33ad --- /dev/null +++ b/dashboard/compliance/prowler_threatscore_aws.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/compliance/prowler_threatscore_azure.py b/dashboard/compliance/prowler_threatscore_azure.py new file mode 100644 index 0000000000..94558f33ad --- /dev/null +++ b/dashboard/compliance/prowler_threatscore_azure.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/compliance/prowler_threatscore_gcp.py b/dashboard/compliance/prowler_threatscore_gcp.py new file mode 100644 index 0000000000..94558f33ad --- /dev/null +++ b/dashboard/compliance/prowler_threatscore_gcp.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/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/compliance/soc2_azure.py b/dashboard/compliance/soc2_azure.py new file mode 100644 index 0000000000..2d5517aed6 --- /dev/null +++ b/dashboard/compliance/soc2_azure.py @@ -0,0 +1,24 @@ +import warnings + +from dashboard.common_methods import get_section_containers_format3 + +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_format3( + aux, "REQUIREMENTS_ATTRIBUTES_SECTION", "REQUIREMENTS_ID" + ) diff --git a/dashboard/compliance/soc2_gcp.py b/dashboard/compliance/soc2_gcp.py new file mode 100644 index 0000000000..2d5517aed6 --- /dev/null +++ b/dashboard/compliance/soc2_gcp.py @@ -0,0 +1,24 @@ +import warnings + +from dashboard.common_methods import get_section_containers_format3 + +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_format3( + aux, "REQUIREMENTS_ATTRIBUTES_SECTION", "REQUIREMENTS_ID" + ) diff --git a/dashboard/lib/layouts.py b/dashboard/lib/layouts.py index 0f13c94929..f1b4408c38 100644 --- a/dashboard/lib/layouts.py +++ b/dashboard/lib/layouts.py @@ -57,8 +57,9 @@ def create_layout_overview( html.Div(className="flex", id="azure_card", n_clicks=0), html.Div(className="flex", id="gcp_card", n_clicks=0), html.Div(className="flex", id="k8s_card", n_clicks=0), + html.Div(className="flex", id="m365_card", n_clicks=0), ], - className="grid gap-x-4 mb-[30px] sm:grid-cols-2 lg:grid-cols-4", + className="grid gap-x-4 mb-[30px] sm:grid-cols-2 lg:grid-cols-5", ), html.H4( "Count of Findings by severity", @@ -131,7 +132,7 @@ def create_layout_compliance( html.A( [ html.Img(src="assets/favicon.ico", className="w-5 mr-3"), - html.Span("Subscribe to prowler SaaS"), + html.Span("Subscribe to Prowler Cloud"), ], href="https://prowler.pro/", target="_blank", diff --git a/dashboard/pages/compliance.py b/dashboard/pages/compliance.py index 422e801503..0eed0ace3f 100644 --- a/dashboard/pages/compliance.py +++ b/dashboard/pages/compliance.py @@ -76,6 +76,8 @@ def load_csv_files(csv_files): result = result.replace("_AZURE", " - AZURE") if "KUBERNETES" in result: result = result.replace("_KUBERNETES", " - KUBERNETES") + if "M65" in result: + result = result.replace("_M65", " - M65") results.append(result) unique_results = set(results) @@ -267,6 +269,15 @@ def display_data( data["REQUIREMENTS_ATTRIBUTES_PROFILE"] = data[ "REQUIREMENTS_ATTRIBUTES_PROFILE" ].apply(lambda x: x.split(" - ")[0]) + + # Add the column ACCOUNTID to the data if the provider is m65 + if "m365" in analytics_input: + data.rename(columns={"TENANTID": "ACCOUNTID"}, inplace=True) + data.rename(columns={"LOCATION": "REGION"}, inplace=True) + if "REQUIREMENTS_ATTRIBUTES_PROFILE" in data.columns: + data["REQUIREMENTS_ATTRIBUTES_PROFILE"] = data[ + "REQUIREMENTS_ATTRIBUTES_PROFILE" + ].apply(lambda x: x.split(" - ")[0]) # Filter the chosen level of the CIS if is_level_1: data = data[data["REQUIREMENTS_ATTRIBUTES_PROFILE"] == "Level 1"] @@ -397,7 +408,13 @@ 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) + table = compliance_module.get_table(data) except ModuleNotFoundError: table = html.Div( @@ -416,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) @@ -430,6 +450,9 @@ def display_data( if "pci" in analytics_input: pie_2 = get_bar_graph(df, "REQUIREMENTS_ID") current_filter = "req_id" + elif "threatscore" in analytics_input: + pie_2 = get_table_prowler_threatscore(df) + current_filter = "threatscore" elif ( "REQUIREMENTS_ATTRIBUTES_SECTION" in df.columns and not df["REQUIREMENTS_ATTRIBUTES_SECTION"].isnull().values.any() @@ -488,6 +511,13 @@ def display_data( pie_2, f"Top 5 failed {current_filter} by requirements" ) + if "threatscore" in analytics_input: + security_level_graph = get_graph( + pie_2, + "Pillar Score by requirements (1 = Lowest Risk, 5 = Highest Risk)", + margin_top=0, + ) + return ( table_output, overall_status_result_graph, @@ -501,7 +531,7 @@ def display_data( ) -def get_graph(pie, title): +def get_graph(pie, title, margin_top=7): return [ html.Span( title, @@ -514,7 +544,7 @@ def get_graph(pie, title): "display": "flex", "justify-content": "center", "align-items": "center", - "margin-top": "7%", + "margin-top": f"{margin_top}%", }, ), ] @@ -618,3 +648,87 @@ def get_table(current_compliance, table): className="relative flex flex-col bg-white shadow-provider rounded-xl px-4 py-3 flex-wrap w-full", ), ] + + +def get_threatscore_mean_by_pillar(df): + modified_df = df[df["STATUS"] == "FAIL"] + + modified_df["REQUIREMENTS_ATTRIBUTES_LEVELOFRISK"] = pd.to_numeric( + modified_df["REQUIREMENTS_ATTRIBUTES_LEVELOFRISK"], errors="coerce" + ) + + pillar_means = ( + modified_df.groupby("REQUIREMENTS_ATTRIBUTES_SECTION")[ + "REQUIREMENTS_ATTRIBUTES_LEVELOFRISK" + ] + .mean() + .round(2) + ) + + output = [] + for pillar, mean in pillar_means.items(): + output.append(f"{pillar} - [{mean}]") + + for value in output: + if value.split(" - ")[0] in df["REQUIREMENTS_ATTRIBUTES_SECTION"].values: + df.loc[ + df["REQUIREMENTS_ATTRIBUTES_SECTION"] == value.split(" - ")[0], + "REQUIREMENTS_ATTRIBUTES_SECTION", + ] = value + return df + + +def get_table_prowler_threatscore(df): + df = df[df["STATUS"] == "FAIL"] + + # Delete " - " from the column REQUIREMENTS_ATTRIBUTES_SECTION + df["REQUIREMENTS_ATTRIBUTES_SECTION"] = ( + df["REQUIREMENTS_ATTRIBUTES_SECTION"].str.split(" - ").str[0] + ) + + df["REQUIREMENTS_ATTRIBUTES_LEVELOFRISK"] = pd.to_numeric( + df["REQUIREMENTS_ATTRIBUTES_LEVELOFRISK"], errors="coerce" + ) + + score_df = ( + df.groupby("REQUIREMENTS_ATTRIBUTES_SECTION")[ + "REQUIREMENTS_ATTRIBUTES_LEVELOFRISK" + ] + .mean() + .reset_index() + .rename( + columns={ + "REQUIREMENTS_ATTRIBUTES_SECTION": "Pillar", + "REQUIREMENTS_ATTRIBUTES_LEVELOFRISK": "Score", + } + ) + ) + + fig = px.bar( + score_df, + x="Pillar", + y="Score", + color="Score", + color_continuous_scale=[ + "#45cc6e", + "#f4d44d", + "#e77676", + ], # verde โ†’ amarillo โ†’ rojo + hover_data={"Score": True, "Pillar": True}, + labels={"Score": "Average Risk Score", "Pillar": "Section"}, + height=400, + ) + + fig.update_layout( + xaxis_title="Pillar", + yaxis_title="Level of Risk", + margin=dict(l=20, r=20, t=30, b=20), + plot_bgcolor="rgba(0,0,0,0)", + paper_bgcolor="rgba(0,0,0,0)", + coloraxis_colorbar=dict(title="Risk"), + ) + + return dcc.Graph( + figure=fig, + style={"height": "25rem", "width": "40rem"}, + ) diff --git a/dashboard/pages/overview.py b/dashboard/pages/overview.py index 5dfc62ee7b..2688281af2 100644 --- a/dashboard/pages/overview.py +++ b/dashboard/pages/overview.py @@ -74,6 +74,9 @@ gcp_provider_logo = html.Img( ks8_provider_logo = html.Img( src="assets/images/providers/k8s_provider.png", alt="k8s provider" ) +m365_provider_logo = html.Img( + src="assets/images/providers/m365_provider.png", alt="m365 provider" +) def load_csv_files(csv_files): @@ -223,6 +226,8 @@ else: accounts.append(account + " - AZURE") if "gcp" in list(data[data["ACCOUNT_NAME"] == account]["PROVIDER"]): accounts.append(account + " - GCP") + if "m365" in list(data[data["ACCOUNT_NAME"] == account]["PROVIDER"]): + accounts.append(account + " - M365") if "ACCOUNT_UID" in data.columns: for account in data["ACCOUNT_UID"].unique(): @@ -273,6 +278,8 @@ else: services.append(service + " - AZURE") if "gcp" in list(data[data["SERVICE_NAME"] == service]["PROVIDER"]): services.append(service + " - GCP") + if "m365" in list(data[data["SERVICE_NAME"] == service]["PROVIDER"]): + services.append(service + " - M365") services = ["All"] + services services = [ @@ -485,6 +492,7 @@ else: Output("azure_card", "children"), Output("gcp_card", "children"), Output("k8s_card", "children"), + Output("m365_card", "children"), Output("subscribe_card", "children"), Output("info-file-over", "title"), Output("severity-filter", "value"), @@ -499,6 +507,7 @@ else: Output("azure_card", "n_clicks"), Output("gcp_card", "n_clicks"), Output("k8s_card", "n_clicks"), + Output("m365_card", "n_clicks"), ], Input("cloud-account-filter", "value"), Input("region-filter", "value"), @@ -513,6 +522,7 @@ else: Input("azure_card", "n_clicks"), Input("gcp_card", "n_clicks"), Input("k8s_card", "n_clicks"), + Input("m365_card", "n_clicks"), Input("sort_button_check_name", "n_clicks"), Input("sort_button_severity", "n_clicks"), Input("sort_button_status", "n_clicks"), @@ -534,6 +544,7 @@ def filter_data( azure_clicks, gcp_clicks, k8s_clicks, + m365_clicks, sort_button_check_name, sort_button_severity, sort_button_status, @@ -554,6 +565,7 @@ def filter_data( azure_clicks = 0 gcp_clicks = 0 k8s_clicks = 0 + m365_clicks = 0 if azure_clicks > 0: filtered_data = data.copy() if azure_clicks % 2 != 0 and "azure" in list(data["PROVIDER"]): @@ -561,6 +573,7 @@ def filter_data( aws_clicks = 0 gcp_clicks = 0 k8s_clicks = 0 + m365_clicks = 0 if gcp_clicks > 0: filtered_data = data.copy() if gcp_clicks % 2 != 0 and "gcp" in list(data["PROVIDER"]): @@ -568,6 +581,7 @@ def filter_data( aws_clicks = 0 azure_clicks = 0 k8s_clicks = 0 + m365_clicks = 0 if k8s_clicks > 0: filtered_data = data.copy() if k8s_clicks % 2 != 0 and "kubernetes" in list(data["PROVIDER"]): @@ -575,6 +589,15 @@ def filter_data( aws_clicks = 0 azure_clicks = 0 gcp_clicks = 0 + m365_clicks = 0 + if m365_clicks > 0: + filtered_data = data.copy() + if m365_clicks % 2 != 0 and "m365" in list(data["PROVIDER"]): + filtered_data = filtered_data[filtered_data["PROVIDER"] == "m365"] + aws_clicks = 0 + azure_clicks = 0 + gcp_clicks = 0 + k8s_clicks = 0 # For all the data, we will add to the status column the value 'MUTED (FAIL)' and 'MUTED (PASS)' depending on the value of the column 'STATUS' and 'MUTED' if "MUTED" in filtered_data.columns: @@ -675,6 +698,8 @@ def filter_data( all_account_names.append(account) if "gcp" in list(data[data["ACCOUNT_NAME"] == account]["PROVIDER"]): all_account_names.append(account) + if "m365" in list(data[data["ACCOUNT_NAME"] == account]["PROVIDER"]): + all_account_names.append(account) all_items = all_account_ids + all_account_names + ["All"] @@ -692,6 +717,8 @@ def filter_data( cloud_accounts_options.append(item + " - AZURE") if "gcp" in list(data[data["ACCOUNT_NAME"] == item]["PROVIDER"]): cloud_accounts_options.append(item + " - GCP") + if "m365" in list(data[data["ACCOUNT_NAME"] == item]["PROVIDER"]): + cloud_accounts_options.append(item + " - M365") # Filter ACCOUNT if cloud_account_values == ["All"]: @@ -790,6 +817,7 @@ def filter_data( service_filter_options = ["All"] all_items = filtered_data["SERVICE_NAME"].unique() + for item in all_items: if item not in service_filter_options and item.__class__.__name__ == "str": if "aws" in list( @@ -808,6 +836,10 @@ def filter_data( filtered_data[filtered_data["SERVICE_NAME"] == item]["PROVIDER"] ): service_filter_options.append(item + " - GCP") + if "m365" in list( + filtered_data[filtered_data["SERVICE_NAME"] == item]["PROVIDER"] + ): + service_filter_options.append(item + " - M365") # Filter Service if service_values == ["All"]: @@ -1235,6 +1267,10 @@ def filter_data( filtered_data.loc[ filtered_data["ACCOUNT_UID"] == account, "ACCOUNT_UID" ] = (account + " - GCP") + if "m365" in list(data[data["ACCOUNT_UID"] == account]["PROVIDER"]): + filtered_data.loc[ + filtered_data["ACCOUNT_UID"] == account, "ACCOUNT_UID" + ] = (account + " - M365") table_collapsible = [] for item in filtered_data.to_dict("records"): @@ -1302,14 +1338,17 @@ def filter_data( k8s_card = create_provider_card( "kubernetes", ks8_provider_logo, "Clusters", full_filtered_data ) + m365_card = create_provider_card( + "m365", m365_provider_logo, "Accounts", full_filtered_data + ) - # Subscribe to prowler SaaS card + # Subscribe to Prowler Cloud card subscribe_card = [ html.Div( html.A( [ html.Img(src="assets/favicon.ico", className="w-5 mr-3"), - html.Span("Subscribe to prowler SaaS"), + html.Span("Subscribe to Prowler Cloud"), ], href="https://prowler.pro/", target="_blank", @@ -1346,6 +1385,7 @@ def filter_data( azure_card, gcp_card, k8s_card, + m365_card, subscribe_card, list_files, severity_values, @@ -1360,6 +1400,7 @@ def filter_data( azure_clicks, gcp_clicks, k8s_clicks, + m365_clicks, ) else: return ( @@ -1377,6 +1418,7 @@ def filter_data( azure_card, gcp_card, k8s_card, + m365_card, subscribe_card, list_files, severity_values, @@ -1391,6 +1433,7 @@ def filter_data( azure_clicks, gcp_clicks, k8s_clicks, + m365_clicks, ) diff --git a/docs/developer-guide/debugging.md b/docs/developer-guide/debugging.md index 33c0849f49..bf51d313c1 100644 --- a/docs/developer-guide/debugging.md +++ b/docs/developer-guide/debugging.md @@ -18,7 +18,7 @@ This file should inside the *.vscode* folder and its name has to be *launch.json "name": "Debug AWS Check", "type": "debugpy", "request": "launch", - "program": "prowler.py", + "program": "prowler-cli.py", "args": [ "aws", "--log-level", @@ -33,7 +33,7 @@ This file should inside the *.vscode* folder and its name has to be *launch.json "name": "Debug Azure Check", "type": "debugpy", "request": "launch", - "program": "prowler.py", + "program": "prowler-cli.py", "args": [ "azure", "--sp-env-auth", @@ -49,7 +49,7 @@ This file should inside the *.vscode* folder and its name has to be *launch.json "name": "Debug GCP Check", "type": "debugpy", "request": "launch", - "program": "prowler.py", + "program": "prowler-cli.py", "args": [ "gcp", "--log-level", @@ -64,7 +64,7 @@ This file should inside the *.vscode* folder and its name has to be *launch.json "name": "Debug K8s Check", "type": "debugpy", "request": "launch", - "program": "prowler.py", + "program": "prowler-cli.py", "args": [ "kubernetes", "--log-level", diff --git a/docs/developer-guide/provider.md b/docs/developer-guide/provider.md index 6f6b1ca0ae..823f694a77 100644 --- a/docs/developer-guide/provider.md +++ b/docs/developer-guide/provider.md @@ -175,7 +175,7 @@ Due to the complexity and differences of each provider use the rest of the provi - [GCP](https://github.com/prowler-cloud/prowler/blob/master/prowler/providers/gcp/gcp_provider.py) - [Azure](https://github.com/prowler-cloud/prowler/blob/master/prowler/providers/azure/azure_provider.py) - [Kubernetes](https://github.com/prowler-cloud/prowler/blob/master/prowler/providers/kubernetes/kubernetes_provider.py) -- [Microsoft365](https://github.com/prowler-cloud/prowler/blob/master/prowler/providers/microsoft365/microsoft365_provider.py) +- [M365](https://github.com/prowler-cloud/prowler/blob/master/prowler/providers/m365/m365_provider.py) To facilitate understanding here is a pseudocode of how the most basic provider could be with examples. diff --git a/docs/developer-guide/services.md b/docs/developer-guide/services.md index d551a58269..6859bd0c07 100644 --- a/docs/developer-guide/services.md +++ b/docs/developer-guide/services.md @@ -237,4 +237,4 @@ It is really important to check if the current Prowler's permissions for each pr - AWS: https://docs.prowler.cloud/en/latest/getting-started/requirements/#aws-authentication - Azure: https://docs.prowler.cloud/en/latest/getting-started/requirements/#permissions - GCP: https://docs.prowler.cloud/en/latest/getting-started/requirements/#gcp-authentication -- Microsoft365: https://docs.prowler.cloud/en/latest/getting-started/requirements/#microsoft365-authentication +- M365: https://docs.prowler.cloud/en/latest/getting-started/requirements/#m365-authentication diff --git a/docs/getting-started/requirements.md b/docs/getting-started/requirements.md index afda7da53e..29b9069013 100644 --- a/docs/getting-started/requirements.md +++ b/docs/getting-started/requirements.md @@ -40,8 +40,8 @@ If your IAM entity enforces MFA you can use `--mfa` and Prowler will ask you to Prowler for Azure supports the following authentication types. To use each one you need to pass the proper flag to the execution: -- [Service principal application](https://learn.microsoft.com/en-us/entra/identity-platform/app-objects-and-service-principals?tabs=browser#service-principal-object) (recommended). -- Current az cli credentials stored. +- [Service Principal Application](https://learn.microsoft.com/en-us/entra/identity-platform/app-objects-and-service-principals?tabs=browser#service-principal-object) (recommended). +- Current AZ CLI credentials stored. - Interactive browser authentication. - [Managed identity](https://learn.microsoft.com/en-us/entra/identity/managed-identities-azure-resources/overview) authentication. @@ -59,7 +59,7 @@ export AZURE_CLIENT_SECRET="XXXXXXX" ``` If you try to execute Prowler with the `--sp-env-auth` flag and those variables are empty or not exported, the execution is going to fail. -Follow the instructions in the [Create Prowler Service Principal](../tutorials/azure/create-prowler-service-principal.md#how-to-create-prowler-service-principal) section to create a service principal. +Follow the instructions in the [Create Prowler Service Principal](../tutorials/azure/create-prowler-service-principal.md#how-to-create-prowler-service-principal-application) section to create a service principal. ### AZ CLI / Browser / Managed Identity authentication @@ -79,7 +79,7 @@ Prowler for Azure needs two types of permission scopes to be set: ???+ note Please, notice that the field `assignableScopes` in the JSON custom role file must be changed to be the subscription or management group where the role is going to be assigned. The valid formats for the field are `/subscriptions/` or `/providers/Microsoft.Management/managementGroups/`. -To assign the permissions, follow the instructions in the [Microsoft Entra ID permissions](../tutorials/azure/create-prowler-service-principal.md#assigning-the-proper-permissions) section and the [Azure subscriptions permissions](../tutorials/azure/subscriptions.md#assigning-proper-permissions) section, respectively. +To assign the permissions, follow the instructions in the [Microsoft Entra ID permissions](../tutorials/azure/create-prowler-service-principal.md#assigning-the-proper-permissions) section and the [Azure subscriptions permissions](../tutorials/azure/subscriptions.md#assign-the-appropriate-permissions-to-the-identity-that-is-going-to-be-assumed-by-prowler) section, respectively. #### Checks that require ProwlerRole @@ -98,25 +98,44 @@ Prowler will follow the same credentials search as [Google authentication librar 2. [User credentials set up by using the Google Cloud CLI](https://cloud.google.com/docs/authentication/application-default-credentials#personal) 3. [The attached service account, returned by the metadata server](https://cloud.google.com/docs/authentication/application-default-credentials#attached-sa) -Those credentials must be associated to a user or service account with proper permissions to do all checks. To make sure, add the `Viewer` role to the member associated with the credentials. +### Needed permissions + +Prowler for Google Cloud needs the following permissions to be set: + +- **Viewer (`roles/viewer`) IAM role**: granted at the project / folder / org level in order to scan the target projects + +- **Project level settings**: you need to have at least one project with the below settings: + - Identity and Access Management (IAM) API (`iam.googleapis.com`) enabled by either using the + [Google Cloud API UI](https://console.cloud.google.com/apis/api/iam.googleapis.com/metrics) or + by using the gcloud CLI `gcloud services enable iam.googleapis.com --project ` command + - Service Usage Consumer (`roles/serviceusage.serviceUsageConsumer`) IAM role + - Set the quota project to be this project by either running `gcloud auth application-default set-quota-project ` or by setting an environment variable: + `export GOOGLE_CLOUD_QUOTA_PROJECT=` + + +The above settings must be associated to a user or service account. + ???+ note By default, `prowler` will scan all accessible GCP Projects, use flag `--project-ids` to specify the projects to be scanned. -## Microsoft365 +## Microsoft 365 -Prowler for Microsoft365 currently supports the following authentication types: +Prowler for M365 currently supports the following authentication types: -- [Service principal application](https://learn.microsoft.com/en-us/entra/identity-platform/app-objects-and-service-principals?tabs=browser#service-principal-object) (recommended). -- Current az cli credentials stored. +- [Service Principal Application](https://learn.microsoft.com/en-us/entra/identity-platform/app-objects-and-service-principals?tabs=browser#service-principal-object). +- Service Principal Application and Microsoft User Credentials (**recommended**). +- Current AZ CLI credentials stored. - Interactive browser authentication. ???+ warning - For Prowler App only the Service Principal with an application authentication method is supported. + For Prowler App only the Service Principal with User Credentials authentication method is supported. ### Service Principal authentication +Authentication flag: `--sp-env-auth` + To allow Prowler assume the service principal identity to start the scan it is needed to configure the following environment variables: ```console @@ -126,8 +145,341 @@ export AZURE_TENANT_ID="XXXXXXXXX" ``` If you try to execute Prowler with the `--sp-env-auth` flag and those variables are empty or not exported, the execution is going to fail. -Follow the instructions in the [Create Prowler Service Principal](../tutorials/azure/create-prowler-service-principal.md) section to create a service principal. +Follow the instructions in the [Create Prowler Service Principal](../tutorials/microsoft365/getting-started-m365.md#create-the-service-principal-app) section to create a service principal. + +With this credentials you will only be able to run the checks that work through MS Graph, this means that you won't run all the provider. If you want to scan all the checks from M365 you will need to use the recommended authentication method. + +### Service Principal and User Credentials authentication (recommended) + +Authentication flag: `--env-auth` + +This authentication method follows the same approach as the service principal method but introduces two additional environment variables for user credentials: `M365_USER` and `M365_ENCRYPTED_PASSWORD`. + +```console +export AZURE_CLIENT_ID="XXXXXXXXX" +export AZURE_CLIENT_SECRET="XXXXXXXXX" +export AZURE_TENANT_ID="XXXXXXXXX" +export M365_USER="your_email@example.com" +export M365_ENCRYPTED_PASSWORD="6500780061006d0070006c006500700061007300730077006f0072006400" # replace this to yours +``` + +These two new environment variables are **required** to execute the PowerShell modules needed to retrieve information from M365 services. Prowler uses Service Principal authentication to access Microsoft Graph and user credentials to authenticate to Microsoft PowerShell modules. + +- `M365_USER` should be your Microsoft account email using the default domain. This means it must look like `example@YourCompany.onmicrosoft.com`. + + To ensure that you are using the default domain you can see how to verify it [here](../tutorials/microsoft365/getting-started-m365.md#step-1-obtain-your-domain). + + If you don't have a user created with that domain, Prowler will not work as it will not be able to ensure both app an user belong to the same tenant. To proceed, you can either create a new user with that domain or modify the domain of an existing user. + + ![User Domains](../tutorials/microsoft365/img/user-domains.png) + +- `M365_ENCRYPTED_PASSWORD` must be an encrypted SecureString. To convert your password into a valid encrypted string, you need to use PowerShell. + + ???+ warning + Passwords encrypted using ConvertTo-SecureString can only be decrypted on the same OS/user context. If you generate an encrypted password on macOS or Linux (both UNIX), it should fail on Windows and vice versa. As Prowler Cloud runs on UNIX if you generate your password using Windows it won't work so you'll need to generate a new password using any UNIX distro (example above) + + If you are working from Windows and you will use your encrypted password in a different system (like for example executing Prowler in macOS or adding your password to Prowler Cloud), you will need to generate a "UNIX compatible" version of your encrypted password. This can be done using WSL which is so easy to install on Windows. + + === "UNIX" + + Open a PowerShell cmd with a [supported version](requirements.md#supported-powershell-versions) and then run the following command: + + ```console + $securePassword = ConvertTo-SecureString "examplepassword" -AsPlainText -Force + $encryptedPassword = $securePassword | ConvertFrom-SecureString + Write-Output $encryptedPassword + 6500780061006d0070006c006500700061007300730077006f0072006400 + ``` + + If everything is done correctly, you will see the encrypted string that you need to set as the `M365_ENCRYPTED_PASSWORD` environment variable. + + === "Windows" + + + How to install WSL and PowerShell on it to generate that password (you can use a different distro but this one will work for sure): + + ```console + wsl --install -d Ubuntu-22.04 + ``` + + Then, open the Ubuntu terminal and run the following commands: + + ```console + sudo apt update && sudo apt install -y wget apt-transport-https software-properties-common + wget -q "https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb" + sudo dpkg -i packages-microsoft-prod.deb + sudo apt update + sudo apt install -y powershell + pwsh + ``` + + With this done you will see now that a prompt running PowerShell with the latest version is open so here you will be able to generate your encrypted password: + + ```console + $securePassword = ConvertTo-SecureString "examplepassword" -AsPlainText -Force + $encryptedPassword = $securePassword | ConvertFrom-SecureString + Write-Output $encryptedPassword + 6500780061006d0070006c006500700061007300730077006f0072006400 + ``` + + If everything is done correctly, you will see the encrypted string that you need to set as the `M365_ENCRYPTED_PASSWORD` environment variable. + + ### Interactive Browser authentication -To use `--browser-auth` the user needs to authenticate against Azure using the default browser to start the scan, also `--tenant-id` flag is required. +Authentication flag: `--browser-auth` + +This authentication method requires the user to authenticate against Azure using the default browser to start the scan, also `--tenant-id` flag is required. + +With this credentials you will only be able to run the checks that work through MS Graph, this means that you won't run all the provider. If you want to scan all the checks from M365 you will need to use the recommended authentication method. + +Since this is a delegated permission authentication method, necessary permissions should be given to the user, not the app. + + +### Needed permissions + +Prowler for M365 requires two types of permission scopes to be set (if you want to run the full provider including PowerShell checks). Both must be configured using Microsoft Entra ID: + +- **Service Principal Application Permissions**: These are set at the **application** level and are used to retrieve data from the identity being assessed: + - `Directory.Read.All`: Required for all services. + - `Policy.Read.All`: Required for all services. + - `User.Read` (IMPORTANT: this must be set as **delegated**): Required for the sign-in. + - `Sites.Read.All`: Required for SharePoint service. + - `SharePointTenantSettings.Read.All`: Required for SharePoint service. + - `AuditLog.Read.All`: Required for Entra service. + +- **Powershell Modules Permissions**: These are set at the `M365_USER` level, so the user used to run Prowler must have one of the following roles: + - `Global Reader` (recommended): this allows you to read all roles needed. + - `Exchange Administrator` and `Teams Administrator`: user needs both roles but with this [roles](https://learn.microsoft.com/en-us/exchange/permissions-exo/permissions-exo#microsoft-365-permissions-in-exchange-online) you can access to the same information as a Global Reader (since only read access is needed, Global Reader is recommended). + +In order to know how to assign those permissions and roles follow the instructions in the Microsoft Entra ID [permissions](../tutorials/microsoft365/getting-started-m365.md#grant-required-api-permissions) and [roles](../tutorials/microsoft365/getting-started-m365.md#assign-required-roles-to-your-user) section. + + +### Supported PowerShell versions + +You must have PowerShell installed to run certain M365 checks. +Currently, we support **PowerShell version 7.4 or higher** (7.5 is recommended). + +This requirement exists because **PowerShell 5.1** (the version that comes by default on some Windows systems) does not support several cmdlets needed to run the checks properly. +Additionally, earlier [PowerShell Cross-Platform versions](https://learn.microsoft.com/en-us/powershell/scripting/install/powershell-support-lifecycle?view=powershell-7.5) are no longer under technical support, which may cause unexpected errors. + + +???+ note + Installing powershell will be only needed if you install prowler from pip or other sources, these means that the SDK and API containers contain PowerShell installed by default. + +Installing PowerShell is different depending on your OS. + +- [Windows](https://learn.microsoft.com/es-es/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.5#install-powershell-using-winget-recommended): you will need to update PowerShell to +7.4 to be able to run prowler, if not some checks will not show findings and the provider could not work as expected. This version of PowerShell is [supported](https://learn.microsoft.com/es-es/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.4#supported-versions-of-windows) on Windows 10, Windows 11, Windows Server 2016 and higher versions. + +```console +winget install --id Microsoft.PowerShell --source winget +``` + + +- [MacOS](https://learn.microsoft.com/es-es/powershell/scripting/install/installing-powershell-on-macos?view=powershell-7.5#install-the-latest-stable-release-of-powershell): installing PowerShell on MacOS needs to have installed [brew](https://brew.sh/), once you have it is just running the command above, Pwsh is only supported in macOS 15 (Sequoia) x64 and Arm64, macOS 14 (Sonoma) x64 and Arm64, macOS 13 (Ventura) x64 and Arm64 + +```console +brew install powershell/tap/powershell +``` + +Once it's installed run `pwsh` on your terminal to verify it's working. + +- Linux: installing PowerShell on Linux depends on the distro you are using: + + - [Ubuntu](https://learn.microsoft.com/es-es/powershell/scripting/install/install-ubuntu?view=powershell-7.5#installation-via-package-repository-the-package-repository): The required version for installing PowerShell +7.4 on Ubuntu are Ubuntu 22.04 and Ubuntu 24.04. The recommended way to install it is downloading the package available on PMC. You just need to follow the following steps: + + ```console + ################################### + # Prerequisites + + # Update the list of packages + sudo apt-get update + + # Install pre-requisite packages. + sudo apt-get install -y wget apt-transport-https software-properties-common + + # Get the version of Ubuntu + source /etc/os-release + + # Download the Microsoft repository keys + wget -q https://packages.microsoft.com/config/ubuntu/$VERSION_ID/packages-microsoft-prod.deb + + # Register the Microsoft repository keys + sudo dpkg -i packages-microsoft-prod.deb + + # Delete the Microsoft repository keys file + rm packages-microsoft-prod.deb + + # Update the list of packages after we added packages.microsoft.com + sudo apt-get update + + ################################### + # Install PowerShell + sudo apt-get install -y powershell + + # Start PowerShell + pwsh + ``` + + - [Alpine](https://learn.microsoft.com/es-es/powershell/scripting/install/install-alpine?view=powershell-7.5#installation-steps): The only supported version for installing PowerShell +7.4 on Alpine is Alpine 3.20. The unique way to install it is downloading the tar.gz package available on [PowerShell github](https://github.com/PowerShell/PowerShell/releases/download/v7.5.0/powershell-7.5.0-linux-musl-x64.tar.gz). You just need to follow the following steps: + + ```console + # Install the requirements + sudo apk add --no-cache \ + ca-certificates \ + less \ + ncurses-terminfo-base \ + krb5-libs \ + libgcc \ + libintl \ + libssl3 \ + libstdc++ \ + tzdata \ + userspace-rcu \ + zlib \ + icu-libs \ + curl + + apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache \ + lttng-ust \ + openssh-client \ + + # Download the powershell '.tar.gz' archive + curl -L https://github.com/PowerShell/PowerShell/releases/download/v7.5.0/powershell-7.5.0-linux-musl-x64.tar.gz -o /tmp/powershell.tar.gz + + # Create the target folder where powershell will be placed + sudo mkdir -p /opt/microsoft/powershell/7 + + # Expand powershell to the target folder + sudo tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7 + + # Set execute permissions + sudo chmod +x /opt/microsoft/powershell/7/pwsh + + # Create the symbolic link that points to pwsh + sudo ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh + + # Start PowerShell + pwsh + ``` + + - [Debian](https://learn.microsoft.com/es-es/powershell/scripting/install/install-debian?view=powershell-7.5#installation-on-debian-11-or-12-via-the-package-repository): The required version for installing PowerShell +7.4 on Debian are Debian 11 and Debian 12. The recommended way to install it is downloading the package available on PMC. You just need to follow the following steps: + + ```console + ################################### + # Prerequisites + + # Update the list of packages + sudo apt-get update + + # Install pre-requisite packages. + sudo apt-get install -y wget + + # Get the version of Debian + source /etc/os-release + + # Download the Microsoft repository GPG keys + wget -q https://packages.microsoft.com/config/debian/$VERSION_ID/packages-microsoft-prod.deb + + # Register the Microsoft repository GPG keys + sudo dpkg -i packages-microsoft-prod.deb + + # Delete the Microsoft repository GPG keys file + rm packages-microsoft-prod.deb + + # Update the list of packages after we added packages.microsoft.com + sudo apt-get update + + ################################### + # Install PowerShell + sudo apt-get install -y powershell + + # Start PowerShell + pwsh + ``` + + - [Rhel](https://learn.microsoft.com/es-es/powershell/scripting/install/install-rhel?view=powershell-7.5#installation-via-the-package-repository): The required version for installing PowerShell +7.4 on Red Hat are RHEL 8 and RHEL 9. The recommended way to install it is downloading the package available on PMC. You just need to follow the following steps: + + ```console + ################################### + # Prerequisites + + # Get version of RHEL + source /etc/os-release + if [ ${VERSION_ID%.*} -lt 8 ] + then majorver=7 + elif [ ${VERSION_ID%.*} -lt 9 ] + then majorver=8 + else majorver=9 + fi + + # Download the Microsoft RedHat repository package + curl -sSL -O https://packages.microsoft.com/config/rhel/$majorver/packages-microsoft-prod.rpm + + # Register the Microsoft RedHat repository + sudo rpm -i packages-microsoft-prod.rpm + + # Delete the downloaded package after installing + rm packages-microsoft-prod.rpm + + # Update package index files + sudo dnf update + # Install PowerShell + sudo dnf install powershell -y + ``` + +- [Docker](https://learn.microsoft.com/es-es/powershell/scripting/install/powershell-in-docker?view=powershell-7.5#use-powershell-in-a-container): The following command download the latest stable versions of PowerShell: + + ```console + docker pull mcr.microsoft.com/dotnet/sdk:9.0 + ``` + + To start an interactive shell of Pwsh you just need to run: + + ```console + docker run -it mcr.microsoft.com/dotnet/sdk:9.0 pwsh + ``` + + +### Needed PowerShell modules + +To obtain the required data for this provider, we use several PowerShell cmdlets. +These cmdlets come from different modules that must be installed. + +The installation of these modules will be performed automatically if you run Prowler with the flag `--init-modules`. This an example way of running Prowler and installing the modules: + +```console +python3 prowler-cli.py m365 --verbose --log-level ERROR --env-auth --init-modules +``` + +If you already have them installed, there is no problem even if you use the flag because it will automatically check if the needed modules are already installed. + +???+ note + Prowler installs the modules using `-Scope CurrentUser`. + If you encounter any issues with services not working after the automatic installation, try installing the modules manually using `-Scope AllUsers` (administrator permissions are required for this). + The command needed to install a module manually is: + ```powershell + Install-Module -Name "ModuleName" -Scope AllUsers -Force + ``` + +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/dashboard.png b/docs/img/dashboard.png index 2d2fe3cc95..2392debbb7 100644 Binary files a/docs/img/dashboard.png and b/docs/img/dashboard.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 27376ecc29..ff0f3237a2 100644 --- a/docs/index.md +++ b/docs/index.md @@ -53,7 +53,7 @@ Prowler App can be installed in different ways, depending on your environment: You can change the environment variables in the `.env` file. Note that it is not recommended to use the default values in production environments. ???+ note - There is a development mode available, you can use the file https://github.com/prowler-cloud/prowler/blob/master/docker-compose.dev.yml to run the app in development mode. + There is a development mode available, you can use the file https://github.com/prowler-cloud/prowler/blob/master/docker-compose-dev.yml to run the app in development mode. ???+ warning Google and GitHub authentication is only available in [Prowler Cloud](https://prowler.com). @@ -136,7 +136,7 @@ Prowler App can be installed in different ways, depending on your environment: ### Prowler CLI Installation -Prowler is available as a project in [PyPI](https://pypi.org/project/prowler/), thus can be installed as Python package with `Python >= 3.9`: +Prowler is available as a project in [PyPI](https://pypi.org/project/prowler/), thus can be installed as Python package with `Python >= 3.9, <= 3.12`: === "pipx" @@ -144,7 +144,7 @@ Prowler is available as a project in [PyPI](https://pypi.org/project/prowler/), _Requirements_: - * `Python >= 3.9` + * `Python >= 3.9, <= 3.12` * `pipx` installed: [pipx installation](https://pipx.pypa.io/stable/installation/). * AWS, GCP, Azure and/or Kubernetes credentials @@ -168,9 +168,9 @@ Prowler is available as a project in [PyPI](https://pypi.org/project/prowler/), _Requirements_: - * `Python >= 3.9` + * `Python >= 3.9, <= 3.12` * `Python pip >= 21.0.0` - * AWS, GCP, Azure, Microsoft365 and/or Kubernetes credentials + * AWS, GCP, Azure, M365 and/or Kubernetes credentials _Commands_: @@ -219,7 +219,7 @@ Prowler is available as a project in [PyPI](https://pypi.org/project/prowler/), git clone https://github.com/prowler-cloud/prowler cd prowler poetry install - poetry run python prowler.py -v + poetry run python prowler-cli.py -v ``` ???+ note If you want to clone Prowler from Windows, use `git config core.longpaths true` to allow long file paths. @@ -228,7 +228,7 @@ Prowler is available as a project in [PyPI](https://pypi.org/project/prowler/), _Requirements_: - * `Python >= 3.9` + * `Python >= 3.9, <= 3.12` * AWS, GCP, Azure and/or Kubernetes credentials _Commands_: @@ -244,8 +244,8 @@ Prowler is available as a project in [PyPI](https://pypi.org/project/prowler/), _Requirements_: - * `Ubuntu 23.04` or above, if you are using an older version of Ubuntu check [pipx installation](https://docs.prowler.com/projects/prowler-open-source/en/latest/#__tabbed_1_1) and ensure you have `Python >= 3.9`. - * `Python >= 3.9` + * `Ubuntu 23.04` or above, if you are using an older version of Ubuntu check [pipx installation](https://docs.prowler.com/projects/prowler-open-source/en/latest/#__tabbed_1_1) and ensure you have `Python >= 3.9, <= 3.12`. + * `Python >= 3.9, <= 3.12` * AWS, GCP, Azure and/or Kubernetes credentials _Commands_: @@ -423,7 +423,7 @@ While the scan is running, start exploring the findings in these sections: ### Prowler CLI -To run Prowler, you will need to specify the provider (e.g `aws`, `gcp`, `azure`, `microsoft365` or `kubernetes`): +To run Prowler, you will need to specify the provider (e.g `aws`, `gcp`, `azure`, `m365` or `kubernetes`): ???+ note If no provider specified, AWS will be used for backward compatibility with most of v2 options. @@ -565,23 +565,52 @@ 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. -#### Microsoft365 -With Microsoft365 you need to specify which auth method is going to be used: +#### Microsoft 365 + +With M365 you need to specify which auth method is going to be used: ```console + +# To use both service principal (for MSGraph) and user credentials (for PowerShell modules) +prowler m365 --env-auth + # To use service principal authentication -prowler microsoft365 --sp-env-auth +prowler m365 --sp-env-auth # To use az cli authentication -prowler microsoft365 --az-cli-auth +prowler m365 --az-cli-auth # To use browser authentication -prowler microsoft365 --browser-auth --tenant-id "XXXXXXXX" +prowler m365 --browser-auth --tenant-id "XXXXXXXX" ``` -See more details about Microsoft365 Authentication in [Requirements](getting-started/requirements.md#microsoft365) +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/cloudshell.md b/docs/tutorials/aws/cloudshell.md index d40b0dd9b4..0e02ea5da4 100644 --- a/docs/tutorials/aws/cloudshell.md +++ b/docs/tutorials/aws/cloudshell.md @@ -29,7 +29,7 @@ mkdir /tmp/poetry poetry config cache-dir /tmp/poetry eval $(poetry env activate) poetry install -python prowler.py -v +python prowler-cli.py -v ``` > [!IMPORTANT] > Starting from Poetry v2.0.0, `poetry shell` has been deprecated in favor of `poetry env activate`. diff --git a/docs/tutorials/aws/getting-started-aws.md b/docs/tutorials/aws/getting-started-aws.md new file mode 100644 index 0000000000..8414591c67 --- /dev/null +++ b/docs/tutorials/aws/getting-started-aws.md @@ -0,0 +1,214 @@ +# Getting Started with AWS on Prowler Cloud/App + + + +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/App +2. Properly configured AWS credentials (either static or via an assumed IAM role) + +--- + +## Step 1: Get Your AWS Account ID + +1. Log in to the [AWS Console](https://console.aws.amazon.com) +2. Locate your AWS account ID in the top-right dropdown menu + +![Account ID detail](./img/aws-account-id.png) + +--- + +## Step 2: Access Prowler Cloud/App + +1. Navigate to [Prowler Cloud](https://cloud.prowler.com/) or launch [Prowler App](../prowler-app.md) +2. Go to `Configuration` > `Cloud Providers` + + ![Cloud Providers Page](../img/cloud-providers-page.png) + +3. Click `Add Cloud Provider` + + ![Add a Cloud Provider](../img/add-cloud-provider.png) + +4. Select `Amazon Web Services` + + ![Select AWS Provider](./img/select-aws.png) + +5. Enter your AWS Account ID and optionally provide a friendly alias + + ![Add account ID](./img/add-account-id.png) + +6. Choose your preferred authentication method (next step) + + ![Select auth method](./img/select-auth-method.png) + +--- + +## Step 3: Set Up AWS Authentication + +Before proceeding, choose your preferred authentication mode: + +Credentials + +* Quick scan as current user โœ… +* No extra setup โœ… +* Credentials time out โŒ + +Assumed Role + +* Preferred Setup โœ… +* Permanent Credentials โœ… +* Requires access to create role โŒ + +--- + +### ๐Ÿ” Assume Role (Recommended) + +![Assume Role Overview](./img/assume-role-overview.png) + +This method grants permanent access and is the recommended setup for production environments. + +=== "CloudFormation" + + 1. Download the [Prowler Scan Role Template](https://raw.githubusercontent.com/prowler-cloud/prowler/refs/heads/master/permissions/templates/cloudformation/prowler-scan-role.yml) + + ![Prowler Scan Role Template](./img/prowler-scan-role-template.png) + + ![Download Role Template](./img/download-role-template.png) + + 2. Open the [AWS Console](https://console.aws.amazon.com), search for **CloudFormation** + + ![CloudFormation Search](./img/cloudformation-nav.png) + + 3. Go to **Stacks** and click `Create stack` > `With new resources (standard)` + + ![Create Stack](./img/create-stack.png) + + 4. In **Specify Template**, choose `Upload a template file` and select the downloaded file + + ![Upload a template file](./img/upload-template-file.png) + ![Upload file from downloads](./img/upload-template-from-downloads.png) + + 5. Click `Next`, provide a stack name and the **External ID** shown in the Prowler Cloud setup screen + + ![External ID](./img/prowler-cloud-external-id.png) + ![Stack Data](./img/fill-stack-data.png) + + 6. Acknowledge the IAM resource creation warning and proceed + + ![Stack Creation Second Step](./img/stack-creation-second-step.png) + + 7. Click `Submit` to deploy the stack + + ![Click on submit](./img/submit-third-page.png) + +=== "Terraform" + + To provision the scan role using Terraform: + + 1. Run the following commands: + + ```bash + terraform init + terraform plan + terraform apply + ``` + + 2. During `plan` and `apply`, you will be prompted for the **External ID**, which is available in the Prowler Cloud/App UI: + + ![Get External ID](./img/get-external-id-prowler-cloud.png) + + > ๐Ÿ’ก Note: Terraform will use the AWS credentials of your default profile. + +--- + +### Finish Setup with Assume Role + +8. Once the role is created, go to the **IAM Console**, click on the `ProwlerScan` role to open its details: + + ![ProwlerScan role info](./img/prowler-scan-pre-info.png) + +9. Copy the **Role ARN** + + ![New Role Info](./img/get-role-arn.png) + +10. Paste the ARN into the corresponding field in Prowler Cloud/App + + ![Input the Role ARN](./img/paste-role-arn-prowler.png) + +11. Click `Next`, then `Launch Scan` + + ![Next button in Prowler Cloud](./img/next-button-prowler-cloud.png) + ![Launch Scan](./img/launch-scan-button-prowler-cloud.png) + +--- + +### ๐Ÿ”‘ Credentials (Static Access Keys) + +You can also configure your AWS account using static credentials (not recommended for long-term use): + +![Connect via credentials](./img/connect-via-credentials.png) + +=== "Long term credentials" + + 1. Go to the [AWS Console](https://console.aws.amazon.com), open **CloudShell** + + ![AWS CloudShell](./img/aws-cloudshell.png) + + 2. Run: + + ```bash + aws iam create-access-key + ``` + + 3. Copy the output containing: + + - `AccessKeyId` + - `SecretAccessKey` + + ![CloudShell Output](./img/cloudshell-output.png) + + > โš ๏ธ Save these credentials securely and paste them into the Prowler Cloud/App setup screen. + +=== "Short term credentials (Recommended)" + + You can use your [AWS Access Portal](https://docs.aws.amazon.com/singlesignon/latest/userguide/howtogetcredentials.html) or the CLI: + + 1. Retrieve short-term credentials for the IAM identity using this command: + + ```bash + aws sts get-session-token --duration-seconds 900 + ``` + + ???+ note + Check the aws documentation [here](https://docs.aws.amazon.com/IAM/latest/UserGuide/sts_example_sts_GetSessionToken_section.html) + + 2. Copy the output containing: + + - `AccessKeyId` + - `SecretAccessKey` + + > Sample output: + ```json + { + "Credentials": { + "AccessKeyId": "ASIAIOSFODNN7EXAMPLE", + "SecretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY", + "SessionToken": "AQoEXAMPLEH4aoAH0gNCAPyJxz4BlCFFxWNE1OPTgk5TthT+FvwqnKwRcOIfrRh3c/LTo6UDdyJwOOvEVPvLXCrrrUtdnniCEXAMPLE/IvU1dYUg2RVAJBanLiHb4IgRmpRV3zrkuWJOgQs8IZZaIv2BXIa2R4OlgkBN9bkUDNCJiBeb/AXlzBBko7b15fjrBs2+cTQtpZ3CYWFXG8C5zqx37wnOE49mRl/+OtkIKGO7fAE", + "Expiration": "2020-05-19T18:06:10+00:00" + } + } + ``` + + > โš ๏ธ Save these credentials securely and paste them into the Prowler Cloud/App setup screen. + +Complete the form in Prowler Cloud/App and click `Next` + +![Filled credentials page](./img/prowler-cloud-credentials-next.png) + +Click `Launch Scan` + +![Launch Scan](./img/launch-scan-button-prowler-cloud.png) diff --git a/docs/tutorials/aws/img/add-account-id.png b/docs/tutorials/aws/img/add-account-id.png new file mode 100644 index 0000000000..bfded597a9 Binary files /dev/null and b/docs/tutorials/aws/img/add-account-id.png differ diff --git a/docs/tutorials/aws/img/assume-role-overview.png b/docs/tutorials/aws/img/assume-role-overview.png new file mode 100644 index 0000000000..d99ea0564e Binary files /dev/null and b/docs/tutorials/aws/img/assume-role-overview.png differ diff --git a/docs/tutorials/aws/img/aws-account-id.png b/docs/tutorials/aws/img/aws-account-id.png new file mode 100644 index 0000000000..ea7c96efc4 Binary files /dev/null and b/docs/tutorials/aws/img/aws-account-id.png differ diff --git a/docs/tutorials/aws/img/aws-cloudshell.png b/docs/tutorials/aws/img/aws-cloudshell.png new file mode 100644 index 0000000000..91e66c4ed3 Binary files /dev/null and b/docs/tutorials/aws/img/aws-cloudshell.png differ diff --git a/docs/tutorials/aws/img/cloudformation-nav.png b/docs/tutorials/aws/img/cloudformation-nav.png new file mode 100644 index 0000000000..3ea375a34c Binary files /dev/null and b/docs/tutorials/aws/img/cloudformation-nav.png differ diff --git a/docs/tutorials/aws/img/cloudshell-output.png b/docs/tutorials/aws/img/cloudshell-output.png new file mode 100644 index 0000000000..85a8493724 Binary files /dev/null and b/docs/tutorials/aws/img/cloudshell-output.png differ diff --git a/docs/tutorials/aws/img/connect-via-credentials.png b/docs/tutorials/aws/img/connect-via-credentials.png new file mode 100644 index 0000000000..4e3ba9e7f8 Binary files /dev/null and b/docs/tutorials/aws/img/connect-via-credentials.png differ diff --git a/docs/tutorials/aws/img/create-stack.png b/docs/tutorials/aws/img/create-stack.png new file mode 100644 index 0000000000..ab95304bb8 Binary files /dev/null and b/docs/tutorials/aws/img/create-stack.png differ diff --git a/docs/tutorials/aws/img/download-role-template.png b/docs/tutorials/aws/img/download-role-template.png new file mode 100644 index 0000000000..755e480ba9 Binary files /dev/null and b/docs/tutorials/aws/img/download-role-template.png differ diff --git a/docs/tutorials/aws/img/fill-stack-data.png b/docs/tutorials/aws/img/fill-stack-data.png new file mode 100644 index 0000000000..7c7214f0be Binary files /dev/null and b/docs/tutorials/aws/img/fill-stack-data.png differ diff --git a/docs/tutorials/aws/img/get-external-id-prowler-cloud.png b/docs/tutorials/aws/img/get-external-id-prowler-cloud.png new file mode 100644 index 0000000000..720557a06e Binary files /dev/null and b/docs/tutorials/aws/img/get-external-id-prowler-cloud.png differ diff --git a/docs/tutorials/aws/img/get-role-arn.png b/docs/tutorials/aws/img/get-role-arn.png new file mode 100644 index 0000000000..1add60580a Binary files /dev/null and b/docs/tutorials/aws/img/get-role-arn.png differ diff --git a/docs/tutorials/aws/img/launch-scan-button-prowler-cloud.png b/docs/tutorials/aws/img/launch-scan-button-prowler-cloud.png new file mode 100644 index 0000000000..06b7e37a85 Binary files /dev/null and b/docs/tutorials/aws/img/launch-scan-button-prowler-cloud.png differ diff --git a/docs/tutorials/aws/img/next-button-prowler-cloud.png b/docs/tutorials/aws/img/next-button-prowler-cloud.png new file mode 100644 index 0000000000..f41437c17e Binary files /dev/null and b/docs/tutorials/aws/img/next-button-prowler-cloud.png differ diff --git a/docs/tutorials/aws/img/next-cloudformation-template.png b/docs/tutorials/aws/img/next-cloudformation-template.png new file mode 100644 index 0000000000..1f646f90b8 Binary files /dev/null and b/docs/tutorials/aws/img/next-cloudformation-template.png differ diff --git a/docs/tutorials/aws/img/paste-role-arn-prowler.png b/docs/tutorials/aws/img/paste-role-arn-prowler.png new file mode 100644 index 0000000000..82d7165334 Binary files /dev/null and b/docs/tutorials/aws/img/paste-role-arn-prowler.png differ diff --git a/docs/tutorials/aws/img/prowler-cloud-credentials-next.png b/docs/tutorials/aws/img/prowler-cloud-credentials-next.png new file mode 100644 index 0000000000..0f73b00905 Binary files /dev/null and b/docs/tutorials/aws/img/prowler-cloud-credentials-next.png differ diff --git a/docs/tutorials/aws/img/prowler-cloud-external-id.png b/docs/tutorials/aws/img/prowler-cloud-external-id.png new file mode 100644 index 0000000000..79fb1b19e3 Binary files /dev/null and b/docs/tutorials/aws/img/prowler-cloud-external-id.png differ diff --git a/docs/tutorials/aws/img/prowler-scan-pre-info.png b/docs/tutorials/aws/img/prowler-scan-pre-info.png new file mode 100644 index 0000000000..950a45f3c1 Binary files /dev/null and b/docs/tutorials/aws/img/prowler-scan-pre-info.png differ diff --git a/docs/tutorials/aws/img/prowler-scan-role-template.png b/docs/tutorials/aws/img/prowler-scan-role-template.png new file mode 100644 index 0000000000..34847eb2d7 Binary files /dev/null and b/docs/tutorials/aws/img/prowler-scan-role-template.png differ diff --git a/docs/tutorials/aws/img/select-auth-method.png b/docs/tutorials/aws/img/select-auth-method.png new file mode 100644 index 0000000000..17d26dec41 Binary files /dev/null and b/docs/tutorials/aws/img/select-auth-method.png differ diff --git a/docs/tutorials/aws/img/select-aws.png b/docs/tutorials/aws/img/select-aws.png new file mode 100644 index 0000000000..f7d08ae628 Binary files /dev/null and b/docs/tutorials/aws/img/select-aws.png differ diff --git a/docs/tutorials/aws/img/stack-creation-second-step.png b/docs/tutorials/aws/img/stack-creation-second-step.png new file mode 100644 index 0000000000..fb4c6a27b0 Binary files /dev/null and b/docs/tutorials/aws/img/stack-creation-second-step.png differ diff --git a/docs/tutorials/aws/img/submit-third-page.png b/docs/tutorials/aws/img/submit-third-page.png new file mode 100644 index 0000000000..7bbb1db8b8 Binary files /dev/null and b/docs/tutorials/aws/img/submit-third-page.png differ diff --git a/docs/tutorials/aws/img/upload-template-file.png b/docs/tutorials/aws/img/upload-template-file.png new file mode 100644 index 0000000000..6455cee381 Binary files /dev/null and b/docs/tutorials/aws/img/upload-template-file.png differ diff --git a/docs/tutorials/aws/img/upload-template-from-downloads.png b/docs/tutorials/aws/img/upload-template-from-downloads.png new file mode 100644 index 0000000000..3d9bbc6716 Binary files /dev/null and b/docs/tutorials/aws/img/upload-template-from-downloads.png differ diff --git a/docs/tutorials/azure/getting-started-azure.md b/docs/tutorials/azure/getting-started-azure.md new file mode 100644 index 0000000000..b9331703e8 --- /dev/null +++ b/docs/tutorials/azure/getting-started-azure.md @@ -0,0 +1,171 @@ +# Getting Started with Azure on Prowler Cloud/App + + + +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/App +3. Configure authentication in Azure: + + 3.1 Create a Service Principal + + 3.2 Assign required permissions + + 3.3 Assign permissions at the subscription level + +4. Add the credentials to Prowler Cloud/App + +--- + +## Step 1: Get the Subscription ID + +1. Go to the [Azure Portal](https://portal.azure.com/#home) and search for `Subscriptions` +2. Locate and copy your Subscription ID + + ![Search Subscription](./img/search-subscriptions.png) + ![Subscriptions Page](./img/get-subscription-id.png) + +--- + +## Step 2: Access Prowler Cloud/App + +1. Go to [Prowler Cloud](https://cloud.prowler.com/) or launch [Prowler App](../prowler-app.md) +2. Navigate to `Configuration` > `Cloud Providers` + + ![Cloud Providers Page](../img/cloud-providers-page.png) + +3. Click on `Add Cloud Provider` + + ![Add a Cloud Provider](../img/add-cloud-provider.png) + +4. Select `Microsoft Azure` + + ![Select Microsoft Azure](./img/select-azure-prowler-cloud.png) + +5. Add the Subscription ID and an optional alias, then click `Next` + + ![Add Subscription ID](./img/add-subscription-id.png) + +--- + +## Step 3: Configure the Azure Subscription + +### Create the Service Principal + +A Service Principal is required to grant Prowler the necessary privileges. + +1. Access **Microsoft Entra ID** + + ![Search Microsoft Entra ID](./img/search-microsoft-entra-id.png) + +2. Navigate to `Manage` > `App registrations` + + ![App Registration nav](./img/app-registration-menu.png) + +3. Click `+ New registration`, complete the form, and click `Register` + + ![New Registration](./img/new-registration.png) + +4. Go to `Certificates & secrets` > `+ New client secret` + + ![Certificate & Secrets nav](./img/certificates-and-secrets.png) + ![New Client Secret](./img/new-client-secret.png) + +5. Fill in the required fields and click `Add`, then copy the generated value + +| Value | Description | +|-------|-------------| +| Client ID | Application ID | +| Client Secret | AZURE_CLIENT_SECRET | +| Tenant ID | Azure Active Directory tenant ID | + +--- + +### Assign Required API Permissions + +Assign the following Microsoft Graph permissions: + + - Directory.Read.All + + - Policy.Read.All + + - UserAuthenticationMethod.Read.All (optional, for MFA checks) + +1. Go to your App Registration > `API permissions` + + ![API Permission Page](./img/api-permissions-page.png) + +2. Click `+ Add a permission` > `Microsoft Graph` > `Application permissions` + + ![Add API Permission](./img/add-api-permission.png) + ![Microsoft Graph Detail](./img/microsoft-graph-detail.png) + +3. Search and select: + + - `Directory.Read.All` + - `Policy.Read.All` + - `UserAuthenticationMethod.Read.All` + + ![Permission Screenshots](./img/directory-permission.png) + +4. Click `Add permissions`, then grant admin consent + + ![Grant Admin Consent](./img/grant-admin-consent.png) + +--- + +### Assign Permissions at the Subscription Level + +1. Download the [Prowler Azure Custom Role](https://github.com/prowler-cloud/prowler/blob/master/permissions/prowler-azure-custom-role.json) + + ![Azure Custom Role](./img/download-prowler-role.png) + +2. Modify `assignableScopes` to match your Subscription ID (e.g. `/subscriptions/xxxx-xxxx-xxxx-xxxx`) + +3. Go to your Azure Subscription > `Access control (IAM)` + + ![IAM Page](./img/iam-azure-page.png) + +4. Click `+ Add` > `Add custom role`, choose "Start from JSON" and upload the modified file + + ![Add custom role via JSON](./img/add-custom-role-json.png) + +5. Click `Review + Create` to finish + + ![Select review and create](./img/review-and-create.png) + +6. Return to `Access control (IAM)` > `+ Add` > `Add role assignment` + + - Assign the `Reader` role + - Then repeat and assign the custom `ProwlerRole` + + ![Role Assignment](./img/add-role-assigment.png) + +--- + +## Step 4: Add Credentials to Prowler Cloud/App + +1. Go to your App Registration overview and copy the `Client ID` and `Tenant ID` + + ![App Overview](./img/app-overview.png) + +2. Go to Prowler Cloud/App and paste: + + - `Client ID` + - `Tenant ID` + - `AZURE_CLIENT_SECRET` from earlier + + ![Prowler Cloud Azure Credentials](./img/add-credentials-azure-prowler-cloud.png) + +3. Click `Next` + + ![Next Detail](./img/click-next-azure.png) + +4. Click `Launch Scan` + + ![Launch Scan Azure](./img/launch-scan.png) diff --git a/docs/tutorials/azure/img/add-api-permission.png b/docs/tutorials/azure/img/add-api-permission.png new file mode 100644 index 0000000000..9fa3d02b47 Binary files /dev/null and b/docs/tutorials/azure/img/add-api-permission.png differ diff --git a/docs/tutorials/azure/img/add-credentials-azure-prowler-cloud.png b/docs/tutorials/azure/img/add-credentials-azure-prowler-cloud.png new file mode 100644 index 0000000000..48b722a200 Binary files /dev/null and b/docs/tutorials/azure/img/add-credentials-azure-prowler-cloud.png differ diff --git a/docs/tutorials/azure/img/add-custom-role-json.png b/docs/tutorials/azure/img/add-custom-role-json.png new file mode 100644 index 0000000000..92e7d18bc7 Binary files /dev/null and b/docs/tutorials/azure/img/add-custom-role-json.png differ diff --git a/docs/tutorials/azure/img/add-custom-role.png b/docs/tutorials/azure/img/add-custom-role.png new file mode 100644 index 0000000000..0f00f05619 Binary files /dev/null and b/docs/tutorials/azure/img/add-custom-role.png differ diff --git a/docs/tutorials/azure/img/add-reader-role.png b/docs/tutorials/azure/img/add-reader-role.png new file mode 100644 index 0000000000..110ae1645d Binary files /dev/null and b/docs/tutorials/azure/img/add-reader-role.png differ diff --git a/docs/tutorials/azure/img/add-role-assigment.png b/docs/tutorials/azure/img/add-role-assigment.png new file mode 100644 index 0000000000..3037911aaf Binary files /dev/null and b/docs/tutorials/azure/img/add-role-assigment.png differ diff --git a/docs/tutorials/azure/img/add-subscription-id.png b/docs/tutorials/azure/img/add-subscription-id.png new file mode 100644 index 0000000000..235fd377b8 Binary files /dev/null and b/docs/tutorials/azure/img/add-subscription-id.png differ diff --git a/docs/tutorials/azure/img/api-permissions-page.png b/docs/tutorials/azure/img/api-permissions-page.png new file mode 100644 index 0000000000..9093cc5ece Binary files /dev/null and b/docs/tutorials/azure/img/api-permissions-page.png differ diff --git a/docs/tutorials/azure/img/api-permissions-result.png b/docs/tutorials/azure/img/api-permissions-result.png new file mode 100644 index 0000000000..26a7f83587 Binary files /dev/null and b/docs/tutorials/azure/img/api-permissions-result.png differ diff --git a/docs/tutorials/azure/img/app-overview.png b/docs/tutorials/azure/img/app-overview.png new file mode 100644 index 0000000000..bb869c098d Binary files /dev/null and b/docs/tutorials/azure/img/app-overview.png differ diff --git a/docs/tutorials/azure/img/app-registration-menu.png b/docs/tutorials/azure/img/app-registration-menu.png new file mode 100644 index 0000000000..cc66a0088c Binary files /dev/null and b/docs/tutorials/azure/img/app-registration-menu.png differ diff --git a/docs/tutorials/azure/img/application-permissions-inside-graph.png b/docs/tutorials/azure/img/application-permissions-inside-graph.png new file mode 100644 index 0000000000..58f0846d4f Binary files /dev/null and b/docs/tutorials/azure/img/application-permissions-inside-graph.png differ diff --git a/docs/tutorials/azure/img/certificates-and-secrets.png b/docs/tutorials/azure/img/certificates-and-secrets.png new file mode 100644 index 0000000000..6377a271f0 Binary files /dev/null and b/docs/tutorials/azure/img/certificates-and-secrets.png differ diff --git a/docs/tutorials/azure/img/click-add-permissions.png b/docs/tutorials/azure/img/click-add-permissions.png new file mode 100644 index 0000000000..f4f30fd591 Binary files /dev/null and b/docs/tutorials/azure/img/click-add-permissions.png differ diff --git a/docs/tutorials/azure/img/click-next-azure.png b/docs/tutorials/azure/img/click-next-azure.png new file mode 100644 index 0000000000..4e2e90cd98 Binary files /dev/null and b/docs/tutorials/azure/img/click-next-azure.png differ diff --git a/docs/tutorials/azure/img/directory-permission.png b/docs/tutorials/azure/img/directory-permission.png new file mode 100644 index 0000000000..34dc81abeb Binary files /dev/null and b/docs/tutorials/azure/img/directory-permission.png differ diff --git a/docs/tutorials/azure/img/download-prowler-role.png b/docs/tutorials/azure/img/download-prowler-role.png new file mode 100644 index 0000000000..ef03f7e6ef Binary files /dev/null and b/docs/tutorials/azure/img/download-prowler-role.png differ diff --git a/docs/tutorials/azure/img/get-subscription-id.png b/docs/tutorials/azure/img/get-subscription-id.png new file mode 100644 index 0000000000..2d4cfa4b2e Binary files /dev/null and b/docs/tutorials/azure/img/get-subscription-id.png differ diff --git a/docs/tutorials/azure/img/grant-admin-consent.png b/docs/tutorials/azure/img/grant-admin-consent.png new file mode 100644 index 0000000000..5c7a7c1169 Binary files /dev/null and b/docs/tutorials/azure/img/grant-admin-consent.png differ diff --git a/docs/tutorials/azure/img/iam-azure-page.png b/docs/tutorials/azure/img/iam-azure-page.png new file mode 100644 index 0000000000..db87f9e7ce Binary files /dev/null and b/docs/tutorials/azure/img/iam-azure-page.png differ diff --git a/docs/tutorials/azure/img/launch-scan.png b/docs/tutorials/azure/img/launch-scan.png new file mode 100644 index 0000000000..5fad0c34ea Binary files /dev/null and b/docs/tutorials/azure/img/launch-scan.png differ diff --git a/docs/tutorials/azure/img/member-select-app-prowler.png b/docs/tutorials/azure/img/member-select-app-prowler.png new file mode 100644 index 0000000000..e95984263a Binary files /dev/null and b/docs/tutorials/azure/img/member-select-app-prowler.png differ diff --git a/docs/tutorials/azure/img/microsoft-graph-detail.png b/docs/tutorials/azure/img/microsoft-graph-detail.png new file mode 100644 index 0000000000..888a2e551e Binary files /dev/null and b/docs/tutorials/azure/img/microsoft-graph-detail.png differ diff --git a/docs/tutorials/azure/img/new-client-secret.png b/docs/tutorials/azure/img/new-client-secret.png new file mode 100644 index 0000000000..2d1205d733 Binary files /dev/null and b/docs/tutorials/azure/img/new-client-secret.png differ diff --git a/docs/tutorials/azure/img/new-registration.png b/docs/tutorials/azure/img/new-registration.png new file mode 100644 index 0000000000..b3c9337683 Binary files /dev/null and b/docs/tutorials/azure/img/new-registration.png differ diff --git a/docs/tutorials/azure/img/policy-permission.png b/docs/tutorials/azure/img/policy-permission.png new file mode 100644 index 0000000000..dce61b7caf Binary files /dev/null and b/docs/tutorials/azure/img/policy-permission.png differ diff --git a/docs/tutorials/azure/img/prowler-app-registration.png b/docs/tutorials/azure/img/prowler-app-registration.png new file mode 100644 index 0000000000..9a2e521702 Binary files /dev/null and b/docs/tutorials/azure/img/prowler-app-registration.png differ diff --git a/docs/tutorials/azure/img/review-and-assign-last-step.png b/docs/tutorials/azure/img/review-and-assign-last-step.png new file mode 100644 index 0000000000..768c58f536 Binary files /dev/null and b/docs/tutorials/azure/img/review-and-assign-last-step.png differ diff --git a/docs/tutorials/azure/img/review-and-create.png b/docs/tutorials/azure/img/review-and-create.png new file mode 100644 index 0000000000..8ef0ec24b7 Binary files /dev/null and b/docs/tutorials/azure/img/review-and-create.png differ diff --git a/docs/tutorials/azure/img/search-microsoft-entra-id.png b/docs/tutorials/azure/img/search-microsoft-entra-id.png new file mode 100644 index 0000000000..f5fc7170eb Binary files /dev/null and b/docs/tutorials/azure/img/search-microsoft-entra-id.png differ diff --git a/docs/tutorials/azure/img/search-subscriptions.png b/docs/tutorials/azure/img/search-subscriptions.png new file mode 100644 index 0000000000..c9b3d2e017 Binary files /dev/null and b/docs/tutorials/azure/img/search-subscriptions.png differ diff --git a/docs/tutorials/azure/img/select-azure-prowler-cloud.png b/docs/tutorials/azure/img/select-azure-prowler-cloud.png new file mode 100644 index 0000000000..2b8b473d0a Binary files /dev/null and b/docs/tutorials/azure/img/select-azure-prowler-cloud.png differ diff --git a/docs/tutorials/azure/img/select-custom-role-prowler.png b/docs/tutorials/azure/img/select-custom-role-prowler.png new file mode 100644 index 0000000000..219455ce12 Binary files /dev/null and b/docs/tutorials/azure/img/select-custom-role-prowler.png differ diff --git a/docs/tutorials/azure/img/select-members-iam.png b/docs/tutorials/azure/img/select-members-iam.png new file mode 100644 index 0000000000..a7d0999a98 Binary files /dev/null and b/docs/tutorials/azure/img/select-members-iam.png differ diff --git a/docs/tutorials/azure/img/subscription-page-azure.png b/docs/tutorials/azure/img/subscription-page-azure.png new file mode 100644 index 0000000000..98bc1a0b26 Binary files /dev/null and b/docs/tutorials/azure/img/subscription-page-azure.png differ diff --git a/docs/tutorials/azure/img/user-permission.png b/docs/tutorials/azure/img/user-permission.png new file mode 100644 index 0000000000..4a402fe161 Binary files /dev/null and b/docs/tutorials/azure/img/user-permission.png differ 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/configuration_file.md b/docs/tutorials/configuration_file.md index 6a54e72bf2..78b9865183 100644 --- a/docs/tutorials/configuration_file.md +++ b/docs/tutorials/configuration_file.md @@ -97,14 +97,16 @@ The following list includes all the Kubernetes checks with configurable variable | `kubelet_strong_ciphers_only` | `kubelet_strong_ciphers` | String | -## Microsoft365 +## M365 ### Configurable Checks -The following list includes all the Microsoft365 checks with configurable variables that can be changed in the configuration yaml file: +The following list includes all the Microsoft 365 checks with configurable variables that can be changed in the configuration yaml file: | Check Name | Value | Type | |---------------------------------------------------------------|--------------------------------------------------|-----------------| | `entra_admin_users_sign_in_frequency_enabled` | `sign_in_frequency` | Integer | +| `teams_external_file_sharing_restricted` | `allowed_cloud_storage_services` | List of Strings | +| `exchange_organization_mailtips_enabled` | `recommended_mailtips_large_audience_threshold` | Integer | ## Config YAML File Structure @@ -504,10 +506,24 @@ kubernetes: "TLS_RSA_WITH_AES_128_GCM_SHA256", ] -# Microsoft365 Configuration -microsoft365: - # Conditional Access Policy - # policy.session_controls.sign_in_frequency.frequency in hours - sign_in_frequency: 4 +# M365 Configuration +m365: + # Entra Conditional Access Policy + # m365.entra_admin_users_sign_in_frequency_enabled + sign_in_frequency: 4 # 4 hours + # Teams Settings + # m365.teams_external_file_sharing_restricted + allowed_cloud_storage_services: + [ + #"allow_box", + #"allow_drop_box", + #"allow_egnyte", + #"allow_google_drive", + #"allow_share_file", + ] + # Exchange Organization Settings + # m365.exchange_organization_mailtips_enabled + recommended_mailtips_large_audience_threshold: 25 # maximum number of recipients + ``` diff --git a/docs/tutorials/gcp/authentication.md b/docs/tutorials/gcp/authentication.md index 85707a8f05..971796a753 100644 --- a/docs/tutorials/gcp/authentication.md +++ b/docs/tutorials/gcp/authentication.md @@ -4,8 +4,13 @@ Prowler will use by default your User Account credentials, you can configure it - `gcloud init` to use a new account - `gcloud config set account ` to use an existing account +- `gcloud auth application-default login` -Then, obtain your access credentials using: `gcloud auth application-default login` +This will generate Application Default Credentials (ADC) that Prowler will use automatically. + +--- + +## Using a Service Account key file Otherwise, you can generate and download Service Account keys in JSON format (refer to https://cloud.google.com/iam/docs/creating-managing-service-account-keys) and provide the location of the file with the following argument: @@ -16,14 +21,60 @@ prowler gcp --credentials-file path ???+ note `prowler` will scan the GCP project associated with the credentials. +--- -Prowler will follow the same credentials search as [Google authentication libraries](https://cloud.google.com/docs/authentication/application-default-credentials#search_order): +## Using an access token -1. [GOOGLE_APPLICATION_CREDENTIALS environment variable](https://cloud.google.com/docs/authentication/application-default-credentials#GAC) -2. [User credentials set up by using the Google Cloud CLI](https://cloud.google.com/docs/authentication/application-default-credentials#personal) -3. [The attached service account, returned by the metadata server](https://cloud.google.com/docs/authentication/application-default-credentials#attached-sa) +If you already have an access token (e.g., generated with `gcloud auth print-access-token`), you can run Prowler with: -Those credentials must be associated to a user or service account with proper permissions to do all checks. To make sure, add the `Viewer` role to the member associated with the credentials. +```bash +export CLOUDSDK_AUTH_ACCESS_TOKEN=$(gcloud auth print-access-token) +prowler gcp --project-ids +``` + +???+ note + If using this method, it's recommended to also set the default project explicitly: + ```bash + export GOOGLE_CLOUD_PROJECT= + ``` + +--- + +## Credentials lookup order + +Prowler follows the same search order as [Google authentication libraries](https://cloud.google.com/docs/authentication/application-default-credentials#search_order): + +1. [`GOOGLE_APPLICATION_CREDENTIALS` environment variable](https://cloud.google.com/docs/authentication/application-default-credentials#GAC) +2. [`CLOUDSDK_AUTH_ACCESS_TOKEN` + optional `GOOGLE_CLOUD_PROJECT`](https://cloud.google.com/sdk/gcloud/reference/auth/print-access-token) +3. [User credentials set up by using the Google Cloud CLI](https://cloud.google.com/docs/authentication/application-default-credentials#personal) +4. [Attached service account (e.g., Cloud Run, GCE, Cloud Functions)](https://cloud.google.com/docs/authentication/application-default-credentials#attached-sa) + +???+ note + The credentials must belong to a user or service account with the necessary permissions. + To ensure full access, assign the roles/viewer IAM role to the identity being used. + +???+ note + Prowler will use the enabled Google Cloud APIs to get the information needed to perform the checks. + +--- + + +## Needed permissions + +Prowler for Google Cloud needs the following permissions to be set: + +- **Viewer (`roles/viewer`) IAM role**: granted at the project / folder / org level in order to scan the target projects + +- **Project level settings**: you need to have at least one project with the below settings: + - Identity and Access Management (IAM) API (`iam.googleapis.com`) enabled by either using the + [Google Cloud API UI](https://console.cloud.google.com/apis/api/iam.googleapis.com/metrics) or + by using the gcloud CLI `gcloud services enable iam.googleapis.com --project ` command + - Service Usage Consumer (`roles/serviceusage.serviceUsageConsumer`) IAM role + - Set the quota project to be this project by either running `gcloud auth application-default set-quota-project ` or by setting an environment variable: + `export GOOGLE_CLOUD_QUOTA_PROJECT=` + + +The above settings must be associated to a user or service account. ???+ note Prowler will use the enabled Google Cloud APIs to get the information needed to perform the checks. diff --git a/docs/tutorials/gcp/getting-started-gcp.md b/docs/tutorials/gcp/getting-started-gcp.md new file mode 100644 index 0000000000..9047b5e0ef --- /dev/null +++ b/docs/tutorials/gcp/getting-started-gcp.md @@ -0,0 +1,107 @@ +# Getting Started with GCP on Prowler Cloud/App + + + +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/App +3. Configure authentication in GCP: + + 3.1 Retrieve credentials from Google Cloud + +4. Add the credentials to Prowler Cloud/App + +--- + +## Step 1: Get the Project ID + +1. Go to the [GCP Console](https://console.cloud.google.com/) +2. Locate your Project ID on the welcome screen + +![Get the Project ID](./img/project-id-console.png) + +--- + +## Step 2: Access Prowler Cloud/App + +1. Go to [Prowler Cloud](https://cloud.prowler.com/) or launch [Prowler App](../prowler-app.md) +2. Navigate to `Configuration` > `Cloud Providers` + + ![Cloud Providers Page](../img/cloud-providers-page.png) + +3. Click `Add Cloud Provider` + + ![Add a Cloud Provider](../img/add-cloud-provider.png) + +4. Select `Google Cloud Platform` + + ![Select GCP](./img/select-gcp.png) + +5. Add the Project ID and optionally provide a provider alias, then click `Next` + + ![Add Project ID](./img/add-project-id.png) + +--- + +## Step 3: Configure Authentication in GCP + +### Retrieve Credentials from Google Cloud + +1. In the [GCP Console](https://console.cloud.google.com/), click on `Activate Cloud Shell` + + ![Activate Cloud Shell](./img/access-console.png) + +2. Click `Authorize Cloud Shell` + + ![Authorize Cloud Shell](./img/authorize-cloud-shell.png) + +3. Run the following command: + + ```bash + gcloud auth application-default login + ``` + + - Type `Y` when prompted + + ![Run Gcloud Auth](./img/run-gcloud-auth.png) + +4. Open the authentication URL provided in a browser and select your Google account + + ![Choose the account](./img/take-account-email.png) + +5. Follow the steps to obtain the authentication code + + ![Copy auth code](./img/copy-auth-code.png) + +6. Paste the authentication code back in Cloud Shell + + ![Enter Auth Code](./img/enter-auth-code.png) + +7. Use `cat ` to view the temporary credentials file + + ![Get the FileName](./img/get-temp-file-credentials.png) + +8. Extract the following values for Prowler Cloud/App: + + - `client_id` + - `client_secret` + - `refresh_token` + + ![Get the values](./img/get-needed-values-auth.png) + +--- + +## Step 4: Add Credentials to Prowler Cloud/App + +1. Go back to Prowler Cloud/App and enter the required credentials, then click `Next` + + ![Enter the Credentials](./img/enter-credentials-prowler-cloud.png) + +2. Click `Launch Scan` to begin scanning your GCP environment + + ![Launch Scan GCP](./img/launch-scan.png) diff --git a/docs/tutorials/gcp/img/access-console.png b/docs/tutorials/gcp/img/access-console.png new file mode 100644 index 0000000000..9a7814e7b1 Binary files /dev/null and b/docs/tutorials/gcp/img/access-console.png differ diff --git a/docs/tutorials/gcp/img/add-project-id.png b/docs/tutorials/gcp/img/add-project-id.png new file mode 100644 index 0000000000..41b2971a06 Binary files /dev/null and b/docs/tutorials/gcp/img/add-project-id.png differ diff --git a/docs/tutorials/gcp/img/authorize-cloud-shell.png b/docs/tutorials/gcp/img/authorize-cloud-shell.png new file mode 100644 index 0000000000..88fc6bcbf9 Binary files /dev/null and b/docs/tutorials/gcp/img/authorize-cloud-shell.png differ diff --git a/docs/tutorials/gcp/img/copy-auth-code.png b/docs/tutorials/gcp/img/copy-auth-code.png new file mode 100644 index 0000000000..a8d0496603 Binary files /dev/null and b/docs/tutorials/gcp/img/copy-auth-code.png differ diff --git a/docs/tutorials/gcp/img/enter-auth-code.png b/docs/tutorials/gcp/img/enter-auth-code.png new file mode 100644 index 0000000000..03f80e29c4 Binary files /dev/null and b/docs/tutorials/gcp/img/enter-auth-code.png differ diff --git a/docs/tutorials/gcp/img/enter-credentials-prowler-cloud.png b/docs/tutorials/gcp/img/enter-credentials-prowler-cloud.png new file mode 100644 index 0000000000..286af1c643 Binary files /dev/null and b/docs/tutorials/gcp/img/enter-credentials-prowler-cloud.png differ diff --git a/docs/tutorials/gcp/img/get-needed-values-auth.png b/docs/tutorials/gcp/img/get-needed-values-auth.png new file mode 100644 index 0000000000..95953e1098 Binary files /dev/null and b/docs/tutorials/gcp/img/get-needed-values-auth.png differ diff --git a/docs/tutorials/gcp/img/get-temp-file-credentials.png b/docs/tutorials/gcp/img/get-temp-file-credentials.png new file mode 100644 index 0000000000..ce7160ee87 Binary files /dev/null and b/docs/tutorials/gcp/img/get-temp-file-credentials.png differ diff --git a/docs/tutorials/gcp/img/launch-scan.png b/docs/tutorials/gcp/img/launch-scan.png new file mode 100644 index 0000000000..49511e5300 Binary files /dev/null and b/docs/tutorials/gcp/img/launch-scan.png differ diff --git a/docs/tutorials/gcp/img/open-link-console.png b/docs/tutorials/gcp/img/open-link-console.png new file mode 100644 index 0000000000..05a1b61ce8 Binary files /dev/null and b/docs/tutorials/gcp/img/open-link-console.png differ diff --git a/docs/tutorials/gcp/img/project-id-console.png b/docs/tutorials/gcp/img/project-id-console.png new file mode 100644 index 0000000000..7701509f32 Binary files /dev/null and b/docs/tutorials/gcp/img/project-id-console.png differ diff --git a/docs/tutorials/gcp/img/run-gcloud-auth.png b/docs/tutorials/gcp/img/run-gcloud-auth.png new file mode 100644 index 0000000000..853fe33892 Binary files /dev/null and b/docs/tutorials/gcp/img/run-gcloud-auth.png differ diff --git a/docs/tutorials/gcp/img/select-gcp.png b/docs/tutorials/gcp/img/select-gcp.png new file mode 100644 index 0000000000..0aed14394c Binary files /dev/null and b/docs/tutorials/gcp/img/select-gcp.png differ diff --git a/docs/tutorials/gcp/img/take-account-email.png b/docs/tutorials/gcp/img/take-account-email.png new file mode 100644 index 0000000000..4076bb7fc0 Binary files /dev/null and b/docs/tutorials/gcp/img/take-account-email.png differ 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/img/add-cloud-provider.png b/docs/tutorials/img/add-cloud-provider.png new file mode 100644 index 0000000000..dd42e73047 Binary files /dev/null and b/docs/tutorials/img/add-cloud-provider.png differ diff --git a/docs/tutorials/img/cloud-providers-page.png b/docs/tutorials/img/cloud-providers-page.png new file mode 100644 index 0000000000..0581e0132f Binary files /dev/null and b/docs/tutorials/img/cloud-providers-page.png differ diff --git a/docs/tutorials/img/social-login/social_login_buttons.png b/docs/tutorials/img/social-login/social_login_buttons.png new file mode 100644 index 0000000000..476081e0fc Binary files /dev/null and b/docs/tutorials/img/social-login/social_login_buttons.png differ diff --git a/docs/tutorials/img/social-login/social_login_buttons_disabled.png b/docs/tutorials/img/social-login/social_login_buttons_disabled.png new file mode 100644 index 0000000000..7b11a7802d Binary files /dev/null and b/docs/tutorials/img/social-login/social_login_buttons_disabled.png differ 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/kubernetes/misc.md b/docs/tutorials/kubernetes/misc.md index 2554bc712b..0d1edb936b 100644 --- a/docs/tutorials/kubernetes/misc.md +++ b/docs/tutorials/kubernetes/misc.md @@ -21,3 +21,23 @@ To specify the namespace(s) to be scanned, use the `--namespace` flag followed b ```console prowler --namespace namespace1 namespace2 ``` + +## Proxy and TLS Verification + +If your Kubernetes cluster is only accessible via an internal proxy, Prowler will respect the `HTTPS_PROXY` or `https_proxy` environment variable: + +```console +export HTTPS_PROXY=http://my.internal.proxy:8888 +prowler kubernetes ... +``` + +If you need to skip TLS verification for internal proxies, you can set the `K8S_SKIP_TLS_VERIFY` environment variable: + +```console +export K8S_SKIP_TLS_VERIFY=true +prowler kubernetes ... +``` + +This will allow Prowler to connect to the cluster even if the proxy uses a self-signed certificate. + +These environment variables are supported both when using an external `kubeconfig` and in in-cluster mode. diff --git a/docs/tutorials/microsoft365/authentication.md b/docs/tutorials/microsoft365/authentication.md index 750352ed76..f8bd9d13d4 100644 --- a/docs/tutorials/microsoft365/authentication.md +++ b/docs/tutorials/microsoft365/authentication.md @@ -1,23 +1,28 @@ -# Microsoft365 authentication +# Microsoft 365 authentication By default Prowler uses MsGraph Python SDK identity package authentication methods using the class `ClientSecretCredential`. -This allows Prowler to authenticate against microsoft365 using the following methods: +This allows Prowler to authenticate against Microsoft 365 using the following methods: - Service principal authentication by environment variables (Enterprise Application) +- Service principal and Microsoft user credentials by environment variabled (using PowerShell requires this authentication method) - Current CLI credentials stored - Interactive browser authentication + To launch the tool first you need to specify which method is used through the following flags: ```console +# To use service principal (app) authentication and Microsoft user credentials (to use PowerShell) +prowler m365 --env-auth + # To use service principal authentication -prowler microsoft365 --sp-env-auth +prowler m365 --sp-env-auth # To use cli authentication -prowler microsoft365 --az-cli-auth +prowler m365 --az-cli-auth # To use browser authentication -prowler microsoft365 --browser-auth --tenant-id "XXXXXXXX" +prowler m365 --browser-auth --tenant-id "XXXXXXXX" ``` -To use Prowler you need to set up also the permissions required to access your resources in your Microsoft365 account, to more details refer to [Requirements](../../getting-started/requirements.md) +To use Prowler you need to set up also the permissions required to access your resources in your Microsoft 365 account, to more details refer to [Requirements](../../getting-started/requirements.md#microsoft-365) diff --git a/docs/tutorials/microsoft365/getting-started-m365.md b/docs/tutorials/microsoft365/getting-started-m365.md new file mode 100644 index 0000000000..067b31a1dd --- /dev/null +++ b/docs/tutorials/microsoft365/getting-started-m365.md @@ -0,0 +1,205 @@ +# Getting Started with M365 on Prowler Cloud/App + +Set up your M365 account to enable security scanning using Prowler Cloud/App. + +## Requirements + +To configure your M365 account, youโ€™ll need: + +1. Obtain your `Default Domain` from the Entra ID portal. + +2. Access Prowler Cloud/App and add a new cloud provider `Microsoft 365`. + +3. Configure your M365 account: + + 3.1 Create the Service Principal app. + + 3.2 Grant the required API permissions. + + 3.3 Assign the required roles to your user. + + 3.4 Retrieve your encrypted password. + +4. Add the credentials to Prowler Cloud/App. + +## Step 1: Obtain your Domain + +Go to the Entra ID portal, then you can search for `Domain` or go to Identity > Settings > Domain Names. + +![Search Domain Names](./img/search-domain-names.png) + +
+ +![Custom Domain Names](./img/custom-domain-names.png) + +Once you are there just look for the `Default Domain` this should be something similar to `YourCompany.onmicrosoft.com`. To ensure that you are picking the correct domain just click on it and verify that the type is `Initial` and you can't delete it. + +![Search Default Domain](./img/search-default-domain.png) + +--- + +## Step 2: Access Prowler Cloud/App + +1. Go to [Prowler Cloud](https://cloud.prowler.com/) or launch [Prowler App](../prowler-app.md) +2. Navigate to `Configuration` > `Cloud Providers` + + ![Cloud Providers Page](../img/cloud-providers-page.png) + +3. Click on `Add Cloud Provider` + + ![Add a Cloud Provider](../img/add-cloud-provider.png) + +4. Select `Microsoft 365` + + ![Select Microsoft 365](./img/select-m365-prowler-cloud.png) + +5. Add the Domain ID and an optional alias, then click `Next` + + ![Add Domain ID](./img/add-domain-id.png) + +--- + +## Step 3: Configure your M365 account + + +### Create the Service Principal app + +A Service Principal is required to grant Prowler the necessary privileges. + +1. Access **Microsoft Entra ID** + + ![Overview of Microsoft Entra ID](./img/microsoft-entra-id.png) + +2. Navigate to `Applications` > `App registrations` + + ![App Registration nav](./img/app-registration-menu.png) + +3. Click `+ New registration`, complete the form, and click `Register` + + ![New Registration](./img/new-registration.png) + +4. Go to `Certificates & secrets` > `+ New client secret` + + ![Certificate & Secrets nav](./img/certificates-and-secrets.png) + +5. Fill in the required fields and click `Add`, then copy the generated value (that value will be `AZURE_CLIENT_SECRET`) + + ![New Client Secret](./img/new-client-secret.png) + +With this done you will have all the needed keys, summarized in the following table + +| Value | Description | +|-------|-------------| +| Client ID | Application (client) ID | +| Client Secret | AZURE_CLIENT_SECRET | +| Tenant ID | Directory (tenant) ID | + +--- + +### Grant required API permissions + +Assign the following Microsoft Graph permissions: + +- `Directory.Read.All`: Required for all services. +- `Policy.Read.All`: Required for all services. +- `User.Read` (IMPORTANT: this is set as **delegated**): Required for the sign-in. +- `Sites.Read.All`: Required for SharePoint service. +- `SharePointTenantSettings.Read.All`: Required for SharePoint service. + +Follow these steps to assign the permissions: + +1. Go to your App Registration > Select your Prowler App created before > click on `API permissions` + + ![API Permission Page](./img/api-permissions-page.png) + +2. Click `+ Add a permission` > `Microsoft Graph` > `Application permissions` + + ![Add API Permission](./img/add-app-api-permission.png) + +3. Search and select every permission below and once all are selected click on `Add permissions`: + + - `Directory.Read.All` + - `Policy.Read.All` + - `Sites.Read.All` + - `SharePointTenantSettings.Read.All` + + ![Permission Screenshots](./img/directory-permission.png) + +4. Click `Add permissions`, then grant admin consent + + ![Grant Admin Consent](./img/grant-admin-consent.png) + +5. Click `+ Add a permission` > `Microsoft Graph` > `Delegated permissions` + + ![Add API Permission](./img/add-delegated-api-permission.png) + +6. Search and select: + + - `User.Read` + + ![Permission Screenshots](./img/directory-permission-delegated.png) + +7. Click `Add permissions`, then grant admin consent + + ![Grant Admin Consent](./img/grant-admin-consent-delegated.png) + +--- + +### Assign required roles to your user + +Assign one of the following roles to your User: + +- `Global Reader` (recommended): this allows you to read all roles needed. +- `Exchange Administrator` and `Teams Administrator`: user needs both roles but with this [roles](https://learn.microsoft.com/en-us/exchange/permissions-exo/permissions-exo#microsoft-365-permissions-in-exchange-online) you can access to the same information as a Global Reader (here you only read so that's why we recomend that role). + +Follow these steps to assign the role: + +1. Go to Users > All Users > Click on the email for the user you will use + + ![User Overview](./img/user-info-page.png) + +2. Click `Assigned Roles` + + ![User Roles](./img/user-role-page.png) + +3. Click on `Add assignments`, then search and select: + + - `Global Reader` This is the recommended, if you want to use the others just search for them + + ![Global Reader Screenshots](./img/global-reader.png) + +4. Click on next, then assign the role as `Active`, and click on `Assign` to grant admin consent + + ![Grant Admin Consent for Role](./img/grant-admin-consent-for-role.png) + +--- + +### Get your encrypted password + +For this step you will need to use PowerShell, here you will have to create your Encrypted Password based on the password of the User that you are going to use. For more information about how to generate this Password go [here](../../getting-started/requirements.md#service-principal-and-user-credentials-authentication-recommended) and follow the steps needed to obtain `M365_ENCRYPTED_PASSWORD`. + +--- + +## Step 4: Add credentials to Prowler Cloud/App + +1. Go to your App Registration overview and copy the `Client ID` and `Tenant ID` + + ![App Overview](./img/app-overview.png) + +2. Go to Prowler Cloud/App and paste: + + - `Client ID` + - `Tenant ID` + - `AZURE_CLIENT_SECRET` from earlier + - `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 + + ![Prowler Cloud M365 Credentials](./img/m365-credentials.png) + +3. Click `Next` + + ![Next Detail](./img/click-next-m365.png) + +4. Click `Launch Scan` + + ![Launch Scan M365](./img/launch-scan.png) diff --git a/docs/tutorials/microsoft365/img/add-app-api-permission.png b/docs/tutorials/microsoft365/img/add-app-api-permission.png new file mode 100644 index 0000000000..f05e113e9e Binary files /dev/null and b/docs/tutorials/microsoft365/img/add-app-api-permission.png differ diff --git a/docs/tutorials/microsoft365/img/add-delegated-api-permission.png b/docs/tutorials/microsoft365/img/add-delegated-api-permission.png new file mode 100644 index 0000000000..8dc7f200df Binary files /dev/null and b/docs/tutorials/microsoft365/img/add-delegated-api-permission.png differ 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/api-permissions-page.png b/docs/tutorials/microsoft365/img/api-permissions-page.png new file mode 100644 index 0000000000..32a7cf2e9e Binary files /dev/null and b/docs/tutorials/microsoft365/img/api-permissions-page.png differ diff --git a/docs/tutorials/microsoft365/img/app-overview.png b/docs/tutorials/microsoft365/img/app-overview.png new file mode 100644 index 0000000000..1a2cf7b2ab Binary files /dev/null and b/docs/tutorials/microsoft365/img/app-overview.png differ diff --git a/docs/tutorials/microsoft365/img/app-registration-menu.png b/docs/tutorials/microsoft365/img/app-registration-menu.png new file mode 100644 index 0000000000..7f1dffe36e Binary files /dev/null and b/docs/tutorials/microsoft365/img/app-registration-menu.png differ diff --git a/docs/tutorials/microsoft365/img/certificates-and-secrets.png b/docs/tutorials/microsoft365/img/certificates-and-secrets.png new file mode 100644 index 0000000000..264d7c2f9d Binary files /dev/null and b/docs/tutorials/microsoft365/img/certificates-and-secrets.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/custom-domain-names.png b/docs/tutorials/microsoft365/img/custom-domain-names.png new file mode 100644 index 0000000000..f0a234c89f Binary files /dev/null and b/docs/tutorials/microsoft365/img/custom-domain-names.png differ diff --git a/docs/tutorials/microsoft365/img/directory-permission-delegated.png b/docs/tutorials/microsoft365/img/directory-permission-delegated.png new file mode 100644 index 0000000000..cafa05d82c Binary files /dev/null and b/docs/tutorials/microsoft365/img/directory-permission-delegated.png differ diff --git a/docs/tutorials/microsoft365/img/directory-permission.png b/docs/tutorials/microsoft365/img/directory-permission.png new file mode 100644 index 0000000000..3a539d2d63 Binary files /dev/null and b/docs/tutorials/microsoft365/img/directory-permission.png differ diff --git a/docs/tutorials/microsoft365/img/global-reader.png b/docs/tutorials/microsoft365/img/global-reader.png new file mode 100644 index 0000000000..a219e7d07e Binary files /dev/null and b/docs/tutorials/microsoft365/img/global-reader.png differ diff --git a/docs/tutorials/microsoft365/img/grant-admin-consent-delegated.png b/docs/tutorials/microsoft365/img/grant-admin-consent-delegated.png new file mode 100644 index 0000000000..aa2e96ce70 Binary files /dev/null and b/docs/tutorials/microsoft365/img/grant-admin-consent-delegated.png differ diff --git a/docs/tutorials/microsoft365/img/grant-admin-consent-for-role.png b/docs/tutorials/microsoft365/img/grant-admin-consent-for-role.png new file mode 100644 index 0000000000..773c72b824 Binary files /dev/null and b/docs/tutorials/microsoft365/img/grant-admin-consent-for-role.png differ diff --git a/docs/tutorials/microsoft365/img/grant-admin-consent.png b/docs/tutorials/microsoft365/img/grant-admin-consent.png new file mode 100644 index 0000000000..2258d31b8e Binary files /dev/null and b/docs/tutorials/microsoft365/img/grant-admin-consent.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/microsoft-entra-id.png b/docs/tutorials/microsoft365/img/microsoft-entra-id.png new file mode 100644 index 0000000000..11d61387ef Binary files /dev/null and b/docs/tutorials/microsoft365/img/microsoft-entra-id.png differ diff --git a/docs/tutorials/microsoft365/img/new-client-secret.png b/docs/tutorials/microsoft365/img/new-client-secret.png new file mode 100644 index 0000000000..2a02652351 Binary files /dev/null and b/docs/tutorials/microsoft365/img/new-client-secret.png differ diff --git a/docs/tutorials/microsoft365/img/new-registration.png b/docs/tutorials/microsoft365/img/new-registration.png new file mode 100644 index 0000000000..8366966afa Binary files /dev/null and b/docs/tutorials/microsoft365/img/new-registration.png differ diff --git a/docs/tutorials/microsoft365/img/search-default-domain.png b/docs/tutorials/microsoft365/img/search-default-domain.png new file mode 100644 index 0000000000..3e0be42b8b Binary files /dev/null and b/docs/tutorials/microsoft365/img/search-default-domain.png differ diff --git a/docs/tutorials/microsoft365/img/search-domain-names.png b/docs/tutorials/microsoft365/img/search-domain-names.png new file mode 100644 index 0000000000..21cd081afa Binary files /dev/null and b/docs/tutorials/microsoft365/img/search-domain-names.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/microsoft365/img/user-domains.png b/docs/tutorials/microsoft365/img/user-domains.png new file mode 100644 index 0000000000..e499a066fc Binary files /dev/null and b/docs/tutorials/microsoft365/img/user-domains.png differ diff --git a/docs/tutorials/microsoft365/img/user-info-page.png b/docs/tutorials/microsoft365/img/user-info-page.png new file mode 100644 index 0000000000..f0e2152fe0 Binary files /dev/null and b/docs/tutorials/microsoft365/img/user-info-page.png differ diff --git a/docs/tutorials/microsoft365/img/user-role-page.png b/docs/tutorials/microsoft365/img/user-role-page.png new file mode 100644 index 0000000000..53688d59b7 Binary files /dev/null and b/docs/tutorials/microsoft365/img/user-role-page.png differ diff --git a/docs/tutorials/microsoft365/use-of-powershell.md b/docs/tutorials/microsoft365/use-of-powershell.md new file mode 100644 index 0000000000..d8fa5585bf --- /dev/null +++ b/docs/tutorials/microsoft365/use-of-powershell.md @@ -0,0 +1,12 @@ +PowerShell is required by this provider because it is the only way to retrieve data from certain Microsoft 365 services. + +## Installing PowerShell + +If you are using Prowler Cloud, you don't need to worry about PowerShell โ€” it is already installed in our infrastructure. +However, if you want to run Prowler on your own, you must have PowerShell installed to execute the full M365 provider and retrieve all findings. +To learn more about how to install PowerShell and which versions are supported, click [here](../../getting-started/requirements.md#supported-powershell-versions). + +## Required Modules + +The necessary modules will not be installed automatically by Prowler. Nevertheless, if you want Prowler to install them for you, you can execute the provider with the flag `--init-modules`, which will run the script to install and import them. +If you want to learn more about this process or you are running some issues with this, click [here](../../getting-started/requirements.md#needed-powershell-modules). diff --git a/docs/tutorials/misc.md b/docs/tutorials/misc.md index 5b17592548..2f646aab10 100644 --- a/docs/tutorials/misc.md +++ b/docs/tutorials/misc.md @@ -38,11 +38,11 @@ prowler --list-checks ``` - Execute specific check(s): ```console -prowler -c/--checks s3_bucket_public_access +prowler -c/--checks s3_bucket_public_access iam_root_mfa_enabled ``` - Exclude specific check(s): ```console -prowler -e/--excluded-checks ec2 rds +prowler -e/--excluded-checks s3_bucket_public_access iam_root_mfa_enabled ``` - Execute checks that appears in a json file: ```json diff --git a/docs/tutorials/prowler-app-social-login.md b/docs/tutorials/prowler-app-social-login.md new file mode 100644 index 0000000000..6b4dd53a57 --- /dev/null +++ b/docs/tutorials/prowler-app-social-login.md @@ -0,0 +1,52 @@ +# Social Login Configuration + +The **Prowler App** supports social login using Google and GitHub OAuth providers. This document guides you through configuring the required environment variables to enable social authentication. + +Social login buttons + +## Configuring Social Login Credentials + +To enable social login with Google and GitHub, you must define the following environment variables: + +### Google OAuth Configuration + +Set the following environment variables for Google OAuth: + +```env +SOCIAL_GOOGLE_OAUTH_CLIENT_ID="" +SOCIAL_GOOGLE_OAUTH_CLIENT_SECRET="" +``` + +### GitHub OAuth Configuration + +Set the following environment variables for GitHub OAuth: + +```env +SOCIAL_GITHUB_OAUTH_CLIENT_ID="" +SOCIAL_GITHUB_OAUTH_CLIENT_SECRET="" +``` + +### Important Notes + +- If either `SOCIAL_GOOGLE_OAUTH_CLIENT_ID` or `SOCIAL_GOOGLE_OAUTH_CLIENT_SECRET` is empty or not defined, the Google login button will be disabled. +- If either `SOCIAL_GITHUB_OAUTH_CLIENT_ID` or `SOCIAL_GITHUB_OAUTH_CLIENT_SECRET` is empty or not defined, the GitHub login button will be disabled. + + +Social login buttons disabled + +## Obtaining OAuth Credentials + +To obtain `CLIENT_ID` and `CLIENT_SECRET` for each provider, follow their official documentation: + +- **Google OAuth**: [Google OAuth Credentials Setup](https://developers.google.com/identity/protocols/oauth2) +- **GitHub OAuth**: [GitHub OAuth App Setup](https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/creating-an-oauth-app) + +### Steps Overview + +For both providers, the process generally involves: + +1. Registering your application in the provider's developer portal. +2. Defining the authorized redirect URL (`SOCIAL__OAUTH_CALLBACK_URL`). +3. Copying the generated `CLIENT_ID` and `CLIENT_SECRET` into the corresponding environment variables. + +Once completed, ensure your environment variables are correctly loaded in your Prowler deployment to activate social login. diff --git a/docs/tutorials/prowler-app.md b/docs/tutorials/prowler-app.md index 18e5f5a2df..0137689147 100644 --- a/docs/tutorials/prowler-app.md +++ b/docs/tutorials/prowler-app.md @@ -9,11 +9,23 @@ You can also access to the auto-generated **Prowler API** documentation at [http If you are a [Prowler Cloud](https://cloud.prowler.com/sign-in) user you can see API docs at [https://api.prowler.com/api/v1/docs](https://api.prowler.com/api/v1/docs) ## **Step 1: Sign Up** +### **Sign up with Email** To get started, sign up using your email and password: Sign Up Button Sign Up +### **Sign up with Social Login** + +If Social Login is enabled, you can sign up using your preferred provider (e.g., Google, GitHub). + +???+ note "How Social Login Works" + - If your email is already registered, you will be logged in, and your social account will be linked. + - If your email is not registered, a new account will be created using your social account email. + +???+ note "Enable Social Login" + See [how to configure Social Login for Prowler](prowler-app-social-login.md) to enable this feature in your own deployments. + --- ## **Step 2: Log In** @@ -138,6 +150,13 @@ 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). + +Prowler Cloud M365 Credentials + +--- + ## **Step 5: Test Connection** After adding your credentials of your cloud account, click the `Launch` button to verify that the Prowler App can successfully connect to your provider: @@ -175,12 +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. +Scan Jobs section + +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. Download output -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. Output folder + +???+ note "API Note" + 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. + +Compliance section + +- Find the Framework report you need. + +- Click its **Download** icon to retrieve that reportโ€™s CSV file with all the detailed findings. + +Download compliance output + +???+ 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/examples/output/example_output_azure.ocsf.json b/examples/output/example_output_azure.ocsf.json index f90549ba48..2190cb308f 100644 --- a/examples/output/example_output_azure.ocsf.json +++ b/examples/output/example_output_azure.ocsf.json @@ -377,7 +377,7 @@ "product_uid": "prowler", "title": "Ensure Image Vulnerability Scanning using Azure Defender image scanning or a third party provider", "types": [], - "uid": "prowler-azure-defender_container_images_scan_enabled--global-Dender plan for Containers" + "uid": "prowler-azure-defender_container_images_scan_enabled--global-Defender plan for Containers" }, "resources": [ { diff --git a/examples/sdk/aws_scan.ipynb b/examples/sdk/aws_scan.ipynb index e6294a081a..f19b3ad897 100644 --- a/examples/sdk/aws_scan.ipynb +++ b/examples/sdk/aws_scan.ipynb @@ -66,7 +66,7 @@ "# from prowler.providers.gcp.gcp_provider import GcpProvider\n", "# from prowler.providers.azure.azure_provider import AzureProvider\n", "# from prowler.providers.kubernetes.kubernetes_provider import KubernetesProvider\n", - "# from prowler.providers.microsoft365.microsoft365_provider import Microsoft365Provider" + "# from prowler.providers.m365.m365_provider import M365Provider" ] }, { diff --git a/kubernetes/job.yaml b/kubernetes/job.yaml index ac21722eb0..5eb791827b 100644 --- a/kubernetes/job.yaml +++ b/kubernetes/job.yaml @@ -13,7 +13,6 @@ spec: containers: - name: prowler image: toniblyx/prowler:stable - command: ["prowler"] args: ["kubernetes", "-z"] imagePullPolicy: Always volumeMounts: diff --git a/mkdocs.yml b/mkdocs.yml index a2fa253e4e..b01fa5a2bb 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -34,10 +34,10 @@ theme: icon: material/weather-sunny name: Switch to light mode -plugins: - - search - - git-revision-date-localized: - enable_creation_date: true +# plugins: +# - search +# - git-revision-date-localized: +# enable_creation_date: true edit_uri: "https://github.com/prowler-cloud/prowler/tree/master/docs" # Prowler OSS Repository @@ -50,27 +50,29 @@ nav: - Requirements: getting-started/requirements.md - Tutorials: - Prowler App: - - Getting Started: tutorials/prowler-app.md - - Role-Based Access Control: tutorials/prowler-app-rbac.md + - Getting Started: tutorials/prowler-app.md + - Role-Based Access Control: tutorials/prowler-app-rbac.md + - Social Login: tutorials/prowler-app-social-login.md - CLI: - - Miscellaneous: tutorials/misc.md - - Reporting: tutorials/reporting.md - - Compliance: tutorials/compliance.md - - Dashboard: tutorials/dashboard.md - - Fixer (remediations): tutorials/fixer.md - - Quick Inventory: tutorials/quick-inventory.md - - Slack Integration: tutorials/integrations.md - - Configuration File: tutorials/configuration_file.md - - Logging: tutorials/logging.md - - Mutelist: tutorials/mutelist.md - - Check Aliases: tutorials/check-aliases.md - - Custom Metadata: tutorials/custom-checks-metadata.md - - Scan Unused Services: tutorials/scan-unused-services.md - - Pentesting: tutorials/pentesting.md - - Parallel Execution: tutorials/parallel-execution.md - - Developer Guide: developer-guide/introduction.md - - Prowler Check Kreator: tutorials/prowler-check-kreator.md + - Miscellaneous: tutorials/misc.md + - Reporting: tutorials/reporting.md + - Compliance: tutorials/compliance.md + - Dashboard: tutorials/dashboard.md + - Fixer (remediations): tutorials/fixer.md + - Quick Inventory: tutorials/quick-inventory.md + - Slack Integration: tutorials/integrations.md + - Configuration File: tutorials/configuration_file.md + - Logging: tutorials/logging.md + - Mutelist: tutorials/mutelist.md + - Check Aliases: tutorials/check-aliases.md + - Custom Metadata: tutorials/custom-checks-metadata.md + - Scan Unused Services: tutorials/scan-unused-services.md + - Pentesting: tutorials/pentesting.md + - Parallel Execution: tutorials/parallel-execution.md + - Developer Guide: developer-guide/introduction.md + - Prowler Check Kreator: tutorials/prowler-check-kreator.md - AWS: + - Getting Started: tutorials/aws/getting-started-aws.md - Authentication: tutorials/aws/authentication.md - Assume Role: tutorials/aws/role-assumption.md - AWS Security Hub: tutorials/aws/securityhub.md @@ -85,11 +87,13 @@ nav: - Boto3 Configuration: tutorials/aws/boto3-configuration.md - Threat Detection: tutorials/aws/threat-detection.md - Azure: + - Getting Started: tutorials/azure/getting-started-azure.md - Authentication: tutorials/azure/authentication.md - Non default clouds: tutorials/azure/use-non-default-cloud.md - Subscriptions: tutorials/azure/subscriptions.md - Create Prowler Service Principal: tutorials/azure/create-prowler-service-principal.md - Google Cloud: + - Getting Started: tutorials/gcp/getting-started-gcp.md - Authentication: tutorials/gcp/authentication.md - Projects: tutorials/gcp/projects.md - Organization: tutorials/gcp/organization.md @@ -98,8 +102,9 @@ nav: - Non In-Cluster Execution: tutorials/kubernetes/outside-cluster.md - Miscellaneous: tutorials/kubernetes/misc.md - Microsoft 365: + - Getting Started: tutorials/microsoft365/getting-started-m365.md - Authentication: tutorials/microsoft365/authentication.md - - Create Prowler Service Principal: tutorials/microsoft365/create-prowler-service-principal.md + - Use of PowerShell: tutorials/microsoft365/use-of-powershell.md - Developer Guide: - Introduction: developer-guide/introduction.md - Provider: developer-guide/provider.md diff --git a/poetry.lock b/poetry.lock index 7a4e9e4155..01c3b39bd3 100644 --- a/poetry.lock +++ b/poetry.lock @@ -14,100 +14,105 @@ files = [ [[package]] name = "aiohappyeyeballs" -version = "2.4.4" +version = "2.6.1" description = "Happy Eyeballs for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["main"] files = [ - {file = "aiohappyeyeballs-2.4.4-py3-none-any.whl", hash = "sha256:a980909d50efcd44795c4afeca523296716d50cd756ddca6af8c65b996e27de8"}, - {file = "aiohappyeyeballs-2.4.4.tar.gz", hash = "sha256:5fdd7d87889c63183afc18ce9271f9b0a7d32c2303e394468dd45d514a757745"}, + {file = "aiohappyeyeballs-2.6.1-py3-none-any.whl", hash = "sha256:f349ba8f4b75cb25c99c5c2d84e997e485204d2902a9597802b0371f09331fb8"}, + {file = "aiohappyeyeballs-2.6.1.tar.gz", hash = "sha256:c3f9d0113123803ccadfdf3f0faa505bc78e6a72d1cc4806cbd719826e943558"}, ] [[package]] name = "aiohttp" -version = "3.11.11" +version = "3.11.18" description = "Async http client/server framework (asyncio)" optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "aiohttp-3.11.11-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a60804bff28662cbcf340a4d61598891f12eea3a66af48ecfdc975ceec21e3c8"}, - {file = "aiohttp-3.11.11-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:4b4fa1cb5f270fb3eab079536b764ad740bb749ce69a94d4ec30ceee1b5940d5"}, - {file = "aiohttp-3.11.11-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:731468f555656767cda219ab42e033355fe48c85fbe3ba83a349631541715ba2"}, - {file = "aiohttp-3.11.11-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cb23d8bb86282b342481cad4370ea0853a39e4a32a0042bb52ca6bdde132df43"}, - {file = "aiohttp-3.11.11-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f047569d655f81cb70ea5be942ee5d4421b6219c3f05d131f64088c73bb0917f"}, - {file = "aiohttp-3.11.11-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dd7659baae9ccf94ae5fe8bfaa2c7bc2e94d24611528395ce88d009107e00c6d"}, - {file = "aiohttp-3.11.11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:af01e42ad87ae24932138f154105e88da13ce7d202a6de93fafdafb2883a00ef"}, - {file = "aiohttp-3.11.11-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5854be2f3e5a729800bac57a8d76af464e160f19676ab6aea74bde18ad19d438"}, - {file = "aiohttp-3.11.11-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:6526e5fb4e14f4bbf30411216780c9967c20c5a55f2f51d3abd6de68320cc2f3"}, - {file = "aiohttp-3.11.11-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:85992ee30a31835fc482468637b3e5bd085fa8fe9392ba0bdcbdc1ef5e9e3c55"}, - {file = "aiohttp-3.11.11-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:88a12ad8ccf325a8a5ed80e6d7c3bdc247d66175afedbe104ee2aaca72960d8e"}, - {file = "aiohttp-3.11.11-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:0a6d3fbf2232e3a08c41eca81ae4f1dff3d8f1a30bae415ebe0af2d2458b8a33"}, - {file = "aiohttp-3.11.11-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:84a585799c58b795573c7fa9b84c455adf3e1d72f19a2bf498b54a95ae0d194c"}, - {file = "aiohttp-3.11.11-cp310-cp310-win32.whl", hash = "sha256:bfde76a8f430cf5c5584553adf9926534352251d379dcb266ad2b93c54a29745"}, - {file = "aiohttp-3.11.11-cp310-cp310-win_amd64.whl", hash = "sha256:0fd82b8e9c383af11d2b26f27a478640b6b83d669440c0a71481f7c865a51da9"}, - {file = "aiohttp-3.11.11-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:ba74ec819177af1ef7f59063c6d35a214a8fde6f987f7661f4f0eecc468a8f76"}, - {file = "aiohttp-3.11.11-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4af57160800b7a815f3fe0eba9b46bf28aafc195555f1824555fa2cfab6c1538"}, - {file = "aiohttp-3.11.11-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ffa336210cf9cd8ed117011085817d00abe4c08f99968deef0013ea283547204"}, - {file = "aiohttp-3.11.11-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:81b8fe282183e4a3c7a1b72f5ade1094ed1c6345a8f153506d114af5bf8accd9"}, - {file = "aiohttp-3.11.11-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3af41686ccec6a0f2bdc66686dc0f403c41ac2089f80e2214a0f82d001052c03"}, - {file = "aiohttp-3.11.11-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:70d1f9dde0e5dd9e292a6d4d00058737052b01f3532f69c0c65818dac26dc287"}, - {file = "aiohttp-3.11.11-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:249cc6912405917344192b9f9ea5cd5b139d49e0d2f5c7f70bdfaf6b4dbf3a2e"}, - {file = "aiohttp-3.11.11-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0eb98d90b6690827dcc84c246811feeb4e1eea683c0eac6caed7549be9c84665"}, - {file = "aiohttp-3.11.11-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:ec82bf1fda6cecce7f7b915f9196601a1bd1a3079796b76d16ae4cce6d0ef89b"}, - {file = "aiohttp-3.11.11-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:9fd46ce0845cfe28f108888b3ab17abff84ff695e01e73657eec3f96d72eef34"}, - {file = "aiohttp-3.11.11-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:bd176afcf8f5d2aed50c3647d4925d0db0579d96f75a31e77cbaf67d8a87742d"}, - {file = "aiohttp-3.11.11-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:ec2aa89305006fba9ffb98970db6c8221541be7bee4c1d027421d6f6df7d1ce2"}, - {file = "aiohttp-3.11.11-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:92cde43018a2e17d48bb09c79e4d4cb0e236de5063ce897a5e40ac7cb4878773"}, - {file = "aiohttp-3.11.11-cp311-cp311-win32.whl", hash = "sha256:aba807f9569455cba566882c8938f1a549f205ee43c27b126e5450dc9f83cc62"}, - {file = "aiohttp-3.11.11-cp311-cp311-win_amd64.whl", hash = "sha256:ae545f31489548c87b0cced5755cfe5a5308d00407000e72c4fa30b19c3220ac"}, - {file = "aiohttp-3.11.11-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:e595c591a48bbc295ebf47cb91aebf9bd32f3ff76749ecf282ea7f9f6bb73886"}, - {file = "aiohttp-3.11.11-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:3ea1b59dc06396b0b424740a10a0a63974c725b1c64736ff788a3689d36c02d2"}, - {file = "aiohttp-3.11.11-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8811f3f098a78ffa16e0ea36dffd577eb031aea797cbdba81be039a4169e242c"}, - {file = "aiohttp-3.11.11-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bd7227b87a355ce1f4bf83bfae4399b1f5bb42e0259cb9405824bd03d2f4336a"}, - {file = "aiohttp-3.11.11-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d40f9da8cabbf295d3a9dae1295c69975b86d941bc20f0a087f0477fa0a66231"}, - {file = "aiohttp-3.11.11-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ffb3dc385f6bb1568aa974fe65da84723210e5d9707e360e9ecb51f59406cd2e"}, - {file = "aiohttp-3.11.11-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a8f5f7515f3552d899c61202d99dcb17d6e3b0de777900405611cd747cecd1b8"}, - {file = "aiohttp-3.11.11-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3499c7ffbfd9c6a3d8d6a2b01c26639da7e43d47c7b4f788016226b1e711caa8"}, - {file = "aiohttp-3.11.11-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8e2bf8029dbf0810c7bfbc3e594b51c4cc9101fbffb583a3923aea184724203c"}, - {file = "aiohttp-3.11.11-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:b6212a60e5c482ef90f2d788835387070a88d52cf6241d3916733c9176d39eab"}, - {file = "aiohttp-3.11.11-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:d119fafe7b634dbfa25a8c597718e69a930e4847f0b88e172744be24515140da"}, - {file = "aiohttp-3.11.11-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:6fba278063559acc730abf49845d0e9a9e1ba74f85f0ee6efd5803f08b285853"}, - {file = "aiohttp-3.11.11-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:92fc484e34b733704ad77210c7957679c5c3877bd1e6b6d74b185e9320cc716e"}, - {file = "aiohttp-3.11.11-cp312-cp312-win32.whl", hash = "sha256:9f5b3c1ed63c8fa937a920b6c1bec78b74ee09593b3f5b979ab2ae5ef60d7600"}, - {file = "aiohttp-3.11.11-cp312-cp312-win_amd64.whl", hash = "sha256:1e69966ea6ef0c14ee53ef7a3d68b564cc408121ea56c0caa2dc918c1b2f553d"}, - {file = "aiohttp-3.11.11-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:541d823548ab69d13d23730a06f97460f4238ad2e5ed966aaf850d7c369782d9"}, - {file = "aiohttp-3.11.11-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:929f3ed33743a49ab127c58c3e0a827de0664bfcda566108989a14068f820194"}, - {file = "aiohttp-3.11.11-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:0882c2820fd0132240edbb4a51eb8ceb6eef8181db9ad5291ab3332e0d71df5f"}, - {file = "aiohttp-3.11.11-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b63de12e44935d5aca7ed7ed98a255a11e5cb47f83a9fded7a5e41c40277d104"}, - {file = "aiohttp-3.11.11-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:aa54f8ef31d23c506910c21163f22b124facb573bff73930735cf9fe38bf7dff"}, - {file = "aiohttp-3.11.11-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a344d5dc18074e3872777b62f5f7d584ae4344cd6006c17ba12103759d407af3"}, - {file = "aiohttp-3.11.11-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0b7fb429ab1aafa1f48578eb315ca45bd46e9c37de11fe45c7f5f4138091e2f1"}, - {file = "aiohttp-3.11.11-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c341c7d868750e31961d6d8e60ff040fb9d3d3a46d77fd85e1ab8e76c3e9a5c4"}, - {file = "aiohttp-3.11.11-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ed9ee95614a71e87f1a70bc81603f6c6760128b140bc4030abe6abaa988f1c3d"}, - {file = "aiohttp-3.11.11-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:de8d38f1c2810fa2a4f1d995a2e9c70bb8737b18da04ac2afbf3971f65781d87"}, - {file = "aiohttp-3.11.11-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:a9b7371665d4f00deb8f32208c7c5e652059b0fda41cf6dbcac6114a041f1cc2"}, - {file = "aiohttp-3.11.11-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:620598717fce1b3bd14dd09947ea53e1ad510317c85dda2c9c65b622edc96b12"}, - {file = "aiohttp-3.11.11-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:bf8d9bfee991d8acc72d060d53860f356e07a50f0e0d09a8dfedea1c554dd0d5"}, - {file = "aiohttp-3.11.11-cp313-cp313-win32.whl", hash = "sha256:9d73ee3725b7a737ad86c2eac5c57a4a97793d9f442599bea5ec67ac9f4bdc3d"}, - {file = "aiohttp-3.11.11-cp313-cp313-win_amd64.whl", hash = "sha256:c7a06301c2fb096bdb0bd25fe2011531c1453b9f2c163c8031600ec73af1cc99"}, - {file = "aiohttp-3.11.11-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:3e23419d832d969f659c208557de4a123e30a10d26e1e14b73431d3c13444c2e"}, - {file = "aiohttp-3.11.11-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:21fef42317cf02e05d3b09c028712e1d73a9606f02467fd803f7c1f39cc59add"}, - {file = "aiohttp-3.11.11-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:1f21bb8d0235fc10c09ce1d11ffbd40fc50d3f08a89e4cf3a0c503dc2562247a"}, - {file = "aiohttp-3.11.11-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1642eceeaa5ab6c9b6dfeaaa626ae314d808188ab23ae196a34c9d97efb68350"}, - {file = "aiohttp-3.11.11-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2170816e34e10f2fd120f603e951630f8a112e1be3b60963a1f159f5699059a6"}, - {file = "aiohttp-3.11.11-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8be8508d110d93061197fd2d6a74f7401f73b6d12f8822bbcd6d74f2b55d71b1"}, - {file = "aiohttp-3.11.11-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4eed954b161e6b9b65f6be446ed448ed3921763cc432053ceb606f89d793927e"}, - {file = "aiohttp-3.11.11-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d6c9af134da4bc9b3bd3e6a70072509f295d10ee60c697826225b60b9959acdd"}, - {file = "aiohttp-3.11.11-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:44167fc6a763d534a6908bdb2592269b4bf30a03239bcb1654781adf5e49caf1"}, - {file = "aiohttp-3.11.11-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:479b8c6ebd12aedfe64563b85920525d05d394b85f166b7873c8bde6da612f9c"}, - {file = "aiohttp-3.11.11-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:10b4ff0ad793d98605958089fabfa350e8e62bd5d40aa65cdc69d6785859f94e"}, - {file = "aiohttp-3.11.11-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:b540bd67cfb54e6f0865ceccd9979687210d7ed1a1cc8c01f8e67e2f1e883d28"}, - {file = "aiohttp-3.11.11-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:1dac54e8ce2ed83b1f6b1a54005c87dfed139cf3f777fdc8afc76e7841101226"}, - {file = "aiohttp-3.11.11-cp39-cp39-win32.whl", hash = "sha256:568c1236b2fde93b7720f95a890741854c1200fba4a3471ff48b2934d2d93fd3"}, - {file = "aiohttp-3.11.11-cp39-cp39-win_amd64.whl", hash = "sha256:943a8b052e54dfd6439fd7989f67fc6a7f2138d0a2cf0a7de5f18aa4fe7eb3b1"}, - {file = "aiohttp-3.11.11.tar.gz", hash = "sha256:bb49c7f1e6ebf3821a42d81d494f538107610c3a705987f53068546b0e90303e"}, + {file = "aiohttp-3.11.18-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:96264854fedbea933a9ca4b7e0c745728f01380691687b7365d18d9e977179c4"}, + {file = "aiohttp-3.11.18-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:9602044ff047043430452bc3a2089743fa85da829e6fc9ee0025351d66c332b6"}, + {file = "aiohttp-3.11.18-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5691dc38750fcb96a33ceef89642f139aa315c8a193bbd42a0c33476fd4a1609"}, + {file = "aiohttp-3.11.18-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:554c918ec43f8480b47a5ca758e10e793bd7410b83701676a4782672d670da55"}, + {file = "aiohttp-3.11.18-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8a4076a2b3ba5b004b8cffca6afe18a3b2c5c9ef679b4d1e9859cf76295f8d4f"}, + {file = "aiohttp-3.11.18-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:767a97e6900edd11c762be96d82d13a1d7c4fc4b329f054e88b57cdc21fded94"}, + {file = "aiohttp-3.11.18-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f0ddc9337a0fb0e727785ad4f41163cc314376e82b31846d3835673786420ef1"}, + {file = "aiohttp-3.11.18-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f414f37b244f2a97e79b98d48c5ff0789a0b4b4609b17d64fa81771ad780e415"}, + {file = "aiohttp-3.11.18-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:fdb239f47328581e2ec7744ab5911f97afb10752332a6dd3d98e14e429e1a9e7"}, + {file = "aiohttp-3.11.18-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:f2c50bad73ed629cc326cc0f75aed8ecfb013f88c5af116f33df556ed47143eb"}, + {file = "aiohttp-3.11.18-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:0a8d8f20c39d3fa84d1c28cdb97f3111387e48209e224408e75f29c6f8e0861d"}, + {file = "aiohttp-3.11.18-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:106032eaf9e62fd6bc6578c8b9e6dc4f5ed9a5c1c7fb2231010a1b4304393421"}, + {file = "aiohttp-3.11.18-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:b491e42183e8fcc9901d8dcd8ae644ff785590f1727f76ca86e731c61bfe6643"}, + {file = "aiohttp-3.11.18-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:ad8c745ff9460a16b710e58e06a9dec11ebc0d8f4dd82091cefb579844d69868"}, + {file = "aiohttp-3.11.18-cp310-cp310-win32.whl", hash = "sha256:8e57da93e24303a883146510a434f0faf2f1e7e659f3041abc4e3fb3f6702a9f"}, + {file = "aiohttp-3.11.18-cp310-cp310-win_amd64.whl", hash = "sha256:cc93a4121d87d9f12739fc8fab0a95f78444e571ed63e40bfc78cd5abe700ac9"}, + {file = "aiohttp-3.11.18-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:427fdc56ccb6901ff8088544bde47084845ea81591deb16f957897f0f0ba1be9"}, + {file = "aiohttp-3.11.18-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:2c828b6d23b984255b85b9b04a5b963a74278b7356a7de84fda5e3b76866597b"}, + {file = "aiohttp-3.11.18-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5c2eaa145bb36b33af1ff2860820ba0589e165be4ab63a49aebfd0981c173b66"}, + {file = "aiohttp-3.11.18-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3d518ce32179f7e2096bf4e3e8438cf445f05fedd597f252de9f54c728574756"}, + {file = "aiohttp-3.11.18-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0700055a6e05c2f4711011a44364020d7a10fbbcd02fbf3e30e8f7e7fddc8717"}, + {file = "aiohttp-3.11.18-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8bd1cde83e4684324e6ee19adfc25fd649d04078179890be7b29f76b501de8e4"}, + {file = "aiohttp-3.11.18-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:73b8870fe1c9a201b8c0d12c94fe781b918664766728783241a79e0468427e4f"}, + {file = "aiohttp-3.11.18-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:25557982dd36b9e32c0a3357f30804e80790ec2c4d20ac6bcc598533e04c6361"}, + {file = "aiohttp-3.11.18-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:7e889c9df381a2433802991288a61e5a19ceb4f61bd14f5c9fa165655dcb1fd1"}, + {file = "aiohttp-3.11.18-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:9ea345fda05bae217b6cce2acf3682ce3b13d0d16dd47d0de7080e5e21362421"}, + {file = "aiohttp-3.11.18-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:9f26545b9940c4b46f0a9388fd04ee3ad7064c4017b5a334dd450f616396590e"}, + {file = "aiohttp-3.11.18-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:3a621d85e85dccabd700294494d7179ed1590b6d07a35709bb9bd608c7f5dd1d"}, + {file = "aiohttp-3.11.18-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:9c23fd8d08eb9c2af3faeedc8c56e134acdaf36e2117ee059d7defa655130e5f"}, + {file = "aiohttp-3.11.18-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:d9e6b0e519067caa4fd7fb72e3e8002d16a68e84e62e7291092a5433763dc0dd"}, + {file = "aiohttp-3.11.18-cp311-cp311-win32.whl", hash = "sha256:122f3e739f6607e5e4c6a2f8562a6f476192a682a52bda8b4c6d4254e1138f4d"}, + {file = "aiohttp-3.11.18-cp311-cp311-win_amd64.whl", hash = "sha256:e6f3c0a3a1e73e88af384b2e8a0b9f4fb73245afd47589df2afcab6b638fa0e6"}, + {file = "aiohttp-3.11.18-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:63d71eceb9cad35d47d71f78edac41fcd01ff10cacaa64e473d1aec13fa02df2"}, + {file = "aiohttp-3.11.18-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d1929da615840969929e8878d7951b31afe0bac883d84418f92e5755d7b49508"}, + {file = "aiohttp-3.11.18-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7d0aebeb2392f19b184e3fdd9e651b0e39cd0f195cdb93328bd124a1d455cd0e"}, + {file = "aiohttp-3.11.18-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3849ead845e8444f7331c284132ab314b4dac43bfae1e3cf350906d4fff4620f"}, + {file = "aiohttp-3.11.18-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5e8452ad6b2863709f8b3d615955aa0807bc093c34b8e25b3b52097fe421cb7f"}, + {file = "aiohttp-3.11.18-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3b8d2b42073611c860a37f718b3d61ae8b4c2b124b2e776e2c10619d920350ec"}, + {file = "aiohttp-3.11.18-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:40fbf91f6a0ac317c0a07eb328a1384941872f6761f2e6f7208b63c4cc0a7ff6"}, + {file = "aiohttp-3.11.18-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:44ff5625413fec55216da5eaa011cf6b0a2ed67a565914a212a51aa3755b0009"}, + {file = "aiohttp-3.11.18-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:7f33a92a2fde08e8c6b0c61815521324fc1612f397abf96eed86b8e31618fdb4"}, + {file = "aiohttp-3.11.18-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:11d5391946605f445ddafda5eab11caf310f90cdda1fd99865564e3164f5cff9"}, + {file = "aiohttp-3.11.18-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:3cc314245deb311364884e44242e00c18b5896e4fe6d5f942e7ad7e4cb640adb"}, + {file = "aiohttp-3.11.18-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:0f421843b0f70740772228b9e8093289924359d306530bcd3926f39acbe1adda"}, + {file = "aiohttp-3.11.18-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:e220e7562467dc8d589e31c1acd13438d82c03d7f385c9cd41a3f6d1d15807c1"}, + {file = "aiohttp-3.11.18-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ab2ef72f8605046115bc9aa8e9d14fd49086d405855f40b79ed9e5c1f9f4faea"}, + {file = "aiohttp-3.11.18-cp312-cp312-win32.whl", hash = "sha256:12a62691eb5aac58d65200c7ae94d73e8a65c331c3a86a2e9670927e94339ee8"}, + {file = "aiohttp-3.11.18-cp312-cp312-win_amd64.whl", hash = "sha256:364329f319c499128fd5cd2d1c31c44f234c58f9b96cc57f743d16ec4f3238c8"}, + {file = "aiohttp-3.11.18-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:474215ec618974054cf5dc465497ae9708543cbfc312c65212325d4212525811"}, + {file = "aiohttp-3.11.18-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:6ced70adf03920d4e67c373fd692123e34d3ac81dfa1c27e45904a628567d804"}, + {file = "aiohttp-3.11.18-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:2d9f6c0152f8d71361905aaf9ed979259537981f47ad099c8b3d81e0319814bd"}, + {file = "aiohttp-3.11.18-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a35197013ed929c0aed5c9096de1fc5a9d336914d73ab3f9df14741668c0616c"}, + {file = "aiohttp-3.11.18-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:540b8a1f3a424f1af63e0af2d2853a759242a1769f9f1ab053996a392bd70118"}, + {file = "aiohttp-3.11.18-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f9e6710ebebfce2ba21cee6d91e7452d1125100f41b906fb5af3da8c78b764c1"}, + {file = "aiohttp-3.11.18-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f8af2ef3b4b652ff109f98087242e2ab974b2b2b496304063585e3d78de0b000"}, + {file = "aiohttp-3.11.18-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:28c3f975e5ae3dbcbe95b7e3dcd30e51da561a0a0f2cfbcdea30fc1308d72137"}, + {file = "aiohttp-3.11.18-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:c28875e316c7b4c3e745172d882d8a5c835b11018e33432d281211af35794a93"}, + {file = "aiohttp-3.11.18-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:13cd38515568ae230e1ef6919e2e33da5d0f46862943fcda74e7e915096815f3"}, + {file = "aiohttp-3.11.18-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:0e2a92101efb9f4c2942252c69c63ddb26d20f46f540c239ccfa5af865197bb8"}, + {file = "aiohttp-3.11.18-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:e6d3e32b8753c8d45ac550b11a1090dd66d110d4ef805ffe60fa61495360b3b2"}, + {file = "aiohttp-3.11.18-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:ea4cf2488156e0f281f93cc2fd365025efcba3e2d217cbe3df2840f8c73db261"}, + {file = "aiohttp-3.11.18-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9d4df95ad522c53f2b9ebc07f12ccd2cb15550941e11a5bbc5ddca2ca56316d7"}, + {file = "aiohttp-3.11.18-cp313-cp313-win32.whl", hash = "sha256:cdd1bbaf1e61f0d94aced116d6e95fe25942f7a5f42382195fd9501089db5d78"}, + {file = "aiohttp-3.11.18-cp313-cp313-win_amd64.whl", hash = "sha256:bdd619c27e44382cf642223f11cfd4d795161362a5a1fc1fa3940397bc89db01"}, + {file = "aiohttp-3.11.18-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:469ac32375d9a716da49817cd26f1916ec787fc82b151c1c832f58420e6d3533"}, + {file = "aiohttp-3.11.18-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3cec21dd68924179258ae14af9f5418c1ebdbba60b98c667815891293902e5e0"}, + {file = "aiohttp-3.11.18-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b426495fb9140e75719b3ae70a5e8dd3a79def0ae3c6c27e012fc59f16544a4a"}, + {file = "aiohttp-3.11.18-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ad2f41203e2808616292db5d7170cccf0c9f9c982d02544443c7eb0296e8b0c7"}, + {file = "aiohttp-3.11.18-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5bc0ae0a5e9939e423e065a3e5b00b24b8379f1db46046d7ab71753dfc7dd0e1"}, + {file = "aiohttp-3.11.18-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fe7cdd3f7d1df43200e1c80f1aed86bb36033bf65e3c7cf46a2b97a253ef8798"}, + {file = "aiohttp-3.11.18-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5199be2a2f01ffdfa8c3a6f5981205242986b9e63eb8ae03fd18f736e4840721"}, + {file = "aiohttp-3.11.18-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7ccec9e72660b10f8e283e91aa0295975c7bd85c204011d9f5eb69310555cf30"}, + {file = "aiohttp-3.11.18-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:1596ebf17e42e293cbacc7a24c3e0dc0f8f755b40aff0402cb74c1ff6baec1d3"}, + {file = "aiohttp-3.11.18-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:eab7b040a8a873020113ba814b7db7fa935235e4cbaf8f3da17671baa1024863"}, + {file = "aiohttp-3.11.18-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:5d61df4a05476ff891cff0030329fee4088d40e4dc9b013fac01bc3c745542c2"}, + {file = "aiohttp-3.11.18-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:46533e6792e1410f9801d09fd40cbbff3f3518d1b501d6c3c5b218f427f6ff08"}, + {file = "aiohttp-3.11.18-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:c1b90407ced992331dd6d4f1355819ea1c274cc1ee4d5b7046c6761f9ec11829"}, + {file = "aiohttp-3.11.18-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:a2fd04ae4971b914e54fe459dd7edbbd3f2ba875d69e057d5e3c8e8cac094935"}, + {file = "aiohttp-3.11.18-cp39-cp39-win32.whl", hash = "sha256:b2f317d1678002eee6fe85670039fb34a757972284614638f82b903a03feacdc"}, + {file = "aiohttp-3.11.18-cp39-cp39-win_amd64.whl", hash = "sha256:5e7007b8d1d09bce37b54111f593d173691c530b80f27c6493b928dabed9e6ef"}, + {file = "aiohttp-3.11.18.tar.gz", hash = "sha256:ae856e1138612b7e412db63b7708735cff4d38d0399f6a5435d3dac2669f558a"}, ] [package.dependencies] @@ -168,14 +173,14 @@ files = [ [[package]] name = "anyio" -version = "4.8.0" +version = "4.9.0" description = "High level compatibility layer for multiple asynchronous event loop implementations" optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "anyio-4.8.0-py3-none-any.whl", hash = "sha256:b5011f270ab5eb0abf13385f851315585cc37ef330dd88e27ec3d34d651fd47a"}, - {file = "anyio-4.8.0.tar.gz", hash = "sha256:1d9fe889df5212298c0c0723fa20479d1b94883a2df44bd3897aa91083316f7a"}, + {file = "anyio-4.9.0-py3-none-any.whl", hash = "sha256:9f76d541cad6e36af7beb62e978876f3b41e3e04f2c1fbf0884604c0a9c4d93c"}, + {file = "anyio-4.9.0.tar.gz", hash = "sha256:673c0c244e15788651a4ff38710fea9675823028a6f08a5eda409e0c9840a028"}, ] [package.dependencies] @@ -185,20 +190,20 @@ sniffio = ">=1.1" typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] -doc = ["Sphinx (>=7.4,<8.0)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx_rtd_theme"] -test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "trustme", "truststore (>=0.9.1) ; python_version >= \"3.10\"", "uvloop (>=0.21) ; platform_python_implementation == \"CPython\" and platform_system != \"Windows\" and python_version < \"3.14\""] +doc = ["Sphinx (>=8.2,<9.0)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx_rtd_theme"] +test = ["anyio[trio]", "blockbuster (>=1.5.23)", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "trustme", "truststore (>=0.9.1) ; python_version >= \"3.10\"", "uvloop (>=0.21) ; platform_python_implementation == \"CPython\" and platform_system != \"Windows\" and python_version < \"3.14\""] trio = ["trio (>=0.26.1)"] [[package]] name = "astroid" -version = "3.3.8" +version = "3.3.9" description = "An abstract syntax tree for Python with inference support." optional = false python-versions = ">=3.9.0" groups = ["dev"] files = [ - {file = "astroid-3.3.8-py3-none-any.whl", hash = "sha256:187ccc0c248bfbba564826c26f070494f7bc964fd286b6d9fff4420e55de828c"}, - {file = "astroid-3.3.8.tar.gz", hash = "sha256:a88c7994f914a4ea8572fac479459f4955eeccc877be3f2d959a33273b0cf40b"}, + {file = "astroid-3.3.9-py3-none-any.whl", hash = "sha256:d05bfd0acba96a7bd43e222828b7d9bc1e138aaeb0649707908d3702a9831248"}, + {file = "astroid-3.3.9.tar.gz", hash = "sha256:622cc8e3048684aa42c820d9d218978021c3c3d174fb03a9f0d615921744f550"}, ] [package.dependencies] @@ -219,34 +224,34 @@ files = [ [[package]] name = "attrs" -version = "24.3.0" +version = "25.3.0" description = "Classes Without Boilerplate" optional = false python-versions = ">=3.8" groups = ["main", "dev"] files = [ - {file = "attrs-24.3.0-py3-none-any.whl", hash = "sha256:ac96cd038792094f438ad1f6ff80837353805ac950cd2aa0e0625ef19850c308"}, - {file = "attrs-24.3.0.tar.gz", hash = "sha256:8f5c07333d543103541ba7be0e2ce16eeee8130cb0b3f9238ab904ce1e85baff"}, + {file = "attrs-25.3.0-py3-none-any.whl", hash = "sha256:427318ce031701fea540783410126f03899a97ffc6f61596ad581ac2e40e3bc3"}, + {file = "attrs-25.3.0.tar.gz", hash = "sha256:75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b"}, ] [package.extras] benchmark = ["cloudpickle ; platform_python_implementation == \"CPython\"", "hypothesis", "mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pympler", "pytest (>=4.3.0)", "pytest-codspeed", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-xdist[psutil]"] cov = ["cloudpickle ; platform_python_implementation == \"CPython\"", "coverage[toml] (>=5.3)", "hypothesis", "mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-xdist[psutil]"] dev = ["cloudpickle ; platform_python_implementation == \"CPython\"", "hypothesis", "mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pre-commit-uv", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-xdist[psutil]"] -docs = ["cogapp", "furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier (<24.7)"] +docs = ["cogapp", "furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier"] tests = ["cloudpickle ; platform_python_implementation == \"CPython\"", "hypothesis", "mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-xdist[psutil]"] tests-mypy = ["mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\""] [[package]] name = "authlib" -version = "1.4.0" +version = "1.5.2" description = "The ultimate Python library in building OAuth and OpenID Connect servers and clients." optional = false python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "Authlib-1.4.0-py2.py3-none-any.whl", hash = "sha256:4bb20b978c8b636222b549317c1815e1fe62234fc1c5efe8855d84aebf3a74e3"}, - {file = "authlib-1.4.0.tar.gz", hash = "sha256:1c1e6608b5ed3624aeeee136ca7f8c120d6f51f731aa152b153d54741840e1f2"}, + {file = "authlib-1.5.2-py2.py3-none-any.whl", hash = "sha256:8804dd4402ac5e4a0435ac49e0b6e19e395357cfa632a3f624dcb4f6df13b4b1"}, + {file = "authlib-1.5.2.tar.gz", hash = "sha256:fe85ec7e50c5f86f1e2603518bb3b4f632985eb4a355e52256530790e326c512"}, ] [package.dependencies] @@ -254,21 +259,21 @@ cryptography = "*" [[package]] name = "aws-sam-translator" -version = "1.94.0" +version = "1.97.0" description = "AWS SAM Translator is a library that transform SAM templates into AWS CloudFormation templates" optional = false python-versions = "!=4.0,<=4.0,>=3.8" groups = ["dev"] files = [ - {file = "aws_sam_translator-1.94.0-py3-none-any.whl", hash = "sha256:100e33eeffcfa81f7c45cadeb0ee29596ce829f6b4d2745140f04fa19a41f539"}, - {file = "aws_sam_translator-1.94.0.tar.gz", hash = "sha256:8ec258d9f7ece72ef91c81f4edb45a2db064c16844b6afac90c575893beaa391"}, + {file = "aws_sam_translator-1.97.0-py3-none-any.whl", hash = "sha256:305701ab49eb546fd720b3682e99cadcd43539f4ddb8395ea03c90c9e14d3325"}, + {file = "aws_sam_translator-1.97.0.tar.gz", hash = "sha256:6f7ec94de0a9b220dd1f1a0bf7e2df95dd44a85592301ee830744da2f209b7e6"}, ] [package.dependencies] boto3 = ">=1.19.5,<2.dev0" jsonschema = ">=3.2,<5" pydantic = ">=1.8,<1.10.15 || >1.10.15,<1.10.17 || >1.10.17,<3" -typing-extensions = ">=4.4" +typing_extensions = ">=4.4" [package.extras] dev = ["black (==24.3.0)", "boto3 (>=1.23,<2)", "boto3-stubs[appconfig,serverlessrepo] (>=1.19.5,<2.dev0)", "coverage (>=5.3,<8)", "dateparser (>=1.1,<2.0)", "mypy (>=1.3.0,<1.4.0)", "parameterized (>=0.7,<1.0)", "pytest (>=6.2,<8)", "pytest-cov (>=2.10,<5)", "pytest-env (>=0.6,<1)", "pytest-rerunfailures (>=9.1,<12)", "pytest-xdist (>=2.5,<4)", "pyyaml (>=6.0,<7.0)", "requests (>=2.28,<3.0)", "ruamel.yaml (==0.17.21)", "ruff (>=0.4.5,<0.5.0)", "tenacity (>=8.0,<9.0)", "types-PyYAML (>=6.0,<7.0)", "types-jsonschema (>=3.2,<4.0)"] @@ -315,14 +320,14 @@ files = [ [[package]] name = "azure-core" -version = "1.32.0" +version = "1.33.0" description = "Microsoft Azure Core Library for Python" optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "azure_core-1.32.0-py3-none-any.whl", hash = "sha256:eac191a0efb23bfa83fddf321b27b122b4ec847befa3091fa736a5c32c50d7b4"}, - {file = "azure_core-1.32.0.tar.gz", hash = "sha256:22b3c35d6b2dae14990f6c1be2912bf23ffe50b220e708a28ab1bb92b1c730e5"}, + {file = "azure_core-1.33.0-py3-none-any.whl", hash = "sha256:9b5b6d0223a1d38c37500e6971118c1e0f13f54951e6893968b38910bc9cda8f"}, + {file = "azure_core-1.33.0.tar.gz", hash = "sha256:f367aa07b5e3005fec2c1e184b882b0b039910733907d001c20fb08ebb8c0eb9"}, ] [package.dependencies] @@ -332,17 +337,18 @@ typing-extensions = ">=4.6.0" [package.extras] aio = ["aiohttp (>=3.0)"] +tracing = ["opentelemetry-api (>=1.26,<2.0)"] [[package]] name = "azure-identity" -version = "1.19.0" +version = "1.21.0" description = "Microsoft Azure Identity Library for Python" optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "azure_identity-1.19.0-py3-none-any.whl", hash = "sha256:e3f6558c181692d7509f09de10cca527c7dce426776454fb97df512a46527e81"}, - {file = "azure_identity-1.19.0.tar.gz", hash = "sha256:500144dc18197d7019b81501165d4fa92225f03778f17d7ca8a2a180129a9c83"}, + {file = "azure_identity-1.21.0-py3-none-any.whl", hash = "sha256:258ea6325537352440f71b35c3dffe9d240eae4a5126c1b7ce5efd5766bd9fd9"}, + {file = "azure_identity-1.21.0.tar.gz", hash = "sha256:ea22ce6e6b0f429bc1b8d9212d5b9f9877bd4c82f1724bfa910760612c07a9a6"}, ] [package.dependencies] @@ -372,20 +378,21 @@ typing-extensions = ">=4.0.1" [[package]] name = "azure-mgmt-applicationinsights" -version = "4.0.0" +version = "4.1.0" description = "Microsoft Azure Application Insights Management Client Library for Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" groups = ["main"] files = [ - {file = "azure-mgmt-applicationinsights-4.0.0.zip", hash = "sha256:50c3db05573e0cc2d56314a0556fb346ef05ec489ac000f4d720d92c6b647e06"}, - {file = "azure_mgmt_applicationinsights-4.0.0-py3-none-any.whl", hash = "sha256:2b1ffd9a0114974455795c73a3a5d17c849e32b961d707d2db393b99254b576f"}, + {file = "azure_mgmt_applicationinsights-4.1.0-py3-none-any.whl", hash = "sha256:9e71f29b01e505a773501451d12fd6a10482cf4b13e9ac2bff72f5380496d979"}, + {file = "azure_mgmt_applicationinsights-4.1.0.tar.gz", hash = "sha256:15531390f12ce3d767cd3f1949af36aa39077c145c952fec4d80303c86ec7b6c"}, ] [package.dependencies] -azure-common = ">=1.1,<2.0" -azure-mgmt-core = ">=1.3.2,<2.0.0" -isodate = ">=0.6.1,<1.0.0" +azure-common = ">=1.1" +azure-mgmt-core = ">=1.3.2" +isodate = ">=0.6.1" +typing-extensions = ">=4.6.0" [[package]] name = "azure-mgmt-authorization" @@ -424,31 +431,32 @@ typing-extensions = ">=4.6.0" [[package]] name = "azure-mgmt-containerregistry" -version = "10.3.0" +version = "12.0.0" description = "Microsoft Azure Container Registry Client Library for Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" groups = ["main"] files = [ - {file = "azure-mgmt-containerregistry-10.3.0.tar.gz", hash = "sha256:ae21651855dfb19c42d91d6b3a965c6c611e23f8bc4bf7138835e652d2f918e3"}, - {file = "azure_mgmt_containerregistry-10.3.0-py3-none-any.whl", hash = "sha256:851e1c57f9bc4a3589c6b21fb627c11fd6cbb57a0388b7dfccd530ba3160805f"}, + {file = "azure_mgmt_containerregistry-12.0.0-py3-none-any.whl", hash = "sha256:464abd4d3d9ecc0456ed8f63a6b9b93afc2e3e194f2d34f26a758afb67ad3b5c"}, + {file = "azure_mgmt_containerregistry-12.0.0.tar.gz", hash = "sha256:f19f8faa7881deaf2b5015c0eb050a92e2380cd9d18dee33cdb5f27d44a06c03"}, ] [package.dependencies] -azure-common = ">=1.1,<2.0" -azure-mgmt-core = ">=1.3.2,<2.0.0" -isodate = ">=0.6.1,<1.0.0" +azure-common = ">=1.1" +azure-mgmt-core = ">=1.3.2" +isodate = ">=0.6.1" +typing-extensions = ">=4.6.0" [[package]] name = "azure-mgmt-containerservice" -version = "34.0.0" +version = "34.1.0" description = "Microsoft Azure Container Service Management Client Library for Python" optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "azure_mgmt_containerservice-34.0.0-py3-none-any.whl", hash = "sha256:34be8172241e3c2c444682407970a938f60e3b2bd06304eaae0a1ba641f2262d"}, - {file = "azure_mgmt_containerservice-34.0.0.tar.gz", hash = "sha256:822d07828b746a5ea5408a8b3770f41dc424d6c4c28de53c29611b62bef8aea3"}, + {file = "azure_mgmt_containerservice-34.1.0-py3-none-any.whl", hash = "sha256:1faa1714e0100c6ee4cfb8d2eadb1c270b548a84b0070c74e9fe646056a5cb12"}, + {file = "azure_mgmt_containerservice-34.1.0.tar.gz", hash = "sha256:637a6cf8f06636c016ad151d76f9c7ba75bd05d4334b3dd7837eb8b517f30dbe"}, ] [package.dependencies] @@ -562,14 +570,14 @@ msrest = ">=0.6.21" [[package]] name = "azure-mgmt-resource" -version = "23.2.0" +version = "23.3.0" description = "Microsoft Azure Resource Management Client Library for Python" optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "azure_mgmt_resource-23.2.0-py3-none-any.whl", hash = "sha256:7af2bca928ecd58e57ea7f7731d245f45e9d927036d82f1d30b96baa0c26b569"}, - {file = "azure_mgmt_resource-23.2.0.tar.gz", hash = "sha256:747b750df7af23ab30e53d3f36247ab0c16de1e267d666b1a5077c39a4292529"}, + {file = "azure_mgmt_resource-23.3.0-py3-none-any.whl", hash = "sha256:ab216ee28e29db6654b989746e0c85a1181f66653929d2cb6e48fba66d9af323"}, + {file = "azure_mgmt_resource-23.3.0.tar.gz", hash = "sha256:fc4f1fd8b6aad23f8af4ed1f913df5f5c92df117449dc354fea6802a2829fea4"}, ] [package.dependencies] @@ -631,20 +639,21 @@ msrest = ">=0.6.21" [[package]] name = "azure-mgmt-storage" -version = "21.2.1" +version = "22.1.1" description = "Microsoft Azure Storage Management Client Library for Python" optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "azure-mgmt-storage-21.2.1.tar.gz", hash = "sha256:503a7ff9c31254092b0656445f5728bfdfda2d09d46a82e97019eaa9a1ecec64"}, - {file = "azure_mgmt_storage-21.2.1-py3-none-any.whl", hash = "sha256:f97df1fa39cde9dbacf2cd96c9cba1fc196932185e24853e276f74b18a0bd031"}, + {file = "azure_mgmt_storage-22.1.1-py3-none-any.whl", hash = "sha256:a4a4064918dcfa4f1cbebada5bf064935d66f2a3647a2f46a1f1c9348736f5d9"}, + {file = "azure_mgmt_storage-22.1.1.tar.gz", hash = "sha256:25aaa5ae8c40c30e2f91f8aae6f52906b0557e947d5c1b9817d4ff9decc11340"}, ] [package.dependencies] azure-common = ">=1.1" azure-mgmt-core = ">=1.3.2" isodate = ">=0.6.1" +typing-extensions = ">=4.6.0" [[package]] name = "azure-mgmt-subscription" @@ -704,18 +713,18 @@ aio = ["azure-core[aio] (>=1.30.0)"] [[package]] name = "babel" -version = "2.16.0" +version = "2.17.0" description = "Internationalization utilities" optional = false python-versions = ">=3.8" groups = ["docs"] files = [ - {file = "babel-2.16.0-py3-none-any.whl", hash = "sha256:368b5b98b37c06b7daf6696391c3240c938b37767d4584413e8438c5c435fa8b"}, - {file = "babel-2.16.0.tar.gz", hash = "sha256:d1f3554ca26605fe173f3de0c65f750f5a42f924499bf134de6423582298e316"}, + {file = "babel-2.17.0-py3-none-any.whl", hash = "sha256:4d0b53093fdfb4b21c92b5213dba5a1b23885afa8383709427046b21c366e5f2"}, + {file = "babel-2.17.0.tar.gz", hash = "sha256:0c54cffb19f690cdcc52a3b50bcbf71e07a808d1c80d549f2459b9d2cf0afb9d"}, ] [package.extras] -dev = ["freezegun (>=1.0,<2.0)", "pytest (>=6.0)", "pytest-cov"] +dev = ["backports.zoneinfo ; python_version < \"3.9\"", "freezegun (>=1.0,<2.0)", "jinja2 (>=3.0)", "pytest (>=6.0)", "pytest-cov", "pytz", "setuptools", "tzdata ; sys_platform == \"win32\""] [[package]] name = "bandit" @@ -846,26 +855,26 @@ crt = ["awscrt (==0.22.0)"] [[package]] name = "cachetools" -version = "5.5.0" +version = "5.5.2" description = "Extensible memoizing collections and decorators" optional = false python-versions = ">=3.7" groups = ["main"] files = [ - {file = "cachetools-5.5.0-py3-none-any.whl", hash = "sha256:02134e8439cdc2ffb62023ce1debca2944c3f289d66bb17ead3ab3dede74b292"}, - {file = "cachetools-5.5.0.tar.gz", hash = "sha256:2cc24fb4cbe39633fb7badd9db9ca6295d766d9c2995f245725a46715d050f2a"}, + {file = "cachetools-5.5.2-py3-none-any.whl", hash = "sha256:d26a22bcc62eb95c3beabd9f1ee5e820d3d2704fe2967cbe350e20c8ffcd3f0a"}, + {file = "cachetools-5.5.2.tar.gz", hash = "sha256:1a661caa9175d26759571b2e19580f9d6393969e5dfca11fdb1f947a23e640d4"}, ] [[package]] name = "certifi" -version = "2024.12.14" +version = "2025.1.31" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" groups = ["main", "dev", "docs"] files = [ - {file = "certifi-2024.12.14-py3-none-any.whl", hash = "sha256:1275f7a45be9464efc1173084eaa30f866fe2e47d389406136d332ed4967ec56"}, - {file = "certifi-2024.12.14.tar.gz", hash = "sha256:b650d30f370c2b724812bee08008be0c4163b163ddaec3f2546c1caf65f191db"}, + {file = "certifi-2025.1.31-py3-none-any.whl", hash = "sha256:ca78db4565a652026a4db2bcdf68f2fb589ea80d0be70e03929ed730746b84fe"}, + {file = "certifi-2025.1.31.tar.gz", hash = "sha256:3d5da6925056f6f18f119200434a4780a94263f10d1c21d032a6f6b2baa20651"}, ] [[package]] @@ -875,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"}, @@ -945,24 +953,25 @@ 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 = "*" [[package]] name = "cfn-lint" -version = "1.22.5" +version = "1.34.1" description = "Checks CloudFormation templates for practices and behaviour that could potentially be improved" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "cfn_lint-1.22.5-py3-none-any.whl", hash = "sha256:18309e59cc03ff18b02676688df7eb1a17f5276da3776f31946fc0d9aa9b8fe7"}, - {file = "cfn_lint-1.22.5.tar.gz", hash = "sha256:8b4f55e283143e99d8d331627637226c291cecfb936606f7aab2d940e71e566d"}, + {file = "cfn_lint-1.34.1-py3-none-any.whl", hash = "sha256:2c21a908fa5d9b0c1caac2081c10261eaae7fce88364e4edc607717892f36d68"}, + {file = "cfn_lint-1.34.1.tar.gz", hash = "sha256:58f4352c370a710b72b389eda0acd6762e62f926e534d2eb1609d5326ded4bed"}, ] [package.dependencies] -aws-sam-translator = ">=1.94.0" +aws-sam-translator = ">=1.97.0" jsonpatch = "*" networkx = ">=2.4,<4" pyyaml = ">5.4" @@ -1346,21 +1355,21 @@ files = [ [[package]] name = "deprecated" -version = "1.2.15" +version = "1.2.18" description = "Python @deprecated decorator to deprecate old python classes, functions or methods." optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7" groups = ["main"] files = [ - {file = "Deprecated-1.2.15-py2.py3-none-any.whl", hash = "sha256:353bc4a8ac4bfc96800ddab349d89c25dec1079f65fd53acdcc1e0b975b21320"}, - {file = "deprecated-1.2.15.tar.gz", hash = "sha256:683e561a90de76239796e6b6feac66b99030d2dd3fcf61ef996330f14bbb9b0d"}, + {file = "Deprecated-1.2.18-py2.py3-none-any.whl", hash = "sha256:bd5011788200372a32418f888e326a09ff80d0214bd961147cfed01b5c018eec"}, + {file = "deprecated-1.2.18.tar.gz", hash = "sha256:422b6f6d859da6f2ef57857761bfb392480502a64c3028ca9bbe86085d72115d"}, ] [package.dependencies] wrapt = ">=1.10,<2" [package.extras] -dev = ["PyTest", "PyTest-Cov", "bump2version (<1)", "jinja2 (>=3.0.3,<3.1.0)", "setuptools ; python_version >= \"3.12\"", "sphinx (<2)", "tox"] +dev = ["PyTest", "PyTest-Cov", "bump2version (<1)", "setuptools ; python_version >= \"3.12\"", "tox"] [[package]] name = "detect-secrets" @@ -1384,14 +1393,14 @@ word-list = ["pyahocorasick"] [[package]] name = "dill" -version = "0.3.9" +version = "0.4.0" description = "serialize all of Python" optional = false python-versions = ">=3.8" groups = ["dev"] files = [ - {file = "dill-0.3.9-py3-none-any.whl", hash = "sha256:468dff3b89520b474c0397703366b7b95eebe6303f108adf9b19da1f702be87a"}, - {file = "dill-0.3.9.tar.gz", hash = "sha256:81aa267dddf68cbfe8029c42ca9ec6a4ab3b22371d1c450abc54422577b4512c"}, + {file = "dill-0.4.0-py3-none-any.whl", hash = "sha256:44f54bf6412c2c8464c14e8243eb163690a9800dbe2c367330883b19c7561049"}, + {file = "dill-0.4.0.tar.gz", hash = "sha256:0633f1d2df477324f53a895b02c901fb961bdbf65a17122586ea7019292cbcf0"}, ] [package.extras] @@ -1598,104 +1607,116 @@ python-dateutil = ">=2.7" [[package]] name = "frozenlist" -version = "1.5.0" +version = "1.6.0" description = "A list-like structure which implements collections.abc.MutableSequence" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["main"] files = [ - {file = "frozenlist-1.5.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:5b6a66c18b5b9dd261ca98dffcb826a525334b2f29e7caa54e182255c5f6a65a"}, - {file = "frozenlist-1.5.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d1b3eb7b05ea246510b43a7e53ed1653e55c2121019a97e60cad7efb881a97bb"}, - {file = "frozenlist-1.5.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:15538c0cbf0e4fa11d1e3a71f823524b0c46299aed6e10ebb4c2089abd8c3bec"}, - {file = "frozenlist-1.5.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e79225373c317ff1e35f210dd5f1344ff31066ba8067c307ab60254cd3a78ad5"}, - {file = "frozenlist-1.5.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9272fa73ca71266702c4c3e2d4a28553ea03418e591e377a03b8e3659d94fa76"}, - {file = "frozenlist-1.5.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:498524025a5b8ba81695761d78c8dd7382ac0b052f34e66939c42df860b8ff17"}, - {file = "frozenlist-1.5.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:92b5278ed9d50fe610185ecd23c55d8b307d75ca18e94c0e7de328089ac5dcba"}, - {file = "frozenlist-1.5.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f3c8c1dacd037df16e85227bac13cca58c30da836c6f936ba1df0c05d046d8d"}, - {file = "frozenlist-1.5.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:f2ac49a9bedb996086057b75bf93538240538c6d9b38e57c82d51f75a73409d2"}, - {file = "frozenlist-1.5.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e66cc454f97053b79c2ab09c17fbe3c825ea6b4de20baf1be28919460dd7877f"}, - {file = "frozenlist-1.5.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:5a3ba5f9a0dfed20337d3e966dc359784c9f96503674c2faf015f7fe8e96798c"}, - {file = "frozenlist-1.5.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:6321899477db90bdeb9299ac3627a6a53c7399c8cd58d25da094007402b039ab"}, - {file = "frozenlist-1.5.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:76e4753701248476e6286f2ef492af900ea67d9706a0155335a40ea21bf3b2f5"}, - {file = "frozenlist-1.5.0-cp310-cp310-win32.whl", hash = "sha256:977701c081c0241d0955c9586ffdd9ce44f7a7795df39b9151cd9a6fd0ce4cfb"}, - {file = "frozenlist-1.5.0-cp310-cp310-win_amd64.whl", hash = "sha256:189f03b53e64144f90990d29a27ec4f7997d91ed3d01b51fa39d2dbe77540fd4"}, - {file = "frozenlist-1.5.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:fd74520371c3c4175142d02a976aee0b4cb4a7cc912a60586ffd8d5929979b30"}, - {file = "frozenlist-1.5.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:2f3f7a0fbc219fb4455264cae4d9f01ad41ae6ee8524500f381de64ffaa077d5"}, - {file = "frozenlist-1.5.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f47c9c9028f55a04ac254346e92977bf0f166c483c74b4232bee19a6697e4778"}, - {file = "frozenlist-1.5.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0996c66760924da6e88922756d99b47512a71cfd45215f3570bf1e0b694c206a"}, - {file = "frozenlist-1.5.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a2fe128eb4edeabe11896cb6af88fca5346059f6c8d807e3b910069f39157869"}, - {file = "frozenlist-1.5.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1a8ea951bbb6cacd492e3948b8da8c502a3f814f5d20935aae74b5df2b19cf3d"}, - {file = "frozenlist-1.5.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:de537c11e4aa01d37db0d403b57bd6f0546e71a82347a97c6a9f0dcc532b3a45"}, - {file = "frozenlist-1.5.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c2623347b933fcb9095841f1cc5d4ff0b278addd743e0e966cb3d460278840d"}, - {file = "frozenlist-1.5.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:cee6798eaf8b1416ef6909b06f7dc04b60755206bddc599f52232606e18179d3"}, - {file = "frozenlist-1.5.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:f5f9da7f5dbc00a604fe74aa02ae7c98bcede8a3b8b9666f9f86fc13993bc71a"}, - {file = "frozenlist-1.5.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:90646abbc7a5d5c7c19461d2e3eeb76eb0b204919e6ece342feb6032c9325ae9"}, - {file = "frozenlist-1.5.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:bdac3c7d9b705d253b2ce370fde941836a5f8b3c5c2b8fd70940a3ea3af7f4f2"}, - {file = "frozenlist-1.5.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:03d33c2ddbc1816237a67f66336616416e2bbb6beb306e5f890f2eb22b959cdf"}, - {file = "frozenlist-1.5.0-cp311-cp311-win32.whl", hash = "sha256:237f6b23ee0f44066219dae14c70ae38a63f0440ce6750f868ee08775073f942"}, - {file = "frozenlist-1.5.0-cp311-cp311-win_amd64.whl", hash = "sha256:0cc974cc93d32c42e7b0f6cf242a6bd941c57c61b618e78b6c0a96cb72788c1d"}, - {file = "frozenlist-1.5.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:31115ba75889723431aa9a4e77d5f398f5cf976eea3bdf61749731f62d4a4a21"}, - {file = "frozenlist-1.5.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7437601c4d89d070eac8323f121fcf25f88674627505334654fd027b091db09d"}, - {file = "frozenlist-1.5.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7948140d9f8ece1745be806f2bfdf390127cf1a763b925c4a805c603df5e697e"}, - {file = "frozenlist-1.5.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:feeb64bc9bcc6b45c6311c9e9b99406660a9c05ca8a5b30d14a78555088b0b3a"}, - {file = "frozenlist-1.5.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:683173d371daad49cffb8309779e886e59c2f369430ad28fe715f66d08d4ab1a"}, - {file = "frozenlist-1.5.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7d57d8f702221405a9d9b40f9da8ac2e4a1a8b5285aac6100f3393675f0a85ee"}, - {file = "frozenlist-1.5.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:30c72000fbcc35b129cb09956836c7d7abf78ab5416595e4857d1cae8d6251a6"}, - {file = "frozenlist-1.5.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:000a77d6034fbad9b6bb880f7ec073027908f1b40254b5d6f26210d2dab1240e"}, - {file = "frozenlist-1.5.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:5d7f5a50342475962eb18b740f3beecc685a15b52c91f7d975257e13e029eca9"}, - {file = "frozenlist-1.5.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:87f724d055eb4785d9be84e9ebf0f24e392ddfad00b3fe036e43f489fafc9039"}, - {file = "frozenlist-1.5.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:6e9080bb2fb195a046e5177f10d9d82b8a204c0736a97a153c2466127de87784"}, - {file = "frozenlist-1.5.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:9b93d7aaa36c966fa42efcaf716e6b3900438632a626fb09c049f6a2f09fc631"}, - {file = "frozenlist-1.5.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:52ef692a4bc60a6dd57f507429636c2af8b6046db8b31b18dac02cbc8f507f7f"}, - {file = "frozenlist-1.5.0-cp312-cp312-win32.whl", hash = "sha256:29d94c256679247b33a3dc96cce0f93cbc69c23bf75ff715919332fdbb6a32b8"}, - {file = "frozenlist-1.5.0-cp312-cp312-win_amd64.whl", hash = "sha256:8969190d709e7c48ea386db202d708eb94bdb29207a1f269bab1196ce0dcca1f"}, - {file = "frozenlist-1.5.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:7a1a048f9215c90973402e26c01d1cff8a209e1f1b53f72b95c13db61b00f953"}, - {file = "frozenlist-1.5.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:dd47a5181ce5fcb463b5d9e17ecfdb02b678cca31280639255ce9d0e5aa67af0"}, - {file = "frozenlist-1.5.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:1431d60b36d15cda188ea222033eec8e0eab488f39a272461f2e6d9e1a8e63c2"}, - {file = "frozenlist-1.5.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6482a5851f5d72767fbd0e507e80737f9c8646ae7fd303def99bfe813f76cf7f"}, - {file = "frozenlist-1.5.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:44c49271a937625619e862baacbd037a7ef86dd1ee215afc298a417ff3270608"}, - {file = "frozenlist-1.5.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:12f78f98c2f1c2429d42e6a485f433722b0061d5c0b0139efa64f396efb5886b"}, - {file = "frozenlist-1.5.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ce3aa154c452d2467487765e3adc730a8c153af77ad84096bc19ce19a2400840"}, - {file = "frozenlist-1.5.0-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9b7dc0c4338e6b8b091e8faf0db3168a37101943e687f373dce00959583f7439"}, - {file = "frozenlist-1.5.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:45e0896250900b5aa25180f9aec243e84e92ac84bd4a74d9ad4138ef3f5c97de"}, - {file = "frozenlist-1.5.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:561eb1c9579d495fddb6da8959fd2a1fca2c6d060d4113f5844b433fc02f2641"}, - {file = "frozenlist-1.5.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:df6e2f325bfee1f49f81aaac97d2aa757c7646534a06f8f577ce184afe2f0a9e"}, - {file = "frozenlist-1.5.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:140228863501b44b809fb39ec56b5d4071f4d0aa6d216c19cbb08b8c5a7eadb9"}, - {file = "frozenlist-1.5.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:7707a25d6a77f5d27ea7dc7d1fc608aa0a478193823f88511ef5e6b8a48f9d03"}, - {file = "frozenlist-1.5.0-cp313-cp313-win32.whl", hash = "sha256:31a9ac2b38ab9b5a8933b693db4939764ad3f299fcaa931a3e605bc3460e693c"}, - {file = "frozenlist-1.5.0-cp313-cp313-win_amd64.whl", hash = "sha256:11aabdd62b8b9c4b84081a3c246506d1cddd2dd93ff0ad53ede5defec7886b28"}, - {file = "frozenlist-1.5.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:dd94994fc91a6177bfaafd7d9fd951bc8689b0a98168aa26b5f543868548d3ca"}, - {file = "frozenlist-1.5.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:2d0da8bbec082bf6bf18345b180958775363588678f64998c2b7609e34719b10"}, - {file = "frozenlist-1.5.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:73f2e31ea8dd7df61a359b731716018c2be196e5bb3b74ddba107f694fbd7604"}, - {file = "frozenlist-1.5.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:828afae9f17e6de596825cf4228ff28fbdf6065974e5ac1410cecc22f699d2b3"}, - {file = "frozenlist-1.5.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f1577515d35ed5649d52ab4319db757bb881ce3b2b796d7283e6634d99ace307"}, - {file = "frozenlist-1.5.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2150cc6305a2c2ab33299453e2968611dacb970d2283a14955923062c8d00b10"}, - {file = "frozenlist-1.5.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a72b7a6e3cd2725eff67cd64c8f13335ee18fc3c7befc05aed043d24c7b9ccb9"}, - {file = "frozenlist-1.5.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c16d2fa63e0800723139137d667e1056bee1a1cf7965153d2d104b62855e9b99"}, - {file = "frozenlist-1.5.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:17dcc32fc7bda7ce5875435003220a457bcfa34ab7924a49a1c19f55b6ee185c"}, - {file = "frozenlist-1.5.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:97160e245ea33d8609cd2b8fd997c850b56db147a304a262abc2b3be021a9171"}, - {file = "frozenlist-1.5.0-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:f1e6540b7fa044eee0bb5111ada694cf3dc15f2b0347ca125ee9ca984d5e9e6e"}, - {file = "frozenlist-1.5.0-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:91d6c171862df0a6c61479d9724f22efb6109111017c87567cfeb7b5d1449fdf"}, - {file = "frozenlist-1.5.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:c1fac3e2ace2eb1052e9f7c7db480818371134410e1f5c55d65e8f3ac6d1407e"}, - {file = "frozenlist-1.5.0-cp38-cp38-win32.whl", hash = "sha256:b97f7b575ab4a8af9b7bc1d2ef7f29d3afee2226bd03ca3875c16451ad5a7723"}, - {file = "frozenlist-1.5.0-cp38-cp38-win_amd64.whl", hash = "sha256:374ca2dabdccad8e2a76d40b1d037f5bd16824933bf7bcea3e59c891fd4a0923"}, - {file = "frozenlist-1.5.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:9bbcdfaf4af7ce002694a4e10a0159d5a8d20056a12b05b45cea944a4953f972"}, - {file = "frozenlist-1.5.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:1893f948bf6681733aaccf36c5232c231e3b5166d607c5fa77773611df6dc336"}, - {file = "frozenlist-1.5.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:2b5e23253bb709ef57a8e95e6ae48daa9ac5f265637529e4ce6b003a37b2621f"}, - {file = "frozenlist-1.5.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0f253985bb515ecd89629db13cb58d702035ecd8cfbca7d7a7e29a0e6d39af5f"}, - {file = "frozenlist-1.5.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:04a5c6babd5e8fb7d3c871dc8b321166b80e41b637c31a995ed844a6139942b6"}, - {file = "frozenlist-1.5.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a9fe0f1c29ba24ba6ff6abf688cb0b7cf1efab6b6aa6adc55441773c252f7411"}, - {file = "frozenlist-1.5.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:226d72559fa19babe2ccd920273e767c96a49b9d3d38badd7c91a0fdeda8ea08"}, - {file = "frozenlist-1.5.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15b731db116ab3aedec558573c1a5eec78822b32292fe4f2f0345b7f697745c2"}, - {file = "frozenlist-1.5.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:366d8f93e3edfe5a918c874702f78faac300209a4d5bf38352b2c1bdc07a766d"}, - {file = "frozenlist-1.5.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:1b96af8c582b94d381a1c1f51ffaedeb77c821c690ea5f01da3d70a487dd0a9b"}, - {file = "frozenlist-1.5.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:c03eff4a41bd4e38415cbed054bbaff4a075b093e2394b6915dca34a40d1e38b"}, - {file = "frozenlist-1.5.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:50cf5e7ee9b98f22bdecbabf3800ae78ddcc26e4a435515fc72d97903e8488e0"}, - {file = "frozenlist-1.5.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:1e76bfbc72353269c44e0bc2cfe171900fbf7f722ad74c9a7b638052afe6a00c"}, - {file = "frozenlist-1.5.0-cp39-cp39-win32.whl", hash = "sha256:666534d15ba8f0fda3f53969117383d5dc021266b3c1a42c9ec4855e4b58b9d3"}, - {file = "frozenlist-1.5.0-cp39-cp39-win_amd64.whl", hash = "sha256:5c28f4b5dbef8a0d8aad0d4de24d1e9e981728628afaf4ea0792f5d0939372f0"}, - {file = "frozenlist-1.5.0-py3-none-any.whl", hash = "sha256:d994863bba198a4a518b467bb971c56e1db3f180a25c6cf7bb1949c267f748c3"}, - {file = "frozenlist-1.5.0.tar.gz", hash = "sha256:81d5af29e61b9c8348e876d442253723928dce6433e0e76cd925cd83f1b4b817"}, + {file = "frozenlist-1.6.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:e6e558ea1e47fd6fa8ac9ccdad403e5dd5ecc6ed8dda94343056fa4277d5c65e"}, + {file = "frozenlist-1.6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f4b3cd7334a4bbc0c472164f3744562cb72d05002cc6fcf58adb104630bbc352"}, + {file = "frozenlist-1.6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9799257237d0479736e2b4c01ff26b5c7f7694ac9692a426cb717f3dc02fff9b"}, + {file = "frozenlist-1.6.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f3a7bb0fe1f7a70fb5c6f497dc32619db7d2cdd53164af30ade2f34673f8b1fc"}, + {file = "frozenlist-1.6.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:36d2fc099229f1e4237f563b2a3e0ff7ccebc3999f729067ce4e64a97a7f2869"}, + {file = "frozenlist-1.6.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f27a9f9a86dcf00708be82359db8de86b80d029814e6693259befe82bb58a106"}, + {file = "frozenlist-1.6.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:75ecee69073312951244f11b8627e3700ec2bfe07ed24e3a685a5979f0412d24"}, + {file = "frozenlist-1.6.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f2c7d5aa19714b1b01a0f515d078a629e445e667b9da869a3cd0e6fe7dec78bd"}, + {file = "frozenlist-1.6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:69bbd454f0fb23b51cadc9bdba616c9678e4114b6f9fa372d462ff2ed9323ec8"}, + {file = "frozenlist-1.6.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:7daa508e75613809c7a57136dec4871a21bca3080b3a8fc347c50b187df4f00c"}, + {file = "frozenlist-1.6.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:89ffdb799154fd4d7b85c56d5fa9d9ad48946619e0eb95755723fffa11022d75"}, + {file = "frozenlist-1.6.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:920b6bd77d209931e4c263223381d63f76828bec574440f29eb497cf3394c249"}, + {file = "frozenlist-1.6.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:d3ceb265249fb401702fce3792e6b44c1166b9319737d21495d3611028d95769"}, + {file = "frozenlist-1.6.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:52021b528f1571f98a7d4258c58aa8d4b1a96d4f01d00d51f1089f2e0323cb02"}, + {file = "frozenlist-1.6.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:0f2ca7810b809ed0f1917293050163c7654cefc57a49f337d5cd9de717b8fad3"}, + {file = "frozenlist-1.6.0-cp310-cp310-win32.whl", hash = "sha256:0e6f8653acb82e15e5443dba415fb62a8732b68fe09936bb6d388c725b57f812"}, + {file = "frozenlist-1.6.0-cp310-cp310-win_amd64.whl", hash = "sha256:f1a39819a5a3e84304cd286e3dc62a549fe60985415851b3337b6f5cc91907f1"}, + {file = "frozenlist-1.6.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:ae8337990e7a45683548ffb2fee1af2f1ed08169284cd829cdd9a7fa7470530d"}, + {file = "frozenlist-1.6.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:8c952f69dd524558694818a461855f35d36cc7f5c0adddce37e962c85d06eac0"}, + {file = "frozenlist-1.6.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:8f5fef13136c4e2dee91bfb9a44e236fff78fc2cd9f838eddfc470c3d7d90afe"}, + {file = "frozenlist-1.6.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:716bbba09611b4663ecbb7cd022f640759af8259e12a6ca939c0a6acd49eedba"}, + {file = "frozenlist-1.6.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:7b8c4dc422c1a3ffc550b465090e53b0bf4839047f3e436a34172ac67c45d595"}, + {file = "frozenlist-1.6.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b11534872256e1666116f6587a1592ef395a98b54476addb5e8d352925cb5d4a"}, + {file = "frozenlist-1.6.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1c6eceb88aaf7221f75be6ab498dc622a151f5f88d536661af3ffc486245a626"}, + {file = "frozenlist-1.6.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:62c828a5b195570eb4b37369fcbbd58e96c905768d53a44d13044355647838ff"}, + {file = "frozenlist-1.6.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e1c6bd2c6399920c9622362ce95a7d74e7f9af9bfec05fff91b8ce4b9647845a"}, + {file = "frozenlist-1.6.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:49ba23817781e22fcbd45fd9ff2b9b8cdb7b16a42a4851ab8025cae7b22e96d0"}, + {file = "frozenlist-1.6.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:431ef6937ae0f853143e2ca67d6da76c083e8b1fe3df0e96f3802fd37626e606"}, + {file = "frozenlist-1.6.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:9d124b38b3c299ca68433597ee26b7819209cb8a3a9ea761dfe9db3a04bba584"}, + {file = "frozenlist-1.6.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:118e97556306402e2b010da1ef21ea70cb6d6122e580da64c056b96f524fbd6a"}, + {file = "frozenlist-1.6.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:fb3b309f1d4086b5533cf7bbcf3f956f0ae6469664522f1bde4feed26fba60f1"}, + {file = "frozenlist-1.6.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:54dece0d21dce4fdb188a1ffc555926adf1d1c516e493c2914d7c370e454bc9e"}, + {file = "frozenlist-1.6.0-cp311-cp311-win32.whl", hash = "sha256:654e4ba1d0b2154ca2f096bed27461cf6160bc7f504a7f9a9ef447c293caf860"}, + {file = "frozenlist-1.6.0-cp311-cp311-win_amd64.whl", hash = "sha256:3e911391bffdb806001002c1f860787542f45916c3baf764264a52765d5a5603"}, + {file = "frozenlist-1.6.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:c5b9e42ace7d95bf41e19b87cec8f262c41d3510d8ad7514ab3862ea2197bfb1"}, + {file = "frozenlist-1.6.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:ca9973735ce9f770d24d5484dcb42f68f135351c2fc81a7a9369e48cf2998a29"}, + {file = "frozenlist-1.6.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6ac40ec76041c67b928ca8aaffba15c2b2ee3f5ae8d0cb0617b5e63ec119ca25"}, + {file = "frozenlist-1.6.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:95b7a8a3180dfb280eb044fdec562f9b461614c0ef21669aea6f1d3dac6ee576"}, + {file = "frozenlist-1.6.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c444d824e22da6c9291886d80c7d00c444981a72686e2b59d38b285617cb52c8"}, + {file = "frozenlist-1.6.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bb52c8166499a8150bfd38478248572c924c003cbb45fe3bcd348e5ac7c000f9"}, + {file = "frozenlist-1.6.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b35298b2db9c2468106278537ee529719228950a5fdda686582f68f247d1dc6e"}, + {file = "frozenlist-1.6.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d108e2d070034f9d57210f22fefd22ea0d04609fc97c5f7f5a686b3471028590"}, + {file = "frozenlist-1.6.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4e1be9111cb6756868ac242b3c2bd1f09d9aea09846e4f5c23715e7afb647103"}, + {file = "frozenlist-1.6.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:94bb451c664415f02f07eef4ece976a2c65dcbab9c2f1705b7031a3a75349d8c"}, + {file = "frozenlist-1.6.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:d1a686d0b0949182b8faddea596f3fc11f44768d1f74d4cad70213b2e139d821"}, + {file = "frozenlist-1.6.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:ea8e59105d802c5a38bdbe7362822c522230b3faba2aa35c0fa1765239b7dd70"}, + {file = "frozenlist-1.6.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:abc4e880a9b920bc5020bf6a431a6bb40589d9bca3975c980495f63632e8382f"}, + {file = "frozenlist-1.6.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:9a79713adfe28830f27a3c62f6b5406c37376c892b05ae070906f07ae4487046"}, + {file = "frozenlist-1.6.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:9a0318c2068e217a8f5e3b85e35899f5a19e97141a45bb925bb357cfe1daf770"}, + {file = "frozenlist-1.6.0-cp312-cp312-win32.whl", hash = "sha256:853ac025092a24bb3bf09ae87f9127de9fe6e0c345614ac92536577cf956dfcc"}, + {file = "frozenlist-1.6.0-cp312-cp312-win_amd64.whl", hash = "sha256:2bdfe2d7e6c9281c6e55523acd6c2bf77963cb422fdc7d142fb0cb6621b66878"}, + {file = "frozenlist-1.6.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:1d7fb014fe0fbfee3efd6a94fc635aeaa68e5e1720fe9e57357f2e2c6e1a647e"}, + {file = "frozenlist-1.6.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:01bcaa305a0fdad12745502bfd16a1c75b14558dabae226852f9159364573117"}, + {file = "frozenlist-1.6.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:8b314faa3051a6d45da196a2c495e922f987dc848e967d8cfeaee8a0328b1cd4"}, + {file = "frozenlist-1.6.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:da62fecac21a3ee10463d153549d8db87549a5e77eefb8c91ac84bb42bb1e4e3"}, + {file = "frozenlist-1.6.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:d1eb89bf3454e2132e046f9599fbcf0a4483ed43b40f545551a39316d0201cd1"}, + {file = "frozenlist-1.6.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d18689b40cb3936acd971f663ccb8e2589c45db5e2c5f07e0ec6207664029a9c"}, + {file = "frozenlist-1.6.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e67ddb0749ed066b1a03fba812e2dcae791dd50e5da03be50b6a14d0c1a9ee45"}, + {file = "frozenlist-1.6.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fc5e64626e6682638d6e44398c9baf1d6ce6bc236d40b4b57255c9d3f9761f1f"}, + {file = "frozenlist-1.6.0-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:437cfd39564744ae32ad5929e55b18ebd88817f9180e4cc05e7d53b75f79ce85"}, + {file = "frozenlist-1.6.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:62dd7df78e74d924952e2feb7357d826af8d2f307557a779d14ddf94d7311be8"}, + {file = "frozenlist-1.6.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:a66781d7e4cddcbbcfd64de3d41a61d6bdde370fc2e38623f30b2bd539e84a9f"}, + {file = "frozenlist-1.6.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:482fe06e9a3fffbcd41950f9d890034b4a54395c60b5e61fae875d37a699813f"}, + {file = "frozenlist-1.6.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:e4f9373c500dfc02feea39f7a56e4f543e670212102cc2eeb51d3a99c7ffbde6"}, + {file = "frozenlist-1.6.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:e69bb81de06827147b7bfbaeb284d85219fa92d9f097e32cc73675f279d70188"}, + {file = "frozenlist-1.6.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:7613d9977d2ab4a9141dde4a149f4357e4065949674c5649f920fec86ecb393e"}, + {file = "frozenlist-1.6.0-cp313-cp313-win32.whl", hash = "sha256:4def87ef6d90429f777c9d9de3961679abf938cb6b7b63d4a7eb8a268babfce4"}, + {file = "frozenlist-1.6.0-cp313-cp313-win_amd64.whl", hash = "sha256:37a8a52c3dfff01515e9bbbee0e6063181362f9de3db2ccf9bc96189b557cbfd"}, + {file = "frozenlist-1.6.0-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:46138f5a0773d064ff663d273b309b696293d7a7c00a0994c5c13a5078134b64"}, + {file = "frozenlist-1.6.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:f88bc0a2b9c2a835cb888b32246c27cdab5740059fb3688852bf91e915399b91"}, + {file = "frozenlist-1.6.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:777704c1d7655b802c7850255639672e90e81ad6fa42b99ce5ed3fbf45e338dd"}, + {file = "frozenlist-1.6.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:85ef8d41764c7de0dcdaf64f733a27352248493a85a80661f3c678acd27e31f2"}, + {file = "frozenlist-1.6.0-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:da5cb36623f2b846fb25009d9d9215322318ff1c63403075f812b3b2876c8506"}, + {file = "frozenlist-1.6.0-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cbb56587a16cf0fb8acd19e90ff9924979ac1431baea8681712716a8337577b0"}, + {file = "frozenlist-1.6.0-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c6154c3ba59cda3f954c6333025369e42c3acd0c6e8b6ce31eb5c5b8116c07e0"}, + {file = "frozenlist-1.6.0-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2e8246877afa3f1ae5c979fe85f567d220f86a50dc6c493b9b7d8191181ae01e"}, + {file = "frozenlist-1.6.0-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7b0f6cce16306d2e117cf9db71ab3a9e8878a28176aeaf0dbe35248d97b28d0c"}, + {file = "frozenlist-1.6.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:1b8e8cd8032ba266f91136d7105706ad57770f3522eac4a111d77ac126a25a9b"}, + {file = "frozenlist-1.6.0-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:e2ada1d8515d3ea5378c018a5f6d14b4994d4036591a52ceaf1a1549dec8e1ad"}, + {file = "frozenlist-1.6.0-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:cdb2c7f071e4026c19a3e32b93a09e59b12000751fc9b0b7758da899e657d215"}, + {file = "frozenlist-1.6.0-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:03572933a1969a6d6ab509d509e5af82ef80d4a5d4e1e9f2e1cdd22c77a3f4d2"}, + {file = "frozenlist-1.6.0-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:77effc978947548b676c54bbd6a08992759ea6f410d4987d69feea9cd0919911"}, + {file = "frozenlist-1.6.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:a2bda8be77660ad4089caf2223fdbd6db1858462c4b85b67fbfa22102021e497"}, + {file = "frozenlist-1.6.0-cp313-cp313t-win32.whl", hash = "sha256:a4d96dc5bcdbd834ec6b0f91027817214216b5b30316494d2b1aebffb87c534f"}, + {file = "frozenlist-1.6.0-cp313-cp313t-win_amd64.whl", hash = "sha256:e18036cb4caa17ea151fd5f3d70be9d354c99eb8cf817a3ccde8a7873b074348"}, + {file = "frozenlist-1.6.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:536a1236065c29980c15c7229fbb830dedf809708c10e159b8136534233545f0"}, + {file = "frozenlist-1.6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:ed5e3a4462ff25ca84fb09e0fada8ea267df98a450340ead4c91b44857267d70"}, + {file = "frozenlist-1.6.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e19c0fc9f4f030fcae43b4cdec9e8ab83ffe30ec10c79a4a43a04d1af6c5e1ad"}, + {file = "frozenlist-1.6.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c7c608f833897501dac548585312d73a7dca028bf3b8688f0d712b7acfaf7fb3"}, + {file = "frozenlist-1.6.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:0dbae96c225d584f834b8d3cc688825911960f003a85cb0fd20b6e5512468c42"}, + {file = "frozenlist-1.6.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:625170a91dd7261a1d1c2a0c1a353c9e55d21cd67d0852185a5fef86587e6f5f"}, + {file = "frozenlist-1.6.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1db8b2fc7ee8a940b547a14c10e56560ad3ea6499dc6875c354e2335812f739d"}, + {file = "frozenlist-1.6.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4da6fc43048b648275a220e3a61c33b7fff65d11bdd6dcb9d9c145ff708b804c"}, + {file = "frozenlist-1.6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6ef8e7e8f2f3820c5f175d70fdd199b79e417acf6c72c5d0aa8f63c9f721646f"}, + {file = "frozenlist-1.6.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:aa733d123cc78245e9bb15f29b44ed9e5780dc6867cfc4e544717b91f980af3b"}, + {file = "frozenlist-1.6.0-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:ba7f8d97152b61f22d7f59491a781ba9b177dd9f318486c5fbc52cde2db12189"}, + {file = "frozenlist-1.6.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:56a0b8dd6d0d3d971c91f1df75e824986667ccce91e20dca2023683814344791"}, + {file = "frozenlist-1.6.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:5c9e89bf19ca148efcc9e3c44fd4c09d5af85c8a7dd3dbd0da1cb83425ef4983"}, + {file = "frozenlist-1.6.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:1330f0a4376587face7637dfd245380a57fe21ae8f9d360c1c2ef8746c4195fa"}, + {file = "frozenlist-1.6.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:2187248203b59625566cac53572ec8c2647a140ee2738b4e36772930377a533c"}, + {file = "frozenlist-1.6.0-cp39-cp39-win32.whl", hash = "sha256:2b8cf4cfea847d6c12af06091561a89740f1f67f331c3fa8623391905e878530"}, + {file = "frozenlist-1.6.0-cp39-cp39-win_amd64.whl", hash = "sha256:1255d5d64328c5a0d066ecb0f02034d086537925f1f04b50b1ae60d37afbf572"}, + {file = "frozenlist-1.6.0-py3-none-any.whl", hash = "sha256:535eec9987adb04701266b92745d6cdcef2e77669299359c3009c3404dd5d191"}, + {file = "frozenlist-1.6.0.tar.gz", hash = "sha256:b99655c32c1c8e06d111e7f41c06c29a5318cb1835df23a45518e02a47c63b68"}, ] [[package]] @@ -1752,22 +1773,22 @@ test = ["coverage[toml]", "ddt (>=1.1.1,!=1.4.3)", "mock ; python_version < \"3. [[package]] name = "google-api-core" -version = "2.24.0" +version = "2.24.2" description = "Google API client core library" optional = false python-versions = ">=3.7" groups = ["main"] files = [ - {file = "google_api_core-2.24.0-py3-none-any.whl", hash = "sha256:10d82ac0fca69c82a25b3efdeefccf6f28e02ebb97925a8cce8edbfe379929d9"}, - {file = "google_api_core-2.24.0.tar.gz", hash = "sha256:e255640547a597a4da010876d333208ddac417d60add22b6851a0c66a831fcaf"}, + {file = "google_api_core-2.24.2-py3-none-any.whl", hash = "sha256:810a63ac95f3c441b7c0e43d344e372887f62ce9071ba972eacf32672e072de9"}, + {file = "google_api_core-2.24.2.tar.gz", hash = "sha256:81718493daf06d96d6bc76a91c23874dbf2fac0adbbf542831b805ee6e974696"}, ] [package.dependencies] -google-auth = ">=2.14.1,<3.0.dev0" -googleapis-common-protos = ">=1.56.2,<2.0.dev0" -proto-plus = ">=1.22.3,<2.0.0dev" -protobuf = ">=3.19.5,<3.20.0 || >3.20.0,<3.20.1 || >3.20.1,<4.21.0 || >4.21.0,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<6.0.0.dev0" -requests = ">=2.18.0,<3.0.0.dev0" +google-auth = ">=2.14.1,<3.0.0" +googleapis-common-protos = ">=1.56.2,<2.0.0" +proto-plus = ">=1.22.3,<2.0.0" +protobuf = ">=3.19.5,<3.20.0 || >3.20.0,<3.20.1 || >3.20.1,<4.21.0 || >4.21.0,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<7.0.0" +requests = ">=2.18.0,<3.0.0" [package.extras] async-rest = ["google-auth[aiohttp] (>=2.35.0,<3.0.dev0)"] @@ -1796,14 +1817,14 @@ uritemplate = ">=3.0.1,<5" [[package]] name = "google-auth" -version = "2.37.0" +version = "2.39.0" description = "Google Authentication Library" optional = false python-versions = ">=3.7" groups = ["main"] files = [ - {file = "google_auth-2.37.0-py2.py3-none-any.whl", hash = "sha256:42664f18290a6be591be5329a96fe30184be1a1badb7292a7f686a9659de9ca0"}, - {file = "google_auth-2.37.0.tar.gz", hash = "sha256:0054623abf1f9c83492c63d3f47e77f0a544caa3d40b2d98e099a611c2dd5d00"}, + {file = "google_auth-2.39.0-py2.py3-none-any.whl", hash = "sha256:0150b6711e97fb9f52fe599f55648950cc4540015565d8fbb31be2ad6e1548a2"}, + {file = "google_auth-2.39.0.tar.gz", hash = "sha256:73222d43cdc35a3aeacbfdcaf73142a97839f10de930550d89ebfe1d0a00cde7"}, ] [package.dependencies] @@ -1812,12 +1833,14 @@ pyasn1-modules = ">=0.2.1" rsa = ">=3.1.4,<5" [package.extras] -aiohttp = ["aiohttp (>=3.6.2,<4.0.0.dev0)", "requests (>=2.20.0,<3.0.0.dev0)"] +aiohttp = ["aiohttp (>=3.6.2,<4.0.0)", "requests (>=2.20.0,<3.0.0)"] enterprise-cert = ["cryptography", "pyopenssl"] -pyjwt = ["cryptography (>=38.0.3)", "pyjwt (>=2.0)"] -pyopenssl = ["cryptography (>=38.0.3)", "pyopenssl (>=20.0.0)"] +pyjwt = ["cryptography (<39.0.0) ; python_version < \"3.8\"", "cryptography (>=38.0.3)", "pyjwt (>=2.0)"] +pyopenssl = ["cryptography (<39.0.0) ; python_version < \"3.8\"", "cryptography (>=38.0.3)", "pyopenssl (>=20.0.0)"] reauth = ["pyu2f (>=0.1.5)"] -requests = ["requests (>=2.20.0,<3.0.0.dev0)"] +requests = ["requests (>=2.20.0,<3.0.0)"] +testing = ["aiohttp (<3.10.0)", "aiohttp (>=3.6.2,<4.0.0)", "aioresponses", "cryptography (<39.0.0) ; python_version < \"3.8\"", "cryptography (>=38.0.3)", "flask", "freezegun", "grpcio", "mock", "oauth2client", "packaging", "pyjwt (>=2.0)", "pyopenssl (<24.3.0)", "pyopenssl (>=20.0.0)", "pytest", "pytest-asyncio", "pytest-cov", "pytest-localserver", "pyu2f (>=0.1.5)", "requests (>=2.20.0,<3.0.0)", "responses", "urllib3"] +urllib3 = ["packaging", "urllib3"] [[package]] name = "google-auth-httplib2" @@ -1837,21 +1860,21 @@ httplib2 = ">=0.19.0" [[package]] name = "googleapis-common-protos" -version = "1.66.0" +version = "1.70.0" description = "Common protobufs used in Google APIs" optional = false python-versions = ">=3.7" groups = ["main"] files = [ - {file = "googleapis_common_protos-1.66.0-py2.py3-none-any.whl", hash = "sha256:d7abcd75fabb2e0ec9f74466401f6c119a0b498e27370e9be4c94cb7e382b8ed"}, - {file = "googleapis_common_protos-1.66.0.tar.gz", hash = "sha256:c3e7b33d15fdca5374cc0a7346dd92ffa847425cc4ea941d970f13680052ec8c"}, + {file = "googleapis_common_protos-1.70.0-py3-none-any.whl", hash = "sha256:b8bfcca8c25a2bb253e0e0b0adaf8c00773e5e6af6fd92397576680b807e0fd8"}, + {file = "googleapis_common_protos-1.70.0.tar.gz", hash = "sha256:0e1b44e0ea153e6594f9f394fef15193a68aaaea2d843f83e2742717ca753257"}, ] [package.dependencies] -protobuf = ">=3.20.2,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<6.0.0.dev0" +protobuf = ">=3.20.2,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<7.0.0" [package.extras] -grpc = ["grpcio (>=1.44.0,<2.0.0.dev0)"] +grpc = ["grpcio (>=1.44.0,<2.0.0)"] [[package]] name = "grapheme" @@ -1869,14 +1892,14 @@ test = ["pytest", "sphinx", "sphinx-autobuild", "twine", "wheel"] [[package]] name = "graphql-core" -version = "3.2.5" +version = "3.2.6" description = "GraphQL implementation for Python, a port of GraphQL.js, the JavaScript reference implementation for GraphQL." optional = false python-versions = "<4,>=3.6" groups = ["dev"] files = [ - {file = "graphql_core-3.2.5-py3-none-any.whl", hash = "sha256:2f150d5096448aa4f8ab26268567bbfeef823769893b39c1a2e1409590939c8a"}, - {file = "graphql_core-3.2.5.tar.gz", hash = "sha256:e671b90ed653c808715645e3998b7ab67d382d55467b7e2978549111bbabf8d5"}, + {file = "graphql_core-3.2.6-py3-none-any.whl", hash = "sha256:78b016718c161a6fb20a7d97bbf107f331cd1afe53e45566c59f776ed7f0b45f"}, + {file = "graphql_core-3.2.6.tar.gz", hash = "sha256:c08eec22f9e40f0bd61d805907e3b3b1b9a320bc606e23dc145eebca07c8fbab"}, ] [package.dependencies] @@ -1884,59 +1907,59 @@ 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]] name = "h2" -version = "4.1.0" -description = "HTTP/2 State-Machine based protocol implementation" +version = "4.2.0" +description = "Pure-Python HTTP/2 protocol implementation" optional = false -python-versions = ">=3.6.1" +python-versions = ">=3.9" groups = ["main"] files = [ - {file = "h2-4.1.0-py3-none-any.whl", hash = "sha256:03a46bcf682256c95b5fd9e9a99c1323584c3eec6440d379b9903d709476bc6d"}, - {file = "h2-4.1.0.tar.gz", hash = "sha256:a83aca08fbe7aacb79fec788c9c0bac936343560ed9ec18b82a13a12c28d2abb"}, + {file = "h2-4.2.0-py3-none-any.whl", hash = "sha256:479a53ad425bb29af087f3458a61d30780bc818e4ebcf01f0b536ba916462ed0"}, + {file = "h2-4.2.0.tar.gz", hash = "sha256:c8a52129695e88b1a0578d8d2cc6842bbd79128ac685463b887ee278126ad01f"}, ] [package.dependencies] -hpack = ">=4.0,<5" -hyperframe = ">=6.0,<7" +hpack = ">=4.1,<5" +hyperframe = ">=6.1,<7" [[package]] name = "hpack" -version = "4.0.0" -description = "Pure-Python HPACK header compression" +version = "4.1.0" +description = "Pure-Python HPACK header encoding" optional = false -python-versions = ">=3.6.1" +python-versions = ">=3.9" groups = ["main"] files = [ - {file = "hpack-4.0.0-py3-none-any.whl", hash = "sha256:84a076fad3dc9a9f8063ccb8041ef100867b1878b25ef0ee63847a5d53818a6c"}, - {file = "hpack-4.0.0.tar.gz", hash = "sha256:fc41de0c63e687ebffde81187a948221294896f6bdc0ae2312708df339430095"}, + {file = "hpack-4.1.0-py3-none-any.whl", hash = "sha256:157ac792668d995c657d93111f46b4535ed114f0c9c8d672271bbec7eae1b496"}, + {file = "hpack-4.1.0.tar.gz", hash = "sha256:ec5eca154f7056aa06f196a557655c5b009b382873ac8d1e66e79e87535f1dca"}, ] [[package]] name = "httpcore" -version = "1.0.7" +version = "1.0.9" description = "A minimal low-level HTTP client." optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "httpcore-1.0.7-py3-none-any.whl", hash = "sha256:a3fff8f43dc260d5bd363d9f9cf1830fa3a458b332856f34282de498ed420edd"}, - {file = "httpcore-1.0.7.tar.gz", hash = "sha256:8551cb62a169ec7162ac7be8d4817d561f60e08eaa485234898414bb5a8a0b4c"}, + {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)"] @@ -1987,14 +2010,14 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "hyperframe" -version = "6.0.1" -description = "HTTP/2 framing layer for Python" +version = "6.1.0" +description = "Pure-Python HTTP/2 framing" optional = false -python-versions = ">=3.6.1" +python-versions = ">=3.9" groups = ["main"] files = [ - {file = "hyperframe-6.0.1-py3-none-any.whl", hash = "sha256:0ec6bafd80d8ad2195c4f03aacba3a8265e57bc4cff261e802bf39970ed02a15"}, - {file = "hyperframe-6.0.1.tar.gz", hash = "sha256:ae510046231dc8e9ecb1a6586f63d2347bf4c8905914aa84ba585ae85f28a914"}, + {file = "hyperframe-6.1.0-py3-none-any.whl", hash = "sha256:b03380493a519fce58ea5af42e4a42317bf9bd425596f7a0835ffce80f1a42e5"}, + {file = "hyperframe-6.1.0.tar.gz", hash = "sha256:f630908a00854a7adeabd6382b43923a4c4cd4b821fcb527e6ab9e15382a3b08"}, ] [[package]] @@ -2014,14 +2037,14 @@ all = ["flake8 (>=7.1.1)", "mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2 [[package]] name = "importlib-metadata" -version = "8.5.0" +version = "8.6.1" description = "Read metadata from Python packages" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["main", "dev", "docs"] files = [ - {file = "importlib_metadata-8.5.0-py3-none-any.whl", hash = "sha256:45e54197d28b7a7f1559e60b95e7c567032b602131fbd588f1497f47880aa68b"}, - {file = "importlib_metadata-8.5.0.tar.gz", hash = "sha256:71522656f0abace1d072b9e5481a48f07c138e00f079c38c8f883823f9c26bd7"}, + {file = "importlib_metadata-8.6.1-py3-none-any.whl", hash = "sha256:02a89390c1e15fdfdc0d7c6b25cb3e62650d0494005c97d6f148bf5b9787525e"}, + {file = "importlib_metadata-8.6.1.tar.gz", hash = "sha256:310b41d755445d74569f993ccfc22838295d9fe005425094fad953d7f15c8580"}, ] markers = {dev = "python_version < \"3.10\"", docs = "python_version < \"3.10\""} @@ -2034,19 +2057,19 @@ cover = ["pytest-cov"] doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] enabler = ["pytest-enabler (>=2.2)"] perf = ["ipython"] -test = ["flufl.flake8", "importlib-resources (>=1.3) ; python_version < \"3.9\"", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6,!=8.1.*)", "pytest-perf (>=0.9.2)"] +test = ["flufl.flake8", "importlib_resources (>=1.3) ; python_version < \"3.9\"", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6,!=8.1.*)", "pytest-perf (>=0.9.2)"] type = ["pytest-mypy"] [[package]] name = "iniconfig" -version = "2.0.0" +version = "2.1.0" description = "brain-dead simple config-ini parsing" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" groups = ["dev"] files = [ - {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, - {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, + {file = "iniconfig-2.1.0-py3-none-any.whl", hash = "sha256:9deba5723312380e77435581c6bf4935c94cbfab9b1ed33ef8d238ea168eb760"}, + {file = "iniconfig-2.1.0.tar.gz", hash = "sha256:3abbd2e30b36733fee78f9c7f7308f2d0050e88f0087fd25c2645f63c773e1c7"}, ] [[package]] @@ -2063,18 +2086,19 @@ files = [ [[package]] name = "isort" -version = "5.13.2" +version = "6.0.1" description = "A Python utility / library to sort Python imports." optional = false -python-versions = ">=3.8.0" +python-versions = ">=3.9.0" groups = ["dev"] files = [ - {file = "isort-5.13.2-py3-none-any.whl", hash = "sha256:8ca5e72a8d85860d5a3fa69b8745237f2939afe12dbf656afbcb47fe72d947a6"}, - {file = "isort-5.13.2.tar.gz", hash = "sha256:48fdfcb9face5d58a4f6dde2e72a1fb8dcaf8ab26f95ab49fab84c2ddefb0109"}, + {file = "isort-6.0.1-py3-none-any.whl", hash = "sha256:2dc5d7f65c9678d94c88dfc29161a320eec67328bc97aad576874cb4be1e9615"}, + {file = "isort-6.0.1.tar.gz", hash = "sha256:1cb5df28dfbc742e490c5e41bad6da41b805b0a8be7bc93cd0fb2a8a890ac450"}, ] [package.extras] -colors = ["colorama (>=0.4.6)"] +colors = ["colorama"] +plugins = ["setuptools"] [[package]] name = "itsdangerous" @@ -2120,14 +2144,14 @@ files = [ [[package]] name = "joserfc" -version = "1.0.2" +version = "1.0.4" description = "The ultimate Python library for JOSE RFCs, including JWS, JWE, JWK, JWA, JWT" optional = false python-versions = ">=3.8" groups = ["dev"] files = [ - {file = "joserfc-1.0.2-py3-none-any.whl", hash = "sha256:8d3e0253b0b24aeaf049d7bf7a847040dd6462de24cefd0c14abfc8b353f9619"}, - {file = "joserfc-1.0.2.tar.gz", hash = "sha256:f3c4efa35a62fc100097e4bec2584f5fd21b878eee3eb5324bc9b37d2969b2a4"}, + {file = "joserfc-1.0.4-py3-none-any.whl", hash = "sha256:ecf3a5999f89d3a663485ab7c4f633541586d6f44e664ee760197299f39ed51b"}, + {file = "joserfc-1.0.4.tar.gz", hash = "sha256:dc3fc216cfcfc952d4c0d4b06c759a04711af0b667e5973adc47dbb1ba784127"}, ] [package.dependencies] @@ -2201,20 +2225,20 @@ format-nongpl = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339- [[package]] name = "jsonschema-path" -version = "0.3.3" +version = "0.3.4" description = "JSONSchema Spec with object-oriented paths" optional = false python-versions = "<4.0.0,>=3.8.0" groups = ["dev"] files = [ - {file = "jsonschema_path-0.3.3-py3-none-any.whl", hash = "sha256:203aff257f8038cd3c67be614fe6b2001043408cb1b4e36576bc4921e09d83c4"}, - {file = "jsonschema_path-0.3.3.tar.gz", hash = "sha256:f02e5481a4288ec062f8e68c808569e427d905bedfecb7f2e4c69ef77957c382"}, + {file = "jsonschema_path-0.3.4-py3-none-any.whl", hash = "sha256:f502191fdc2b22050f9a81c9237be9d27145b9001c55842bece5e94e382e52f8"}, + {file = "jsonschema_path-0.3.4.tar.gz", hash = "sha256:8365356039f16cc65fddffafda5f58766e34bebab7d6d105616ab52bc4297001"}, ] [package.dependencies] pathable = ">=0.4.1,<0.5.0" PyYAML = ">=5.1" -referencing = ">=0.28.0,<0.36.0" +referencing = "<0.37.0" requests = ">=2.31.0,<3.0.0" [[package]] @@ -2262,68 +2286,45 @@ adal = ["adal (>=1.0.2)"] [[package]] name = "lazy-object-proxy" -version = "1.10.0" +version = "1.11.0" description = "A fast and thorough lazy object proxy." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "lazy-object-proxy-1.10.0.tar.gz", hash = "sha256:78247b6d45f43a52ef35c25b5581459e85117225408a4128a3daf8bf9648ac69"}, - {file = "lazy_object_proxy-1.10.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:855e068b0358ab916454464a884779c7ffa312b8925c6f7401e952dcf3b89977"}, - {file = "lazy_object_proxy-1.10.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7ab7004cf2e59f7c2e4345604a3e6ea0d92ac44e1c2375527d56492014e690c3"}, - {file = "lazy_object_proxy-1.10.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dc0d2fc424e54c70c4bc06787e4072c4f3b1aa2f897dfdc34ce1013cf3ceef05"}, - {file = "lazy_object_proxy-1.10.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:e2adb09778797da09d2b5ebdbceebf7dd32e2c96f79da9052b2e87b6ea495895"}, - {file = "lazy_object_proxy-1.10.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:b1f711e2c6dcd4edd372cf5dec5c5a30d23bba06ee012093267b3376c079ec83"}, - {file = "lazy_object_proxy-1.10.0-cp310-cp310-win32.whl", hash = "sha256:76a095cfe6045c7d0ca77db9934e8f7b71b14645f0094ffcd842349ada5c5fb9"}, - {file = "lazy_object_proxy-1.10.0-cp310-cp310-win_amd64.whl", hash = "sha256:b4f87d4ed9064b2628da63830986c3d2dca7501e6018347798313fcf028e2fd4"}, - {file = "lazy_object_proxy-1.10.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:fec03caabbc6b59ea4a638bee5fce7117be8e99a4103d9d5ad77f15d6f81020c"}, - {file = "lazy_object_proxy-1.10.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:02c83f957782cbbe8136bee26416686a6ae998c7b6191711a04da776dc9e47d4"}, - {file = "lazy_object_proxy-1.10.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:009e6bb1f1935a62889ddc8541514b6a9e1fcf302667dcb049a0be5c8f613e56"}, - {file = "lazy_object_proxy-1.10.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:75fc59fc450050b1b3c203c35020bc41bd2695ed692a392924c6ce180c6f1dc9"}, - {file = "lazy_object_proxy-1.10.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:782e2c9b2aab1708ffb07d4bf377d12901d7a1d99e5e410d648d892f8967ab1f"}, - {file = "lazy_object_proxy-1.10.0-cp311-cp311-win32.whl", hash = "sha256:edb45bb8278574710e68a6b021599a10ce730d156e5b254941754a9cc0b17d03"}, - {file = "lazy_object_proxy-1.10.0-cp311-cp311-win_amd64.whl", hash = "sha256:e271058822765ad5e3bca7f05f2ace0de58a3f4e62045a8c90a0dfd2f8ad8cc6"}, - {file = "lazy_object_proxy-1.10.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:e98c8af98d5707dcdecc9ab0863c0ea6e88545d42ca7c3feffb6b4d1e370c7ba"}, - {file = "lazy_object_proxy-1.10.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:952c81d415b9b80ea261d2372d2a4a2332a3890c2b83e0535f263ddfe43f0d43"}, - {file = "lazy_object_proxy-1.10.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:80b39d3a151309efc8cc48675918891b865bdf742a8616a337cb0090791a0de9"}, - {file = "lazy_object_proxy-1.10.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:e221060b701e2aa2ea991542900dd13907a5c90fa80e199dbf5a03359019e7a3"}, - {file = "lazy_object_proxy-1.10.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:92f09ff65ecff3108e56526f9e2481b8116c0b9e1425325e13245abfd79bdb1b"}, - {file = "lazy_object_proxy-1.10.0-cp312-cp312-win32.whl", hash = "sha256:3ad54b9ddbe20ae9f7c1b29e52f123120772b06dbb18ec6be9101369d63a4074"}, - {file = "lazy_object_proxy-1.10.0-cp312-cp312-win_amd64.whl", hash = "sha256:127a789c75151db6af398b8972178afe6bda7d6f68730c057fbbc2e96b08d282"}, - {file = "lazy_object_proxy-1.10.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:9e4ed0518a14dd26092614412936920ad081a424bdcb54cc13349a8e2c6d106a"}, - {file = "lazy_object_proxy-1.10.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5ad9e6ed739285919aa9661a5bbed0aaf410aa60231373c5579c6b4801bd883c"}, - {file = "lazy_object_proxy-1.10.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2fc0a92c02fa1ca1e84fc60fa258458e5bf89d90a1ddaeb8ed9cc3147f417255"}, - {file = "lazy_object_proxy-1.10.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:0aefc7591920bbd360d57ea03c995cebc204b424524a5bd78406f6e1b8b2a5d8"}, - {file = "lazy_object_proxy-1.10.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:5faf03a7d8942bb4476e3b62fd0f4cf94eaf4618e304a19865abf89a35c0bbee"}, - {file = "lazy_object_proxy-1.10.0-cp38-cp38-win32.whl", hash = "sha256:e333e2324307a7b5d86adfa835bb500ee70bfcd1447384a822e96495796b0ca4"}, - {file = "lazy_object_proxy-1.10.0-cp38-cp38-win_amd64.whl", hash = "sha256:cb73507defd385b7705c599a94474b1d5222a508e502553ef94114a143ec6696"}, - {file = "lazy_object_proxy-1.10.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:366c32fe5355ef5fc8a232c5436f4cc66e9d3e8967c01fb2e6302fd6627e3d94"}, - {file = "lazy_object_proxy-1.10.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2297f08f08a2bb0d32a4265e98a006643cd7233fb7983032bd61ac7a02956b3b"}, - {file = "lazy_object_proxy-1.10.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:18dd842b49456aaa9a7cf535b04ca4571a302ff72ed8740d06b5adcd41fe0757"}, - {file = "lazy_object_proxy-1.10.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:217138197c170a2a74ca0e05bddcd5f1796c735c37d0eee33e43259b192aa424"}, - {file = "lazy_object_proxy-1.10.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:9a3a87cf1e133e5b1994144c12ca4aa3d9698517fe1e2ca82977781b16955658"}, - {file = "lazy_object_proxy-1.10.0-cp39-cp39-win32.whl", hash = "sha256:30b339b2a743c5288405aa79a69e706a06e02958eab31859f7f3c04980853b70"}, - {file = "lazy_object_proxy-1.10.0-cp39-cp39-win_amd64.whl", hash = "sha256:a899b10e17743683b293a729d3a11f2f399e8a90c73b089e29f5d0fe3509f0dd"}, - {file = "lazy_object_proxy-1.10.0-pp310.pp311.pp312.pp38.pp39-none-any.whl", hash = "sha256:80fa48bd89c8f2f456fc0765c11c23bf5af827febacd2f523ca5bc1893fcc09d"}, + {file = "lazy_object_proxy-1.11.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:132bc8a34f2f2d662a851acfd1b93df769992ed1b81e2b1fda7db3e73b0d5a18"}, + {file = "lazy_object_proxy-1.11.0-cp310-cp310-win_amd64.whl", hash = "sha256:01261a3afd8621a1accb5682df2593dc7ec7d21d38f411011a5712dcd418fbed"}, + {file = "lazy_object_proxy-1.11.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:090935756cc041e191f22f4f9c7fd4fe9a454717067adf5b1bbd2ce3046b556e"}, + {file = "lazy_object_proxy-1.11.0-cp311-cp311-win_amd64.whl", hash = "sha256:76ec715017f06410f57df442c1a8d66e6b5f7035077785b129817f5ae58810a4"}, + {file = "lazy_object_proxy-1.11.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:9a9f39098e93a63618a79eef2889ae3cf0605f676cd4797fdfd49fcd7ddc318b"}, + {file = "lazy_object_proxy-1.11.0-cp312-cp312-win_amd64.whl", hash = "sha256:ee13f67f4fcd044ef27bfccb1c93d39c100046fec1fad6e9a1fcdfd17492aeb3"}, + {file = "lazy_object_proxy-1.11.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:fd4c84eafd8dd15ea16f7d580758bc5c2ce1f752faec877bb2b1f9f827c329cd"}, + {file = "lazy_object_proxy-1.11.0-cp313-cp313-win_amd64.whl", hash = "sha256:d2503427bda552d3aefcac92f81d9e7ca631e680a2268cbe62cd6a58de6409b7"}, + {file = "lazy_object_proxy-1.11.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:0613116156801ab3fccb9e2b05ed83b08ea08c2517fdc6c6bc0d4697a1a376e3"}, + {file = "lazy_object_proxy-1.11.0-cp313-cp313t-win_amd64.whl", hash = "sha256:bb03c507d96b65f617a6337dedd604399d35face2cdf01526b913fb50c4cb6e8"}, + {file = "lazy_object_proxy-1.11.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:28c174db37946f94b97a97b579932ff88f07b8d73a46b6b93322b9ac06794a3b"}, + {file = "lazy_object_proxy-1.11.0-cp39-cp39-win_amd64.whl", hash = "sha256:d662f0669e27704495ff1f647070eb8816931231c44e583f4d0701b7adf6272f"}, + {file = "lazy_object_proxy-1.11.0-py3-none-any.whl", hash = "sha256:a56a5093d433341ff7da0e89f9b486031ccd222ec8e52ec84d0ec1cdc819674b"}, + {file = "lazy_object_proxy-1.11.0.tar.gz", hash = "sha256:18874411864c9fbbbaa47f9fc1dd7aea754c86cfde21278ef427639d1dd78e9c"}, ] [[package]] name = "markdown" -version = "3.7" +version = "3.8" description = "Python implementation of John Gruber's Markdown." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["docs"] files = [ - {file = "Markdown-3.7-py3-none-any.whl", hash = "sha256:7eb6df5690b81a1d7942992c97fad2938e956e79df20cbc6186e9c3a77b1c803"}, - {file = "markdown-3.7.tar.gz", hash = "sha256:2ae2471477cfd02dbbf038d5d9bc226d40def84b4fe2986e49b59b6b472bbed2"}, + {file = "markdown-3.8-py3-none-any.whl", hash = "sha256:794a929b79c5af141ef5ab0f2f642d0f7b1872981250230e72682346f7cc90dc"}, + {file = "markdown-3.8.tar.gz", hash = "sha256:7df81e63f0df5c4b24b7d156eb81e4690595239b7d70937d0409f1b0de319c6f"}, ] [package.dependencies] importlib-metadata = {version = ">=4.4", markers = "python_version < \"3.10\""} [package.extras] -docs = ["mdx-gh-links (>=0.2)", "mkdocs (>=1.5)", "mkdocs-gen-files", "mkdocs-literate-nav", "mkdocs-nature (>=0.6)", "mkdocs-section-index", "mkdocstrings[python]"] +docs = ["mdx_gh_links (>=0.2)", "mkdocs (>=1.6)", "mkdocs-gen-files", "mkdocs-literate-nav", "mkdocs-nature (>=0.6)", "mkdocs-section-index", "mkdocstrings[python]"] testing = ["coverage", "pyyaml"] [[package]] @@ -2424,14 +2425,14 @@ files = [ [[package]] name = "marshmallow" -version = "3.25.1" +version = "3.26.1" description = "A lightweight library for converting complex datatypes to and from native Python datatypes." optional = false python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "marshmallow-3.25.1-py3-none-any.whl", hash = "sha256:ec5d00d873ce473b7f2ffcb7104286a376c354cab0c2fa12f5573dab03e87210"}, - {file = "marshmallow-3.25.1.tar.gz", hash = "sha256:f4debda3bb11153d81ac34b0d582bf23053055ee11e791b54b4b35493468040a"}, + {file = "marshmallow-3.26.1-py3-none-any.whl", hash = "sha256:3350409f20a70a7e4e11a27661187b77cdcaeb20abca41c1454fe33636bea09c"}, + {file = "marshmallow-3.26.1.tar.gz", hash = "sha256:e6d8affb6cb61d39d26402096dc0aee12d5a26d490a121f118d2e81dc0719dc6"}, ] [package.dependencies] @@ -2497,100 +2498,100 @@ std-uritemplate = ">=2.0.0" [[package]] name = "microsoft-kiota-authentication-azure" -version = "1.9.1" +version = "1.9.2" description = "Core abstractions for kiota generated libraries in Python" optional = false python-versions = "<4.0,>=3.9" groups = ["main"] files = [ - {file = "microsoft_kiota_authentication_azure-1.9.1-py3-none-any.whl", hash = "sha256:3a3030b01e0cbf007736ec6548ac483742e04ad0d20979b49e293a683f839fc6"}, - {file = "microsoft_kiota_authentication_azure-1.9.1.tar.gz", hash = "sha256:8ba31b1ecf78777128daf3191c7ecd28bfc2d10d0fe80260dd5c07a9ccd5d7f5"}, + {file = "microsoft_kiota_authentication_azure-1.9.2-py3-none-any.whl", hash = "sha256:56840f8b15df8aedfd143fb2deb7cc7fae4ac0bafb1a50546b7313a7b3ab4ca0"}, + {file = "microsoft_kiota_authentication_azure-1.9.2.tar.gz", hash = "sha256:171045f522a93d9340fbddc4cabb218f14f1d9d289e82e535b3d9291986c3d5a"}, ] [package.dependencies] aiohttp = ">=3.8.0" azure-core = ">=1.21.1" -microsoft-kiota-abstractions = ">=1.9.1,<1.10.0" +microsoft-kiota-abstractions = ">=1.9.2,<1.10.0" opentelemetry-api = ">=1.27.0" opentelemetry-sdk = ">=1.27.0" [[package]] name = "microsoft-kiota-http" -version = "1.3.4" -description = "Kiota http request adapter implementation for httpx library" +version = "1.9.2" +description = "Core abstractions for kiota generated libraries in Python" optional = false -python-versions = "*" +python-versions = "<4.0,>=3.9" groups = ["main"] files = [ - {file = "microsoft_kiota_http-1.3.4-py2.py3-none-any.whl", hash = "sha256:fb7eb9222550b671aa5279fd8701c968b41de2133a6367bd213495f6aae9fbf1"}, - {file = "microsoft_kiota_http-1.3.4.tar.gz", hash = "sha256:0ba94a5e982575f5a349b71a87aae2e01ff1722cfc0902247b7ef0a9072c1580"}, + {file = "microsoft_kiota_http-1.9.2-py3-none-any.whl", hash = "sha256:3a2d930a70d0184d9f4848473f929ee892462cae1acfaf33b2d193f1828c76c2"}, + {file = "microsoft_kiota_http-1.9.2.tar.gz", hash = "sha256:2ba3d04a3d1d5d600736eebc1e33533d54d87799ac4fbb92c9cce4a97809af61"}, ] [package.dependencies] -httpx = {version = ">=0.23.0", extras = ["http2"]} -microsoft-kiota_abstractions = ">=1.0.0,<2.0.0" -opentelemetry-api = ">=1.20.0" -opentelemetry-sdk = ">=1.20.0" +httpx = {version = ">=0.25,<1.0.0", extras = ["http2"]} +microsoft-kiota-abstractions = ">=1.9.2,<1.10.0" +opentelemetry-api = ">=1.27.0" +opentelemetry-sdk = ">=1.27.0" [[package]] name = "microsoft-kiota-serialization-form" -version = "1.9.1" +version = "1.9.2" description = "Core abstractions for kiota generated libraries in Python" optional = false python-versions = "<4.0,>=3.9" groups = ["main"] files = [ - {file = "microsoft_kiota_serialization_form-1.9.1-py3-none-any.whl", hash = "sha256:d86c0dc08b51288f2851a265dde729b200998bca1dd1681bbebcb27cd274ba34"}, - {file = "microsoft_kiota_serialization_form-1.9.1.tar.gz", hash = "sha256:58b81eca5e0ad66bcbd6a4b65ba91e6255d3510f4c4f576fb4f5e83ca9a310c3"}, + {file = "microsoft_kiota_serialization_form-1.9.2-py3-none-any.whl", hash = "sha256:7b997efb2c8750b1d4fbc00878ba2a3e6e1df3fcefc8815226c90fcc9c54f218"}, + {file = "microsoft_kiota_serialization_form-1.9.2.tar.gz", hash = "sha256:badfbe65d8ec3369bd58b01022d13ef590edf14babeef94188efe3f4ec24fe41"}, ] [package.dependencies] -microsoft-kiota-abstractions = ">=1.9.1,<1.10.0" +microsoft-kiota-abstractions = ">=1.9.2,<1.10.0" [[package]] name = "microsoft-kiota-serialization-json" -version = "1.9.1" +version = "1.9.2" description = "Core abstractions for kiota generated libraries in Python" optional = false python-versions = "<4.0,>=3.9" groups = ["main"] files = [ - {file = "microsoft_kiota_serialization_json-1.9.1-py3-none-any.whl", hash = "sha256:ab752bf642a77266713bac3942a4c547dde60b917f674a9ab63261490fecf841"}, - {file = "microsoft_kiota_serialization_json-1.9.1.tar.gz", hash = "sha256:0039458b885875daf246f1e8c0296551695e0ec70f3e4689b00b270ce923c0cc"}, + {file = "microsoft_kiota_serialization_json-1.9.2-py3-none-any.whl", hash = "sha256:8f4ecf485607fff3df5ce8fa9b9c957bc7f4bff1658b183703e180af753098e3"}, + {file = "microsoft_kiota_serialization_json-1.9.2.tar.gz", hash = "sha256:19f7beb69c67b2cb77ca96f77824ee78a693929e20237bb5476ea54f69118bf1"}, ] [package.dependencies] -microsoft-kiota-abstractions = ">=1.9.1,<1.10.0" +microsoft-kiota-abstractions = ">=1.9.2,<1.10.0" [[package]] name = "microsoft-kiota-serialization-multipart" -version = "1.9.1" +version = "1.9.2" description = "Core abstractions for kiota generated libraries in Python" optional = false python-versions = "<4.0,>=3.9" groups = ["main"] files = [ - {file = "microsoft_kiota_serialization_multipart-1.9.1-py3-none-any.whl", hash = "sha256:1ee69d8e3b2c0d24431b85fc1628534f97dcafed45dcb6bb3f0143824ce8a665"}, - {file = "microsoft_kiota_serialization_multipart-1.9.1.tar.gz", hash = "sha256:288790a486aad33aac0a7329f05b8851e9be82f50cc9a8f19fe6f267a4f2b183"}, + {file = "microsoft_kiota_serialization_multipart-1.9.2-py3-none-any.whl", hash = "sha256:641ad374046f1c7adff90d110bdc68d77418adb1e479a716f4ffea3647f0ead6"}, + {file = "microsoft_kiota_serialization_multipart-1.9.2.tar.gz", hash = "sha256:b1851409205668d83f5c7a35a8b6fca974b341985b4a92841e95aaec93b7ca0a"}, ] [package.dependencies] -microsoft-kiota-abstractions = ">=1.9.1,<1.10.0" +microsoft-kiota-abstractions = ">=1.9.2,<1.10.0" [[package]] name = "microsoft-kiota-serialization-text" -version = "1.9.1" +version = "1.9.2" description = "Core abstractions for kiota generated libraries in Python" optional = false python-versions = "<4.0,>=3.9" groups = ["main"] files = [ - {file = "microsoft_kiota_serialization_text-1.9.1-py3-none-any.whl", hash = "sha256:021fbfad887f7525f9e1c8bbe225d0aa1b25befe54357ae0f739f47576d946ff"}, - {file = "microsoft_kiota_serialization_text-1.9.1.tar.gz", hash = "sha256:b4b1f61c2388edd704ab33a1792f92f3507db9648d389197a625e152b52743ab"}, + {file = "microsoft_kiota_serialization_text-1.9.2-py3-none-any.whl", hash = "sha256:6e63129ea29eb9b976f4ed56fc6595d204e29fc309958b639299e9f9f4e5edb4"}, + {file = "microsoft_kiota_serialization_text-1.9.2.tar.gz", hash = "sha256:4289508ebac0cefdc4fa21c545051769a9409913972355ccda9116b647f978f2"}, ] [package.dependencies] -microsoft-kiota-abstractions = ">=1.9.1,<1.10.0" +microsoft-kiota-abstractions = ">=1.9.2,<1.10.0" [[package]] name = "mkdocs" @@ -2799,18 +2800,18 @@ tests = ["pytest (>=4.6)"] [[package]] name = "msal" -version = "1.31.1" +version = "1.32.0" description = "The Microsoft Authentication Library (MSAL) for Python library enables your app to access the Microsoft Cloud by supporting authentication of users with Microsoft Azure Active Directory accounts (AAD) and Microsoft Accounts (MSA) using industry standard OAuth2 and OpenID Connect." optional = false python-versions = ">=3.7" groups = ["main"] files = [ - {file = "msal-1.31.1-py3-none-any.whl", hash = "sha256:29d9882de247e96db01386496d59f29035e5e841bcac892e6d7bf4390bf6bd17"}, - {file = "msal-1.31.1.tar.gz", hash = "sha256:11b5e6a3f802ffd3a72107203e20c4eac6ef53401961b880af2835b723d80578"}, + {file = "msal-1.32.0-py3-none-any.whl", hash = "sha256:9dbac5384a10bbbf4dae5c7ea0d707d14e087b92c5aa4954b3feaa2d1aa0bcb7"}, + {file = "msal-1.32.0.tar.gz", hash = "sha256:5445fe3af1da6be484991a7ab32eaa82461dc2347de105b76af92c610c3335c2"}, ] [package.dependencies] -cryptography = ">=2.5,<46" +cryptography = ">=2.5,<47" PyJWT = {version = ">=1.0.0,<3", extras = ["crypto"]} requests = ">=2.0.0,<3" @@ -2819,63 +2820,62 @@ broker = ["pymsalruntime (>=0.14,<0.18) ; python_version >= \"3.6\" and platform [[package]] name = "msal-extensions" -version = "1.2.0" +version = "1.3.1" description = "Microsoft Authentication Library extensions (MSAL EX) provides a persistence API that can save your data on disk, encrypted on Windows, macOS and Linux. Concurrent data access will be coordinated by a file lock mechanism." optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" groups = ["main"] files = [ - {file = "msal_extensions-1.2.0-py3-none-any.whl", hash = "sha256:cf5ba83a2113fa6dc011a254a72f1c223c88d7dfad74cc30617c4679a417704d"}, - {file = "msal_extensions-1.2.0.tar.gz", hash = "sha256:6f41b320bfd2933d631a215c91ca0dd3e67d84bd1a2f50ce917d5874ec646bef"}, + {file = "msal_extensions-1.3.1-py3-none-any.whl", hash = "sha256:96d3de4d034504e969ac5e85bae8106c8373b5c6568e4c8fa7af2eca9dbe6bca"}, + {file = "msal_extensions-1.3.1.tar.gz", hash = "sha256:c5b0fd10f65ef62b5f1d62f4251d51cbcaf003fcedae8c91b040a488614be1a4"}, ] [package.dependencies] msal = ">=1.29,<2" -portalocker = ">=1.4,<3" + +[package.extras] +portalocker = ["portalocker (>=1.4,<4)"] [[package]] name = "msgraph-core" -version = "1.2.0" +version = "1.3.3" description = "Core component of the Microsoft Graph Python SDK" optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "msgraph_core-1.2.0-py3-none-any.whl", hash = "sha256:4ce14bbe743c0f2dd8b53c7fcd338fc14081e0df6b14021f0d0e4bb63cd5a840"}, - {file = "msgraph_core-1.2.0.tar.gz", hash = "sha256:a4e42f692e664c60d63359e610bbf990f57b42d8080417261ff7042bbd59c98b"}, + {file = "msgraph_core-1.3.3-py3-none-any.whl", hash = "sha256:9dbbc0c88e174c1d5da1c17d286965d6b26ebaf24996c7af64a39e2069006cf6"}, + {file = "msgraph_core-1.3.3.tar.gz", hash = "sha256:a3226b08b4cf9b6dbb16b868be21d5f82d8ee514ae8e46d9f0cad896159ef8d3"}, ] [package.dependencies] httpx = {version = ">=0.23.0", extras = ["http2"]} -microsoft-kiota-abstractions = ">=1.0.0,<2.0.0" -microsoft-kiota-authentication-azure = ">=1.0.0,<2.0.0" -microsoft-kiota-http = ">=1.0.0,<2.0.0" +microsoft-kiota-abstractions = ">=1.8.0,<2.0.0" +microsoft-kiota-authentication-azure = ">=1.8.0,<2.0.0" +microsoft-kiota-http = ">=1.8.0,<2.0.0" [package.extras] dev = ["bumpver", "isort", "mypy", "pylint", "pytest", "yapf"] [[package]] name = "msgraph-sdk" -version = "1.18.0" +version = "1.23.0" description = "The Microsoft Graph Python SDK" optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "msgraph_sdk-1.18.0-py3-none-any.whl", hash = "sha256:f09b015bb9d7690bc6f30c9a28f9a414107aaf06be4952c27b3653dcdf33f2a3"}, - {file = "msgraph_sdk-1.18.0.tar.gz", hash = "sha256:ef49166ada7b459b5a843ceb3d253c1ab99d8987ebf3112147eb6cbcaa101793"}, + {file = "msgraph_sdk-1.23.0-py3-none-any.whl", hash = "sha256:58e0047b4ca59fd82022c02cd73fec0170a3d84f3b76721e3db2a0314df9a58a"}, + {file = "msgraph_sdk-1.23.0.tar.gz", hash = "sha256:6dd1ba9a46f5f0ce8599fd9610133adbd9d1493941438b5d3632fce9e55ed607"}, ] [package.dependencies] azure-identity = ">=1.12.0" -microsoft-kiota-abstractions = ">=1.3.0,<2.0.0" -microsoft-kiota-authentication-azure = ">=1.0.0,<2.0.0" -microsoft-kiota-http = ">=1.0.0,<2.0.0" -microsoft-kiota-serialization-form = ">=0.1.0" -microsoft-kiota-serialization-json = ">=1.3.0,<2.0.0" -microsoft-kiota-serialization-multipart = ">=0.1.0" -microsoft-kiota-serialization-text = ">=1.0.0,<2.0.0" -msgraph_core = ">=1.0.0" +microsoft-kiota-serialization-form = ">=1.8.0,<2.0.0" +microsoft-kiota-serialization-json = ">=1.8.0,<2.0.0" +microsoft-kiota-serialization-multipart = ">=1.8.0,<2.0.0" +microsoft-kiota-serialization-text = ">=1.8.0,<2.0.0" +msgraph_core = ">=1.3.1" [package.extras] dev = ["bumpver", "isort", "mypy", "pylint", "pytest", "yapf"] @@ -2904,104 +2904,116 @@ async = ["aiodns ; python_version >= \"3.5\"", "aiohttp (>=3.0) ; python_version [[package]] name = "multidict" -version = "6.1.0" +version = "6.4.3" description = "multidict implementation" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["main"] files = [ - {file = "multidict-6.1.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:3380252550e372e8511d49481bd836264c009adb826b23fefcc5dd3c69692f60"}, - {file = "multidict-6.1.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:99f826cbf970077383d7de805c0681799491cb939c25450b9b5b3ced03ca99f1"}, - {file = "multidict-6.1.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a114d03b938376557927ab23f1e950827c3b893ccb94b62fd95d430fd0e5cf53"}, - {file = "multidict-6.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b1c416351ee6271b2f49b56ad7f308072f6f44b37118d69c2cad94f3fa8a40d5"}, - {file = "multidict-6.1.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6b5d83030255983181005e6cfbac1617ce9746b219bc2aad52201ad121226581"}, - {file = "multidict-6.1.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3e97b5e938051226dc025ec80980c285b053ffb1e25a3db2a3aa3bc046bf7f56"}, - {file = "multidict-6.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d618649d4e70ac6efcbba75be98b26ef5078faad23592f9b51ca492953012429"}, - {file = "multidict-6.1.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:10524ebd769727ac77ef2278390fb0068d83f3acb7773792a5080f2b0abf7748"}, - {file = "multidict-6.1.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:ff3827aef427c89a25cc96ded1759271a93603aba9fb977a6d264648ebf989db"}, - {file = "multidict-6.1.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:06809f4f0f7ab7ea2cabf9caca7d79c22c0758b58a71f9d32943ae13c7ace056"}, - {file = "multidict-6.1.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:f179dee3b863ab1c59580ff60f9d99f632f34ccb38bf67a33ec6b3ecadd0fd76"}, - {file = "multidict-6.1.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:aaed8b0562be4a0876ee3b6946f6869b7bcdb571a5d1496683505944e268b160"}, - {file = "multidict-6.1.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:3c8b88a2ccf5493b6c8da9076fb151ba106960a2df90c2633f342f120751a9e7"}, - {file = "multidict-6.1.0-cp310-cp310-win32.whl", hash = "sha256:4a9cb68166a34117d6646c0023c7b759bf197bee5ad4272f420a0141d7eb03a0"}, - {file = "multidict-6.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:20b9b5fbe0b88d0bdef2012ef7dee867f874b72528cf1d08f1d59b0e3850129d"}, - {file = "multidict-6.1.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:3efe2c2cb5763f2f1b275ad2bf7a287d3f7ebbef35648a9726e3b69284a4f3d6"}, - {file = "multidict-6.1.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c7053d3b0353a8b9de430a4f4b4268ac9a4fb3481af37dfe49825bf45ca24156"}, - {file = "multidict-6.1.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:27e5fc84ccef8dfaabb09d82b7d179c7cf1a3fbc8a966f8274fcb4ab2eb4cadb"}, - {file = "multidict-6.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0e2b90b43e696f25c62656389d32236e049568b39320e2735d51f08fd362761b"}, - {file = "multidict-6.1.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d83a047959d38a7ff552ff94be767b7fd79b831ad1cd9920662db05fec24fe72"}, - {file = "multidict-6.1.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d1a9dd711d0877a1ece3d2e4fea11a8e75741ca21954c919406b44e7cf971304"}, - {file = "multidict-6.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ec2abea24d98246b94913b76a125e855eb5c434f7c46546046372fe60f666351"}, - {file = "multidict-6.1.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4867cafcbc6585e4b678876c489b9273b13e9fff9f6d6d66add5e15d11d926cb"}, - {file = "multidict-6.1.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:5b48204e8d955c47c55b72779802b219a39acc3ee3d0116d5080c388970b76e3"}, - {file = "multidict-6.1.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:d8fff389528cad1618fb4b26b95550327495462cd745d879a8c7c2115248e399"}, - {file = "multidict-6.1.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:a7a9541cd308eed5e30318430a9c74d2132e9a8cb46b901326272d780bf2d423"}, - {file = "multidict-6.1.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:da1758c76f50c39a2efd5e9859ce7d776317eb1dd34317c8152ac9251fc574a3"}, - {file = "multidict-6.1.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:c943a53e9186688b45b323602298ab727d8865d8c9ee0b17f8d62d14b56f0753"}, - {file = "multidict-6.1.0-cp311-cp311-win32.whl", hash = "sha256:90f8717cb649eea3504091e640a1b8568faad18bd4b9fcd692853a04475a4b80"}, - {file = "multidict-6.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:82176036e65644a6cc5bd619f65f6f19781e8ec2e5330f51aa9ada7504cc1926"}, - {file = "multidict-6.1.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:b04772ed465fa3cc947db808fa306d79b43e896beb677a56fb2347ca1a49c1fa"}, - {file = "multidict-6.1.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:6180c0ae073bddeb5a97a38c03f30c233e0a4d39cd86166251617d1bbd0af436"}, - {file = "multidict-6.1.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:071120490b47aa997cca00666923a83f02c7fbb44f71cf7f136df753f7fa8761"}, - {file = "multidict-6.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50b3a2710631848991d0bf7de077502e8994c804bb805aeb2925a981de58ec2e"}, - {file = "multidict-6.1.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b58c621844d55e71c1b7f7c498ce5aa6985d743a1a59034c57a905b3f153c1ef"}, - {file = "multidict-6.1.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:55b6d90641869892caa9ca42ff913f7ff1c5ece06474fbd32fb2cf6834726c95"}, - {file = "multidict-6.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4b820514bfc0b98a30e3d85462084779900347e4d49267f747ff54060cc33925"}, - {file = "multidict-6.1.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:10a9b09aba0c5b48c53761b7c720aaaf7cf236d5fe394cd399c7ba662d5f9966"}, - {file = "multidict-6.1.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:1e16bf3e5fc9f44632affb159d30a437bfe286ce9e02754759be5536b169b305"}, - {file = "multidict-6.1.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:76f364861c3bfc98cbbcbd402d83454ed9e01a5224bb3a28bf70002a230f73e2"}, - {file = "multidict-6.1.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:820c661588bd01a0aa62a1283f20d2be4281b086f80dad9e955e690c75fb54a2"}, - {file = "multidict-6.1.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:0e5f362e895bc5b9e67fe6e4ded2492d8124bdf817827f33c5b46c2fe3ffaca6"}, - {file = "multidict-6.1.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:3ec660d19bbc671e3a6443325f07263be452c453ac9e512f5eb935e7d4ac28b3"}, - {file = "multidict-6.1.0-cp312-cp312-win32.whl", hash = "sha256:58130ecf8f7b8112cdb841486404f1282b9c86ccb30d3519faf301b2e5659133"}, - {file = "multidict-6.1.0-cp312-cp312-win_amd64.whl", hash = "sha256:188215fc0aafb8e03341995e7c4797860181562380f81ed0a87ff455b70bf1f1"}, - {file = "multidict-6.1.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:d569388c381b24671589335a3be6e1d45546c2988c2ebe30fdcada8457a31008"}, - {file = "multidict-6.1.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:052e10d2d37810b99cc170b785945421141bf7bb7d2f8799d431e7db229c385f"}, - {file = "multidict-6.1.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f90c822a402cb865e396a504f9fc8173ef34212a342d92e362ca498cad308e28"}, - {file = "multidict-6.1.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b225d95519a5bf73860323e633a664b0d85ad3d5bede6d30d95b35d4dfe8805b"}, - {file = "multidict-6.1.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:23bfd518810af7de1116313ebd9092cb9aa629beb12f6ed631ad53356ed6b86c"}, - {file = "multidict-6.1.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5c09fcfdccdd0b57867577b719c69e347a436b86cd83747f179dbf0cc0d4c1f3"}, - {file = "multidict-6.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bf6bea52ec97e95560af5ae576bdac3aa3aae0b6758c6efa115236d9e07dae44"}, - {file = "multidict-6.1.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:57feec87371dbb3520da6192213c7d6fc892d5589a93db548331954de8248fd2"}, - {file = "multidict-6.1.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:0c3f390dc53279cbc8ba976e5f8035eab997829066756d811616b652b00a23a3"}, - {file = "multidict-6.1.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:59bfeae4b25ec05b34f1956eaa1cb38032282cd4dfabc5056d0a1ec4d696d3aa"}, - {file = "multidict-6.1.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:b2f59caeaf7632cc633b5cf6fc449372b83bbdf0da4ae04d5be36118e46cc0aa"}, - {file = "multidict-6.1.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:37bb93b2178e02b7b618893990941900fd25b6b9ac0fa49931a40aecdf083fe4"}, - {file = "multidict-6.1.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4e9f48f58c2c523d5a06faea47866cd35b32655c46b443f163d08c6d0ddb17d6"}, - {file = "multidict-6.1.0-cp313-cp313-win32.whl", hash = "sha256:3a37ffb35399029b45c6cc33640a92bef403c9fd388acce75cdc88f58bd19a81"}, - {file = "multidict-6.1.0-cp313-cp313-win_amd64.whl", hash = "sha256:e9aa71e15d9d9beaad2c6b9319edcdc0a49a43ef5c0a4c8265ca9ee7d6c67774"}, - {file = "multidict-6.1.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:db7457bac39421addd0c8449933ac32d8042aae84a14911a757ae6ca3eef1392"}, - {file = "multidict-6.1.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d094ddec350a2fb899fec68d8353c78233debde9b7d8b4beeafa70825f1c281a"}, - {file = "multidict-6.1.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:5845c1fd4866bb5dd3125d89b90e57ed3138241540897de748cdf19de8a2fca2"}, - {file = "multidict-6.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9079dfc6a70abe341f521f78405b8949f96db48da98aeb43f9907f342f627cdc"}, - {file = "multidict-6.1.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3914f5aaa0f36d5d60e8ece6a308ee1c9784cd75ec8151062614657a114c4478"}, - {file = "multidict-6.1.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c08be4f460903e5a9d0f76818db3250f12e9c344e79314d1d570fc69d7f4eae4"}, - {file = "multidict-6.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d093be959277cb7dee84b801eb1af388b6ad3ca6a6b6bf1ed7585895789d027d"}, - {file = "multidict-6.1.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3702ea6872c5a2a4eeefa6ffd36b042e9773f05b1f37ae3ef7264b1163c2dcf6"}, - {file = "multidict-6.1.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:2090f6a85cafc5b2db085124d752757c9d251548cedabe9bd31afe6363e0aff2"}, - {file = "multidict-6.1.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:f67f217af4b1ff66c68a87318012de788dd95fcfeb24cc889011f4e1c7454dfd"}, - {file = "multidict-6.1.0-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:189f652a87e876098bbc67b4da1049afb5f5dfbaa310dd67c594b01c10388db6"}, - {file = "multidict-6.1.0-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:6bb5992037f7a9eff7991ebe4273ea7f51f1c1c511e6a2ce511d0e7bdb754492"}, - {file = "multidict-6.1.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:ac10f4c2b9e770c4e393876e35a7046879d195cd123b4f116d299d442b335bcd"}, - {file = "multidict-6.1.0-cp38-cp38-win32.whl", hash = "sha256:e27bbb6d14416713a8bd7aaa1313c0fc8d44ee48d74497a0ff4c3a1b6ccb5167"}, - {file = "multidict-6.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:22f3105d4fb15c8f57ff3959a58fcab6ce36814486500cd7485651230ad4d4ef"}, - {file = "multidict-6.1.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:4e18b656c5e844539d506a0a06432274d7bd52a7487e6828c63a63d69185626c"}, - {file = "multidict-6.1.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a185f876e69897a6f3325c3f19f26a297fa058c5e456bfcff8015e9a27e83ae1"}, - {file = "multidict-6.1.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ab7c4ceb38d91570a650dba194e1ca87c2b543488fe9309b4212694174fd539c"}, - {file = "multidict-6.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e617fb6b0b6953fffd762669610c1c4ffd05632c138d61ac7e14ad187870669c"}, - {file = "multidict-6.1.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:16e5f4bf4e603eb1fdd5d8180f1a25f30056f22e55ce51fb3d6ad4ab29f7d96f"}, - {file = "multidict-6.1.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f4c035da3f544b1882bac24115f3e2e8760f10a0107614fc9839fd232200b875"}, - {file = "multidict-6.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:957cf8e4b6e123a9eea554fa7ebc85674674b713551de587eb318a2df3e00255"}, - {file = "multidict-6.1.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:483a6aea59cb89904e1ceabd2b47368b5600fb7de78a6e4a2c2987b2d256cf30"}, - {file = "multidict-6.1.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:87701f25a2352e5bf7454caa64757642734da9f6b11384c1f9d1a8e699758057"}, - {file = "multidict-6.1.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:682b987361e5fd7a139ed565e30d81fd81e9629acc7d925a205366877d8c8657"}, - {file = "multidict-6.1.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:ce2186a7df133a9c895dea3331ddc5ddad42cdd0d1ea2f0a51e5d161e4762f28"}, - {file = "multidict-6.1.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:9f636b730f7e8cb19feb87094949ba54ee5357440b9658b2a32a5ce4bce53972"}, - {file = "multidict-6.1.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:73eae06aa53af2ea5270cc066dcaf02cc60d2994bbb2c4ef5764949257d10f43"}, - {file = "multidict-6.1.0-cp39-cp39-win32.whl", hash = "sha256:1ca0083e80e791cffc6efce7660ad24af66c8d4079d2a750b29001b53ff59ada"}, - {file = "multidict-6.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:aa466da5b15ccea564bdab9c89175c762bc12825f4659c11227f515cee76fa4a"}, - {file = "multidict-6.1.0-py3-none-any.whl", hash = "sha256:48e171e52d1c4d33888e529b999e5900356b9ae588c2f09a52dcefb158b27506"}, - {file = "multidict-6.1.0.tar.gz", hash = "sha256:22ae2ebf9b0c69d206c003e2f6a914ea33f0a932d4aa16f236afc049d9958f4a"}, + {file = "multidict-6.4.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:32a998bd8a64ca48616eac5a8c1cc4fa38fb244a3facf2eeb14abe186e0f6cc5"}, + {file = "multidict-6.4.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:a54ec568f1fc7f3c313c2f3b16e5db346bf3660e1309746e7fccbbfded856188"}, + {file = "multidict-6.4.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a7be07e5df178430621c716a63151165684d3e9958f2bbfcb644246162007ab7"}, + {file = "multidict-6.4.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b128dbf1c939674a50dd0b28f12c244d90e5015e751a4f339a96c54f7275e291"}, + {file = "multidict-6.4.3-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:b9cb19dfd83d35b6ff24a4022376ea6e45a2beba8ef3f0836b8a4b288b6ad685"}, + {file = "multidict-6.4.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3cf62f8e447ea2c1395afa289b332e49e13d07435369b6f4e41f887db65b40bf"}, + {file = "multidict-6.4.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:909f7d43ff8f13d1adccb6a397094adc369d4da794407f8dd592c51cf0eae4b1"}, + {file = "multidict-6.4.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0bb8f8302fbc7122033df959e25777b0b7659b1fd6bcb9cb6bed76b5de67afef"}, + {file = "multidict-6.4.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:224b79471b4f21169ea25ebc37ed6f058040c578e50ade532e2066562597b8a9"}, + {file = "multidict-6.4.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:a7bd27f7ab3204f16967a6f899b3e8e9eb3362c0ab91f2ee659e0345445e0078"}, + {file = "multidict-6.4.3-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:99592bd3162e9c664671fd14e578a33bfdba487ea64bcb41d281286d3c870ad7"}, + {file = "multidict-6.4.3-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:a62d78a1c9072949018cdb05d3c533924ef8ac9bcb06cbf96f6d14772c5cd451"}, + {file = "multidict-6.4.3-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:3ccdde001578347e877ca4f629450973c510e88e8865d5aefbcb89b852ccc666"}, + {file = "multidict-6.4.3-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:eccb67b0e78aa2e38a04c5ecc13bab325a43e5159a181a9d1a6723db913cbb3c"}, + {file = "multidict-6.4.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:8b6fcf6054fc4114a27aa865f8840ef3d675f9316e81868e0ad5866184a6cba5"}, + {file = "multidict-6.4.3-cp310-cp310-win32.whl", hash = "sha256:f92c7f62d59373cd93bc9969d2da9b4b21f78283b1379ba012f7ee8127b3152e"}, + {file = "multidict-6.4.3-cp310-cp310-win_amd64.whl", hash = "sha256:b57e28dbc031d13916b946719f213c494a517b442d7b48b29443e79610acd887"}, + {file = "multidict-6.4.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:f6f19170197cc29baccd33ccc5b5d6a331058796485857cf34f7635aa25fb0cd"}, + {file = "multidict-6.4.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f2882bf27037eb687e49591690e5d491e677272964f9ec7bc2abbe09108bdfb8"}, + {file = "multidict-6.4.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:fbf226ac85f7d6b6b9ba77db4ec0704fde88463dc17717aec78ec3c8546c70ad"}, + {file = "multidict-6.4.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2e329114f82ad4b9dd291bef614ea8971ec119ecd0f54795109976de75c9a852"}, + {file = "multidict-6.4.3-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:1f4e0334d7a555c63f5c8952c57ab6f1c7b4f8c7f3442df689fc9f03df315c08"}, + {file = "multidict-6.4.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:740915eb776617b57142ce0bb13b7596933496e2f798d3d15a20614adf30d229"}, + {file = "multidict-6.4.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:255dac25134d2b141c944b59a0d2f7211ca12a6d4779f7586a98b4b03ea80508"}, + {file = "multidict-6.4.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d4e8535bd4d741039b5aad4285ecd9b902ef9e224711f0b6afda6e38d7ac02c7"}, + {file = "multidict-6.4.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:30c433a33be000dd968f5750722eaa0991037be0be4a9d453eba121774985bc8"}, + {file = "multidict-6.4.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:4eb33b0bdc50acd538f45041f5f19945a1f32b909b76d7b117c0c25d8063df56"}, + {file = "multidict-6.4.3-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:75482f43465edefd8a5d72724887ccdcd0c83778ded8f0cb1e0594bf71736cc0"}, + {file = "multidict-6.4.3-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:ce5b3082e86aee80b3925ab4928198450d8e5b6466e11501fe03ad2191c6d777"}, + {file = "multidict-6.4.3-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:e413152e3212c4d39f82cf83c6f91be44bec9ddea950ce17af87fbf4e32ca6b2"}, + {file = "multidict-6.4.3-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:8aac2eeff69b71f229a405c0a4b61b54bade8e10163bc7b44fcd257949620618"}, + {file = "multidict-6.4.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ab583ac203af1d09034be41458feeab7863c0635c650a16f15771e1386abf2d7"}, + {file = "multidict-6.4.3-cp311-cp311-win32.whl", hash = "sha256:1b2019317726f41e81154df636a897de1bfe9228c3724a433894e44cd2512378"}, + {file = "multidict-6.4.3-cp311-cp311-win_amd64.whl", hash = "sha256:43173924fa93c7486402217fab99b60baf78d33806af299c56133a3755f69589"}, + {file = "multidict-6.4.3-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:1f1c2f58f08b36f8475f3ec6f5aeb95270921d418bf18f90dffd6be5c7b0e676"}, + {file = "multidict-6.4.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:26ae9ad364fc61b936fb7bf4c9d8bd53f3a5b4417142cd0be5c509d6f767e2f1"}, + {file = "multidict-6.4.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:659318c6c8a85f6ecfc06b4e57529e5a78dfdd697260cc81f683492ad7e9435a"}, + {file = "multidict-6.4.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e1eb72c741fd24d5a28242ce72bb61bc91f8451877131fa3fe930edb195f7054"}, + {file = "multidict-6.4.3-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3cd06d88cb7398252284ee75c8db8e680aa0d321451132d0dba12bc995f0adcc"}, + {file = "multidict-6.4.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4543d8dc6470a82fde92b035a92529317191ce993533c3c0c68f56811164ed07"}, + {file = "multidict-6.4.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:30a3ebdc068c27e9d6081fca0e2c33fdf132ecea703a72ea216b81a66860adde"}, + {file = "multidict-6.4.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b038f10e23f277153f86f95c777ba1958bcd5993194fda26a1d06fae98b2f00c"}, + {file = "multidict-6.4.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c605a2b2dc14282b580454b9b5d14ebe0668381a3a26d0ac39daa0ca115eb2ae"}, + {file = "multidict-6.4.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8bd2b875f4ca2bb527fe23e318ddd509b7df163407b0fb717df229041c6df5d3"}, + {file = "multidict-6.4.3-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:c2e98c840c9c8e65c0e04b40c6c5066c8632678cd50c8721fdbcd2e09f21a507"}, + {file = "multidict-6.4.3-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:66eb80dd0ab36dbd559635e62fba3083a48a252633164857a1d1684f14326427"}, + {file = "multidict-6.4.3-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c23831bdee0a2a3cf21be057b5e5326292f60472fb6c6f86392bbf0de70ba731"}, + {file = "multidict-6.4.3-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:1535cec6443bfd80d028052e9d17ba6ff8a5a3534c51d285ba56c18af97e9713"}, + {file = "multidict-6.4.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:3b73e7227681f85d19dec46e5b881827cd354aabe46049e1a61d2f9aaa4e285a"}, + {file = "multidict-6.4.3-cp312-cp312-win32.whl", hash = "sha256:8eac0c49df91b88bf91f818e0a24c1c46f3622978e2c27035bfdca98e0e18124"}, + {file = "multidict-6.4.3-cp312-cp312-win_amd64.whl", hash = "sha256:11990b5c757d956cd1db7cb140be50a63216af32cd6506329c2c59d732d802db"}, + {file = "multidict-6.4.3-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:7a76534263d03ae0cfa721fea40fd2b5b9d17a6f85e98025931d41dc49504474"}, + {file = "multidict-6.4.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:805031c2f599eee62ac579843555ed1ce389ae00c7e9f74c2a1b45e0564a88dd"}, + {file = "multidict-6.4.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:c56c179839d5dcf51d565132185409d1d5dd8e614ba501eb79023a6cab25576b"}, + {file = "multidict-6.4.3-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9c64f4ddb3886dd8ab71b68a7431ad4aa01a8fa5be5b11543b29674f29ca0ba3"}, + {file = "multidict-6.4.3-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3002a856367c0b41cad6784f5b8d3ab008eda194ed7864aaa58f65312e2abcac"}, + {file = "multidict-6.4.3-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3d75e621e7d887d539d6e1d789f0c64271c250276c333480a9e1de089611f790"}, + {file = "multidict-6.4.3-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:995015cf4a3c0d72cbf453b10a999b92c5629eaf3a0c3e1efb4b5c1f602253bb"}, + {file = "multidict-6.4.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a2b0fabae7939d09d7d16a711468c385272fa1b9b7fb0d37e51143585d8e72e0"}, + {file = "multidict-6.4.3-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:61ed4d82f8a1e67eb9eb04f8587970d78fe7cddb4e4d6230b77eda23d27938f9"}, + {file = "multidict-6.4.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:062428944a8dc69df9fdc5d5fc6279421e5f9c75a9ee3f586f274ba7b05ab3c8"}, + {file = "multidict-6.4.3-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:b90e27b4674e6c405ad6c64e515a505c6d113b832df52fdacb6b1ffd1fa9a1d1"}, + {file = "multidict-6.4.3-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:7d50d4abf6729921e9613d98344b74241572b751c6b37feed75fb0c37bd5a817"}, + {file = "multidict-6.4.3-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:43fe10524fb0a0514be3954be53258e61d87341008ce4914f8e8b92bee6f875d"}, + {file = "multidict-6.4.3-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:236966ca6c472ea4e2d3f02f6673ebfd36ba3f23159c323f5a496869bc8e47c9"}, + {file = "multidict-6.4.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:422a5ec315018e606473ba1f5431e064cf8b2a7468019233dcf8082fabad64c8"}, + {file = "multidict-6.4.3-cp313-cp313-win32.whl", hash = "sha256:f901a5aace8e8c25d78960dcc24c870c8d356660d3b49b93a78bf38eb682aac3"}, + {file = "multidict-6.4.3-cp313-cp313-win_amd64.whl", hash = "sha256:1c152c49e42277bc9a2f7b78bd5fa10b13e88d1b0328221e7aef89d5c60a99a5"}, + {file = "multidict-6.4.3-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:be8751869e28b9c0d368d94f5afcb4234db66fe8496144547b4b6d6a0645cfc6"}, + {file = "multidict-6.4.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:0d4b31f8a68dccbcd2c0ea04f0e014f1defc6b78f0eb8b35f2265e8716a6df0c"}, + {file = "multidict-6.4.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:032efeab3049e37eef2ff91271884303becc9e54d740b492a93b7e7266e23756"}, + {file = "multidict-6.4.3-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9e78006af1a7c8a8007e4f56629d7252668344442f66982368ac06522445e375"}, + {file = "multidict-6.4.3-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:daeac9dd30cda8703c417e4fddccd7c4dc0c73421a0b54a7da2713be125846be"}, + {file = "multidict-6.4.3-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1f6f90700881438953eae443a9c6f8a509808bc3b185246992c4233ccee37fea"}, + {file = "multidict-6.4.3-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f84627997008390dd15762128dcf73c3365f4ec0106739cde6c20a07ed198ec8"}, + {file = "multidict-6.4.3-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3307b48cd156153b117c0ea54890a3bdbf858a5b296ddd40dc3852e5f16e9b02"}, + {file = "multidict-6.4.3-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ead46b0fa1dcf5af503a46e9f1c2e80b5d95c6011526352fa5f42ea201526124"}, + {file = "multidict-6.4.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:1748cb2743bedc339d63eb1bca314061568793acd603a6e37b09a326334c9f44"}, + {file = "multidict-6.4.3-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:acc9fa606f76fc111b4569348cc23a771cb52c61516dcc6bcef46d612edb483b"}, + {file = "multidict-6.4.3-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:31469d5832b5885adeb70982e531ce86f8c992334edd2f2254a10fa3182ac504"}, + {file = "multidict-6.4.3-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:ba46b51b6e51b4ef7bfb84b82f5db0dc5e300fb222a8a13b8cd4111898a869cf"}, + {file = "multidict-6.4.3-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:389cfefb599edf3fcfd5f64c0410da686f90f5f5e2c4d84e14f6797a5a337af4"}, + {file = "multidict-6.4.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:64bc2bbc5fba7b9db5c2c8d750824f41c6994e3882e6d73c903c2afa78d091e4"}, + {file = "multidict-6.4.3-cp313-cp313t-win32.whl", hash = "sha256:0ecdc12ea44bab2807d6b4a7e5eef25109ab1c82a8240d86d3c1fc9f3b72efd5"}, + {file = "multidict-6.4.3-cp313-cp313t-win_amd64.whl", hash = "sha256:7146a8742ea71b5d7d955bffcef58a9e6e04efba704b52a460134fefd10a8208"}, + {file = "multidict-6.4.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:5427a2679e95a642b7f8b0f761e660c845c8e6fe3141cddd6b62005bd133fc21"}, + {file = "multidict-6.4.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:24a8caa26521b9ad09732972927d7b45b66453e6ebd91a3c6a46d811eeb7349b"}, + {file = "multidict-6.4.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:6b5a272bc7c36a2cd1b56ddc6bff02e9ce499f9f14ee4a45c45434ef083f2459"}, + {file = "multidict-6.4.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:edf74dc5e212b8c75165b435c43eb0d5e81b6b300a938a4eb82827119115e840"}, + {file = "multidict-6.4.3-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:9f35de41aec4b323c71f54b0ca461ebf694fb48bec62f65221f52e0017955b39"}, + {file = "multidict-6.4.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ae93e0ff43b6f6892999af64097b18561691ffd835e21a8348a441e256592e1f"}, + {file = "multidict-6.4.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5e3929269e9d7eff905d6971d8b8c85e7dbc72c18fb99c8eae6fe0a152f2e343"}, + {file = "multidict-6.4.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fb6214fe1750adc2a1b801a199d64b5a67671bf76ebf24c730b157846d0e90d2"}, + {file = "multidict-6.4.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6d79cf5c0c6284e90f72123f4a3e4add52d6c6ebb4a9054e88df15b8d08444c6"}, + {file = "multidict-6.4.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:2427370f4a255262928cd14533a70d9738dfacadb7563bc3b7f704cc2360fc4e"}, + {file = "multidict-6.4.3-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:fbd8d737867912b6c5f99f56782b8cb81f978a97b4437a1c476de90a3e41c9a1"}, + {file = "multidict-6.4.3-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:0ee1bf613c448997f73fc4efb4ecebebb1c02268028dd4f11f011f02300cf1e8"}, + {file = "multidict-6.4.3-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:578568c4ba5f2b8abd956baf8b23790dbfdc953e87d5b110bce343b4a54fc9e7"}, + {file = "multidict-6.4.3-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:a059ad6b80de5b84b9fa02a39400319e62edd39d210b4e4f8c4f1243bdac4752"}, + {file = "multidict-6.4.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:dd53893675b729a965088aaadd6a1f326a72b83742b056c1065bdd2e2a42b4df"}, + {file = "multidict-6.4.3-cp39-cp39-win32.whl", hash = "sha256:abcfed2c4c139f25c2355e180bcc077a7cae91eefbb8b3927bb3f836c9586f1f"}, + {file = "multidict-6.4.3-cp39-cp39-win_amd64.whl", hash = "sha256:b1b389ae17296dd739015d5ddb222ee99fd66adeae910de21ac950e00979d897"}, + {file = "multidict-6.4.3-py3-none-any.whl", hash = "sha256:59fe01ee8e2a1e8ceb3f6dbb216b09c8d9f4ef1c22c4fc825d045a147fa2ebc9"}, + {file = "multidict-6.4.3.tar.gz", hash = "sha256:3ada0b058c9f213c5f95ba301f922d402ac234f1111a7d8fd70f1b99f3c281ec"}, ] [package.dependencies] @@ -3025,16 +3037,40 @@ docs = ["sphinx (>=8,<9)", "sphinx-autobuild"] [[package]] name = "mypy-extensions" -version = "1.0.0" +version = "1.1.0" description = "Type system extensions for programs checked with the mypy type checker." optional = false -python-versions = ">=3.5" +python-versions = ">=3.8" groups = ["dev"] files = [ - {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"}, - {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, + {file = "mypy_extensions-1.1.0-py3-none-any.whl", hash = "sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505"}, + {file = "mypy_extensions-1.1.0.tar.gz", hash = "sha256:52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558"}, ] +[[package]] +name = "narwhals" +version = "1.35.0" +description = "Extremely lightweight compatibility layer between dataframe libraries" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "narwhals-1.35.0-py3-none-any.whl", hash = "sha256:7562af132fa3f8aaaf34dc96d7ec95bdca29d1c795e8fcf14e01edf1d32122bc"}, + {file = "narwhals-1.35.0.tar.gz", hash = "sha256:07477d18487fbc940243b69818a177ed7119b737910a8a254fb67688b48a7c96"}, +] + +[package.extras] +cudf = ["cudf (>=24.10.0)"] +dask = ["dask[dataframe] (>=2024.8)"] +duckdb = ["duckdb (>=1.0)"] +ibis = ["ibis-framework (>=6.0.0)", "packaging", "pyarrow-hotfix", "rich"] +modin = ["modin"] +pandas = ["pandas (>=0.25.3)"] +polars = ["polars (>=0.20.3)"] +pyarrow = ["pyarrow (>=11.0.0)"] +pyspark = ["pyspark (>=3.5.0)"] +sqlframe = ["sqlframe (>=3.22.0)"] + [[package]] name = "nest-asyncio" version = "1.6.0" @@ -3054,6 +3090,7 @@ description = "Python package for creating and manipulating graphs and networks" optional = false python-versions = ">=3.9" groups = ["dev"] +markers = "python_version < \"3.10\"" files = [ {file = "networkx-3.2.1-py3-none-any.whl", hash = "sha256:f18c69adc97877c42332c170849c96cefa91881c99a7cb3e95b7c659ebdc1ec2"}, {file = "networkx-3.2.1.tar.gz", hash = "sha256:9f1bb5cf3409bf324e0a722c20bdb4c20ee39bf1c30ce8ae499c8502b0b5e0c6"}, @@ -3066,6 +3103,27 @@ doc = ["nb2plots (>=0.7)", "nbconvert (<7.9)", "numpydoc (>=1.6)", "pillow (>=9. extra = ["lxml (>=4.6)", "pydot (>=1.4.2)", "pygraphviz (>=1.11)", "sympy (>=1.10)"] test = ["pytest (>=7.2)", "pytest-cov (>=4.0)"] +[[package]] +name = "networkx" +version = "3.4.2" +description = "Python package for creating and manipulating graphs and networks" +optional = false +python-versions = ">=3.10" +groups = ["dev"] +markers = "python_version >= \"3.10\"" +files = [ + {file = "networkx-3.4.2-py3-none-any.whl", hash = "sha256:df5d4365b724cf81b8c6a7312509d0c22386097011ad1abe274afd5e9d3bbc5f"}, + {file = "networkx-3.4.2.tar.gz", hash = "sha256:307c3669428c5362aab27c8a1260aa8f47c4e91d3891f48be0141738d8d053e1"}, +] + +[package.extras] +default = ["matplotlib (>=3.7)", "numpy (>=1.24)", "pandas (>=2.0)", "scipy (>=1.10,!=1.11.0,!=1.11.1)"] +developer = ["changelist (==0.5)", "mypy (>=1.1)", "pre-commit (>=3.2)", "rtoml"] +doc = ["intersphinx-registry", "myst-nb (>=1.1)", "numpydoc (>=1.8.0)", "pillow (>=9.4)", "pydata-sphinx-theme (>=0.15)", "sphinx (>=7.3)", "sphinx-gallery (>=0.16)", "texext (>=0.6.7)"] +example = ["cairocffi (>=1.7)", "contextily (>=1.6)", "igraph (>=0.11)", "momepy (>=0.7.2)", "osmnx (>=1.9)", "scikit-learn (>=1.5)", "seaborn (>=0.13)"] +extra = ["lxml (>=4.6)", "pydot (>=3.0.1)", "pygraphviz (>=1.14)", "sympy (>=1.10)"] +test = ["pytest (>=7.2)", "pytest-cov (>=4.0)"] + [[package]] name = "numpy" version = "2.0.2" @@ -3175,63 +3233,63 @@ openapi-schema-validator = ">=0.6.0,<0.7.0" [[package]] name = "opentelemetry-api" -version = "1.29.0" +version = "1.32.1" description = "OpenTelemetry Python API" optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "opentelemetry_api-1.29.0-py3-none-any.whl", hash = "sha256:5fcd94c4141cc49c736271f3e1efb777bebe9cc535759c54c936cca4f1b312b8"}, - {file = "opentelemetry_api-1.29.0.tar.gz", hash = "sha256:d04a6cf78aad09614f52964ecb38021e248f5714dc32c2e0d8fd99517b4d69cf"}, + {file = "opentelemetry_api-1.32.1-py3-none-any.whl", hash = "sha256:bbd19f14ab9f15f0e85e43e6a958aa4cb1f36870ee62b7fd205783a112012724"}, + {file = "opentelemetry_api-1.32.1.tar.gz", hash = "sha256:a5be71591694a4d9195caf6776b055aa702e964d961051a0715d05f8632c32fb"}, ] [package.dependencies] deprecated = ">=1.2.6" -importlib-metadata = ">=6.0,<=8.5.0" +importlib-metadata = ">=6.0,<8.7.0" [[package]] name = "opentelemetry-sdk" -version = "1.29.0" +version = "1.32.1" description = "OpenTelemetry Python SDK" optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "opentelemetry_sdk-1.29.0-py3-none-any.whl", hash = "sha256:173be3b5d3f8f7d671f20ea37056710217959e774e2749d984355d1f9391a30a"}, - {file = "opentelemetry_sdk-1.29.0.tar.gz", hash = "sha256:b0787ce6aade6ab84315302e72bd7a7f2f014b0fb1b7c3295b88afe014ed0643"}, + {file = "opentelemetry_sdk-1.32.1-py3-none-any.whl", hash = "sha256:bba37b70a08038613247bc42beee5a81b0ddca422c7d7f1b097b32bf1c7e2f17"}, + {file = "opentelemetry_sdk-1.32.1.tar.gz", hash = "sha256:8ef373d490961848f525255a42b193430a0637e064dd132fd2a014d94792a092"}, ] [package.dependencies] -opentelemetry-api = "1.29.0" -opentelemetry-semantic-conventions = "0.50b0" +opentelemetry-api = "1.32.1" +opentelemetry-semantic-conventions = "0.53b1" typing-extensions = ">=3.7.4" [[package]] name = "opentelemetry-semantic-conventions" -version = "0.50b0" +version = "0.53b1" description = "OpenTelemetry Semantic Conventions" optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "opentelemetry_semantic_conventions-0.50b0-py3-none-any.whl", hash = "sha256:e87efba8fdb67fb38113efea6a349531e75ed7ffc01562f65b802fcecb5e115e"}, - {file = "opentelemetry_semantic_conventions-0.50b0.tar.gz", hash = "sha256:02dc6dbcb62f082de9b877ff19a3f1ffaa3c306300fa53bfac761c4567c83d38"}, + {file = "opentelemetry_semantic_conventions-0.53b1-py3-none-any.whl", hash = "sha256:21df3ed13f035f8f3ea42d07cbebae37020367a53b47f1ebee3b10a381a00208"}, + {file = "opentelemetry_semantic_conventions-0.53b1.tar.gz", hash = "sha256:4c5a6fede9de61211b2e9fc1e02e8acacce882204cd770177342b6a3be682992"}, ] [package.dependencies] deprecated = ">=1.2.6" -opentelemetry-api = "1.29.0" +opentelemetry-api = "1.32.1" [[package]] name = "packaging" -version = "24.2" +version = "25.0" description = "Core utilities for Python packages" optional = false python-versions = ">=3.8" groups = ["main", "dev", "docs"] files = [ - {file = "packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759"}, - {file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"}, + {file = "packaging-25.0-py3-none-any.whl", hash = "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484"}, + {file = "packaging-25.0.tar.gz", hash = "sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f"}, ] [[package]] @@ -3363,48 +3421,54 @@ files = [ [[package]] name = "pbr" -version = "6.1.0" +version = "6.1.1" description = "Python Build Reasonableness" optional = false python-versions = ">=2.6" groups = ["dev"] files = [ - {file = "pbr-6.1.0-py2.py3-none-any.whl", hash = "sha256:a776ae228892d8013649c0aeccbb3d5f99ee15e005a4cbb7e61d55a067b28a2a"}, - {file = "pbr-6.1.0.tar.gz", hash = "sha256:788183e382e3d1d7707db08978239965e8b9e4e5ed42669bf4758186734d5f24"}, + {file = "pbr-6.1.1-py2.py3-none-any.whl", hash = "sha256:38d4daea5d9fa63b3f626131b9d34947fd0c8be9b05a29276870580050a25a76"}, + {file = "pbr-6.1.1.tar.gz", hash = "sha256:93ea72ce6989eb2eed99d0f75721474f69ad88128afdef5ac377eb797c4bf76b"}, ] +[package.dependencies] +setuptools = "*" + [[package]] name = "platformdirs" -version = "4.3.6" +version = "4.3.7" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["dev", "docs"] files = [ - {file = "platformdirs-4.3.6-py3-none-any.whl", hash = "sha256:73e575e1408ab8103900836b97580d5307456908a03e92031bab39e4554cc3fb"}, - {file = "platformdirs-4.3.6.tar.gz", hash = "sha256:357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907"}, + {file = "platformdirs-4.3.7-py3-none-any.whl", hash = "sha256:a03875334331946f13c549dbd8f4bac7a13a50a895a0eb1e8c6a8ace80d40a94"}, + {file = "platformdirs-4.3.7.tar.gz", hash = "sha256:eb437d586b6a0986388f0d6f74aa0cde27b48d0e3d66843640bfb6bdcdb6e351"}, ] [package.extras] -docs = ["furo (>=2024.8.6)", "proselint (>=0.14)", "sphinx (>=8.0.2)", "sphinx-autodoc-typehints (>=2.4)"] -test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=8.3.2)", "pytest-cov (>=5)", "pytest-mock (>=3.14)"] -type = ["mypy (>=1.11.2)"] +docs = ["furo (>=2024.8.6)", "proselint (>=0.14)", "sphinx (>=8.1.3)", "sphinx-autodoc-typehints (>=3)"] +test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=8.3.4)", "pytest-cov (>=6)", "pytest-mock (>=3.14)"] +type = ["mypy (>=1.14.1)"] [[package]] name = "plotly" -version = "5.24.1" -description = "An open-source, interactive data visualization library for Python" +version = "6.0.1" +description = "An open-source interactive data visualization library for Python" optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "plotly-5.24.1-py3-none-any.whl", hash = "sha256:f67073a1e637eb0dc3e46324d9d51e2fe76e9727c892dde64ddf1e1b51f29089"}, - {file = "plotly-5.24.1.tar.gz", hash = "sha256:dbc8ac8339d248a4bcc36e08a5659bacfe1b079390b8953533f4eb22169b4bae"}, + {file = "plotly-6.0.1-py3-none-any.whl", hash = "sha256:4714db20fea57a435692c548a4eb4fae454f7daddf15f8d8ba7e1045681d7768"}, + {file = "plotly-6.0.1.tar.gz", hash = "sha256:dd8400229872b6e3c964b099be699f8d00c489a974f2cfccfad5e8240873366b"}, ] [package.dependencies] +narwhals = ">=1.15.1" packaging = "*" -tenacity = ">=6.2.0" + +[package.extras] +express = ["numpy"] [[package]] name = "pluggy" @@ -3434,155 +3498,149 @@ files = [ {file = "ply-3.11.tar.gz", hash = "sha256:00c7c1aaa88358b9c765b6d3000c6eec0ba42abca5351b095321aef446081da3"}, ] -[[package]] -name = "portalocker" -version = "2.10.1" -description = "Wraps the portalocker recipe for easy usage" -optional = false -python-versions = ">=3.8" -groups = ["main"] -files = [ - {file = "portalocker-2.10.1-py3-none-any.whl", hash = "sha256:53a5984ebc86a025552264b459b46a2086e269b21823cb572f8f28ee759e45bf"}, - {file = "portalocker-2.10.1.tar.gz", hash = "sha256:ef1bf844e878ab08aee7e40184156e1151f228f103aa5c6bd0724cc330960f8f"}, -] - -[package.dependencies] -pywin32 = {version = ">=226", markers = "platform_system == \"Windows\""} - -[package.extras] -docs = ["sphinx (>=1.7.1)"] -redis = ["redis"] -tests = ["pytest (>=5.4.1)", "pytest-cov (>=2.8.1)", "pytest-mypy (>=0.8.0)", "pytest-timeout (>=2.1.0)", "redis", "sphinx (>=6.0.0)", "types-redis"] - [[package]] name = "propcache" -version = "0.2.1" +version = "0.3.1" description = "Accelerated property cache" optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "propcache-0.2.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:6b3f39a85d671436ee3d12c017f8fdea38509e4f25b28eb25877293c98c243f6"}, - {file = "propcache-0.2.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:39d51fbe4285d5db5d92a929e3e21536ea3dd43732c5b177c7ef03f918dff9f2"}, - {file = "propcache-0.2.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6445804cf4ec763dc70de65a3b0d9954e868609e83850a47ca4f0cb64bd79fea"}, - {file = "propcache-0.2.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f9479aa06a793c5aeba49ce5c5692ffb51fcd9a7016e017d555d5e2b0045d212"}, - {file = "propcache-0.2.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d9631c5e8b5b3a0fda99cb0d29c18133bca1e18aea9effe55adb3da1adef80d3"}, - {file = "propcache-0.2.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3156628250f46a0895f1f36e1d4fbe062a1af8718ec3ebeb746f1d23f0c5dc4d"}, - {file = "propcache-0.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6b6fb63ae352e13748289f04f37868099e69dba4c2b3e271c46061e82c745634"}, - {file = "propcache-0.2.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:887d9b0a65404929641a9fabb6452b07fe4572b269d901d622d8a34a4e9043b2"}, - {file = "propcache-0.2.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:a96dc1fa45bd8c407a0af03b2d5218392729e1822b0c32e62c5bf7eeb5fb3958"}, - {file = "propcache-0.2.1-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:a7e65eb5c003a303b94aa2c3852ef130230ec79e349632d030e9571b87c4698c"}, - {file = "propcache-0.2.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:999779addc413181912e984b942fbcc951be1f5b3663cd80b2687758f434c583"}, - {file = "propcache-0.2.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:19a0f89a7bb9d8048d9c4370c9c543c396e894c76be5525f5e1ad287f1750ddf"}, - {file = "propcache-0.2.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:1ac2f5fe02fa75f56e1ad473f1175e11f475606ec9bd0be2e78e4734ad575034"}, - {file = "propcache-0.2.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:574faa3b79e8ebac7cb1d7930f51184ba1ccf69adfdec53a12f319a06030a68b"}, - {file = "propcache-0.2.1-cp310-cp310-win32.whl", hash = "sha256:03ff9d3f665769b2a85e6157ac8b439644f2d7fd17615a82fa55739bc97863f4"}, - {file = "propcache-0.2.1-cp310-cp310-win_amd64.whl", hash = "sha256:2d3af2e79991102678f53e0dbf4c35de99b6b8b58f29a27ca0325816364caaba"}, - {file = "propcache-0.2.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:1ffc3cca89bb438fb9c95c13fc874012f7b9466b89328c3c8b1aa93cdcfadd16"}, - {file = "propcache-0.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f174bbd484294ed9fdf09437f889f95807e5f229d5d93588d34e92106fbf6717"}, - {file = "propcache-0.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:70693319e0b8fd35dd863e3e29513875eb15c51945bf32519ef52927ca883bc3"}, - {file = "propcache-0.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b480c6a4e1138e1aa137c0079b9b6305ec6dcc1098a8ca5196283e8a49df95a9"}, - {file = "propcache-0.2.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d27b84d5880f6d8aa9ae3edb253c59d9f6642ffbb2c889b78b60361eed449787"}, - {file = "propcache-0.2.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:857112b22acd417c40fa4595db2fe28ab900c8c5fe4670c7989b1c0230955465"}, - {file = "propcache-0.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cf6c4150f8c0e32d241436526f3c3f9cbd34429492abddbada2ffcff506c51af"}, - {file = "propcache-0.2.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:66d4cfda1d8ed687daa4bc0274fcfd5267873db9a5bc0418c2da19273040eeb7"}, - {file = "propcache-0.2.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c2f992c07c0fca81655066705beae35fc95a2fa7366467366db627d9f2ee097f"}, - {file = "propcache-0.2.1-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:4a571d97dbe66ef38e472703067021b1467025ec85707d57e78711c085984e54"}, - {file = "propcache-0.2.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:bb6178c241278d5fe853b3de743087be7f5f4c6f7d6d22a3b524d323eecec505"}, - {file = "propcache-0.2.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:ad1af54a62ffe39cf34db1aa6ed1a1873bd548f6401db39d8e7cd060b9211f82"}, - {file = "propcache-0.2.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:e7048abd75fe40712005bcfc06bb44b9dfcd8e101dda2ecf2f5aa46115ad07ca"}, - {file = "propcache-0.2.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:160291c60081f23ee43d44b08a7e5fb76681221a8e10b3139618c5a9a291b84e"}, - {file = "propcache-0.2.1-cp311-cp311-win32.whl", hash = "sha256:819ce3b883b7576ca28da3861c7e1a88afd08cc8c96908e08a3f4dd64a228034"}, - {file = "propcache-0.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:edc9fc7051e3350643ad929df55c451899bb9ae6d24998a949d2e4c87fb596d3"}, - {file = "propcache-0.2.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:081a430aa8d5e8876c6909b67bd2d937bfd531b0382d3fdedb82612c618bc41a"}, - {file = "propcache-0.2.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d2ccec9ac47cf4e04897619c0e0c1a48c54a71bdf045117d3a26f80d38ab1fb0"}, - {file = "propcache-0.2.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:14d86fe14b7e04fa306e0c43cdbeebe6b2c2156a0c9ce56b815faacc193e320d"}, - {file = "propcache-0.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:049324ee97bb67285b49632132db351b41e77833678432be52bdd0289c0e05e4"}, - {file = "propcache-0.2.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1cd9a1d071158de1cc1c71a26014dcdfa7dd3d5f4f88c298c7f90ad6f27bb46d"}, - {file = "propcache-0.2.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:98110aa363f1bb4c073e8dcfaefd3a5cea0f0834c2aab23dda657e4dab2f53b5"}, - {file = "propcache-0.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:647894f5ae99c4cf6bb82a1bb3a796f6e06af3caa3d32e26d2350d0e3e3faf24"}, - {file = "propcache-0.2.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bfd3223c15bebe26518d58ccf9a39b93948d3dcb3e57a20480dfdd315356baff"}, - {file = "propcache-0.2.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:d71264a80f3fcf512eb4f18f59423fe82d6e346ee97b90625f283df56aee103f"}, - {file = "propcache-0.2.1-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:e73091191e4280403bde6c9a52a6999d69cdfde498f1fdf629105247599b57ec"}, - {file = "propcache-0.2.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:3935bfa5fede35fb202c4b569bb9c042f337ca4ff7bd540a0aa5e37131659348"}, - {file = "propcache-0.2.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:f508b0491767bb1f2b87fdfacaba5f7eddc2f867740ec69ece6d1946d29029a6"}, - {file = "propcache-0.2.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:1672137af7c46662a1c2be1e8dc78cb6d224319aaa40271c9257d886be4363a6"}, - {file = "propcache-0.2.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b74c261802d3d2b85c9df2dfb2fa81b6f90deeef63c2db9f0e029a3cac50b518"}, - {file = "propcache-0.2.1-cp312-cp312-win32.whl", hash = "sha256:d09c333d36c1409d56a9d29b3a1b800a42c76a57a5a8907eacdbce3f18768246"}, - {file = "propcache-0.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:c214999039d4f2a5b2073ac506bba279945233da8c786e490d411dfc30f855c1"}, - {file = "propcache-0.2.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:aca405706e0b0a44cc6bfd41fbe89919a6a56999157f6de7e182a990c36e37bc"}, - {file = "propcache-0.2.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:12d1083f001ace206fe34b6bdc2cb94be66d57a850866f0b908972f90996b3e9"}, - {file = "propcache-0.2.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:d93f3307ad32a27bda2e88ec81134b823c240aa3abb55821a8da553eed8d9439"}, - {file = "propcache-0.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ba278acf14471d36316159c94a802933d10b6a1e117b8554fe0d0d9b75c9d536"}, - {file = "propcache-0.2.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4e6281aedfca15301c41f74d7005e6e3f4ca143584ba696ac69df4f02f40d629"}, - {file = "propcache-0.2.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5b750a8e5a1262434fb1517ddf64b5de58327f1adc3524a5e44c2ca43305eb0b"}, - {file = "propcache-0.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bf72af5e0fb40e9babf594308911436c8efde3cb5e75b6f206c34ad18be5c052"}, - {file = "propcache-0.2.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b2d0a12018b04f4cb820781ec0dffb5f7c7c1d2a5cd22bff7fb055a2cb19ebce"}, - {file = "propcache-0.2.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:e800776a79a5aabdb17dcc2346a7d66d0777e942e4cd251defeb084762ecd17d"}, - {file = "propcache-0.2.1-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:4160d9283bd382fa6c0c2b5e017acc95bc183570cd70968b9202ad6d8fc48dce"}, - {file = "propcache-0.2.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:30b43e74f1359353341a7adb783c8f1b1c676367b011709f466f42fda2045e95"}, - {file = "propcache-0.2.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:58791550b27d5488b1bb52bc96328456095d96206a250d28d874fafe11b3dfaf"}, - {file = "propcache-0.2.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:0f022d381747f0dfe27e99d928e31bc51a18b65bb9e481ae0af1380a6725dd1f"}, - {file = "propcache-0.2.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:297878dc9d0a334358f9b608b56d02e72899f3b8499fc6044133f0d319e2ec30"}, - {file = "propcache-0.2.1-cp313-cp313-win32.whl", hash = "sha256:ddfab44e4489bd79bda09d84c430677fc7f0a4939a73d2bba3073036f487a0a6"}, - {file = "propcache-0.2.1-cp313-cp313-win_amd64.whl", hash = "sha256:556fc6c10989f19a179e4321e5d678db8eb2924131e64652a51fe83e4c3db0e1"}, - {file = "propcache-0.2.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:6a9a8c34fb7bb609419a211e59da8887eeca40d300b5ea8e56af98f6fbbb1541"}, - {file = "propcache-0.2.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:ae1aa1cd222c6d205853b3013c69cd04515f9d6ab6de4b0603e2e1c33221303e"}, - {file = "propcache-0.2.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:accb6150ce61c9c4b7738d45550806aa2b71c7668c6942f17b0ac182b6142fd4"}, - {file = "propcache-0.2.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5eee736daafa7af6d0a2dc15cc75e05c64f37fc37bafef2e00d77c14171c2097"}, - {file = "propcache-0.2.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f7a31fc1e1bd362874863fdeed71aed92d348f5336fd84f2197ba40c59f061bd"}, - {file = "propcache-0.2.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cba4cfa1052819d16699e1d55d18c92b6e094d4517c41dd231a8b9f87b6fa681"}, - {file = "propcache-0.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f089118d584e859c62b3da0892b88a83d611c2033ac410e929cb6754eec0ed16"}, - {file = "propcache-0.2.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:781e65134efaf88feb447e8c97a51772aa75e48b794352f94cb7ea717dedda0d"}, - {file = "propcache-0.2.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:31f5af773530fd3c658b32b6bdc2d0838543de70eb9a2156c03e410f7b0d3aae"}, - {file = "propcache-0.2.1-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:a7a078f5d37bee6690959c813977da5291b24286e7b962e62a94cec31aa5188b"}, - {file = "propcache-0.2.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:cea7daf9fc7ae6687cf1e2c049752f19f146fdc37c2cc376e7d0032cf4f25347"}, - {file = "propcache-0.2.1-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:8b3489ff1ed1e8315674d0775dc7d2195fb13ca17b3808721b54dbe9fd020faf"}, - {file = "propcache-0.2.1-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:9403db39be1393618dd80c746cb22ccda168efce239c73af13c3763ef56ffc04"}, - {file = "propcache-0.2.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:5d97151bc92d2b2578ff7ce779cdb9174337390a535953cbb9452fb65164c587"}, - {file = "propcache-0.2.1-cp39-cp39-win32.whl", hash = "sha256:9caac6b54914bdf41bcc91e7eb9147d331d29235a7c967c150ef5df6464fd1bb"}, - {file = "propcache-0.2.1-cp39-cp39-win_amd64.whl", hash = "sha256:92fc4500fcb33899b05ba73276dfb684a20d31caa567b7cb5252d48f896a91b1"}, - {file = "propcache-0.2.1-py3-none-any.whl", hash = "sha256:52277518d6aae65536e9cea52d4e7fd2f7a66f4aa2d30ed3f2fcea620ace3c54"}, - {file = "propcache-0.2.1.tar.gz", hash = "sha256:3f77ce728b19cb537714499928fe800c3dda29e8d9428778fc7c186da4c09a64"}, + {file = "propcache-0.3.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:f27785888d2fdd918bc36de8b8739f2d6c791399552333721b58193f68ea3e98"}, + {file = "propcache-0.3.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d4e89cde74154c7b5957f87a355bb9c8ec929c167b59c83d90654ea36aeb6180"}, + {file = "propcache-0.3.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:730178f476ef03d3d4d255f0c9fa186cb1d13fd33ffe89d39f2cda4da90ceb71"}, + {file = "propcache-0.3.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:967a8eec513dbe08330f10137eacb427b2ca52118769e82ebcfcab0fba92a649"}, + {file = "propcache-0.3.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5b9145c35cc87313b5fd480144f8078716007656093d23059e8993d3a8fa730f"}, + {file = "propcache-0.3.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9e64e948ab41411958670f1093c0a57acfdc3bee5cf5b935671bbd5313bcf229"}, + {file = "propcache-0.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:319fa8765bfd6a265e5fa661547556da381e53274bc05094fc9ea50da51bfd46"}, + {file = "propcache-0.3.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c66d8ccbc902ad548312b96ed8d5d266d0d2c6d006fd0f66323e9d8f2dd49be7"}, + {file = "propcache-0.3.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:2d219b0dbabe75e15e581fc1ae796109b07c8ba7d25b9ae8d650da582bed01b0"}, + {file = "propcache-0.3.1-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:cd6a55f65241c551eb53f8cf4d2f4af33512c39da5d9777694e9d9c60872f519"}, + {file = "propcache-0.3.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:9979643ffc69b799d50d3a7b72b5164a2e97e117009d7af6dfdd2ab906cb72cd"}, + {file = "propcache-0.3.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:4cf9e93a81979f1424f1a3d155213dc928f1069d697e4353edb8a5eba67c6259"}, + {file = "propcache-0.3.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:2fce1df66915909ff6c824bbb5eb403d2d15f98f1518e583074671a30fe0c21e"}, + {file = "propcache-0.3.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:4d0dfdd9a2ebc77b869a0b04423591ea8823f791293b527dc1bb896c1d6f1136"}, + {file = "propcache-0.3.1-cp310-cp310-win32.whl", hash = "sha256:1f6cc0ad7b4560e5637eb2c994e97b4fa41ba8226069c9277eb5ea7101845b42"}, + {file = "propcache-0.3.1-cp310-cp310-win_amd64.whl", hash = "sha256:47ef24aa6511e388e9894ec16f0fbf3313a53ee68402bc428744a367ec55b833"}, + {file = "propcache-0.3.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:7f30241577d2fef2602113b70ef7231bf4c69a97e04693bde08ddab913ba0ce5"}, + {file = "propcache-0.3.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:43593c6772aa12abc3af7784bff4a41ffa921608dd38b77cf1dfd7f5c4e71371"}, + {file = "propcache-0.3.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a75801768bbe65499495660b777e018cbe90c7980f07f8aa57d6be79ea6f71da"}, + {file = "propcache-0.3.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f6f1324db48f001c2ca26a25fa25af60711e09b9aaf4b28488602776f4f9a744"}, + {file = "propcache-0.3.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5cdb0f3e1eb6dfc9965d19734d8f9c481b294b5274337a8cb5cb01b462dcb7e0"}, + {file = "propcache-0.3.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1eb34d90aac9bfbced9a58b266f8946cb5935869ff01b164573a7634d39fbcb5"}, + {file = "propcache-0.3.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f35c7070eeec2cdaac6fd3fe245226ed2a6292d3ee8c938e5bb645b434c5f256"}, + {file = "propcache-0.3.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b23c11c2c9e6d4e7300c92e022046ad09b91fd00e36e83c44483df4afa990073"}, + {file = "propcache-0.3.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:3e19ea4ea0bf46179f8a3652ac1426e6dcbaf577ce4b4f65be581e237340420d"}, + {file = "propcache-0.3.1-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:bd39c92e4c8f6cbf5f08257d6360123af72af9f4da75a690bef50da77362d25f"}, + {file = "propcache-0.3.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:b0313e8b923b3814d1c4a524c93dfecea5f39fa95601f6a9b1ac96cd66f89ea0"}, + {file = "propcache-0.3.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:e861ad82892408487be144906a368ddbe2dc6297074ade2d892341b35c59844a"}, + {file = "propcache-0.3.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:61014615c1274df8da5991a1e5da85a3ccb00c2d4701ac6f3383afd3ca47ab0a"}, + {file = "propcache-0.3.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:71ebe3fe42656a2328ab08933d420df5f3ab121772eef78f2dc63624157f0ed9"}, + {file = "propcache-0.3.1-cp311-cp311-win32.whl", hash = "sha256:58aa11f4ca8b60113d4b8e32d37e7e78bd8af4d1a5b5cb4979ed856a45e62005"}, + {file = "propcache-0.3.1-cp311-cp311-win_amd64.whl", hash = "sha256:9532ea0b26a401264b1365146c440a6d78269ed41f83f23818d4b79497aeabe7"}, + {file = "propcache-0.3.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:f78eb8422acc93d7b69964012ad7048764bb45a54ba7a39bb9e146c72ea29723"}, + {file = "propcache-0.3.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:89498dd49c2f9a026ee057965cdf8192e5ae070ce7d7a7bd4b66a8e257d0c976"}, + {file = "propcache-0.3.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:09400e98545c998d57d10035ff623266927cb784d13dd2b31fd33b8a5316b85b"}, + {file = "propcache-0.3.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aa8efd8c5adc5a2c9d3b952815ff8f7710cefdcaf5f2c36d26aff51aeca2f12f"}, + {file = "propcache-0.3.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c2fe5c910f6007e716a06d269608d307b4f36e7babee5f36533722660e8c4a70"}, + {file = "propcache-0.3.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a0ab8cf8cdd2194f8ff979a43ab43049b1df0b37aa64ab7eca04ac14429baeb7"}, + {file = "propcache-0.3.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:563f9d8c03ad645597b8d010ef4e9eab359faeb11a0a2ac9f7b4bc8c28ebef25"}, + {file = "propcache-0.3.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fb6e0faf8cb6b4beea5d6ed7b5a578254c6d7df54c36ccd3d8b3eb00d6770277"}, + {file = "propcache-0.3.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:1c5c7ab7f2bb3f573d1cb921993006ba2d39e8621019dffb1c5bc94cdbae81e8"}, + {file = "propcache-0.3.1-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:050b571b2e96ec942898f8eb46ea4bfbb19bd5502424747e83badc2d4a99a44e"}, + {file = "propcache-0.3.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:e1c4d24b804b3a87e9350f79e2371a705a188d292fd310e663483af6ee6718ee"}, + {file = "propcache-0.3.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:e4fe2a6d5ce975c117a6bb1e8ccda772d1e7029c1cca1acd209f91d30fa72815"}, + {file = "propcache-0.3.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:feccd282de1f6322f56f6845bf1207a537227812f0a9bf5571df52bb418d79d5"}, + {file = "propcache-0.3.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ec314cde7314d2dd0510c6787326bbffcbdc317ecee6b7401ce218b3099075a7"}, + {file = "propcache-0.3.1-cp312-cp312-win32.whl", hash = "sha256:7d2d5a0028d920738372630870e7d9644ce437142197f8c827194fca404bf03b"}, + {file = "propcache-0.3.1-cp312-cp312-win_amd64.whl", hash = "sha256:88c423efef9d7a59dae0614eaed718449c09a5ac79a5f224a8b9664d603f04a3"}, + {file = "propcache-0.3.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:f1528ec4374617a7a753f90f20e2f551121bb558fcb35926f99e3c42367164b8"}, + {file = "propcache-0.3.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:dc1915ec523b3b494933b5424980831b636fe483d7d543f7afb7b3bf00f0c10f"}, + {file = "propcache-0.3.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a110205022d077da24e60b3df8bcee73971be9575dec5573dd17ae5d81751111"}, + {file = "propcache-0.3.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d249609e547c04d190e820d0d4c8ca03ed4582bcf8e4e160a6969ddfb57b62e5"}, + {file = "propcache-0.3.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5ced33d827625d0a589e831126ccb4f5c29dfdf6766cac441d23995a65825dcb"}, + {file = "propcache-0.3.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4114c4ada8f3181af20808bedb250da6bae56660e4b8dfd9cd95d4549c0962f7"}, + {file = "propcache-0.3.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:975af16f406ce48f1333ec5e912fe11064605d5c5b3f6746969077cc3adeb120"}, + {file = "propcache-0.3.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a34aa3a1abc50740be6ac0ab9d594e274f59960d3ad253cd318af76b996dd654"}, + {file = "propcache-0.3.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:9cec3239c85ed15bfaded997773fdad9fb5662b0a7cbc854a43f291eb183179e"}, + {file = "propcache-0.3.1-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:05543250deac8e61084234d5fc54f8ebd254e8f2b39a16b1dce48904f45b744b"}, + {file = "propcache-0.3.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:5cb5918253912e088edbf023788de539219718d3b10aef334476b62d2b53de53"}, + {file = "propcache-0.3.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:f3bbecd2f34d0e6d3c543fdb3b15d6b60dd69970c2b4c822379e5ec8f6f621d5"}, + {file = "propcache-0.3.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:aca63103895c7d960a5b9b044a83f544b233c95e0dcff114389d64d762017af7"}, + {file = "propcache-0.3.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:5a0a9898fdb99bf11786265468571e628ba60af80dc3f6eb89a3545540c6b0ef"}, + {file = "propcache-0.3.1-cp313-cp313-win32.whl", hash = "sha256:3a02a28095b5e63128bcae98eb59025924f121f048a62393db682f049bf4ac24"}, + {file = "propcache-0.3.1-cp313-cp313-win_amd64.whl", hash = "sha256:813fbb8b6aea2fc9659815e585e548fe706d6f663fa73dff59a1677d4595a037"}, + {file = "propcache-0.3.1-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:a444192f20f5ce8a5e52761a031b90f5ea6288b1eef42ad4c7e64fef33540b8f"}, + {file = "propcache-0.3.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:0fbe94666e62ebe36cd652f5fc012abfbc2342de99b523f8267a678e4dfdee3c"}, + {file = "propcache-0.3.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:f011f104db880f4e2166bcdcf7f58250f7a465bc6b068dc84c824a3d4a5c94dc"}, + {file = "propcache-0.3.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3e584b6d388aeb0001d6d5c2bd86b26304adde6d9bb9bfa9c4889805021b96de"}, + {file = "propcache-0.3.1-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8a17583515a04358b034e241f952f1715243482fc2c2945fd99a1b03a0bd77d6"}, + {file = "propcache-0.3.1-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5aed8d8308215089c0734a2af4f2e95eeb360660184ad3912686c181e500b2e7"}, + {file = "propcache-0.3.1-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d8e309ff9a0503ef70dc9a0ebd3e69cf7b3894c9ae2ae81fc10943c37762458"}, + {file = "propcache-0.3.1-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b655032b202028a582d27aeedc2e813299f82cb232f969f87a4fde491a233f11"}, + {file = "propcache-0.3.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9f64d91b751df77931336b5ff7bafbe8845c5770b06630e27acd5dbb71e1931c"}, + {file = "propcache-0.3.1-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:19a06db789a4bd896ee91ebc50d059e23b3639c25d58eb35be3ca1cbe967c3bf"}, + {file = "propcache-0.3.1-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:bef100c88d8692864651b5f98e871fb090bd65c8a41a1cb0ff2322db39c96c27"}, + {file = "propcache-0.3.1-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:87380fb1f3089d2a0b8b00f006ed12bd41bd858fabfa7330c954c70f50ed8757"}, + {file = "propcache-0.3.1-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:e474fc718e73ba5ec5180358aa07f6aded0ff5f2abe700e3115c37d75c947e18"}, + {file = "propcache-0.3.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:17d1c688a443355234f3c031349da69444be052613483f3e4158eef751abcd8a"}, + {file = "propcache-0.3.1-cp313-cp313t-win32.whl", hash = "sha256:359e81a949a7619802eb601d66d37072b79b79c2505e6d3fd8b945538411400d"}, + {file = "propcache-0.3.1-cp313-cp313t-win_amd64.whl", hash = "sha256:e7fb9a84c9abbf2b2683fa3e7b0d7da4d8ecf139a1c635732a8bda29c5214b0e"}, + {file = "propcache-0.3.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:ed5f6d2edbf349bd8d630e81f474d33d6ae5d07760c44d33cd808e2f5c8f4ae6"}, + {file = "propcache-0.3.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:668ddddc9f3075af019f784456267eb504cb77c2c4bd46cc8402d723b4d200bf"}, + {file = "propcache-0.3.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0c86e7ceea56376216eba345aa1fc6a8a6b27ac236181f840d1d7e6a1ea9ba5c"}, + {file = "propcache-0.3.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:83be47aa4e35b87c106fc0c84c0fc069d3f9b9b06d3c494cd404ec6747544894"}, + {file = "propcache-0.3.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:27c6ac6aa9fc7bc662f594ef380707494cb42c22786a558d95fcdedb9aa5d035"}, + {file = "propcache-0.3.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:64a956dff37080b352c1c40b2966b09defb014347043e740d420ca1eb7c9b908"}, + {file = "propcache-0.3.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:82de5da8c8893056603ac2d6a89eb8b4df49abf1a7c19d536984c8dd63f481d5"}, + {file = "propcache-0.3.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0c3c3a203c375b08fd06a20da3cf7aac293b834b6f4f4db71190e8422750cca5"}, + {file = "propcache-0.3.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:b303b194c2e6f171cfddf8b8ba30baefccf03d36a4d9cab7fd0bb68ba476a3d7"}, + {file = "propcache-0.3.1-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:916cd229b0150129d645ec51614d38129ee74c03293a9f3f17537be0029a9641"}, + {file = "propcache-0.3.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:a461959ead5b38e2581998700b26346b78cd98540b5524796c175722f18b0294"}, + {file = "propcache-0.3.1-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:069e7212890b0bcf9b2be0a03afb0c2d5161d91e1bf51569a64f629acc7defbf"}, + {file = "propcache-0.3.1-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:ef2e4e91fb3945769e14ce82ed53007195e616a63aa43b40fb7ebaaf907c8d4c"}, + {file = "propcache-0.3.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:8638f99dca15b9dff328fb6273e09f03d1c50d9b6512f3b65a4154588a7595fe"}, + {file = "propcache-0.3.1-cp39-cp39-win32.whl", hash = "sha256:6f173bbfe976105aaa890b712d1759de339d8a7cef2fc0a1714cc1a1e1c47f64"}, + {file = "propcache-0.3.1-cp39-cp39-win_amd64.whl", hash = "sha256:603f1fe4144420374f1a69b907494c3acbc867a581c2d49d4175b0de7cc64566"}, + {file = "propcache-0.3.1-py3-none-any.whl", hash = "sha256:9a8ecf38de50a7f518c21568c80f985e776397b902f1ce0b01f799aba1608b40"}, + {file = "propcache-0.3.1.tar.gz", hash = "sha256:40d980c33765359098837527e18eddefc9a24cea5b45e078a7f3bb5b032c6ecf"}, ] [[package]] name = "proto-plus" -version = "1.25.0" -description = "Beautiful, Pythonic protocol buffers." +version = "1.26.1" +description = "Beautiful, Pythonic protocol buffers" optional = false python-versions = ">=3.7" groups = ["main"] files = [ - {file = "proto_plus-1.25.0-py3-none-any.whl", hash = "sha256:c91fc4a65074ade8e458e95ef8bac34d4008daa7cce4a12d6707066fca648961"}, - {file = "proto_plus-1.25.0.tar.gz", hash = "sha256:fbb17f57f7bd05a68b7707e745e26528b0b3c34e378db91eef93912c54982d91"}, + {file = "proto_plus-1.26.1-py3-none-any.whl", hash = "sha256:13285478c2dcf2abb829db158e1047e2f1e8d63a077d94263c2b88b043c75a66"}, + {file = "proto_plus-1.26.1.tar.gz", hash = "sha256:21a515a4c4c0088a773899e23c7bbade3d18f9c66c73edd4c7ee3816bc96a012"}, ] [package.dependencies] -protobuf = ">=3.19.0,<6.0.0dev" +protobuf = ">=3.19.0,<7.0.0" [package.extras] testing = ["google-api-core (>=1.31.5)"] [[package]] name = "protobuf" -version = "5.29.3" +version = "6.30.2" description = "" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["main"] files = [ - {file = "protobuf-5.29.3-cp310-abi3-win32.whl", hash = "sha256:3ea51771449e1035f26069c4c7fd51fba990d07bc55ba80701c78f886bf9c888"}, - {file = "protobuf-5.29.3-cp310-abi3-win_amd64.whl", hash = "sha256:a4fa6f80816a9a0678429e84973f2f98cbc218cca434abe8db2ad0bffc98503a"}, - {file = "protobuf-5.29.3-cp38-abi3-macosx_10_9_universal2.whl", hash = "sha256:a8434404bbf139aa9e1300dbf989667a83d42ddda9153d8ab76e0d5dcaca484e"}, - {file = "protobuf-5.29.3-cp38-abi3-manylinux2014_aarch64.whl", hash = "sha256:daaf63f70f25e8689c072cfad4334ca0ac1d1e05a92fc15c54eb9cf23c3efd84"}, - {file = "protobuf-5.29.3-cp38-abi3-manylinux2014_x86_64.whl", hash = "sha256:c027e08a08be10b67c06bf2370b99c811c466398c357e615ca88c91c07f0910f"}, - {file = "protobuf-5.29.3-cp38-cp38-win32.whl", hash = "sha256:84a57163a0ccef3f96e4b6a20516cedcf5bb3a95a657131c5c3ac62200d23252"}, - {file = "protobuf-5.29.3-cp38-cp38-win_amd64.whl", hash = "sha256:b89c115d877892a512f79a8114564fb435943b59067615894c3b13cd3e1fa107"}, - {file = "protobuf-5.29.3-cp39-cp39-win32.whl", hash = "sha256:0eb32bfa5219fc8d4111803e9a690658aa2e6366384fd0851064b963b6d1f2a7"}, - {file = "protobuf-5.29.3-cp39-cp39-win_amd64.whl", hash = "sha256:6ce8cc3389a20693bfde6c6562e03474c40851b44975c9b2bf6df7d8c4f864da"}, - {file = "protobuf-5.29.3-py3-none-any.whl", hash = "sha256:0a18ed4a24198528f2333802eb075e59dea9d679ab7a6c5efb017a59004d849f"}, - {file = "protobuf-5.29.3.tar.gz", hash = "sha256:5da0f41edaf117bde316404bad1a486cb4ededf8e4a54891296f648e8e076620"}, + {file = "protobuf-6.30.2-cp310-abi3-win32.whl", hash = "sha256:b12ef7df7b9329886e66404bef5e9ce6a26b54069d7f7436a0853ccdeb91c103"}, + {file = "protobuf-6.30.2-cp310-abi3-win_amd64.whl", hash = "sha256:7653c99774f73fe6b9301b87da52af0e69783a2e371e8b599b3e9cb4da4b12b9"}, + {file = "protobuf-6.30.2-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:0eb523c550a66a09a0c20f86dd554afbf4d32b02af34ae53d93268c1f73bc65b"}, + {file = "protobuf-6.30.2-cp39-abi3-manylinux2014_aarch64.whl", hash = "sha256:50f32cc9fd9cb09c783ebc275611b4f19dfdfb68d1ee55d2f0c7fa040df96815"}, + {file = "protobuf-6.30.2-cp39-abi3-manylinux2014_x86_64.whl", hash = "sha256:4f6c687ae8efae6cf6093389a596548214467778146b7245e886f35e1485315d"}, + {file = "protobuf-6.30.2-cp39-cp39-win32.whl", hash = "sha256:524afedc03b31b15586ca7f64d877a98b184f007180ce25183d1a5cb230ee72b"}, + {file = "protobuf-6.30.2-cp39-cp39-win_amd64.whl", hash = "sha256:acec579c39c88bd8fbbacab1b8052c793efe83a0a5bd99db4a31423a25c0a0e2"}, + {file = "protobuf-6.30.2-py3-none-any.whl", hash = "sha256:ae86b030e69a98e08c77beab574cbcb9fff6d031d57209f574a5aea1445f4b51"}, + {file = "protobuf-6.30.2.tar.gz", hash = "sha256:35c859ae076d8c56054c25b59e5e59638d86545ed6e2b6efac6be0b6ea3ba048"}, ] [[package]] @@ -3661,18 +3719,18 @@ files = [ [[package]] name = "pyasn1-modules" -version = "0.4.1" +version = "0.4.2" description = "A collection of ASN.1-based protocols modules" optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "pyasn1_modules-0.4.1-py3-none-any.whl", hash = "sha256:49bfa96b45a292b711e986f222502c1c9a5e1f4e568fc30e2574a6c7d07838fd"}, - {file = "pyasn1_modules-0.4.1.tar.gz", hash = "sha256:c28e2dbf9c06ad61c71a075c7e0f9fd0f1b0bb2d2ad4377f240d33ac2ab60a7c"}, + {file = "pyasn1_modules-0.4.2-py3-none-any.whl", hash = "sha256:29253a9207ce32b64c3ac6600edc75368f98473906e8fd1043bd6b5b1de2c14a"}, + {file = "pyasn1_modules-0.4.2.tar.gz", hash = "sha256:677091de870a80aae844b1ca6134f54652fa2c8c5a52aa396440ac3106e941e6"}, ] [package.dependencies] -pyasn1 = ">=0.4.6,<0.7.0" +pyasn1 = ">=0.6.1,<0.7.0" [[package]] name = "pycodestyle" @@ -3693,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" @@ -3778,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" @@ -3847,14 +3925,14 @@ testutils = ["gitpython (>3)"] [[package]] name = "pymdown-extensions" -version = "10.14" +version = "10.14.3" description = "Extension pack for Python Markdown." optional = false python-versions = ">=3.8" groups = ["docs"] files = [ - {file = "pymdown_extensions-10.14-py3-none-any.whl", hash = "sha256:202481f716cc8250e4be8fce997781ebf7917701b59652458ee47f2401f818b5"}, - {file = "pymdown_extensions-10.14.tar.gz", hash = "sha256:741bd7c4ff961ba40b7528d32284c53bc436b8b1645e8e37c3e57770b8700a34"}, + {file = "pymdown_extensions-10.14.3-py3-none-any.whl", hash = "sha256:05e0bee73d64b9c71a4ae17c72abc2f700e8bc8403755a00580b49a4e9f189e9"}, + {file = "pymdown_extensions-10.14.3.tar.gz", hash = "sha256:41e576ce3f5d650be59e900e4ceff231e0aed2a88cf30acaee41e02f063a061b"}, ] [package.dependencies] @@ -3864,16 +3942,69 @@ 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.1" +version = "3.2.3" description = "pyparsing module - Classes and methods to define and execute parsing grammars" optional = false python-versions = ">=3.9" groups = ["main", "dev"] files = [ - {file = "pyparsing-3.2.1-py3-none-any.whl", hash = "sha256:506ff4f4386c4cec0590ec19e6302d3aedb992fdc02c761e90416f158dacf8e1"}, - {file = "pyparsing-3.2.1.tar.gz", hash = "sha256:61980854fd66de3a90028d679a954d5f2623e83144b5afe5ee86f43d762e5f0a"}, + {file = "pyparsing-3.2.3-py3-none-any.whl", hash = "sha256:a749938e02d6fd0b59b356ca504a24982314bb090c383e3cf201c95ef7e2bfcf"}, + {file = "pyparsing-3.2.3.tar.gz", hash = "sha256:b9c13f1ab8b3b542f72e28f634bad4de758ab3ce4546e4301970ad6fa77c38be"}, ] [package.extras] @@ -4006,32 +4137,30 @@ files = [ [[package]] name = "pywin32" -version = "308" +version = "310" description = "Python for Window Extensions" optional = false python-versions = "*" -groups = ["main", "dev"] +groups = ["dev"] +markers = "sys_platform == \"win32\"" files = [ - {file = "pywin32-308-cp310-cp310-win32.whl", hash = "sha256:796ff4426437896550d2981b9c2ac0ffd75238ad9ea2d3bfa67a1abd546d262e"}, - {file = "pywin32-308-cp310-cp310-win_amd64.whl", hash = "sha256:4fc888c59b3c0bef905ce7eb7e2106a07712015ea1c8234b703a088d46110e8e"}, - {file = "pywin32-308-cp310-cp310-win_arm64.whl", hash = "sha256:a5ab5381813b40f264fa3495b98af850098f814a25a63589a8e9eb12560f450c"}, - {file = "pywin32-308-cp311-cp311-win32.whl", hash = "sha256:5d8c8015b24a7d6855b1550d8e660d8daa09983c80e5daf89a273e5c6fb5095a"}, - {file = "pywin32-308-cp311-cp311-win_amd64.whl", hash = "sha256:575621b90f0dc2695fec346b2d6302faebd4f0f45c05ea29404cefe35d89442b"}, - {file = "pywin32-308-cp311-cp311-win_arm64.whl", hash = "sha256:100a5442b7332070983c4cd03f2e906a5648a5104b8a7f50175f7906efd16bb6"}, - {file = "pywin32-308-cp312-cp312-win32.whl", hash = "sha256:587f3e19696f4bf96fde9d8a57cec74a57021ad5f204c9e627e15c33ff568897"}, - {file = "pywin32-308-cp312-cp312-win_amd64.whl", hash = "sha256:00b3e11ef09ede56c6a43c71f2d31857cf7c54b0ab6e78ac659497abd2834f47"}, - {file = "pywin32-308-cp312-cp312-win_arm64.whl", hash = "sha256:9b4de86c8d909aed15b7011182c8cab38c8850de36e6afb1f0db22b8959e3091"}, - {file = "pywin32-308-cp313-cp313-win32.whl", hash = "sha256:1c44539a37a5b7b21d02ab34e6a4d314e0788f1690d65b48e9b0b89f31abbbed"}, - {file = "pywin32-308-cp313-cp313-win_amd64.whl", hash = "sha256:fd380990e792eaf6827fcb7e187b2b4b1cede0585e3d0c9e84201ec27b9905e4"}, - {file = "pywin32-308-cp313-cp313-win_arm64.whl", hash = "sha256:ef313c46d4c18dfb82a2431e3051ac8f112ccee1a34f29c263c583c568db63cd"}, - {file = "pywin32-308-cp37-cp37m-win32.whl", hash = "sha256:1f696ab352a2ddd63bd07430080dd598e6369152ea13a25ebcdd2f503a38f1ff"}, - {file = "pywin32-308-cp37-cp37m-win_amd64.whl", hash = "sha256:13dcb914ed4347019fbec6697a01a0aec61019c1046c2b905410d197856326a6"}, - {file = "pywin32-308-cp38-cp38-win32.whl", hash = "sha256:5794e764ebcabf4ff08c555b31bd348c9025929371763b2183172ff4708152f0"}, - {file = "pywin32-308-cp38-cp38-win_amd64.whl", hash = "sha256:3b92622e29d651c6b783e368ba7d6722b1634b8e70bd376fd7610fe1992e19de"}, - {file = "pywin32-308-cp39-cp39-win32.whl", hash = "sha256:7873ca4dc60ab3287919881a7d4f88baee4a6e639aa6962de25a98ba6b193341"}, - {file = "pywin32-308-cp39-cp39-win_amd64.whl", hash = "sha256:71b3322d949b4cc20776436a9c9ba0eeedcbc9c650daa536df63f0ff111bb920"}, + {file = "pywin32-310-cp310-cp310-win32.whl", hash = "sha256:6dd97011efc8bf51d6793a82292419eba2c71cf8e7250cfac03bba284454abc1"}, + {file = "pywin32-310-cp310-cp310-win_amd64.whl", hash = "sha256:c3e78706e4229b915a0821941a84e7ef420bf2b77e08c9dae3c76fd03fd2ae3d"}, + {file = "pywin32-310-cp310-cp310-win_arm64.whl", hash = "sha256:33babed0cf0c92a6f94cc6cc13546ab24ee13e3e800e61ed87609ab91e4c8213"}, + {file = "pywin32-310-cp311-cp311-win32.whl", hash = "sha256:1e765f9564e83011a63321bb9d27ec456a0ed90d3732c4b2e312b855365ed8bd"}, + {file = "pywin32-310-cp311-cp311-win_amd64.whl", hash = "sha256:126298077a9d7c95c53823934f000599f66ec9296b09167810eb24875f32689c"}, + {file = "pywin32-310-cp311-cp311-win_arm64.whl", hash = "sha256:19ec5fc9b1d51c4350be7bb00760ffce46e6c95eaf2f0b2f1150657b1a43c582"}, + {file = "pywin32-310-cp312-cp312-win32.whl", hash = "sha256:8a75a5cc3893e83a108c05d82198880704c44bbaee4d06e442e471d3c9ea4f3d"}, + {file = "pywin32-310-cp312-cp312-win_amd64.whl", hash = "sha256:bf5c397c9a9a19a6f62f3fb821fbf36cac08f03770056711f765ec1503972060"}, + {file = "pywin32-310-cp312-cp312-win_arm64.whl", hash = "sha256:2349cc906eae872d0663d4d6290d13b90621eaf78964bb1578632ff20e152966"}, + {file = "pywin32-310-cp313-cp313-win32.whl", hash = "sha256:5d241a659c496ada3253cd01cfaa779b048e90ce4b2b38cd44168ad555ce74ab"}, + {file = "pywin32-310-cp313-cp313-win_amd64.whl", hash = "sha256:667827eb3a90208ddbdcc9e860c81bde63a135710e21e4cb3348968e4bd5249e"}, + {file = "pywin32-310-cp313-cp313-win_arm64.whl", hash = "sha256:e308f831de771482b7cf692a1f308f8fca701b2d8f9dde6cc440c7da17e47b33"}, + {file = "pywin32-310-cp38-cp38-win32.whl", hash = "sha256:0867beb8addefa2e3979d4084352e4ac6e991ca45373390775f7084cc0209b9c"}, + {file = "pywin32-310-cp38-cp38-win_amd64.whl", hash = "sha256:30f0a9b3138fb5e07eb4973b7077e1883f558e40c578c6925acc7a94c34eaa36"}, + {file = "pywin32-310-cp39-cp39-win32.whl", hash = "sha256:851c8d927af0d879221e616ae1f66145253537bbdd321a77e8ef701b443a9a1a"}, + {file = "pywin32-310-cp39-cp39-win_amd64.whl", hash = "sha256:96867217335559ac619f00ad70e513c0fcf84b8a3af9fc2bba3b59b97da70475"}, ] -markers = {main = "platform_system == \"Windows\"", dev = "sys_platform == \"win32\""} [[package]] name = "pyyaml" @@ -4113,19 +4242,20 @@ pyyaml = "*" [[package]] name = "referencing" -version = "0.35.1" +version = "0.36.2" description = "JSON Referencing + Python" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["main", "dev"] files = [ - {file = "referencing-0.35.1-py3-none-any.whl", hash = "sha256:eda6d3234d62814d1c64e305c1331c9a3a6132da475ab6382eaa997b21ee75de"}, - {file = "referencing-0.35.1.tar.gz", hash = "sha256:25b42124a6c8b632a425174f24087783efb348a6f1e0008e63cd4466fedf703c"}, + {file = "referencing-0.36.2-py3-none-any.whl", hash = "sha256:e8699adbbf8b5c7de96d8ffa0eb5c158b3beafce084968e2ea8bb08c6794dcd0"}, + {file = "referencing-0.36.2.tar.gz", hash = "sha256:df2e89862cd09deabbdba16944cc3f10feb6b3e6f18e902f7cc25609a34775aa"}, ] [package.dependencies] attrs = ">=22.2.0" rpds-py = ">=0.7.0" +typing-extensions = {version = ">=4.4.0", markers = "python_version < \"3.13\""} [[package]] name = "regex" @@ -4289,14 +4419,14 @@ rsa = ["oauthlib[signedtoken] (>=3.0.0)"] [[package]] name = "responses" -version = "0.25.6" +version = "0.25.7" description = "A utility library for mocking out the `requests` Python library." optional = false python-versions = ">=3.8" groups = ["dev"] files = [ - {file = "responses-0.25.6-py3-none-any.whl", hash = "sha256:9cac8f21e1193bb150ec557875377e41ed56248aed94e4567ed644db564bacf1"}, - {file = "responses-0.25.6.tar.gz", hash = "sha256:eae7ce61a9603004e76c05691e7c389e59652d91e94b419623c12bbfb8e331d8"}, + {file = "responses-0.25.7-py3-none-any.whl", hash = "sha256:92ca17416c90fe6b35921f52179bff29332076bb32694c0df02dcac2c6bc043c"}, + {file = "responses-0.25.7.tar.gz", hash = "sha256:8ebae11405d7a5df79ab6fd54277f6f2bc29b2d002d0dd2d5c632594d1ddcedb"}, ] [package.dependencies] @@ -4339,14 +4469,14 @@ six = "*" [[package]] name = "rich" -version = "13.9.4" +version = "14.0.0" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" optional = false python-versions = ">=3.8.0" groups = ["dev"] files = [ - {file = "rich-13.9.4-py3-none-any.whl", hash = "sha256:6049d5e6ec054bf2779ab3358186963bac2ea89175919d699e378b99738c2a90"}, - {file = "rich-13.9.4.tar.gz", hash = "sha256:439594978a49a09530cff7ebc4b5c7103ef57baf48d5ea3184f21d9a2befa098"}, + {file = "rich-14.0.0-py3-none-any.whl", hash = "sha256:1c9491e1951aac09caffd42f448ee3d04e58923ffe14993f6e83068dc395d7e0"}, + {file = "rich-14.0.0.tar.gz", hash = "sha256:82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725"}, ] [package.dependencies] @@ -4359,127 +4489,138 @@ jupyter = ["ipywidgets (>=7.5.1,<9)"] [[package]] name = "rpds-py" -version = "0.22.3" +version = "0.24.0" description = "Python bindings to Rust's persistent data structures (rpds)" optional = false python-versions = ">=3.9" groups = ["main", "dev"] files = [ - {file = "rpds_py-0.22.3-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:6c7b99ca52c2c1752b544e310101b98a659b720b21db00e65edca34483259967"}, - {file = "rpds_py-0.22.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:be2eb3f2495ba669d2a985f9b426c1797b7d48d6963899276d22f23e33d47e37"}, - {file = "rpds_py-0.22.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:70eb60b3ae9245ddea20f8a4190bd79c705a22f8028aaf8bbdebe4716c3fab24"}, - {file = "rpds_py-0.22.3-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:4041711832360a9b75cfb11b25a6a97c8fb49c07b8bd43d0d02b45d0b499a4ff"}, - {file = "rpds_py-0.22.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:64607d4cbf1b7e3c3c8a14948b99345eda0e161b852e122c6bb71aab6d1d798c"}, - {file = "rpds_py-0.22.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:81e69b0a0e2537f26d73b4e43ad7bc8c8efb39621639b4434b76a3de50c6966e"}, - {file = "rpds_py-0.22.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc27863442d388870c1809a87507727b799c8460573cfbb6dc0eeaef5a11b5ec"}, - {file = "rpds_py-0.22.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e79dd39f1e8c3504be0607e5fc6e86bb60fe3584bec8b782578c3b0fde8d932c"}, - {file = "rpds_py-0.22.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:e0fa2d4ec53dc51cf7d3bb22e0aa0143966119f42a0c3e4998293a3dd2856b09"}, - {file = "rpds_py-0.22.3-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:fda7cb070f442bf80b642cd56483b5548e43d366fe3f39b98e67cce780cded00"}, - {file = "rpds_py-0.22.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:cff63a0272fcd259dcc3be1657b07c929c466b067ceb1c20060e8d10af56f5bf"}, - {file = "rpds_py-0.22.3-cp310-cp310-win32.whl", hash = "sha256:9bd7228827ec7bb817089e2eb301d907c0d9827a9e558f22f762bb690b131652"}, - {file = "rpds_py-0.22.3-cp310-cp310-win_amd64.whl", hash = "sha256:9beeb01d8c190d7581a4d59522cd3d4b6887040dcfc744af99aa59fef3e041a8"}, - {file = "rpds_py-0.22.3-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:d20cfb4e099748ea39e6f7b16c91ab057989712d31761d3300d43134e26e165f"}, - {file = "rpds_py-0.22.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:68049202f67380ff9aa52f12e92b1c30115f32e6895cd7198fa2a7961621fc5a"}, - {file = "rpds_py-0.22.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fb4f868f712b2dd4bcc538b0a0c1f63a2b1d584c925e69a224d759e7070a12d5"}, - {file = "rpds_py-0.22.3-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bc51abd01f08117283c5ebf64844a35144a0843ff7b2983e0648e4d3d9f10dbb"}, - {file = "rpds_py-0.22.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0f3cec041684de9a4684b1572fe28c7267410e02450f4561700ca5a3bc6695a2"}, - {file = "rpds_py-0.22.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7ef9d9da710be50ff6809fed8f1963fecdfecc8b86656cadfca3bc24289414b0"}, - {file = "rpds_py-0.22.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:59f4a79c19232a5774aee369a0c296712ad0e77f24e62cad53160312b1c1eaa1"}, - {file = "rpds_py-0.22.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1a60bce91f81ddaac922a40bbb571a12c1070cb20ebd6d49c48e0b101d87300d"}, - {file = "rpds_py-0.22.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:e89391e6d60251560f0a8f4bd32137b077a80d9b7dbe6d5cab1cd80d2746f648"}, - {file = "rpds_py-0.22.3-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:e3fb866d9932a3d7d0c82da76d816996d1667c44891bd861a0f97ba27e84fc74"}, - {file = "rpds_py-0.22.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:1352ae4f7c717ae8cba93421a63373e582d19d55d2ee2cbb184344c82d2ae55a"}, - {file = "rpds_py-0.22.3-cp311-cp311-win32.whl", hash = "sha256:b0b4136a252cadfa1adb705bb81524eee47d9f6aab4f2ee4fa1e9d3cd4581f64"}, - {file = "rpds_py-0.22.3-cp311-cp311-win_amd64.whl", hash = "sha256:8bd7c8cfc0b8247c8799080fbff54e0b9619e17cdfeb0478ba7295d43f635d7c"}, - {file = "rpds_py-0.22.3-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:27e98004595899949bd7a7b34e91fa7c44d7a97c40fcaf1d874168bb652ec67e"}, - {file = "rpds_py-0.22.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1978d0021e943aae58b9b0b196fb4895a25cc53d3956b8e35e0b7682eefb6d56"}, - {file = "rpds_py-0.22.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:655ca44a831ecb238d124e0402d98f6212ac527a0ba6c55ca26f616604e60a45"}, - {file = "rpds_py-0.22.3-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:feea821ee2a9273771bae61194004ee2fc33f8ec7db08117ef9147d4bbcbca8e"}, - {file = "rpds_py-0.22.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:22bebe05a9ffc70ebfa127efbc429bc26ec9e9b4ee4d15a740033efda515cf3d"}, - {file = "rpds_py-0.22.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3af6e48651c4e0d2d166dc1b033b7042ea3f871504b6805ba5f4fe31581d8d38"}, - {file = "rpds_py-0.22.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e67ba3c290821343c192f7eae1d8fd5999ca2dc99994114643e2f2d3e6138b15"}, - {file = "rpds_py-0.22.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:02fbb9c288ae08bcb34fb41d516d5eeb0455ac35b5512d03181d755d80810059"}, - {file = "rpds_py-0.22.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:f56a6b404f74ab372da986d240e2e002769a7d7102cc73eb238a4f72eec5284e"}, - {file = "rpds_py-0.22.3-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:0a0461200769ab3b9ab7e513f6013b7a97fdeee41c29b9db343f3c5a8e2b9e61"}, - {file = "rpds_py-0.22.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:8633e471c6207a039eff6aa116e35f69f3156b3989ea3e2d755f7bc41754a4a7"}, - {file = "rpds_py-0.22.3-cp312-cp312-win32.whl", hash = "sha256:593eba61ba0c3baae5bc9be2f5232430453fb4432048de28399ca7376de9c627"}, - {file = "rpds_py-0.22.3-cp312-cp312-win_amd64.whl", hash = "sha256:d115bffdd417c6d806ea9069237a4ae02f513b778e3789a359bc5856e0404cc4"}, - {file = "rpds_py-0.22.3-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:ea7433ce7e4bfc3a85654aeb6747babe3f66eaf9a1d0c1e7a4435bbdf27fea84"}, - {file = "rpds_py-0.22.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:6dd9412824c4ce1aca56c47b0991e65bebb7ac3f4edccfd3f156150c96a7bf25"}, - {file = "rpds_py-0.22.3-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:20070c65396f7373f5df4005862fa162db5d25d56150bddd0b3e8214e8ef45b4"}, - {file = "rpds_py-0.22.3-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0b09865a9abc0ddff4e50b5ef65467cd94176bf1e0004184eb915cbc10fc05c5"}, - {file = "rpds_py-0.22.3-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3453e8d41fe5f17d1f8e9c383a7473cd46a63661628ec58e07777c2fff7196dc"}, - {file = "rpds_py-0.22.3-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f5d36399a1b96e1a5fdc91e0522544580dbebeb1f77f27b2b0ab25559e103b8b"}, - {file = "rpds_py-0.22.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:009de23c9c9ee54bf11303a966edf4d9087cd43a6003672e6aa7def643d06518"}, - {file = "rpds_py-0.22.3-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1aef18820ef3e4587ebe8b3bc9ba6e55892a6d7b93bac6d29d9f631a3b4befbd"}, - {file = "rpds_py-0.22.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f60bd8423be1d9d833f230fdbccf8f57af322d96bcad6599e5a771b151398eb2"}, - {file = "rpds_py-0.22.3-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:62d9cfcf4948683a18a9aff0ab7e1474d407b7bab2ca03116109f8464698ab16"}, - {file = "rpds_py-0.22.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9253fc214112405f0afa7db88739294295f0e08466987f1d70e29930262b4c8f"}, - {file = "rpds_py-0.22.3-cp313-cp313-win32.whl", hash = "sha256:fb0ba113b4983beac1a2eb16faffd76cb41e176bf58c4afe3e14b9c681f702de"}, - {file = "rpds_py-0.22.3-cp313-cp313-win_amd64.whl", hash = "sha256:c58e2339def52ef6b71b8f36d13c3688ea23fa093353f3a4fee2556e62086ec9"}, - {file = "rpds_py-0.22.3-cp313-cp313t-macosx_10_12_x86_64.whl", hash = "sha256:f82a116a1d03628a8ace4859556fb39fd1424c933341a08ea3ed6de1edb0283b"}, - {file = "rpds_py-0.22.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:3dfcbc95bd7992b16f3f7ba05af8a64ca694331bd24f9157b49dadeeb287493b"}, - {file = "rpds_py-0.22.3-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:59259dc58e57b10e7e18ce02c311804c10c5a793e6568f8af4dead03264584d1"}, - {file = "rpds_py-0.22.3-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5725dd9cc02068996d4438d397e255dcb1df776b7ceea3b9cb972bdb11260a83"}, - {file = "rpds_py-0.22.3-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:99b37292234e61325e7a5bb9689e55e48c3f5f603af88b1642666277a81f1fbd"}, - {file = "rpds_py-0.22.3-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:27b1d3b3915a99208fee9ab092b8184c420f2905b7d7feb4aeb5e4a9c509b8a1"}, - {file = "rpds_py-0.22.3-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f612463ac081803f243ff13cccc648578e2279295048f2a8d5eb430af2bae6e3"}, - {file = "rpds_py-0.22.3-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f73d3fef726b3243a811121de45193c0ca75f6407fe66f3f4e183c983573e130"}, - {file = "rpds_py-0.22.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:3f21f0495edea7fdbaaa87e633a8689cd285f8f4af5c869f27bc8074638ad69c"}, - {file = "rpds_py-0.22.3-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:1e9663daaf7a63ceccbbb8e3808fe90415b0757e2abddbfc2e06c857bf8c5e2b"}, - {file = "rpds_py-0.22.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:a76e42402542b1fae59798fab64432b2d015ab9d0c8c47ba7addddbaf7952333"}, - {file = "rpds_py-0.22.3-cp313-cp313t-win32.whl", hash = "sha256:69803198097467ee7282750acb507fba35ca22cc3b85f16cf45fb01cb9097730"}, - {file = "rpds_py-0.22.3-cp313-cp313t-win_amd64.whl", hash = "sha256:f5cf2a0c2bdadf3791b5c205d55a37a54025c6e18a71c71f82bb536cf9a454bf"}, - {file = "rpds_py-0.22.3-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:378753b4a4de2a7b34063d6f95ae81bfa7b15f2c1a04a9518e8644e81807ebea"}, - {file = "rpds_py-0.22.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3445e07bf2e8ecfeef6ef67ac83de670358abf2996916039b16a218e3d95e97e"}, - {file = "rpds_py-0.22.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7b2513ba235829860b13faa931f3b6846548021846ac808455301c23a101689d"}, - {file = "rpds_py-0.22.3-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:eaf16ae9ae519a0e237a0f528fd9f0197b9bb70f40263ee57ae53c2b8d48aeb3"}, - {file = "rpds_py-0.22.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:583f6a1993ca3369e0f80ba99d796d8e6b1a3a2a442dd4e1a79e652116413091"}, - {file = "rpds_py-0.22.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4617e1915a539a0d9a9567795023de41a87106522ff83fbfaf1f6baf8e85437e"}, - {file = "rpds_py-0.22.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0c150c7a61ed4a4f4955a96626574e9baf1adf772c2fb61ef6a5027e52803543"}, - {file = "rpds_py-0.22.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2fa4331c200c2521512595253f5bb70858b90f750d39b8cbfd67465f8d1b596d"}, - {file = "rpds_py-0.22.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:214b7a953d73b5e87f0ebece4a32a5bd83c60a3ecc9d4ec8f1dca968a2d91e99"}, - {file = "rpds_py-0.22.3-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:f47ad3d5f3258bd7058d2d506852217865afefe6153a36eb4b6928758041d831"}, - {file = "rpds_py-0.22.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:f276b245347e6e36526cbd4a266a417796fc531ddf391e43574cf6466c492520"}, - {file = "rpds_py-0.22.3-cp39-cp39-win32.whl", hash = "sha256:bbb232860e3d03d544bc03ac57855cd82ddf19c7a07651a7c0fdb95e9efea8b9"}, - {file = "rpds_py-0.22.3-cp39-cp39-win_amd64.whl", hash = "sha256:cfbc454a2880389dbb9b5b398e50d439e2e58669160f27b60e5eca11f68ae17c"}, - {file = "rpds_py-0.22.3-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:d48424e39c2611ee1b84ad0f44fb3b2b53d473e65de061e3f460fc0be5f1939d"}, - {file = "rpds_py-0.22.3-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:24e8abb5878e250f2eb0d7859a8e561846f98910326d06c0d51381fed59357bd"}, - {file = "rpds_py-0.22.3-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4b232061ca880db21fa14defe219840ad9b74b6158adb52ddf0e87bead9e8493"}, - {file = "rpds_py-0.22.3-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ac0a03221cdb5058ce0167ecc92a8c89e8d0decdc9e99a2ec23380793c4dcb96"}, - {file = "rpds_py-0.22.3-pp310-pypy310_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:eb0c341fa71df5a4595f9501df4ac5abfb5a09580081dffbd1ddd4654e6e9123"}, - {file = "rpds_py-0.22.3-pp310-pypy310_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bf9db5488121b596dbfc6718c76092fda77b703c1f7533a226a5a9f65248f8ad"}, - {file = "rpds_py-0.22.3-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0b8db6b5b2d4491ad5b6bdc2bc7c017eec108acbf4e6785f42a9eb0ba234f4c9"}, - {file = "rpds_py-0.22.3-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b3d504047aba448d70cf6fa22e06cb09f7cbd761939fdd47604f5e007675c24e"}, - {file = "rpds_py-0.22.3-pp310-pypy310_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:e61b02c3f7a1e0b75e20c3978f7135fd13cb6cf551bf4a6d29b999a88830a338"}, - {file = "rpds_py-0.22.3-pp310-pypy310_pp73-musllinux_1_2_i686.whl", hash = "sha256:e35ba67d65d49080e8e5a1dd40101fccdd9798adb9b050ff670b7d74fa41c566"}, - {file = "rpds_py-0.22.3-pp310-pypy310_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:26fd7cac7dd51011a245f29a2cc6489c4608b5a8ce8d75661bb4a1066c52dfbe"}, - {file = "rpds_py-0.22.3-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:177c7c0fce2855833819c98e43c262007f42ce86651ffbb84f37883308cb0e7d"}, - {file = "rpds_py-0.22.3-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:bb47271f60660803ad11f4c61b42242b8c1312a31c98c578f79ef9387bbde21c"}, - {file = "rpds_py-0.22.3-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:70fb28128acbfd264eda9bf47015537ba3fe86e40d046eb2963d75024be4d055"}, - {file = "rpds_py-0.22.3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:44d61b4b7d0c2c9ac019c314e52d7cbda0ae31078aabd0f22e583af3e0d79723"}, - {file = "rpds_py-0.22.3-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5f0e260eaf54380380ac3808aa4ebe2d8ca28b9087cf411649f96bad6900c728"}, - {file = "rpds_py-0.22.3-pp39-pypy39_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b25bc607423935079e05619d7de556c91fb6adeae9d5f80868dde3468657994b"}, - {file = "rpds_py-0.22.3-pp39-pypy39_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fb6116dfb8d1925cbdb52595560584db42a7f664617a1f7d7f6e32f138cdf37d"}, - {file = "rpds_py-0.22.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a63cbdd98acef6570c62b92a1e43266f9e8b21e699c363c0fef13bd530799c11"}, - {file = "rpds_py-0.22.3-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2b8f60e1b739a74bab7e01fcbe3dddd4657ec685caa04681df9d562ef15b625f"}, - {file = "rpds_py-0.22.3-pp39-pypy39_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:2e8b55d8517a2fda8d95cb45d62a5a8bbf9dd0ad39c5b25c8833efea07b880ca"}, - {file = "rpds_py-0.22.3-pp39-pypy39_pp73-musllinux_1_2_i686.whl", hash = "sha256:2de29005e11637e7a2361fa151f780ff8eb2543a0da1413bb951e9f14b699ef3"}, - {file = "rpds_py-0.22.3-pp39-pypy39_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:666ecce376999bf619756a24ce15bb14c5bfaf04bf00abc7e663ce17c3f34fe7"}, - {file = "rpds_py-0.22.3-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:5246b14ca64a8675e0a7161f7af68fe3e910e6b90542b4bfb5439ba752191df6"}, - {file = "rpds_py-0.22.3.tar.gz", hash = "sha256:e32fee8ab45d3c2db6da19a5323bc3362237c8b653c70194414b892fd06a080d"}, + {file = "rpds_py-0.24.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:006f4342fe729a368c6df36578d7a348c7c716be1da0a1a0f86e3021f8e98724"}, + {file = "rpds_py-0.24.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2d53747da70a4e4b17f559569d5f9506420966083a31c5fbd84e764461c4444b"}, + {file = "rpds_py-0.24.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e8acd55bd5b071156bae57b555f5d33697998752673b9de554dd82f5b5352727"}, + {file = "rpds_py-0.24.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7e80d375134ddb04231a53800503752093dbb65dad8dabacce2c84cccc78e964"}, + {file = "rpds_py-0.24.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:60748789e028d2a46fc1c70750454f83c6bdd0d05db50f5ae83e2db500b34da5"}, + {file = "rpds_py-0.24.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6e1daf5bf6c2be39654beae83ee6b9a12347cb5aced9a29eecf12a2d25fff664"}, + {file = "rpds_py-0.24.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1b221c2457d92a1fb3c97bee9095c874144d196f47c038462ae6e4a14436f7bc"}, + {file = "rpds_py-0.24.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:66420986c9afff67ef0c5d1e4cdc2d0e5262f53ad11e4f90e5e22448df485bf0"}, + {file = "rpds_py-0.24.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:43dba99f00f1d37b2a0265a259592d05fcc8e7c19d140fe51c6e6f16faabeb1f"}, + {file = "rpds_py-0.24.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:a88c0d17d039333a41d9bf4616bd062f0bd7aa0edeb6cafe00a2fc2a804e944f"}, + {file = "rpds_py-0.24.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:cc31e13ce212e14a539d430428cd365e74f8b2d534f8bc22dd4c9c55b277b875"}, + {file = "rpds_py-0.24.0-cp310-cp310-win32.whl", hash = "sha256:fc2c1e1b00f88317d9de6b2c2b39b012ebbfe35fe5e7bef980fd2a91f6100a07"}, + {file = "rpds_py-0.24.0-cp310-cp310-win_amd64.whl", hash = "sha256:c0145295ca415668420ad142ee42189f78d27af806fcf1f32a18e51d47dd2052"}, + {file = "rpds_py-0.24.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:2d3ee4615df36ab8eb16c2507b11e764dcc11fd350bbf4da16d09cda11fcedef"}, + {file = "rpds_py-0.24.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e13ae74a8a3a0c2f22f450f773e35f893484fcfacb00bb4344a7e0f4f48e1f97"}, + {file = "rpds_py-0.24.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cf86f72d705fc2ef776bb7dd9e5fbba79d7e1f3e258bf9377f8204ad0fc1c51e"}, + {file = "rpds_py-0.24.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c43583ea8517ed2e780a345dd9960896afc1327e8cf3ac8239c167530397440d"}, + {file = "rpds_py-0.24.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4cd031e63bc5f05bdcda120646a0d32f6d729486d0067f09d79c8db5368f4586"}, + {file = "rpds_py-0.24.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:34d90ad8c045df9a4259c47d2e16a3f21fdb396665c94520dbfe8766e62187a4"}, + {file = "rpds_py-0.24.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e838bf2bb0b91ee67bf2b889a1a841e5ecac06dd7a2b1ef4e6151e2ce155c7ae"}, + {file = "rpds_py-0.24.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:04ecf5c1ff4d589987b4d9882872f80ba13da7d42427234fce8f22efb43133bc"}, + {file = "rpds_py-0.24.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:630d3d8ea77eabd6cbcd2ea712e1c5cecb5b558d39547ac988351195db433f6c"}, + {file = "rpds_py-0.24.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:ebcb786b9ff30b994d5969213a8430cbb984cdd7ea9fd6df06663194bd3c450c"}, + {file = "rpds_py-0.24.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:174e46569968ddbbeb8a806d9922f17cd2b524aa753b468f35b97ff9c19cb718"}, + {file = "rpds_py-0.24.0-cp311-cp311-win32.whl", hash = "sha256:5ef877fa3bbfb40b388a5ae1cb00636a624690dcb9a29a65267054c9ea86d88a"}, + {file = "rpds_py-0.24.0-cp311-cp311-win_amd64.whl", hash = "sha256:e274f62cbd274359eff63e5c7e7274c913e8e09620f6a57aae66744b3df046d6"}, + {file = "rpds_py-0.24.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:d8551e733626afec514b5d15befabea0dd70a343a9f23322860c4f16a9430205"}, + {file = "rpds_py-0.24.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0e374c0ce0ca82e5b67cd61fb964077d40ec177dd2c4eda67dba130de09085c7"}, + {file = "rpds_py-0.24.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d69d003296df4840bd445a5d15fa5b6ff6ac40496f956a221c4d1f6f7b4bc4d9"}, + {file = "rpds_py-0.24.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8212ff58ac6dfde49946bea57474a386cca3f7706fc72c25b772b9ca4af6b79e"}, + {file = "rpds_py-0.24.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:528927e63a70b4d5f3f5ccc1fa988a35456eb5d15f804d276709c33fc2f19bda"}, + {file = "rpds_py-0.24.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a824d2c7a703ba6daaca848f9c3d5cb93af0505be505de70e7e66829affd676e"}, + {file = "rpds_py-0.24.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:44d51febb7a114293ffd56c6cf4736cb31cd68c0fddd6aa303ed09ea5a48e029"}, + {file = "rpds_py-0.24.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:3fab5f4a2c64a8fb64fc13b3d139848817a64d467dd6ed60dcdd6b479e7febc9"}, + {file = "rpds_py-0.24.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:9be4f99bee42ac107870c61dfdb294d912bf81c3c6d45538aad7aecab468b6b7"}, + {file = "rpds_py-0.24.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:564c96b6076a98215af52f55efa90d8419cc2ef45d99e314fddefe816bc24f91"}, + {file = "rpds_py-0.24.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:75a810b7664c17f24bf2ffd7f92416c00ec84b49bb68e6a0d93e542406336b56"}, + {file = "rpds_py-0.24.0-cp312-cp312-win32.whl", hash = "sha256:f6016bd950be4dcd047b7475fdf55fb1e1f59fc7403f387be0e8123e4a576d30"}, + {file = "rpds_py-0.24.0-cp312-cp312-win_amd64.whl", hash = "sha256:998c01b8e71cf051c28f5d6f1187abbdf5cf45fc0efce5da6c06447cba997034"}, + {file = "rpds_py-0.24.0-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:3d2d8e4508e15fc05b31285c4b00ddf2e0eb94259c2dc896771966a163122a0c"}, + {file = "rpds_py-0.24.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:0f00c16e089282ad68a3820fd0c831c35d3194b7cdc31d6e469511d9bffc535c"}, + {file = "rpds_py-0.24.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:951cc481c0c395c4a08639a469d53b7d4afa252529a085418b82a6b43c45c240"}, + {file = "rpds_py-0.24.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c9ca89938dff18828a328af41ffdf3902405a19f4131c88e22e776a8e228c5a8"}, + {file = "rpds_py-0.24.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ed0ef550042a8dbcd657dfb284a8ee00f0ba269d3f2286b0493b15a5694f9fe8"}, + {file = "rpds_py-0.24.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2b2356688e5d958c4d5cb964af865bea84db29971d3e563fb78e46e20fe1848b"}, + {file = "rpds_py-0.24.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:78884d155fd15d9f64f5d6124b486f3d3f7fd7cd71a78e9670a0f6f6ca06fb2d"}, + {file = "rpds_py-0.24.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6a4a535013aeeef13c5532f802708cecae8d66c282babb5cd916379b72110cf7"}, + {file = "rpds_py-0.24.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:84e0566f15cf4d769dade9b366b7b87c959be472c92dffb70462dd0844d7cbad"}, + {file = "rpds_py-0.24.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:823e74ab6fbaa028ec89615ff6acb409e90ff45580c45920d4dfdddb069f2120"}, + {file = "rpds_py-0.24.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:c61a2cb0085c8783906b2f8b1f16a7e65777823c7f4d0a6aaffe26dc0d358dd9"}, + {file = "rpds_py-0.24.0-cp313-cp313-win32.whl", hash = "sha256:60d9b630c8025b9458a9d114e3af579a2c54bd32df601c4581bd054e85258143"}, + {file = "rpds_py-0.24.0-cp313-cp313-win_amd64.whl", hash = "sha256:6eea559077d29486c68218178ea946263b87f1c41ae7f996b1f30a983c476a5a"}, + {file = "rpds_py-0.24.0-cp313-cp313t-macosx_10_12_x86_64.whl", hash = "sha256:d09dc82af2d3c17e7dd17120b202a79b578d79f2b5424bda209d9966efeed114"}, + {file = "rpds_py-0.24.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:5fc13b44de6419d1e7a7e592a4885b323fbc2f46e1f22151e3a8ed3b8b920405"}, + {file = "rpds_py-0.24.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c347a20d79cedc0a7bd51c4d4b7dbc613ca4e65a756b5c3e57ec84bd43505b47"}, + {file = "rpds_py-0.24.0-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:20f2712bd1cc26a3cc16c5a1bfee9ed1abc33d4cdf1aabd297fe0eb724df4272"}, + {file = "rpds_py-0.24.0-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:aad911555286884be1e427ef0dc0ba3929e6821cbeca2194b13dc415a462c7fd"}, + {file = "rpds_py-0.24.0-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0aeb3329c1721c43c58cae274d7d2ca85c1690d89485d9c63a006cb79a85771a"}, + {file = "rpds_py-0.24.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2a0f156e9509cee987283abd2296ec816225145a13ed0391df8f71bf1d789e2d"}, + {file = "rpds_py-0.24.0-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:aa6800adc8204ce898c8a424303969b7aa6a5e4ad2789c13f8648739830323b7"}, + {file = "rpds_py-0.24.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:a18fc371e900a21d7392517c6f60fe859e802547309e94313cd8181ad9db004d"}, + {file = "rpds_py-0.24.0-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:9168764133fd919f8dcca2ead66de0105f4ef5659cbb4fa044f7014bed9a1797"}, + {file = "rpds_py-0.24.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:5f6e3cec44ba05ee5cbdebe92d052f69b63ae792e7d05f1020ac5e964394080c"}, + {file = "rpds_py-0.24.0-cp313-cp313t-win32.whl", hash = "sha256:8ebc7e65ca4b111d928b669713865f021b7773350eeac4a31d3e70144297baba"}, + {file = "rpds_py-0.24.0-cp313-cp313t-win_amd64.whl", hash = "sha256:675269d407a257b8c00a6b58205b72eec8231656506c56fd429d924ca00bb350"}, + {file = "rpds_py-0.24.0-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:a36b452abbf29f68527cf52e181fced56685731c86b52e852053e38d8b60bc8d"}, + {file = "rpds_py-0.24.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:8b3b397eefecec8e8e39fa65c630ef70a24b09141a6f9fc17b3c3a50bed6b50e"}, + {file = "rpds_py-0.24.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cdabcd3beb2a6dca7027007473d8ef1c3b053347c76f685f5f060a00327b8b65"}, + {file = "rpds_py-0.24.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5db385bacd0c43f24be92b60c857cf760b7f10d8234f4bd4be67b5b20a7c0b6b"}, + {file = "rpds_py-0.24.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8097b3422d020ff1c44effc40ae58e67d93e60d540a65649d2cdaf9466030791"}, + {file = "rpds_py-0.24.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:493fe54318bed7d124ce272fc36adbf59d46729659b2c792e87c3b95649cdee9"}, + {file = "rpds_py-0.24.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8aa362811ccdc1f8dadcc916c6d47e554169ab79559319ae9fae7d7752d0d60c"}, + {file = "rpds_py-0.24.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d8f9a6e7fd5434817526815f09ea27f2746c4a51ee11bb3439065f5fc754db58"}, + {file = "rpds_py-0.24.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:8205ee14463248d3349131bb8099efe15cd3ce83b8ef3ace63c7e976998e7124"}, + {file = "rpds_py-0.24.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:921ae54f9ecba3b6325df425cf72c074cd469dea843fb5743a26ca7fb2ccb149"}, + {file = "rpds_py-0.24.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:32bab0a56eac685828e00cc2f5d1200c548f8bc11f2e44abf311d6b548ce2e45"}, + {file = "rpds_py-0.24.0-cp39-cp39-win32.whl", hash = "sha256:f5c0ed12926dec1dfe7d645333ea59cf93f4d07750986a586f511c0bc61fe103"}, + {file = "rpds_py-0.24.0-cp39-cp39-win_amd64.whl", hash = "sha256:afc6e35f344490faa8276b5f2f7cbf71f88bc2cda4328e00553bd451728c571f"}, + {file = "rpds_py-0.24.0-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:619ca56a5468f933d940e1bf431c6f4e13bef8e688698b067ae68eb4f9b30e3a"}, + {file = "rpds_py-0.24.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:4b28e5122829181de1898c2c97f81c0b3246d49f585f22743a1246420bb8d399"}, + {file = "rpds_py-0.24.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e8e5ab32cf9eb3647450bc74eb201b27c185d3857276162c101c0f8c6374e098"}, + {file = "rpds_py-0.24.0-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:208b3a70a98cf3710e97cabdc308a51cd4f28aa6e7bb11de3d56cd8b74bab98d"}, + {file = "rpds_py-0.24.0-pp310-pypy310_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bbc4362e06f950c62cad3d4abf1191021b2ffaf0b31ac230fbf0526453eee75e"}, + {file = "rpds_py-0.24.0-pp310-pypy310_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ebea2821cdb5f9fef44933617be76185b80150632736f3d76e54829ab4a3b4d1"}, + {file = "rpds_py-0.24.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b9a4df06c35465ef4d81799999bba810c68d29972bf1c31db61bfdb81dd9d5bb"}, + {file = "rpds_py-0.24.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d3aa13bdf38630da298f2e0d77aca967b200b8cc1473ea05248f6c5e9c9bdb44"}, + {file = "rpds_py-0.24.0-pp310-pypy310_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:041f00419e1da7a03c46042453598479f45be3d787eb837af382bfc169c0db33"}, + {file = "rpds_py-0.24.0-pp310-pypy310_pp73-musllinux_1_2_i686.whl", hash = "sha256:d8754d872a5dfc3c5bf9c0e059e8107451364a30d9fd50f1f1a85c4fb9481164"}, + {file = "rpds_py-0.24.0-pp310-pypy310_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:896c41007931217a343eff197c34513c154267636c8056fb409eafd494c3dcdc"}, + {file = "rpds_py-0.24.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:92558d37d872e808944c3c96d0423b8604879a3d1c86fdad508d7ed91ea547d5"}, + {file = "rpds_py-0.24.0-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:f9e0057a509e096e47c87f753136c9b10d7a91842d8042c2ee6866899a717c0d"}, + {file = "rpds_py-0.24.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:d6e109a454412ab82979c5b1b3aee0604eca4bbf9a02693bb9df027af2bfa91a"}, + {file = "rpds_py-0.24.0-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fc1c892b1ec1f8cbd5da8de287577b455e388d9c328ad592eabbdcb6fc93bee5"}, + {file = "rpds_py-0.24.0-pp311-pypy311_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:9c39438c55983d48f4bb3487734d040e22dad200dab22c41e331cee145e7a50d"}, + {file = "rpds_py-0.24.0-pp311-pypy311_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9d7e8ce990ae17dda686f7e82fd41a055c668e13ddcf058e7fb5e9da20b57793"}, + {file = "rpds_py-0.24.0-pp311-pypy311_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9ea7f4174d2e4194289cb0c4e172d83e79a6404297ff95f2875cf9ac9bced8ba"}, + {file = "rpds_py-0.24.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bb2954155bb8f63bb19d56d80e5e5320b61d71084617ed89efedb861a684baea"}, + {file = "rpds_py-0.24.0-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:04f2b712a2206e13800a8136b07aaedc23af3facab84918e7aa89e4be0260032"}, + {file = "rpds_py-0.24.0-pp311-pypy311_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:eda5c1e2a715a4cbbca2d6d304988460942551e4e5e3b7457b50943cd741626d"}, + {file = "rpds_py-0.24.0-pp311-pypy311_pp73-musllinux_1_2_i686.whl", hash = "sha256:9abc80fe8c1f87218db116016de575a7998ab1629078c90840e8d11ab423ee25"}, + {file = "rpds_py-0.24.0-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:6a727fd083009bc83eb83d6950f0c32b3c94c8b80a9b667c87f4bd1274ca30ba"}, + {file = "rpds_py-0.24.0-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:e0f3ef95795efcd3b2ec3fe0a5bcfb5dadf5e3996ea2117427e524d4fbf309c6"}, + {file = "rpds_py-0.24.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:2c13777ecdbbba2077670285dd1fe50828c8742f6a4119dbef6f83ea13ad10fb"}, + {file = "rpds_py-0.24.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:79e8d804c2ccd618417e96720ad5cd076a86fa3f8cb310ea386a3e6229bae7d1"}, + {file = "rpds_py-0.24.0-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:fd822f019ccccd75c832deb7aa040bb02d70a92eb15a2f16c7987b7ad4ee8d83"}, + {file = "rpds_py-0.24.0-pp39-pypy39_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0047638c3aa0dbcd0ab99ed1e549bbf0e142c9ecc173b6492868432d8989a046"}, + {file = "rpds_py-0.24.0-pp39-pypy39_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a5b66d1b201cc71bc3081bc2f1fc36b0c1f268b773e03bbc39066651b9e18391"}, + {file = "rpds_py-0.24.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dbcbb6db5582ea33ce46a5d20a5793134b5365110d84df4e30b9d37c6fd40ad3"}, + {file = "rpds_py-0.24.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:63981feca3f110ed132fd217bf7768ee8ed738a55549883628ee3da75bb9cb78"}, + {file = "rpds_py-0.24.0-pp39-pypy39_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:3a55fc10fdcbf1a4bd3c018eea422c52cf08700cf99c28b5cb10fe97ab77a0d3"}, + {file = "rpds_py-0.24.0-pp39-pypy39_pp73-musllinux_1_2_i686.whl", hash = "sha256:c30ff468163a48535ee7e9bf21bd14c7a81147c0e58a36c1078289a8ca7af0bd"}, + {file = "rpds_py-0.24.0-pp39-pypy39_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:369d9c6d4c714e36d4a03957b4783217a3ccd1e222cdd67d464a3a479fc17796"}, + {file = "rpds_py-0.24.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:24795c099453e3721fda5d8ddd45f5dfcc8e5a547ce7b8e9da06fecc3832e26f"}, + {file = "rpds_py-0.24.0.tar.gz", hash = "sha256:772cc1b2cd963e7e17e6cc55fe0371fb9c704d63e44cacec7b9b7f523b78919e"}, ] [[package]] name = "rsa" -version = "4.9" +version = "4.9.1" description = "Pure-Python RSA implementation" optional = false -python-versions = ">=3.6,<4" +python-versions = "<4,>=3.6" groups = ["main"] files = [ - {file = "rsa-4.9-py3-none-any.whl", hash = "sha256:90260d9058e514786967344d0ef75fa8727eed8a7d2e43ce9f4bcf1b536174f7"}, - {file = "rsa-4.9.tar.gz", hash = "sha256:e38464a49c6c85d7f1351b0126661487a7e0a14a50f1675ec50eb34d4f20ef21"}, + {file = "rsa-4.9.1-py3-none-any.whl", hash = "sha256:68635866661c6836b8d39430f97a996acbd61bfa49406748ea243539fe239762"}, + {file = "rsa-4.9.1.tar.gz", hash = "sha256:e7bdbfdb5497da4c07dfd35530e1a902659db6ff241e39d9953cad06ebd0ae75"}, ] [package.dependencies] @@ -4643,19 +4784,19 @@ files = [ [[package]] name = "setuptools" -version = "75.8.0" +version = "79.0.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" optional = false python-versions = ">=3.9" groups = ["main", "dev"] files = [ - {file = "setuptools-75.8.0-py3-none-any.whl", hash = "sha256:e3982f444617239225d675215d51f6ba05f845d4eec313da4418fdbb56fb27e3"}, - {file = "setuptools-75.8.0.tar.gz", hash = "sha256:c5afc8f407c626b8313a86e10311dd3f661c6cd9c09d4bf8c15c0e11f9f2b0e6"}, + {file = "setuptools-79.0.0-py3-none-any.whl", hash = "sha256:b9ab3a104bedb292323f53797b00864e10e434a3ab3906813a7169e4745b912a"}, + {file = "setuptools-79.0.0.tar.gz", hash = "sha256:9828422e7541213b0aacb6e10bbf9dd8febeaa45a48570e09b6d100e063fc9f9"}, ] [package.extras] check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1) ; sys_platform != \"cygwin\"", "ruff (>=0.8.0) ; sys_platform != \"cygwin\""] -core = ["importlib_metadata (>=6) ; python_version < \"3.10\"", "jaraco.collections", "jaraco.functools (>=4)", "jaraco.text (>=3.7)", "more_itertools", "more_itertools (>=8.8)", "packaging", "packaging (>=24.2)", "platformdirs (>=4.2.2)", "tomli (>=2.0.1) ; python_version < \"3.11\"", "wheel (>=0.43.0)"] +core = ["importlib_metadata (>=6) ; python_version < \"3.10\"", "jaraco.functools (>=4)", "jaraco.text (>=3.7)", "more_itertools", "more_itertools (>=8.8)", "packaging (>=24.2)", "platformdirs (>=4.2.2)", "tomli (>=2.0.1) ; python_version < \"3.11\"", "wheel (>=0.43.0)"] cover = ["pytest-cov"] doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "pyproject-hooks (!=1.1)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier", "towncrier (<24.7)"] enabler = ["pytest-enabler (>=2.2)"] @@ -4746,26 +4887,26 @@ files = [ [[package]] name = "std-uritemplate" -version = "2.0.1" +version = "2.0.3" description = "std-uritemplate implementation for Python" optional = false python-versions = "<4.0,>=3.8" groups = ["main"] files = [ - {file = "std_uritemplate-2.0.1-py3-none-any.whl", hash = "sha256:6405d13f9ff3b8f70e1fa4eaefa373049659e1a61870c4b651441821a3fc984d"}, - {file = "std_uritemplate-2.0.1.tar.gz", hash = "sha256:f4684ae050167e237ed5819423139893e0b5b7f08dc6b7467bba3fdd64608be8"}, + {file = "std_uritemplate-2.0.3-py3-none-any.whl", hash = "sha256:434df26453bf68c6077879fed6609b2c39e2fc73080e74cd157269d5f8abdb3e"}, + {file = "std_uritemplate-2.0.3.tar.gz", hash = "sha256:ad4cb1d671bcf4a3608b3598c687be4b0929867c53a2d69c105989da6a5a2d4c"}, ] [[package]] name = "stevedore" -version = "5.4.0" +version = "5.4.1" description = "Manage dynamic plugins for Python applications" optional = false python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "stevedore-5.4.0-py3-none-any.whl", hash = "sha256:b0be3c4748b3ea7b854b265dcb4caa891015e442416422be16f8b31756107857"}, - {file = "stevedore-5.4.0.tar.gz", hash = "sha256:79e92235ecb828fe952b6b8b0c6c87863248631922c8e8e0fa5b17b232c4514d"}, + {file = "stevedore-5.4.1-py3-none-any.whl", hash = "sha256:d10a31c7b86cba16c1f6e8d15416955fc797052351a56af15e608ad20811fcfe"}, + {file = "stevedore-5.4.1.tar.gz", hash = "sha256:3135b5ae50fe12816ef291baff420acb727fcd356106e3e9cbfa9e5985cd6f4b"}, ] [package.dependencies] @@ -4804,32 +4945,16 @@ files = [ [package.extras] widechars = ["wcwidth"] -[[package]] -name = "tenacity" -version = "9.0.0" -description = "Retry code until it succeeds" -optional = false -python-versions = ">=3.8" -groups = ["main"] -files = [ - {file = "tenacity-9.0.0-py3-none-any.whl", hash = "sha256:93de0c98785b27fcf659856aa9f54bfbd399e29969b0621bc7f762bd441b4539"}, - {file = "tenacity-9.0.0.tar.gz", hash = "sha256:807f37ca97d62aa361264d497b0e31e92b8027044942bfa756160d908320d73b"}, -] - -[package.extras] -doc = ["reno", "sphinx"] -test = ["pytest", "tornado (>=4.5)", "typeguard"] - [[package]] name = "tldextract" -version = "5.1.3" +version = "5.3.0" description = "Accurately separates a URL's subdomain, domain, and public suffix, using the Public Suffix List (PSL). By default, this includes the public ICANN TLDs and their exceptions. You can optionally support the Public Suffix List's private domains as well." optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "tldextract-5.1.3-py3-none-any.whl", hash = "sha256:78de310cc2ca018692de5ddf320f9d6bd7c5cf857d0fd4f2175f0cdf4440ea75"}, - {file = "tldextract-5.1.3.tar.gz", hash = "sha256:d43c7284c23f5dc8a42fd0fee2abede2ff74cc622674e4cb07f514ab3330c338"}, + {file = "tldextract-5.3.0-py3-none-any.whl", hash = "sha256:f70f31d10b55c83993f55e91ecb7c5d84532a8972f22ec578ecfbe5ea2292db2"}, + {file = "tldextract-5.3.0.tar.gz", hash = "sha256:b3d2b70a1594a0ecfa6967d57251527d58e00bb5a91a74387baa0d87a0678609"}, ] [package.dependencies] @@ -4899,14 +5024,14 @@ files = [ [[package]] name = "typer" -version = "0.15.1" +version = "0.15.2" description = "Typer, build great CLIs. Easy to code. Based on Python type hints." optional = false python-versions = ">=3.7" groups = ["dev"] files = [ - {file = "typer-0.15.1-py3-none-any.whl", hash = "sha256:7994fb7b8155b64d3402518560648446072864beefd44aa2dc36972a5972e847"}, - {file = "typer-0.15.1.tar.gz", hash = "sha256:a0588c0a7fa68a1978a069818657778f86abe6ff5ea6abf472f940a08bfe4f0a"}, + {file = "typer-0.15.2-py3-none-any.whl", hash = "sha256:46a499c6107d645a9c13f7ee46c5d5096cae6f5fc57dd11eccbbb9ae3e44ddfc"}, + {file = "typer-0.15.2.tar.gz", hash = "sha256:ab2fab47533a813c49fe1f16b1a370fd5819099c00b119e0633df65f22144ba5"}, ] [package.dependencies] @@ -4917,26 +5042,26 @@ typing-extensions = ">=3.7.4.3" [[package]] name = "typing-extensions" -version = "4.12.2" +version = "4.13.2" description = "Backported and Experimental Type Hints for Python 3.8+" optional = false python-versions = ">=3.8" groups = ["main", "dev"] files = [ - {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, - {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, + {file = "typing_extensions-4.13.2-py3-none-any.whl", hash = "sha256:a439e7c04b49fec3e5d3e2beaa21755cadbbdc391694e28ccdd36ca4a1408f8c"}, + {file = "typing_extensions-4.13.2.tar.gz", hash = "sha256:e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef"}, ] [[package]] name = "tzdata" -version = "2024.2" +version = "2025.2" description = "Provider of IANA time zone data" optional = false python-versions = ">=2" groups = ["main"] files = [ - {file = "tzdata-2024.2-py2.py3-none-any.whl", hash = "sha256:a48093786cdcde33cad18c2555e8532f34422074448fbc874186f0abd79565cd"}, - {file = "tzdata-2024.2.tar.gz", hash = "sha256:7d85cc416e9382e69095b7bdf4afd9e3880418a2413feec7069d533d6b4e31cc"}, + {file = "tzdata-2025.2-py2.py3-none-any.whl", hash = "sha256:1a403fada01ff9221ca8044d701868fa132215d84beb92242d9acd2147f667a8"}, + {file = "tzdata-2025.2.tar.gz", hash = "sha256:b60a638fcc0daffadf82fe0f57e53d06bdec2f36c4df66280ae79bce6bd6f2b9"}, ] [[package]] @@ -4989,15 +5114,15 @@ socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] [[package]] name = "urllib3" -version = "2.3.0" +version = "2.4.0" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false python-versions = ">=3.9" groups = ["main", "dev", "docs"] markers = "python_version >= \"3.10\"" files = [ - {file = "urllib3-2.3.0-py3-none-any.whl", hash = "sha256:1cee9ad369867bfdbbb48b7dd50374c0967a0bb7710050facf0dd6911440e3df"}, - {file = "urllib3-2.3.0.tar.gz", hash = "sha256:f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d"}, + {file = "urllib3-2.4.0-py3-none-any.whl", hash = "sha256:4e16665048960a0900c702d4a66415956a584919c03361cac9f1df5c5dd7e813"}, + {file = "urllib3-2.4.0.tar.gz", hash = "sha256:414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466"}, ] [package.extras] @@ -5190,14 +5315,14 @@ files = [ [[package]] name = "xlsxwriter" -version = "3.2.0" +version = "3.2.3" description = "A Python module for creating Excel XLSX files." optional = false python-versions = ">=3.6" groups = ["main"] files = [ - {file = "XlsxWriter-3.2.0-py3-none-any.whl", hash = "sha256:ecfd5405b3e0e228219bcaf24c2ca0915e012ca9464a14048021d21a995d490e"}, - {file = "XlsxWriter-3.2.0.tar.gz", hash = "sha256:9977d0c661a72866a61f9f7a809e25ebbb0fb7036baa3b9fe74afcfca6b3cb8c"}, + {file = "XlsxWriter-3.2.3-py3-none-any.whl", hash = "sha256:593f8296e8a91790c6d0378ab08b064f34a642b3feb787cf6738236bd0a4860d"}, + {file = "xlsxwriter-3.2.3.tar.gz", hash = "sha256:ad6fd41bdcf1b885876b1f6b7087560aecc9ae5a9cc2ba97dcac7ab2e210d3d5"}, ] [[package]] @@ -5214,100 +5339,122 @@ files = [ [[package]] name = "yarl" -version = "1.18.3" +version = "1.20.0" description = "Yet another URL library" optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "yarl-1.18.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7df647e8edd71f000a5208fe6ff8c382a1de8edfbccdbbfe649d263de07d8c34"}, - {file = "yarl-1.18.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c69697d3adff5aa4f874b19c0e4ed65180ceed6318ec856ebc423aa5850d84f7"}, - {file = "yarl-1.18.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:602d98f2c2d929f8e697ed274fbadc09902c4025c5a9963bf4e9edfc3ab6f7ed"}, - {file = "yarl-1.18.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c654d5207c78e0bd6d749f6dae1dcbbfde3403ad3a4b11f3c5544d9906969dde"}, - {file = "yarl-1.18.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5094d9206c64181d0f6e76ebd8fb2f8fe274950a63890ee9e0ebfd58bf9d787b"}, - {file = "yarl-1.18.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:35098b24e0327fc4ebdc8ffe336cee0a87a700c24ffed13161af80124b7dc8e5"}, - {file = "yarl-1.18.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3236da9272872443f81fedc389bace88408f64f89f75d1bdb2256069a8730ccc"}, - {file = "yarl-1.18.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e2c08cc9b16f4f4bc522771d96734c7901e7ebef70c6c5c35dd0f10845270bcd"}, - {file = "yarl-1.18.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:80316a8bd5109320d38eef8833ccf5f89608c9107d02d2a7f985f98ed6876990"}, - {file = "yarl-1.18.3-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:c1e1cc06da1491e6734f0ea1e6294ce00792193c463350626571c287c9a704db"}, - {file = "yarl-1.18.3-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:fea09ca13323376a2fdfb353a5fa2e59f90cd18d7ca4eaa1fd31f0a8b4f91e62"}, - {file = "yarl-1.18.3-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:e3b9fd71836999aad54084906f8663dffcd2a7fb5cdafd6c37713b2e72be1760"}, - {file = "yarl-1.18.3-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:757e81cae69244257d125ff31663249b3013b5dc0a8520d73694aed497fb195b"}, - {file = "yarl-1.18.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b1771de9944d875f1b98a745bc547e684b863abf8f8287da8466cf470ef52690"}, - {file = "yarl-1.18.3-cp310-cp310-win32.whl", hash = "sha256:8874027a53e3aea659a6d62751800cf6e63314c160fd607489ba5c2edd753cf6"}, - {file = "yarl-1.18.3-cp310-cp310-win_amd64.whl", hash = "sha256:93b2e109287f93db79210f86deb6b9bbb81ac32fc97236b16f7433db7fc437d8"}, - {file = "yarl-1.18.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:8503ad47387b8ebd39cbbbdf0bf113e17330ffd339ba1144074da24c545f0069"}, - {file = "yarl-1.18.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:02ddb6756f8f4517a2d5e99d8b2f272488e18dd0bfbc802f31c16c6c20f22193"}, - {file = "yarl-1.18.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:67a283dd2882ac98cc6318384f565bffc751ab564605959df4752d42483ad889"}, - {file = "yarl-1.18.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d980e0325b6eddc81331d3f4551e2a333999fb176fd153e075c6d1c2530aa8a8"}, - {file = "yarl-1.18.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b643562c12680b01e17239be267bc306bbc6aac1f34f6444d1bded0c5ce438ca"}, - {file = "yarl-1.18.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c017a3b6df3a1bd45b9fa49a0f54005e53fbcad16633870104b66fa1a30a29d8"}, - {file = "yarl-1.18.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:75674776d96d7b851b6498f17824ba17849d790a44d282929c42dbb77d4f17ae"}, - {file = "yarl-1.18.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ccaa3a4b521b780a7e771cc336a2dba389a0861592bbce09a476190bb0c8b4b3"}, - {file = "yarl-1.18.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:2d06d3005e668744e11ed80812e61efd77d70bb7f03e33c1598c301eea20efbb"}, - {file = "yarl-1.18.3-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:9d41beda9dc97ca9ab0b9888cb71f7539124bc05df02c0cff6e5acc5a19dcc6e"}, - {file = "yarl-1.18.3-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:ba23302c0c61a9999784e73809427c9dbedd79f66a13d84ad1b1943802eaaf59"}, - {file = "yarl-1.18.3-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:6748dbf9bfa5ba1afcc7556b71cda0d7ce5f24768043a02a58846e4a443d808d"}, - {file = "yarl-1.18.3-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:0b0cad37311123211dc91eadcb322ef4d4a66008d3e1bdc404808992260e1a0e"}, - {file = "yarl-1.18.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:0fb2171a4486bb075316ee754c6d8382ea6eb8b399d4ec62fde2b591f879778a"}, - {file = "yarl-1.18.3-cp311-cp311-win32.whl", hash = "sha256:61b1a825a13bef4a5f10b1885245377d3cd0bf87cba068e1d9a88c2ae36880e1"}, - {file = "yarl-1.18.3-cp311-cp311-win_amd64.whl", hash = "sha256:b9d60031cf568c627d028239693fd718025719c02c9f55df0a53e587aab951b5"}, - {file = "yarl-1.18.3-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:1dd4bdd05407ced96fed3d7f25dbbf88d2ffb045a0db60dbc247f5b3c5c25d50"}, - {file = "yarl-1.18.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7c33dd1931a95e5d9a772d0ac5e44cac8957eaf58e3c8da8c1414de7dd27c576"}, - {file = "yarl-1.18.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:25b411eddcfd56a2f0cd6a384e9f4f7aa3efee14b188de13048c25b5e91f1640"}, - {file = "yarl-1.18.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:436c4fc0a4d66b2badc6c5fc5ef4e47bb10e4fd9bf0c79524ac719a01f3607c2"}, - {file = "yarl-1.18.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e35ef8683211db69ffe129a25d5634319a677570ab6b2eba4afa860f54eeaf75"}, - {file = "yarl-1.18.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:84b2deecba4a3f1a398df819151eb72d29bfeb3b69abb145a00ddc8d30094512"}, - {file = "yarl-1.18.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:00e5a1fea0fd4f5bfa7440a47eff01d9822a65b4488f7cff83155a0f31a2ecba"}, - {file = "yarl-1.18.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d0e883008013c0e4aef84dcfe2a0b172c4d23c2669412cf5b3371003941f72bb"}, - {file = "yarl-1.18.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:5a3f356548e34a70b0172d8890006c37be92995f62d95a07b4a42e90fba54272"}, - {file = "yarl-1.18.3-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:ccd17349166b1bee6e529b4add61727d3f55edb7babbe4069b5764c9587a8cc6"}, - {file = "yarl-1.18.3-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:b958ddd075ddba5b09bb0be8a6d9906d2ce933aee81100db289badbeb966f54e"}, - {file = "yarl-1.18.3-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c7d79f7d9aabd6011004e33b22bc13056a3e3fb54794d138af57f5ee9d9032cb"}, - {file = "yarl-1.18.3-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:4891ed92157e5430874dad17b15eb1fda57627710756c27422200c52d8a4e393"}, - {file = "yarl-1.18.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ce1af883b94304f493698b00d0f006d56aea98aeb49d75ec7d98cd4a777e9285"}, - {file = "yarl-1.18.3-cp312-cp312-win32.whl", hash = "sha256:f91c4803173928a25e1a55b943c81f55b8872f0018be83e3ad4938adffb77dd2"}, - {file = "yarl-1.18.3-cp312-cp312-win_amd64.whl", hash = "sha256:7e2ee16578af3b52ac2f334c3b1f92262f47e02cc6193c598502bd46f5cd1477"}, - {file = "yarl-1.18.3-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:90adb47ad432332d4f0bc28f83a5963f426ce9a1a8809f5e584e704b82685dcb"}, - {file = "yarl-1.18.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:913829534200eb0f789d45349e55203a091f45c37a2674678744ae52fae23efa"}, - {file = "yarl-1.18.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:ef9f7768395923c3039055c14334ba4d926f3baf7b776c923c93d80195624782"}, - {file = "yarl-1.18.3-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:88a19f62ff30117e706ebc9090b8ecc79aeb77d0b1f5ec10d2d27a12bc9f66d0"}, - {file = "yarl-1.18.3-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e17c9361d46a4d5addf777c6dd5eab0715a7684c2f11b88c67ac37edfba6c482"}, - {file = "yarl-1.18.3-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1a74a13a4c857a84a845505fd2d68e54826a2cd01935a96efb1e9d86c728e186"}, - {file = "yarl-1.18.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:41f7ce59d6ee7741af71d82020346af364949314ed3d87553763a2df1829cc58"}, - {file = "yarl-1.18.3-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f52a265001d830bc425f82ca9eabda94a64a4d753b07d623a9f2863fde532b53"}, - {file = "yarl-1.18.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:82123d0c954dc58db301f5021a01854a85bf1f3bb7d12ae0c01afc414a882ca2"}, - {file = "yarl-1.18.3-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:2ec9bbba33b2d00999af4631a3397d1fd78290c48e2a3e52d8dd72db3a067ac8"}, - {file = "yarl-1.18.3-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:fbd6748e8ab9b41171bb95c6142faf068f5ef1511935a0aa07025438dd9a9bc1"}, - {file = "yarl-1.18.3-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:877d209b6aebeb5b16c42cbb377f5f94d9e556626b1bfff66d7b0d115be88d0a"}, - {file = "yarl-1.18.3-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:b464c4ab4bfcb41e3bfd3f1c26600d038376c2de3297760dfe064d2cb7ea8e10"}, - {file = "yarl-1.18.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:8d39d351e7faf01483cc7ff7c0213c412e38e5a340238826be7e0e4da450fdc8"}, - {file = "yarl-1.18.3-cp313-cp313-win32.whl", hash = "sha256:61ee62ead9b68b9123ec24bc866cbef297dd266175d53296e2db5e7f797f902d"}, - {file = "yarl-1.18.3-cp313-cp313-win_amd64.whl", hash = "sha256:578e281c393af575879990861823ef19d66e2b1d0098414855dd367e234f5b3c"}, - {file = "yarl-1.18.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:61e5e68cb65ac8f547f6b5ef933f510134a6bf31bb178be428994b0cb46c2a04"}, - {file = "yarl-1.18.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:fe57328fbc1bfd0bd0514470ac692630f3901c0ee39052ae47acd1d90a436719"}, - {file = "yarl-1.18.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a440a2a624683108a1b454705ecd7afc1c3438a08e890a1513d468671d90a04e"}, - {file = "yarl-1.18.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:09c7907c8548bcd6ab860e5f513e727c53b4a714f459b084f6580b49fa1b9cee"}, - {file = "yarl-1.18.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b4f6450109834af88cb4cc5ecddfc5380ebb9c228695afc11915a0bf82116789"}, - {file = "yarl-1.18.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a9ca04806f3be0ac6d558fffc2fdf8fcef767e0489d2684a21912cc4ed0cd1b8"}, - {file = "yarl-1.18.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:77a6e85b90a7641d2e07184df5557132a337f136250caafc9ccaa4a2a998ca2c"}, - {file = "yarl-1.18.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6333c5a377c8e2f5fae35e7b8f145c617b02c939d04110c76f29ee3676b5f9a5"}, - {file = "yarl-1.18.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:0b3c92fa08759dbf12b3a59579a4096ba9af8dd344d9a813fc7f5070d86bbab1"}, - {file = "yarl-1.18.3-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:4ac515b860c36becb81bb84b667466885096b5fc85596948548b667da3bf9f24"}, - {file = "yarl-1.18.3-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:045b8482ce9483ada4f3f23b3774f4e1bf4f23a2d5c912ed5170f68efb053318"}, - {file = "yarl-1.18.3-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:a4bb030cf46a434ec0225bddbebd4b89e6471814ca851abb8696170adb163985"}, - {file = "yarl-1.18.3-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:54d6921f07555713b9300bee9c50fb46e57e2e639027089b1d795ecd9f7fa910"}, - {file = "yarl-1.18.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:1d407181cfa6e70077df3377938c08012d18893f9f20e92f7d2f314a437c30b1"}, - {file = "yarl-1.18.3-cp39-cp39-win32.whl", hash = "sha256:ac36703a585e0929b032fbaab0707b75dc12703766d0b53486eabd5139ebadd5"}, - {file = "yarl-1.18.3-cp39-cp39-win_amd64.whl", hash = "sha256:ba87babd629f8af77f557b61e49e7c7cac36f22f871156b91e10a6e9d4f829e9"}, - {file = "yarl-1.18.3-py3-none-any.whl", hash = "sha256:b57f4f58099328dfb26c6a771d09fb20dbbae81d20cfb66141251ea063bd101b"}, - {file = "yarl-1.18.3.tar.gz", hash = "sha256:ac1801c45cbf77b6c99242eeff4fffb5e4e73a800b5c4ad4fc0be5def634d2e1"}, + {file = "yarl-1.20.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:f1f6670b9ae3daedb325fa55fbe31c22c8228f6e0b513772c2e1c623caa6ab22"}, + {file = "yarl-1.20.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:85a231fa250dfa3308f3c7896cc007a47bc76e9e8e8595c20b7426cac4884c62"}, + {file = "yarl-1.20.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1a06701b647c9939d7019acdfa7ebbfbb78ba6aa05985bb195ad716ea759a569"}, + {file = "yarl-1.20.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7595498d085becc8fb9203aa314b136ab0516c7abd97e7d74f7bb4eb95042abe"}, + {file = "yarl-1.20.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:af5607159085dcdb055d5678fc2d34949bd75ae6ea6b4381e784bbab1c3aa195"}, + {file = "yarl-1.20.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:95b50910e496567434cb77a577493c26bce0f31c8a305135f3bda6a2483b8e10"}, + {file = "yarl-1.20.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b594113a301ad537766b4e16a5a6750fcbb1497dcc1bc8a4daae889e6402a634"}, + {file = "yarl-1.20.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:083ce0393ea173cd37834eb84df15b6853b555d20c52703e21fbababa8c129d2"}, + {file = "yarl-1.20.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4f1a350a652bbbe12f666109fbddfdf049b3ff43696d18c9ab1531fbba1c977a"}, + {file = "yarl-1.20.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:fb0caeac4a164aadce342f1597297ec0ce261ec4532bbc5a9ca8da5622f53867"}, + {file = "yarl-1.20.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:d88cc43e923f324203f6ec14434fa33b85c06d18d59c167a0637164863b8e995"}, + {file = "yarl-1.20.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e52d6ed9ea8fd3abf4031325dc714aed5afcbfa19ee4a89898d663c9976eb487"}, + {file = "yarl-1.20.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:ce360ae48a5e9961d0c730cf891d40698a82804e85f6e74658fb175207a77cb2"}, + {file = "yarl-1.20.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:06d06c9d5b5bc3eb56542ceeba6658d31f54cf401e8468512447834856fb0e61"}, + {file = "yarl-1.20.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:c27d98f4e5c4060582f44e58309c1e55134880558f1add7a87c1bc36ecfade19"}, + {file = "yarl-1.20.0-cp310-cp310-win32.whl", hash = "sha256:f4d3fa9b9f013f7050326e165c3279e22850d02ae544ace285674cb6174b5d6d"}, + {file = "yarl-1.20.0-cp310-cp310-win_amd64.whl", hash = "sha256:bc906b636239631d42eb8a07df8359905da02704a868983265603887ed68c076"}, + {file = "yarl-1.20.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:fdb5204d17cb32b2de2d1e21c7461cabfacf17f3645e4b9039f210c5d3378bf3"}, + {file = "yarl-1.20.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:eaddd7804d8e77d67c28d154ae5fab203163bd0998769569861258e525039d2a"}, + {file = "yarl-1.20.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:634b7ba6b4a85cf67e9df7c13a7fb2e44fa37b5d34501038d174a63eaac25ee2"}, + {file = "yarl-1.20.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6d409e321e4addf7d97ee84162538c7258e53792eb7c6defd0c33647d754172e"}, + {file = "yarl-1.20.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:ea52f7328a36960ba3231c6677380fa67811b414798a6e071c7085c57b6d20a9"}, + {file = "yarl-1.20.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c8703517b924463994c344dcdf99a2d5ce9eca2b6882bb640aa555fb5efc706a"}, + {file = "yarl-1.20.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:077989b09ffd2f48fb2d8f6a86c5fef02f63ffe6b1dd4824c76de7bb01e4f2e2"}, + {file = "yarl-1.20.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0acfaf1da020253f3533526e8b7dd212838fdc4109959a2c53cafc6db611bff2"}, + {file = "yarl-1.20.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b4230ac0b97ec5eeb91d96b324d66060a43fd0d2a9b603e3327ed65f084e41f8"}, + {file = "yarl-1.20.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0a6a1e6ae21cdd84011c24c78d7a126425148b24d437b5702328e4ba640a8902"}, + {file = "yarl-1.20.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:86de313371ec04dd2531f30bc41a5a1a96f25a02823558ee0f2af0beaa7ca791"}, + {file = "yarl-1.20.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:dd59c9dd58ae16eaa0f48c3d0cbe6be8ab4dc7247c3ff7db678edecbaf59327f"}, + {file = "yarl-1.20.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:a0bc5e05f457b7c1994cc29e83b58f540b76234ba6b9648a4971ddc7f6aa52da"}, + {file = "yarl-1.20.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:c9471ca18e6aeb0e03276b5e9b27b14a54c052d370a9c0c04a68cefbd1455eb4"}, + {file = "yarl-1.20.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:40ed574b4df723583a26c04b298b283ff171bcc387bc34c2683235e2487a65a5"}, + {file = "yarl-1.20.0-cp311-cp311-win32.whl", hash = "sha256:db243357c6c2bf3cd7e17080034ade668d54ce304d820c2a58514a4e51d0cfd6"}, + {file = "yarl-1.20.0-cp311-cp311-win_amd64.whl", hash = "sha256:8c12cd754d9dbd14204c328915e23b0c361b88f3cffd124129955e60a4fbfcfb"}, + {file = "yarl-1.20.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:e06b9f6cdd772f9b665e5ba8161968e11e403774114420737f7884b5bd7bdf6f"}, + {file = "yarl-1.20.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:b9ae2fbe54d859b3ade40290f60fe40e7f969d83d482e84d2c31b9bff03e359e"}, + {file = "yarl-1.20.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6d12b8945250d80c67688602c891237994d203d42427cb14e36d1a732eda480e"}, + {file = "yarl-1.20.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:087e9731884621b162a3e06dc0d2d626e1542a617f65ba7cc7aeab279d55ad33"}, + {file = "yarl-1.20.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:69df35468b66c1a6e6556248e6443ef0ec5f11a7a4428cf1f6281f1879220f58"}, + {file = "yarl-1.20.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b2992fe29002fd0d4cbaea9428b09af9b8686a9024c840b8a2b8f4ea4abc16f"}, + {file = "yarl-1.20.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4c903e0b42aab48abfbac668b5a9d7b6938e721a6341751331bcd7553de2dcae"}, + {file = "yarl-1.20.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bf099e2432131093cc611623e0b0bcc399b8cddd9a91eded8bfb50402ec35018"}, + {file = "yarl-1.20.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8a7f62f5dc70a6c763bec9ebf922be52aa22863d9496a9a30124d65b489ea672"}, + {file = "yarl-1.20.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:54ac15a8b60382b2bcefd9a289ee26dc0920cf59b05368c9b2b72450751c6eb8"}, + {file = "yarl-1.20.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:25b3bc0763a7aca16a0f1b5e8ef0f23829df11fb539a1b70476dcab28bd83da7"}, + {file = "yarl-1.20.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:b2586e36dc070fc8fad6270f93242124df68b379c3a251af534030a4a33ef594"}, + {file = "yarl-1.20.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:866349da9d8c5290cfefb7fcc47721e94de3f315433613e01b435473be63daa6"}, + {file = "yarl-1.20.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:33bb660b390a0554d41f8ebec5cd4475502d84104b27e9b42f5321c5192bfcd1"}, + {file = "yarl-1.20.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:737e9f171e5a07031cbee5e9180f6ce21a6c599b9d4b2c24d35df20a52fabf4b"}, + {file = "yarl-1.20.0-cp312-cp312-win32.whl", hash = "sha256:839de4c574169b6598d47ad61534e6981979ca2c820ccb77bf70f4311dd2cc64"}, + {file = "yarl-1.20.0-cp312-cp312-win_amd64.whl", hash = "sha256:3d7dbbe44b443b0c4aa0971cb07dcb2c2060e4a9bf8d1301140a33a93c98e18c"}, + {file = "yarl-1.20.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:2137810a20b933b1b1b7e5cf06a64c3ed3b4747b0e5d79c9447c00db0e2f752f"}, + {file = "yarl-1.20.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:447c5eadd750db8389804030d15f43d30435ed47af1313303ed82a62388176d3"}, + {file = "yarl-1.20.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:42fbe577272c203528d402eec8bf4b2d14fd49ecfec92272334270b850e9cd7d"}, + {file = "yarl-1.20.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:18e321617de4ab170226cd15006a565d0fa0d908f11f724a2c9142d6b2812ab0"}, + {file = "yarl-1.20.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:4345f58719825bba29895011e8e3b545e6e00257abb984f9f27fe923afca2501"}, + {file = "yarl-1.20.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5d9b980d7234614bc4674468ab173ed77d678349c860c3af83b1fffb6a837ddc"}, + {file = "yarl-1.20.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:af4baa8a445977831cbaa91a9a84cc09debb10bc8391f128da2f7bd070fc351d"}, + {file = "yarl-1.20.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:123393db7420e71d6ce40d24885a9e65eb1edefc7a5228db2d62bcab3386a5c0"}, + {file = "yarl-1.20.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ab47acc9332f3de1b39e9b702d9c916af7f02656b2a86a474d9db4e53ef8fd7a"}, + {file = "yarl-1.20.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:4a34c52ed158f89876cba9c600b2c964dfc1ca52ba7b3ab6deb722d1d8be6df2"}, + {file = "yarl-1.20.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:04d8cfb12714158abf2618f792c77bc5c3d8c5f37353e79509608be4f18705c9"}, + {file = "yarl-1.20.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:7dc63ad0d541c38b6ae2255aaa794434293964677d5c1ec5d0116b0e308031f5"}, + {file = "yarl-1.20.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:f9d02b591a64e4e6ca18c5e3d925f11b559c763b950184a64cf47d74d7e41877"}, + {file = "yarl-1.20.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:95fc9876f917cac7f757df80a5dda9de59d423568460fe75d128c813b9af558e"}, + {file = "yarl-1.20.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:bb769ae5760cd1c6a712135ee7915f9d43f11d9ef769cb3f75a23e398a92d384"}, + {file = "yarl-1.20.0-cp313-cp313-win32.whl", hash = "sha256:70e0c580a0292c7414a1cead1e076c9786f685c1fc4757573d2967689b370e62"}, + {file = "yarl-1.20.0-cp313-cp313-win_amd64.whl", hash = "sha256:4c43030e4b0af775a85be1fa0433119b1565673266a70bf87ef68a9d5ba3174c"}, + {file = "yarl-1.20.0-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:b6c4c3d0d6a0ae9b281e492b1465c72de433b782e6b5001c8e7249e085b69051"}, + {file = "yarl-1.20.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:8681700f4e4df891eafa4f69a439a6e7d480d64e52bf460918f58e443bd3da7d"}, + {file = "yarl-1.20.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:84aeb556cb06c00652dbf87c17838eb6d92cfd317799a8092cee0e570ee11229"}, + {file = "yarl-1.20.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f166eafa78810ddb383e930d62e623d288fb04ec566d1b4790099ae0f31485f1"}, + {file = "yarl-1.20.0-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:5d3d6d14754aefc7a458261027a562f024d4f6b8a798adb472277f675857b1eb"}, + {file = "yarl-1.20.0-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2a8f64df8ed5d04c51260dbae3cc82e5649834eebea9eadfd829837b8093eb00"}, + {file = "yarl-1.20.0-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4d9949eaf05b4d30e93e4034a7790634bbb41b8be2d07edd26754f2e38e491de"}, + {file = "yarl-1.20.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c366b254082d21cc4f08f522ac201d0d83a8b8447ab562732931d31d80eb2a5"}, + {file = "yarl-1.20.0-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:91bc450c80a2e9685b10e34e41aef3d44ddf99b3a498717938926d05ca493f6a"}, + {file = "yarl-1.20.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9c2aa4387de4bc3a5fe158080757748d16567119bef215bec643716b4fbf53f9"}, + {file = "yarl-1.20.0-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:d2cbca6760a541189cf87ee54ff891e1d9ea6406079c66341008f7ef6ab61145"}, + {file = "yarl-1.20.0-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:798a5074e656f06b9fad1a162be5a32da45237ce19d07884d0b67a0aa9d5fdda"}, + {file = "yarl-1.20.0-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:f106e75c454288472dbe615accef8248c686958c2e7dd3b8d8ee2669770d020f"}, + {file = "yarl-1.20.0-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:3b60a86551669c23dc5445010534d2c5d8a4e012163218fc9114e857c0586fdd"}, + {file = "yarl-1.20.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:3e429857e341d5e8e15806118e0294f8073ba9c4580637e59ab7b238afca836f"}, + {file = "yarl-1.20.0-cp313-cp313t-win32.whl", hash = "sha256:65a4053580fe88a63e8e4056b427224cd01edfb5f951498bfefca4052f0ce0ac"}, + {file = "yarl-1.20.0-cp313-cp313t-win_amd64.whl", hash = "sha256:53b2da3a6ca0a541c1ae799c349788d480e5144cac47dba0266c7cb6c76151fe"}, + {file = "yarl-1.20.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:119bca25e63a7725b0c9d20ac67ca6d98fa40e5a894bd5d4686010ff73397914"}, + {file = "yarl-1.20.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:35d20fb919546995f1d8c9e41f485febd266f60e55383090010f272aca93edcc"}, + {file = "yarl-1.20.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:484e7a08f72683c0f160270566b4395ea5412b4359772b98659921411d32ad26"}, + {file = "yarl-1.20.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8d8a3d54a090e0fff5837cd3cc305dd8a07d3435a088ddb1f65e33b322f66a94"}, + {file = "yarl-1.20.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:f0cf05ae2d3d87a8c9022f3885ac6dea2b751aefd66a4f200e408a61ae9b7f0d"}, + {file = "yarl-1.20.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a884b8974729e3899d9287df46f015ce53f7282d8d3340fa0ed57536b440621c"}, + {file = "yarl-1.20.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f8d8aa8dd89ffb9a831fedbcb27d00ffd9f4842107d52dc9d57e64cb34073d5c"}, + {file = "yarl-1.20.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3b4e88d6c3c8672f45a30867817e4537df1bbc6f882a91581faf1f6d9f0f1b5a"}, + {file = "yarl-1.20.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bdb77efde644d6f1ad27be8a5d67c10b7f769804fff7a966ccb1da5a4de4b656"}, + {file = "yarl-1.20.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:4ba5e59f14bfe8d261a654278a0f6364feef64a794bd456a8c9e823071e5061c"}, + {file = "yarl-1.20.0-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:d0bf955b96ea44ad914bc792c26a0edcd71b4668b93cbcd60f5b0aeaaed06c64"}, + {file = "yarl-1.20.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:27359776bc359ee6eaefe40cb19060238f31228799e43ebd3884e9c589e63b20"}, + {file = "yarl-1.20.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:04d9c7a1dc0a26efb33e1acb56c8849bd57a693b85f44774356c92d610369efa"}, + {file = "yarl-1.20.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:faa709b66ae0e24c8e5134033187a972d849d87ed0a12a0366bedcc6b5dc14a5"}, + {file = "yarl-1.20.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:44869ee8538208fe5d9342ed62c11cc6a7a1af1b3d0bb79bb795101b6e77f6e0"}, + {file = "yarl-1.20.0-cp39-cp39-win32.whl", hash = "sha256:b7fa0cb9fd27ffb1211cde944b41f5c67ab1c13a13ebafe470b1e206b8459da8"}, + {file = "yarl-1.20.0-cp39-cp39-win_amd64.whl", hash = "sha256:d4fad6e5189c847820288286732075f213eabf81be4d08d6cc309912e62be5b7"}, + {file = "yarl-1.20.0-py3-none-any.whl", hash = "sha256:5d0fe6af927a47a230f31e6004621fd0959eaa915fc62acfafa67ff7229a3124"}, + {file = "yarl-1.20.0.tar.gz", hash = "sha256:686d51e51ee5dfe62dec86e4866ee0e9ed66df700d55c828a615640adc885307"}, ] [package.dependencies] idna = ">=2.0" multidict = ">=4.0" -propcache = ">=0.2.0" +propcache = ">=0.2.1" [[package]] name = "zipp" @@ -5333,4 +5480,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.1" python-versions = ">3.9.1,<3.13" -content-hash = "29ed097b3f41c777e0b28202291f80e0c7f932eb44b4d2ad3ef7dd8999ff42c6" +content-hash = "f504af1d00a1da9dd65269509daf32f919c13be6c46f25cd9ef9bfba6b9c9a07" diff --git a/prowler/CHANGELOG.md b/prowler/CHANGELOG.md new file mode 100644 index 0000000000..bfe2c91df2 --- /dev/null +++ b/prowler/CHANGELOG.md @@ -0,0 +1,126 @@ +# Prowler SDK Changelog + +All notable changes to the **Prowler SDK** are documented in this file. + +##ย [5.8.0] (Prowler v5.8.0) + +### Added +- Add CIS 1.11 compliance framework for Kubernetes. [(#7790)](https://github.com/prowler-cloud/prowler/pull/7790) +- Support `HTTPS_PROXY` and `K8S_SKIP_TLS_VERIFY` in Kubernetes. [(#7720)](https://github.com/prowler-cloud/prowler/pull/7720) +- Add new check `entra_users_mfa_capable`. [(#7734)](https://github.com/prowler-cloud/prowler/pull/7734) +- Add new check `admincenter_organization_customer_lockbox_enabled`. [(#7732)](https://github.com/prowler-cloud/prowler/pull/7732) +- Add new check `admincenter_external_calendar_sharing_disabled`. [(#7733)](https://github.com/prowler-cloud/prowler/pull/7733) + +### Fixed +- Fix `m365_powershell test_credentials` to use sanitized credentials. [(#7761)](https://github.com/prowler-cloud/prowler/pull/7761) + +--- + +## [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 `repository_branch_delete_on_merge_enabled` check for GitHub provider. [(#6209)](https://github.com/prowler-cloud/prowler/pull/6209) +- Add `repository_default_branch_requires_conversation_resolution` check for GitHub provider. [(#6208)](https://github.com/prowler-cloud/prowler/pull/6208) +- 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) +- Add CIS 5.0 compliance framework for AWS. [(7766)](https://github.com/prowler-cloud/prowler/pull/7766) + +### Fixed +- Update CIS 4.0 for M365 provider. [(#7699)](https://github.com/prowler-cloud/prowler/pull/7699) +- Update and upgrade CIS for all the providers [(#7738)](https://github.com/prowler-cloud/prowler/pull/7738) +- Cover policies with conditions with SNS endpoint in `sns_topics_not_publicly_accessible`. [(#7750)](https://github.com/prowler-cloud/prowler/pull/7750) +- Change severity logic for `ec2_securitygroup_allow_ingress_from_internet_to_all_ports` check. [(#7764)](https://github.com/prowler-cloud/prowler/pull/7764) + +--- + +## [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) +- 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) +- 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) + +--- + +## [v5.5.1] (Prowler v5.5.1) + +### 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) + +--- diff --git a/prowler/__main__.py b/prowler/__main__.py index d27b7da8e9..e22d7b7fa6 100644 --- a/prowler/__main__.py +++ b/prowler/__main__.py @@ -50,8 +50,9 @@ 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_microsoft365 import Microsoft365CIS +from prowler.lib.outputs.compliance.cis.cis_m365 import M365CIS from prowler.lib.outputs.compliance.compliance import display_compliance_table from prowler.lib.outputs.compliance.ens.ens_aws import AWSENS from prowler.lib.outputs.compliance.ens.ens_azure import AzureENS @@ -63,12 +64,25 @@ 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.iso27001.iso27001_nhn import NHNISO27001 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.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 @@ -83,8 +97,10 @@ 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.microsoft365.models import Microsoft365OutputOptions +from prowler.providers.m365.models import M365OutputOptions +from prowler.providers.nhn.models import NHNOutputOptions def prowler(): @@ -266,8 +282,16 @@ def prowler(): output_options = KubernetesOutputOptions( args, bulk_checks_metadata, global_provider.identity ) - elif provider == "microsoft365": - output_options = Microsoft365OutputOptions( + 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 + ) + elif provider == "nhn": + output_options = NHNOutputOptions( args, bulk_checks_metadata, global_provider.identity ) @@ -472,6 +496,18 @@ def prowler(): ) generated_outputs["compliance"].append(kisa_ismsp) kisa_ismsp.batch_write_data_to_file() + elif compliance_name == "prowler_threatscore_aws": + filename = ( + f"{output_options.output_directory}/compliance/" + f"{output_options.output_filename}_{compliance_name}.csv" + ) + prowler_threatscore = ProwlerThreatScoreAWS( + 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/" @@ -539,6 +575,18 @@ def prowler(): ) generated_outputs["compliance"].append(iso27001) iso27001.batch_write_data_to_file() + elif compliance_name == "prowler_threatscore_azure": + filename = ( + f"{output_options.output_directory}/compliance/" + f"{output_options.output_filename}_{compliance_name}.csv" + ) + prowler_threatscore = ProwlerThreatScoreAzure( + 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/" @@ -606,6 +654,18 @@ def prowler(): ) generated_outputs["compliance"].append(iso27001) iso27001.batch_write_data_to_file() + elif compliance_name == "prowler_threatscore_gcp": + filename = ( + f"{output_options.output_directory}/compliance/" + f"{output_options.output_filename}_{compliance_name}.csv" + ) + prowler_threatscore = ProwlerThreatScoreGCP( + 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/" @@ -660,7 +720,7 @@ def prowler(): generated_outputs["compliance"].append(generic_compliance) generic_compliance.batch_write_data_to_file() - elif provider == "microsoft365": + elif provider == "m365": for compliance_name in input_compliance_frameworks: if compliance_name.startswith("cis_"): # Generate CIS Finding Object @@ -668,7 +728,75 @@ def prowler(): f"{output_options.output_directory}/compliance/" f"{output_options.output_filename}_{compliance_name}.csv" ) - cis = Microsoft365CIS( + cis = M365CIS( + findings=finding_outputs, + compliance=bulk_compliance_frameworks[compliance_name], + file_path=filename, + ) + 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/" + f"{output_options.output_filename}_{compliance_name}.csv" + ) + generic_compliance = GenericCompliance( + findings=finding_outputs, + compliance=bulk_compliance_frameworks[compliance_name], + file_path=filename, + ) + generated_outputs["compliance"].append(generic_compliance) + generic_compliance.batch_write_data_to_file() + + elif provider == "nhn": + for compliance_name in input_compliance_frameworks: + if compliance_name.startswith("iso27001_"): + # Generate ISO27001 Finding Object + filename = ( + f"{output_options.output_directory}/compliance/" + f"{output_options.output_filename}_{compliance_name}.csv" + ) + iso27001 = NHNISO27001( + findings=finding_outputs, + compliance=bulk_compliance_frameworks[compliance_name], + file_path=filename, + ) + generated_outputs["compliance"].append(iso27001) + iso27001.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], + file_path=filename, + ) + 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, @@ -683,6 +811,7 @@ def prowler(): 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) diff --git a/prowler/compliance/aws/cis_1.4_aws.json b/prowler/compliance/aws/cis_1.4_aws.json index 584ca284c6..0e6d1f136c 100644 --- a/prowler/compliance/aws/cis_1.4_aws.json +++ b/prowler/compliance/aws/cis_1.4_aws.json @@ -12,7 +12,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Manual", "Description": "Ensure contact email and telephone details for AWS accounts are current and map to more than one individual in your organization. An AWS account supports a number of contact details, and AWS will use these to contact the account owner if activity judged to be in breach of Acceptable Use Policy or indicative of likely security compromise is observed by the AWS Abuse team. Contact details should not be for a single individual, as circumstances may arise where that individual is unavailable. Email contact details should point to a mail alias which forwards email to multiple individuals within the organization; where feasible, phone contact details should point to a PABX hunt group or other call-forwarding system.", @@ -33,7 +33,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Multi-Factor Authentication (MFA) adds an extra layer of authentication assurance beyond traditional credentials. With MFA enabled, when a user signs in to the AWS Console, they will be prompted for their user name and password as well as for an authentication code from their physical or virtual MFA token. It is recommended that MFA be enabled for all accounts that have a console password.", @@ -54,7 +54,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "AWS console defaults to no check boxes selected when creating a new IAM user. When cerating the IAM User credentials you have to determine what type of access they require. Programmatic access: The IAM user might need to make API calls, use the AWS CLI, or use the Tools for Windows PowerShell. In that case, create an access key (access key ID and a secret access key) for that user. AWS Management Console access: If the user needs to access the AWS Management Console, create a password for the user.", @@ -76,7 +76,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "AWS IAM users can access AWS resources using different types of credentials, such as passwords or access keys. It is recommended that all credentials that have been unused in 45 or greater days be deactivated or removed.", @@ -97,7 +97,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Access keys are long-term credentials for an IAM user or the AWS account 'root' user. You can use access keys to sign programmatic requests to the AWS CLI or AWS API (directly or using the AWS SDK)", @@ -118,7 +118,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Access keys consist of an access key ID and secret access key, which are used to sign programmatic requests that you make to AWS. AWS users need their own access keys to make programmatic calls to AWS from the AWS Command Line Interface (AWS CLI), Tools for Windows PowerShell, the AWS SDKs, or direct HTTP calls using the APIs for individual AWS services. It is recommended that all access keys be regularly rotated.", @@ -139,7 +139,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "IAM users are granted access to services, functions, and data through IAM policies. There are three ways to define policies for a user: 1) Edit the user policy directly, aka an inline, or user, policy; 2) attach a policy directly to a user; 3) add the user to an IAM group that has an attached policy. Only the third implementation is recommended.", @@ -161,7 +161,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "IAM policies are the means by which privileges are granted to users, groups, or roles. It is recommended and considered a standard security advice to grant _least privilege_ -that is, granting only the permissions required to perform a task. Determine what users need to do and then craft policies for them that let the users perform _only_ those tasks, instead of allowing full administrative privileges.", @@ -182,7 +182,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "AWS provides a support center that can be used for incident notification and response, as well as technical support and customer services. Create an IAM Role to allow authorized users to manage incidents with AWS Support.", @@ -203,7 +203,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 2", "AssessmentStatus": "Manual", "Description": "AWS access from within AWS instances can be done by either encoding AWS keys into AWS API calls or by assigning the instance to a role which has an appropriate permissions policy for the required access. \"AWS Access\" means accessing the APIs of AWS in order to access AWS resources or manage AWS account resources.", @@ -224,7 +224,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "To enable HTTPS connections to your website or application in AWS, you need an SSL/TLS server certificate. You can use ACM or IAM to store and deploy server certificates. Use IAM as a certificate manager only when you must support HTTPS connections in a region that is not supported by ACM. IAM securely encrypts your private keys and stores the encrypted version in IAM SSL certificate storage. IAM supports deploying server certificates in all regions, but you must obtain your certificate from an external provider for use with AWS. You cannot upload an ACM certificate to IAM. Additionally, you cannot manage your certificates from the IAM Console.", @@ -245,7 +245,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Manual", "Description": "AWS provides customers with the option of specifying the contact information for account's security team. It is recommended that this information be provided.", @@ -266,7 +266,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Enable IAM Access analyzer for IAM policies about all resources in each region. IAM Access Analyzer is a technology introduced at AWS reinvent 2019. After the Analyzer is enabled in IAM, scan results are displayed on the console showing the accessible resources. Scans show resources that other accounts and federated users can access, such as KMS keys and IAM roles. So the results allow you to determine if an unintended user is allowed, making it easier for administrators to monitor least privileges access. Access Analyzer analyzes only policies that are applied to resources in the same AWS Region.", @@ -287,7 +287,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 2", "AssessmentStatus": "Manual", "Description": "In multi-account environments, IAM user centralization facilitates greater user control. User access beyond the initial account is then provided via role assumption. Centralization of users can be accomplished through federation with an external identity provider or through the use of AWS Organizations.", @@ -308,7 +308,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Manual", "Description": "The AWS support portal allows account owners to establish security questions that can be used to authenticate individuals calling AWS customer service for support. It is recommended that security questions be established.", @@ -329,7 +329,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "The 'root' user account is the most privileged user in an AWS account. AWS Access Keys provide programmatic access to a given AWS account. It is recommended that all access keys associated with the 'root' user account be removed.", @@ -350,7 +350,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "The 'root' user account is the most privileged user in an AWS account. Multi-factor Authentication (MFA) adds an extra layer of protection on top of a username and password. With MFA enabled, when a user signs in to an AWS website, they will be prompted for their username and password as well as for an authentication code from their AWS MFA device. **Note:** When virtual MFA is used for 'root' accounts, it is recommended that the device used is NOT a personal device, but rather a dedicated mobile device (tablet or phone) that is managed to be kept charged and secured independent of any individual personal devices. (\"non-personal virtual MFA\") This lessens the risks of losing access to the MFA due to device loss, device trade-in or if the individual owning the device is no longer employed at the company.", @@ -371,7 +371,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "The 'root' user account is the most privileged user in an AWS account. MFA adds an extra layer of protection on top of a user name and password. With MFA enabled, when a user signs in to an AWS website, they will be prompted for their user name and password as well as for an authentication code from their AWS MFA device. For Level 2, it is recommended that the 'root' user account be protected with a hardware MFA.", @@ -392,7 +392,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "With the creation of an AWS account, a 'root user' is created that cannot be disabled or deleted. That user has unrestricted access to and control over all resources in the AWS account. It is highly recommended that the use of this account be avoided for everyday tasks.", @@ -413,7 +413,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Password policies are, in part, used to enforce password complexity requirements. IAM password policies can be used to ensure password are at least a given length. It is recommended that the password policy require a minimum password length 14.", @@ -434,7 +434,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "IAM password policies can prevent the reuse of a given password by the same user. It is recommended that the password policy prevent the reuse of passwords.", @@ -455,8 +455,8 @@ ], "Attributes": [ { - "Section": "2. Storage", - "SubSection": "2.1. Simple Storage Service (S3)", + "Section": "2 Storage", + "SubSection": "2.1 Simple Storage Service (S3)", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "Amazon S3 provides a variety of no, or low, cost encryption options to protect data at rest.", @@ -477,8 +477,8 @@ ], "Attributes": [ { - "Section": "2. Storage", - "SubSection": "2.1. Simple Storage Service (S3)", + "Section": "2 Storage", + "SubSection": "2.1 Simple Storage Service (S3)", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "At the Amazon S3 bucket level, you can configure permissions through a bucket policy making the objects accessible only through HTTPS.", @@ -499,8 +499,8 @@ ], "Attributes": [ { - "Section": "2. Storage", - "SubSection": "2.1. Simple Storage Service (S3)", + "Section": "2 Storage", + "SubSection": "2.1 Simple Storage Service (S3)", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Once MFA Delete is enabled on your sensitive and classified S3 bucket it requires the user to have two forms of authentication.", @@ -521,8 +521,8 @@ ], "Attributes": [ { - "Section": "2. Storage", - "SubSection": "2.1. Simple Storage Service (S3)", + "Section": "2 Storage", + "SubSection": "2.1 Simple Storage Service (S3)", "Profile": "Level 2", "AssessmentStatus": "Manual", "Description": "Amazon S3 buckets can contain sensitive data, that for security purposes should be discovered, monitored, classified and protected. Macie along with other 3rd party tools can automatically provide an inventory of Amazon S3 buckets.", @@ -544,8 +544,8 @@ ], "Attributes": [ { - "Section": "2. Storage", - "SubSection": "2.1. Simple Storage Service (S3)", + "Section": "2 Storage", + "SubSection": "2.1 Simple Storage Service (S3)", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Amazon S3 provides `Block public access (bucket settings)` and `Block public access (account settings)` to help you manage public access to Amazon S3 resources. By default, S3 buckets and objects are created with public access disabled. However, an IAM principal with sufficient S3 permissions can enable public access at the bucket and/or object level. While enabled, `Block public access (bucket settings)` prevents an individual bucket, and its contained objects, from becoming publicly accessible. Similarly, `Block public access (account settings)` prevents all buckets, and contained objects, from becoming publicly accessible across the entire account.", @@ -566,7 +566,7 @@ ], "Attributes": [ { - "Section": "2. Storage", + "Section": "2 Storage", "SubSection": "2.2. Elastic Compute Cloud (EC2)", "Profile": "Level 1", "AssessmentStatus": "Automated", @@ -589,8 +589,8 @@ ], "Attributes": [ { - "Section": "2. Storage", - "SubSection": "2.3. Relational Database Service (RDS)", + "Section": "2 Storage", + "SubSection": "2.3 Relational Database Service (RDS)", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Amazon RDS encrypted DB instances use the industry standard AES-256 encryption algorithm to encrypt your data on the server that hosts your Amazon RDS DB instances. After your data is encrypted, Amazon RDS handles authentication of access and decryption of your data transparently with a minimal impact on performance.", @@ -611,7 +611,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "AWS CloudTrail is a web service that records AWS API calls for your account and delivers log files to you. The recorded information includes the identity of the API caller, the time of the API call, the source IP address of the API caller, the request parameters, and the response elements returned by the AWS service. CloudTrail provides a history of AWS API calls for an account, including API calls made via the Management Console, SDKs, command line tools, and higher-level AWS services (such as CloudFormation).", @@ -632,7 +632,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "S3 object-level API operations such as GetObject, DeleteObject, and PutObject are called data events. By default, CloudTrail trails don't log data events and so it is recommended to enable Object-level logging for S3 buckets.", @@ -653,7 +653,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "S3 object-level API operations such as GetObject, DeleteObject, and PutObject are called data events. By default, CloudTrail trails don't log data events and so it is recommended to enable Object-level logging for S3 buckets.", @@ -674,7 +674,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "CloudTrail log file validation creates a digitally signed digest file containing a hash of each log that CloudTrail writes to S3. These digest files can be used to determine whether a log file was changed, deleted, or unchanged after CloudTrail delivered the log. It is recommended that file validation be enabled on all CloudTrails.", @@ -695,7 +695,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "CloudTrail logs a record of every API call made in your AWS account. These logs file are stored in an S3 bucket. It is recommended that the bucket policy or access control list (ACL) applied to the S3 bucket that CloudTrail logs to prevent public access to the CloudTrail logs.", @@ -716,7 +716,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "AWS CloudTrail is a web service that records AWS API calls made in a given AWS account. The recorded information includes the identity of the API caller, the time of the API call, the source IP address of the API caller, the request parameters, and the response elements returned by the AWS service. CloudTrail uses Amazon S3 for log file storage and delivery, so log files are stored durably. In addition to capturing CloudTrail logs within a specified S3 bucket for long term analysis, realtime analysis can be performed by configuring CloudTrail to send logs to CloudWatch Logs. For a trail that is enabled in all regions in an account, CloudTrail sends log files from all those regions to a CloudWatch Logs log group. It is recommended that CloudTrail logs be sent to CloudWatch Logs. Note: The intent of this recommendation is to ensure AWS account activity is being captured, monitored, and appropriately alarmed on. CloudWatch Logs is a native way to accomplish this using AWS services but does not preclude the use of an alternate solution.", @@ -737,7 +737,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "AWS Config is a web service that performs configuration management of supported AWS resources within your account and delivers log files to you. The recorded information includes the configuration item (AWS resource), relationships between configuration items (AWS resources), any configuration changes between resources. It is recommended AWS Config be enabled in all regions.", @@ -758,7 +758,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "S3 Bucket Access Logging generates a log that contains access records for each request made to your S3 bucket. An access log record contains details about the request, such as the request type, the resources specified in the request worked, and the time and date the request was processed. It is recommended that bucket access logging be enabled on the CloudTrail S3 bucket.", @@ -779,7 +779,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "AWS CloudTrail is a web service that records AWS API calls for an account and makes those logs available to users and resources in accordance with IAM policies. AWS Key Management Service (KMS) is a managed service that helps create and control the encryption keys used to encrypt account data, and uses Hardware Security Modules (HSMs) to protect the security of encryption keys. CloudTrail logs can be configured to leverage server side encryption (SSE) and KMS customer created master keys (CMK) to further protect CloudTrail logs. It is recommended that CloudTrail be configured to use SSE-KMS.", @@ -800,7 +800,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "AWS Key Management Service (KMS) allows customers to rotate the backing key which is key material stored within the KMS which is tied to the key ID of the Customer Created customer master key (CMK). It is the backing key that is used to perform cryptographic operations such as encryption and decryption. Automated key rotation currently retains all prior backing keys so that decryption of encrypted data can take place transparently. It is recommended that CMK key rotation be enabled for symmetric keys. Key rotation can not be enabled for any asymmetric CMK.", @@ -821,7 +821,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "VPC Flow Logs is a feature that enables you to capture information about the IP traffic going to and from network interfaces in your VPC. After you've created a flow log, you can view and retrieve its data in Amazon CloudWatch Logs. It is recommended that VPC Flow Logs be enabled for packet \"Rejects\" for VPCs.", @@ -842,7 +842,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for unauthorized API calls.", @@ -863,7 +863,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. Security Groups are a stateful packet filter that controls ingress and egress traffic within a VPC. It is recommended that a metric filter and alarm be established for detecting changes to Security Groups.", @@ -884,7 +884,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. NACLs are used as a stateless packet filter to control ingress and egress traffic for subnets within a VPC. It is recommended that a metric filter and alarm be established for changes made to NACLs.", @@ -905,7 +905,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. Network gateways are required to send/receive traffic to a destination outside of a VPC. It is recommended that a metric filter and alarm be established for changes to network gateways.", @@ -926,7 +926,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. Routing tables are used to route network traffic between subnets and to network gateways. It is recommended that a metric filter and alarm be established for changes to route tables.", @@ -947,7 +947,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is possible to have more than 1 VPC within an account, in addition it is also possible to create a peer connection between 2 VPCs enabling network traffic to route between VPCs. It is recommended that a metric filter and alarm be established for changes made to VPCs.", @@ -968,7 +968,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for AWS Organizations changes made in the master AWS Account.", @@ -989,7 +989,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for console logins that are not protected by multi-factor authentication (MFA).", @@ -1010,7 +1010,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for 'root' login attempts.", @@ -1031,7 +1031,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established changes made to Identity and Access Management (IAM) policies.", @@ -1052,7 +1052,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for detecting changes to CloudTrail's configurations.", @@ -1073,7 +1073,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for failed console authentication attempts.", @@ -1094,7 +1094,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for customer created CMKs which have changed state to disabled or scheduled deletion.", @@ -1115,7 +1115,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for changes to S3 bucket policies.", @@ -1136,7 +1136,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for detecting changes to CloudTrail's configurations.", @@ -1159,7 +1159,7 @@ ], "Attributes": [ { - "Section": "5. Networking", + "Section": "5 Networking", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "The Network Access Control List (NACL) function provide stateless filtering of ingress and egress network traffic to AWS resources. It is recommended that no NACL allows unrestricted ingress access to remote server administration ports, such as SSH to port `22` and RDP to port `3389`.", @@ -1182,7 +1182,7 @@ ], "Attributes": [ { - "Section": "5. Networking", + "Section": "5 Networking", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Security groups provide stateful filtering of ingress and egress network traffic to AWS resources. It is recommended that no security group allows unrestricted ingress access to remote server administration ports, such as SSH to port `22` and RDP to port `3389`.", @@ -1203,7 +1203,7 @@ ], "Attributes": [ { - "Section": "5. Networking", + "Section": "5 Networking", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "A VPC comes with a default security group whose initial settings deny all inbound traffic, allow all outbound traffic, and allow all traffic between instances assigned to the security group. If you don't specify a security group when you launch an instance, the instance is automatically assigned to this default security group. Security groups provide stateful filtering of ingress/egress network traffic to AWS resources. It is recommended that the default security group restrict all traffic. The default VPC in every region should have its default security group updated to comply. Any newly created VPCs will automatically contain a default security group that will need remediation to comply with this recommendation. **NOTE:** When implementing this recommendation, VPC flow logging is invaluable in determining the least privilege port access required by systems to work properly because it can log all packet acceptances and rejections occurring under the current security groups. This dramatically reduces the primary barrier to least privilege engineering - discovering the minimum ports required by systems in the environment. Even if the VPC flow logging recommendation in this benchmark is not adopted as a permanent security measure, it should be used during any period of discovery and engineering for least privileged security groups.", @@ -1224,7 +1224,7 @@ ], "Attributes": [ { - "Section": "5. Networking", + "Section": "5 Networking", "Profile": "Level 2", "AssessmentStatus": "Manual", "Description": "Once a VPC peering connection is established, routing tables must be updated to establish any connections between the peered VPCs. These routes can be as specific as desired - even peering a VPC to only a single host on the other side of the connection.", diff --git a/prowler/compliance/aws/cis_1.5_aws.json b/prowler/compliance/aws/cis_1.5_aws.json index 90ca3742e4..8c3d9a25a1 100644 --- a/prowler/compliance/aws/cis_1.5_aws.json +++ b/prowler/compliance/aws/cis_1.5_aws.json @@ -12,7 +12,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Manual", "Description": "Ensure contact email and telephone details for AWS accounts are current and map to more than one individual in your organization. An AWS account supports a number of contact details, and AWS will use these to contact the account owner if activity judged to be in breach of Acceptable Use Policy or indicative of likely security compromise is observed by the AWS Abuse team. Contact details should not be for a single individual, as circumstances may arise where that individual is unavailable. Email contact details should point to a mail alias which forwards email to multiple individuals within the organization; where feasible, phone contact details should point to a PABX hunt group or other call-forwarding system.", @@ -33,7 +33,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Multi-Factor Authentication (MFA) adds an extra layer of authentication assurance beyond traditional credentials. With MFA enabled, when a user signs in to the AWS Console, they will be prompted for their user name and password as well as for an authentication code from their physical or virtual MFA token. It is recommended that MFA be enabled for all accounts that have a console password.", @@ -54,7 +54,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "AWS console defaults to no check boxes selected when creating a new IAM user. When cerating the IAM User credentials you have to determine what type of access they require. Programmatic access: The IAM user might need to make API calls, use the AWS CLI, or use the Tools for Windows PowerShell. In that case, create an access key (access key ID and a secret access key) for that user. AWS Management Console access: If the user needs to access the AWS Management Console, create a password for the user.", @@ -76,7 +76,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "AWS IAM users can access AWS resources using different types of credentials, such as passwords or access keys. It is recommended that all credentials that have been unused in 45 or greater days be deactivated or removed.", @@ -97,7 +97,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Access keys are long-term credentials for an IAM user or the AWS account 'root' user. You can use access keys to sign programmatic requests to the AWS CLI or AWS API (directly or using the AWS SDK)", @@ -118,7 +118,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Access keys consist of an access key ID and secret access key, which are used to sign programmatic requests that you make to AWS. AWS users need their own access keys to make programmatic calls to AWS from the AWS Command Line Interface (AWS CLI), Tools for Windows PowerShell, the AWS SDKs, or direct HTTP calls using the APIs for individual AWS services. It is recommended that all access keys be regularly rotated.", @@ -139,7 +139,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "IAM users are granted access to services, functions, and data through IAM policies. There are three ways to define policies for a user: 1) Edit the user policy directly, aka an inline, or user, policy; 2) attach a policy directly to a user; 3) add the user to an IAM group that has an attached policy. Only the third implementation is recommended.", @@ -161,7 +161,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "IAM policies are the means by which privileges are granted to users, groups, or roles. It is recommended and considered a standard security advice to grant _least privilege_ -that is, granting only the permissions required to perform a task. Determine what users need to do and then craft policies for them that let the users perform _only_ those tasks, instead of allowing full administrative privileges.", @@ -182,7 +182,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "AWS provides a support center that can be used for incident notification and response, as well as technical support and customer services. Create an IAM Role to allow authorized users to manage incidents with AWS Support.", @@ -203,7 +203,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 2", "AssessmentStatus": "Manual", "Description": "AWS access from within AWS instances can be done by either encoding AWS keys into AWS API calls or by assigning the instance to a role which has an appropriate permissions policy for the required access. \"AWS Access\" means accessing the APIs of AWS in order to access AWS resources or manage AWS account resources.", @@ -224,7 +224,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "To enable HTTPS connections to your website or application in AWS, you need an SSL/TLS server certificate. You can use ACM or IAM to store and deploy server certificates. Use IAM as a certificate manager only when you must support HTTPS connections in a region that is not supported by ACM. IAM securely encrypts your private keys and stores the encrypted version in IAM SSL certificate storage. IAM supports deploying server certificates in all regions, but you must obtain your certificate from an external provider for use with AWS. You cannot upload an ACM certificate to IAM. Additionally, you cannot manage your certificates from the IAM Console.", @@ -245,7 +245,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Manual", "Description": "AWS provides customers with the option of specifying the contact information for account's security team. It is recommended that this information be provided.", @@ -266,7 +266,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Enable IAM Access analyzer for IAM policies about all resources in each region. IAM Access Analyzer is a technology introduced at AWS reinvent 2019. After the Analyzer is enabled in IAM, scan results are displayed on the console showing the accessible resources. Scans show resources that other accounts and federated users can access, such as KMS keys and IAM roles. So the results allow you to determine if an unintended user is allowed, making it easier for administrators to monitor least privileges access. Access Analyzer analyzes only policies that are applied to resources in the same AWS Region.", @@ -287,7 +287,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 2", "AssessmentStatus": "Manual", "Description": "In multi-account environments, IAM user centralization facilitates greater user control. User access beyond the initial account is then provided via role assumption. Centralization of users can be accomplished through federation with an external identity provider or through the use of AWS Organizations.", @@ -308,7 +308,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Manual", "Description": "The AWS support portal allows account owners to establish security questions that can be used to authenticate individuals calling AWS customer service for support. It is recommended that security questions be established.", @@ -329,7 +329,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "The 'root' user account is the most privileged user in an AWS account. AWS Access Keys provide programmatic access to a given AWS account. It is recommended that all access keys associated with the 'root' user account be removed.", @@ -350,7 +350,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "The 'root' user account is the most privileged user in an AWS account. Multi-factor Authentication (MFA) adds an extra layer of protection on top of a username and password. With MFA enabled, when a user signs in to an AWS website, they will be prompted for their username and password as well as for an authentication code from their AWS MFA device. **Note:** When virtual MFA is used for 'root' accounts, it is recommended that the device used is NOT a personal device, but rather a dedicated mobile device (tablet or phone) that is managed to be kept charged and secured independent of any individual personal devices. (\"non-personal virtual MFA\") This lessens the risks of losing access to the MFA due to device loss, device trade-in or if the individual owning the device is no longer employed at the company.", @@ -371,7 +371,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "The 'root' user account is the most privileged user in an AWS account. MFA adds an extra layer of protection on top of a user name and password. With MFA enabled, when a user signs in to an AWS website, they will be prompted for their user name and password as well as for an authentication code from their AWS MFA device. For Level 2, it is recommended that the 'root' user account be protected with a hardware MFA.", @@ -392,7 +392,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "With the creation of an AWS account, a 'root user' is created that cannot be disabled or deleted. That user has unrestricted access to and control over all resources in the AWS account. It is highly recommended that the use of this account be avoided for everyday tasks.", @@ -413,7 +413,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Password policies are, in part, used to enforce password complexity requirements. IAM password policies can be used to ensure password are at least a given length. It is recommended that the password policy require a minimum password length 14.", @@ -434,7 +434,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "IAM password policies can prevent the reuse of a given password by the same user. It is recommended that the password policy prevent the reuse of passwords.", @@ -455,8 +455,8 @@ ], "Attributes": [ { - "Section": "2. Storage", - "SubSection": "2.1. Simple Storage Service (S3)", + "Section": "2 Storage", + "SubSection": "2.1 Simple Storage Service (S3)", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "Amazon S3 provides a variety of no, or low, cost encryption options to protect data at rest.", @@ -477,8 +477,8 @@ ], "Attributes": [ { - "Section": "2. Storage", - "SubSection": "2.1. Simple Storage Service (S3)", + "Section": "2 Storage", + "SubSection": "2.1 Simple Storage Service (S3)", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "At the Amazon S3 bucket level, you can configure permissions through a bucket policy making the objects accessible only through HTTPS.", @@ -499,8 +499,8 @@ ], "Attributes": [ { - "Section": "2. Storage", - "SubSection": "2.1. Simple Storage Service (S3)", + "Section": "2 Storage", + "SubSection": "2.1 Simple Storage Service (S3)", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Once MFA Delete is enabled on your sensitive and classified S3 bucket it requires the user to have two forms of authentication.", @@ -521,8 +521,8 @@ ], "Attributes": [ { - "Section": "2. Storage", - "SubSection": "2.1. Simple Storage Service (S3)", + "Section": "2 Storage", + "SubSection": "2.1 Simple Storage Service (S3)", "Profile": "Level 2", "AssessmentStatus": "Manual", "Description": "Amazon S3 buckets can contain sensitive data, that for security purposes should be discovered, monitored, classified and protected. Macie along with other 3rd party tools can automatically provide an inventory of Amazon S3 buckets.", @@ -544,8 +544,8 @@ ], "Attributes": [ { - "Section": "2. Storage", - "SubSection": "2.1. Simple Storage Service (S3)", + "Section": "2 Storage", + "SubSection": "2.1 Simple Storage Service (S3)", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Amazon S3 provides `Block public access (bucket settings)` and `Block public access (account settings)` to help you manage public access to Amazon S3 resources. By default, S3 buckets and objects are created with public access disabled. However, an IAM principal with sufficient S3 permissions can enable public access at the bucket and/or object level. While enabled, `Block public access (bucket settings)` prevents an individual bucket, and its contained objects, from becoming publicly accessible. Similarly, `Block public access (account settings)` prevents all buckets, and contained objects, from becoming publicly accessible across the entire account.", @@ -566,8 +566,8 @@ ], "Attributes": [ { - "Section": "2. Storage", - "SubSection": "2.2. Elastic Compute Cloud (EC2)", + "Section": "2 Storage", + "SubSection": "2.2 Elastic Compute Cloud (EC2)", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Elastic Compute Cloud (EC2) supports encryption at rest when using the Elastic Block Store (EBS) service. While disabled by default, forcing encryption at EBS volume creation is supported.", @@ -589,8 +589,8 @@ ], "Attributes": [ { - "Section": "2. Storage", - "SubSection": "2.3. Relational Database Service (RDS)", + "Section": "2 Storage", + "SubSection": "2.3 Relational Database Service (RDS)", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Amazon RDS encrypted DB instances use the industry standard AES-256 encryption algorithm to encrypt your data on the server that hosts your Amazon RDS DB instances. After your data is encrypted, Amazon RDS handles authentication of access and decryption of your data transparently with a minimal impact on performance.", @@ -611,8 +611,8 @@ ], "Attributes": [ { - "Section": "2. Storage", - "SubSection": "2.3. Relational Database Service (RDS)", + "Section": "2 Storage", + "SubSection": "2.3 Relational Database Service (RDS)", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Ensure that RDS database instances have the Auto Minor Version Upgrade flag enabled in order to receive automatically minor engine upgrades during the specified maintenance window. So, RDS instances can get the new features, bug fixes, and security patches for their database engines.", @@ -633,8 +633,8 @@ ], "Attributes": [ { - "Section": "2. Storage", - "SubSection": "2.3. Relational Database Service (RDS)", + "Section": "2 Storage", + "SubSection": "2.3 Relational Database Service (RDS)", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Ensure and verify that RDS database instances provisioned in your AWS account do restrict unauthorized access in order to minimize security risks. To restrict access to any publicly accessible RDS database instance, you must disable the database Publicly Accessible flag and update the VPC security group associated with the instance.", @@ -655,7 +655,7 @@ ], "Attributes": [ { - "Section": "2. Storage", + "Section": "2 Storage", "SubSection": "2.4 Elastic File System (EFS)", "Profile": "Level 1", "AssessmentStatus": "Manual", @@ -677,7 +677,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "AWS CloudTrail is a web service that records AWS API calls for your account and delivers log files to you. The recorded information includes the identity of the API caller, the time of the API call, the source IP address of the API caller, the request parameters, and the response elements returned by the AWS service. CloudTrail provides a history of AWS API calls for an account, including API calls made via the Management Console, SDKs, command line tools, and higher-level AWS services (such as CloudFormation).", @@ -698,7 +698,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "S3 object-level API operations such as GetObject, DeleteObject, and PutObject are called data events. By default, CloudTrail trails don't log data events and so it is recommended to enable Object-level logging for S3 buckets.", @@ -719,7 +719,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "S3 object-level API operations such as GetObject, DeleteObject, and PutObject are called data events. By default, CloudTrail trails don't log data events and so it is recommended to enable Object-level logging for S3 buckets.", @@ -740,7 +740,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "CloudTrail log file validation creates a digitally signed digest file containing a hash of each log that CloudTrail writes to S3. These digest files can be used to determine whether a log file was changed, deleted, or unchanged after CloudTrail delivered the log. It is recommended that file validation be enabled on all CloudTrails.", @@ -761,7 +761,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "CloudTrail logs a record of every API call made in your AWS account. These logs file are stored in an S3 bucket. It is recommended that the bucket policy or access control list (ACL) applied to the S3 bucket that CloudTrail logs to prevent public access to the CloudTrail logs.", @@ -782,7 +782,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "AWS CloudTrail is a web service that records AWS API calls made in a given AWS account. The recorded information includes the identity of the API caller, the time of the API call, the source IP address of the API caller, the request parameters, and the response elements returned by the AWS service. CloudTrail uses Amazon S3 for log file storage and delivery, so log files are stored durably. In addition to capturing CloudTrail logs within a specified S3 bucket for long term analysis, realtime analysis can be performed by configuring CloudTrail to send logs to CloudWatch Logs. For a trail that is enabled in all regions in an account, CloudTrail sends log files from all those regions to a CloudWatch Logs log group. It is recommended that CloudTrail logs be sent to CloudWatch Logs. Note: The intent of this recommendation is to ensure AWS account activity is being captured, monitored, and appropriately alarmed on. CloudWatch Logs is a native way to accomplish this using AWS services but does not preclude the use of an alternate solution.", @@ -803,7 +803,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "AWS Config is a web service that performs configuration management of supported AWS resources within your account and delivers log files to you. The recorded information includes the configuration item (AWS resource), relationships between configuration items (AWS resources), any configuration changes between resources. It is recommended AWS Config be enabled in all regions.", @@ -824,7 +824,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "S3 Bucket Access Logging generates a log that contains access records for each request made to your S3 bucket. An access log record contains details about the request, such as the request type, the resources specified in the request worked, and the time and date the request was processed. It is recommended that bucket access logging be enabled on the CloudTrail S3 bucket.", @@ -845,7 +845,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "AWS CloudTrail is a web service that records AWS API calls for an account and makes those logs available to users and resources in accordance with IAM policies. AWS Key Management Service (KMS) is a managed service that helps create and control the encryption keys used to encrypt account data, and uses Hardware Security Modules (HSMs) to protect the security of encryption keys. CloudTrail logs can be configured to leverage server side encryption (SSE) and KMS customer created master keys (CMK) to further protect CloudTrail logs. It is recommended that CloudTrail be configured to use SSE-KMS.", @@ -866,7 +866,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "AWS Key Management Service (KMS) allows customers to rotate the backing key which is key material stored within the KMS which is tied to the key ID of the Customer Created customer master key (CMK). It is the backing key that is used to perform cryptographic operations such as encryption and decryption. Automated key rotation currently retains all prior backing keys so that decryption of encrypted data can take place transparently. It is recommended that CMK key rotation be enabled for symmetric keys. Key rotation can not be enabled for any asymmetric CMK.", @@ -887,7 +887,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "VPC Flow Logs is a feature that enables you to capture information about the IP traffic going to and from network interfaces in your VPC. After you've created a flow log, you can view and retrieve its data in Amazon CloudWatch Logs. It is recommended that VPC Flow Logs be enabled for packet \"Rejects\" for VPCs.", @@ -908,7 +908,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for unauthorized API calls.", @@ -929,7 +929,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. Security Groups are a stateful packet filter that controls ingress and egress traffic within a VPC. It is recommended that a metric filter and alarm be established for detecting changes to Security Groups.", @@ -950,7 +950,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. NACLs are used as a stateless packet filter to control ingress and egress traffic for subnets within a VPC. It is recommended that a metric filter and alarm be established for changes made to NACLs.", @@ -971,7 +971,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. Network gateways are required to send/receive traffic to a destination outside of a VPC. It is recommended that a metric filter and alarm be established for changes to network gateways.", @@ -992,7 +992,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. Routing tables are used to route network traffic between subnets and to network gateways. It is recommended that a metric filter and alarm be established for changes to route tables.", @@ -1013,7 +1013,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is possible to have more than 1 VPC within an account, in addition it is also possible to create a peer connection between 2 VPCs enabling network traffic to route between VPCs. It is recommended that a metric filter and alarm be established for changes made to VPCs.", @@ -1034,7 +1034,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for AWS Organizations changes made in the master AWS Account.", @@ -1055,7 +1055,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "Security Hub collects security data from across AWS accounts, services, and supported third-party partner products and helps you analyze your security trends and identify the highest priority security issues. When you enable Security Hub, it begins to consume, aggregate, organize, and prioritize findings from AWS services that you have enabled, such as Amazon GuardDuty, Amazon Inspector, and Amazon Macie. You can also enable integrations with AWS partner security products.", @@ -1076,7 +1076,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for console logins that are not protected by multi-factor authentication (MFA).", @@ -1097,7 +1097,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for 'root' login attempts.", @@ -1118,7 +1118,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established changes made to Identity and Access Management (IAM) policies.", @@ -1139,7 +1139,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for detecting changes to CloudTrail's configurations.", @@ -1160,7 +1160,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for failed console authentication attempts.", @@ -1181,7 +1181,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for customer created CMKs which have changed state to disabled or scheduled deletion.", @@ -1202,7 +1202,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for changes to S3 bucket policies.", @@ -1223,7 +1223,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for detecting changes to CloudTrail's configurations.", @@ -1246,7 +1246,7 @@ ], "Attributes": [ { - "Section": "5. Networking", + "Section": "5 Networking", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "The Network Access Control List (NACL) function provide stateless filtering of ingress and egress network traffic to AWS resources. It is recommended that no NACL allows unrestricted ingress access to remote server administration ports, such as SSH to port `22` and RDP to port `3389`.", @@ -1269,7 +1269,7 @@ ], "Attributes": [ { - "Section": "5. Networking", + "Section": "5 Networking", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Security groups provide stateful filtering of ingress and egress network traffic to AWS resources. It is recommended that no security group allows unrestricted ingress access to remote server administration ports, such as SSH to port `22` and RDP to port `3389`.", @@ -1292,7 +1292,7 @@ ], "Attributes": [ { - "Section": "5. Networking", + "Section": "5 Networking", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Security groups provide stateful filtering of ingress and egress network traffic to AWS resources. It is recommended that no security group allows unrestricted ingress access to remote server administration ports, such as SSH to port `22` and RDP to port `3389`.", @@ -1313,7 +1313,7 @@ ], "Attributes": [ { - "Section": "5. Networking", + "Section": "5 Networking", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "A VPC comes with a default security group whose initial settings deny all inbound traffic, allow all outbound traffic, and allow all traffic between instances assigned to the security group. If you don't specify a security group when you launch an instance, the instance is automatically assigned to this default security group. Security groups provide stateful filtering of ingress/egress network traffic to AWS resources. It is recommended that the default security group restrict all traffic. The default VPC in every region should have its default security group updated to comply. Any newly created VPCs will automatically contain a default security group that will need remediation to comply with this recommendation. **NOTE:** When implementing this recommendation, VPC flow logging is invaluable in determining the least privilege port access required by systems to work properly because it can log all packet acceptances and rejections occurring under the current security groups. This dramatically reduces the primary barrier to least privilege engineering - discovering the minimum ports required by systems in the environment. Even if the VPC flow logging recommendation in this benchmark is not adopted as a permanent security measure, it should be used during any period of discovery and engineering for least privileged security groups.", @@ -1334,7 +1334,7 @@ ], "Attributes": [ { - "Section": "5. Networking", + "Section": "5 Networking", "Profile": "Level 2", "AssessmentStatus": "Manual", "Description": "Once a VPC peering connection is established, routing tables must be updated to establish any connections between the peered VPCs. These routes can be as specific as desired - even peering a VPC to only a single host on the other side of the connection.", diff --git a/prowler/compliance/aws/cis_2.0_aws.json b/prowler/compliance/aws/cis_2.0_aws.json index 1d12e296d5..b847e5e38e 100644 --- a/prowler/compliance/aws/cis_2.0_aws.json +++ b/prowler/compliance/aws/cis_2.0_aws.json @@ -12,7 +12,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Manual", "Description": "Ensure contact email and telephone details for AWS accounts are current and map to more than one individual in your organization. An AWS account supports a number of contact details, and AWS will use these to contact the account owner if activity judged to be in breach of Acceptable Use Policy or indicative of likely security compromise is observed by the AWS Abuse team. Contact details should not be for a single individual, as circumstances may arise where that individual is unavailable. Email contact details should point to a mail alias which forwards email to multiple individuals within the organization; where feasible, phone contact details should point to a PABX hunt group or other call-forwarding system.", @@ -33,7 +33,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Multi-Factor Authentication (MFA) adds an extra layer of authentication assurance beyond traditional credentials. With MFA enabled, when a user signs in to the AWS Console, they will be prompted for their user name and password as well as for an authentication code from their physical or virtual MFA token. It is recommended that MFA be enabled for all accounts that have a console password.", @@ -54,7 +54,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "AWS console defaults to no check boxes selected when creating a new IAM user. When cerating the IAM User credentials you have to determine what type of access they require. Programmatic access: The IAM user might need to make API calls, use the AWS CLI, or use the Tools for Windows PowerShell. In that case, create an access key (access key ID and a secret access key) for that user. AWS Management Console access: If the user needs to access the AWS Management Console, create a password for the user.", @@ -76,7 +76,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "AWS IAM users can access AWS resources using different types of credentials, such as passwords or access keys. It is recommended that all credentials that have been unused in 45 or greater days be deactivated or removed.", @@ -97,7 +97,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Access keys are long-term credentials for an IAM user or the AWS account 'root' user. You can use access keys to sign programmatic requests to the AWS CLI or AWS API (directly or using the AWS SDK)", @@ -118,7 +118,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Access keys consist of an access key ID and secret access key, which are used to sign programmatic requests that you make to AWS. AWS users need their own access keys to make programmatic calls to AWS from the AWS Command Line Interface (AWS CLI), Tools for Windows PowerShell, the AWS SDKs, or direct HTTP calls using the APIs for individual AWS services. It is recommended that all access keys be regularly rotated.", @@ -139,7 +139,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "IAM users are granted access to services, functions, and data through IAM policies. There are three ways to define policies for a user: 1) Edit the user policy directly, aka an inline, or user, policy; 2) attach a policy directly to a user; 3) add the user to an IAM group that has an attached policy. Only the third implementation is recommended.", @@ -161,7 +161,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "IAM policies are the means by which privileges are granted to users, groups, or roles. It is recommended and considered a standard security advice to grant _least privilege_ -that is, granting only the permissions required to perform a task. Determine what users need to do and then craft policies for them that let the users perform _only_ those tasks, instead of allowing full administrative privileges.", @@ -182,7 +182,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "AWS provides a support center that can be used for incident notification and response, as well as technical support and customer services. Create an IAM Role to allow authorized users to manage incidents with AWS Support.", @@ -203,7 +203,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 2", "AssessmentStatus": "Manual", "Description": "AWS access from within AWS instances can be done by either encoding AWS keys into AWS API calls or by assigning the instance to a role which has an appropriate permissions policy for the required access. \"AWS Access\" means accessing the APIs of AWS in order to access AWS resources or manage AWS account resources.", @@ -224,7 +224,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "To enable HTTPS connections to your website or application in AWS, you need an SSL/TLS server certificate. You can use ACM or IAM to store and deploy server certificates. Use IAM as a certificate manager only when you must support HTTPS connections in a region that is not supported by ACM. IAM securely encrypts your private keys and stores the encrypted version in IAM SSL certificate storage. IAM supports deploying server certificates in all regions, but you must obtain your certificate from an external provider for use with AWS. You cannot upload an ACM certificate to IAM. Additionally, you cannot manage your certificates from the IAM Console.", @@ -245,7 +245,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Manual", "Description": "AWS provides customers with the option of specifying the contact information for account's security team. It is recommended that this information be provided.", @@ -266,7 +266,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Enable IAM Access analyzer for IAM policies about all resources in each region. IAM Access Analyzer is a technology introduced at AWS reinvent 2019. After the Analyzer is enabled in IAM, scan results are displayed on the console showing the accessible resources. Scans show resources that other accounts and federated users can access, such as KMS keys and IAM roles. So the results allow you to determine if an unintended user is allowed, making it easier for administrators to monitor least privileges access. Access Analyzer analyzes only policies that are applied to resources in the same AWS Region.", @@ -287,7 +287,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 2", "AssessmentStatus": "Manual", "Description": "In multi-account environments, IAM user centralization facilitates greater user control. User access beyond the initial account is then provided via role assumption. Centralization of users can be accomplished through federation with an external identity provider or through the use of AWS Organizations.", @@ -308,7 +308,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Manual", "Description": "AWS CloudShell is a convenient way of running CLI commands against AWS services; a managed IAM policy ('AWSCloudShellFullAccess') provides full access to CloudShell, which allows file upload and download capability between a user's local system and the CloudShell environment. Within the CloudShell environment a user has sudo permissions, and can access the internet. So it is feasible to install file transfer software (for example) and move data from CloudShell to external internet servers.", @@ -329,7 +329,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Manual", "Description": "The AWS support portal allows account owners to establish security questions that can be used to authenticate individuals calling AWS customer service for support. It is recommended that security questions be established.", @@ -350,7 +350,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "The 'root' user account is the most privileged user in an AWS account. AWS Access Keys provide programmatic access to a given AWS account. It is recommended that all access keys associated with the 'root' user account be removed.", @@ -371,7 +371,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "The 'root' user account is the most privileged user in an AWS account. Multi-factor Authentication (MFA) adds an extra layer of protection on top of a username and password. With MFA enabled, when a user signs in to an AWS website, they will be prompted for their username and password as well as for an authentication code from their AWS MFA device. **Note:** When virtual MFA is used for 'root' accounts, it is recommended that the device used is NOT a personal device, but rather a dedicated mobile device (tablet or phone) that is managed to be kept charged and secured independent of any individual personal devices. (\"non-personal virtual MFA\") This lessens the risks of losing access to the MFA due to device loss, device trade-in or if the individual owning the device is no longer employed at the company.", @@ -392,7 +392,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "The 'root' user account is the most privileged user in an AWS account. MFA adds an extra layer of protection on top of a user name and password. With MFA enabled, when a user signs in to an AWS website, they will be prompted for their user name and password as well as for an authentication code from their AWS MFA device. For Level 2, it is recommended that the 'root' user account be protected with a hardware MFA.", @@ -413,7 +413,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "With the creation of an AWS account, a 'root user' is created that cannot be disabled or deleted. That user has unrestricted access to and control over all resources in the AWS account. It is highly recommended that the use of this account be avoided for everyday tasks.", @@ -434,7 +434,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Password policies are, in part, used to enforce password complexity requirements. IAM password policies can be used to ensure password are at least a given length. It is recommended that the password policy require a minimum password length 14.", @@ -455,7 +455,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "IAM password policies can prevent the reuse of a given password by the same user. It is recommended that the password policy prevent the reuse of passwords.", @@ -476,7 +476,7 @@ ], "Attributes": [ { - "Section": "2. Storage", + "Section": "2 Storage", "SubSection": "2.1. Simple Storage Service (S3)", "Profile": "Level 2", "AssessmentStatus": "Automated", @@ -499,8 +499,8 @@ ], "Attributes": [ { - "Section": "2. Storage", - "SubSection": "2.1. Simple Storage Service (S3)", + "Section": "2 Storage", + "SubSection": "2.1 Simple Storage Service (S3)", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Once MFA Delete is enabled on your sensitive and classified S3 bucket it requires the user to have two forms of authentication.", @@ -521,8 +521,8 @@ ], "Attributes": [ { - "Section": "2. Storage", - "SubSection": "2.1. Simple Storage Service (S3)", + "Section": "2 Storage", + "SubSection": "2.1 Simple Storage Service (S3)", "Profile": "Level 2", "AssessmentStatus": "Manual", "Description": "Amazon S3 buckets can contain sensitive data, that for security purposes should be discovered, monitored, classified and protected. Macie along with other 3rd party tools can automatically provide an inventory of Amazon S3 buckets.", @@ -544,8 +544,8 @@ ], "Attributes": [ { - "Section": "2. Storage", - "SubSection": "2.1. Simple Storage Service (S3)", + "Section": "2 Storage", + "SubSection": "2.1 Simple Storage Service (S3)", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Amazon S3 provides `Block public access (bucket settings)` and `Block public access (account settings)` to help you manage public access to Amazon S3 resources. By default, S3 buckets and objects are created with public access disabled. However, an IAM principal with sufficient S3 permissions can enable public access at the bucket and/or object level. While enabled, `Block public access (bucket settings)` prevents an individual bucket, and its contained objects, from becoming publicly accessible. Similarly, `Block public access (account settings)` prevents all buckets, and contained objects, from becoming publicly accessible across the entire account.", @@ -566,8 +566,8 @@ ], "Attributes": [ { - "Section": "2. Storage", - "SubSection": "2.2. Elastic Compute Cloud (EC2)", + "Section": "2 Storage", + "SubSection": "2.2 Elastic Compute Cloud (EC2)", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Elastic Compute Cloud (EC2) supports encryption at rest when using the Elastic Block Store (EBS) service. While disabled by default, forcing encryption at EBS volume creation is supported.", @@ -589,8 +589,8 @@ ], "Attributes": [ { - "Section": "2. Storage", - "SubSection": "2.3. Relational Database Service (RDS)", + "Section": "2 Storage", + "SubSection": "2.3 Relational Database Service (RDS)", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Amazon RDS encrypted DB instances use the industry standard AES-256 encryption algorithm to encrypt your data on the server that hosts your Amazon RDS DB instances. After your data is encrypted, Amazon RDS handles authentication of access and decryption of your data transparently with a minimal impact on performance.", @@ -611,8 +611,8 @@ ], "Attributes": [ { - "Section": "2. Storage", - "SubSection": "2.3. Relational Database Service (RDS)", + "Section": "2 Storage", + "SubSection": "2.3 Relational Database Service (RDS)", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Ensure that RDS database instances have the Auto Minor Version Upgrade flag enabled in order to receive automatically minor engine upgrades during the specified maintenance window. So, RDS instances can get the new features, bug fixes, and security patches for their database engines.", @@ -633,8 +633,8 @@ ], "Attributes": [ { - "Section": "2. Storage", - "SubSection": "2.3. Relational Database Service (RDS)", + "Section": "2 Storage", + "SubSection": "2.3 Relational Database Service (RDS)", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Ensure and verify that RDS database instances provisioned in your AWS account do restrict unauthorized access in order to minimize security risks. To restrict access to any publicly accessible RDS database instance, you must disable the database Publicly Accessible flag and update the VPC security group associated with the instance.", @@ -655,7 +655,7 @@ ], "Attributes": [ { - "Section": "2. Storage", + "Section": "2 Storage", "SubSection": "2.4 Elastic File System (EFS)", "Profile": "Level 1", "AssessmentStatus": "Manual", @@ -677,7 +677,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "AWS CloudTrail is a web service that records AWS API calls for your account and delivers log files to you. The recorded information includes the identity of the API caller, the time of the API call, the source IP address of the API caller, the request parameters, and the response elements returned by the AWS service. CloudTrail provides a history of AWS API calls for an account, including API calls made via the Management Console, SDKs, command line tools, and higher-level AWS services (such as CloudFormation).", @@ -698,7 +698,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "S3 object-level API operations such as GetObject, DeleteObject, and PutObject are called data events. By default, CloudTrail trails don't log data events and so it is recommended to enable Object-level logging for S3 buckets.", @@ -719,7 +719,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "S3 object-level API operations such as GetObject, DeleteObject, and PutObject are called data events. By default, CloudTrail trails don't log data events and so it is recommended to enable Object-level logging for S3 buckets.", @@ -740,7 +740,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "CloudTrail log file validation creates a digitally signed digest file containing a hash of each log that CloudTrail writes to S3. These digest files can be used to determine whether a log file was changed, deleted, or unchanged after CloudTrail delivered the log. It is recommended that file validation be enabled on all CloudTrails.", @@ -761,7 +761,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "CloudTrail logs a record of every API call made in your AWS account. These logs file are stored in an S3 bucket. It is recommended that the bucket policy or access control list (ACL) applied to the S3 bucket that CloudTrail logs to prevent public access to the CloudTrail logs.", @@ -782,7 +782,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "AWS CloudTrail is a web service that records AWS API calls made in a given AWS account. The recorded information includes the identity of the API caller, the time of the API call, the source IP address of the API caller, the request parameters, and the response elements returned by the AWS service. CloudTrail uses Amazon S3 for log file storage and delivery, so log files are stored durably. In addition to capturing CloudTrail logs within a specified S3 bucket for long term analysis, realtime analysis can be performed by configuring CloudTrail to send logs to CloudWatch Logs. For a trail that is enabled in all regions in an account, CloudTrail sends log files from all those regions to a CloudWatch Logs log group. It is recommended that CloudTrail logs be sent to CloudWatch Logs. Note: The intent of this recommendation is to ensure AWS account activity is being captured, monitored, and appropriately alarmed on. CloudWatch Logs is a native way to accomplish this using AWS services but does not preclude the use of an alternate solution.", @@ -803,7 +803,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "AWS Config is a web service that performs configuration management of supported AWS resources within your account and delivers log files to you. The recorded information includes the configuration item (AWS resource), relationships between configuration items (AWS resources), any configuration changes between resources. It is recommended AWS Config be enabled in all regions.", @@ -824,7 +824,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "S3 Bucket Access Logging generates a log that contains access records for each request made to your S3 bucket. An access log record contains details about the request, such as the request type, the resources specified in the request worked, and the time and date the request was processed. It is recommended that bucket access logging be enabled on the CloudTrail S3 bucket.", @@ -845,7 +845,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "AWS CloudTrail is a web service that records AWS API calls for an account and makes those logs available to users and resources in accordance with IAM policies. AWS Key Management Service (KMS) is a managed service that helps create and control the encryption keys used to encrypt account data, and uses Hardware Security Modules (HSMs) to protect the security of encryption keys. CloudTrail logs can be configured to leverage server side encryption (SSE) and KMS customer created master keys (CMK) to further protect CloudTrail logs. It is recommended that CloudTrail be configured to use SSE-KMS.", @@ -866,7 +866,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "AWS Key Management Service (KMS) allows customers to rotate the backing key which is key material stored within the KMS which is tied to the key ID of the Customer Created customer master key (CMK). It is the backing key that is used to perform cryptographic operations such as encryption and decryption. Automated key rotation currently retains all prior backing keys so that decryption of encrypted data can take place transparently. It is recommended that CMK key rotation be enabled for symmetric keys. Key rotation can not be enabled for any asymmetric CMK.", @@ -887,7 +887,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "VPC Flow Logs is a feature that enables you to capture information about the IP traffic going to and from network interfaces in your VPC. After you've created a flow log, you can view and retrieve its data in Amazon CloudWatch Logs. It is recommended that VPC Flow Logs be enabled for packet \"Rejects\" for VPCs.", @@ -908,7 +908,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for unauthorized API calls.", @@ -929,7 +929,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. Security Groups are a stateful packet filter that controls ingress and egress traffic within a VPC. It is recommended that a metric filter and alarm be established for detecting changes to Security Groups.", @@ -950,7 +950,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. NACLs are used as a stateless packet filter to control ingress and egress traffic for subnets within a VPC. It is recommended that a metric filter and alarm be established for changes made to NACLs.", @@ -971,7 +971,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. Network gateways are required to send/receive traffic to a destination outside of a VPC. It is recommended that a metric filter and alarm be established for changes to network gateways.", @@ -992,7 +992,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. Routing tables are used to route network traffic between subnets and to network gateways. It is recommended that a metric filter and alarm be established for changes to route tables.", @@ -1013,7 +1013,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is possible to have more than 1 VPC within an account, in addition it is also possible to create a peer connection between 2 VPCs enabling network traffic to route between VPCs. It is recommended that a metric filter and alarm be established for changes made to VPCs.", @@ -1034,7 +1034,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for AWS Organizations changes made in the master AWS Account.", @@ -1055,7 +1055,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "Security Hub collects security data from across AWS accounts, services, and supported third-party partner products and helps you analyze your security trends and identify the highest priority security issues. When you enable Security Hub, it begins to consume, aggregate, organize, and prioritize findings from AWS services that you have enabled, such as Amazon GuardDuty, Amazon Inspector, and Amazon Macie. You can also enable integrations with AWS partner security products.", @@ -1076,7 +1076,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for console logins that are not protected by multi-factor authentication (MFA).", @@ -1097,7 +1097,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for 'root' login attempts.", @@ -1118,7 +1118,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established changes made to Identity and Access Management (IAM) policies.", @@ -1139,7 +1139,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for detecting changes to CloudTrail's configurations.", @@ -1160,7 +1160,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for failed console authentication attempts.", @@ -1181,7 +1181,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for customer created CMKs which have changed state to disabled or scheduled deletion.", @@ -1202,7 +1202,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for changes to S3 bucket policies.", @@ -1223,7 +1223,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for detecting changes to CloudTrail's configurations.", @@ -1246,7 +1246,7 @@ ], "Attributes": [ { - "Section": "5. Networking", + "Section": "5 Networking", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "The Network Access Control List (NACL) function provide stateless filtering of ingress and egress network traffic to AWS resources. It is recommended that no NACL allows unrestricted ingress access to remote server administration ports, such as SSH to port `22` and RDP to port `3389`.", @@ -1269,7 +1269,7 @@ ], "Attributes": [ { - "Section": "5. Networking", + "Section": "5 Networking", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Security groups provide stateful filtering of ingress and egress network traffic to AWS resources. It is recommended that no security group allows unrestricted ingress access to remote server administration ports, such as SSH to port `22` and RDP to port `3389`.", @@ -1292,7 +1292,7 @@ ], "Attributes": [ { - "Section": "5. Networking", + "Section": "5 Networking", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Security groups provide stateful filtering of ingress and egress network traffic to AWS resources. It is recommended that no security group allows unrestricted ingress access to remote server administration ports, such as SSH to port `22` and RDP to port `3389`.", @@ -1313,7 +1313,7 @@ ], "Attributes": [ { - "Section": "5. Networking", + "Section": "5 Networking", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "A VPC comes with a default security group whose initial settings deny all inbound traffic, allow all outbound traffic, and allow all traffic between instances assigned to the security group. If you don't specify a security group when you launch an instance, the instance is automatically assigned to this default security group. Security groups provide stateful filtering of ingress/egress network traffic to AWS resources. It is recommended that the default security group restrict all traffic. The default VPC in every region should have its default security group updated to comply. Any newly created VPCs will automatically contain a default security group that will need remediation to comply with this recommendation. **NOTE:** When implementing this recommendation, VPC flow logging is invaluable in determining the least privilege port access required by systems to work properly because it can log all packet acceptances and rejections occurring under the current security groups. This dramatically reduces the primary barrier to least privilege engineering - discovering the minimum ports required by systems in the environment. Even if the VPC flow logging recommendation in this benchmark is not adopted as a permanent security measure, it should be used during any period of discovery and engineering for least privileged security groups.", @@ -1334,7 +1334,7 @@ ], "Attributes": [ { - "Section": "5. Networking", + "Section": "5 Networking", "Profile": "Level 2", "AssessmentStatus": "Manual", "Description": "Once a VPC peering connection is established, routing tables must be updated to establish any connections between the peered VPCs. These routes can be as specific as desired - even peering a VPC to only a single host on the other side of the connection.", @@ -1356,7 +1356,7 @@ ], "Attributes": [ { - "Section": "5. Networking", + "Section": "5 Networking", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "When enabling the Metadata Service on AWS EC2 instances, users have the option of using either Instance Metadata Service Version 1 (IMDSv1; a request/response method) or Instance Metadata Service Version 2 (IMDSv2; a session-oriented method).", diff --git a/prowler/compliance/aws/cis_3.0_aws.json b/prowler/compliance/aws/cis_3.0_aws.json index 9b45e6c7b8..9b9ff78ded 100644 --- a/prowler/compliance/aws/cis_3.0_aws.json +++ b/prowler/compliance/aws/cis_3.0_aws.json @@ -12,7 +12,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Manual", "Description": "Ensure contact email and telephone details for AWS accounts are current and map to more than one individual in your organization. An AWS account supports a number of contact details, and AWS will use these to contact the account owner if activity judged to be in breach of Acceptable Use Policy or indicative of likely security compromise is observed by the AWS Abuse team. Contact details should not be for a single individual, as circumstances may arise where that individual is unavailable. Email contact details should point to a mail alias which forwards email to multiple individuals within the organization; where feasible, phone contact details should point to a PABX hunt group or other call-forwarding system.", @@ -33,7 +33,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Multi-Factor Authentication (MFA) adds an extra layer of authentication assurance beyond traditional credentials. With MFA enabled, when a user signs in to the AWS Console, they will be prompted for their user name and password as well as for an authentication code from their physical or virtual MFA token. It is recommended that MFA be enabled for all accounts that have a console password.", @@ -54,7 +54,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "AWS console defaults to no check boxes selected when creating a new IAM user. When cerating the IAM User credentials you have to determine what type of access they require. Programmatic access: The IAM user might need to make API calls, use the AWS CLI, or use the Tools for Windows PowerShell. In that case, create an access key (access key ID and a secret access key) for that user. AWS Management Console access: If the user needs to access the AWS Management Console, create a password for the user.", @@ -76,7 +76,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "AWS IAM users can access AWS resources using different types of credentials, such as passwords or access keys. It is recommended that all credentials that have been unused in 45 or greater days be deactivated or removed.", @@ -97,7 +97,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Access keys are long-term credentials for an IAM user or the AWS account 'root' user. You can use access keys to sign programmatic requests to the AWS CLI or AWS API (directly or using the AWS SDK)", @@ -118,7 +118,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Access keys consist of an access key ID and secret access key, which are used to sign programmatic requests that you make to AWS. AWS users need their own access keys to make programmatic calls to AWS from the AWS Command Line Interface (AWS CLI), Tools for Windows PowerShell, the AWS SDKs, or direct HTTP calls using the APIs for individual AWS services. It is recommended that all access keys be regularly rotated.", @@ -139,7 +139,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "IAM users are granted access to services, functions, and data through IAM policies. There are three ways to define policies for a user: 1) Edit the user policy directly, aka an inline, or user, policy; 2) attach a policy directly to a user; 3) add the user to an IAM group that has an attached policy. Only the third implementation is recommended.", @@ -161,7 +161,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "IAM policies are the means by which privileges are granted to users, groups, or roles. It is recommended and considered a standard security advice to grant _least privilege_ -that is, granting only the permissions required to perform a task. Determine what users need to do and then craft policies for them that let the users perform _only_ those tasks, instead of allowing full administrative privileges.", @@ -182,7 +182,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "AWS provides a support center that can be used for incident notification and response, as well as technical support and customer services. Create an IAM Role to allow authorized users to manage incidents with AWS Support.", @@ -203,7 +203,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 2", "AssessmentStatus": "Manual", "Description": "AWS access from within AWS instances can be done by either encoding AWS keys into AWS API calls or by assigning the instance to a role which has an appropriate permissions policy for the required access. \"AWS Access\" means accessing the APIs of AWS in order to access AWS resources or manage AWS account resources.", @@ -224,7 +224,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "To enable HTTPS connections to your website or application in AWS, you need an SSL/TLS server certificate. You can use ACM or IAM to store and deploy server certificates. Use IAM as a certificate manager only when you must support HTTPS connections in a region that is not supported by ACM. IAM securely encrypts your private keys and stores the encrypted version in IAM SSL certificate storage. IAM supports deploying server certificates in all regions, but you must obtain your certificate from an external provider for use with AWS. You cannot upload an ACM certificate to IAM. Additionally, you cannot manage your certificates from the IAM Console.", @@ -245,7 +245,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Manual", "Description": "AWS provides customers with the option of specifying the contact information for account's security team. It is recommended that this information be provided.", @@ -266,7 +266,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Enable IAM Access analyzer for IAM policies about all resources in each region. IAM Access Analyzer is a technology introduced at AWS reinvent 2019. After the Analyzer is enabled in IAM, scan results are displayed on the console showing the accessible resources. Scans show resources that other accounts and federated users can access, such as KMS keys and IAM roles. So the results allow you to determine if an unintended user is allowed, making it easier for administrators to monitor least privileges access. Access Analyzer analyzes only policies that are applied to resources in the same AWS Region.", @@ -287,7 +287,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 2", "AssessmentStatus": "Manual", "Description": "In multi-account environments, IAM user centralization facilitates greater user control. User access beyond the initial account is then provided via role assumption. Centralization of users can be accomplished through federation with an external identity provider or through the use of AWS Organizations.", @@ -306,7 +306,7 @@ "Checks": [], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Manual", "Description": "AWS CloudShell is a convenient way of running CLI commands against AWS services; a managed IAM policy ('AWSCloudShellFullAccess') provides full access to CloudShell, which allows file upload and download capability between a user's local system and the CloudShell environment. Within the CloudShell environment a user has sudo permissions, and can access the internet. So it is feasible to install file transfer software (for example) and move data from CloudShell to external internet servers.", @@ -327,7 +327,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Manual", "Description": "The AWS support portal allows account owners to establish security questions that can be used to authenticate individuals calling AWS customer service for support. It is recommended that security questions be established.", @@ -348,7 +348,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "The 'root' user account is the most privileged user in an AWS account. AWS Access Keys provide programmatic access to a given AWS account. It is recommended that all access keys associated with the 'root' user account be removed.", @@ -369,7 +369,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "The 'root' user account is the most privileged user in an AWS account. Multi-factor Authentication (MFA) adds an extra layer of protection on top of a username and password. With MFA enabled, when a user signs in to an AWS website, they will be prompted for their username and password as well as for an authentication code from their AWS MFA device. **Note:** When virtual MFA is used for 'root' accounts, it is recommended that the device used is NOT a personal device, but rather a dedicated mobile device (tablet or phone) that is managed to be kept charged and secured independent of any individual personal devices. (\"non-personal virtual MFA\") This lessens the risks of losing access to the MFA due to device loss, device trade-in or if the individual owning the device is no longer employed at the company.", @@ -390,7 +390,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "The 'root' user account is the most privileged user in an AWS account. MFA adds an extra layer of protection on top of a user name and password. With MFA enabled, when a user signs in to an AWS website, they will be prompted for their user name and password as well as for an authentication code from their AWS MFA device. For Level 2, it is recommended that the 'root' user account be protected with a hardware MFA.", @@ -411,7 +411,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "With the creation of an AWS account, a 'root user' is created that cannot be disabled or deleted. That user has unrestricted access to and control over all resources in the AWS account. It is highly recommended that the use of this account be avoided for everyday tasks.", @@ -432,7 +432,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Password policies are, in part, used to enforce password complexity requirements. IAM password policies can be used to ensure password are at least a given length. It is recommended that the password policy require a minimum password length 14.", @@ -453,7 +453,7 @@ ], "Attributes": [ { - "Section": "1. Identity and Access Management", + "Section": "1 Identity and Access Management", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "IAM password policies can prevent the reuse of a given password by the same user. It is recommended that the password policy prevent the reuse of passwords.", @@ -474,8 +474,8 @@ ], "Attributes": [ { - "Section": "2. Storage", - "SubSection": "2.1. Simple Storage Service (S3)", + "Section": "2 Storage", + "SubSection": "2.1 Simple Storage Service (S3)", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "At the Amazon S3 bucket level, you can configure permissions through a bucket policy making the objects accessible only through HTTPS.", @@ -496,8 +496,8 @@ ], "Attributes": [ { - "Section": "2. Storage", - "SubSection": "2.1. Simple Storage Service (S3)", + "Section": "2 Storage", + "SubSection": "2.1 Simple Storage Service (S3)", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Once MFA Delete is enabled on your sensitive and classified S3 bucket it requires the user to have two forms of authentication.", @@ -518,8 +518,8 @@ ], "Attributes": [ { - "Section": "2. Storage", - "SubSection": "2.1. Simple Storage Service (S3)", + "Section": "2 Storage", + "SubSection": "2.1 Simple Storage Service (S3)", "Profile": "Level 2", "AssessmentStatus": "Manual", "Description": "Amazon S3 buckets can contain sensitive data, that for security purposes should be discovered, monitored, classified and protected. Macie along with other 3rd party tools can automatically provide an inventory of Amazon S3 buckets.", @@ -541,8 +541,8 @@ ], "Attributes": [ { - "Section": "2. Storage", - "SubSection": "2.1. Simple Storage Service (S3)", + "Section": "2 Storage", + "SubSection": "2.1 Simple Storage Service (S3)", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Amazon S3 provides `Block public access (bucket settings)` and `Block public access (account settings)` to help you manage public access to Amazon S3 resources. By default, S3 buckets and objects are created with public access disabled. However, an IAM principal with sufficient S3 permissions can enable public access at the bucket and/or object level. While enabled, `Block public access (bucket settings)` prevents an individual bucket, and its contained objects, from becoming publicly accessible. Similarly, `Block public access (account settings)` prevents all buckets, and contained objects, from becoming publicly accessible across the entire account.", @@ -563,8 +563,8 @@ ], "Attributes": [ { - "Section": "2. Storage", - "SubSection": "2.2. Elastic Compute Cloud (EC2)", + "Section": "2 Storage", + "SubSection": "2.2 Elastic Compute Cloud (EC2)", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Elastic Compute Cloud (EC2) supports encryption at rest when using the Elastic Block Store (EBS) service. While disabled by default, forcing encryption at EBS volume creation is supported.", @@ -585,8 +585,8 @@ ], "Attributes": [ { - "Section": "2. Storage", - "SubSection": "2.3. Relational Database Service (RDS)", + "Section": "2 Storage", + "SubSection": "2.3 Relational Database Service (RDS)", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Amazon RDS encrypted DB instances use the industry standard AES-256 encryption algorithm to encrypt your data on the server that hosts your Amazon RDS DB instances. After your data is encrypted, Amazon RDS handles authentication of access and decryption of your data transparently with a minimal impact on performance.", @@ -607,8 +607,8 @@ ], "Attributes": [ { - "Section": "2. Storage", - "SubSection": "2.3. Relational Database Service (RDS)", + "Section": "2 Storage", + "SubSection": "2.3 Relational Database Service (RDS)", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Ensure that RDS database instances have the Auto Minor Version Upgrade flag enabled in order to receive automatically minor engine upgrades during the specified maintenance window. So, RDS instances can get the new features, bug fixes, and security patches for their database engines.", @@ -629,8 +629,8 @@ ], "Attributes": [ { - "Section": "2. Storage", - "SubSection": "2.3. Relational Database Service (RDS)", + "Section": "2 Storage", + "SubSection": "2.3 Relational Database Service (RDS)", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Ensure and verify that RDS database instances provisioned in your AWS account do restrict unauthorized access in order to minimize security risks. To restrict access to anypublicly accessible RDS database instance, you must disable the database PubliclyAccessible flag and update the VPC security group associated with the instance", @@ -651,7 +651,7 @@ ], "Attributes": [ { - "Section": "2. Storage", + "Section": "2 Storage", "SubSection": "2.4 Elastic File System (EFS)", "Profile": "Level 1", "AssessmentStatus": "Automated", @@ -673,7 +673,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "AWS CloudTrail is a web service that records AWS API calls for your account and delivers log files to you. The recorded information includes the identity of the API caller, the time of the API call, the source IP address of the API caller, the request parameters, and the response elements returned by the AWS service. CloudTrail provides a history of AWS API calls for an account, including API calls made via the Management Console, SDKs, command line tools, and higher-level AWS services (such as CloudFormation).", @@ -694,7 +694,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "S3 object-level API operations such as GetObject, DeleteObject, and PutObject are called data events. By default, CloudTrail trails don't log data events and so it is recommended to enable Object-level logging for S3 buckets.", @@ -715,7 +715,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "S3 object-level API operations such as GetObject, DeleteObject, and PutObject are called data events. By default, CloudTrail trails don't log data events and so it is recommended to enable Object-level logging for S3 buckets.", @@ -736,7 +736,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "CloudTrail log file validation creates a digitally signed digest file containing a hash of each log that CloudTrail writes to S3. These digest files can be used to determine whether a log file was changed, deleted, or unchanged after CloudTrail delivered the log. It is recommended that file validation be enabled on all CloudTrails.", @@ -757,7 +757,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "AWS Config is a web service that performs configuration management of supported AWS resources within your account and delivers log files to you. The recorded information includes the configuration item (AWS resource), relationships between configuration items (AWS resources), any configuration changes between resources. It is recommended AWS Config be enabled in all regions.", @@ -778,7 +778,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "S3 Bucket Access Logging generates a log that contains access records for each request made to your S3 bucket. An access log record contains details about the request, such as the request type, the resources specified in the request worked, and the time and date the request was processed. It is recommended that bucket access logging be enabled on the CloudTrail S3 bucket.", @@ -799,7 +799,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "AWS CloudTrail is a web service that records AWS API calls for an account and makes those logs available to users and resources in accordance with IAM policies. AWS Key Management Service (KMS) is a managed service that helps create and control the encryption keys used to encrypt account data, and uses Hardware Security Modules (HSMs) to protect the security of encryption keys. CloudTrail logs can be configured to leverage server side encryption (SSE) and KMS customer created master keys (CMK) to further protect CloudTrail logs. It is recommended that CloudTrail be configured to use SSE-KMS.", @@ -820,7 +820,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "AWS Key Management Service (KMS) allows customers to rotate the backing key which is key material stored within the KMS which is tied to the key ID of the Customer Created customer master key (CMK). It is the backing key that is used to perform cryptographic operations such as encryption and decryption. Automated key rotation currently retains all prior backing keys so that decryption of encrypted data can take place transparently. It is recommended that CMK key rotation be enabled for symmetric keys. Key rotation can not be enabled for any asymmetric CMK.", @@ -841,7 +841,7 @@ ], "Attributes": [ { - "Section": "3. Logging", + "Section": "3 Logging", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "VPC Flow Logs is a feature that enables you to capture information about the IP traffic going to and from network interfaces in your VPC. After you've created a flow log, you can view and retrieve its data in Amazon CloudWatch Logs. It is recommended that VPC Flow Logs be enabled for packet \"Rejects\" for VPCs.", @@ -862,7 +862,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for unauthorized API calls.", @@ -883,7 +883,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. Security Groups are a stateful packet filter that controls ingress and egress traffic within a VPC. It is recommended that a metric filter and alarm be established for detecting changes to Security Groups.", @@ -904,7 +904,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. NACLs are used as a stateless packet filter to control ingress and egress traffic for subnets within a VPC. It is recommended that a metric filter and alarm be established for changes made to NACLs.", @@ -925,7 +925,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. Network gateways are required to send/receive traffic to a destination outside of a VPC. It is recommended that a metric filter and alarm be established for changes to network gateways.", @@ -946,7 +946,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. Routing tables are used to route network traffic between subnets and to network gateways. It is recommended that a metric filter and alarm be established for changes to route tables.", @@ -967,7 +967,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is possible to have more than 1 VPC within an account, in addition it is also possible to create a peer connection between 2 VPCs enabling network traffic to route between VPCs. It is recommended that a metric filter and alarm be established for changes made to VPCs.", @@ -988,7 +988,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for AWS Organizations changes made in the master AWS Account.", @@ -1009,7 +1009,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "Security Hub collects security data from across AWS accounts, services, and supported third-party partner products and helps you analyze your security trends and identify the highest priority security issues. When you enable Security Hub, it begins to consume, aggregate, organize, and prioritize findings from AWS services that you have enabled, such as Amazon GuardDuty, Amazon Inspector, and Amazon Macie. You can also enable integrations with AWS partner security products.", @@ -1030,7 +1030,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for console logins that are not protected by multi-factor authentication (MFA).", @@ -1051,7 +1051,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for 'root' login attempts.", @@ -1072,7 +1072,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established changes made to Identity and Access Management (IAM) policies.", @@ -1093,7 +1093,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for detecting changes to CloudTrail's configurations.", @@ -1114,7 +1114,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for failed console authentication attempts.", @@ -1135,7 +1135,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for customer created CMKs which have changed state to disabled or scheduled deletion.", @@ -1156,7 +1156,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for changes to S3 bucket policies.", @@ -1177,7 +1177,7 @@ ], "Attributes": [ { - "Section": "4. Monitoring", + "Section": "4 Monitoring", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for detecting changes to CloudTrail's configurations.", @@ -1200,7 +1200,7 @@ ], "Attributes": [ { - "Section": "5. Networking", + "Section": "5 Networking", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "The Network Access Control List (NACL) function provide stateless filtering of ingress and egress network traffic to AWS resources. It is recommended that no NACL allows unrestricted ingress access to remote server administration ports, such as SSH to port `22` and RDP to port `3389`.", @@ -1223,7 +1223,7 @@ ], "Attributes": [ { - "Section": "5. Networking", + "Section": "5 Networking", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Security groups provide stateful filtering of ingress and egress network traffic to AWS resources. It is recommended that no security group allows unrestricted ingress access to remote server administration ports, such as SSH to port `22` and RDP to port `3389`.", @@ -1246,7 +1246,7 @@ ], "Attributes": [ { - "Section": "5. Networking", + "Section": "5 Networking", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Security groups provide stateful filtering of ingress and egress network traffic to AWS resources. It is recommended that no security group allows unrestricted ingress access to remote server administration ports, such as SSH to port `22` and RDP to port `3389`.", @@ -1267,7 +1267,7 @@ ], "Attributes": [ { - "Section": "5. Networking", + "Section": "5 Networking", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "A VPC comes with a default security group whose initial settings deny all inbound traffic, allow all outbound traffic, and allow all traffic between instances assigned to the security group. If you don't specify a security group when you launch an instance, the instance is automatically assigned to this default security group. Security groups provide stateful filtering of ingress/egress network traffic to AWS resources. It is recommended that the default security group restrict all traffic. The default VPC in every region should have its default security group updated to comply. Any newly created VPCs will automatically contain a default security group that will need remediation to comply with this recommendation. **NOTE:** When implementing this recommendation, VPC flow logging is invaluable in determining the least privilege port access required by systems to work properly because it can log all packet acceptances and rejections occurring under the current security groups. This dramatically reduces the primary barrier to least privilege engineering - discovering the minimum ports required by systems in the environment. Even if the VPC flow logging recommendation in this benchmark is not adopted as a permanent security measure, it should be used during any period of discovery and engineering for least privileged security groups.", @@ -1288,7 +1288,7 @@ ], "Attributes": [ { - "Section": "5. Networking", + "Section": "5 Networking", "Profile": "Level 2", "AssessmentStatus": "Manual", "Description": "Once a VPC peering connection is established, routing tables must be updated to establish any connections between the peered VPCs. These routes can be as specific as desired - even peering a VPC to only a single host on the other side of the connection.", @@ -1309,7 +1309,7 @@ ], "Attributes": [ { - "Section": "5. Networking", + "Section": "5 Networking", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "When enabling the Metadata Service on AWS EC2 instances, users have the option of using either Instance Metadata Service Version 1 (IMDSv1; a request/response method) or Instance Metadata Service Version 2 (IMDSv2; a session-oriented method).", diff --git a/prowler/compliance/aws/cis_4.0_aws.json b/prowler/compliance/aws/cis_4.0_aws.json index d026a21962..cd8edb322a 100644 --- a/prowler/compliance/aws/cis_4.0_aws.json +++ b/prowler/compliance/aws/cis_4.0_aws.json @@ -13,7 +13,6 @@ "Attributes": [ { "Section": "1 Identity and Access Management", - "SubSection": "", "Profile": "Level 1", "AssessmentStatus": "Manual", "Description": "Ensure contact email and telephone details for AWS accounts are current and map to more than one individual in your organization.An AWS account supports a number of contact details, and AWS will use these to contact the account owner if activity judged to be in breach of the Acceptable Use Policy or indicative of a likely security compromise is observed by the AWS Abuse team. Contact details should not be for a single individual, as circumstances may arise where that individual is unavailable. Email contact details should point to a mail alias which forwards email to multiple individuals within the organization; where feasible, phone contact details should point to a PABX hunt group or other call-forwarding system.", @@ -36,7 +35,6 @@ "Attributes": [ { "Section": "1 Identity and Access Management", - "SubSection": "", "Profile": "Level 1", "AssessmentStatus": "Manual", "Description": "AWS provides customers with the option of specifying the contact information for account's security team. It is recommended that this information be provided.", @@ -59,7 +57,6 @@ "Attributes": [ { "Section": "1 Identity and Access Management", - "SubSection": "", "Profile": "Level 1", "AssessmentStatus": "Manual", "Description": "The AWS support portal allows account owners to establish security questions that can be used to authenticate individuals calling AWS customer service for support. It is recommended that security questions be established.", @@ -82,7 +79,6 @@ "Attributes": [ { "Section": "1 Identity and Access Management", - "SubSection": "", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "The 'root' user account is the most privileged user in an AWS account. AWS Access Keys provide programmatic access to a given AWS account. It is recommended that all access keys associated with the 'root' user account be deleted.", @@ -105,7 +101,6 @@ "Attributes": [ { "Section": "1 Identity and Access Management", - "SubSection": "", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "The 'root' user account is the most privileged user in an AWS account. Multi-factor Authentication (MFA) adds an extra layer of protection on top of a username and password. With MFA enabled, when a user signs in to an AWS website, they will be prompted for their username and password as well as for an authentication code from their AWS MFA device.**Note:** When virtual MFA is used for 'root' accounts, it is recommended that the device used is NOT a personal device, but rather a dedicated mobile device (tablet or phone) that is kept charged and secured, independent of any individual personal devices (non-personal virtual MFA). This lessens the risks of losing access to the MFA due to device loss, device trade-in, or if the individual owning the device is no longer employed at the company.", @@ -128,7 +123,6 @@ "Attributes": [ { "Section": "1 Identity and Access Management", - "SubSection": "", "Profile": "Level 2", "AssessmentStatus": "Manual", "Description": "The 'root' user account is the most privileged user in an AWS account. MFA adds an extra layer of protection on top of a user name and password. With MFA enabled, when a user signs in to an AWS website, they will be prompted for their user name and password as well as for an authentication code from their AWS MFA device. For Level 2, it is recommended that the 'root' user account be protected with a hardware MFA.", @@ -151,7 +145,6 @@ "Attributes": [ { "Section": "1 Identity and Access Management", - "SubSection": "", "Profile": "Level 1", "AssessmentStatus": "Manual", "Description": "With the creation of an AWS account, a 'root user' is created that cannot be disabled or deleted. That user has unrestricted access to and control over all resources in the AWS account. It is highly recommended that the use of this account be avoided for everyday tasks.", @@ -174,7 +167,6 @@ "Attributes": [ { "Section": "1 Identity and Access Management", - "SubSection": "", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Password policies are, in part, used to enforce password complexity requirements. IAM password policies can be used to ensure passwords are at least a given length. It is recommended that the password policy require a minimum password length 14.", @@ -197,7 +189,6 @@ "Attributes": [ { "Section": "1 Identity and Access Management", - "SubSection": "", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "IAM password policies can prevent the reuse of a given password by the same user. It is recommended that the password policy prevent the reuse of passwords.", @@ -220,7 +211,6 @@ "Attributes": [ { "Section": "1 Identity and Access Management", - "SubSection": "", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Multi-Factor Authentication (MFA) adds an extra layer of authentication assurance beyond traditional credentials. With MFA enabled, when a user signs in to the AWS Console, they will be prompted for their user name and password as well as for an authentication code from their physical or virtual MFA token. It is recommended that MFA be enabled for all accounts that have a console password.", @@ -243,7 +233,6 @@ "Attributes": [ { "Section": "1 Identity and Access Management", - "SubSection": "", "Profile": "Level 1", "AssessmentStatus": "Manual", "Description": "AWS console defaults to no check boxes selected when creating a new IAM user. When creating the IAM User credentials you have to determine what type of access they require. Programmatic access: The IAM user might need to make API calls, use the AWS CLI, or use the Tools for Windows PowerShell. In that case, create an access key (access key ID and a secret access key) for that user. AWS Management Console access: If the user needs to access the AWS Management Console, create a password for the user.", @@ -267,7 +256,6 @@ "Attributes": [ { "Section": "1 Identity and Access Management", - "SubSection": "", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "AWS IAM users can access AWS resources using different types of credentials, such as passwords or access keys. It is recommended that all credentials that have been unused for 45 days or more be deactivated or removed.", @@ -290,7 +278,6 @@ "Attributes": [ { "Section": "1 Identity and Access Management", - "SubSection": "", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Access keys are long-term credentials for an IAM user or the AWS account 'root' user. You can use access keys to sign programmatic requests to the AWS CLI or AWS API (directly or using the AWS SDK)", @@ -313,7 +300,6 @@ "Attributes": [ { "Section": "1 Identity and Access Management", - "SubSection": "", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Access keys consist of an access key ID and secret access key, which are used to sign programmatic requests that you make to AWS. AWS users need their own access keys to make programmatic calls to AWS from the AWS Command Line Interface (AWS CLI), Tools for Windows PowerShell, the AWS SDKs, or direct HTTP calls using the APIs for individual AWS services. It is recommended that all access keys be rotated regularly.", @@ -336,7 +322,6 @@ "Attributes": [ { "Section": "1 Identity and Access Management", - "SubSection": "", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "IAM users are granted access to services, functions, and data through IAM policies. There are four ways to define policies for a user: 1) Edit the user policy directly, also known as an inline or user policy; 2) attach a policy directly to a user; 3) add the user to an IAM group that has an attached policy; 4) add the user to an IAM group that has an inline policy.Only the third implementation is recommended.", @@ -360,7 +345,6 @@ "Attributes": [ { "Section": "1 Identity and Access Management", - "SubSection": "", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "IAM policies are the means by which privileges are granted to users, groups, or roles. It is recommended and considered standard security advice to grant least privilegeโ€”that is, granting only the permissions required to perform a task. Determine what users need to do, and then craft policies for them that allow the users to perform only those tasks, instead of granting full administrative privileges.", @@ -383,7 +367,6 @@ "Attributes": [ { "Section": "1 Identity and Access Management", - "SubSection": "", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "AWS provides a support center that can be used for incident notification and response, as well as technical support and customer services. Create an IAM Role, with the appropriate policy assigned, to allow authorized users to manage incidents with AWS Support.", @@ -406,7 +389,6 @@ "Attributes": [ { "Section": "1 Identity and Access Management", - "SubSection": "", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "AWS access from within AWS instances can be done by either encoding AWS keys into AWS API calls or by assigning the instance to a role which has an appropriate permissions policy for the required access. AWS Access means accessing the APIs of AWS in order to access AWS resources or manage AWS account resources.", @@ -429,7 +411,6 @@ "Attributes": [ { "Section": "1 Identity and Access Management", - "SubSection": "", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "To enable HTTPS connections to your website or application in AWS, you need an SSL/TLS server certificate. You can use AWS Certificate Manager (ACM) or IAM to store and deploy server certificates. Use IAM as a certificate manager only when you must support HTTPS connections in a region that is not supported by ACM. IAM securely encrypts your private keys and stores the encrypted version in IAM SSL certificate storage. IAM supports deploying server certificates in all regions, but you must obtain your certificate from an external provider for use with AWS. You cannot upload an ACM certificate to IAM. Additionally, you cannot manage your certificates from the IAM Console.", @@ -452,7 +433,6 @@ "Attributes": [ { "Section": "1 Identity and Access Management", - "SubSection": "", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Enable the IAM Access Analyzer for IAM policies regarding all resources in each active AWS region.IAM Access Analyzer is a technology introduced at AWS reinvent 2019. After the Analyzer is enabled in IAM, scan results are displayed on the console showing the accessible resources. Scans show resources that other accounts and federated users can access, such as KMS keys and IAM roles. The results allow you to determine whether an unintended user is permitted, making it easier for administrators to monitor least privilege access. Access Analyzer analyzes only the policies that are applied to resources in the same AWS Region.", @@ -475,7 +455,6 @@ "Attributes": [ { "Section": "1 Identity and Access Management", - "SubSection": "", "Profile": "Level 2", "AssessmentStatus": "Manual", "Description": "In multi-account environments, IAM user centralization facilitates greater user control. User access beyond the initial account is then provided via role assumption. Centralization of users can be accomplished through federation with an external identity provider or through the use of AWS Organizations.", @@ -498,7 +477,6 @@ "Attributes": [ { "Section": "1 Identity and Access Management", - "SubSection": "", "Profile": "Level 1", "AssessmentStatus": "Manual", "Description": "AWS CloudShell is a convenient way of running CLI commands against AWS services; a managed IAM policy ('AWSCloudShellFullAccess') provides full access to CloudShell, which allows file upload and download capability between a user's local system and the CloudShell environment. Within the CloudShell environment, a user has sudo permissions and can access the internet. Therefore, it is feasible to install file transfer software, for example, and move data from CloudShell to external internet servers.", @@ -730,7 +708,6 @@ "Attributes": [ { "Section": "3 Logging", - "SubSection": "", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "AWS CloudTrail is a web service that records AWS API calls for your account and delivers log files to you. The recorded information includes the identity of the API caller, the time of the API call, the source IP address of the API caller, the request parameters, and the response elements returned by the AWS service. CloudTrail provides a history of AWS API calls for an account, including API calls made via the Management Console, SDKs, command line tools, and higher-level AWS services (such as CloudFormation).", @@ -753,7 +730,6 @@ "Attributes": [ { "Section": "3 Logging", - "SubSection": "", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "CloudTrail log file validation creates a digitally signed digest file containing a hash of each log that CloudTrail writes to S3. These digest files can be used to determine whether a log file was changed, deleted, or remained unchanged after CloudTrail delivered the log. It is recommended that file validation be enabled for all CloudTrails.", @@ -776,7 +752,6 @@ "Attributes": [ { "Section": "3 Logging", - "SubSection": "", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "AWS Config is a web service that performs configuration management of supported AWS resources within your account and delivers log files to you. The recorded information includes the configuration items (AWS resources), relationships between configuration items (AWS resources), and any configuration changes between resources. It is recommended that AWS Config be enabled in all regions.", @@ -799,7 +774,6 @@ "Attributes": [ { "Section": "3 Logging", - "SubSection": "", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Server access logging generates a log that contains access records for each request made to your S3 bucket. An access log record contains details about the request, such as the request type, the resources specified in the request worked, and the time and date the request was processed. It is recommended that server access logging be enabled on the CloudTrail S3 bucket.", @@ -822,7 +796,6 @@ "Attributes": [ { "Section": "3 Logging", - "SubSection": "", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "AWS CloudTrail is a web service that records AWS API calls for an account and makes those logs available to users and resources in accordance with IAM policies. AWS Key Management Service (KMS) is a managed service that helps create and control the encryption keys used to encrypt account data, and uses Hardware Security Modules (HSMs) to protect the security of encryption keys. CloudTrail logs can be configured to leverage server side encryption (SSE) and KMS customer-created master keys (CMK) to further protect CloudTrail logs. It is recommended that CloudTrail be configured to use SSE-KMS.", @@ -845,7 +818,6 @@ "Attributes": [ { "Section": "3 Logging", - "SubSection": "", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "AWS Key Management Service (KMS) allows customers to rotate the backing key, which is key material stored within the KMS that is tied to the key ID of the customer-created customer master key (CMK). The backing key is used to perform cryptographic operations such as encryption and decryption. Automated key rotation currently retains all prior backing keys so that decryption of encrypted data can occur transparently. It is recommended that CMK key rotation be enabled for symmetric keys. Key rotation cannot be enabled for any asymmetric CMK.", @@ -868,7 +840,6 @@ "Attributes": [ { "Section": "3 Logging", - "SubSection": "", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "VPC Flow Logs is a feature that enables you to capture information about the IP traffic going to and from network interfaces in your VPC. After you've created a flow log, you can view and retrieve its data in Amazon CloudWatch Logs. It is recommended that VPC Flow Logs be enabled for packet Rejects for VPCs.", @@ -891,7 +862,6 @@ "Attributes": [ { "Section": "3 Logging", - "SubSection": "", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "S3 object-level API operations, such as GetObject, DeleteObject, and PutObject, are referred to as data events. By default, CloudTrail trails do not log data events, so it is recommended to enable object-level logging for S3 buckets.", @@ -914,7 +884,6 @@ "Attributes": [ { "Section": "3 Logging", - "SubSection": "", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "S3 object-level API operations, such as GetObject, DeleteObject, and PutObject, are referred to as data events. By default, CloudTrail trails do not log data events, so it is recommended to enable object-level logging for S3 buckets.", @@ -937,7 +906,6 @@ "Attributes": [ { "Section": "4 Monitoring", - "SubSection": "", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for unauthorized API calls.", @@ -960,7 +928,6 @@ "Attributes": [ { "Section": "4 Monitoring", - "SubSection": "", "Profile": "Level 1", "AssessmentStatus": "Manual", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for console logins that are not protected by multi-factor authentication (MFA).", @@ -983,7 +950,6 @@ "Attributes": [ { "Section": "4 Monitoring", - "SubSection": "", "Profile": "Level 1", "AssessmentStatus": "Manual", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for 'root' login attempts to detect unauthorized use or attempts to use the root account.", @@ -1006,7 +972,6 @@ "Attributes": [ { "Section": "4 Monitoring", - "SubSection": "", "Profile": "Level 1", "AssessmentStatus": "Manual", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms.It is recommended that a metric filter and alarm be established for changes made to Identity and Access Management (IAM) policies.", @@ -1029,7 +994,6 @@ "Attributes": [ { "Section": "4 Monitoring", - "SubSection": "", "Profile": "Level 1", "AssessmentStatus": "Manual", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be used to detect changes to CloudTrail's configurations.", @@ -1052,7 +1016,6 @@ "Attributes": [ { "Section": "4 Monitoring", - "SubSection": "", "Profile": "Level 2", "AssessmentStatus": "Manual", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for failed console authentication attempts.", @@ -1075,7 +1038,6 @@ "Attributes": [ { "Section": "4 Monitoring", - "SubSection": "", "Profile": "Level 2", "AssessmentStatus": "Manual", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for customer-created CMKs that have changed state to disabled or are scheduled for deletion.", @@ -1098,7 +1060,6 @@ "Attributes": [ { "Section": "4 Monitoring", - "SubSection": "", "Profile": "Level 1", "AssessmentStatus": "Manual", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for changes to S3 bucket policies.", @@ -1121,7 +1082,6 @@ "Attributes": [ { "Section": "4 Monitoring", - "SubSection": "", "Profile": "Level 2", "AssessmentStatus": "Manual", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for detecting changes to AWS Config's configurations.", @@ -1144,7 +1104,6 @@ "Attributes": [ { "Section": "4 Monitoring", - "SubSection": "", "Profile": "Level 2", "AssessmentStatus": "Manual", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms. Security groups are stateful packet filters that control ingress and egress traffic within a VPC.It is recommended that a metric filter and alarm be established to detect changes to security groups.", @@ -1167,7 +1126,6 @@ "Attributes": [ { "Section": "4 Monitoring", - "SubSection": "", "Profile": "Level 2", "AssessmentStatus": "Manual", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms. NACLs are used as a stateless packet filter to control ingress and egress traffic for subnets within a VPC. It is recommended that a metric filter and alarm be established for any changes made to NACLs.", @@ -1190,7 +1148,6 @@ "Attributes": [ { "Section": "4 Monitoring", - "SubSection": "", "Profile": "Level 1", "AssessmentStatus": "Manual", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms. Network gateways are required to send and receive traffic to a destination outside of a VPC. It is recommended that a metric filter and alarm be established for changes to network gateways.", @@ -1213,7 +1170,6 @@ "Attributes": [ { "Section": "4 Monitoring", - "SubSection": "", "Profile": "Level 1", "AssessmentStatus": "Manual", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms. Routing tables are used to route network traffic between subnets and to network gateways.It is recommended that a metric filter and alarm be established for changes to route tables.", @@ -1236,7 +1192,6 @@ "Attributes": [ { "Section": "4 Monitoring", - "SubSection": "", "Profile": "Level 1", "AssessmentStatus": "Manual", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms. It is possible to have more than one VPC within an account; additionally, it is also possible to create a peer connection between two VPCs, enabling network traffic to route between them.It is recommended that a metric filter and alarm be established for changes made to VPCs.", @@ -1259,7 +1214,6 @@ "Attributes": [ { "Section": "4 Monitoring", - "SubSection": "", "Profile": "Level 1", "AssessmentStatus": "Manual", "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for changes made to AWS Organizations in the master AWS account.", @@ -1282,7 +1236,6 @@ "Attributes": [ { "Section": "4 Monitoring", - "SubSection": "", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "Security Hub collects security data from various AWS accounts, services, and supported third-party partner products, helping you analyze your security trends and identify the highest-priority security issues. When you enable Security Hub, it begins to consume, aggregate, organize, and prioritize findings from the AWS services that you have enabled, such as Amazon GuardDuty, Amazon Inspector, and Amazon Macie. You can also enable integrations with AWS partner security products.", @@ -1307,7 +1260,6 @@ "Attributes": [ { "Section": "5 Networking", - "SubSection": "", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "The Network Access Control List (NACL) function provides stateless filtering of ingress and egress network traffic to AWS resources. It is recommended that no NACL allows unrestricted ingress access to remote server administration ports, such as SSH on port `22` and RDP on port `3389`, using either the TCP (6), UDP (17), or ALL (-1) protocols.", @@ -1332,7 +1284,6 @@ "Attributes": [ { "Section": "5 Networking", - "SubSection": "", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Security groups provide stateful filtering of ingress and egress network traffic to AWS resources. It is recommended that no security group allows unrestricted ingress access to remote server administration ports, such as SSH on port `22` and RDP on port `3389`, using either the TCP (6), UDP (17), or ALL (-1) protocols.", @@ -1357,7 +1308,6 @@ "Attributes": [ { "Section": "5 Networking", - "SubSection": "", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "Security groups provide stateful filtering of ingress and egress network traffic to AWS resources. It is recommended that no security group allows unrestricted ingress access to remote server administration ports, such as SSH on port `22` and RDP on port `3389`.", @@ -1380,7 +1330,6 @@ "Attributes": [ { "Section": "5 Networking", - "SubSection": "", "Profile": "Level 2", "AssessmentStatus": "Automated", "Description": "A VPC comes with a default security group whose initial settings deny all inbound traffic, allow all outbound traffic, and allow all traffic between instances assigned to the security group. If a security group is not specified when an instance is launched, it is automatically assigned to this default security group. Security groups provide stateful filtering of ingress/egress network traffic to AWS resources. It is recommended that the default security group restrict all traffic, both inbound and outbound.The default VPC in every region should have its default security group updated to comply with the following: - No inbound rules. - No outbound rules.Any newly created VPCs will automatically contain a default security group that will need remediation to comply with this recommendation.**Note:** When implementing this recommendation, VPC flow logging is invaluable in determining the least privilege port access required by systems to work properly, as it can log all packet acceptances and rejections occurring under the current security groups. This dramatically reduces the primary barrier to least privilege engineering by discovering the minimum ports required by systems in the environment. Even if the VPC flow logging recommendation in this benchmark is not adopted as a permanent security measure, it should be used during any period of discovery and engineering for least privileged security groups.", @@ -1403,7 +1352,6 @@ "Attributes": [ { "Section": "5 Networking", - "SubSection": "", "Profile": "Level 2", "AssessmentStatus": "Manual", "Description": "Once a VPC peering connection is established, routing tables must be updated to enable any connections between the peered VPCs. These routes can be as specific as desired, even allowing for the peering of a VPC to only a single host on the other side of the connection.", @@ -1426,7 +1374,6 @@ "Attributes": [ { "Section": "5 Networking", - "SubSection": "", "Profile": "Level 1", "AssessmentStatus": "Automated", "Description": "When enabling the Metadata Service on AWS EC2 instances, users have the option of using either Instance Metadata Service Version 1 (IMDSv1; a request/response method) or Instance Metadata Service Version 2 (IMDSv2; a session-oriented method).", diff --git a/prowler/compliance/aws/cis_5.0_aws.json b/prowler/compliance/aws/cis_5.0_aws.json new file mode 100644 index 0000000000..b95feddd27 --- /dev/null +++ b/prowler/compliance/aws/cis_5.0_aws.json @@ -0,0 +1,1415 @@ +{ + "Framework": "CIS", + "Version": "5.0", + "Provider": "AWS", + "Description": "The CIS Amazon Web Services Foundations Benchmark provides prescriptive guidance for configuring security options for a subset of Amazon Web Services with an emphasis on foundational, testable, and architecture agnostic settings.", + "Requirements": [ + { + "Id": "1.1", + "Description": "Maintain current contact details", + "Checks": [ + "account_maintain_current_contact_details" + ], + "Attributes": [ + { + "Section": "1 Identity and Access Management", + "Profile": "Level 1", + "AssessmentStatus": "Manual", + "Description": "Ensure contact email and telephone details for AWS accounts are current and map to more than one individual in your organization. An AWS account supports a number of contact details, and AWS will use these to contact the account owner if activity judged to be in breach of the Acceptable Use Policy or indicative of a likely security compromise is observed by the AWS Abuse team. Contact details should not be for a single individual, as circumstances may arise where that individual is unavailable. Email contact details should point to a mail alias which forwards email to multiple individuals within the organization; where feasible, phone contact details should point to a PABX hunt group or other call-forwarding system.", + "RationaleStatement": "If an AWS account is observed to be behaving in a prohibited or suspicious manner, AWS will attempt to contact the account owner by email and phone using the contact details listed. If this is unsuccessful and the account behavior needs urgent mitigation, proactive measures may be taken, including throttling of traffic between the account exhibiting suspicious behavior and the AWS API endpoints and the Internet. This will result in impaired service to and from the account in question, so it is in both the customers' and AWS's best interests that prompt contact can be established. This is best achieved by setting AWS account contact details to point to resources which have multiple individuals as recipients, such as email aliases and PABX hunt groups.", + "ImpactStatement": "", + "RemediationProcedure": "This activity can only be performed via the AWS Console, with a user who has permission to read and write Billing information (aws-portal:\\*Billing). 1. Sign in to the AWS Management Console and open the `Billing and Cost Management` console at https://console.aws.amazon.com/billing/home#/. 2. On the navigation bar, choose your account name, and then choose `Account`. 3. On the `Account Settings` page, next to `Account Settings`, choose `Edit`. 4. Next to the field that you need to update, choose `Edit`. 5. After you have entered your changes, choose `Save changes`. 6. After you have made your changes, choose `Done`. 7. To edit your contact information, under `Contact Information`, choose `Edit`. 8. For the fields that you want to change, type your updated information, and then choose `Update`.", + "AuditProcedure": "This activity can only be performed via the AWS Console, with a user who has permission to read and write Billing information (aws-portal:\\*Billing). 1. Sign in to the AWS Management Console and open the `Billing and Cost Management` console at https://console.aws.amazon.com/billing/home#/. 2. On the navigation bar, choose your account name, and then choose `Account`. 3. On the `Account Settings` page, review and verify the current details. 4. Under `Contact Information`, review and verify the current details.", + "AdditionalInformation": "", + "References": "https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-account-payment.html#contact-info", + "DefaultValue": "" + } + ] + }, + { + "Id": "1.2", + "Description": "Ensure security contact information is registered", + "Checks": [ + "account_security_contact_information_is_registered" + ], + "Attributes": [ + { + "Section": "1 Identity and Access Management", + "Profile": "Level 1", + "AssessmentStatus": "Manual", + "Description": "AWS provides customers with the option of specifying the contact information for account's security team. It is recommended that this information be provided.", + "RationaleStatement": "Specifying security-specific contact information will help ensure that security advisories sent by AWS reach the team in your organization that is best equipped to respond to them.", + "ImpactStatement": "", + "RemediationProcedure": "Perform the following to establish security contact information: **From Console:** 1. Click on your account name at the top right corner of the console. 2. From the drop-down menu Click `My Account` 3. Scroll down to the `Alternate Contacts` section 4. Enter contact information in the `Security` section **From Command Line:** Run the following command with the following input parameters: --email-address, --name, and --phone-number. ``` aws account put-alternate-contact --alternate-contact-type SECURITY ``` **Note:** Consider specifying an internal email distribution list to ensure emails are regularly monitored by more than one individual.", + "AuditProcedure": "Perform the following to determine if security contact information is present: **From Console:** 1. Click on your account name at the top right corner of the console 2. From the drop-down menu Click `My Account` 3. Scroll down to the `Alternate Contacts` section 4. Ensure contact information is specified in the `Security` section **From Command Line:** 1. Run the following command: ``` aws account get-alternate-contact --alternate-contact-type SECURITY ``` 2. Ensure proper contact information is specified for the `Security` contact.", + "AdditionalInformation": "", + "References": "", + "DefaultValue": "" + } + ] + }, + { + "Id": "1.3", + "Description": "Ensure no 'root' user account access key exists", + "Checks": [ + "iam_no_root_access_key" + ], + "Attributes": [ + { + "Section": "1 Identity and Access Management", + "Profile": "Level 1", + "AssessmentStatus": "Automated", + "Description": "The 'root' user account is the most privileged user in an AWS account. AWS Access Keys provide programmatic access to a given AWS account. It is recommended that all access keys associated with the 'root' user account be deleted.", + "RationaleStatement": "Deleting access keys associated with the 'root' user account limits vectors by which the account can be compromised. Additionally, deleting the 'root' access keys encourages the creation and use of role based accounts that are least privileged.", + "ImpactStatement": "", + "RemediationProcedure": "Perform the following to delete active 'root' user access keys. **From Console:** 1. Sign in to the AWS Management Console as 'root' and open the IAM console at [https://console.aws.amazon.com/iam/](https://console.aws.amazon.com/iam/). 2. Click on `` at the top right and select `My Security Credentials` from the drop down list. 3. On the pop out screen Click on `Continue to Security Credentials`. 4. Click on `Access Keys` (Access Key ID and Secret Access Key). 5. If there are active keys, under `Status`, click `Delete` (Note: Deleted keys cannot be recovered). Note: While a key can be made inactive, this inactive key will still show up in the CLI command from the audit procedure, and may lead to the root user being falsely flagged as being non-compliant.", + "AuditProcedure": "Perform the following to determine if the 'root' user account has access keys: **From Console:** 1. Login to the AWS Management Console. 2. Click `Services`. 3. Click `IAM`. 4. Click on `Credential Report`. 5. This will download a `.csv` file which contains credential usage for all IAM users within an AWS Account - open this file. 6. For the `` user, ensure the `access_key_1_active` and `access_key_2_active` fields are set to `FALSE`. **From Command Line:** Run the following command: ``` aws iam get-account-summary | grep AccountAccessKeysPresent ``` If no 'root' access keys exist the output will show `AccountAccessKeysPresent: 0,`. If the output shows a 1, then 'root' keys exist and should be deleted.", + "AdditionalInformation": "- IAM User account root for us-gov cloud regions is not enabled by default. However, on request to AWS support enables 'root' access only through access-keys (CLI, API methods) for us-gov cloud region. - Implement regular checks and alerts for any creation of new root access keys to promptly address any unauthorized or accidental creation.", + "References": "http://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html:http://docs.aws.amazon.com/general/latest/gr/managing-aws-access-keys.html:http://docs.aws.amazon.com/IAM/latest/APIReference/API_GetAccountSummary.html:https://aws.amazon.com/blogs/security/an-easier-way-to-determine-the-presence-of-aws-account-access-keys/", + "DefaultValue": "" + } + ] + }, + { + "Id": "1.4", + "Description": "Ensure MFA is enabled for the 'root' user account", + "Checks": [ + "iam_root_mfa_enabled" + ], + "Attributes": [ + { + "Section": "1 Identity and Access Management", + "Profile": "Level 1", + "AssessmentStatus": "Automated", + "Description": "The 'root' user account is the most privileged user in an AWS account. Multi-factor Authentication (MFA) adds an extra layer of protection on top of a username and password. With MFA enabled, when a user signs in to an AWS website, they will be prompted for their username and password as well as for an authentication code from their AWS MFA device. **Note:** When virtual MFA is used for 'root' accounts, it is recommended that the device used is NOT a personal device, but rather a dedicated mobile device (tablet or phone) that is kept charged and secured, independent of any individual personal devices (non-personal virtual MFA). This lessens the risks of losing access to the MFA due to device loss, device trade-in, or if the individual owning the device is no longer employed at the company. Where an AWS Organization is using centralized root access, root credentials can be removed from member accounts. In that case it is neither possible nor necessary to configure root MFA in the member account.", + "RationaleStatement": "Enabling MFA provides increased security for console access as it requires the authenticating principal to possess a device that emits a time-sensitive key and have knowledge of a credential.", + "ImpactStatement": "", + "RemediationProcedure": "**Note:** To manage MFA devices for the 'root' AWS account, you must use your 'root' account credentials to sign in to AWS. You cannot manage MFA devices for the 'root' account using other credentials. Perform the following to establish MFA for the 'root' user account: 1. Sign in to the AWS Management Console and open the IAM console at [https://console.aws.amazon.com/iam/](https://console.aws.amazon.com/iam/). 2. Choose `Dashboard` , and under `Security Status` , expand `Activate MFA` on your root account. 3. Choose `Activate MFA` 4. In the wizard, choose `A virtual MFA` device and then choose `Next Step` . 5. IAM generates and displays configuration information for the virtual MFA device, including a QR code graphic. The graphic is a representation of the 'secret configuration key' that is available for manual entry on devices that do not support QR codes. 6. Open your virtual MFA application. (For a list of apps that you can use for hosting virtual MFA devices, see [Virtual MFA Applications](http://aws.amazon.com/iam/details/mfa/#Virtual_MFA_Applications).) If the virtual MFA application supports multiple accounts (multiple virtual MFA devices), choose the option to create a new account (a new virtual MFA device). 7. Determine whether the MFA app supports QR codes, and then do one of the following: - Use the app to scan the QR code. For example, you might choose the camera icon or choose an option similar to Scan code, and then use the device's camera to scan the code. - In the Manage MFA Device wizard, choose Show secret key for manual configuration, and then type the secret configuration key into your MFA application. When you are finished, the virtual MFA device starts generating one-time passwords. In the Manage MFA Device wizard, in the Authentication Code 1 box, type the one-time password that currently appears in the virtual MFA device. Wait up to 30 seconds for the device to generate a new one-time password. Then type the second one-time password into the Authentication Code 2 box. Choose Assign Virtual MFA.", + "AuditProcedure": "Perform the following to determine if the 'root' user account is enabled and has MFA setup: **From Console:** 1. Login to the AWS Management Console 2. Click `Services` 3. Click `IAM` 4. Click on `Credential Report` 5. This will download a `.csv` file which contains credential usage for all IAM users within an AWS Account - open this file 6. For the `` user, ensure the `mfa_active` field is set to `TRUE` or the `password_enabled` field is set to `FALSE` **From Command Line:** 1. Run the following command: ``` aws iam get-account-summary | grep AccountMFAEnabled aws iam get-account-summary | grep AccountPasswordPresent ``` 2. Ensure the AccountMFAEnabled property is set to 1 or the AccountPasswordPresent property is set to 0", + "AdditionalInformation": "IAM User account root for us-gov cloud regions does not have console access. This recommendation is not applicable for us-gov cloud regions.", + "References": "https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html#id_root-user_manage_mfa:https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_enable_virtual.html#enable-virt-mfa-for-root:https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-enable-root-access.html", + "DefaultValue": "" + } + ] + }, + { + "Id": "1.5", + "Description": "Ensure hardware MFA is enabled for the 'root' user account", + "Checks": [ + "iam_root_hardware_mfa_enabled" + ], + "Attributes": [ + { + "Section": "1 Identity and Access Management", + "Profile": "Level 2", + "AssessmentStatus": "Manual", + "Description": "The 'root' user account is the most privileged user in an AWS account. MFA adds an extra layer of protection on top of a user name and password. With MFA enabled, when a user signs in to an AWS website, they will be prompted for their user name and password as well as for an authentication code from their AWS MFA device. For Level 2, it is recommended that the 'root' user account be protected with a hardware MFA. Where an AWS Organization is using centralized root access, root credentials can be removed from member accounts. In that case it is neither possible nor necessary to configure root MFA in the member account.", + "RationaleStatement": "A hardware MFA has a smaller attack surface than a virtual MFA. For example, a hardware MFA does not suffer the attack surface introduced by the mobile smartphone on which a virtual MFA resides. **Note**: Using hardware MFA for numerous AWS accounts may create a logistical device management issue. If this is the case, consider implementing this Level 2 recommendation selectively for the highest security AWS accounts, while applying the Level 1 recommendation to the remaining accounts.", + "ImpactStatement": "", + "RemediationProcedure": "**Note:** To manage MFA devices for the AWS 'root' user account, you must use your 'root' account credentials to sign in to AWS. You cannot manage MFA devices for the 'root' account using other credentials. Perform the following to establish a hardware MFA for the 'root' user account: 1. Sign in to the AWS Management Console and open the IAM console at [https://console.aws.amazon.com/iam/](https://console.aws.amazon.com/iam/). 2. Choose `Dashboard`, and under `Security Status`, expand `Activate MFA` on your root account. 3. Choose `Activate MFA`. 4. In the wizard, choose `A hardware MFA` device and then choose `Next Step`. 5. In the `Serial Number` box, enter the serial number that is found on the back of the MFA device. 6. In the `Authentication Code 1` box, enter the six-digit number displayed by the MFA device. You might need to press the button on the front of the device to display the number. 7. Wait 30 seconds while the device refreshes the code, and then enter the next six-digit number into the `Authentication Code 2` box. You might need to press the button on the front of the device again to display the second number. 8. Choose `Next Step`. The MFA device is now associated with the AWS account. The next time you use your AWS account credentials to sign in, you must type a code from the hardware MFA device. Remediation for this recommendation is not available through AWS CLI.", + "AuditProcedure": "Perform the following to determine if the 'root' user account has a hardware MFA setup: 1. Run the following command to determine if the 'root' account has MFA setup: ``` aws iam get-account-summary | grep AccountMFAEnabled aws iam get-account-summary | grep AccountPasswordPresent ``` The `AccountMFAEnabled` property is set to `1` will ensure that the 'root' user account has MFA (Virtual or Hardware) Enabled. `AccountPasswordPresent` set to `0` indicates that the `root` console credential has been removed. If `AccountMFAEnabled` property is set to `0` and `AccountPasswordPresent` is set to `1` the account is not compliant with this recommendation. 2. If `AccountMFAEnabled` property is set to `1`, determine 'root' account has Hardware MFA enabled. Run the following command to list all virtual MFA devices: ``` aws iam list-virtual-mfa-devices ``` If the output contains one MFA with the following Serial Number, it means the MFA is virtual, not hardware and the account is not compliant with this recommendation: `SerialNumber: arn:aws:iam::__:mfa/root-account-mfa-device`", + "AdditionalInformation": "IAM User account 'root' for us-gov cloud regions does not have console access. This control is not applicable for us-gov cloud regions.", + "References": "https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_enable_virtual.html:https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_enable_physical.html#enable-hw-mfa-for-root:https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-enable-root-access.html", + "DefaultValue": "" + } + ] + }, + { + "Id": "1.6", + "Description": "Eliminate use of the 'root' user for administrative and daily tasks", + "Checks": [ + "iam_avoid_root_usage" + ], + "Attributes": [ + { + "Section": "1 Identity and Access Management", + "Profile": "Level 1", + "AssessmentStatus": "Manual", + "Description": "With the creation of an AWS account, a 'root user' is created that cannot be disabled or deleted. That user has unrestricted access to and control over all resources in the AWS account. It is highly recommended that the use of this account be avoided for everyday tasks.", + "RationaleStatement": "The 'root user' has unrestricted access to and control over all account resources. Use of it is inconsistent with the principles of least privilege and separation of duties, and can lead to unnecessary harm due to error or account compromise.", + "ImpactStatement": "", + "RemediationProcedure": "If you find that the 'root' user account is being used for daily activities, including administrative tasks that do not require the 'root' user: 1. Change the 'root' user password. 2. Deactivate or delete any access keys associated with the 'root' user. Remember, anyone who has 'root' user credentials for your AWS account has unrestricted access to and control of all the resources in your account, including billing information.", + "AuditProcedure": "**From Console:** 1. Login to the AWS Management Console at `https://console.aws.amazon.com/iam/`. 2. In the left pane, click `Credential Report`. 3. Click on `Download Report`. 4. Open or Save the file locally. 5. Locate the `` under the user column. 6. Review `password_last_used, access_key_1_last_used_date, access_key_2_last_used_date` to determine when the 'root user' was last used. **From Command Line:** Run the following CLI commands to provide a credential report for determining the last time the 'root user' was used: ``` aws iam generate-credential-report ``` ``` aws iam get-credential-report --query 'Content' --output text | base64 -d | cut -d, -f1,5,11,16 | grep -B1 '' ``` Review `password_last_used`, `access_key_1_last_used_date`, `access_key_2_last_used_date` to determine when the _root user_ was last used. **Note:** There are a few conditions under which the use of the 'root' user account is required. Please see the reference links for all of the tasks that require use of the 'root' user.", + "AdditionalInformation": "The 'root' user for us-gov cloud regions is not enabled by default. However, on request to AWS support, they can enable the 'root' user and grant access only through access-keys (CLI, API methods) for us-gov cloud region. If the 'root' user for us-gov cloud regions is enabled, this recommendation is applicable. Monitoring usage of the 'root' user can be accomplished by implementing recommendation 3.3 Ensure a log metric filter and alarm exist for usage of the 'root' user.", + "References": "https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html:https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html:https://docs.aws.amazon.com/general/latest/gr/aws_tasks-that-require-root.html", + "DefaultValue": "" + } + ] + }, + { + "Id": "1.7", + "Description": "Ensure IAM password policy requires minimum length of 14 or greater", + "Checks": [ + "iam_password_policy_minimum_length_14" + ], + "Attributes": [ + { + "Section": "1 Identity and Access Management", + "Profile": "Level 1", + "AssessmentStatus": "Automated", + "Description": "Password policies are, in part, used to enforce password complexity requirements. IAM password policies can be used to ensure passwords are at least a given length. It is recommended that the password policy require a minimum password length 14.", + "RationaleStatement": "Setting a password complexity policy increases account resiliency against brute force login attempts.", + "ImpactStatement": "Enforcing a minimum password length of 14 characters enhances security by making passwords more resistant to brute force attacks. However, it may require users to create longer and potentially more complex passwords, which could impact user convenience.", + "RemediationProcedure": "Perform the following to set the password policy as prescribed: **From Console:** 1. Login to AWS Console (with appropriate permissions to View Identity Access Management Account Settings) 2. Go to IAM Service on the AWS Console 3. Click on Account Settings on the Left Pane 4. Set Minimum password length to `14` or greater. 5. Click Apply password policy **From Command Line:** ``` aws iam update-account-password-policy --minimum-password-length 14 ``` Note: All commands starting with aws iam update-account-password-policy can be combined into a single command.", + "AuditProcedure": "Perform the following to ensure the password policy is configured as prescribed: **From Console:** 1. Login to AWS Console (with appropriate permissions to View Identity Access Management Account Settings) 2. Go to IAM Service on the AWS Console 3. Click on Account Settings on the Left Pane 4. Ensure Minimum password length is set to 14 or greater. **From Command Line:** ``` aws iam get-account-password-policy ``` Ensure the output of the above command includes MinimumPasswordLength: 14 (or higher)", + "AdditionalInformation": "Ensure the password policy also includes requirements for password complexity, such as the inclusion of uppercase letters, lowercase letters, numbers, and special characters: ``` aws iam update-account-password-policy --require-uppercase-characters --require-lowercase-characters --require-numbers --require-symbols ```", + "References": "https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_passwords_account-policy.html:https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#configure-strong-password-policy", + "DefaultValue": "" + } + ] + }, + { + "Id": "1.8", + "Description": "Ensure IAM password policy prevents password reuse", + "Checks": [ + "iam_password_policy_reuse_24" + ], + "Attributes": [ + { + "Section": "1 Identity and Access Management", + "Profile": "Level 1", + "AssessmentStatus": "Automated", + "Description": "IAM password policies can prevent the reuse of a given password by the same user. It is recommended that the password policy prevent the reuse of passwords.", + "RationaleStatement": "Preventing password reuse increases account resiliency against brute force login attempts.", + "ImpactStatement": "", + "RemediationProcedure": "Perform the following to set the password policy as prescribed: **From Console:** 1. Login to AWS Console (with appropriate permissions to View Identity Access Management Account Settings) 2. Go to IAM Service on the AWS Console 3. Click on Account Settings on the Left Pane 4. Check Prevent password reuse 5. Set Number of passwords to remember is set to `24` **From Command Line:** ``` aws iam update-account-password-policy --password-reuse-prevention 24 ``` Note: All commands starting with aws iam update-account-password-policy can be combined into a single command.", + "AuditProcedure": "Perform the following to ensure the password policy is configured as prescribed: **From Console:** 1. Login to AWS Console (with appropriate permissions to View Identity Access Management Account Settings) 2. Go to IAM Service on the AWS Console 3. Click on Account Settings on the Left Pane 4. Ensure Prevent password reuse is checked 5. Ensure Number of passwords to remember is set to 24 **From Command Line:** ``` aws iam get-account-password-policy ``` Ensure the output of the above command includes PasswordReusePrevention: 24", + "AdditionalInformation": "", + "References": "https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_passwords_account-policy.html:https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#configure-strong-password-policy", + "DefaultValue": "" + } + ] + }, + { + "Id": "1.9", + "Description": "Ensure multi-factor authentication (MFA) is enabled for all IAM users that have a console password", + "Checks": [ + "iam_user_mfa_enabled_console_access" + ], + "Attributes": [ + { + "Section": "1 Identity and Access Management", + "Profile": "Level 1", + "AssessmentStatus": "Automated", + "Description": "Multi-Factor Authentication (MFA) adds an extra layer of authentication assurance beyond traditional credentials. With MFA enabled, when a user signs in to the AWS Console, they will be prompted for their user name and password as well as for an authentication code from their physical or virtual MFA token. It is recommended that MFA be enabled for all accounts that have a console password.", + "RationaleStatement": "Enabling MFA provides increased security for console access as it requires the authenticating principal to possess a device that displays a time-sensitive key and have knowledge of a credential.", + "ImpactStatement": "AWS will soon end support for SMS multi-factor authentication (MFA). New customers are not allowed to use this feature. We recommend that existing customers switch to an alternative method of MFA.", + "RemediationProcedure": "Perform the following to enable MFA: **From Console:** 1. Sign in to the AWS Management Console and open the IAM console at 'https://console.aws.amazon.com/iam/' 2. In the left pane, select `Users`. 3. In the `User Name` list, choose the name of the intended MFA user. 4. Choose the `Security Credentials` tab, and then choose `Manage MFA Device`. 5. In the `Manage MFA Device wizard`, choose `Virtual MFA` device, and then choose `Continue`. IAM generates and displays configuration information for the virtual MFA device, including a QR code graphic. The graphic is a representation of the 'secret configuration key' that is available for manual entry on devices that do not support QR codes. 6. Open your virtual MFA application. (For a list of apps that you can use for hosting virtual MFA devices, see Virtual MFA Applications at https://aws.amazon.com/iam/details/mfa/#Virtual_MFA_Applications). If the virtual MFA application supports multiple accounts (multiple virtual MFA devices), choose the option to create a new account (a new virtual MFA device). 7. Determine whether the MFA app supports QR codes, and then do one of the following: - Use the app to scan the QR code. For example, you might choose the camera icon or choose an option similar to Scan code, and then use the device's camera to scan the code. - In the Manage MFA Device wizard, choose Show secret key for manual configuration, and then type the secret configuration key into your MFA application. When you are finished, the virtual MFA device starts generating one-time passwords. 8. In the `Manage MFA Device wizard`, in the `MFA Code 1 box`, type the `one-time password` that currently appears in the virtual MFA device. Wait up to 30 seconds for the device to generate a new one-time password. Then type the second `one-time password` into the `MFA Code 2 box`. 9. Click `Assign MFA`.", + "AuditProcedure": "Perform the following to determine if a MFA device is enabled for all IAM users having a console password: **From Console:** 1. Open the IAM console at [https://console.aws.amazon.com/iam/](https://console.aws.amazon.com/iam/). 2. In the left pane, select `Users` 3. If the `MFA` or `Password age` columns are not visible in the table, click the gear icon at the upper right corner of the table and ensure a checkmark is next to both, then click `Close`. 4. Ensure that for each user where the `Password age` column shows a password age, the `MFA` column shows `Virtual`, `U2F Security Key`, or `Hardware`. **From Command Line:** 1. Run the following command (OSX/Linux/UNIX) to generate a list of all IAM users along with their password and MFA status: ``` aws iam generate-credential-report ``` ``` aws iam get-credential-report --query 'Content' --output text | base64 -d | cut -d, -f1,4,8 ``` 2. The output of this command will produce a table similar to the following: ``` user,password_enabled,mfa_active elise,false,false brandon,true,true rakesh,false,false helene,false,false paras,true,true anitha,false,false ``` 3. For any column having `password_enabled` set to `true` , ensure `mfa_active` is also set to `true.`", + "AdditionalInformation": "**Forced IAM User Self-Service Remediation** Amazon has published a pattern that requires users to set up MFA through self-service before they gain access to their complete set of permissions. Until they complete this step, they cannot access their full permissions. This pattern can be used for new AWS accounts. It can also be applied to existing accounts; it is recommended that users receive instructions and a grace period to complete MFA enrollment before active enforcement on existing AWS accounts.", + "References": "https://tools.ietf.org/html/rfc6238:https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa.html:https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#enable-mfa-for-privileged-users:https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_enable_virtual.html:https://blogs.aws.amazon.com/security/post/Tx2SJJYE082KBUK/How-to-Delegate-Management-of-Multi-Factor-Authentication-to-AWS-IAM-Users", + "DefaultValue": "" + } + ] + }, + { + "Id": "1.1", + "Description": "Do not create access keys during initial setup for IAM users with a console password", + "Checks": [ + "iam_user_no_setup_initial_access_key" + ], + "Attributes": [ + { + "Section": "1 Identity and Access Management", + "Profile": "Level 1", + "AssessmentStatus": "Manual", + "Description": "AWS console defaults to no check boxes selected when creating a new IAM user. When creating the IAM User credentials you have to determine what type of access they require. Programmatic access: The IAM user might need to make API calls, use the AWS CLI, or use the Tools for Windows PowerShell. In that case, create an access key (access key ID and a secret access key) for that user. AWS Management Console access: If the user needs to access the AWS Management Console, create a password for the user.", + "RationaleStatement": "Requiring the additional steps to be taken by the user for programmatic access after their profile has been created will provide a stronger indication of intent that access keys are [a] necessary for their work and [b] that once the access key is established on an account, the keys may be in use somewhere in the organization. **Note**: Even if it is known the user will need access keys, require them to create the keys themselves or put in a support ticket to have them created as a separate step from user creation.", + "ImpactStatement": "", + "RemediationProcedure": "Perform the following to delete access keys that do not pass the audit: **From Console:** 1. Login to the AWS Management Console: 2. Click `Services` 3. Click `IAM` 4. Click on `Users` 5. Click on `Security Credentials` 6. As an Administrator - Click on the X `(Delete)` for keys that were created at the same time as the user profile but have not been used. 7. As an IAM User - Click on the X `(Delete)` for keys that were created at the same time as the user profile but have not been used. **From Command Line:** ``` aws iam delete-access-key --access-key-id --user-name ```", + "AuditProcedure": "Perform the following steps to determine if unused access keys were created upon user creation: **From Console:** 1. Login to the AWS Management Console 2. Click `Services` 3. Click `IAM` 4. Click on a User where column `Password age` and `Access key age` is not set to `None` 5. Click on `Security credentials` Tab 6. Compare the user `Creation time` to the Access Key `Created` date. 6. For any that match, the key was created during initial user setup. - Keys that were created at the same time as the user profile and do not have a last used date should be deleted. Refer to the remediation below. **From Command Line:** 1. Run the following command (OSX/Linux/UNIX) to generate a list of all IAM users along with their access keys utilization: ``` aws iam generate-credential-report ``` ``` aws iam get-credential-report --query 'Content' --output text | base64 -d | cut -d, -f1,4,9,11,14,16 ``` 2. The output of this command will produce a table similar to the following: ``` user,password_enabled,access_key_1_active,access_key_1_last_used_date,access_key_2_active,access_key_2_last_used_date elise,false,true,2015-04-16T15:14:00+00:00,false,N/A brandon,true,true,N/A,false,N/A rakesh,false,false,N/A,false,N/A helene,false,true,2015-11-18T17:47:00+00:00,false,N/A paras,true,true,2016-08-28T12:04:00+00:00,true,2016-03-04T10:11:00+00:00 anitha,true,true,2016-06-08T11:43:00+00:00,true,N/A ``` 3. For any user having `password_enabled` set to `true` AND `access_key_last_used_date` set to `N/A` refer to the remediation below.", + "AdditionalInformation": "Credential report does not appear to contain Key Creation Date", + "References": "https://docs.aws.amazon.com/cli/latest/reference/iam/delete-access-key.html:https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html", + "DefaultValue": "" + } + ] + }, + { + "Id": "1.11", + "Description": "Ensure credentials unused for 45 days or more are disabled", + "Checks": [ + "iam_user_accesskey_unused", + "iam_user_console_access_unused" + ], + "Attributes": [ + { + "Section": "1 Identity and Access Management", + "Profile": "Level 1", + "AssessmentStatus": "Automated", + "Description": "AWS IAM users can access AWS resources using different types of credentials, such as passwords or access keys. It is recommended that all credentials that have been unused for 45 days or more be deactivated or removed.", + "RationaleStatement": "Disabling or removing unnecessary credentials will reduce the window of opportunity for credentials associated with a compromised or abandoned account to be used.", + "ImpactStatement": "", + "RemediationProcedure": "**From Console:** Perform the following to manage Unused Password (IAM user console access) 1. Login to the AWS Management Console: 2. Click `Services` 3. Click `IAM` 4. Click on `Users` 5. Click on `Security Credentials` 6. Select user whose `Console last sign-in` is greater than 45 days 7. Click `Security credentials` 8. In section `Sign-in credentials`, `Console password` click `Manage` 9. Under Console Access select `Disable` 10. Click `Apply` Perform the following to deactivate Access Keys: 1. Login to the AWS Management Console: 2. Click `Services` 3. Click `IAM` 4. Click on `Users` 5. Click on `Security Credentials` 6. Select any access keys that are over 45 days old and that have been used and - Click on `Make Inactive` 7. Select any access keys that are over 45 days old and that have not been used and - Click the X to `Delete`", + "AuditProcedure": "Perform the following to determine if unused credentials exist: **From Console:** 1. Login to the AWS Management Console 2. Click `Services` 3. Click `IAM` 4. Click on `Users` 5. Click the `Settings` (gear) icon. 6. Select `Console last sign-in`, `Access key last used`, and `Access Key Id` 7. Click on `Close` 8. Check and ensure that `Console last sign-in` is less than 45 days ago. **Note** - `Never` means the user has never logged in. 9. Check and ensure that `Access key age` is less than 45 days and that `Access key last used` does not say `None` If the user hasn't signed into the Console in the last 45 days or Access keys are over 45 days old refer to the remediation. **From Command Line:** **Download Credential Report:** 1. Run the following commands: ``` aws iam generate-credential-report aws iam get-credential-report --query 'Content' --output text | base64 -d | cut -d, -f1,4,5,6,9,10,11,14,15,16 | grep -v '^' ``` **Ensure unused credentials do not exist:** 2. For each user having `password_enabled` set to `TRUE` , ensure `password_last_used_date` is less than `45` days ago. - When `password_enabled` is set to `TRUE` and `password_last_used` is set to `No_Information` , ensure `password_last_changed` is less than 45 days ago. 3. For each user having an `access_key_1_active` or `access_key_2_active` to `TRUE` , ensure the corresponding `access_key_n_last_used_date` is less than `45` days ago. - When a user having an `access_key_x_active` (where x is 1 or 2) to `TRUE` and corresponding access_key_x_last_used_date is set to `N/A`, ensure `access_key_x_last_rotated` is less than 45 days ago.", + "AdditionalInformation": " is excluded in the audit since the root account should not be used for day-to-day business and would likely be unused for more than 45 days.", + "References": "https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#remove-credentials:https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_finding-unused.html:https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_passwords_admin-change-user.html:https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html", + "DefaultValue": "" + } + ] + }, + { + "Id": "1.12", + "Description": "Ensure there is only one active access key for any single IAM user", + "Checks": [ + "iam_user_two_active_access_key" + ], + "Attributes": [ + { + "Section": "1 Identity and Access Management", + "Profile": "Level 1", + "AssessmentStatus": "Automated", + "Description": "Access keys are long-term credentials for an IAM user or the AWS account 'root' user. You can use access keys to sign programmatic requests to the AWS CLI or AWS API (directly or using the AWS SDK)", + "RationaleStatement": "One of the best ways to protect your account is to not allow users to have multiple access keys.", + "ImpactStatement": "", + "RemediationProcedure": "**From Console:** 1. Sign in to the AWS Management Console and navigate to IAM dashboard at `https://console.aws.amazon.com/iam/`. 2. In the left navigation panel, choose `Users`. 3. Click on the IAM user name that you want to examine. 4. On the IAM user configuration page, select `Security Credentials` tab. 5. In `Access Keys` section, choose one access key that is less than 90 days old. This should be the only active key used by this IAM user to access AWS resources programmatically. Test your application(s) to make sure that the chosen access key is working. 6. In the same `Access Keys` section, identify your non-operational access keys (other than the chosen one) and deactivate it by clicking the `Make Inactive` link. 7. If you receive the `Change Key Status` confirmation box, click `Deactivate` to switch off the selected key. 8. Repeat steps 3-7 for each IAM user in your AWS account. **From Command Line:** 1. Using the IAM user and access key information provided in the `Audit CLI`, choose one access key that is less than 90 days old. This should be the only active key used by this IAM user to access AWS resources programmatically. Test your application(s) to make sure that the chosen access key is working. 2. Run the `update-access-key` command below using the IAM user name and the non-operational access key IDs to deactivate the unnecessary key(s). Refer to the Audit section to identify the unnecessary access key ID for the selected IAM user **Note** - the command does not return any output: ``` aws iam update-access-key --access-key-id --status Inactive --user-name ``` 3. To confirm that the selected access key pair has been successfully `deactivated` run the `list-access-keys` audit command again for that IAM User: ``` aws iam list-access-keys --user-name ``` - The command output should expose the metadata for each access key associated with the IAM user. If the non-operational key pair(s) `Status` is set to `Inactive`, the key has been successfully deactivated and the IAM user access configuration adheres now to this recommendation. 4. Repeat steps 1-3 for each IAM user in your AWS account.", + "AuditProcedure": "**From Console:** 1. Sign in to the AWS Management Console and navigate to IAM dashboard at `https://console.aws.amazon.com/iam/`. 2. In the left navigation panel, choose `Users`. 3. Click on the IAM user name that you want to examine. 4. On the IAM user configuration page, select `Security Credentials` tab. 5. Under `Access Keys` section, in the Status column, check the current status for each access key associated with the IAM user. If the selected IAM user has more than one access key activated, then the user's access configuration does not adhere to security best practices, and the risk of accidental exposures increases. - Repeat steps 3-5 for each IAM user in your AWS account. **From Command Line:** 1. Run `list-users` command to list all IAM users within your account: ``` aws iam list-users --query Users[*].UserName ``` The command output should return an array that contains all your IAM user names. 2. Run `list-access-keys` command using the IAM user name list to return the current status of each access key associated with the selected IAM user: ``` aws iam list-access-keys --user-name ``` The command output should expose the metadata `(Username, AccessKeyId, Status, CreateDate)` for each access key on that user account. 3. Check the `Status` property value for each key returned to determine each key's current state. If the `Status` property value for more than one IAM access key is set to `Active`, the user access configuration does not adhere to this recommendation; refer to the remediation below. - Repeat steps 2 and 3 for each IAM user in your AWS account.", + "AdditionalInformation": "", + "References": "https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html:https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html", + "DefaultValue": "" + } + ] + }, + { + "Id": "1.13", + "Description": "Ensure access keys are rotated every 90 days or less", + "Checks": [ + "iam_rotate_access_key_90_days" + ], + "Attributes": [ + { + "Section": "1 Identity and Access Management", + "Profile": "Level 1", + "AssessmentStatus": "Automated", + "Description": "Access keys consist of an access key ID and secret access key, which are used to sign programmatic requests that you make to AWS. AWS users need their own access keys to make programmatic calls to AWS from the AWS Command Line Interface (AWS CLI), Tools for Windows PowerShell, the AWS SDKs, or direct HTTP calls using the APIs for individual AWS services. It is recommended that all access keys be rotated regularly.", + "RationaleStatement": "Rotating access keys will reduce the window of opportunity for an access key that is associated with a compromised or terminated account to be used. Access keys should be rotated to ensure that data cannot be accessed with an old key which might have been lost, cracked, or stolen.", + "ImpactStatement": "", + "RemediationProcedure": "Perform the following to rotate access keys: **From Console:** 1. Go to the Management Console (https://console.aws.amazon.com/iam) 2. Click on `Users` 3. Click on `Security Credentials` 4. As an Administrator - Click on `Make Inactive` for keys that have not been rotated in `90` Days 5. As an IAM User - Click on `Make Inactive` or `Delete` for keys which have not been rotated or used in `90` Days 6. Click on `Create Access Key` 7. Update programmatic calls with new Access Key credentials **From Command Line:** 1. While the first access key is still active, create a second access key, which is active by default. Run the following command: ``` aws iam create-access-key ``` At this point, the user has two active access keys. 2. Update all applications and tools to use the new access key. 3. Determine whether the first access key is still in use by using this command: ``` aws iam get-access-key-last-used ``` 4. One approach is to wait several days and then check the old access key for any use before proceeding. Even if step 3 indicates no use of the old key, it is recommended that you do not immediately delete the first access key. Instead, change the state of the first access key to Inactive using this command: ``` aws iam update-access-key ``` 5. Use only the new access key to confirm that your applications are working. Any applications and tools that still use the original access key will stop working at this point because they no longer have access to AWS resources. If you find such an application or tool, you can switch its state back to Active to reenable the first access key. Then return to step 2 and update this application to use the new key. 6. After you wait some period of time to ensure that all applications and tools have been updated, you can delete the first access key with this command: ``` aws iam delete-access-key ```", + "AuditProcedure": "Perform the following to determine if access keys are rotated as prescribed: **From Console:** 1. Go to the Management Console (https://console.aws.amazon.com/iam) 2. Click on `Users` 3. For each user, go to `Security Credentials` 4. Review each key under `Access Keys` 5. For each key that shows `Active` for status, ensure that `Created` is less than or equal to `90 days ago`. **From Command Line:** ``` aws iam generate-credential-report aws iam get-credential-report --query 'Content' --output text | base64 -d ``` The `access_key_1_last_rotated` and the `access_key_2_last_rotated` fields in this file notes the date and time, in ISO 8601 date-time format, when the user's access key was created or last changed. If the user does not have an active access key, the value in this field is N/A (not applicable).", + "AdditionalInformation": "", + "References": "https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#rotate-credentials:https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_finding-unused.html:https://docs.aws.amazon.com/general/latest/gr/managing-aws-access-keys.html:https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html", + "DefaultValue": "" + } + ] + }, + { + "Id": "1.14", + "Description": "Ensure IAM users receive permissions only through groups", + "Checks": [ + "iam_policy_attached_only_to_group_or_roles" + ], + "Attributes": [ + { + "Section": "1 Identity and Access Management", + "Profile": "Level 1", + "AssessmentStatus": "Automated", + "Description": "IAM users are granted access to services, functions, and data through IAM policies. There are four ways to define policies for a user: 1) Edit the user policy directly, also known as an inline or user policy; 2) attach a policy directly to a user; 3) add the user to an IAM group that has an attached policy; 4) add the user to an IAM group that has an inline policy. Only the third implementation is recommended.", + "RationaleStatement": "Assigning IAM policies solely through groups unifies permissions management into a single, flexible layer that is consistent with organizational functional roles. By unifying permissions management, the likelihood of excessive permissions is reduced.", + "ImpactStatement": "", + "RemediationProcedure": "Perform the following to create an IAM group and assign a policy to it: 1. Sign in to the AWS Management Console and open the IAM console at [https://console.aws.amazon.com/iam/](https://console.aws.amazon.com/iam/). 2. In the navigation pane, click `Groups` and then click `Create New Group`. 3. In the `Group Name` box, type the name of the group and then click `Next Step`. 4. In the list of policies, select the check box for each policy that you want to apply to all members of the group. Then click `Next Step`. 5. Click `Create Group`. Perform the following to add a user to a given group: 1. Sign in to the AWS Management Console and open the IAM console at [https://console.aws.amazon.com/iam/](https://console.aws.amazon.com/iam/). 2. In the navigation pane, click `Groups`. 3. Select the group to add a user to. 4. Click `Add Users To Group`. 5. Select the users to be added to the group. 6. Click `Add Users`. Perform the following to remove a direct association between a user and policy: 1. Sign in to the AWS Management Console and open the IAM console at [https://console.aws.amazon.com/iam/](https://console.aws.amazon.com/iam/). 2. In the left navigation pane, click on Users. 3. For each user: - Select the user - Click on the `Permissions` tab - Expand `Permissions policies` - Click `X` for each policy; then click Detach or Remove (depending on policy type)", + "AuditProcedure": "Perform the following to determine if an inline policy is set or a policy is directly attached to users: 1. Run the following to get a list of IAM users: ``` aws iam list-users --query 'Users[*].UserName' --output text ``` 2. For each user returned, run the following command to determine if any policies are attached to them: ``` aws iam list-attached-user-policies --user-name aws iam list-user-policies --user-name ``` 3. If any policies are returned, the user has an inline policy or direct policy attachment.", + "AdditionalInformation": "", + "References": "http://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html:http://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html", + "DefaultValue": "" + } + ] + }, + { + "Id": "1.15", + "Description": "Ensure IAM policies that allow full *:* administrative privileges are not attached", + "Checks": [ + "iam_aws_attached_policy_no_administrative_privileges", + "iam_customer_attached_policy_no_administrative_privileges" + ], + "Attributes": [ + { + "Section": "1 Identity and Access Management", + "Profile": "Level 1", + "AssessmentStatus": "Automated", + "Description": "IAM policies are the means by which privileges are granted to users, groups, or roles. It is recommended and considered standard security advice to grant least privilegeโ€”that is, granting only the permissions required to perform a task. Determine what users need to do, and then craft policies for them that allow the users to perform only those tasks, instead of granting full administrative privileges.", + "RationaleStatement": "It's more secure to start with a minimum set of permissions and grant additional permissions as necessary, rather than starting with permissions that are too lenient and then attempting to tighten them later. Providing full administrative privileges instead of restricting access to the minimum set of permissions required for the user exposes resources to potentially unwanted actions. IAM policies that contain a statement with `Effect: Allow` and `Action: *` over `Resource: *` should be removed.", + "ImpactStatement": "", + "RemediationProcedure": "**From Console:** Perform the following to detach the policy that has full administrative privileges: 1. Sign in to the AWS Management Console and open the IAM console at [https://console.aws.amazon.com/iam/](https://console.aws.amazon.com/iam/). 2. In the navigation pane, click Policies and then search for the policy name found in the audit step. 3. Select the policy that needs to be deleted. 4. In the policy action menu, select `Detach`. 5. Select all Users, Groups, Roles that have this policy attached. 6. Click `Detach Policy`. 7. Select the newly detached policy and select `Delete`. **From Command Line:** Perform the following to detach the policy that has full administrative privileges as found in the audit step: 1. Lists all IAM users, groups, and roles that the specified managed policy is attached to. ``` aws iam list-entities-for-policy --policy-arn ``` 2. Detach the policy from all IAM Users: ``` aws iam detach-user-policy --user-name --policy-arn ``` 3. Detach the policy from all IAM Groups: ``` aws iam detach-group-policy --group-name --policy-arn ``` 4. Detach the policy from all IAM Roles: ``` aws iam detach-role-policy --role-name --policy-arn ```", + "AuditProcedure": "Perform the following to determine existing policies: **From Command Line:** 1. Run the following to get a list of IAM policies: ``` aws iam list-policies --only-attached --output text ``` 2. For each policy returned, run the following command to determine if any policy is allowing full administrative privileges on the account: ``` aws iam get-policy-version --policy-arn --version-id ``` 3. In the output, the policy should not contain any Statement block with `Effect: Allow` and `Action` set to `*` and `Resource` set to `*`.", + "AdditionalInformation": "", + "References": "https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html:https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html:https://docs.aws.amazon.com/cli/latest/reference/iam/index.html#cli-aws-iam", + "DefaultValue": "" + } + ] + }, + { + "Id": "1.16", + "Description": "Ensure a support role has been created to manage incidents with AWS Support", + "Checks": [ + "iam_support_role_created" + ], + "Attributes": [ + { + "Section": "1 Identity and Access Management", + "Profile": "Level 1", + "AssessmentStatus": "Automated", + "Description": "AWS provides a support center that can be used for incident notification and response, as well as technical support and customer services. Create an IAM Role, with the appropriate policy assigned, to allow authorized users to manage incidents with AWS Support.", + "RationaleStatement": "By implementing least privilege for access control, an IAM Role will require an appropriate IAM Policy to allow Support Center Access in order to manage Incidents with AWS Support.", + "ImpactStatement": "All AWS Support plans include an unlimited number of account and billing support cases, with no long-term contracts. Support billing calculations are performed on a per-account basis for all plans. Enterprise Support plan customers have the option to include multiple enabled accounts in an aggregated monthly billing calculation. Monthly charges for the Business and Enterprise support plans are based on each month's AWS usage charges, subject to a monthly minimum, billed in advance. When assigning rights, keep in mind that other policies may grant access to Support as well. This may include AdministratorAccess and other policies including customer managed policies. Utilizing the AWS managed 'AWSSupportAccess' role is one simple way of ensuring that this permission is properly granted. To better support the principle of separation of duties, it would be best to only attach this role where necessary.", + "RemediationProcedure": "**From Command Line:** 1. Create an IAM role for managing incidents with AWS: - Create a trust relationship policy document that allows to manage AWS incidents, and save it locally as /tmp/TrustPolicy.json: ``` { Version: 2012-10-17, Statement: [ { Effect: Allow, Principal: { AWS: }, Action: sts:AssumeRole } ] } ``` 2. Create the IAM role using the above trust policy: ``` aws iam create-role --role-name --assume-role-policy-document file:///tmp/TrustPolicy.json ``` 3. Attach 'AWSSupportAccess' managed policy to the created IAM role: ``` aws iam attach-role-policy --policy-arn arn:aws:iam::aws:policy/AWSSupportAccess --role-name ```", + "AuditProcedure": "**From Command Line:** 1. List IAM policies, filter for the 'AWSSupportAccess' managed policy, and note the Arn element value: ``` aws iam list-policies --query Policies[?PolicyName == 'AWSSupportAccess'] ``` 2. Check if the 'AWSSupportAccess' policy is attached to any role: ``` aws iam list-entities-for-policy --policy-arn arn:aws:iam::aws:policy/AWSSupportAccess ``` 3. In the output, ensure `PolicyRoles` does not return empty. 'Example: Example: PolicyRoles: [ ]' If it returns empty refer to the remediation below.", + "AdditionalInformation": "AWSSupportAccess policy is a global AWS resource. It has same ARN as `arn:aws:iam::aws:policy/AWSSupportAccess` for every account.", + "References": "https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html:https://aws.amazon.com/premiumsupport/pricing/:https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iam/list-policies.html:https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iam/attach-role-policy.html:https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iam/list-entities-for-policy.html", + "DefaultValue": "" + } + ] + }, + { + "Id": "1.17", + "Description": "Ensure IAM instance roles are used for AWS resource access from instances", + "Checks": [ + "ec2_instance_profile_attached" + ], + "Attributes": [ + { + "Section": "1 Identity and Access Management", + "Profile": "Level 2", + "AssessmentStatus": "Automated", + "Description": "AWS access from within AWS instances can be done by either encoding AWS keys into AWS API calls or by assigning the instance to a role which has an appropriate permissions policy for the required access. AWS Access means accessing the APIs of AWS in order to access AWS resources or manage AWS account resources.", + "RationaleStatement": "AWS IAM roles reduce the risks associated with sharing and rotating credentials that can be used outside of AWS itself. Compromised credentials can be used from outside the AWS account to which they provide access. In contrast, to leverage role permissions, an attacker would need to gain and maintain access to a specific instance to use the privileges associated with it. Additionally, if credentials are encoded into compiled applications or other hard-to-change mechanisms, they are even less likely to be properly rotated due to the risks of service disruption. As time passes, credentials that cannot be rotated are more likely to be known by an increasing number of individuals who no longer work for the organization that owns the credentials.", + "ImpactStatement": "", + "RemediationProcedure": "**From Console:** 1. Sign in to the AWS Management Console and navigate to the EC2 dashboard at `https://console.aws.amazon.com/ec2/`. 2. In the left navigation panel, choose `Instances`. 3. Select the EC2 instance you want to modify. 4. Click `Actions`. 5. Click `Security`. 6. Click `Modify IAM role`. 7. Click `Create new IAM role` if a new IAM role is required. 8. Select the IAM role you want to attach to your instance in the `IAM role` dropdown. 9. Click `Update IAM role`. 10. Repeat steps 3 to 9 for each EC2 instance in your AWS account that requires an IAM role to be attached. **From Command Line:** 1. Run the `describe-instances` command to list all EC2 instance IDs in the selected AWS region: ``` aws ec2 describe-instances --region --query 'Reservations[*].Instances[*].InstanceId' ``` 2. Run the `associate-iam-instance-profile` command to attach an instance profile (which is attached to an IAM role) to the EC2 instance: ``` aws ec2 associate-iam-instance-profile --region --instance-id --iam-instance-profile Name=Instance-Profile-Name ``` 3. Run the `describe-instances` command again for the recently modified EC2 instance. The command output should return the instance profile ARN and ID: ``` aws ec2 describe-instances --region --instance-id --query 'Reservations[*].Instances[*].IamInstanceProfile' ``` 4. Repeat steps 2 and 3 for each EC2 instance in your AWS account that requires an IAM role to be attached.", + "AuditProcedure": "First, check if the instance has any API secrets stored using Secret Scanning. Currently, AWS does not have a solution for this. You can use open-source tools like TruffleHog to scan for secrets in the EC2 instance. If a secret is found, then assign the role to the instance. **From Console:** 1. Sign in to the AWS Management Console and navigate to the EC2 dashboard at `https://console.aws.amazon.com/ec2/`. 2. In the left navigation panel, choose `Instances`. 3. Select the EC2 instance you want to examine. 4. Select `Actions`. 5. Select `View details`. 6. Select `Security` in the lower panel. - If the value for **Instance profile arn** is an instance profile ARN, then an instance profile (that contains an IAM role) is attached. - If the value for **IAM Role** is blank, no role is attached. - If the value for **IAM Role** contains a role, a role is attached. - If the value for **IAM Role** is No roles attached to instance profile: , then an instance profile is attached to the instance, but it does not contain an IAM role. 7. Repeat steps 3 to 6 for each EC2 instance in your AWS account. **From Command Line:** 1. Run the `describe-instances` command to list all EC2 instance IDs in the selected AWS region: ``` aws ec2 describe-instances --region --query 'Reservations[*].Instances[*].InstanceId' ``` 2. Run the `describe-instances` command again for each EC2 instance using the `IamInstanceProfile` identifier in the query filter to check if an IAM role is attached: ``` aws ec2 describe-instances --region --instance-id --query 'Reservations[*].Instances[*].IamInstanceProfile' ``` 3. If an IAM role is attached, the command output will show the IAM instance profile ARN and ID. 4. Repeat steps 2 and 3 for each EC2 instance in your AWS account.", + "AdditionalInformation": "", + "References": "https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2.html:https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html", + "DefaultValue": "" + } + ] + }, + { + "Id": "1.18", + "Description": "Ensure that all expired SSL/TLS certificates stored in AWS IAM are removed", + "Checks": [ + "iam_no_expired_server_certificates_stored" + ], + "Attributes": [ + { + "Section": "1 Identity and Access Management", + "Profile": "Level 1", + "AssessmentStatus": "Automated", + "Description": "To enable HTTPS connections to your website or application in AWS, you need an SSL/TLS server certificate. You can use AWS Certificate Manager (ACM) or IAM to store and deploy server certificates. Use IAM as a certificate manager only when you must support HTTPS connections in a region that is not supported by ACM. IAM securely encrypts your private keys and stores the encrypted version in IAM SSL certificate storage. IAM supports deploying server certificates in all regions, but you must obtain your certificate from an external provider for use with AWS. You cannot upload an ACM certificate to IAM. Additionally, you cannot manage your certificates from the IAM Console.", + "RationaleStatement": "Removing expired SSL/TLS certificates eliminates the risk that an invalid certificate will be deployed accidentally to a resource such as AWS Elastic Load Balancer (ELB), which can damage the credibility of the application/website behind the ELB. As a best practice, it is recommended to delete expired certificates.", + "ImpactStatement": "Deleting the certificate could have implications for your application if you are using an expired server certificate with Elastic Load Balancing, CloudFront, etc. You must make configurations in the respective services to ensure there is no interruption in application functionality.", + "RemediationProcedure": "**From Console:** Removing expired certificates via AWS Management Console is not currently supported. To delete SSL/TLS certificates stored in IAM through the AWS API, use the Command Line Interface (CLI). **From Command Line:** To delete an expired certificate, run the following command by replacing with the name of the certificate to delete: ``` aws iam delete-server-certificate --server-certificate-name ``` When the preceding command is successful, it does not return any output.", + "AuditProcedure": "**From Console:** Getting the certificate expiration information via the AWS Management Console is not currently supported. To request information about the SSL/TLS certificates stored in IAM through the AWS API, use the Command Line Interface (CLI). **From Command Line:** Run the `list-server-certificates` command to list all the IAM-stored server certificates: ``` aws iam list-server-certificates ``` The command output should return an array that contains all the SSL/TLS certificates currently stored in IAM and their metadata (name, ID, expiration date, etc): ``` { ServerCertificateMetadataList: [ { ServerCertificateId: EHDGFRW7EJFYTE88D, ServerCertificateName: MyServerCertificate, Expiration: 2018-07-10T23:59:59Z, Path: /, Arn: arn:aws:iam::012345678910:server-certificate/MySSLCertificate, UploadDate: 2018-06-10T11:56:08Z } ] } ``` Verify the `ServerCertificateName` and `Expiration` parameter value (expiration date) for each SSL/TLS certificate returned by the list-server-certificates command and determine if there are any expired server certificates currently stored in AWS IAM. If so, use the AWS API to remove them. If this command returns: ``` { { ServerCertificateMetadataList: [] } ``` This means that there are no expired certificates; it **does not** mean that no certificates exist.", + "AdditionalInformation": "", + "References": "https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html:https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iam/delete-server-certificate.html", + "DefaultValue": "By default, expired certificates will not be deleted." + } + ] + }, + { + "Id": "1.19", + "Description": "Ensure that IAM External Access Analyzer is enabled for all regions", + "Checks": [ + "accessanalyzer_enabled" + ], + "Attributes": [ + { + "Section": "1 Identity and Access Management", + "Profile": "Level 1", + "AssessmentStatus": "Automated", + "Description": "Enable the IAM External Access Analyzer regarding all resources in each active AWS region. IAM Access Analyzer is a technology introduced at AWS reinvent 2019. After the Analyzer is enabled in IAM, scan results are displayed on the console showing the accessible resources. Scans show resources that other accounts and federated users can access, such as KMS keys and IAM roles. The results allow you to determine whether an unintended user is permitted, making it easier for administrators to monitor least privilege access. Access Analyzer analyzes only the policies that are applied to resources in the same AWS Region.", + "RationaleStatement": "AWS IAM External Access Analyzer helps you identify the resources in your organization and accounts, such as Amazon S3 buckets or IAM roles, that are shared with external entities. This allows you to identify unintended access to your resources and data. Access Analyzer identifies resources that are shared with external principals by using logic-based reasoning to analyze the resource-based policies in your AWS environment. IAM External Access Analyzer continuously monitors all policies for S3 buckets, IAM roles, KMS (Key Management Service) keys, AWS Lambda functions, Amazon SQS (Simple Queue Service) queues and more", + "ImpactStatement": "", + "RemediationProcedure": "**From Console:** Perform the following to enable IAM Access Analyzer for IAM policies: 1. Open the IAM console at `https://console.aws.amazon.com/iam/.` 2. Choose `Access analyzer`. 3. Choose `Create external access analyzer`. 4. On the `Create analyzer` page, confirm that the `Region` displayed is the Region where you want to enable Access Analyzer. 5. Optionally enter a name for the analyzer. 6. Optionally add any tags that you want to apply to the analyzer. 7. Choose `Create Analyzer`. 8. Repeat these step for each active region. **From Command Line:** Run the following command: ``` aws accessanalyzer create-analyzer --analyzer-name --type ``` Repeat this command for each active region. **Note:** The IAM Access Analyzer is successfully configured only when the account you use has the necessary permissions.", + "AuditProcedure": "**From Console:** 1. Open the IAM console at `https://console.aws.amazon.com/iam/` 2. Under `Access analyzer` choose `External Access` 3. Ensure that at least one analyzer is present 4. Ensure that the `STATUS` is set to `Active` 5. Repeat these steps for each active region **From Command Line:** 1. Run the following command: ``` aws accessanalyzer list-analyzers type -- | grep status ``` 2. Ensure that at least one Analyzer's `status` is set to `ACTIVE`. 3. Repeat the steps above for each active region. If an Access Analyzer is not listed for each region or the status is not set to active refer to the remediation procedure below.", + "AdditionalInformation": "Some regions in AWS are enabled by default, while others are disabled by default. Regions introduced prior to March 20, 2019, are enabled by default and cannot be disabled. Regions introduced afterward can be disabled by default. For more information on managing AWS Regions, please see AWS's [documentation on managing AWS Regions](https://docs.aws.amazon.com/general/latest/gr/rande-manage.html).", + "References": "https://docs.aws.amazon.com/IAM/latest/UserGuide/what-is-access-analyzer.html:https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-getting-started.html:https://awscli.amazonaws.com/v2/documentation/api/latest/reference/accessanalyzer/get-analyzer.html:https://awscli.amazonaws.com/v2/documentation/api/latest/reference/accessanalyzer/create-analyzer.html", + "DefaultValue": "" + } + ] + }, + { + "Id": "1.20", + "Description": "Ensure IAM users are managed centrally via identity federation or AWS Organizations for multi-account environments", + "Checks": [ + "iam_check_saml_providers_sts" + ], + "Attributes": [ + { + "Section": "1 Identity and Access Management", + "Profile": "Level 2", + "AssessmentStatus": "Manual", + "Description": "In multi-account environments, IAM user centralization facilitates greater user control. User access beyond the initial account is then provided via role assumption. Centralization of users can be accomplished through federation with an external identity provider or through the use of AWS Organizations.", + "RationaleStatement": "Centralizing IAM user management to a single identity store reduces complexity and thus the likelihood of access management errors.", + "ImpactStatement": "", + "RemediationProcedure": "The remediation procedure will vary based on each individual organization's implementation of identity federation and/or AWS Organizations, with the acceptance criteria that no non-service IAM users and non-root accounts are present outside the account providing centralized IAM user management.", + "AuditProcedure": "For multi-account AWS environments with an external identity provider: 1. Determine the master account for identity federation or IAM user management 2. Login to that account through the AWS Management Console 3. Click `Services` 4. Click `IAM` 5. Click `Identity providers` 6. Verify the configuration For multi-account AWS environments with an external identity provider, as well as for those implementing AWS Organizations without an external identity provider: 1. Determine all accounts that should not have local users present 2. Log into the AWS Management Console 3. Switch role into each identified account 4. Click `Services` 5. Click `IAM` 6. Click `Users` 7. Confirm that no IAM users representing individuals are present", + "AdditionalInformation": "", + "References": "", + "DefaultValue": "" + } + ] + }, + { + "Id": "1.21", + "Description": "Ensure access to AWSCloudShellFullAccess is restricted", + "Checks": [ + "iam_policy_cloudshell_admin_not_attached" + ], + "Attributes": [ + { + "Section": "1 Identity and Access Management", + "Profile": "Level 1", + "AssessmentStatus": "Manual", + "Description": "AWS CloudShell is a convenient way of running CLI commands against AWS services; a managed IAM policy ('AWSCloudShellFullAccess') provides full access to CloudShell, which allows file upload and download capability between a user's local system and the CloudShell environment. Within the CloudShell environment, a user has sudo permissions and can access the internet. Therefore, it is feasible to install file transfer software, for example, and move data from CloudShell to external internet servers.", + "RationaleStatement": "Access to this policy should be restricted, as it presents a potential channel for data exfiltration by malicious cloud admins who are given full permissions to the service. AWS documentation describes how to create a more restrictive IAM policy that denies file transfer permissions.", + "ImpactStatement": "", + "RemediationProcedure": "**From Console** 1. Open the IAM console at https://console.aws.amazon.com/iam/ 2. In the left pane, select Policies 3. Search for and select AWSCloudShellFullAccess 4. On the Entities attached tab, for each item, check the box and select Detach", + "AuditProcedure": "**From Console** 1. Open the IAM console at https://console.aws.amazon.com/iam/ 2. In the left pane, select Policies 3. Search for and select AWSCloudShellFullAccess 4. On the Entities attached tab, ensure that there are no entities using this policy **From Command Line** 1. List IAM policies, filter for the 'AWSCloudShellFullAccess' managed policy, and note the Arn element value: ``` aws iam list-policies --query Policies[?PolicyName == 'AWSCloudShellFullAccess'] ``` 2. Check if the 'AWSCloudShellFullAccess' policy is attached to any role: ``` aws iam list-entities-for-policy --policy-arn arn:aws:iam::aws:policy/AWSCloudShellFullAccess ``` 3. In the output, ensure PolicyRoles returns empty. 'Example: Example: PolicyRoles: [ ]' If it does not return empty, refer to the remediation below. **Note:** Keep in mind that other policies may grant access.", + "AdditionalInformation": "", + "References": "https://docs.aws.amazon.com/cloudshell/latest/userguide/sec-auth-with-identities.html", + "DefaultValue": "" + } + ] + }, + { + "Id": "2.1.1", + "Description": "Ensure S3 Bucket Policy is set to deny HTTP requests", + "Checks": [ + "s3_bucket_secure_transport_policy" + ], + "Attributes": [ + { + "Section": "2 Storage", + "SubSection": "2.1 Simple Storage Service (S3)", + "Profile": "Level 2", + "AssessmentStatus": "Automated", + "Description": "At the Amazon S3 bucket level, you can configure permissions through a bucket policy, making the objects accessible only through HTTPS.", + "RationaleStatement": "By default, Amazon S3 allows both HTTP and HTTPS requests. To ensure that access to Amazon S3 objects is only permitted through HTTPS, you must explicitly deny HTTP requests. Bucket policies that allow HTTPS requests without explicitly denying HTTP requests will not comply with this recommendation.", + "ImpactStatement": "", + "RemediationProcedure": "**From Console:** 1. Login to the AWS Management Console and open the Amazon S3 console using https://console.aws.amazon.com/s3/. 2. Select the check box next to the Bucket. 3. Click on 'Permissions'. 4. Click 'Bucket Policy'. 5. Add either of the following to the existing policy, filling in the required information: ``` { Sid: , Effect: Deny, Principal: *, Action: s3:*, Resource: arn:aws:s3:::/*, Condition: { Bool: { aws:SecureTransport: false } } } ``` or ``` { Sid: , Effect: Deny, Principal: *, Action: s3:*, Resource: [ arn:aws:s3:::, arn:aws:s3:::/* ], Condition: { NumericLessThan: { s3:TlsVersion: 1.2 } } } ``` 6. Save 7. Repeat for all the buckets in your AWS account that contain sensitive data. **From Console** Using AWS Policy Generator: 1. Repeat steps 1-4 above. 2. Click on `Policy Generator` at the bottom of the Bucket Policy Editor. 3. Select Policy Type `S3 Bucket Policy`. 4. Add Statements: - `Effect` = Deny - `Principal` = * - `AWS Service` = Amazon S3 - `Actions` = * - `Amazon Resource Name` = 5. Generate Policy. 6. Copy the text and add it to the Bucket Policy. **From Command Line:** 1. Export the bucket policy to a json file: ``` aws s3api get-bucket-policy --bucket --query Policy --output text > policy.json ``` 2. Modify the policy.json file by adding either of the following: ``` { Sid: , Effect: Deny, Principal: *, Action: s3:*, Resource: arn:aws:s3:::/*, Condition: { Bool: { aws:SecureTransport: false } } } ``` or ``` { Sid: , Effect: Deny, Principal: *, Action: s3:*, Resource: [ arn:aws:s3:::, arn:aws:s3:::/* ], Condition: { NumericLessThan: { s3:TlsVersion: 1.2 } } } ``` 3. Apply this modified policy back to the S3 bucket: ``` aws s3api put-bucket-policy --bucket --policy file://policy.json ```", + "AuditProcedure": "To allow access to HTTPS, you can use a bucket policy with the effect `allow` and a condition that checks for the key `aws:SecureTransport: true`. This means that HTTPS requests are allowed, but it does not deny HTTP requests. To explicitly deny HTTP access, ensure that there is also a bucket policy with the effect `deny` that contains the key `aws:SecureTransport: false`. You may also require TLS by setting a policy to deny any version lower than the one you wish to require, using the condition `NumericLessThan` and the key `s3:TlsVersion: 1.2`. **From Console:** 1. Login to the AWS Management Console and open the Amazon S3 console using https://console.aws.amazon.com/s3/. 2. Select the check box next to the Bucket. 3. Click on 'Permissions', then click on `Bucket Policy`. 4. Ensure that a policy is listed that matches either: ``` { Sid: , Effect: Deny, Principal: *, Action: s3:*, Resource: arn:aws:s3:::/*, Condition: { Bool: { aws:SecureTransport: false } } } ``` or ``` { Sid: , Effect: Deny, Principal: *, Action: s3:*, Resource: [ arn:aws:s3:::, arn:aws:s3:::/* ], Condition: { NumericLessThan: { s3:TlsVersion: 1.2 } } } ``` `` and `` will be specific to your account, and TLS version will be site/policy specific to your organisation. 5. Repeat for all the buckets in your AWS account. **From Command Line:** 1. List all of the S3 Buckets ``` aws s3 ls ``` 2. Using the list of buckets, run this command on each of them: ``` aws s3api get-bucket-policy --bucket | grep aws:SecureTransport ``` or ``` aws s3api get-bucket-policy --bucket | grep s3:TlsVersion ``` NOTE : If an error is thrown by the CLI, it means no policy has been configured for the specified S3 bucket, and that by default it is allowing both HTTP and HTTPS requests. 3. Confirm that `aws:SecureTransport` is set to false (such as `aws:SecureTransport:false`) or that `s3:TlsVersion` has a site-specific value. 4. Confirm that the policy line has Effect set to Deny 'Effect:Deny'", + "AdditionalInformation": "", + "References": "https://aws.amazon.com/premiumsupport/knowledge-center/s3-bucket-policy-for-config-rule/:https://aws.amazon.com/blogs/security/how-to-use-bucket-policies-and-apply-defense-in-depth-to-help-secure-your-amazon-s3-data/:https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3api/get-bucket-policy.html", + "DefaultValue": "Both HTTP and HTTPS requests are allowed." + } + ] + }, + { + "Id": "2.1.2", + "Description": "Ensure MFA Delete is enabled on S3 buckets", + "Checks": [ + "s3_bucket_no_mfa_delete" + ], + "Attributes": [ + { + "Section": "2 Storage", + "SubSection": "2.1 Simple Storage Service (S3)", + "Profile": "Level 2", + "AssessmentStatus": "Manual", + "Description": "Once MFA Delete is enabled on your sensitive and classified S3 bucket, it requires the user to provide two forms of authentication.", + "RationaleStatement": "Adding MFA delete to an S3 bucket requires additional authentication when you change the version state of your bucket or delete an object version, adding another layer of security in the event your security credentials are compromised or unauthorized access is granted.", + "ImpactStatement": "Enabling MFA delete on an S3 bucket could require additional administrator oversight. Enabling MFA delete may impact other services that automate the creation and/or deletion of S3 buckets.", + "RemediationProcedure": "Perform the steps below to enable MFA delete on an S3 bucket: **Note:** - You cannot enable MFA Delete using the AWS Management Console; you must use the AWS CLI or API. - You must use your 'root' account to enable MFA Delete on S3 buckets. **From Command line:** 1. Run the s3api `put-bucket-versioning` command: ``` aws s3api put-bucket-versioning --profile my-root-profile --bucket Bucket_Name --versioning-configuration Status=Enabled,MFADelete=Enabled --mfa โ€œarn:aws:iam::aws_account_id:mfa/root-account-mfa-device passcodeโ€ ```", + "AuditProcedure": "Perform the steps below to confirm that MFA delete is configured on an S3 bucket: **From Console:** 1. Login to the S3 console at `https://console.aws.amazon.com/s3/`. 2. Click the `check` box next to the name of the bucket you want to confirm. 3. In the window under `Properties`: - Confirm that Versioning is `Enabled` - Confirm that MFA Delete is `Enabled` **From Command Line:** 1. Run the `get-bucket-versioning` command: ``` aws s3api get-bucket-versioning --bucket my-bucket ``` Example output: ``` Enabled Enabled ``` If the console or CLI output does not show that Versioning and MFA Delete are `enabled`, please refer to the remediation below.", + "AdditionalInformation": "", + "References": "https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html#MultiFactorAuthenticationDelete:https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMFADelete.html:https://aws.amazon.com/blogs/security/securing-access-to-aws-using-mfa-part-3/:https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_lost-or-broken.html", + "DefaultValue": "" + } + ] + }, + { + "Id": "2.1.3", + "Description": "Ensure all data in Amazon S3 has been discovered, classified, and secured when necessary", + "Checks": [ + "macie_is_enabled" + ], + "Attributes": [ + { + "Section": "2 Storage", + "SubSection": "2.1 Simple Storage Service (S3)", + "Profile": "Level 2", + "AssessmentStatus": "Manual", + "Description": "Amazon S3 buckets can contain sensitive data that, for security purposes, should be discovered, monitored, classified, and protected. Macie, along with other third-party tools, can automatically provide an inventory of Amazon S3 buckets.", + "RationaleStatement": "Using a cloud service or third-party software to continuously monitor and automate the process of data discovery and classification for S3 buckets through machine learning and pattern matching is a strong defense in protecting that information. Amazon Macie is a fully managed data security and privacy service that uses machine learning and pattern matching to discover and protect your sensitive data in AWS.", + "ImpactStatement": "There is a cost associated with using Amazon Macie, and there is typically a cost associated with third-party tools that perform similar processes and provide protection.", + "RemediationProcedure": "Perform the steps below to enable and configure Amazon Macie: **From Console:** 1. Log on to the Macie console at `https://console.aws.amazon.com/macie/`. 2. Click `Get started`. 3. Click `Enable Macie`. Set up a repository for sensitive data discovery results: 1. In the left pane, under Settings, click `Discovery results`. 2. Make sure `Create bucket` is selected. 3. Create a bucket and enter a name for it. The name must be unique across all S3 buckets, and it must start with a lowercase letter or a number. 4. Click `Advanced`. 5. For block all public access, make sure `Yes` is selected. 6. For KMS encryption, specify the AWS KMS key that you want to use to encrypt the results. The key must be a symmetric customer master key (CMK) that is in the same region as the S3 bucket. 7. Click `Save`. Create a job to discover sensitive data: 1. In the left pane, click `S3 buckets`. Macie displays a list of all the S3 buckets for your account. 2. Check the box for each bucket that you want Macie to analyze as part of the job. 3. Click `Create job`. 4. Click `Quick create`. 5. For the Name and Description step, enter a name and, optionally, a description of the job. 6. Click `Next`. 7. For the Review and create step, click `Submit`. Review your findings: 1. In the left pane, click `Findings`. 2. To view the details of a specific finding, choose any field other than the check box for the finding. If you are using a third-party tool to manage and protect your S3 data, follow the vendor documentation for implementing and configuring that tool.", + "AuditProcedure": "Perform the following steps to determine if Macie is running: **From Console:** 1. Login to the Macie console at https://console.aws.amazon.com/macie/. 2. In the left hand pane, click on `By job` under findings. 3. Confirm that you have a job set up for your S3 buckets. When you log into the Macie console, if you are not taken to the summary page and do not have a job set up and running, then refer to the remediation procedure below. If you are using a third-party tool to manage and protect your S3 data, you meet this recommendation.", + "AdditionalInformation": "", + "References": "https://aws.amazon.com/macie/getting-started/:https://docs.aws.amazon.com/workspaces/latest/adminguide/data-protection.html:https://docs.aws.amazon.com/macie/latest/user/data-classification.html", + "DefaultValue": "" + } + ] + }, + { + "Id": "2.1.4", + "Description": "Ensure that S3 is configured with 'Block Public Access' enabled", + "Checks": [ + "s3_bucket_level_public_access_block", + "s3_account_level_public_access_blocks" + ], + "Attributes": [ + { + "Section": "2 Storage", + "SubSection": "2.1 Simple Storage Service (S3)", + "Profile": "Level 1", + "AssessmentStatus": "Automated", + "Description": "Amazon S3 provides `Block public access (bucket settings)` and `Block public access (account settings)` to help you manage public access to Amazon S3 resources. By default, S3 buckets and objects are created with public access disabled. However, an IAM principal with sufficient S3 permissions can enable public access at the bucket and/or object level. While enabled, `Block public access (bucket settings)` prevents an individual bucket and its contained objects from becoming publicly accessible. Similarly, `Block public access (account settings)` prevents all buckets and their contained objects from becoming publicly accessible across the entire account.", + "RationaleStatement": "Amazon S3 `Block public access (bucket settings)` prevents the accidental or malicious public exposure of data contained within the respective bucket(s). Amazon S3 `Block public access (account settings)` prevents the accidental or malicious public exposure of data contained within all buckets of the respective AWS account. Whether to block public access to all or some buckets is an organizational decision that should be based on data sensitivity, least privilege, and use case.", + "ImpactStatement": "When you apply Block Public Access settings to an account, the settings apply to all AWS regions globally. The settings may not take effect in all regions immediately or simultaneously, but they will eventually propagate to all regions.", + "RemediationProcedure": "**If utilizing Block Public Access (bucket settings)** **From Console:** 1. Login to the AWS Management Console and open the Amazon S3 console using https://console.aws.amazon.com/s3/. 2. Select the check box next to a bucket. 3. Click 'Edit public access settings'. 4. Click 'Block all public access' 5. Repeat for all the buckets in your AWS account that contain sensitive data. **From Command Line:** 1. List all of the S3 buckets: ``` aws s3 ls ``` 2. Enable Block Public Access on a specific bucket: ``` aws s3api put-public-access-block --bucket --public-access-block-configuration BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,RestrictPublicBuckets=true ``` **If utilizing Block Public Access (account settings)** **From Console:** If the output reads `true` for the separate configuration settings, then Block Public Access is enabled on the account. 1. Login to the AWS Management Console and open the Amazon S3 console using https://console.aws.amazon.com/s3/. 2. Click `Block Public Access (account settings)`. 3. Click `Edit` to change the block public access settings for all the buckets in your AWS account. 4. Update the settings and click `Save`. For details about each setting, pause on the `i` icons. 5. When you're asked for confirmation, enter `confirm`. Then click `Confirm` to save your changes. **From Command Line:** To enable Block Public Access for this account, run the following command: ``` aws s3control put-public-access-block --public-access-block-configuration BlockPublicAcls=true, IgnorePublicAcls=true, BlockPublicPolicy=true, RestrictPublicBuckets=true --account-id ```", + "AuditProcedure": "**If utilizing Block Public Access (bucket settings)** **From Console:** 1. Login to the AWS Management Console and open the Amazon S3 console using https://console.aws.amazon.com/s3/. 2. Select the check box next to a bucket. 3. Click on 'Edit public access settings'. 4. Ensure that the block public access settings are configured appropriately for this bucket. 5. Repeat for all the buckets in your AWS account. **From Command Line:** 1. List all of the S3 buckets: ``` aws s3 ls ``` 2. Find the public access settings for a specific bucket: ``` aws s3api get-public-access-block --bucket ``` Output if Block Public Access is enabled: ``` { PublicAccessBlockConfiguration: { BlockPublicAcls: true, IgnorePublicAcls: true, BlockPublicPolicy: true, RestrictPublicBuckets: true } } ``` If the output reads `false` for the separate configuration settings, then proceed with the remediation. **If utilizing Block Public Access (account settings)** **From Console:** 1. Login to the AWS Management Console and open the Amazon S3 console using https://console.aws.amazon.com/s3/. 2. Choose `Block public access (account settings)`. 3. Ensure that the block public access settings are configured appropriately for your AWS account. **From Command Line:** To check the block public access settings for this account, run the following command: `aws s3control get-public-access-block --account-id --region ` Output if Block Public Access is enabled: ``` { PublicAccessBlockConfiguration: { IgnorePublicAcls: true, BlockPublicPolicy: true, BlockPublicAcls: true, RestrictPublicBuckets: true } } ``` If the output reads `false` for the separate configuration settings, then proceed with the remediation.", + "AdditionalInformation": "", + "References": "https://docs.aws.amazon.com/AmazonS3/latest/user-guide/block-public-access-account.html", + "DefaultValue": "" + } + ] + }, + { + "Id": "2.2.1", + "Description": "Ensure that encryption-at-rest is enabled for RDS instances", + "Checks": [ + "rds_instance_storage_encrypted" + ], + "Attributes": [ + { + "Section": "2 Storage", + "SubSection": "2.2 Relational Database Service (RDS)", + "Profile": "Level 1", + "AssessmentStatus": "Automated", + "Description": "Amazon RDS encrypted DB instances use the industry-standard AES-256 encryption algorithm to encrypt your data on the server that hosts your Amazon RDS DB instances. After your data is encrypted, Amazon RDS handles the authentication of access and the decryption of your data transparently, with minimal impact on performance.", + "RationaleStatement": "Databases are likely to hold sensitive and critical data; therefore, it is highly recommended to implement encryption to protect your data from unauthorized access or disclosure. With RDS encryption enabled, the data stored on the instance's underlying storage, the automated backups, read replicas, and snapshots are all encrypted.", + "ImpactStatement": "", + "RemediationProcedure": "**From Console:** 1. Login to the AWS Management Console and open the RDS dashboard at https://console.aws.amazon.com/rds/. 2. In the left navigation panel, click on `Databases`. 3. Select the Database instance that needs to be encrypted. 4. Click the `Actions` button placed at the top right and select `Take Snapshot`. 5. On the Take Snapshot page, enter the name of the database for which you want to take a snapshot in the `Snapshot Name` field and click on `Take Snapshot`. 6. Select the newly created snapshot, click the `Action` button placed at the top right, and select `Copy snapshot` from the Action menu. 7. On the Make Copy of DB Snapshot page, perform the following: - In the `New DB Snapshot Identifier` field, enter a name for the new snapshot. - Check `Copy Tags`. The new snapshot must have the same tags as the source snapshot. - Select `Yes` from the `Enable Encryption` dropdown list to enable encryption. You can choose to use the AWS default encryption key or a custom key from the Master Key dropdown list. 8. Click `Copy Snapshot` to create an encrypted copy of the selected instance's snapshot. 9. Select the new Snapshot Encrypted Copy and click the `Action` button located at the top right. Then, select the `Restore Snapshot` option from the Action menu. This will restore the encrypted snapshot to a new database instance. 10. On the Restore DB Instance page, enter a unique name for the new database instance in the DB Instance Identifier field. 11. Review the instance configuration details and click `Restore DB Instance`. 12. As the new instance provisioning process is completed, you can update the application configuration to refer to the endpoint of the new encrypted database instance. Once the database endpoint is changed at the application level, you can remove the unencrypted instance. **From Command Line:** 1. Run the `describe-db-instances` command to list the names of all RDS database instances in the selected AWS region. The command output should return database instance identifiers: ``` aws rds describe-db-instances --region --query 'DBInstances[*].DBInstanceIdentifier' ``` 2. Run the `create-db-snapshot` command to create a snapshot for a selected database instance. The command output will return the `new snapshot` with name DB Snapshot Name: ``` aws rds create-db-snapshot --region --db-snapshot-identifier --db-instance-identifier ``` 3. Now run the `list-aliases` command to list the KMS key aliases available in a specified region. The command output should return each `key alias currently available`. For our RDS encryption activation process, locate the ID of the AWS default KMS key: ``` aws kms list-aliases --region ``` 4. Run the `copy-db-snapshot` command using the default KMS key ID for the RDS instances returned earlier to create an encrypted copy of the database instance snapshot. The command output will return the `encrypted instance snapshot configuration`: ``` aws rds copy-db-snapshot --region --source-db-snapshot-identifier --target-db-snapshot-identifier --copy-tags --kms-key-id ``` 5. Run the `restore-db-instance-from-db-snapshot` command to restore the encrypted snapshot created in the previous step to a new database instance. If successful, the command output should return the configuration of the new encrypted database instance: ``` aws rds restore-db-instance-from-db-snapshot --region --db-instance-identifier --db-snapshot-identifier ``` 6. Run the `describe-db-instances` command to list all RDS database names available in the selected AWS region. The output will return the database instance identifier names. Select the encrypted database name that we just created, `db-name-encrypted`: ``` aws rds describe-db-instances --region --query 'DBInstances[*].DBInstanceIdentifier' ``` 7. Run the `describe-db-instances` command again using the RDS instance identifier returned earlier to determine if the selected database instance is encrypted. The command output should indicate that the encryption status is `True`: ``` aws rds describe-db-instances --region --db-instance-identifier --query 'DBInstances[*].StorageEncrypted' ```", + "AuditProcedure": "**From Console:** 1. Login to the AWS Management Console and open the RDS dashboard at https://console.aws.amazon.com/rds/. 2. In the navigation pane, under RDS dashboard, click `Databases`. 3. Select the RDS instance that you want to examine. 4. Click `Instance Name` to see details, then select the `Configuration` tab. 5. Under Configuration Details, in the Storage pane, search for the `Encryption Enabled` status. 6. If the current status is set to `Disabled`, encryption is not enabled for the selected RDS database instance. 7. Repeat steps 2 to 6 to verify the encryption status of other RDS instances in the same region. 8. Change the region from the top of the navigation bar, and repeat the audit steps for other regions. **From Command Line:** 1. Run the `describe-db-instances` command to list all the RDS database instance names available in the selected AWS region. The output will return each database instance identifier (name): ``` aws rds describe-db-instances --region --query 'DBInstances[*].DBInstanceIdentifier' ``` 2. Run the `describe-db-instances` command again, using an RDS instance identifier returned from step 1, to determine if the selected database instance is encrypted. The output should return the encryption status `True` or `False`: ``` aws rds describe-db-instances --region --db-instance-identifier --query 'DBInstances[*].StorageEncrypted' ``` 3. If the StorageEncrypted parameter value is `False`, encryption is not enabled for the selected RDS database instance. 4. Repeat steps 1 to 3 to audit each RDS instance, and change the region to verify RDS instances in other regions.", + "AdditionalInformation": "", + "References": "https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.Encryption.html:https://aws.amazon.com/blogs/database/selecting-the-right-encryption-options-for-amazon-rds-and-amazon-aurora-database-engines/#:~:text=With%20RDS%2Dencrypted%20resources%2C%20data,transparent%20to%20your%20database%20engine.:https://aws.amazon.com/rds/features/security/", + "DefaultValue": "" + } + ] + }, + { + "Id": "2.2.2", + "Description": "Ensure the Auto Minor Version Upgrade feature is enabled for RDS instances", + "Checks": [ + "rds_instance_minor_version_upgrade_enabled" + ], + "Attributes": [ + { + "Section": "2 Storage", + "SubSection": "2.2 Relational Database Service (RDS)", + "Profile": "Level 1", + "AssessmentStatus": "Automated", + "Description": "Ensure that RDS database instances have the Auto Minor Version Upgrade flag enabled to automatically receive minor engine upgrades during the specified maintenance window. This way, RDS instances can obtain new features, bug fixes, and security patches for their database engines.", + "RationaleStatement": "AWS RDS will occasionally deprecate minor engine versions and provide new ones for upgrades. When the last version number within a release is replaced, the changed version is considered minor. With the Auto Minor Version Upgrade feature enabled, version upgrades will occur automatically during the specified maintenance window, allowing your RDS instances to receive new features, bug fixes, and security patches for their database engines.", + "ImpactStatement": "", + "RemediationProcedure": "**From Console:** 1. Log in to the AWS management console and navigate to the RDS dashboard at https://console.aws.amazon.com/rds/. 2. In the left navigation panel, click `Databases`. 3. Select the RDS instance that you want to update. 4. Click on the `Modify` button located at the top right side. 5. On the `Modify DB Instance: ` page, In the `Maintenance` section, select `Auto minor version upgrade` and click the `Yes` radio button. 6. At the bottom of the page, click `Continue`, and check `Apply Immediately` to apply the changes immediately, or select `Apply during the next scheduled maintenance window` to avoid any downtime. 7. Review the changes and click `Modify DB Instance`. The instance status should change from available to modifying and back to available. Once the feature is enabled, the `Auto Minor Version Upgrade` status should change to `Yes`. **From Command Line:** 1. Run the `describe-db-instances` command to list all RDS database instance names available in the selected AWS region: ``` aws rds describe-db-instances --region --query 'DBInstances[*].DBInstanceIdentifier' ``` 2. The command output should return each database instance identifier. 3. Run the `modify-db-instance` command to modify the configuration of a selected RDS instance. This command will apply the changes immediately. Remove `--apply-immediately` to apply changes during the next scheduled maintenance window and avoid any downtime: ``` aws rds modify-db-instance --region --db-instance-identifier --auto-minor-version-upgrade --apply-immediately ``` 4. The command output should reveal the new configuration metadata for the RDS instance, including the `AutoMinorVersionUpgrade` parameter value. 5. Run the `describe-db-instances` command to check if the Auto Minor Version Upgrade feature has been successfully enabled: ``` aws rds describe-db-instances --region --db-instance-identifier --query 'DBInstances[*].AutoMinorVersionUpgrade' ``` 6. The command output should return the feature's current status set to `true`, indicating that the feature is `enabled`, and that the minor engine upgrades will be applied to the selected RDS instance.", + "AuditProcedure": "**From Console:** 1. Log in to the AWS management console and navigate to the RDS dashboard at https://console.aws.amazon.com/rds/. 2. In the left navigation panel, click `Databases`. 3. Select the RDS instance that you want to examine. 4. Click on the `Maintenance and backups` panel. 5. Under the `Maintenance` section, search for the Auto Minor Version Upgrade status. - If the current status is `Disabled`, it means that the feature is not enabled, and the minor engine upgrades released will not be applied to the selected RDS instance. **From Command Line:** 1. Run the `describe-db-instances` command to list all RDS database names available in the selected AWS region: ``` aws rds describe-db-instances --region --query 'DBInstances[*].DBInstanceIdentifier' ``` 2. The command output should return each database instance identifier. 3. Run the `describe-db-instances` command again using a RDS instance identifier returned earlier to determine the Auto Minor Version Upgrade status for the selected instance: ``` aws rds describe-db-instances --region --db-instance-identifier --query 'DBInstances[*].AutoMinorVersionUpgrade' ``` 4. The command output should return the current status of the feature. If the current status is set to `true`, the feature is enabled and the minor engine upgrades will be applied to the selected RDS instance.", + "AdditionalInformation": "", + "References": "https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_RDS_Managing.html:https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Upgrading.html:https://aws.amazon.com/rds/faqs/", + "DefaultValue": "" + } + ] + }, + { + "Id": "2.2.3", + "Description": "Ensure that RDS instances are not publicly accessible", + "Checks": [ + "rds_instance_no_public_access" + ], + "Attributes": [ + { + "Section": "2 Storage", + "SubSection": "2.2 Relational Database Service (RDS)", + "Profile": "Level 1", + "AssessmentStatus": "Automated", + "Description": "Ensure and verify that the RDS database instances provisioned in your AWS account restrict unauthorized access in order to minimize security risks. To restrict access to any RDS database instance, you must disable the Publicly Accessible flag for the database and update the VPC security group associated with the instance.", + "RationaleStatement": "Ensure that no public-facing RDS database instances are provisioned in your AWS account, and restrict unauthorized access in order to minimize security risks. When the RDS instance allows unrestricted access (0.0.0.0/0), anyone and anything on the Internet can establish a connection to your database, which can increase the opportunity for malicious activities such as brute force attacks, PostgreSQL injections, or DoS/DDoS attacks.", + "ImpactStatement": "", + "RemediationProcedure": "**From Console:** 1. Log in to the AWS management console and navigate to the RDS dashboard at https://console.aws.amazon.com/rds/. 2. Under the navigation panel, on the RDS dashboard, click `Databases`. 3. Select the RDS instance that you want to update. 4. Click `Modify` from the dashboard top menu. 5. On the Modify DB Instance panel, under the `Connectivity` section, click on `Additional connectivity configuration` and update the value for `Publicly Accessible` to `Not publicly accessible` to restrict public access. 6. Follow the below steps to update subnet configurations: - Select the `Connectivity and security` tab, and click the VPC attribute value inside the `Networking` section. - Select the `Details` tab from the VPC dashboard's bottom panel and click the Route table configuration attribute value. - On the Route table details page, select the Routes tab from the dashboard's bottom panel and click `Edit routes`. - On the Edit routes page, update the Destination of Target which is set to `igw-xxxxx` and click `Save` routes. 7. On the Modify DB Instance panel, click `Continue`, and in the Scheduling of modifications section, perform one of the following actions based on your requirements: - Select `Apply during the next scheduled maintenance window` to apply the changes automatically during the next scheduled maintenance window. - Select `Apply immediately` to apply the changes right away. With this option, any pending modifications will be asynchronously applied as soon as possible, regardless of the maintenance window setting for this RDS database instance. Note that any changes available in the pending modifications queue are also applied. If any of the pending modifications require downtime, choosing this option can cause unexpected downtime for the application. 8. Repeat steps 3-7 for each RDS instance in the current region. 9. Change the AWS region from the navigation bar to repeat the process for other regions. **From Command Line:** 1. Run the `describe-db-instances` command to list all available RDS database identifiers in the selected AWS region: ``` aws rds describe-db-instances --region --query 'DBInstances[*].DBInstanceIdentifier' ``` 2. The command output should return each database instance identifier. 3. Run the `modify-db-instance` command to modify the configuration of a selected RDS instance, disabling the `Publicly Accessible` flag for that instance. This command uses the `apply-immediately` flag. If you want to avoid any downtime, the `--no-apply-immediately` flag can be used: ``` aws rds modify-db-instance --region --db-instance-identifier --no-publicly-accessible --apply-immediately ``` 4. The command output should reveal the `PubliclyAccessible` configuration under pending values, to be applied at the specified time. 5. Updating the Internet Gateway destination via the AWS CLI is not currently supported. To update information about the Internet Gateway, please use the AWS Console procedure. 6. Repeat steps 1-5 for each RDS instance provisioned in the current region. 7. Change the AWS region by using the --region filter to repeat the process for other regions.", + "AuditProcedure": "**From Console:** 1. Log in to the AWS management console and navigate to the RDS dashboard at https://console.aws.amazon.com/rds/. 2. Under the navigation panel, on the RDS dashboard, click `Databases`. 3. Select the RDS instance that you want to examine. 4. Click `Instance Name` from the dashboard, under `Connectivity and Security`. 5. In the `Security` section, check if the Publicly Accessible flag status is set to `Yes`. 6. Follow the steps below to check database subnet access: - In the `networking` section, click the subnet link under `Subnets`. - The link will redirect you to the VPC Subnets page. - Select the subnet listed on the page and click the `Route Table` tab from the dashboard bottom panel. - If the route table contains any entries with the destination CIDR block set to `0.0.0.0/0` and an `Internet Gateway` attached, the selected RDS database instance was provisioned inside a public subnet; therefore, it is not running within a logically isolated environment and can be accessed from the Internet. 7. Repeat steps 3-6 to determine the configuration of other RDS database instances provisioned in the current region. 8. Change the AWS region from the navigation bar and repeat the audit process for other regions. **From Command Line:** 1. Run the `describe-db-instances` command to list all available RDS database names in the selected AWS region: ``` aws rds describe-db-instances --region --query 'DBInstances[*].DBInstanceIdentifier' ``` 2. The command output should return each database instance `identifier`. 3. Run the `describe-db-instances` command again, using the `PubliclyAccessible` parameter as a query filter to reveal the status of the database instance's Publicly Accessible flag: ``` aws rds describe-db-instances --region --db-instance-identifier --query 'DBInstances[*].PubliclyAccessible' ``` 4. Check the Publicly Accessible parameter status. If the Publicly Accessible flag is set to `Yes`, then the selected RDS database instance is publicly accessible and insecure. Follow the steps mentioned below to check database subnet access. 5. Run the `describe-db-instances` command again using the RDS database instance identifier that you want to check, along with the appropriate filtering to describe the VPC subnet(s) associated with the selected instance: ``` aws rds describe-db-instances --region --db-instance-identifier --query 'DBInstances[*].DBSubnetGroup.Subnets[]' ``` - The command output should list the subnets available in the selected database subnet group. 6. Run the `describe-route-tables` command using the ID of the subnet returned in the previous step to describe the routes of the VPC route table associated with the selected subnet: ``` aws ec2 describe-route-tables --region --filters Name=association.subnet-id,Values= --query 'RouteTables[*].Routes[]' ``` - If the command returns the route table associated with the database instance subnet ID, check the values of the `GatewayId` and `DestinationCidrBlock` attributes returned in the output. If the route table contains any entries with the `GatewayId` value set to `igw-xxxxxxxx` and the `DestinationCidrBlock` value set to `0.0.0.0/0`, the selected RDS database instance was provisioned within a public subnet. - Or, if the command returns empty results, the route table is implicitly associated with the subnet; therefore, the audit process continues with the next step. 7. Run the `describe-db-instances` command again using the RDS database instance identifier that you want to check, along with the appropriate filtering to describe the VPC ID associated with the selected instance: ``` aws rds describe-db-instances --region --db-instance-identifier --query 'DBInstances[*].DBSubnetGroup.VpcId' ``` - The command output should show the VPC ID in the selected database subnet group. 8. Now run the `describe-route-tables` command using the ID of the VPC returned in the previous step to describe the routes of the VPC's main route table that is implicitly associated with the selected subnet: ``` aws ec2 describe-route-tables --region --filters Name=vpc-id,Values= Name=association.main,Values=true --query 'RouteTables[*].Routes[]' ``` - The command output returns the VPC main route table implicitly associated with the database instance subnet ID. Check the values of the `GatewayId` and `DestinationCidrBlock` attributes returned in the output. If the route table contains any entries with the `GatewayId` value set to `igw-xxxxxxxx` and the `DestinationCidrBlock` value set to `0.0.0.0/0`, the selected RDS database instance was provisioned inside a public subnet; therefore, it is not running within a logically isolated environment and does not adhere to AWS security best practices.", + "AdditionalInformation": "", + "References": "https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.html:https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Scenario2.html:https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html:https://aws.amazon.com/rds/faqs/", + "DefaultValue": "" + } + ] + }, + { + "Id": "2.2.4", + "Description": "Ensure Multi-AZ deployments are used for enhanced availability in Amazon RDS", + "Checks": [ + "rds_cluster_multi_az", + "rds_instance_multi_az" + ], + "Attributes": [ + { + "Section": "2 Storage", + "SubSection": "2.2 Relational Database Service (RDS)", + "Profile": "Level 1", + "AssessmentStatus": "Manual", + "Description": "Amazon RDS offers Multi-AZ deployments that provide enhanced availability and durability for your databases, using synchronous replication to replicate data to a standby instance in a different Availability Zone (AZ). In the event of an infrastructure failure, Amazon RDS automatically fails over to the standby to minimize downtime and ensure business continuity.", + "RationaleStatement": "Database availability is crucial for maintaining service uptime, particularly for applications that are critical to the business. Implementing Multi-AZ deployments with Amazon RDS ensures that your databases are protected against unplanned outages due to hardware failures, network issues, or other disruptions. This configuration enhances both the availability and durability of your database, making it a highly recommended practice for production environments.", + "ImpactStatement": "Multi-AZ deployments may increase costs due to the additional resources required to maintain a standby instance; however, the benefits of increased availability and reduced risk of downtime outweigh these costs for critical applications.", + "RemediationProcedure": "**From Console:** 1. Login to the AWS Management Console and open the RDS dashboard at [AWS RDS Console](https://console.aws.amazon.com/rds/). 2. In the left navigation pane, click on `Databases`. 3. Select the database instance that needs Multi-AZ deployment to be enabled. 4. Click the `Modify` button at the top right. 5. Scroll down to the `Availability & Durability` section. 6. Under `Multi-AZ deployment`, select `Yes` to enable. 7. Review the changes and click `Continue`. 8. On the `Review` page, choose `Apply immediately` to make the change without waiting for the next maintenance window, or `Apply during the next scheduled maintenance window`. 9. Click `Modify DB Instance` to apply the changes. **From Command Line:** 1. Run the following command to modify the RDS instance and enable Multi-AZ: ``` aws rds modify-db-instance --region --db-instance-identifier --multi-az --apply-immediately ``` 2. Confirm that the Multi-AZ deployment is enabled by running the following command: ``` aws rds describe-db-instances --region --db-instance-identifier --query 'DBInstances[*].MultiAZ' ``` - The output should return `True`, indicating that Multi-AZ is enabled. 3. Repeat the procedure for other instances as necessary.", + "AuditProcedure": "**From Console:** 1. Login to the AWS Management Console and open the RDS dashboard at [AWS RDS Console](https://console.aws.amazon.com/rds/). 2. In the navigation pane, under `Databases`, select the RDS instance you want to examine. 3. Click the `Instance Name` to see details, then navigate to the `Configuration` tab. 4. Under the `Availability & Durability` section, check the `Multi-AZ` status. - If Multi-AZ deployment is enabled, it will display `Yes`. - If it is disabled, the status will display `No`. 5. Repeat steps 2-4 to verify the Multi-AZ status of other RDS instances in the same region. 6. Change the region from the top of the navigation bar and repeat the audit for other regions. **From Command Line:** 1. Run the following command to list all RDS instances in the selected AWS region: ``` aws rds describe-db-instances --region --query 'DBInstances[*].DBInstanceIdentifier' ``` 2. Run the following command using the instance identifier returned earlier to check the Multi-AZ status: ``` aws rds describe-db-instances --region --db-instance-identifier --query 'DBInstances[*].MultiAZ' ``` - If the output is `True`, Multi-AZ is enabled. - If the output is `False`, Multi-AZ is not enabled. 3. Repeat steps 1 and 2 to audit each RDS instance, and change regions to verify in other regions.", + "AdditionalInformation": "", + "References": "", + "DefaultValue": "" + } + ] + }, + { + "Id": "2.3.1", + "Description": "Ensure that encryption is enabled for EFS file systems", + "Checks": [ + "efs_encryption_at_rest_enabled" + ], + "Attributes": [ + { + "Section": "2 Storage", + "SubSection": "2.3 Elastic File System (EFS)", + "Profile": "Level 1", + "AssessmentStatus": "Automated", + "Description": "EFS data should be encrypted at rest using AWS KMS (Key Management Service).", + "RationaleStatement": "Data should be encrypted at rest to reduce the risk of a data breach via direct access to the storage device.", + "ImpactStatement": "", + "RemediationProcedure": "**It is important to note that EFS file system data-at-rest encryption must be turned on when creating the file system. If an EFS file system has been created without data-at-rest encryption enabled, then you must create another EFS file system with the correct configuration and transfer the data.** **Steps to create an EFS file system with data encrypted at rest:** **From Console:** 1. Login to the AWS Management Console and Navigate to the `Elastic File System (EFS)` dashboard. 2. Select `File Systems` from the left navigation panel. 3. Click the `Create File System` button from the dashboard top menu to start the file system setup process. 4. On the `Configure file system access` configuration page, perform the following actions: - Choose an appropriate VPC from the VPC dropdown list. - Within the `Create mount targets` section, check the boxes for all of the Availability Zones (AZs) within the selected VPC. These will be your mount targets. - Click `Next step` to continue. 5. Perform the following on the `Configure optional settings` page: - Create `tags` to describe your new file system. - Choose `performance mode` based on your requirements. - Check the `Enable encryption` box and choose `aws/elasticfilesystem` from the `Select KMS master key` dropdown list to enable encryption for the new file system, using the default master key provided and managed by AWS KMS. - Click `Next step` to continue. 6. Review the file system configuration details on the `review and create` page and then click `Create File System` to create your new AWS EFS file system. 7. Copy the data from the old unencrypted EFS file system onto the newly created encrypted file system. 8. Remove the unencrypted file system as soon as your data migration to the newly created encrypted file system is completed. 9. Change the AWS region from the navigation bar and repeat the entire process for the other AWS regions. **From CLI:** 1. Run the `describe-file-systems` command to view the configuration information for the selected unencrypted file system identified in the Audit steps: ``` aws efs describe-file-systems --region --file-system-id ``` 2. The command output should return the configuration information. 3. To provision a new AWS EFS file system, you need to generate a universally unique identifier (UUID) to create the token required by the `create-file-system` command. To create the required token, you can use a randomly generated UUID from https://www.uuidgenerator.net. 4. Run the `create-file-system` command using the unique token created at the previous step: ``` aws efs create-file-system --region --creation-token --performance-mode generalPurpose --encrypted ``` 5. The command output should return the new file system configuration metadata. 6. Run the `create-mount-target` command using the EFS file system ID returned from step 4 as the identifier and the ID of the Availability Zone (AZ) that will represent the mount target: ``` aws efs create-mount-target --region --file-system-id --subnet-id ``` 7. The command output should return the new mount target metadata. 8. Now you can mount your file system from an EC2 instance. 9. Copy the data from the old unencrypted EFS file system to the newly created encrypted file system. 10. Remove the unencrypted file system as soon as your data migration to the newly created encrypted file system is completed: ``` aws efs delete-file-system --region --file-system-id ``` 11. Change the AWS region by updating the --region and repeat the entire process for the other AWS regions.", + "AuditProcedure": "**From Console:** 1. Login to the AWS Management Console and Navigate to the Elastic File System (EFS) dashboard. 2. Select `File Systems` from the left navigation panel. 3. Each item on the list has a visible Encrypted field that displays data at rest encryption status. 4. Validate that this field reads `Encrypted` for all EFS file systems in all AWS regions. **From CLI:** 1. Run the `describe-file-systems` command using custom query filters to list the identifiers of all AWS EFS file systems currently available within the selected region: ``` aws efs describe-file-systems --region --output table --query 'FileSystems[*].FileSystemId' ``` 2. The command output should return a table with the requested file system IDs. 3. Run the `describe-file-systems` command using the ID of the file system that you want to examine as `file-system-id` and the necessary query filters: ``` aws efs describe-file-systems --region --file-system-id --query 'FileSystems[*].Encrypted' ``` 4. The command output should return the file system encryption status as `true` or `false`. If the returned value is `false`, the selected AWS EFS file system is not encrypted and if the returned value is `true`, the selected AWS EFS file system is encrypted.", + "AdditionalInformation": "", + "References": "https://docs.aws.amazon.com/efs/latest/ug/encryption-at-rest.html:https://awscli.amazonaws.com/v2/documentation/api/latest/reference/efs/index.html#efs", + "DefaultValue": "EFS file system data is encrypted at rest by default when creating a file system through the Console. However, encryption at rest is not enabled by default when creating a new file system using the AWS CLI, API, or SDKs." + } + ] + }, + { + "Id": "3.1", + "Description": "Ensure CloudTrail is enabled in all regions", + "Checks": [ + "cloudtrail_multi_region_enabled" + ], + "Attributes": [ + { + "Section": "3 Logging", + "Profile": "Level 1", + "AssessmentStatus": "Manual", + "Description": "AWS CloudTrail is a web service that records AWS API calls for your account and delivers log files to you. The recorded information includes the identity of the API caller, the time of the API call, the source IP address of the API caller, the request parameters, and the response elements returned by the AWS service. CloudTrail provides a history of AWS API calls for an account, including API calls made via the Management Console, SDKs, command line tools, and higher-level AWS services (such as CloudFormation).", + "RationaleStatement": "The AWS API call history produced by CloudTrail enables security analysis, resource change tracking, and compliance auditing. Additionally, - ensuring that a multi-region trail exists will help detect unexpected activity occurring in otherwise unused regions - ensuring that a multi-region trail exists will ensure that `Global Service Logging` is enabled for a trail by default to capture recordings of events generated on AWS global services - for a multi-region trail, ensuring that management events are configured for all types of Read/Writes ensures the recording of management operations that are performed on all resources in an AWS account", + "ImpactStatement": "S3 lifecycle features can be used to manage the accumulation and management of logs over time. See the following AWS resource for more information on these features: 1. https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html", + "RemediationProcedure": "Perform the following to enable global (Multi-region) CloudTrail logging: **From Console:** 1. Sign in to the AWS Management Console and open the IAM console at [https://console.aws.amazon.com/cloudtrail](https://console.aws.amazon.com/cloudtrail). 2. Click on `Trails` in the left navigation pane. 3. Click `Get Started Now` if it is presented, then: - Click `Add new trail`. - Enter a trail name in the `Trail name` box. - A trail created in the console is a multi-region trail by default. - Specify an S3 bucket name in the `S3 bucket` box. - Specify the AWS KMS alias under the `Log file SSE-KMS encryption` section, or create a new key. - Click `Next`. 4. Ensure the `Management events` check box is selected. 5. Ensure both `Read` and `Write` are checked under API activity. 6. Click `Next`. 7. Review your trail settings and click `Create trail`. **From Command Line:** Create a multi-region trail: ``` aws cloudtrail create-trail --name --bucket-name --is-multi-region-trail ``` Enable multi-region on an existing trail: ``` aws cloudtrail update-trail --name --is-multi-region-trail ``` **Note:** Creating a CloudTrail trail via the CLI without providing any overriding options configures all `read` and `write` `Management Events` to be logged by default.", + "AuditProcedure": "Perform the following to determine if CloudTrail is enabled for all regions: **From Console:** 1. Sign in to the AWS Management Console and open the CloudTrail console at [https://console.aws.amazon.com/cloudtrail](https://console.aws.amazon.com/cloudtrail) 2. Click on `Trails` in the left navigation pane - You will be presented with a list of trails across all regions 3. Ensure that at least one Trail has `Yes` specified in the `Multi-region trail` column 4. Click on a trail via the link in the `Name` column 5. Ensure `Logging` is set to `ON` 6. Ensure `Multi-region trail` is set to `Yes` 7. In the section `Management Events`, ensure that `API activity` set to `ALL` **From Command Line:** 1. List all trails: ``` aws cloudtrail describe-trails ``` 2. Ensure `IsMultiRegionTrail` is set to `true`: ``` aws cloudtrail get-trail-status --name ``` 3. Ensure `IsLogging` is set to `true`: ``` aws cloudtrail get-event-selectors --trail-name ``` 4. Ensure there is at least one `fieldSelector` for a trail that equals `Management`: - This should NOT output any results for Field: readOnly. If either `true` or `false` is returned, one of the checkboxes (`read` or `write`) is not selected. Example of correct output: ``` TrailARN: , AdvancedEventSelectors: [ { Name: Management events selector, FieldSelectors: [ { Field: eventCategory, Equals: [ Management ] ```", + "AdditionalInformation": "", + "References": "https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html#cloudtrail-concepts-management-events:https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html?icmpid=docs_cloudtrail_console#logging-management-events:https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-supported-services.html#cloud-trail-supported-services-data-events", + "DefaultValue": "Not Enabled" + } + ] + }, + { + "Id": "3.2", + "Description": "Ensure CloudTrail log file validation is enabled", + "Checks": [ + "cloudtrail_log_file_validation_enabled" + ], + "Attributes": [ + { + "Section": "3 Logging", + "Profile": "Level 2", + "AssessmentStatus": "Automated", + "Description": "CloudTrail log file validation creates a digitally signed digest file containing a hash of each log that CloudTrail writes to S3. These digest files can be used to determine whether a log file was changed, deleted, or remained unchanged after CloudTrail delivered the log. It is recommended that file validation be enabled for all CloudTrails.", + "RationaleStatement": "Enabling log file validation will provide additional integrity checks for CloudTrail logs.", + "ImpactStatement": "", + "RemediationProcedure": "Perform the following to enable log file validation on a given trail: **From Console:** 1. Sign in to the AWS Management Console and open the IAM console at [https://console.aws.amazon.com/cloudtrail](https://console.aws.amazon.com/cloudtrail). 2. Click on `Trails` in the left navigation pane. 3. Click on the target trail. 4. Within the `General details` section, click `edit`. 5. Under `Advanced settings`, check the `enable` box under `Log file validation`. 6. Click `Save changes`. **From Command Line:** Enable log file validation on a trail: ``` aws cloudtrail update-trail --name --enable-log-file-validation ``` Note that periodic validation of logs using these digests can be carried out by running the following command: ``` aws cloudtrail validate-logs --trail-arn --start-time --end-time ```", + "AuditProcedure": "Perform the following on each trail to determine if log file validation is enabled: **From Console:** 1. Sign in to the AWS Management Console and open the IAM console at [https://console.aws.amazon.com/cloudtrail](https://console.aws.amazon.com/cloudtrail). 2. Click on `Trails` in the left navigation pane. 3. For every trail: - Click on a trail via the link in the `Name` column. - Under the `General details` section, ensure `Log file validation` is set to `Enabled`. **From Command Line:** List all trails: ``` aws cloudtrail describe-trails ``` Ensure `LogFileValidationEnabled` is set to `true` for each trail.", + "AdditionalInformation": "", + "References": "https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-log-file-validation-enabling.html", + "DefaultValue": "Not Enabled" + } + ] + }, + { + "Id": "3.3", + "Description": "Ensure AWS Config is enabled in all regions", + "Checks": [ + "config_recorder_all_regions_enabled" + ], + "Attributes": [ + { + "Section": "3 Logging", + "Profile": "Level 2", + "AssessmentStatus": "Automated", + "Description": "AWS Config is a web service that performs configuration management of supported AWS resources within your account and delivers log files to you. The recorded information includes the configuration items (AWS resources), relationships between configuration items (AWS resources), and any configuration changes between resources. It is recommended that AWS Config be enabled in all regions.", + "RationaleStatement": "The AWS configuration item history captured by AWS Config enables security analysis, resource change tracking, and compliance auditing.", + "ImpactStatement": "Enabling AWS Config in all regions provides comprehensive visibility into resource configurations, enhancing security and compliance monitoring. However, this may incur additional costs and require proper configuration management.", + "RemediationProcedure": "To implement AWS Config configuration: **From Console:** 1. Select the region you want to focus on in the top right of the console. 2. Click `Services`. 3. Click `Config`. 4. If a Config Recorder is enabled in this region, navigate to the Settings page from the navigation menu on the left-hand side. If a Config Recorder is not yet enabled in this region, select Get Started. 5. Select Record all resources supported in this region. 6. Choose to include global resources (IAM resources). 7. Specify an S3 bucket in the same account or in another managed AWS account. 8. Create an SNS Topic from the same AWS account or another managed AWS account. **From Command Line:** 1. Ensure there is an appropriate S3 bucket, SNS topic, and IAM role per the [AWS Config Service prerequisites](http://docs.aws.amazon.com/config/latest/developerguide/gs-cli-prereq.html). 2. Run this command to create a new configuration recorder: ``` aws configservice put-configuration-recorder --configuration-recorder name=,roleARN=arn:aws:iam:::role/ --recording-group allSupported=true,includeGlobalResourceTypes=true ``` 3. Create a delivery channel configuration file locally which specifies the channel attributes, populated from the prerequisites set up previously: ``` { name: , s3BucketName: , snsTopicARN: arn:aws:sns:::, configSnapshotDeliveryProperties: { deliveryFrequency: Twelve_Hours } } ``` 4. Run this command to create a new delivery channel, referencing the json configuration file made in the previous step: ``` aws configservice put-delivery-channel --delivery-channel file://.json ``` 5. Start the configuration recorder by running the following command: ``` aws configservice start-configuration-recorder --configuration-recorder-name ```", + "AuditProcedure": "Process to evaluate AWS Config configuration per region: **From Console:** 1. Sign in to the AWS Management Console and open the AWS Config console at [https://console.aws.amazon.com/config/](https://console.aws.amazon.com/config/). 1. On the top right of the console select the target region. 1. If a Config Recorder is enabled in this region, you should navigate to the Settings page from the navigation menu on the left-hand side. If a Config Recorder is not yet enabled in this region, proceed to the remediation steps. 1. Ensure Record all resources supported in this region is checked. 1. Ensure Include global resources (e.g., AWS IAM resources) is checked, unless it is enabled in another region (this is only required in one region). 1. Ensure the correct S3 bucket has been defined. 1. Ensure the correct SNS topic has been defined. 1. Repeat steps 2 to 7 for each region. **From Command Line:** 1. Run this command to show all AWS Config Recorders and their properties: ``` aws configservice describe-configuration-recorders ``` 2. Evaluate the output to ensure that all recorders have a `recordingGroup` object which includes `allSupported: true`. Additionally, ensure that at least one recorder has `includeGlobalResourceTypes: true`. **Note:** There is one more parameter, ResourceTypes, in the recordingGroup object. We don't need to check it, as whenever we set allSupported to true, AWS enforces the resource types to be empty (ResourceTypes: []). Sample output: ``` { ConfigurationRecorders: [ { recordingGroup: { allSupported: true, resourceTypes: [], includeGlobalResourceTypes: true }, roleARN: arn:aws:iam:::role/service-role/, name: default } ] } ``` 3. Run this command to show the status for all AWS Config Recorders: ``` aws configservice describe-configuration-recorder-status ``` 4. In the output, find recorders with `name` key matching the recorders that were evaluated in step 2. Ensure that they include `recording: true` and `lastStatus: SUCCESS`.", + "AdditionalInformation": "", + "References": "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/configservice/describe-configuration-recorder-status.html:https://awscli.amazonaws.com/v2/documentation/api/latest/reference/configservice/describe-configuration-recorders.html:https://docs.aws.amazon.com/config/latest/developerguide/gs-cli-prereq.html", + "DefaultValue": "" + } + ] + }, + { + "Id": "3.4", + "Description": "Ensure that server access logging is enabled on the CloudTrail S3 bucket", + "Checks": [ + "cloudtrail_logs_s3_bucket_access_logging_enabled" + ], + "Attributes": [ + { + "Section": "3 Logging", + "Profile": "Level 1", + "AssessmentStatus": "Manual", + "Description": "Server access logging generates a log that contains access records for each request made to your S3 bucket. An access log record contains details about the request, such as the request type, the resources specified in the request worked, and the time and date the request was processed. It is recommended that server access logging be enabled on the CloudTrail S3 bucket.", + "RationaleStatement": "By enabling server access logging on target S3 buckets, it is possible to capture all events that may affect objects within any target bucket. Configuring the logs to be placed in a separate bucket allows access to log information that can be useful in security and incident response workflows.", + "ImpactStatement": "", + "RemediationProcedure": "Perform the following to enable server access logging: **From Console:** 1. Sign in to the AWS Management Console and open the S3 console at [https://console.aws.amazon.com/s3](https://console.aws.amazon.com/s3). 2. Under `All Buckets` click on the target S3 bucket. 3. Click on `Properties` in the top right of the console. 4. Under `Bucket: `, click `Logging`. 5. Configure bucket logging: - Check the `Enabled` box. - Select a Target Bucket from the list. - Enter a Target Prefix. 6. Click `Save`. **From Command Line:** 1. Get the name of the S3 bucket that CloudTrail is logging to: ``` aws cloudtrail describe-trails --region --query trailList[*].S3BucketName ``` 2. Copy and add the target bucket name at ``, the prefix for the log file at ``, and optionally add an email address in the following template, then save it as `.json`: ``` { LoggingEnabled: { TargetBucket: , TargetPrefix: , TargetGrants: [ { Grantee: { Type: AmazonCustomerByEmail, EmailAddress: }, Permission: FULL_CONTROL } ] } } ``` 3. Run the `put-bucket-logging` command with bucket name and `.json` as input; for more information, refer to [put-bucket-logging](https://docs.aws.amazon.com/cli/latest/reference/s3api/put-bucket-logging.html): ``` aws s3api put-bucket-logging --bucket --bucket-logging-status file://.json ```", + "AuditProcedure": "Perform the following ensure that the CloudTrail S3 bucket has access logging is enabled: **From Console:** 1. Go to the Amazon CloudTrail console at [https://console.aws.amazon.com/cloudtrail/home](https://console.aws.amazon.com/cloudtrail/home). 2. In the API activity history pane on the left, click `Trails`. 3. In the Trails pane, note the bucket names in the S3 bucket column. 4. Sign in to the AWS Management Console and open the S3 console at [https://console.aws.amazon.com/s3](https://console.aws.amazon.com/s3). 5. Under `All Buckets` click on a target S3 bucket. 6. Click on `Properties` in the top right of the console. 7. Under `Bucket: `, click `Logging`. 8. Ensure `Enabled` is checked. **From Command Line:** 1. Get the name of the S3 bucket that CloudTrail is logging to: ``` aws cloudtrail describe-trails --query 'trailList[*].S3BucketName' ``` 2. Ensure logging is enabled on the bucket: ``` aws s3api get-bucket-logging --bucket ``` Ensure the command does not return an empty output. Sample output for a bucket with logging enabled: ``` { LoggingEnabled: { TargetPrefix: , TargetBucket: } } ```", + "AdditionalInformation": "", + "References": "https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerLogs.html:https://docs.aws.amazon.com/AmazonS3/latest/userguide/enable-server-access-logging.html", + "DefaultValue": "Logging is disabled." + } + ] + }, + { + "Id": "3.5", + "Description": "Ensure CloudTrail logs are encrypted at rest using KMS CMKs", + "Checks": [ + "cloudtrail_kms_encryption_enabled" + ], + "Attributes": [ + { + "Section": "3 Logging", + "Profile": "Level 2", + "AssessmentStatus": "Automated", + "Description": "AWS CloudTrail is a web service that records AWS API calls for an account and makes those logs available to users and resources in accordance with IAM policies. AWS Key Management Service (KMS) is a managed service that helps create and control the encryption keys used to encrypt account data, and uses Hardware Security Modules (HSMs) to protect the security of encryption keys. CloudTrail logs can be configured to leverage server side encryption (SSE) and KMS customer-created master keys (CMK) to further protect CloudTrail logs. It is recommended that CloudTrail be configured to use SSE-KMS.", + "RationaleStatement": "Configuring CloudTrail to use SSE-KMS provides additional confidentiality controls on log data, as a given user must have S3 read permission on the corresponding log bucket and must be granted decrypt permission by the CMK policy.", + "ImpactStatement": "Customer-created keys incur an additional cost. See https://aws.amazon.com/kms/pricing/ for more information.", + "RemediationProcedure": "Perform the following to configure CloudTrail to use SSE-KMS: **From Console:** 1. Sign in to the AWS Management Console and open the CloudTrail console at [https://console.aws.amazon.com/cloudtrail](https://console.aws.amazon.com/cloudtrail). 2. In the left navigation pane, choose `Trails`. 3. Click on a trail. 4. Under the `S3` section, click the edit button (pencil icon). 5. Click `Advanced`. 6. Select an existing CMK from the `KMS key Id` drop-down menu. - **Note:** Ensure the CMK is located in the same region as the S3 bucket. - **Note:** You will need to apply a KMS key policy on the selected CMK in order for CloudTrail, as a service, to encrypt and decrypt log files using the CMK provided. View the AWS documentation for [editing the selected CMK Key policy](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/create-kms-key-policy-for-cloudtrail.html). 7. Click `Save`. 8. You will see a notification message stating that you need to have decryption permissions on the specified KMS key to decrypt log files. 9. Click `Yes`. **From Command Line:** Run the following command to specify a KMS key ID to use with a trail: ``` aws cloudtrail update-trail --name --kms-id ``` Run the following command to attach a key policy to a specified KMS key: ``` aws kms put-key-policy --key-id --policy ```", + "AuditProcedure": "Perform the following to determine if CloudTrail is configured to use SSE-KMS: **From Console:** 1. Sign in to the AWS Management Console and open the CloudTrail console at [https://console.aws.amazon.com/cloudtrail](https://console.aws.amazon.com/cloudtrail). 2. In the left navigation pane, choose `Trails`. 3. Select a trail. 4. In the `General details` section, select `Edit` to edit the trail configuration. 5. Ensure the box at `Log file SSE-KMS encryption` is checked and that a valid `AWS KMS alias` of a KMS key is entered in the respective text box. **From Command Line:** 1. Run the following command: ``` aws cloudtrail describe-trails ``` 2. For each trail listed, SSE-KMS is enabled if the trail has a `KmsKeyId` property defined.", + "AdditionalInformation": "Three statements that need to be added to the CMK policy: 1\\. Enable CloudTrail to describe CMK properties: ```

{  Sid: Allow CloudTrail access,  Effect: Allow,  Principal: {  Service: cloudtrail.amazonaws.com  },  Action: kms:DescribeKey,  Resource: * } ``` 2\\. Granting encrypt permissions: ``` 
{  Sid: Allow CloudTrail to encrypt logs,  Effect: Allow,  Principal: {  Service: cloudtrail.amazonaws.com  },  Action: kms:GenerateDataKey*,  Resource: *,  Condition: {  StringLike: {  kms:EncryptionContext:aws:cloudtrail:arn: [  arn:aws:cloudtrail:*:aws-account-id:trail/*  ]  }  } } ``` 3\\. Granting decrypt permissions: ``` 
{  Sid: Enable CloudTrail log decrypt permissions,  Effect: Allow,  Principal: {  AWS: arn:aws:iam::aws-account-id:user/username  },  Action: kms:Decrypt,  Resource: *,  Condition: {  Null: {  kms:EncryptionContext:aws:cloudtrail:arn: false  }  } } ```",
+          "References": "https://docs.aws.amazon.com/awscloudtrail/latest/userguide/encrypting-cloudtrail-log-files-with-aws-kms.html:https://docs.aws.amazon.com/kms/latest/developerguide/create-keys.html:https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudtrail/update-trail.html:https://awscli.amazonaws.com/v2/documentation/api/latest/reference/kms/put-key-policy.html",
+          "DefaultValue": ""
+        }
+      ]
+    },
+    {
+      "Id": "3.6",
+      "Description": "Ensure rotation for customer-created symmetric CMKs is enabled",
+      "Checks": [
+        "kms_cmk_rotation_enabled"
+      ],
+      "Attributes": [
+        {
+          "Section": "3 Logging",
+          "Profile": "Level 2",
+          "AssessmentStatus": "Automated",
+          "Description": "AWS Key Management Service (KMS) allows customers to rotate the backing key, which is key material stored within the KMS that is tied to the key ID of the customer-created customer master key (CMK). The backing key is used to perform cryptographic operations such as encryption and decryption. Automated key rotation currently retains all prior backing keys so that decryption of encrypted data can occur transparently. It is recommended that CMK key rotation be enabled for symmetric keys. Key rotation cannot be enabled for any asymmetric CMK.",
+          "RationaleStatement": "Rotating encryption keys helps reduce the potential impact of a compromised key, as data encrypted with a new key cannot be accessed with a previous key that may have been exposed. Keys should be rotated every year or upon an event that could result in the compromise of that key.",
+          "ImpactStatement": "Creation, management, and storage of CMKs may require additional time from an administrator.",
+          "RemediationProcedure": "**From Console:** 1. Sign in to the AWS Management Console and open the KMS console at: [https://console.aws.amazon.com/kms](https://console.aws.amazon.com/kms). 2. In the left navigation pane, click `Customer-managed keys`. 3. Select a key with `Key spec = SYMMETRIC_DEFAULT` that does not have automatic rotation enabled. 4. Select the `Key rotation` tab. 5. Check the `Automatically rotate this KMS key every year` box. 6. Click `Save`. 7. Repeat steps 3โ€“6 for all customer-managed CMKs that do not have automatic rotation enabled. **From Command Line:** 1. Run the following command to enable key rotation: ```  aws kms enable-key-rotation --key-id  ```",
+          "AuditProcedure": "**From Console:** 1. Sign in to the AWS Management Console and open the KMS console at: [https://console.aws.amazon.com/kms](https://console.aws.amazon.com/kms). 2. In the left navigation pane, click `Customer-managed keys`. 3. Select a customer-managed CMK where `Key spec = SYMMETRIC_DEFAULT`. 4. Select the `Key rotation` tab. 5. Ensure the `Automatically rotate this KMS key every year` box is checked. 6. Repeat steps 3โ€“5 for all customer-managed CMKs where `Key spec = SYMMETRIC_DEFAULT`. **From Command Line:** 1. Run the following command to get a list of all keys and their associated `KeyIds`: ```  aws kms list-keys ``` 2. For each key, note the KeyId and run the following command: ``` describe-key --key-id  ``` 3. If the response contains `KeySpec = SYMMETRIC_DEFAULT`, run the following command: ```  aws kms get-key-rotation-status --key-id  ``` 4. Ensure `KeyRotationEnabled` is set to `true`. 5. Repeat steps 2โ€“4 for all remaining CMKs.",
+          "AdditionalInformation": "",
+          "References": "https://aws.amazon.com/kms/pricing/:https://csrc.nist.gov/publications/detail/sp/800-57-part-1/rev-5/final",
+          "DefaultValue": ""
+        }
+      ]
+    },
+    {
+      "Id": "3.7",
+      "Description": "Ensure VPC flow logging is enabled in all VPCs",
+      "Checks": [
+        "vpc_flow_logs_enabled"
+      ],
+      "Attributes": [
+        {
+          "Section": "3 Logging",
+          "Profile": "Level 2",
+          "AssessmentStatus": "Automated",
+          "Description": "VPC Flow Logs is a feature that enables you to capture information about the IP traffic going to and from network interfaces in your VPC. After you've created a flow log, you can view and retrieve its data in Amazon CloudWatch Logs. It is recommended that VPC Flow Logs be enabled for packet Rejects for VPCs.",
+          "RationaleStatement": "VPC Flow Logs provide visibility into network traffic that traverses the VPC and can be used to detect anomalous traffic or gain insights during security workflows.",
+          "ImpactStatement": "By default, CloudWatch Logs will store logs indefinitely unless a specific retention period is defined for the log group. When choosing the number of days to retain, keep in mind that the average time it takes for an organization to realize they have been breached is 210 days (at the time of this writing). Since additional time is required to research a breach, a minimum retention policy of 365 days allows for detection and investigation. You may also wish to archive the logs to a cheaper storage service rather than simply deleting them. See the following AWS resource to manage CloudWatch Logs retention periods: 1. https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/SettingLogRetention.html",
+          "RemediationProcedure": "Perform the following to enable VPC Flow Logs: **From Console:** 1. Sign into the management console. 2. Select `Services`, then select `VPC`. 3. In the left navigation pane, select `Your VPCs`. 4. Select a VPC. 5. In the right pane, select the `Flow Logs` tab. 6. If no Flow Log exists, click `Create Flow Log`. 7. For Filter, select `Reject`. 8. Enter a `Role` and `Destination Log Group`. 9. Click `Create Log Flow`. 10. Click on `CloudWatch Logs Group`. **Note:** Setting the filter to Reject will dramatically reduce the accumulation of logging data for this recommendation and provide sufficient information for the purposes of breach detection, research, and remediation. However, during periods of least privilege security group engineering, setting the filter to All can be very helpful in discovering existing traffic flows required for the proper operation of an already running environment. **From Command Line:** 1. Create a policy document, name it `role_policy_document.json`, and paste the following content: ``` {  Version: 2012-10-17,  Statement: [  {  Sid: test,  Effect: Allow,  Principal: {  Service: ec2.amazonaws.com  },  Action: sts:AssumeRole  }  ] } ``` 2. Create another policy document, name it `iam_policy.json`, and paste the following content: ``` {  Version: 2012-10-17,  Statement: [  {  Effect: Allow,  Action:[  logs:CreateLogGroup,  logs:CreateLogStream,  logs:DescribeLogGroups,  logs:DescribeLogStreams,  logs:PutLogEvents,  logs:GetLogEvents,  logs:FilterLogEvents  ],  Resource: *  }  ] } ``` 3. Run the following command to create an IAM role: ``` aws iam create-role --role-name  --assume-role-policy-document file://role_policy_document.json  ``` 4. Run the following command to create an IAM policy: ``` aws iam create-policy --policy-name  --policy-document file://iam-policy.json ``` 5. Run the `attach-group-policy` command, using the IAM policy ARN returned from the previous step to attach the policy to the IAM role: ``` aws iam attach-group-policy --policy-arn arn:aws:iam:::policy/ --group-name  ``` - If the command succeeds, no output is returned. 6. Run the `describe-vpcs` command to get a list of VPCs in the selected region: ``` aws ec2 describe-vpcs --region  ``` - The command output should return a list of VPCs in the selected region. 7. Run the `create-flow-logs` command to create a flow log for a VPC: ``` aws ec2 create-flow-logs --resource-type VPC --resource-ids  --traffic-type REJECT --log-group-name  --deliver-logs-permission-arn  ``` 8. Repeat step 7 for other VPCs in the selected region. 9. Change the region by updating --region, and repeat the remediation procedure for each region.",
+          "AuditProcedure": "Perform the following to determine if VPC Flow logs are enabled: **From Console:** 1. Sign into the management console. 2. Select `Services`, then select `VPC`. 3. In the left navigation pane, select `Your VPCs`. 4. Select a VPC. 5. In the right pane, select the `Flow Logs` tab. 6. Ensure a Log Flow exists that has `Active` in the `Status` column. **From Command Line:** 1. Run the `describe-vpcs` command (OSX/Linux/UNIX) to list the VPC networks available in the current AWS region: ``` aws ec2 describe-vpcs --region  --query Vpcs[].VpcId ``` 2. The command output returns the `VpcId` of VPCs available in the selected region. 3. Run the `describe-flow-logs` command (OSX/Linux/UNIX) using the VPC ID to determine if the selected virtual network has the Flow Logs feature enabled: ``` aws ec2 describe-flow-logs --filter Name=resource-id,Values= ``` - If there are no Flow Logs created for the selected VPC, the command output will return an empty list `[]`. 4. Repeat step 3 for other VPCs in the same region. 5. Change the region by updating `--region`, and repeat steps 1-4 for each region.",
+          "AdditionalInformation": "",
+          "References": "https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/flow-logs.html",
+          "DefaultValue": ""
+        }
+      ]
+    },
+    {
+      "Id": "3.8",
+      "Description": "Ensure that object-level logging for write events is enabled for S3 buckets",
+      "Checks": [
+        "cloudtrail_s3_dataevents_write_enabled"
+      ],
+      "Attributes": [
+        {
+          "Section": "3 Logging",
+          "Profile": "Level 2",
+          "AssessmentStatus": "Automated",
+          "Description": "S3 object-level API operations, such as GetObject, DeleteObject, and PutObject, are referred to as data events. By default, CloudTrail trails do not log data events, so it is recommended to enable object-level logging for S3 buckets.",
+          "RationaleStatement": "Enabling object-level logging will help you meet data compliance requirements within your organization, perform comprehensive security analyses, monitor specific patterns of user behavior in your AWS account, or take immediate actions on any object-level API activity within your S3 buckets using Amazon CloudWatch Events.",
+          "ImpactStatement": "Enabling logging for these object-level events may significantly increase the number of events logged and may incur additional costs.",
+          "RemediationProcedure": "**From Console:** 1. Login to the AWS Management Console and navigate to the S3 dashboard at `https://console.aws.amazon.com/s3/`. 2. In the left navigation panel, click `buckets`, and then click the name of the S3 bucket you want to examine. 3. Click the `Properties` tab to see the bucket configuration in detail. 4. In the `AWS CloudTrail data events` section, select the trail name for recording activity. You can choose an existing trail or create a new one by clicking the `Configure in CloudTrail` button or navigating to the [CloudTrail console](https://console.aws.amazon.com/cloudtrail/). 5. Once the trail is selected, select the `Data Events` check box. 6. Select `S3` from the `Data event type` drop-down. 7. Select `Log all events` from the `Log selector template` drop-down. 8. Repeat steps 2-7 to enable object-level logging of write events for other S3 buckets. **From Command Line:** 1. To enable `object-level` data events logging for S3 buckets within your AWS account, run the `put-event-selectors` command using the name of the trail that you want to reconfigure as identifier: ``` aws cloudtrail put-event-selectors --region  --trail-name  --event-selectors '[{ ReadWriteType: WriteOnly, IncludeManagementEvents:true, DataResources: [{ Type: AWS::S3::Object, Values: [arn:aws:s3:::/] }] }]' ``` 2. The command output will be `object-level` event trail configuration. 3. If you want to enable it for all buckets at once, change the Values parameter to `[arn:aws:s3]` in the previous command. 4. Repeat step 1 for each s3 bucket to update `object-level` logging of write events. 5. Change the AWS region by updating the `--region` command parameter, and perform the process for the other regions.",
+          "AuditProcedure": "**From Console:** 1. Login to the AWS Management Console and navigate to the CloudTrail dashboard at `https://console.aws.amazon.com/cloudtrail/`. 2. In the left panel, click `Trails`, and then click the name of the trail that you want to examine. 3. Review `General details`. 4. Confirm that `Multi-region trail` is set to `Yes`. 5. Scroll down to `Data events` and confirm the configuration: - If `advanced event selectors` is being used, it should read: ``` Data Events: S3 Log selector template Log all events ``` - If `basic event selectors` is being used, it should read: ``` Data events: S3 Bucket Name: All current and future S3 buckets Write: Enabled ``` 6. Repeat steps 2-5 to verify that each trail has multi-region enabled and is configured to log data events. If a trail does not have multi-region enabled and data event logging configured, refer to the remediation steps. **From Command Line:** 1. Run the `list-trails` command to list all trails: ``` aws cloudtrail list-trails ``` 2. The command output will be a list of trails: ``` TrailARN: arn:aws:cloudtrail:::trail/, Name: , HomeRegion:  ``` 3. Run the `get-trail` command to determine whether a trail is a multi-region trail: ``` aws cloudtrail get-trail --name  --region  ``` 4. The command output should include: `IsMultiRegionTrail: true`. 5. Run the `get-event-selectors` command, using the `Name` of the trail and the `region` returned in step 2, to determine if data event logging is configured: ``` aws cloudtrail get-event-selectors --region  --trail-name  --query EventSelectors[*].DataResources[] ``` 6. The command output should be an array that includes the S3 bucket defined for data event logging: ``` Type: AWS::S3::Object,  Values: [  arn:aws:s3 ``` 7. If the `get-event-selectors` command returns an empty array, data events are not included in the trail's logging configuration; therefore, object-level API operations performed on S3 buckets within your AWS account are not being recorded. 8. Repeat steps 1-7 to verify that each trail has multi-region enabled and is configured to log data events. If a trail does not have multi-region enabled and data event logging configured, refer to the remediation steps.",
+          "AdditionalInformation": "",
+          "References": "https://docs.aws.amazon.com/AmazonS3/latest/user-guide/enable-cloudtrail-events.html",
+          "DefaultValue": ""
+        }
+      ]
+    },
+    {
+      "Id": "3.9",
+      "Description": "Ensure that object-level logging for read events is enabled for S3 buckets",
+      "Checks": [
+        "cloudtrail_s3_dataevents_read_enabled"
+      ],
+      "Attributes": [
+        {
+          "Section": "3 Logging",
+          "Profile": "Level 2",
+          "AssessmentStatus": "Automated",
+          "Description": "S3 object-level API operations, such as GetObject, DeleteObject, and PutObject, are referred to as data events. By default, CloudTrail trails do not log data events, so it is recommended to enable object-level logging for S3 buckets.",
+          "RationaleStatement": "Enabling object-level logging will help you meet data compliance requirements within your organization, perform comprehensive security analyses, monitor specific patterns of user behavior in your AWS account, or take immediate actions on any object-level API activity within your S3 buckets using Amazon CloudWatch Events.",
+          "ImpactStatement": "Enabling logging for these object-level events may significantly increase the number of events logged and may incur additional costs.",
+          "RemediationProcedure": "**From Console:** 1. Login to the AWS Management Console and navigate to S3 dashboard at `https://console.aws.amazon.com/s3/`. 2. In the left navigation panel, click `buckets` and then click the name of the S3 bucket that you want to examine. 3. Click the `Properties` tab to see the bucket configuration in detail. 4. In the `AWS Cloud Trail data events` section, select the trail name for recording activity. You can choose an existing trail or create a new one by clicking the `Configure in CloudTrail` button or navigating to the [CloudTrail console](https://console.aws.amazon.com/cloudtrail/). 5. Once the trail is selected, select the `Data Events` check box. 6. Select `S3` from the `Data event type` drop-down. 7. Select `Log all events` from the `Log selector template` drop-down. 8. Repeat steps 2-7 to enable object-level logging of read events for other S3 buckets. **From Command Line:** 1. To enable `object-level` data events logging for S3 buckets within your AWS account, run the `put-event-selectors` command using the name of the trail that you want to reconfigure as identifier: ``` aws cloudtrail put-event-selectors --region  --trail-name  --event-selectors '[{ ReadWriteType: ReadOnly, IncludeManagementEvents:true, DataResources: [{ Type: AWS::S3::Object, Values: [arn:aws:s3:::/] }] }]' ``` 2. The command output will be `object-level` event trail configuration. 3. If you want to enable it for all buckets at once, change the Values parameter to `[arn:aws:s3]` in the previous command. 4. Repeat step 1 for each s3 bucket to update `object-level` logging of read events. 5. Change the AWS region by updating the `--region` command parameter, and perform the process for the other regions.",
+          "AuditProcedure": "**From Console:** 1. Login to the AWS Management Console and navigate to the CloudTrail dashboard at `https://console.aws.amazon.com/cloudtrail/`. 2. In the left panel, click `Trails`, and then click the name of the trail that you want to examine. 3. Review `General details`. 4. Confirm that `Multi-region trail` is set to `Yes` 5. Scroll down to `Data events` 5. Scroll down to `Data events` and confirm the configuration: - If `advanced event selectors` is being used, it should read: ``` Data Events: S3 Log selector template Log all events ``` - If `basic event selectors` is being used, it should read: ``` Data events: S3 Bucket Name: All current and future S3 buckets Read: Enabled ``` 6. Repeat steps 2-5 to verify that each trail has multi-region enabled and is configured to log data events. If a trail does not have multi-region enabled and data event logging configured, refer to the remediation steps. **From Command Line:** 1. Run the `describe-trails` command to list all trail names: ``` aws cloudtrail describe-trails --region  --output table --query trailList[*].Name ``` 2. The command output will be table of the trail names. 3. Run the `get-event-selectors` command using the name of a trail returned at the previous step and custom query filters to determine if data event logging is configured: ``` aws cloudtrail get-event-selectors --region  --trail-name  --query EventSelectors[*].DataResources[] ``` 4. The command output should be an array that includes the S3 bucket defined for data event logging. 5. If the `get-event-selectors` command returns an empty array, data events are not included in the trail's logging configuration; therefore, object-level API operations performed on S3 buckets within your AWS account are not being recorded. 6. Repeat steps 1-5 to verify the configuration of each trail. 7. Change the AWS region by updating the `--region` command parameter, and perform the audit process for other regions.",
+          "AdditionalInformation": "",
+          "References": "https://docs.aws.amazon.com/AmazonS3/latest/user-guide/enable-cloudtrail-events.html",
+          "DefaultValue": ""
+        }
+      ]
+    },
+    {
+      "Id": "4.1",
+      "Description": "Ensure unauthorized API calls are monitored",
+      "Checks": [
+        "cloudwatch_log_metric_filter_unauthorized_api_calls"
+      ],
+      "Attributes": [
+        {
+          "Section": "4 Monitoring",
+          "Profile": "Level 2",
+          "AssessmentStatus": "Manual",
+          "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms.  It is recommended that a metric filter and alarm be established for unauthorized API calls.",
+          "RationaleStatement": "CloudWatch is an AWS native service that allows you to observe and monitor resources and applications. CloudTrail logs can also be sent to an external Security Information and Event Management (SIEM) environment for monitoring and alerting. Monitoring unauthorized API calls will help reduce the time it takes to detect malicious activity and can alert you to potential security incidents.",
+          "ImpactStatement": "This alert may be triggered by normal read-only console activities that attempt to opportunistically gather optional information but gracefully fail if they lack the necessary permissions. If an excessive number of alerts are generated, then an organization may wish to consider adding read access to the limited IAM user permissions solely to reduce the number of alerts. In some cases, doing this may allow users to actually view some areas of the system; any additional access granted should be reviewed for alignment with the original limited IAM user intent.",
+          "RemediationProcedure": "If you are using CloudTrail trails and CloudWatch, perform the following steps to set up the metric filter, alarm, SNS topic, and subscription: 1. Create a metric filter based on the provided filter pattern that checks for unauthorized API calls and uses the `` taken from audit step 1:  ```  aws logs put-metric-filter --log-group-name  --filter-name  --metric-transformations metricName=unauthorized_api_calls_metric,metricNamespace=CISBenchmark,metricValue=1 --filter-pattern { ($.errorCode =*UnauthorizedOperation) || ($.errorCode =AccessDenied*) && ($.sourceIPAddress!=delivery.logs.amazonaws.com) && ($.eventName!=HeadBucket) }  ```  **Note**: You can choose your own `metricName` and `metricNamespace` strings. Using the same `metricNamespace` for all Foundations Benchmark metrics will group them together. 2. Create an SNS topic that the alarm will notify:  ```  aws sns create-topic --name   ```  **Note**: You can execute this command once and then reuse the same topic for all monitoring alarms.  **Note**: Capture the `TopicArn` that is displayed when creating the SNS topic in step 2. 3. Create an SNS subscription for the topic created in step 2:  ```  aws sns subscribe --topic-arn  --protocol  --notification-endpoint   ```  **Note**: You can execute this command once and then reuse the same subscription for all monitoring alarms. 4. Create an alarm that is associated with the CloudWatch Logs metric filter created in step 1 and the SNS topic created in step 2:  ```  aws cloudwatch put-metric-alarm --alarm-name unauthorized_api_calls_alarm --metric-name unauthorized_api_calls_metric --statistic Sum --period 300 --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold --evaluation-periods 1 --namespace CISBenchmark --alarm-actions   ```",
+          "AuditProcedure": "If you are using CloudTrail trails and CloudWatch, perform the following to ensure that there is at least one active multi-region CloudTrail trail with the prescribed metric filters and alarms configured: 1. Identify the log group name that is configured for use with the active multi-region CloudTrail trail: - List all CloudTrail trails: `aws cloudtrail describe-trails` - Identify multi-region CloudTrail trails: `Trails with IsMultiRegionTrail set to true` - Note the value associated with Name:`` - Note the `` within the value associated with CloudWatchLogsLogGroupArn  - Example: `arn:aws:logs:::log-group::*` - Ensure the identified multi-region CloudTrail trail is active:  - `aws cloudtrail get-trail-status --name `  - Ensure `IsLogging` is set to `TRUE` - Ensure the identified multi-region CloudTrail trail captures all management events:  - `aws cloudtrail get-event-selectors --trail-name `  - Ensure there is at least one `event selector` for a trail with `IncludeManagementEvents` set to `true` and `ReadWriteType` set to `All` 2. Get a list of all associated metric filters for the `` captured in step 1:  ```  aws logs describe-metric-filters --log-group-name   ``` 3. Ensure the output from the above command contains the following:  ```  filterPattern: { ($.errorCode =*UnauthorizedOperation) || ($.errorCode =AccessDenied*) && ($.sourceIPAddress!=delivery.logs.amazonaws.com) && ($.eventName!=HeadBucket) },  ``` 4. Note the `` value associated with the `filterPattern` from step 3. 5. Get a list of CloudWatch alarms, and filter on the `` captured in step 4:  ```  aws cloudwatch describe-alarms --query MetricAlarms[?MetricName == ]  ``` 6. Note the `AlarmActions` value; this will provide the SNS topic ARN value. 7. Ensure there is at least one active subscriber to the SNS topic:  ```  aws sns list-subscriptions-by-topic --topic-arn    ``` - At least one subscription should have SubscriptionArn with a valid AWS ARN.  - Example of valid SubscriptionArn: `arn:aws:sns::::`",
+          "AdditionalInformation": "Configuring a log metric filter and alarm on a multi-region (global) CloudTrail trail: - ensures that activities from all regions (both used and unused) are monitored - ensures that activities on all supported global services are monitored - ensures that all management events across all regions are monitored",
+          "References": "https://aws.amazon.com/sns/:https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html:https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudwatch-alarms-for-cloudtrail.html:https://docs.aws.amazon.com/sns/latest/dg/SubscribeTopic.html",
+          "DefaultValue": ""
+        }
+      ]
+    },
+    {
+      "Id": "4.2",
+      "Description": "Ensure management console sign-in without MFA is monitored",
+      "Checks": [
+        "cloudwatch_log_metric_filter_sign_in_without_mfa"
+      ],
+      "Attributes": [
+        {
+          "Section": "4 Monitoring",
+          "Profile": "Level 1",
+          "AssessmentStatus": "Manual",
+          "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms.  It is recommended that a metric filter and alarm be established for console logins that are not protected by multi-factor authentication (MFA).",
+          "RationaleStatement": "CloudWatch is an AWS native service that allows you to observe and monitor resources and applications. CloudTrail logs can also be sent to an external Security Information and Event Management (SIEM) environment for monitoring and alerting. Monitoring for single-factor console logins will increase visibility into accounts that are not protected by MFA. These type of accounts are more susceptible to compromise and unauthorized access.",
+          "ImpactStatement": "",
+          "RemediationProcedure": "If you are using CloudTrail trails and CloudWatch, perform the following steps to set up the metric filter, alarm, SNS topic, and subscription: 1. Create a metric filter based on the provided filter pattern that checks for AWS Management Console sign-ins without MFA and uses the `` taken from audit step 1.  ```  aws logs put-metric-filter --log-group-name  --filter-name `` --metric-transformations metricName= ``,metricNamespace='CISBenchmark',metricValue=1 --filter-pattern '{ ($.eventName = ConsoleLogin) && ($.additionalEventData.MFAUsed != Yes) }'  ```  Or, to reduce false positives in case Single Sign-On (SSO) is used in the organization:  ```  aws logs put-metric-filter --log-group-name  --filter-name `` --metric-transformations metricName= ``,metricNamespace='CISBenchmark',metricValue=1 --filter-pattern '{ ($.eventName = ConsoleLogin) && ($.additionalEventData.MFAUsed != Yes) && ($.userIdentity.type = IAMUser) && ($.responseElements.ConsoleLogin = Success) }'  ```  **Note**: You can choose your own `metricName` and `metricNamespace` strings. Using the same `metricNamespace` for all Foundations Benchmark metrics will group them together. 2. Create an SNS topic that the alarm will notify:  ```  aws sns create-topic --name   ```  **Note**: You can execute this command once and then reuse the same topic for all monitoring alarms.  **Note**: Capture the `TopicArn` that is displayed when creating the SNS topic in step 2. 3. Create an SNS subscription for the topic created in step 2:  ```  aws sns subscribe --topic-arn  --protocol  --notification-endpoint   ```  **Note**: You can execute this command once and then reuse the same subscription for all monitoring alarms. 4. Create an alarm that is associated with the CloudWatch Logs metric filter created in step 1 and the SNS topic created in step 2:  ```  aws cloudwatch put-metric-alarm --alarm-name `` --metric-name `` --statistic Sum --period 300 --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold --evaluation-periods 1 --namespace 'CISBenchmark' --alarm-actions   ```",
+          "AuditProcedure": "If you are using CloudTrail trails and CloudWatch, perform the following to ensure that there is at least one active multi-region CloudTrail trail with the prescribed metric filters and alarms configured: 1. Identify the log group name that is configured for use with the active multi-region CloudTrail trail: - List all CloudTrail trails:  ```  aws cloudtrail describe-trails  ``` - Identify multi-region CloudTrail trails: `Trails with IsMultiRegionTrail set to true` - Note the value associated with Name:`` - Note the `` within the value associated with CloudWatchLogsLogGroupArn  - Example: `arn:aws:logs:::log-group::*` - Ensure the identified multi-region CloudTrail trail is active:  ```  aws cloudtrail get-trail-status --name   ```  - ensure `IsLogging` is set to `TRUE` - Ensure the identified multi-region CloudTrail trail captures all management events:  ```  aws cloudtrail get-event-selectors --trail-name   ```  - Ensure there is at least one `event selector` for a trail with `IncludeManagementEvents` set to `true` and `ReadWriteType` set to `All` 2. Get a list of all associated metric filters for the `` captured in step 1:  ```  aws logs describe-metric-filters --log-group-name   ``` 3. Ensure the output from the above command contains the following:  ```  filterPattern: { ($.eventName = ConsoleLogin) && ($.additionalEventData.MFAUsed != Yes) }  ```  Or, to reduce false positives in case Single Sign-On (SSO) is used in the organization:  ```  filterPattern: { ($.eventName = ConsoleLogin) && ($.additionalEventData.MFAUsed != Yes) && ($.userIdentity.type = IAMUser) && ($.responseElements.ConsoleLogin = Success) }  ``` 4. Note the `` value associated with the `filterPattern` from step 3. 5. Get a list of CloudWatch alarms, and filter on the `` captured in step 4.  ```  aws cloudwatch describe-alarms --query 'MetricAlarms[?MetricName== ]'  ``` 6. Note the `AlarmActions` value; this will provide the SNS topic ARN value. 7. Ensure there is at least one active subscriber to the SNS topic:  ```  aws sns list-subscriptions-by-topic --topic-arn    ``` - At least one subscription should have SubscriptionArn with a valid AWS ARN.  - Example of valid SubscriptionArn: `arn:aws:sns::::`",
+          "AdditionalInformation": "Configuring a log metric filter and alarm on a multi-region (global) CloudTrail trail: - ensures that activities from all regions (both used and unused) are monitored - ensures that activities on all supported global services are monitored - ensures that all management events across all regions are monitored Filter pattern set to `{ ($.eventName = ConsoleLogin) && ($.additionalEventData.MFAUsed != Yes) && ($.userIdentity.type = IAMUser) && ($.responseElements.ConsoleLogin = Success}`: - reduces false alarms raised when a user logs in via SSO",
+          "References": "https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/viewing_metrics_with_cloudwatch.html:https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html:https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudwatch-alarms-for-cloudtrail.html:https://docs.aws.amazon.com/sns/latest/dg/SubscribeTopic.html",
+          "DefaultValue": ""
+        }
+      ]
+    },
+    {
+      "Id": "4.3",
+      "Description": "Ensure usage of the 'root' account is monitored",
+      "Checks": [
+        "cloudwatch_log_metric_filter_root_usage"
+      ],
+      "Attributes": [
+        {
+          "Section": "4 Monitoring",
+          "Profile": "Level 1",
+          "AssessmentStatus": "Manual",
+          "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms.  It is recommended that a metric filter and alarm be established for 'root' login attempts to detect unauthorized use or attempts to use the root account.",
+          "RationaleStatement": "CloudWatch is an AWS native service that allows you to observe and monitor resources and applications. CloudTrail logs can also be sent to an external Security Information and Event Management (SIEM) environment for monitoring and alerting. Monitoring 'root' account logins will provide visibility into the use of a fully privileged account and the opportunity to reduce its usage.",
+          "ImpactStatement": "",
+          "RemediationProcedure": "If you are using CloudTrail trails and CloudWatch, perform the following steps to set up the metric filter, alarm, SNS topic, and subscription: 1. Create a metric filter based on the provided filter pattern that checks for 'root' account usage and uses the `` taken from audit step 1:  ```  aws logs put-metric-filter --log-group-name `` --filter-name `` --metric-transformations metricName= `` ,metricNamespace='CISBenchmark',metricValue=1 --filter-pattern '{ $.userIdentity.type = Root && $.userIdentity.invokedBy NOT EXISTS && $.eventType != AwsServiceEvent }'  ```  **Note**: You can choose your own `metricName` and `metricNamespace` strings. Using the same `metricNamespace` for all Foundations Benchmark metrics will group them together. 2. Create an SNS topic that the alarm will notify:  ```  aws sns create-topic --name   ```  **Note**: You can execute this command once and then reuse the same topic for all monitoring alarms.  **Note**: Capture the `TopicArn` that is displayed when creating the SNS topic in step 2. 3. Create an SNS subscription for the topic created in step 2:  ```  aws sns subscribe --topic-arn  --protocol  --notification-endpoint   ```  **Note**: You can execute this command once and then reuse the same subscription for all monitoring alarms. 4. Create an alarm that is associated with the CloudWatch Logs metric filter created in step 1 and the SNS topic created in step 2:  ```  aws cloudwatch put-metric-alarm --alarm-name `` --metric-name `` --statistic Sum --period 300 --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold --evaluation-periods 1 --namespace 'CISBenchmark' --alarm-actions   ```",
+          "AuditProcedure": "If you are using CloudTrail trails and CloudWatch, perform the following to ensure that there is at least one active multi-region CloudTrail trail with the prescribed metric filters and alarms configured: 1. Identify the log group name that is configured for use with the active multi-region CloudTrail trail: - List all CloudTrail trails:  ```  aws cloudtrail describe-trails  ``` - Identify multi-region CloudTrail trails: `Trails with IsMultiRegionTrail set to true` - Note the value associated with Name:`` - Note the `` within the value associated with CloudWatchLogsLogGroupArn  - Example: `arn:aws:logs:::log-group::*` - Ensure the identified multi-region CloudTrail trail is active:  ```  aws cloudtrail get-trail-status --name   ```  - Ensure `IsLogging` is set to `TRUE` - Ensure the identified multi-region CloudTrail trail captures all management events:  ```  aws cloudtrail get-event-selectors --trail-name   ```  - Ensure there is at least one `event selector` for a trail with `IncludeManagementEvents` set to `true` and `ReadWriteType` set to `All` 2. Get a list of all associated metric filters for the `` captured in step 1:  ```  aws logs describe-metric-filters --log-group-name   ``` 3. Ensure the output from the above command contains the following:  ```  filterPattern: { $.userIdentity.type = Root && $.userIdentity.invokedBy NOT EXISTS && $.eventType != AwsServiceEvent }  ``` 4. Note the `` value associated with the `filterPattern` from step 3. 5. Get a list of CloudWatch alarms, and filter on the `` captured in step 4:  ```  aws cloudwatch describe-alarms --query 'MetricAlarms[?MetricName==]'  ``` 6. Note the `AlarmActions` value; this will provide the SNS topic ARN value. 7. Ensure there is at least one active subscriber to the SNS topic:  ```  aws sns list-subscriptions-by-topic --topic-arn    ``` - At least one subscription should have SubscriptionArn with a valid AWS ARN.  - Example of valid SubscriptionArn: `arn:aws:sns::::`",
+          "AdditionalInformation": "Configuring a log metric filter and alarm on a multi-region (global) CloudTrail trail: - ensures that activities from all regions (both used and unused) are monitored - ensures that activities on all supported global services are monitored - ensures that all management events across all regions are monitored",
+          "References": "https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html:https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudwatch-alarms-for-cloudtrail.html:https://docs.aws.amazon.com/sns/latest/dg/SubscribeTopic.html",
+          "DefaultValue": ""
+        }
+      ]
+    },
+    {
+      "Id": "4.4",
+      "Description": "Ensure IAM policy changes are monitored",
+      "Checks": [
+        "cloudwatch_log_metric_filter_policy_changes"
+      ],
+      "Attributes": [
+        {
+          "Section": "4 Monitoring",
+          "Profile": "Level 1",
+          "AssessmentStatus": "Manual",
+          "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established for changes made to Identity and Access Management (IAM) policies.",
+          "RationaleStatement": "CloudWatch is an AWS native service that allows you to observe and monitor resources and applications. CloudTrail logs can also be sent to an external Security Information and Event Management (SIEM) environment for monitoring and alerting. Monitoring changes to IAM policies will help ensure authentication and authorization controls remain intact.",
+          "ImpactStatement": "Monitoring these changes may result in a number of false positives, especially in larger environments. This alert may require more tuning than others to eliminate some of those erroneous notifications.",
+          "RemediationProcedure": "If you are using CloudTrail trails and CloudWatch, perform the following steps to set up the metric filter, alarm, SNS topic, and subscription: 1. Create a metric filter based on the provided filter pattern that checks for IAM policy changes and the `` taken from audit step 1:  ```  aws logs put-metric-filter --log-group-name `` --filter-name `` --metric-transformations metricName= ``,metricNamespace='CISBenchmark',metricValue=1 --filter-pattern '{($.eventName=DeleteGroupPolicy)||($.eventName=DeleteRolePolicy)||($.eventName=DeleteUserPolicy)||($.eventName=PutGroupPolicy)||($.eventName=PutRolePolicy)||($.eventName=PutUserPolicy)||($.eventName=CreatePolicy)||($.eventName=DeletePolicy)||($.eventName=CreatePolicyVersion)||($.eventName=DeletePolicyVersion)||($.eventName=AttachRolePolicy)||($.eventName=DetachRolePolicy)||($.eventName=AttachUserPolicy)||($.eventName=DetachUserPolicy)||($.eventName=AttachGroupPolicy)||($.eventName=DetachGroupPolicy)}'  ```  **Note**: You can choose your own `metricName` and `metricNamespace` strings. Using the same `metricNamespace` for all Foundations Benchmark metrics will group them together. 2. Create an SNS topic that the alarm will notify:  ```  aws sns create-topic --name   ```  **Note**: You can execute this command once and then reuse the same topic for all monitoring alarms.  **Note**: Capture the `TopicArn` that is displayed when creating the SNS topic in step 2. 3. Create an SNS subscription for the topic created in step 2:  ```  aws sns subscribe --topic-arn  --protocol  --notification-endpoint   ```  **Note**: You can execute this command once and then reuse the same subscription for all monitoring alarms. 4. Create an alarm that is associated with the CloudWatch Logs metric filter created in step 1 and the SNS topic created in step 2:  ```  aws cloudwatch put-metric-alarm --alarm-name `` --metric-name `` --statistic Sum --period 300 --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold --evaluation-periods 1 --namespace 'CISBenchmark' --alarm-actions   ```",
+          "AuditProcedure": "If you are using CloudTrail trails and CloudWatch, perform the following to ensure that there is at least one active multi-region CloudTrail trail with the prescribed metric filters and alarms configured: 1. Identify the log group name that is configured for use with the active multi-region CloudTrail trail: - List all CloudTrails:  ```  aws cloudtrail describe-trails  ``` - Identify multi-region CloudTrail trails: `Trails with IsMultiRegionTrail set to true` - Note the value associated with Name:`` - Note the `` within the value associated with CloudWatchLogsLogGroupArn  - Example: `arn:aws:logs:::log-group::*` - Ensure the identified multi-region CloudTrail trail is active:  ```  aws cloudtrail get-trail-status --name   ```  - Ensure `IsLogging` is set to `TRUE` - Ensure the identified multi-region CloudTrail trail captures all management events:  ```  aws cloudtrail get-event-selectors --trail-name   ```  - Ensure there is at least one `event selector` for a trail with `IncludeManagementEvents` set to `true` and `ReadWriteType` set to `All` 2. Get a list of all associated metric filters for the `` captured in step 1:  ```  aws logs describe-metric-filters --log-group-name   ``` 3. Ensure the output from the above command contains the following:  ```  filterPattern: {($.eventName=DeleteGroupPolicy)||($.eventName=DeleteRolePolicy)||($.eventName=DeleteUserPolicy)||($.eventName=PutGroupPolicy)||($.eventName=PutRolePolicy)||($.eventName=PutUserPolicy)||($.eventName=CreatePolicy)||($.eventName=DeletePolicy)||($.eventName=CreatePolicyVersion)||($.eventName=DeletePolicyVersion)||($.eventName=AttachRolePolicy)||($.eventName=DetachRolePolicy)||($.eventName=AttachUserPolicy)||($.eventName=DetachUserPolicy)||($.eventName=AttachGroupPolicy)||($.eventName=DetachGroupPolicy)}  ``` 4. Note the `` value associated with the `filterPattern` from step 3. 5. Get a list of CloudWatch alarms, and filter on the `` captured in step 4:  ```  aws cloudwatch describe-alarms --query 'MetricAlarms[?MetricName==]'  ``` 6. Note the `AlarmActions` value; this will provide the SNS topic ARN value. 7. Ensure there is at least one active subscriber to the SNS topic:  ```  aws sns list-subscriptions-by-topic --topic-arn    ``` - At least one subscription should have SubscriptionArn with a valid AWS ARN.  - Example of valid SubscriptionArn: `arn:aws:sns::::`",
+          "AdditionalInformation": "Configuring a log metric filter and alarm on a multi-region (global) CloudTrail trail: - ensures that activities from all regions (both used and unused) are monitored - ensures that activities on all supported global services are monitored - ensures that all management events across all regions are monitored",
+          "References": "https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html:https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudwatch-alarms-for-cloudtrail.html:https://docs.aws.amazon.com/sns/latest/dg/SubscribeTopic.html",
+          "DefaultValue": ""
+        }
+      ]
+    },
+    {
+      "Id": "4.5",
+      "Description": "Ensure CloudTrail configuration changes are monitored",
+      "Checks": [
+        "cloudwatch_log_metric_filter_and_alarm_for_cloudtrail_configuration_changes_enabled"
+      ],
+      "Attributes": [
+        {
+          "Section": "4 Monitoring",
+          "Profile": "Level 1",
+          "AssessmentStatus": "Manual",
+          "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms.  It is recommended that a metric filter and alarm be used to detect changes to CloudTrail's configurations.",
+          "RationaleStatement": "CloudWatch is an AWS native service that allows you to observe and monitor resources and applications. CloudTrail logs can also be sent to an external Security Information and Event Management (SIEM) environment for monitoring and alerting. Monitoring changes to CloudTrail's configuration will help ensure sustained visibility into the activities performed in the AWS account.",
+          "ImpactStatement": "Ensuring that changes to CloudTrail configurations are monitored enhances security by maintaining the integrity of logging mechanisms. Automated monitoring can provide real-time alerts; however, it may require additional setup and resources to configure and manage these alerts effectively. These steps can be performed manually within a company's existing SIEM platform in cases where CloudTrail logs are monitored outside of the AWS monitoring tools in CloudWatch.",
+          "RemediationProcedure": "If you are using CloudTrail trails and CloudWatch, perform the following steps to set up the metric filter, alarm, SNS topic, and subscription: 1. Create a metric filter based on the provided filter pattern that checks for CloudTrail configuration changes and the `` taken from audit step 1:  ```  aws logs put-metric-filter --log-group-name  --filter-name  --metric-transformations metricName=,metricNamespace='CISBenchmark',metricValue=1 --filter-pattern '{ ($.eventName = CreateTrail) || ($.eventName = UpdateTrail) || ($.eventName = DeleteTrail) || ($.eventName = StartLogging) || ($.eventName = StopLogging) }'  ```  **Note**: You can choose your own `metricName` and `metricNamespace` strings. Using the same `metricNamespace` for all Foundations Benchmark metrics will group them together. 2. Create an SNS topic that the alarm will notify:  ```  aws sns create-topic --name   ```  **Note**: You can execute this command once and then reuse the same topic for all monitoring alarms.  **Note**: Capture the `TopicArn` that is displayed when creating the SNS topic in step 2. 3. Create an SNS subscription for the topic created in step 2:  ```  aws sns subscribe --topic-arn  --protocol  --notification-endpoint   ```  **Note**: You can execute this command once and then reuse the same subscription for all monitoring alarms. 4. Create an alarm that is associated with the CloudWatch Logs metric filter created in step 1 and the SNS topic created in step 2:  ```  aws cloudwatch put-metric-alarm --alarm-name  --metric-name  --statistic Sum --period 300 --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold --evaluation-periods 1 --namespace 'CISBenchmark' --alarm-actions   ```",
+          "AuditProcedure": "If you are using CloudTrail trails and CloudWatch, perform the following to ensure that there is at least one active multi-region CloudTrail trail with the prescribed metric filters and alarms configured: 1. Identify the log group name that is configured for use with the active multi-region CloudTrail trail: - List all CloudTrail trails: `aws cloudtrail describe-trails` - Identify multi-region CloudTrail trails: `Trails with IsMultiRegionTrail set to true` - Note the value associated with Name:`` - Note the `` within the value associated with CloudWatchLogsLogGroupArn  - Example: `arn:aws:logs:::log-group::*` - Ensure the identified multi-region CloudTrail trail is active:  - `aws cloudtrail get-trail-status --name `  - Ensure `IsLogging` is set to `TRUE` - Ensure the identified multi-region CloudTrail trail captures all management events:  - `aws cloudtrail get-event-selectors --trail-name `  - Ensure there is at least one `event selector` for a trail with `IncludeManagementEvents` set to `true` and `ReadWriteType` set to `All` 2. Get a list of all associated metric filters for the `` captured in step 1:  ```  aws logs describe-metric-filters --log-group-name   ``` 3. Ensure the output from the above command contains the following:  ```  filterPattern: { ($.eventName = CreateTrail) || ($.eventName = UpdateTrail) || ($.eventName = DeleteTrail) || ($.eventName = StartLogging) || ($.eventName = StopLogging) }  ``` 4. Note the `` value associated with the `filterPattern` from step 3. 5. Get a list of CloudWatch alarms, and filter on the `` captured in step 4:  ```  aws cloudwatch describe-alarms --query 'MetricAlarms[?MetricName==]'  ``` 6. Note the `AlarmActions` value; this will provide the SNS topic ARN value. 7. Ensure there is at least one active subscriber to the SNS topic:  ```  aws sns list-subscriptions-by-topic --topic-arn    ``` - At least one subscription should have SubscriptionArn with a valid AWS ARN.  - Example of valid SubscriptionArn: `arn:aws:sns::::`",
+          "AdditionalInformation": "Configuring a log metric filter and alarm on a multi-region (global) CloudTrail trail: - ensures that activities from all regions (both used and unused) are monitored - ensures that activities on all supported global services are monitored - ensures that all management events across all regions are monitored",
+          "References": "https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html:https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudwatch-alarms-for-cloudtrail.html:https://docs.aws.amazon.com/sns/latest/dg/SubscribeTopic.html",
+          "DefaultValue": ""
+        }
+      ]
+    },
+    {
+      "Id": "4.6",
+      "Description": "Ensure AWS Management Console authentication failures are monitored",
+      "Checks": [
+        "cloudwatch_log_metric_filter_authentication_failures"
+      ],
+      "Attributes": [
+        {
+          "Section": "4 Monitoring",
+          "Profile": "Level 2",
+          "AssessmentStatus": "Manual",
+          "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms.  It is recommended that a metric filter and alarm be established for failed console authentication attempts.",
+          "RationaleStatement": "CloudWatch is an AWS native service that allows you to observe and monitor resources and applications. CloudTrail logs can also be sent to an external Security Information and Event Management (SIEM) environment for monitoring and alerting. Monitoring failed console logins may decrease the lead time to detect an attempt to brute-force a credential, which may provide an indicator, such as the source IP address, that can be used in other event correlations.",
+          "ImpactStatement": "Monitoring for these failures may generate a large number of alerts, especially in larger environments.",
+          "RemediationProcedure": "If you are using CloudTrail trails and CloudWatch, perform the following steps to set up the metric filter, alarm, SNS topic, and subscription: 1. Create a metric filter based on the provided filter pattern that checks for AWS management Console login failures and uses the `` taken from audit step 1:  ```  aws logs put-metric-filter --log-group-name  --filter-name  --metric-transformations metricName=,metricNamespace='CISBenchmark',metricValue=1 --filter-pattern '{ ($.eventName = ConsoleLogin) && ($.errorMessage = Failed authentication) }'  ```  **Note**: You can choose your own `metricName` and `metricNamespace` strings. Using the same `metricNamespace` for all Foundations Benchmark metrics will group them together. 2. Create an SNS topic that the alarm will notify:  ```  aws sns create-topic --name   ```  **Note**: You can execute this command once and then reuse the same topic for all monitoring alarms.  **Note**: Capture the `TopicArn` that is displayed when creating the SNS topic in step 2. 3. Create an SNS subscription for the topic created in step 2:  ```  aws sns subscribe --topic-arn  --protocol  --notification-endpoint   ```  **Note**: You can execute this command once and then reuse the same subscription for all monitoring alarms. 4. Create an alarm that is associated with the CloudWatch Logs metric filter created in step 1 and the SNS topic created in step 2:  ```  aws cloudwatch put-metric-alarm --alarm-name  --metric-name  --statistic Sum --period 300 --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold --evaluation-periods 1 --namespace 'CISBenchmark' --alarm-actions   ```",
+          "AuditProcedure": "If you are using CloudTrail trails and CloudWatch, perform the following to ensure that there is at least one active multi-region CloudTrail trail with the prescribed metric filters and alarms configured: 1. Identify the log group name that is configured for use with the active multi-region CloudTrail trail: - List all CloudTrail trails: `aws cloudtrail describe-trails` - Identify multi-region CloudTrail trails: `Trails with IsMultiRegionTrail set to true` - Note the value associated with Name:`` - Note the `` within the value associated with CloudWatchLogsLogGroupArn  - Example: `arn:aws:logs:::log-group::*` - Ensure the identified multi-region CloudTrail trail is active:  - `aws cloudtrail get-trail-status --name `  - Ensure `IsLogging` is set to `TRUE` - Ensure the identified multi-region CloudTrail trail captures all management events:  - `aws cloudtrail get-event-selectors --trail-name `  - Ensure there is at least one `event selector` for a trail with `IncludeManagementEvents` set to `true` and `ReadWriteType` set to `All` 2. Get a list of all associated metric filters for the `` captured in step 1:  ```  aws logs describe-metric-filters --log-group-name   ``` 3. Ensure the output from the above command contains the following:  ```  filterPattern: { ($.eventName = ConsoleLogin) && ($.errorMessage = Failed authentication) }  ``` 4. Note the `` value associated with the `filterPattern` from step 3. 5. Get a list of CloudWatch alarms, and filter on the `` captured in step 4:  ```  aws cloudwatch describe-alarms --query 'MetricAlarms[?MetricName==]'  ``` 6. Note the `AlarmActions` value; this will provide the SNS topic ARN value. 7. Ensure there is at least one active subscriber to the SNS topic:  ```  aws sns list-subscriptions-by-topic --topic-arn    ``` - At least one subscription should have SubscriptionArn with a valid AWS ARN.  - Example of valid SubscriptionArn: `arn:aws:sns::::`",
+          "AdditionalInformation": "Configuring a log metric filter and alarm on a multi-region (global) CloudTrail trail: - ensures that activities from all regions (both used and unused) are monitored - ensures that activities on all supported global services are monitored - ensures that all management events across all regions are monitored",
+          "References": "https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html:https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudwatch-alarms-for-cloudtrail.html:https://docs.aws.amazon.com/sns/latest/dg/SubscribeTopic.html",
+          "DefaultValue": ""
+        }
+      ]
+    },
+    {
+      "Id": "4.7",
+      "Description": "Ensure disabling or scheduled deletion of customer created CMKs is monitored",
+      "Checks": [
+        "cloudwatch_log_metric_filter_disable_or_scheduled_deletion_of_kms_cmk"
+      ],
+      "Attributes": [
+        {
+          "Section": "4 Monitoring",
+          "Profile": "Level 2",
+          "AssessmentStatus": "Manual",
+          "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms.  It is recommended that a metric filter and alarm be established for customer-created CMKs that have changed state to disabled or are scheduled for deletion.",
+          "RationaleStatement": "CloudWatch is an AWS native service that allows you to observe and monitor resources and applications. CloudTrail logs can also be sent to an external Security Information and Event Management (SIEM) environment for monitoring and alerting. Data encrypted with disabled or deleted keys will no longer be accessible. Changes in the state of a CMK should be monitored to ensure that the change is intentional.",
+          "ImpactStatement": "Creation, storage, and management of CMK may require additional labor compared to the use of AWS-managed keys.",
+          "RemediationProcedure": "If you are using CloudTrail trails and CloudWatch, perform the following steps to set up the metric filter, alarm, SNS topic, and subscription: 1. Create a metric filter based on the provided filter pattern that checks for CMKs that have been disabled or scheduled for deletion and uses the `` taken from audit step 1:  ```  aws logs put-metric-filter --log-group-name  --filter-name  --metric-transformations metricName=,metricNamespace='CISBenchmark',metricValue=1 --filter-pattern '{($.eventSource = kms.amazonaws.com) && (($.eventName=DisableKey)||($.eventName=ScheduleKeyDeletion)) }'  ```  **Note**: You can choose your own `metricName` and `metricNamespace` strings. Using the same `metricNamespace` for all Foundations Benchmark metrics will group them together. 2. Create an SNS topic that the alarm will notify:  ```  aws sns create-topic --name   ```  **Note**: You can execute this command once and then reuse the same topic for all monitoring alarms.  **Note**: Capture the `TopicArn` that is displayed when creating the SNS topic in step 2. 3. Create an SNS subscription for the topic created in step 2:  ```  aws sns subscribe --topic-arn  --protocol  --notification-endpoint   ```  **Note**: You can execute this command once and then reuse the same subscription for all monitoring alarms. 4. Create an alarm that is associated with the CloudWatch Logs metric filter created in step 1 and the SNS topic created in step 2:  ```  aws cloudwatch put-metric-alarm --alarm-name  --metric-name  --statistic Sum --period 300 --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold --evaluation-periods 1 --namespace 'CISBenchmark' --alarm-actions   ```",
+          "AuditProcedure": "If you are using CloudTrail trails and CloudWatch, perform the following to ensure that there is at least one active multi-region CloudTrail trail with the prescribed metric filters and alarms configured: 1. Identify the log group name that is configured for use with the active multi-region CloudTrail trail: - List all CloudTrail trails: `aws cloudtrail describe-trails` - Identify multi-region CloudTrail trails: `Trails with IsMultiRegionTrail set to true` - Note the value associated with Name:`` - Note the `` within the value associated with CloudWatchLogsLogGroupArn  - Example: `arn:aws:logs:::log-group::*` - Ensure the identified multi-region CloudTrail trail is active:  - `aws cloudtrail get-trail-status --name `  - Ensure `IsLogging` is set to `TRUE` - Ensure the identified multi-region CloudTrail trail captures all management events:  - `aws cloudtrail get-event-selectors --trail-name `  - Ensure there is at least one `event selector` for a trail with `IncludeManagementEvents` set to `true` and `ReadWriteType` set to `All` 2. Get a list of all associated metric filters for the `` captured in step 1:  ```  aws logs describe-metric-filters --log-group-name   ``` 3. Ensure the output from the above command contains the following:  ```  filterPattern: {($.eventSource = kms.amazonaws.com) && (($.eventName=DisableKey)||($.eventName=ScheduleKeyDeletion)) }  ``` 4. Note the `` value associated with the `filterPattern` from step 3. 5. Get a list of CloudWatch alarms, and filter on the `` captured in step 4:  ```  aws cloudwatch describe-alarms --query 'MetricAlarms[?MetricName==]'  ``` 6. Note the `AlarmActions` value; this will provide the SNS topic ARN value. 7. Ensure there is at least one active subscriber to the SNS topic:  ```  aws sns list-subscriptions-by-topic --topic-arn    ``` - At least one subscription should have SubscriptionArn with a valid AWS ARN.  - Example of valid SubscriptionArn: `arn:aws:sns::::`",
+          "AdditionalInformation": "Configuring a log metric filter and alarm on a multi-region (global) CloudTrail trail: - ensures that activities from all regions (both used and unused) are monitored - ensures that activities on all supported global services are monitored - ensures that all management events across all regions are monitored",
+          "References": "https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudwatch-alarms-for-cloudtrail.html:https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html:https://docs.aws.amazon.com/sns/latest/dg/SubscribeTopic.html",
+          "DefaultValue": ""
+        }
+      ]
+    },
+    {
+      "Id": "4.8",
+      "Description": "Ensure S3 bucket policy changes are monitored",
+      "Checks": [
+        "cloudwatch_log_metric_filter_for_s3_bucket_policy_changes"
+      ],
+      "Attributes": [
+        {
+          "Section": "4 Monitoring",
+          "Profile": "Level 1",
+          "AssessmentStatus": "Manual",
+          "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms.  It is recommended that a metric filter and alarm be established for changes to S3 bucket policies.",
+          "RationaleStatement": "CloudWatch is an AWS native service that allows you to observe and monitor resources and applications. CloudTrail logs can also be sent to an external Security Information and Event Management (SIEM) environment for monitoring and alerting. Monitoring changes to S3 bucket policies may reduce the time it takes to detect and correct permissive policies on sensitive S3 buckets.",
+          "ImpactStatement": "",
+          "RemediationProcedure": "If you are using CloudTrail trails and CloudWatch, perform the following steps to set up the metric filter, alarm, SNS topic, and subscription: 1. Create a metric filter based on the provided filter pattern that checks for changes to S3 bucket policies and uses the `` taken from audit step 1:  ```  aws logs put-metric-filter --log-group-name  --filter-name  --metric-transformations metricName=,metricNamespace='CISBenchmark',metricValue=1 --filter-pattern '{ ($.eventSource = s3.amazonaws.com) && (($.eventName = PutBucketAcl) || ($.eventName = PutBucketPolicy) || ($.eventName = PutBucketCors) || ($.eventName = PutBucketLifecycle) || ($.eventName = PutBucketReplication) || ($.eventName = DeleteBucketPolicy) || ($.eventName = DeleteBucketCors) || ($.eventName = DeleteBucketLifecycle) || ($.eventName = DeleteBucketReplication)) }'  ```  **Note**: You can choose your own `metricName` and `metricNamespace` strings. Using the same `metricNamespace` for all Foundations Benchmark metrics will group them together. 2. Create an SNS topic that the alarm will notify:  ```  aws sns create-topic --name   ```  **Note**: You can execute this command once and then reuse the same topic for all monitoring alarms.  **Note**: Capture the `TopicArn` that is displayed when creating the SNS topic in step 2. 3. Create an SNS subscription for the topic created in step 2:  ```  aws sns subscribe --topic-arn  --protocol  --notification-endpoint   ```  **Note**: You can execute this command once and then reuse the same subscription for all monitoring alarms. 4. Create an alarm that is associated with the CloudWatch Logs metric filter created in step 1 and the SNS topic created in step 2:  ```  aws cloudwatch put-metric-alarm --alarm-name  --metric-name  --statistic Sum --period 300 --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold --evaluation-periods 1 --namespace 'CISBenchmark' --alarm-actions   ```",
+          "AuditProcedure": "If you are using CloudTrail trails and CloudWatch, perform the following to ensure that there is at least one active multi-region CloudTrail trail with the prescribed metric filters and alarms configured: 1. Identify the log group name that is configured for use with the active multi-region CloudTrail trail: - List all CloudTrail trails: `aws cloudtrail describe-trails` - Identify multi-region CloudTrail trails: `Trails with IsMultiRegionTrail set to true` - Note the value associated with Name:`` - Note the `` within the value associated with CloudWatchLogsLogGroupArn  - Example: `arn:aws:logs:::log-group::*` - Ensure the identified multi-region CloudTrail trail is active:  - `aws cloudtrail get-trail-status --name `  - Ensure `IsLogging` is set to `TRUE` - Ensure the identified multi-region CloudTrail trail captures all management events:  - `aws cloudtrail get-event-selectors --trail-name `  - Ensure there is at least one `event selector` for a trail with `IncludeManagementEvents` set to `true` and `ReadWriteType` set to `All` 2. Get a list of all associated metric filters for the `` captured in step 1:  ```  aws logs describe-metric-filters --log-group-name   ``` 3. Ensure the output from the above command contains the following:  ```  filterPattern: { ($.eventSource = s3.amazonaws.com) && (($.eventName = PutBucketAcl) || ($.eventName = PutBucketPolicy) || ($.eventName = PutBucketCors) || ($.eventName = PutBucketLifecycle) || ($.eventName = PutBucketReplication) || ($.eventName = DeleteBucketPolicy) || ($.eventName = DeleteBucketCors) || ($.eventName = DeleteBucketLifecycle) || ($.eventName = DeleteBucketReplication)) }  ``` 4. Note the `` value associated with the `filterPattern` from step 3. 5. Get a list of CloudWatch alarms, and filter on the `` captured in step 4:  ```  aws cloudwatch describe-alarms --query 'MetricAlarms[?MetricName==]'  ``` 6. Note the `AlarmActions` value; this will provide the SNS topic ARN value. 7. Ensure there is at least one active subscriber to the SNS topic:  ```  aws sns list-subscriptions-by-topic --topic-arn    ``` - At least one subscription should have SubscriptionArn with a valid AWS ARN.  - Example of valid SubscriptionArn: `arn:aws:sns::::`",
+          "AdditionalInformation": "Configuring a log metric filter and alarm on a multi-region (global) CloudTrail trail: - ensures that activities from all regions (both used and unused) are monitored - ensures that activities on all supported global services are monitored - ensures that all management events across all regions are monitored",
+          "References": "https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudwatch-alarms-for-cloudtrail.html:https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html:https://docs.aws.amazon.com/sns/latest/dg/SubscribeTopic.html",
+          "DefaultValue": ""
+        }
+      ]
+    },
+    {
+      "Id": "4.9",
+      "Description": "Ensure AWS Config configuration changes are monitored",
+      "Checks": [
+        "cloudwatch_log_metric_filter_and_alarm_for_aws_config_configuration_changes_enabled"
+      ],
+      "Attributes": [
+        {
+          "Section": "4 Monitoring",
+          "Profile": "Level 2",
+          "AssessmentStatus": "Manual",
+          "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms.  It is recommended that a metric filter and alarm be established for detecting changes to AWS Config's configurations.",
+          "RationaleStatement": "CloudWatch is an AWS native service that allows you to observe and monitor resources and applications. CloudTrail logs can also be sent to an external Security Information and Event Management (SIEM) environment for monitoring and alerting. Monitoring changes to the AWS Config configuration will help ensure sustained visibility of the configuration items within the AWS account.",
+          "ImpactStatement": "",
+          "RemediationProcedure": "If you are using CloudTrail trails and CloudWatch, perform the following steps to set up the metric filter, alarm, SNS topic, and subscription: 1. Create a metric filter based on the provided filter pattern that checks for AWS Configuration changes and uses the `` taken from audit step 1:  ```  aws logs put-metric-filter --log-group-name  --filter-name  --metric-transformations metricName=,metricNamespace='CISBenchmark',metricValue=1 --filter-pattern '{ ($.eventSource = config.amazonaws.com) && (($.eventName=StopConfigurationRecorder)||($.eventName=DeleteDeliveryChannel)||($.eventName=PutDeliveryChannel)||($.eventName=PutConfigurationRecorder)) }'  ```  **Note**: You can choose your own `metricName` and `metricNamespace` strings. Using the same `metricNamespace` for all Foundations Benchmark metrics will group them together. 2. Create an SNS topic that the alarm will notify:  ```  aws sns create-topic --name   ```  **Note**: You can execute this command once and then reuse the same topic for all monitoring alarms.  **Note**: Capture the `TopicArn` that is displayed when creating the SNS topic in step 2. 3. Create an SNS subscription for the topic created in step 2:  ```  aws sns subscribe --topic-arn  --protocol  --notification-endpoint   ```  **Note**: You can execute this command once and then reuse the same subscription for all monitoring alarms. 4. Create an alarm that is associated with the CloudWatch Logs metric filter created in step 1 and the SNS topic created in step 2:  ```  aws cloudwatch put-metric-alarm --alarm-name  --metric-name  --statistic Sum --period 300 --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold --evaluation-periods 1 --namespace 'CISBenchmark' --alarm-actions   ```",
+          "AuditProcedure": "If you are using CloudTrail trails and CloudWatch, perform the following to ensure that there is at least one active multi-region CloudTrail trail with the prescribed metric filters and alarms configured: 1. Identify the log group name that is configured for use with the active multi-region CloudTrail trail: - List all CloudTrail trails: `aws cloudtrail describe-trails` - Identify multi-region CloudTrail trails: `Trails with IsMultiRegionTrail set to true` - Note the value associated with Name:`` - Note the `` within the value associated with CloudWatchLogsLogGroupArn  - Example: `arn:aws:logs:::log-group::*` - Ensure the identified multi-region CloudTrail trail is active:  - `aws cloudtrail get-trail-status --name `  - Ensure `IsLogging` is set to `TRUE` - Ensure the identified multi-region CloudTrail trail captures all management events:  - `aws cloudtrail get-event-selectors --trail-name `  - Ensure there is at least one `event selector` for a trail with `IncludeManagementEvents` set to `true` and `ReadWriteType` set to `All` 2. Get a list of all associated metric filters for the `` captured in step 1:  ```  aws logs describe-metric-filters --log-group-name   ``` 3. Ensure the output from the above command contains the following:  ```  filterPattern: { ($.eventSource = config.amazonaws.com) && (($.eventName=StopConfigurationRecorder)||($.eventName=DeleteDeliveryChannel)||($.eventName=PutDeliveryChannel)||($.eventName=PutConfigurationRecorder)) }  ``` 4. Note the `` value associated with the `filterPattern` from step 3. 5. Get a list of CloudWatch alarms, and filter on the `` captured in step 4:  ```  aws cloudwatch describe-alarms --query 'MetricAlarms[?MetricName==]'  ``` 6. Note the `AlarmActions` value; this will provide the SNS topic ARN value. 7. Ensure there is at least one active subscriber to the SNS topic:  ```  aws sns list-subscriptions-by-topic --topic-arn    ``` - At least one subscription should have SubscriptionArn with a valid AWS ARN.  - Example of valid SubscriptionArn: `arn:aws:sns::::`",
+          "AdditionalInformation": "Configuring a log metric filter and alarm on a multi-region (global) CloudTrail trail: - ensures that activities from all regions (both used and unused) are monitored - ensures that activities on all supported global services are monitored - ensures that all management events across all regions are monitored",
+          "References": "https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudwatch-alarms-for-cloudtrail.html:https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html:https://docs.aws.amazon.com/sns/latest/dg/SubscribeTopic.html",
+          "DefaultValue": ""
+        }
+      ]
+    },
+    {
+      "Id": "4.10",
+      "Description": "Ensure security group changes are monitored",
+      "Checks": [
+        "cloudwatch_log_metric_filter_security_group_changes"
+      ],
+      "Attributes": [
+        {
+          "Section": "4 Monitoring",
+          "Profile": "Level 2",
+          "AssessmentStatus": "Manual",
+          "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms.  Security groups are stateful packet filters that control ingress and egress traffic within a VPC. It is recommended that a metric filter and alarm be established to detect changes to security groups.",
+          "RationaleStatement": "CloudWatch is an AWS native service that allows you to observe and monitor resources and applications. CloudTrail logs can also be sent to an external Security Information and Event Management (SIEM) environment for monitoring and alerting. Monitoring changes to security groups will help ensure that resources and services are not unintentionally exposed.",
+          "ImpactStatement": "This may require additional 'tuning' to eliminate false positives and filter out expected activity so that anomalies are easier to detect.",
+          "RemediationProcedure": "If you are using CloudTrail trails and CloudWatch, perform the following steps to set up the metric filter, alarm, SNS topic, and subscription: 1. Create a metric filter based on the provided filter pattern that checks for security groups changes and uses the `` taken from audit step 1:  ```  aws logs put-metric-filter --log-group-name  --filter-name  --metric-transformations metricName=,metricNamespace=CISBenchmark,metricValue=1 --filter-pattern { ($.eventName = AuthorizeSecurityGroupIngress) || ($.eventName = AuthorizeSecurityGroupEgress) || ($.eventName = RevokeSecurityGroupIngress) || ($.eventName = RevokeSecurityGroupEgress) || ($.eventName = CreateSecurityGroup) || ($.eventName = DeleteSecurityGroup) || ($.eventName = ModifySecurityGroupRules) }  ```  **Note**: You can choose your own `metricName` and `metricNamespace` strings. Using the same `metricNamespace` for all Foundations Benchmark metrics will group them together. 2. Create an SNS topic that the alarm will notify:  ```  aws sns create-topic --name   ```  **Note**: You can execute this command once and then reuse the same topic for all monitoring alarms.  **Note**: Capture the `TopicArn` that is displayed when creating the SNS topic in step 2. 3. Create an SNS subscription for the topic created in step 2:  ```  aws sns subscribe --topic-arn  --protocol  --notification-endpoint   ```  **Note**: You can execute this command once and then reuse the same subscription for all monitoring alarms. 4. Create an alarm that is associated with the CloudWatch Logs metric filter created in step 1 and the SNS topic created in step 2:  ```  aws cloudwatch put-metric-alarm --alarm-name  --metric-name  --statistic Sum --period 300 --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold --evaluation-periods 1 --namespace CISBenchmark --alarm-actions   ```",
+          "AuditProcedure": "If you are using CloudTrail trails and CloudWatch, perform the following to ensure that there is at least one active multi-region CloudTrail trail with the prescribed metric filters and alarms configured: 1. Identify the log group name that is configured for use with the active multi-region CloudTrail trail: - List all CloudTrail trails: `aws cloudtrail describe-trails` - Identify multi-region CloudTrail trails: `Trails with IsMultiRegionTrail set to true` - Note the value associated with Name:`` - Note the `` within the value associated with CloudWatchLogsLogGroupArn  - Example: `arn:aws:logs:::log-group::*` - Ensure the identified multi-region CloudTrail trail is active:  - `aws cloudtrail get-trail-status --name `  - Ensure `IsLogging` is set to `TRUE` - Ensure the identified multi-region CloudTrail trail captures all management events:  - `aws cloudtrail get-event-selectors --trail-name `  - Ensure there is at least one `event selector` for a trail with `IncludeManagementEvents` set to `true` and `ReadWriteType` set to `All` 2. Get a list of all associated metric filters for the `` captured in step 1:  ```  aws logs describe-metric-filters --log-group-name   ``` 3. Ensure the output from the above command contains the following:  ```  filterPattern: { ($.eventName = AuthorizeSecurityGroupIngress) || ($.eventName = AuthorizeSecurityGroupEgress) || ($.eventName = RevokeSecurityGroupIngress) || ($.eventName = RevokeSecurityGroupEgress) || ($.eventName = CreateSecurityGroup) || ($.eventName = DeleteSecurityGroup) || ($.eventName = ModifySecurityGroupRules) }  ``` 4. Note the `` value associated with the `filterPattern` from step 3. 5. Get a list of CloudWatch alarms, and filter on the `` captured in step 4:  ```  aws cloudwatch describe-alarms --query MetricAlarms[?MetricName==]  ``` 6. Note the `AlarmActions` value; this will provide the SNS topic ARN value. 7. Ensure there is at least one active subscriber to the SNS topic:  ```  aws sns list-subscriptions-by-topic --topic-arn    ``` - At least one subscription should have SubscriptionArn with a valid AWS ARN.  - Example of valid SubscriptionArn: `arn:aws:sns::::`",
+          "AdditionalInformation": "Configuring a log metric filter and alarm on a multi-region (global) CloudTrail trail: - ensures that activities from all regions (both used and unused) are monitored - ensures that activities on all supported global services are monitored - ensures that all management events across all regions are monitored AWS has recently introduced a new API, ModifySecurityGroupRules, which modifies the rules of a security group.",
+          "References": "https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html:https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudwatch-alarms-for-cloudtrail.html:https://docs.aws.amazon.com/sns/latest/dg/SubscribeTopic.html:https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifySecurityGroupRules.html",
+          "DefaultValue": ""
+        }
+      ]
+    },
+    {
+      "Id": "4.11",
+      "Description": "Ensure Network Access Control List (NACL) changes are monitored",
+      "Checks": [
+        "cloudwatch_changes_to_network_acls_alarm_configured"
+      ],
+      "Attributes": [
+        {
+          "Section": "4 Monitoring",
+          "Profile": "Level 2",
+          "AssessmentStatus": "Manual",
+          "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms.  NACLs are used as a stateless packet filter to control ingress and egress traffic for subnets within a VPC. It is recommended that a metric filter and alarm be established for any changes made to NACLs.",
+          "RationaleStatement": "CloudWatch is an AWS native service that allows you to observe and monitor resources and applications. CloudTrail logs can also be sent to an external Security Information and Event Management (SIEM) environment for monitoring and alerting. Monitoring changes to NACLs will help ensure that AWS resources and services are not unintentionally exposed.",
+          "ImpactStatement": "",
+          "RemediationProcedure": "If you are using CloudTrail trails and CloudWatch, perform the following steps to set up the metric filter, alarm, SNS topic, and subscription: 1. Create a metric filter based on the provided filter pattern that checks for NACL changes and uses the `` taken from audit step 1:  ```  aws logs put-metric-filter --log-group-name  --filter-name  --metric-transformations metricName=,metricNamespace='CISBenchmark',metricValue=1 --filter-pattern '{ ($.eventName = CreateNetworkAcl) || ($.eventName = CreateNetworkAclEntry) || ($.eventName = DeleteNetworkAcl) || ($.eventName = DeleteNetworkAclEntry) || ($.eventName = ReplaceNetworkAclEntry) || ($.eventName = ReplaceNetworkAclAssociation) }'  ```  **Note**: You can choose your own `metricName` and `metricNamespace` strings. Using the same `metricNamespace` for all Foundations Benchmark metrics will group them together. 2. Create an SNS topic that the alarm will notify:  ```  aws sns create-topic --name   ```  **Note**: You can execute this command once and then reuse the same topic for all monitoring alarms.  **Note**: Capture the `TopicArn` that is displayed when creating the SNS topic in step 2. 3. Create an SNS subscription for the topic created in step 2:  ```  aws sns subscribe --topic-arn  --protocol  --notification-endpoint   ```  **Note**: You can execute this command once and then reuse the same subscription for all monitoring alarms. 4. Create an alarm that is associated with the CloudWatch Logs metric filter created in step 1 and the SNS topic created in step 2:  ```  aws cloudwatch put-metric-alarm --alarm-name  --metric-name  --statistic Sum --period 300 --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold --evaluation-periods 1 --namespace 'CISBenchmark' --alarm-actions   ```",
+          "AuditProcedure": "If you are using CloudTrail trails and CloudWatch, perform the following to ensure that there is at least one active multi-region CloudTrail trail with the prescribed metric filters and alarms configured: 1. Identify the log group name that is configured for use with the active multi-region CloudTrail trail: - List all CloudTrail trails: `aws cloudtrail describe-trails` - Identify multi-region CloudTrail trails: `Trails with IsMultiRegionTrail set to true` - Note the value associated with Name:`` - Note the `` within the value associated with CloudWatchLogsLogGroupArn  - Example: `arn:aws:logs:::log-group::*` - Ensure the identified multi-region CloudTrail trail is active:  - `aws cloudtrail get-trail-status --name `  - Ensure `IsLogging` is set to `TRUE` - Ensure the identified multi-region CloudTrail trail captures all management events:  - `aws cloudtrail get-event-selectors --trail-name `  - Ensure there is at least one `event selector` for a trail with `IncludeManagementEvents` set to `true` and `ReadWriteType` set to `All` 2. Get a list of all associated metric filters for the `` captured in step 1:  ```  aws logs describe-metric-filters --log-group-name   ``` 3. Ensure the output from the above command contains the following:  ```  filterPattern: { ($.eventName = CreateNetworkAcl) || ($.eventName = CreateNetworkAclEntry) || ($.eventName = DeleteNetworkAcl) || ($.eventName = DeleteNetworkAclEntry) || ($.eventName = ReplaceNetworkAclEntry) || ($.eventName = ReplaceNetworkAclAssociation) }  ``` 4. Note the `` value associated with the `filterPattern` from step 3. 5. Get a list of CloudWatch alarms, and filter on the `` captured in step 4:  ```  aws cloudwatch describe-alarms --query 'MetricAlarms[?MetricName==]'  ``` 6. Note the `AlarmActions` value; this will provide the SNS topic ARN value. 7. Ensure there is at least one active subscriber to the SNS topic:  ```  aws sns list-subscriptions-by-topic --topic-arn    ``` - At least one subscription should have SubscriptionArn with a valid AWS ARN.  - Example of valid SubscriptionArn: `arn:aws:sns::::`",
+          "AdditionalInformation": "Configuring a log metric filter and alarm on a multi-region (global) CloudTrail trail: - ensures that activities from all regions (both used and unused) are monitored - ensures that activities on all supported global services are monitored - ensures that all management events across all regions are monitored",
+          "References": "https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html:https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudwatch-alarms-for-cloudtrail.html:https://docs.aws.amazon.com/sns/latest/dg/SubscribeTopic.html",
+          "DefaultValue": ""
+        }
+      ]
+    },
+    {
+      "Id": "4.12",
+      "Description": "Ensure changes to network gateways are monitored",
+      "Checks": [
+        "cloudwatch_changes_to_network_gateways_alarm_configured"
+      ],
+      "Attributes": [
+        {
+          "Section": "4 Monitoring",
+          "Profile": "Level 1",
+          "AssessmentStatus": "Manual",
+          "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms.  Network gateways are required to send and receive traffic to a destination outside of a VPC. It is recommended that a metric filter and alarm be established for changes to network gateways.",
+          "RationaleStatement": "CloudWatch is an AWS native service that allows you to observe and monitor resources and applications. CloudTrail logs can also be sent to an external Security Information and Event Management (SIEM) environment for monitoring and alerting. Monitoring changes to network gateways will help ensure that all ingress/egress traffic traverses the VPC border via a controlled path.",
+          "ImpactStatement": "Monitoring changes to network gateways helps detect unauthorized modifications that could compromise network security. Implementing automated monitoring and alerts can improve incident response times, but it may require additional configuration and maintenance efforts.",
+          "RemediationProcedure": "If you are using CloudTrail trails and CloudWatch, perform the following steps to set up the metric filter, alarm, SNS topic, and subscription: 1. Create a metric filter based on the provided filter pattern that checks for network gateways changes and uses the `` taken from audit step 1:  ```  aws logs put-metric-filter --log-group-name  --filter-name  --metric-transformations metricName=,metricNamespace='CISBenchmark',metricValue=1 --filter-pattern '{ ($.eventName = CreateCustomerGateway) || ($.eventName = DeleteCustomerGateway) || ($.eventName = AttachInternetGateway) || ($.eventName = CreateInternetGateway) || ($.eventName = DeleteInternetGateway) || ($.eventName = DetachInternetGateway) }'  ```  **Note**: You can choose your own `metricName` and `metricNamespace` strings. Using the same `metricNamespace` for all Foundations Benchmark metrics will group them together. 2. Create an SNS topic that the alarm will notify:  ```  aws sns create-topic --name   ```  **Note**: You can execute this command once and then reuse the same topic for all monitoring alarms.  **Note**: Capture the `TopicArn` that is displayed when creating the SNS topic in step 2. 3. Create an SNS subscription for the topic created in step 2:  ```  aws sns subscribe --topic-arn  --protocol  --notification-endpoint   ```  **Note**: You can execute this command once and then reuse the same subscription for all monitoring alarms. 4. Create an alarm that is associated with the CloudWatch Logs metric filter created in step 1 and the SNS topic created in step 2:  ```  aws cloudwatch put-metric-alarm --alarm-name  --metric-name  --statistic Sum --period 300 --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold --evaluation-periods 1 --namespace 'CISBenchmark' --alarm-actions   ``` 5. Implement logging and alerting mechanisms:  ```  aws sns create-topic --name NetworkGatewayChangesAlerts  ````  ```  aws sns subscribe --topic-arn  --protocol email --notification-endpoint   ```  ```  aws cloudwatch put-metric-alarm --alarm-name NetworkGatewayChangesAlarm --metric-name GatewayChanges --namespace AWS/EC2 --statistic Sum --period 300 --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold --evaluation-periods 1 --alarm-actions   ```",
+          "AuditProcedure": "If you are using CloudTrail trails and CloudWatch, perform the following to ensure that there is at least one active multi-region CloudTrail trail with the prescribed metric filters and alarms configured: 1. Identify the log group name that is configured for use with the active multi-region CloudTrail trail: - List all CloudTrail trails: `aws cloudtrail describe-trails` - Identify multi-region CloudTrail trails: `Trails with IsMultiRegionTrail set to true` - Note the value associated with Name:`` - Note the `` within the value associated with CloudWatchLogsLogGroupArn  - Example: `arn:aws:logs:::log-group::*` - Ensure the identified multi-region CloudTrail trail is active:  - `aws cloudtrail get-trail-status --name `  - Ensure `IsLogging` is set to `TRUE` - Ensure the identified multi-region CloudTrail trail captures all management events:  - `aws cloudtrail get-event-selectors --trail-name `  - Ensure there is at least one `event selector` for a trail with `IncludeManagementEvents` set to `true` and `ReadWriteType` set to `All` 2. Get a list of all associated metric filters for the `` captured in step 1:  ```  aws logs describe-metric-filters --log-group-name   ``` 3. Ensure the output from the above command contains the following:  ```  filterPattern: { ($.eventName = CreateCustomerGateway) || ($.eventName = DeleteCustomerGateway) || ($.eventName = AttachInternetGateway) || ($.eventName = CreateInternetGateway) || ($.eventName = DeleteInternetGateway) || ($.eventName = DetachInternetGateway) }  ``` 4. Note the `` value associated with the `filterPattern` from step 3. 5. Get a list of CloudWatch alarms, and filter on the `` captured in step 4:  ```  aws cloudwatch describe-alarms --query 'MetricAlarms[?MetricName==]'  ``` 6. Note the `AlarmActions` value; this will provide the SNS topic ARN value. 7. Ensure there is at least one active subscriber to the SNS topic:  ```  aws sns list-subscriptions-by-topic --topic-arn    ``` - At least one subscription should have SubscriptionArn with a valid AWS ARN.  - Example of valid SubscriptionArn: `arn:aws:sns::::` 8. Ensure automated monitoring is enabled:  ```  aws cloudwatch put-metric-alarm --alarm-name NetworkGatewayChanges --metric-name GatewayChanges --namespace AWS/EC2 --statistic Sum --period 300 --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold --evaluation-periods 1 --alarm-actions   ```",
+          "AdditionalInformation": "Configuring a log metric filter and alarm on a multi-region (global) CloudTrail trail: - ensures that activities from all regions (both used and unused) are monitored - ensures that activities on all supported global services are monitored - ensures that all management events across all regions are monitored",
+          "References": "https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html:https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudwatch-alarms-for-cloudtrail.html:https://docs.aws.amazon.com/sns/latest/dg/SubscribeTopic.html",
+          "DefaultValue": ""
+        }
+      ]
+    },
+    {
+      "Id": "4.13",
+      "Description": "Ensure route table changes are monitored",
+      "Checks": [
+        "cloudwatch_changes_to_network_route_tables_alarm_configured"
+      ],
+      "Attributes": [
+        {
+          "Section": "4 Monitoring",
+          "Profile": "Level 1",
+          "AssessmentStatus": "Manual",
+          "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms.  Routing tables are used to route network traffic between subnets and to network gateways. It is recommended that a metric filter and alarm be established for changes to route tables.",
+          "RationaleStatement": "CloudWatch is an AWS native service that allows you to observe and monitor resources and applications. CloudTrail logs can also be sent to an external Security Information and Event Management (SIEM) environment for monitoring and alerting. Monitoring changes to route tables will help ensure that all VPC traffic flows through the expected path and prevent any accidental or intentional modifications that may lead to uncontrolled network traffic. An alarm should be triggered every time an AWS API call is performed to create, replace, delete, or disassociate a route table.",
+          "ImpactStatement": "",
+          "RemediationProcedure": "If you are using CloudTrail trails and CloudWatch, perform the following steps to set up the metric filter, alarm, SNS topic, and subscription: 1. Create a metric filter based on the provided filter pattern that checks for route table changes and uses the `` taken from audit step 1:  ```  aws logs put-metric-filter --log-group-name  --filter-pattern '{ ($.eventName = CreateRoute) || ($.eventName = CreateRouteTable) || ($.eventName = ReplaceRoute) || ($.eventName = ReplaceRouteTableAssociation) || ($.eventName = DeleteRouteTable) || ($.eventName = DeleteRoute) || ($.eventName = DisassociateRouteTable) }'  ```  **Note**: You can choose your own `metricName` and `metricNamespace` strings. Using the same `metricNamespace` for all Foundations Benchmark metrics will group them together. 2. Create an SNS topic that the alarm will notify:  ```  aws sns create-topic --name   ```  **Note**: You can execute this command once and then reuse the same topic for all monitoring alarms.  **Note**: Capture the `TopicArn` that is displayed when creating the SNS topic in step 2. 3. Create an SNS subscription for the topic created in step 2:  ```  aws sns subscribe --topic-arn  --protocol  --notification-endpoint   ```  **Note**: You can execute this command once and then reuse the same subscription for all monitoring alarms. 4. Create an alarm that is associated with the CloudWatch Logs metric filter created in step 1 and the SNS topic created in step 2:  ```  aws cloudwatch put-metric-alarm --alarm-name  --metric-name  --statistic Sum --period 300 --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold --evaluation-periods 1 --namespace 'CISBenchmark' --alarm-actions   ```",
+          "AuditProcedure": "If you are using CloudTrail trails and CloudWatch, perform the following to ensure that there is at least one active multi-region CloudTrail trail with the prescribed metric filters and alarms configured: 1. Identify the log group name that is configured for use with the active multi-region CloudTrail trail: - List all CloudTrail trails: `aws cloudtrail describe-trails` - Identify multi-region CloudTrail trails: `Trails with IsMultiRegionTrail set to true` - Note the value associated with Name:`` - Note the `` within the value associated with CloudWatchLogsLogGroupArn  - Example: `arn:aws:logs:::log-group::*` - Ensure the identified multi-region CloudTrail trail is active:  - `aws cloudtrail get-trail-status --name `  - Ensure `IsLogging` is set to `TRUE` - Ensure the identified multi-region CloudTrail trail captures all management events:  - `aws cloudtrail get-event-selectors --trail-name `  - Ensure there is at least one `event selector` for a trail with `IncludeManagementEvents` set to `true` and `ReadWriteType` set to `All` 2. Get a list of all associated metric filters for the `` captured in step 1:  ```  aws logs describe-metric-filters --log-group-name   ``` 3. Ensure the output from the above command contains the following:  ```  filterPattern: {($.eventSource = ec2.amazonaws.com) && ($.eventName = CreateRoute) || ($.eventName = CreateRouteTable) || ($.eventName = ReplaceRoute) || ($.eventName = ReplaceRouteTableAssociation) || ($.eventName = DeleteRouteTable) || ($.eventName = DeleteRoute) || ($.eventName = DisassociateRouteTable) }  ``` 4. Note the `` value associated with the `filterPattern` from step 3. 5. Get a list of CloudWatch alarms, and filter on the `` captured in step 4:  ```  aws cloudwatch describe-alarms --query 'MetricAlarms[?MetricName==]'  ``` 6. Note the `AlarmActions` value; this will provide the SNS topic ARN value. 7. Ensure there is at least one active subscriber to the SNS topic:  ```  aws sns list-subscriptions-by-topic --topic-arn    ``` - At least one subscription should have SubscriptionArn with a valid AWS ARN.  - Example of valid SubscriptionArn: `arn:aws:sns::::`",
+          "AdditionalInformation": "Configuring a log metric filter and alarm on a multi-region (global) CloudTrail trail: - ensures that activities from all regions (both used and unused) are monitored - ensures that activities on all supported global services are monitored - ensures that all management events across all regions are monitored",
+          "References": "https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html:https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudwatch-alarms-for-cloudtrail.html:https://docs.aws.amazon.com/sns/latest/dg/SubscribeTopic.html",
+          "DefaultValue": ""
+        }
+      ]
+    },
+    {
+      "Id": "4.14",
+      "Description": "Ensure VPC changes are monitored",
+      "Checks": [
+        "cloudwatch_changes_to_vpcs_alarm_configured"
+      ],
+      "Attributes": [
+        {
+          "Section": "4 Monitoring",
+          "Profile": "Level 1",
+          "AssessmentStatus": "Manual",
+          "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms.  It is possible to have more than one VPC within an account; additionally, it is also possible to create a peer connection between two VPCs, enabling network traffic to route between them. It is recommended that a metric filter and alarm be established for changes made to VPCs.",
+          "RationaleStatement": "CloudWatch is an AWS native service that allows you to observe and monitor resources and applications. CloudTrail logs can also be sent to an external Security Information and Event Management (SIEM) environment for monitoring and alerting. VPCs in AWS are logically isolated virtual networks that can be used to launch AWS resources. Monitoring changes to VPC configurations will help ensure that VPC traffic flow is not negatively impacted. Changes to VPCs can affect network accessibility from the public internet and additionally impact VPC traffic flow to and from the resources launched in the VPC.",
+          "ImpactStatement": "",
+          "RemediationProcedure": "If you are using CloudTrail trails and CloudWatch, perform the following steps to set up the metric filter, alarm, SNS topic, and subscription: 1. Create a metric filter based on the provided filter pattern that checks for VPC changes and uses the `` taken from audit step 1:  ```  aws logs put-metric-filter --log-group-name  --filter-name  --metric-transformations metricName=,metricNamespace='CISBenchmark',metricValue=1 --filter-pattern '{ ($.eventName = CreateVpc) || ($.eventName = DeleteVpc) || ($.eventName = ModifyVpcAttribute) || ($.eventName = AcceptVpcPeeringConnection) || ($.eventName = CreateVpcPeeringConnection) || ($.eventName = DeleteVpcPeeringConnection) || ($.eventName = RejectVpcPeeringConnection) || ($.eventName = AttachClassicLinkVpc) || ($.eventName = DetachClassicLinkVpc) || ($.eventName = DisableVpcClassicLink) || ($.eventName = EnableVpcClassicLink) }'  ```  **Note**: You can choose your own `metricName` and `metricNamespace` strings. Using the same `metricNamespace` for all Foundations Benchmark metrics will group them together. 2. Create an SNS topic that the alarm will notify:  ```  aws sns create-topic --name   ```  **Note**: You can execute this command once and then reuse the same topic for all monitoring alarms.  **Note**: Capture the `TopicArn` that is displayed when creating the SNS topic in step 2. 3. Create an SNS subscription for the topic created in step 2:  ```  aws sns subscribe --topic-arn  --protocol  --notification-endpoint   ```  **Note**: You can execute this command once and then reuse the same subscription for all monitoring alarms. 4. Create an alarm that is associated with the CloudWatch Logs metric filter created in step 1 and the SNS topic created in step 2:  ```  aws cloudwatch put-metric-alarm --alarm-name  --metric-name  --statistic Sum --period 300 --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold --evaluation-periods 1 --namespace 'CISBenchmark' --alarm-actions   ```",
+          "AuditProcedure": "If you are using CloudTrail trails and CloudWatch, perform the following to ensure that there is at least one active multi-region CloudTrail trail with the prescribed metric filters and alarms configured: 1. Identify the log group name that is configured for use with the active multi-region CloudTrail trail: - List all CloudTrail trails: `aws cloudtrail describe-trails` - Identify multi-region CloudTrail trails: `Trails with IsMultiRegionTrail set to true` - Note the value associated with Name:`` - Note the `` within the value associated with CloudWatchLogsLogGroupArn  - Example: `arn:aws:logs:::log-group::*` - Ensure the identified multi-region CloudTrail trail is active:  - `aws cloudtrail get-trail-status --name `  - Ensure `IsLogging` is set to `TRUE` - Ensure the identified multi-region CloudTrail trail captures all management events:  - `aws cloudtrail get-event-selectors --trail-name `  - Ensure there is at least one `event selector` for a trail with `IncludeManagementEvents` set to `true` and `ReadWriteType` set to `All` 2. Get a list of all associated metric filters for the `` captured in step 1:  ```  aws logs describe-metric-filters --log-group-name   ``` 3. Ensure the output from the above command contains the following:  ```  filterPattern: { ($.eventName = CreateVpc) || ($.eventName = DeleteVpc) || ($.eventName = ModifyVpcAttribute) || ($.eventName = AcceptVpcPeeringConnection) || ($.eventName = CreateVpcPeeringConnection) || ($.eventName = DeleteVpcPeeringConnection) || ($.eventName = RejectVpcPeeringConnection) || ($.eventName = AttachClassicLinkVpc) || ($.eventName = DetachClassicLinkVpc) || ($.eventName = DisableVpcClassicLink) || ($.eventName = EnableVpcClassicLink) }  ``` 4. Note the `` value associated with the `filterPattern` from step 3. 5. Get a list of CloudWatch alarms, and filter on the `` captured in step 4:  ```  aws cloudwatch describe-alarms --query 'MetricAlarms[?MetricName==]'  ``` 6. Note the `AlarmActions` value; this will provide the SNS topic ARN value. 7. Ensure there is at least one active subscriber to the SNS topic:  ```  aws sns list-subscriptions-by-topic --topic-arn    ``` - At least one subscription should have SubscriptionArn with a valid AWS ARN.  - Example of valid SubscriptionArn: `arn:aws:sns::::`",
+          "AdditionalInformation": "Configuring a log metric filter and alarm on a multi-region (global) CloudTrail trail: - ensures that activities from all regions (both used and unused) are monitored - ensures that activities on all supported global services are monitored - ensures that all management events across all regions are monitored",
+          "References": "https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html:https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudwatch-alarms-for-cloudtrail.html:https://docs.aws.amazon.com/sns/latest/dg/SubscribeTopic.html",
+          "DefaultValue": ""
+        }
+      ]
+    },
+    {
+      "Id": "4.15",
+      "Description": "Ensure AWS Organizations changes are monitored",
+      "Checks": [
+        "cloudwatch_log_metric_filter_aws_organizations_changes"
+      ],
+      "Attributes": [
+        {
+          "Section": "4 Monitoring",
+          "Profile": "Level 1",
+          "AssessmentStatus": "Manual",
+          "Description": "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms.  It is recommended that a metric filter and alarm be established for changes made to AWS Organizations in the master AWS account.",
+          "RationaleStatement": "CloudWatch is an AWS native service that allows you to observe and monitor resources and applications. CloudTrail logs can also be sent to an external Security Information and Event Management (SIEM) environment for monitoring and alerting. Monitoring AWS Organizations changes can help you prevent unwanted, accidental, or intentional modifications that may lead to unauthorized access or other security breaches. This monitoring technique helps ensure that any unexpected changes made within your AWS Organizations can be investigated and that any unwanted changes can be rolled back.",
+          "ImpactStatement": "",
+          "RemediationProcedure": "If you are using CloudTrail trails and CloudWatch, perform the following steps to set up the metric filter, alarm, SNS topic, and subscription: 1. Create a metric filter based on the provided filter pattern that checks for AWS Organizations changes and uses the `` taken from audit step 1:  ```  aws logs put-metric-filter --log-group-name  --filter-name  --metric-transformations metricName=,metricNamespace='CISBenchmark',metricValue=1 --filter-pattern '{ ($.eventSource = organizations.amazonaws.com) && (($.eventName = AcceptHandshake) || ($.eventName = AttachPolicy) || ($.eventName = CreateAccount) || ($.eventName = CreateOrganizationalUnit) || ($.eventName = CreatePolicy) || ($.eventName = DeclineHandshake) || ($.eventName = DeleteOrganization) || ($.eventName = DeleteOrganizationalUnit) || ($.eventName = DeletePolicy) || ($.eventName = DetachPolicy) || ($.eventName = DisablePolicyType) || ($.eventName = EnablePolicyType) || ($.eventName = InviteAccountToOrganization) || ($.eventName = LeaveOrganization) || ($.eventName = MoveAccount) || ($.eventName = RemoveAccountFromOrganization) || ($.eventName = UpdatePolicy) || ($.eventName = UpdateOrganizationalUnit)) }'  ```  **Note**: You can choose your own `metricName` and `metricNamespace` strings. Using the same `metricNamespace` for all Foundations Benchmark metrics will group them together. 2. Create an SNS topic that the alarm will notify:  ```  aws sns create-topic --name   ```  **Note**: You can execute this command once and then reuse the same topic for all monitoring alarms.  **Note**: Capture the `TopicArn` that is displayed when creating the SNS topic in step 2. 3. Create an SNS subscription for the topic created in step 2:  ```  aws sns subscribe --topic-arn  --protocol  --notification-endpoint   ```  **Note**: You can execute this command once and then reuse the same subscription for all monitoring alarms. 4. Create an alarm that is associated with the CloudWatch Logs metric filter created in step 1 and the SNS topic created in step 2:  ```  aws cloudwatch put-metric-alarm --alarm-name  --metric-name  --statistic Sum --period 300 --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold --evaluation-periods 1 --namespace 'CISBenchmark' --alarm-actions   ```",
+          "AuditProcedure": "If you are using CloudTrail trails and CloudWatch, perform the following to ensure that there is at least one active multi-region CloudTrail trail with the prescribed metric filters and alarms configured: 1. Identify the log group name that is configured for use with the active multi-region CloudTrail trail: - List all CloudTrail trails: `aws cloudtrail describe-trails` - Identify multi-region CloudTrail trails: `Trails with IsMultiRegionTrail set to true` - Note the value associated with Name:`` - Note the `` within the value associated with CloudWatchLogsLogGroupArn  - Example: `arn:aws:logs:::log-group::*` - Ensure the identified multi-region CloudTrail trail is active:  - `aws cloudtrail get-trail-status --name `  - Ensure `IsLogging` is set to `TRUE` - Ensure the identified multi-region CloudTrail trail captures all management events:  - `aws cloudtrail get-event-selectors --trail-name `  - Ensure there is at least one `event selector` for a trail with `IncludeManagementEvents` set to `true` and `ReadWriteType` set to `All` 2. Get a list of all associated metric filters for the `` captured in step 1:  ```  aws logs describe-metric-filters --log-group-name   ``` 3. Ensure the output from the above command contains the following:  ```  filterPattern: { ($.eventSource = organizations.amazonaws.com) && (($.eventName = AcceptHandshake) || ($.eventName = AttachPolicy) || ($.eventName = CreateAccount) || ($.eventName = CreateOrganizationalUnit) || ($.eventName = CreatePolicy) || ($.eventName = DeclineHandshake) || ($.eventName = DeleteOrganization) || ($.eventName = DeleteOrganizationalUnit) || ($.eventName = DeletePolicy) || ($.eventName = DetachPolicy) || ($.eventName = DisablePolicyType) || ($.eventName = EnablePolicyType) || ($.eventName = InviteAccountToOrganization) || ($.eventName = LeaveOrganization) || ($.eventName = MoveAccount) || ($.eventName = RemoveAccountFromOrganization) || ($.eventName = UpdatePolicy) || ($.eventName = UpdateOrganizationalUnit)) }  ``` 4. Note the `` value associated with the `filterPattern` from step 3. 5. Get a list of CloudWatch alarms, and filter on the `` captured in step 4:  ```  aws cloudwatch describe-alarms --query 'MetricAlarms[?MetricName==]'  ``` 6. Note the `AlarmActions` value; this will provide the SNS topic ARN value. 7. Ensure there is at least one active subscriber to the SNS topic:  ```  aws sns list-subscriptions-by-topic --topic-arn    ``` - At least one subscription should have SubscriptionArn with a valid AWS ARN.  - Example of valid SubscriptionArn: `arn:aws:sns::::`",
+          "AdditionalInformation": "Configuring a log metric filter and alarm on a multi-region (global) CloudTrail trail: - ensures that activities from all regions (both used and unused) are monitored - ensures that activities on all supported global services are monitored - ensures that all management events across all regions are monitored",
+          "References": "https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudwatch-alarms-for-cloudtrail.html:https://docs.aws.amazon.com/organizations/latest/userguide/orgs_security_incident-response.html",
+          "DefaultValue": ""
+        }
+      ]
+    },
+    {
+      "Id": "4.16",
+      "Description": "Ensure AWS Security Hub is enabled",
+      "Checks": [
+        "securityhub_enabled"
+      ],
+      "Attributes": [
+        {
+          "Section": "4 Monitoring",
+          "Profile": "Level 2",
+          "AssessmentStatus": "Automated",
+          "Description": "Security Hub collects security data from various AWS accounts, services, and supported third-party partner products, helping you analyze your security trends and identify the highest-priority security issues. When you enable Security Hub, it begins to consume, aggregate, organize, and prioritize findings from the AWS services that you have enabled, such as Amazon GuardDuty, Amazon Inspector, and Amazon Macie. You can also enable integrations with AWS partner security products.",
+          "RationaleStatement": "AWS Security Hub provides you with a comprehensive view of your security state in AWS and helps you check your environment against security industry standards and best practices, enabling you to quickly assess the security posture across your AWS accounts.",
+          "ImpactStatement": "It is recommended that AWS Security Hub be enabled in all regions. AWS Security Hub requires that AWS Config be enabled.",
+          "RemediationProcedure": "To grant the permissions required to enable Security Hub, attach the Security Hub managed policy `AWSSecurityHubFullAccess` to an IAM user, group, or role. Enabling Security Hub: **From Console:** 1. Use the credentials of the IAM identity to sign in to the Security Hub console. 2. When you open the Security Hub console for the first time, choose `Go to Security Hub`. 3. The `Security standards` section on the welcome page lists supported security standards. Check the box for a standard to enable it. 3. Choose `Enable Security Hub`. **From Command Line:** 1. Run the `enable-security-hub` command, including `--enable-default-standards` to enable the default standards: ``` aws securityhub enable-security-hub --enable-default-standards ``` 2. To enable Security Hub without the default standards, include `--no-enable-default-standards`: ``` aws securityhub enable-security-hub --no-enable-default-standards ```",
+          "AuditProcedure": "Follow this process to evaluate AWS Security Hub configuration per region: **From Console:** 1. Sign in to the AWS Management Console and open the AWS Security Hub console at https://console.aws.amazon.com/securityhub/. 2. On the top right of the console, select the target Region. 3. If the Security Hub > Summary page is displayed, then Security Hub is set up for the selected region. 4. If presented with Setup Security Hub or Get Started With Security Hub, refer to the remediation steps. 5. Repeat steps 2 to 4 for each region. **From Command Line:** Run the following command to verify the Security Hub status: ``` aws securityhub describe-hub ``` This will list the Security Hub status by region. Check for a 'SubscribedAt' value. Example output: ``` {  HubArn: ,  SubscribedAt: 2022-08-19T17:06:42.398Z,  AutoEnableControls: true } ``` An error will be returned if Security Hub is not enabled. Example error: ``` An error occurred (InvalidAccessException) when calling the DescribeHub operation: Account  is not subscribed to AWS Security Hub ```",
+          "AdditionalInformation": "",
+          "References": "https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-get-started.html:https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-enable.html#securityhub-enable-api:https://awscli.amazonaws.com/v2/documentation/api/latest/reference/securityhub/enable-security-hub.html",
+          "DefaultValue": ""
+        }
+      ]
+    },
+    {
+      "Id": "5.2",
+      "Description": "Ensure no Network ACLs allow ingress from 0.0.0.0/0 to remote server administration ports",
+      "Checks": [
+        "ec2_networkacl_allow_ingress_any_port",
+        "ec2_networkacl_allow_ingress_tcp_port_22",
+        "ec2_networkacl_allow_ingress_tcp_port_3389"
+      ],
+      "Attributes": [
+        {
+          "Section": "5 Networking",
+          "Profile": "Level 1",
+          "AssessmentStatus": "Automated",
+          "Description": "The Network Access Control List (NACL) function provides stateless filtering of ingress and egress network traffic to AWS resources. It is recommended that no NACL allows unrestricted ingress access to remote server administration ports, such as SSH on port `22` and RDP on port `3389`, using either the TCP (6), UDP (17), or ALL (-1) protocols.",
+          "RationaleStatement": "Public access to remote server administration ports, such as 22 (when used for SSH, not SFTP) and 3389, increases the attack surface of resources and unnecessarily raises the risk of resource compromise.",
+          "ImpactStatement": "",
+          "RemediationProcedure": "**From Console:** Perform the following steps to remediate a network ACL: 1. Login to the AWS VPC Console at https://console.aws.amazon.com/vpc/home. 2. In the left pane, click `Network ACLs`. 3. For each network ACL that needs remediation, perform the following:  - Select the network ACL.  - Click the `Inbound Rules` tab.  - Click `Edit inbound rules`.  - Either A) update the Source field to a range other than 0.0.0.0/0, or B) click `Delete` to remove the offending inbound rule.  - Click `Save`.",
+          "AuditProcedure": "**From Console:** Perform the following steps to determine if the account is configured as prescribed: 1. Login to the AWS VPC Console at https://console.aws.amazon.com/vpc/home. 2. In the left pane, click `Network ACLs`. 3. For each network ACL, perform the following:  - Select the network ACL.  - Click the `Inbound Rules` tab.  - Ensure that no rule exists which has a port range that includes port `22` or `3389`, uses the protocols TCP (6), UDP (17), or ALL (-1), or other remote server administration ports for your environment, has a `Source` of `0.0.0.0/0`, and shows `ALLOW`. **Note:** A port value of `ALL` or a port range such as `0-3389` includes port `22`, `3389`, and potentially other remote server administration ports.",
+          "AdditionalInformation": "",
+          "References": "https://docs.aws.amazon.com/vpc/latest/userguide/vpc-network-acls.html:https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Security.html#VPC_Security_Comparison",
+          "DefaultValue": ""
+        }
+      ]
+    },
+    {
+      "Id": "5.3",
+      "Description": "Ensure no security groups allow ingress from 0.0.0.0/0 to remote server administration ports",
+      "Checks": [
+        "ec2_securitygroup_allow_ingress_from_internet_to_all_ports",
+        "ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_22",
+        "ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_3389"
+      ],
+      "Attributes": [
+        {
+          "Section": "5 Networking",
+          "Profile": "Level 1",
+          "AssessmentStatus": "Automated",
+          "Description": "Security groups provide stateful filtering of ingress and egress network traffic to AWS resources. It is recommended that no security group allows unrestricted ingress access to remote server administration ports, such as SSH on port `22` and RDP on port `3389`, using either the TCP (6), UDP (17), or ALL (-1) protocols.",
+          "RationaleStatement": "Public access to remote server administration ports, such as 22 (when used for SSH, not SFTP) and 3389, increases the attack surface of resources and unnecessarily raises the risk of resource compromise.",
+          "ImpactStatement": "When updating an existing environment, ensure that administrators have access to remote server administration ports through another mechanism before removing access by deleting the 0.0.0.0/0 inbound rule.",
+          "RemediationProcedure": "Perform the following to implement the prescribed state: 1. Login to the AWS VPC Console at [https://console.aws.amazon.com/vpc/home](https://console.aws.amazon.com/vpc/home). 2. In the left pane, click `Security Groups`. 3. For each security group, perform the following:  - Select the security group.  - Click the `Inbound Rules` tab.  - Click the `Edit inbound rules` button.  - Identify the rules to be edited or removed.  - Either A) update the Source field to a range other than 0.0.0.0/0, or B) click `Delete` to remove the offending inbound rule.  - Click `Save rules`.",
+          "AuditProcedure": "Perform the following to determine if the account is configured as prescribed: 1. Login to the AWS VPC Console at [https://console.aws.amazon.com/vpc/home](https://console.aws.amazon.com/vpc/home). 2. In the left pane, click `Security Groups`. 3. For each security group, perform the following:  - Select the security group.  - Click the `Inbound Rules` tab.  - Ensure that no rule exists which has a port range including port `22` or `3389`, uses the protocols TCP (6), UDP (17), or ALL (-1), or other remote server administration ports for your environment, and has a `Source` of `0.0.0.0/0`. **Note:** A port value of `ALL` or a port range such as `0-3389` includes port `22`, `3389`, and potentially other remote server administration ports.",
+          "AdditionalInformation": "",
+          "References": "https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-security-groups.html#deleting-security-group-rule",
+          "DefaultValue": ""
+        }
+      ]
+    },
+    {
+      "Id": "5.4",
+      "Description": "Ensure no security groups allow ingress from ::/0 to remote server administration ports",
+      "Checks": [
+        "ec2_securitygroup_allow_ingress_from_internet_to_all_ports",
+        "ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_22",
+        "ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_3389"
+      ],
+      "Attributes": [
+        {
+          "Section": "5 Networking",
+          "Profile": "Level 1",
+          "AssessmentStatus": "Automated",
+          "Description": "Security groups provide stateful filtering of ingress and egress network traffic to AWS resources. It is recommended that no security group allows unrestricted ingress access to remote server administration ports, such as SSH on port `22` and RDP on port `3389`.",
+          "RationaleStatement": "Public access to remote server administration ports, such as 22 (when used for SSH, not SFTP) and 3389, increases attack surface of resources and unnecessarily raises the risk of resource compromise.",
+          "ImpactStatement": "When updating an existing environment, ensure that administrators have access to remote server administration ports through another mechanism before removing access by deleting the ::/0 inbound rule.",
+          "RemediationProcedure": "Perform the following to implement the prescribed state: 1. Login to the AWS VPC Console at [https://console.aws.amazon.com/vpc/home](https://console.aws.amazon.com/vpc/home). 2. In the left pane, click `Security Groups`. 3. For each security group, perform the following:  - Select the security group.  - Click the `Inbound Rules` tab.  - Click the `Edit inbound rules` button.  - Identify the rules to be edited or removed.  - Either A) update the Source field to a range other than ::/0, or B) Click `Delete` to remove the offending inbound rule.  - Click `Save rules`.",
+          "AuditProcedure": "Perform the following to determine if the account is configured as prescribed: 1. Login to the AWS VPC Console at [https://console.aws.amazon.com/vpc/home](https://console.aws.amazon.com/vpc/home). 2. In the left pane, click `Security Groups`. 3. For each security group, perform the following:  - Select the security group.  - Click the `Inbound Rules` tab.  - Ensure that no rule exists which has a port range including port `22`, `3389`, or other remote server administration ports for your environment, and has a `Source` of `::/0`. **Note:** A port value of `ALL` or a port range such as `0-3389` includes port `22`, `3389`, and potentially other remote server administration ports.",
+          "AdditionalInformation": "",
+          "References": "https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-security-groups.html#deleting-security-group-rule",
+          "DefaultValue": ""
+        }
+      ]
+    },
+    {
+      "Id": "5.5",
+      "Description": "Ensure the default security group of every VPC restricts all traffic",
+      "Checks": [
+        "ec2_securitygroup_default_restrict_traffic"
+      ],
+      "Attributes": [
+        {
+          "Section": "5 Networking",
+          "Profile": "Level 2",
+          "AssessmentStatus": "Automated",
+          "Description": "A VPC comes with a default security group whose initial settings deny all inbound traffic, allow all outbound traffic, and allow all traffic between instances assigned to the security group. If a security group is not specified when an instance is launched, it is automatically assigned to this default security group. Security groups provide stateful filtering of ingress/egress network traffic to AWS resources. It is recommended that the default security group restrict all traffic, both inbound and outbound. The default VPC in every region should have its default security group updated to comply with the following:  - No inbound rules.  - No outbound rules. Any newly created VPCs will automatically contain a default security group that will need remediation to comply with this recommendation. **Note:** When implementing this recommendation, VPC flow logging is invaluable in determining the least privilege port access required by systems to work properly, as it can log all packet acceptances and rejections occurring under the current security groups. This dramatically reduces the primary barrier to least privilege engineering by discovering the minimum ports required by systems in the environment. Even if the VPC flow logging recommendation in this benchmark is not adopted as a permanent security measure, it should be used during any period of discovery and engineering for least privileged security groups.",
+          "RationaleStatement": "Configuring all VPC default security groups to restrict all traffic will encourage the development of least privilege security groups and promote the mindful placement of AWS resources into security groups, which will, in turn, reduce the exposure of those resources.",
+          "ImpactStatement": "Implementing this recommendation in an existing VPC that contains operating resources requires extremely careful migration planning, as the default security groups are likely enabling many ports that are unknown. Enabling VPC flow logging (for accepted connections) in an existing environment that is known to be breach-free will reveal the current pattern of ports being used for each instance to communicate successfully. The migration process should include: - Analyzing VPC flow logs to understand current traffic patterns. - Creating least privilege security groups based on the analyzed data. - Testing the new security group rules in a staging environment before applying them to production.",
+          "RemediationProcedure": "Perform the following to implement the prescribed state: **Security Group Members** 1. Identify AWS resources that exist within the default security group. 2. Create a set of least-privilege security groups for those resources. 3. Place the resources in those security groups, removing the resources noted in step 1 from the default security group. **Security Group State** 1. Login to the AWS VPC Console at [https://console.aws.amazon.com/vpc/home](https://console.aws.amazon.com/vpc/home). 2. Repeat the following steps for all VPCs, including the default VPC in each AWS region: 3. In the left pane, click `Security Groups`. 4. For each default security group, perform the following:  - Select the `default` security group.  - Click the `Inbound Rules` tab.  - Remove any inbound rules.  - Click the `Outbound Rules` tab.  - Remove any Outbound rules. **Recommended** IAM groups allow you to edit the name field. After remediating default group rules for all VPCs in all regions, edit this field to add text similar to DO NOT USE. DO NOT ADD RULES.",
+          "AuditProcedure": "Perform the following to determine if the account is configured as prescribed: **Security Group State** 1. Login to the AWS VPC Console at [https://console.aws.amazon.com/vpc/home](https://console.aws.amazon.com/vpc/home). 2. Repeat the following steps for all VPCs, including the default VPC in each AWS region: 3. In the left pane, click `Security Groups`. 4. For each default security group, perform the following:  - Select the `default` security group.  - Click the `Inbound Rules` tab and ensure no rules exist.  - Click the `Outbound Rules` tab and ensure no rules exist. **Security Group Members** 1. Login to the AWS VPC Console at [https://console.aws.amazon.com/vpc/home](https://console.aws.amazon.com/vpc/home). 2. Repeat the following steps for all default groups in all VPCs, including the default VPC in each AWS region: 3. In the left pane, click `Security Groups`. 4. Copy the ID of the default security group. 5. Change to the EC2 Management Console at https://console.aws.amazon.com/ec2/v2/home. 6. In the filter column type `Security Group ID : `.",
+          "AdditionalInformation": "",
+          "References": "https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html:https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-security-groups.html#default-security-group",
+          "DefaultValue": ""
+        }
+      ]
+    },
+    {
+      "Id": "5.6",
+      "Description": "Ensure routing tables for VPC peering are least access",
+      "Checks": [
+        "vpc_peering_routing_tables_with_least_privilege"
+      ],
+      "Attributes": [
+        {
+          "Section": "5 Networking",
+          "Profile": "Level 2",
+          "AssessmentStatus": "Manual",
+          "Description": "Once a VPC peering connection is established, routing tables must be updated to enable any connections between the peered VPCs. These routes can be as specific as desired, even allowing for the peering of a VPC to only a single host on the other side of the connection.",
+          "RationaleStatement": "Being highly selective in peering routing tables is a very effective way to minimize the impact of a breach, as resources outside of these routes are inaccessible to the peered VPC.",
+          "ImpactStatement": "",
+          "RemediationProcedure": "Remove and add route table entries to ensure that the least number of subnets or hosts required to accomplish the purpose of peering are routable. **From Command Line:** 1. For each `` that contains routes that are non-compliant with your routing policy (granting more access than desired), delete the non-compliant route: ``` aws ec2 delete-route --route-table-id  --destination-cidr-block  ``` 2. Create a new compliant route: ``` aws ec2 create-route --route-table-id  --destination-cidr-block  --vpc-peering-connection-id  ```",
+          "AuditProcedure": "Review the routing tables of peered VPCs to determine whether they route all subnets of each VPC and whether this is necessary to accomplish the intended purposes of peering the VPCs. **From Command Line:** 1. List all the route tables from a VPC and check if the GatewayId is pointing to a `` (e.g., pcx-1a2b3c4d) and if the DestinationCidrBlock is as specific as desired: ``` aws ec2 describe-route-tables --filter Name=vpc-id,Values= --query RouteTables[*].{RouteTableId:RouteTableId, VpcId:VpcId, Routes:Routes, AssociatedSubnets:Associations[*].SubnetId} ```",
+          "AdditionalInformation": "If an organization has an AWS Transit Gateway implemented in its VPC architecture, it should look to apply the recommendation above for a least access routing architecture at the AWS Transit Gateway level, in combination with what must be implemented at the standard VPC route table. More specifically, to route traffic between two or more VPCs via a Transit Gateway, VPCs must have an attachment to a Transit Gateway route table as well as a route. Therefore, to avoid routing traffic between VPCs, an attachment to the Transit Gateway route table should only be added where there is an intention to route traffic between the VPCs. As Transit Gateways are capable of hosting multiple route tables, it is possible to group VPCs by attaching them to a common route table.",
+          "References": "https://docs.aws.amazon.com/AmazonVPC/latest/PeeringGuide/peering-configurations-partial-access.html:https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/create-vpc-peering-connection.html",
+          "DefaultValue": ""
+        }
+      ]
+    },
+    {
+      "Id": "5.7",
+      "Description": "Ensure that the EC2 Metadata Service only allows IMDSv2",
+      "Checks": [
+        "ec2_instance_imdsv2_enabled"
+      ],
+      "Attributes": [
+        {
+          "Section": "5 Networking",
+          "Profile": "Level 1",
+          "AssessmentStatus": "Automated",
+          "Description": "When enabling the Metadata Service on AWS EC2 instances, users have the option of using either Instance Metadata Service Version 1 (IMDSv1; a request/response method) or Instance Metadata Service Version 2 (IMDSv2; a session-oriented method).",
+          "RationaleStatement": "Instance metadata is data about your instance that you can use to configure or manage the running instance. Instance metadata is divided into [categories](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html), such as host name, events, and security groups. When enabling the Metadata Service on AWS EC2 instances, users have the option of using either Instance Metadata Service Version 1 (IMDSv1; a request/response method) or Instance Metadata Service Version 2 (IMDSv2; a session-oriented method). With IMDSv2, every request is now protected by session authentication. A session begins and ends a series of requests that software running on an EC2 instance uses to access the locally stored EC2 instance metadata and credentials. Allowing Version 1 of the service may open EC2 instances to Server-Side Request Forgery (SSRF) attacks, so Amazon recommends utilizing Version 2 for better instance security.",
+          "ImpactStatement": "",
+          "RemediationProcedure": "From Console: 1. Sign in to the AWS Management Console and navigate to the EC2 dashboard at [https://console.aws.amazon.com/ec2/](https://console.aws.amazon.com/ec2/). 2. In the left navigation panel, under the `INSTANCES` section, choose `Instances`. 3. Select the EC2 instance that you want to examine. 4. Choose `Actions > Instance Settings > Modify instance metadata options`. 5. Set `Instance metadata service` to `Enable`. 6. Set `IMDSv2` to `Required`. 7. Repeat steps 1-6 to perform the remediation process for other EC2 instances in all applicable AWS region(s). From Command Line: 1. Run the `describe-instances` command, applying the appropriate filters to list the IDs of all existing EC2 instances currently available in the selected region:  ```   aws ec2 describe-instances --region  --output table --query Reservations[*].Instances[*].InstanceId  ``` 2. The command output should return a table with the requested instance IDs. 3. Run the `modify-instance-metadata-options` command with an instance ID obtained from the previous step to update the Instance Metadata Version:  ```  aws ec2 modify-instance-metadata-options --instance-id  --http-tokens required --region   ``` 4. Repeat steps 1-3 to perform the remediation process for other EC2 instances in the same AWS region. 5. Change the region by updating `--region` and repeat the process for other regions.",
+          "AuditProcedure": "From Console: 1. Sign in to the AWS Management Console and navigate to the EC2 dashboard at https://console.aws.amazon.com/ec2/. 2. In the left navigation panel, under the `INSTANCES` section, choose `Instances`. 3. Select the EC2 instance that you want to examine. 4. Check the `IMDSv2` status, and ensure that it is set to `Required`. From Command Line: 1. Run the `describe-instances` command using appropriate filters to list the IDs of all existing EC2 instances currently available in the selected region:  ```  aws ec2 describe-instances --region  --output table --query Reservations[*].Instances[*].InstanceId  ``` 2. The command output should return a table with the requested instance IDs. 3. Run the `describe-instances` command using the instance ID returned in the previous step and apply custom filtering to determine whether the selected instance is using IMDSv2:  ```  aws ec2 describe-instances --region  --instance-ids  --query Reservations[*].Instances[*].MetadataOptions --output table  ``` 4. Ensure that for all EC2 instances, `HttpTokens` is set to `required` and `State` is set to `applied`. 5. Repeat steps 3 and 4 to verify the other EC2 instances provisioned within the current region. 6. Repeat steps 1โ€“5 to perform the audit process for other AWS regions.",
+          "AdditionalInformation": "",
+          "References": "https://aws.amazon.com/blogs/security/defense-in-depth-open-firewalls-reverse-proxies-ssrf-vulnerabilities-ec2-instance-metadata-service/:https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instances.html",
+          "DefaultValue": ""
+        }
+      ]
+    },
+    {
+      "Id": "5.1.1",
+      "Description": "Ensure EBS volume encryption is enabled in all regions",
+      "Checks": [
+        "ec2_ebs_volume_encryption"
+      ],
+      "Attributes": [
+        {
+          "Section": "5 Networking",
+          "SubSection": "5.1 Elastic Compute Cloud (EC2)",
+          "Profile": "Level 1",
+          "AssessmentStatus": "Automated",
+          "Description": "Elastic Compute Cloud (EC2) supports encryption at rest when using the Elastic Block Store (EBS) service. While disabled by default, forcing encryption at EBS volume creation is supported.",
+          "RationaleStatement": "Encrypting data at rest reduces the likelihood of unintentional exposure and can nullify the impact of disclosure if the encryption remains unbroken.",
+          "ImpactStatement": "Losing access to or removing the KMS key used by the EBS volumes will result in the inability to access the volumes.",
+          "RemediationProcedure": "**From Console:** 1. Login to the AWS Management Console and open the Amazon EC2 console using https://console.aws.amazon.com/ec2/. 2. Under `Account attributes`, click `EBS encryption`. 3. Click `Manage`. 4. Check the `Enable` box. 5. Click `Update EBS encryption`. 6. Repeat for each region in which EBS volume encryption is not enabled by default. **Note:** EBS volume encryption is configured per region. **From Command Line:** 1. Run the following command: ``` aws --region  ec2 enable-ebs-encryption-by-default ``` 2. Verify that `EbsEncryptionByDefault: true` is displayed. 3. Repeat for each region in which EBS volume encryption is not enabled by default. **Note:** EBS volume encryption is configured per region.",
+          "AuditProcedure": "**From Console:** 1. Login to the AWS Management Console and open the Amazon EC2 console using https://console.aws.amazon.com/ec2/. 2. Under `Settings`, click `EBS encryption`. 3. Verify `Always encrypt new EBS volumes` displays `Enabled`. 4. Repeat for each region in use. **Note:** EBS volume encryption is configured per region. **From Command Line:** 1. Run the following command: ``` aws --region  ec2 get-ebs-encryption-by-default ``` 2. Verify that `EbsEncryptionByDefault: true` is displayed. 3. Repeat for each region in use. **Note:** EBS volume encryption is configured per region.",
+          "AdditionalInformation": "Default EBS volume encryption only applies to newly created EBS volumes; existing EBS volumes are **not** converted automatically.",
+          "References": "https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html:https://aws.amazon.com/blogs/aws/new-opt-in-to-default-encryption-for-new-ebs-volumes/",
+          "DefaultValue": ""
+        }
+      ]
+    },
+    {
+      "Id": "5.1.2",
+      "Description": "Ensure CIFS access is restricted to trusted networks to prevent unauthorized access",
+      "Checks": [
+        "ec2_instance_port_cifs_exposed_to_internet"
+      ],
+      "Attributes": [
+        {
+          "Section": "5 Networking",
+          "SubSection": "5.1 Elastic Compute Cloud (EC2)",
+          "Profile": "Level 1",
+          "AssessmentStatus": "Automated",
+          "Description": "Common Internet File System (CIFS) is a network file-sharing protocol that allows systems to share files over a network. However, unrestricted CIFS access can expose your data to unauthorized users, leading to potential security risks. It is important to restrict CIFS access to only trusted networks and users to prevent unauthorized access and data breaches.",
+          "RationaleStatement": "Allowing unrestricted CIFS access can lead to significant security vulnerabilities, as it may allow unauthorized users to access sensitive files and data. By restricting CIFS access to known and trusted networks, you can minimize the risk of unauthorized access and protect sensitive data from exposure to potential attackers. Implementing proper network access controls and permissions is essential for maintaining the security and integrity of your file-sharing systems.",
+          "ImpactStatement": "Restricting CIFS access may require additional configuration and management effort. However, the benefits of enhanced security and reduced risk of unauthorized access to sensitive data far outweigh the potential challenges.",
+          "RemediationProcedure": "**From Console:** 1. Login to the AWS Management Console. 2. Navigate to the EC2 Dashboard and select the Security Groups section under `Network & Security`. 3. Identify the security group that allows unrestricted ingress on port 445. 4. Select the security group and click the `Edit Inbound Rules` button. 5. Locate the rule allowing unrestricted access on port 445 (typically listed as `0.0.0.0/0` or `::/0`). 6. Modify the rule to restrict access to specific IP ranges or trusted networks only. 7. Save the changes to the security group. **From Command Line:** 1. Run the following command to remove or modify the unrestricted rule for CIFS access:  ```  aws ec2 revoke-security-group-ingress --region  --group-id  --protocol tcp --port 445 --cidr 0.0.0.0/0  ```  - Optionally, run the `authorise-security-group-ingress` command to create a new rule, specifying a trusted CIDR range instead of `0.0.0.0/0`. 2. Confirm the changes by describing the security group again and ensuring the unrestricted access rule has been removed or appropriately restricted:  ```  aws ec2 describe-security-groups --region  --group-ids  --query 'SecurityGroups[*].IpPermissions[?ToPort==`445`].{CIDR:IpRanges[*].CidrIp,Port:ToPort}'  ``` 3. Repeat the remediation for other security groups and regions as necessary.",
+          "AuditProcedure": "**From Console:** 1. Login to the AWS Management Console. 2. Navigate to the EC2 Dashboard and select the Security Groups section under `Network & Security`. 3. Identify the security groups associated with instances or resources that may be using CIFS. 4. Review the inbound rules of each security group to check for rules that allow unrestricted access on port 445 (the port used by CIFS).  - Specifically, look for inbound rules that allow access from `0.0.0.0/0` or `::/0` on port 445. 5. Document any instances where unrestricted access is allowed and verify whether it is necessary for the specific use case. **From Command Line:** 1. Run the following command to list all security groups and identify those associated with CIFS:  ```  aws ec2 describe-security-groups --region  --query 'SecurityGroups[*].GroupId'  ``` 2. Check for any inbound rules that allow unrestricted access on port 445 using the following command:  ```  aws ec2 describe-security-groups --region  --group-ids  --query 'SecurityGroups[*].IpPermissions[?ToPort==`445`].{CIDR:IpRanges[*].CidrIp,Port:ToPort}'  ```  - Look for `0.0.0.0/0` or `::/0` in the output, which indicates unrestricted access. 3. Repeat the audit for other regions and security groups as necessary.",
+          "AdditionalInformation": "",
+          "References": "",
+          "DefaultValue": ""
+        }
+      ]
+    }
+  ]
+}
diff --git a/prowler/compliance/aws/kisa_isms_p_2023_aws.json b/prowler/compliance/aws/kisa_isms_p_2023_aws.json
index f4f9736e54..28d1fc4406 100644
--- a/prowler/compliance/aws/kisa_isms_p_2023_aws.json
+++ b/prowler/compliance/aws/kisa_isms_p_2023_aws.json
@@ -12,7 +12,7 @@
       "Attributes": [
         {
           "Domain": "1. Establishment and Operation of the Management System",
-          "Subdomain": "1.1. Management System",
+          "Subdomain": "1.1 Management System",
           "Section": "1.1.1 Executive Participation",
           "AuditChecklist": [
             "Is there documentation outlining the responsibilities and roles of executives to ensure their participation in the establishment and operation of the information protection and personal information protection management system?",
@@ -41,7 +41,7 @@
       "Attributes": [
         {
           "Domain": "1. Establishment and Operation of the Management System",
-          "Subdomain": "1.1. Management System",
+          "Subdomain": "1.1 Management System",
           "Section": "1.1.2 Designation of Chief Officers",
           "AuditChecklist": [
             "Has the CEO officially designated a chief officer responsible for overseeing information protection and personal information protection?",
@@ -77,7 +77,7 @@
       "Attributes": [
         {
           "Domain": "1. Establishment and Operation of the Management System",
-          "Subdomain": "1.1. Management System",
+          "Subdomain": "1.1 Management System",
           "Section": "1.1.3 Organization Structure",
           "AuditChecklist": [
             "Has the organization established and operated a working group with expertise to support the work of the CISO and CPO and systematically implement the organization's information protection and personal information protection activities?",
@@ -112,7 +112,7 @@
       "Attributes": [
         {
           "Domain": "1. Establishment and Operation of the Management System",
-          "Subdomain": "1.1. Management System",
+          "Subdomain": "1.1 Management System",
           "Section": "1.1.4 Scope Setting",
           "AuditChecklist": [
             "Has the organization set the scope of the management system to include key assets that may affect core services and personal information processing?",
@@ -145,7 +145,7 @@
       "Attributes": [
         {
           "Domain": "1. Establishment and Operation of the Management System",
-          "Subdomain": "1.1. Management System",
+          "Subdomain": "1.1 Management System",
           "Section": "1.1.5 Policy Establishment",
           "AuditChecklist": [
             "Has the organization established a top-level information protection and personal information protection policy that serves as the foundation for all information protection and personal information protection activities?",
@@ -180,7 +180,7 @@
       "Attributes": [
         {
           "Domain": "1. Establishment and Operation of the Management System",
-          "Subdomain": "1.1. Management System",
+          "Subdomain": "1.1 Management System",
           "Section": "1.1.6 Resource Allocation",
           "AuditChecklist": [
             "Has the organization secured personnel with expertise in the fields of information protection and personal information protection?",
@@ -216,7 +216,7 @@
       "Attributes": [
         {
           "Domain": "1. Establishment and Operation of the Management System",
-          "Subdomain": "1.2. Risk Management",
+          "Subdomain": "1.2 Risk Management",
           "Section": "1.2.1 Identification of Information Assets",
           "AuditChecklist": [
             "Has the organization established classification criteria for information assets and identified all assets within the scope of the information protection and personal information protection management system, maintaining them in a list?",
@@ -249,7 +249,7 @@
       "Attributes": [
         {
           "Domain": "1. Establishment and Operation of the Management System",
-          "Subdomain": "1.2. Risk Management",
+          "Subdomain": "1.2 Risk Management",
           "Section": "1.2.2 Status and Flow Analysis",
           "AuditChecklist": [
             "Has the organization identified and documented the status and workflows of information services across all areas of the management system?",
@@ -279,7 +279,7 @@
       "Attributes": [
         {
           "Domain": "1. Establishment and Operation of the Management System",
-          "Subdomain": "1.2. Risk Management",
+          "Subdomain": "1.2 Risk Management",
           "Section": "1.2.3 Risk Assessment",
           "AuditChecklist": [
             "Has the organization defined methods for identifying and assessing risks that could arise from various aspects, depending on the characteristics of the organization or service?",
@@ -322,7 +322,7 @@
       "Attributes": [
         {
           "Domain": "1. Establishment and Operation of the Management System",
-          "Subdomain": "1.2. Risk Management",
+          "Subdomain": "1.2 Risk Management",
           "Section": "1.2.4 Selection of Protective Measures",
           "AuditChecklist": [
             "Has the organization developed risk treatment strategies (e.g., risk reduction, avoidance, transfer, acceptance) and selected protective measures to address the identified risks?",
@@ -352,7 +352,7 @@
       "Attributes": [
         {
           "Domain": "1. Establishment and Operation of the Management System",
-          "Subdomain": "1.3. Operation of the Management System",
+          "Subdomain": "1.3 Operation of the Management System",
           "Section": "1.3.1 Implementation of Protective Measures",
           "AuditChecklist": [
             "Are the protective measures effectively implemented according to the implementation plan, and are the implementation results reported to management to verify their accuracy and effectiveness?",
@@ -384,7 +384,7 @@
       "Attributes": [
         {
           "Domain": "1. Establishment and Operation of the Management System",
-          "Subdomain": "1.3. Operation of the Management System",
+          "Subdomain": "1.3 Operation of the Management System",
           "Section": "1.3.2 Sharing of Protective Measures",
           "AuditChecklist": [
             "Has the organization clearly identified the departments and personnel responsible for the operation or implementation of the protective measures?",
@@ -409,7 +409,7 @@
       "Attributes": [
         {
           "Domain": "1. Establishment and Operation of the Management System",
-          "Subdomain": "1.3. Operation of the Management System",
+          "Subdomain": "1.3 Operation of the Management System",
           "Section": "1.3.3 Operation Status Management",
           "AuditChecklist": [
             "Are information protection and personal information protection activities that need to be performed periodically or continuously for the operation of the management system documented and managed?",
@@ -439,7 +439,7 @@
       "Attributes": [
         {
           "Domain": "1. Establishment and Operation of the Management System",
-          "Subdomain": "1.4. Inspection and Improvement of the Management System",
+          "Subdomain": "1.4 Inspection and Improvement of the Management System",
           "Section": "1.4.1 Review of Legal Requirements Compliance",
           "AuditChecklist": [
             "Is the organization regularly identifying and maintaining up-to-date legal requirements related to information protection and personal information protection?",
@@ -477,7 +477,7 @@
       "Attributes": [
         {
           "Domain": "1. Establishment and Operation of the Management System",
-          "Subdomain": "1.4. Inspection and Improvement of the Management System",
+          "Subdomain": "1.4 Inspection and Improvement of the Management System",
           "Section": "1.4.2 Management System Audit",
           "AuditChecklist": [
             "Has the organization established a management system audit plan that includes the criteria, scope, frequency, and qualifications for audit personnel to audit the management system's effectiveness in accordance with legal requirements and established policies?",
@@ -508,7 +508,7 @@
       "Attributes": [
         {
           "Domain": "1. Establishment and Operation of the Management System",
-          "Subdomain": "1.4. Management System Inspection and Improvement",
+          "Subdomain": "1.4 Inspection and Improvement of the Management System",
           "Section": "1.4.3 Management System Improvement",
           "AuditChecklist": [
             "Are the root causes of the issues identified during legal compliance reviews and management system inspections analyzed, and are preventive and improvement measures established and implemented?",
@@ -541,7 +541,7 @@
       "Attributes": [
         {
           "Domain": "2. Control Measures Requirements",
-          "Subdomain": "2.1. Policies, Organization, and Asset Management",
+          "Subdomain": "2.1 Policy, Organization, Asset Management",
           "Section": "2.1.1 Policy Maintenance",
           "AuditChecklist": [
             "Has the organization established and implemented a procedure for regularly reviewing the validity of information protection and personal information protection policies and implementation documents?",
@@ -577,7 +577,7 @@
       "Attributes": [
         {
           "Domain": "2. Control Measures Requirements",
-          "Subdomain": "2.1. Policies, Organization, and Asset Management",
+          "Subdomain": "2.1 Policy, Organization, Asset Management",
           "Section": "2.1.2 Organization Maintenance",
           "AuditChecklist": [
             "Are the roles and responsibilities of those responsible for and involved in information protection and personal information protection clearly defined?",
@@ -624,8 +624,8 @@
       ],
       "Attributes": [
         {
-          "Domain": "2. Protection Requirements",
-          "Subdomain": "2.1. Policy, Organization, Asset Management",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.1 Policy, Organization, Asset Management",
           "Section": "2.1.3 Management of Information Assets",
           "AuditChecklist": [
             "Are handling procedures (creation, introduction, storage, use, disposal) and protection measures defined and implemented according to the security classification of information assets?",
@@ -657,8 +657,8 @@
       ],
       "Attributes": [
         {
-          "Domain": "2. Protection Requirements",
-          "Subdomain": "2.2. Personnel Security",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.2 Human Security",
           "Section": "2.2.1 Designation and Management of Key Personnel",
           "AuditChecklist": [
             "Are the criteria for key duties, such as handling personal information and important information or accessing key systems, clearly defined?",
@@ -693,8 +693,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Domain": "2. Protection Requirements",
-          "Subdomain": "2.2. Personnel Security",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.2 Human Security",
           "Section": "2.2.2 Separation of Duties",
           "AuditChecklist": [
             "Are criteria for the separation of duties established and applied to prevent potential harm from the misuse or abuse of authority?",
@@ -720,8 +720,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Domain": "2. Protection Measure Requirements",
-          "Subdomain": "2.2. Human Security",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.2 Human Security",
           "Section": "2.2.3 Security Pledge",
           "AuditChecklist": [
             "When hiring new personnel, is there a signed security and personal information protection agreement that specifies their responsibilities?",
@@ -750,8 +750,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Domain": "2. Protection Measure Requirements",
-          "Subdomain": "2.2. Human Security",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.2 Human Security",
           "Section": "2.2.4 Awareness and Training",
           "AuditChecklist": [
             "Is an annual training plan approved by management, detailing the timing, duration, target audience, content, and method of information protection and personal information protection training?",
@@ -788,8 +788,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Domain": "2. Protection Measure Requirements",
-          "Subdomain": "2.2. Human Security",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.2 Human Security",
           "Section": "2.2.5 Management of Resignation and Job Changes",
           "AuditChecklist": [
             "Are personnel changes (e.g., resignation, job changes, department transfers, leave of absence) shared among HR, information protection, personal information protection, and IT system operations departments?",
@@ -820,8 +820,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Domain": "2. Protection Requirements",
-          "Subdomain": "2.2. Human Security",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.2 Human Security",
           "Section": "2.2.6 Actions in Case of Security Violations",
           "AuditChecklist": [
             "Has the organization established disciplinary measures for employees and relevant external parties in case of violations of information protection and personal information protection responsibilities and obligations under laws, regulations, and internal policies?",
@@ -847,8 +847,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Domain": "2. Protection Requirements",
-          "Subdomain": "2.3. External Security",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.3 External Security",
           "Section": "2.3.1 Management of External Parties",
           "AuditChecklist": [
             "Has the organization identified the status of outsourcing and the use of external facilities and services within the scope of the management system?",
@@ -878,8 +878,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Domain": "2. Protection Requirements",
-          "Subdomain": "2.3. External Security",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.3 External Security",
           "Section": "2.3.2 Security in Contracts with External Parties",
           "AuditChecklist": [
             "When selecting external services or outsourcing vendors related to the handling of important information and personal information, does the organization follow procedures to consider the vendors' capabilities in information protection and personal information protection?",
@@ -910,8 +910,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Domain": "2. Protection Measure Requirements",
-          "Subdomain": "2.3. External Party Security",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.3 External Security",
           "Section": "2.3.3 External Party Security Implementation Management",
           "AuditChecklist": [
             "Are periodic inspections or audits conducted to ensure external parties comply with information protection and personal information protection requirements specified in contracts, agreements, and internal policies?",
@@ -945,8 +945,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Domain": "2. Protection Measure Requirements",
-          "Subdomain": "2.3. External Party Security",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.3 External Security",
           "Section": "2.3.4 Security for External Party Contract Changes and Expiry",
           "AuditChecklist": [
             "Has the organization established and implemented security measures to ensure the return of information assets, deletion of information system access accounts, and the acquisition of confidentiality agreements in accordance with official procedures when an external party contract expires, a task is completed, or there is a personnel change?",
@@ -977,8 +977,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Domain": "2. Protection Measure Requirements",
-          "Subdomain": "2.4. Physical Security",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.4 Physical Security",
           "Section": "2.4.1 Designation of Protected Zones",
           "AuditChecklist": [
             "Has the organization established criteria for designating physical protection zones such as controlled areas, restricted areas, and reception areas to protect personal and sensitive information, documents, storage media, key facilities, and systems from physical and environmental threats?",
@@ -1008,8 +1008,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Domain": "2. Protective Measures Requirements",
-          "Subdomain": "2.4. Physical Security",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.4 Physical Security",
           "Section": "2.4.2 Access Control",
           "AuditChecklist": [
             "Is access to protected areas controlled so that only authorized personnel are allowed to enter according to access procedures?",
@@ -1040,8 +1040,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Domain": "2. Protective Measures Requirements",
-          "Subdomain": "2.4. Physical Security",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.4 Physical Security",
           "Section": "2.4.3 Information System Protection",
           "AuditChecklist": [
             "Are information systems placed in separated locations based on their importance, usage, and characteristics?",
@@ -1068,8 +1068,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Domain": "2. Protective Measures Requirements",
-          "Subdomain": "2.4. Physical Security",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.4 Physical Security",
           "Section": "2.4.4 Operation of Protective Facilities",
           "AuditChecklist": [
             "Are necessary facilities established and operational procedures set up based on the importance and characteristics of each protected area to prevent disasters such as fire, flood, and power failure caused by human error or natural disasters?",
@@ -1100,8 +1100,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Domain": "2. Protection Requirements",
-          "Subdomain": "2.4. Physical Security",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.4 Physical Security",
           "Section": "2.4.5 Operations in Secure Zones",
           "AuditChecklist": [
             "When operations within secure zones, such as the introduction and maintenance of information systems, are required, are formal procedures for application and execution of such operations established and implemented?",
@@ -1127,8 +1127,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Domain": "2. Protection Requirements",
-          "Subdomain": "2.4. Physical Security",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.4 Physical Security",
           "Section": "2.4.6 Device Control for Inbound and Outbound",
           "AuditChecklist": [
             "Are control procedures established and implemented to prevent security incidents such as information leakage and malware infection when information systems, mobile devices, storage media, etc., are brought into or taken out of secure zones?",
@@ -1157,8 +1157,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Domain": "2. Protection Requirements",
-          "Subdomain": "2.4. Physical Security",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.4 Physical Security",
           "Section": "2.4.7 Work Environment Security",
           "AuditChecklist": [
             "Are protection measures established and implemented for shared facilities and office equipment such as document storage, shared PCs, multifunction printers, file servers, etc.?",
@@ -1215,8 +1215,8 @@
       ],
       "Attributes": [
         {
-          "Domain": "2. Protection Measure Requirements",
-          "Subdomain": "2.5. Authentication and Access Management",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.5 Authentication and Access Management",
           "Section": "2.5.1 User Account Management",
           "AuditChecklist": [
             "Has the organization established and implemented formal procedures for registering, changing, and deleting user accounts and access rights to information systems, personal information, and critical information?",
@@ -1248,8 +1248,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Domain": "2. Protection Measure Requirements",
-          "Subdomain": "2.5. Authentication and Access Management",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.5 Authentication and Access Management",
           "Section": "2.5.2 User Identification",
           "AuditChecklist": [
             "Are unique identifiers assigned to users and personal information handlers in information systems and personal information processing systems, and is the use of easily guessable identifiers restricted?",
@@ -1309,8 +1309,8 @@
       ],
       "Attributes": [
         {
-          "Domain": "2. Protection Measure Requirements",
-          "Subdomain": "2.5. Authentication and Authorization Management",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.5 Authentication and Access Management",
           "Section": "2.5.3 User Authentication",
           "AuditChecklist": [
             "Is access to information systems and personal information processing systems controlled through secure user authentication procedures, login attempt limitations, and warnings for illegal login attempts?",
@@ -1354,8 +1354,8 @@
       ],
       "Attributes": [
         {
-          "Domain": "2. Protection Measure Requirements",
-          "Subdomain": "2.5. Authentication and Authorization Management",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.5 Authentication and Access Management",
           "Section": "2.5.4 Password Management",
           "AuditChecklist": [
             "Are procedures for managing and creating secure user passwords for information systems established and implemented?",
@@ -1397,8 +1397,8 @@
       ],
       "Attributes": [
         {
-          "Domain": "2. Protection Measures Requirements",
-          "Subdomain": "2.5. Authentication and Privilege Management",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.5 Authentication and Access Management",
           "Section": "2.5.5 Management of Special Accounts and Privileges",
           "AuditChecklist": [
             "Is there a formal privilege request and approval process established and implemented to ensure that special privileges, such as administrative privileges, are only granted to a minimal number of people?",
@@ -1445,8 +1445,8 @@
       ],
       "Attributes": [
         {
-          "Domain": "2. Protection Measures Requirements",
-          "Subdomain": "2.5. Authentication and Privilege Management",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.5 Authentication and Access Management",
           "Section": "2.5.6 Review of Access Rights",
           "AuditChecklist": [
             "Are the histories of account and access right creation, registration, granting, use, modification, and deletion for information systems, personal information, and important information being recorded?",
@@ -1590,8 +1590,8 @@
       ],
       "Attributes": [
         {
-          "Domain": "2. Control Measures",
-          "Subdomain": "2.6. Access Control",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.6 Access Control",
           "Section": "2.6.1 Network Access",
           "AuditChecklist": [
             "Has the organization identified all access paths to its network and ensured that internal networks are controlled so that only authorized users can access them according to the access control policy?",
@@ -1651,8 +1651,8 @@
       ],
       "Attributes": [
         {
-          "Domain": "2. Protection Requirements",
-          "Subdomain": "2.6. Access Control",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.6 Access Control",
           "Section": "2.6.2 Access to Information Systems",
           "AuditChecklist": [
             "Have users, access locations, and access means allowed to access operating systems (OS) of information systems such as servers, network systems, and security systems been defined and controlled?",
@@ -1687,8 +1687,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Domain": "2. Protection Requirements",
-          "Subdomain": "2.6. Access Control",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.6 Access Control",
           "Section": "2.6.3 Access to Applications",
           "AuditChecklist": [
             "Are access rights to applications granted differentially based on the user's tasks to control access to sensitive information?",
@@ -1769,8 +1769,8 @@
       ],
       "Attributes": [
         {
-          "Domain": "2. Protection Measures Requirements",
-          "Subdomain": "2.6. Access Control",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.6 Access Control",
           "Section": "2.6.4 Database Access",
           "AuditChecklist": [
             "Are you identifying the information stored and managed in the database, such as the table list?",
@@ -1804,8 +1804,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Domain": "2. Protection Measures Requirements",
-          "Subdomain": "2.6. Access Control",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.6 Access Control",
           "Section": "2.6.5 Wireless Network Access",
           "AuditChecklist": [
             "When using a wireless network for business purposes, are you establishing and implementing protection measures such as authentication and encryption of transmitted and received data to ensure the security of the wireless AP and network segment?",
@@ -1864,8 +1864,8 @@
       ],
       "Attributes": [
         {
-          "Domain": "2. Protective Measures Requirements",
-          "Subdomain": "2.6. Access Control",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.6 Access Control",
           "Section": "2.6.6 Remote Access Control",
           "AuditChecklist": [
             "Is remote operation of information systems through external networks such as the internet prohibited in principle, and are compensatory measures in place if allowed for unavoidable reasons such as incident response?",
@@ -1922,8 +1922,8 @@
       ],
       "Attributes": [
         {
-          "Domain": "2. Protective Measures Requirements",
-          "Subdomain": "2.6. Access Control",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.6 Access Control",
           "Section": "2.6.7 Internet Access Control",
           "AuditChecklist": [
             "Is there an established and implemented policy to control internet access for work PCs used for key duties and personal information handling terminals?",
@@ -2025,8 +2025,8 @@
       ],
       "Attributes": [
         {
-          "Domain": "2. Protection Measures Requirements",
-          "Subdomain": "2.7. Application of Encryption",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.7 Application of Encryption",
           "Section": "2.7.1 Application of Encryption Policy",
           "AuditChecklist": [
             "Has an encryption policy been established that includes encryption targets, encryption strength, and encryption usage in consideration of legal requirements for the protection of personal and important information?",
@@ -2069,8 +2069,8 @@
       ],
       "Attributes": [
         {
-          "Domain": "2. Security Control Requirements",
-          "Subdomain": "2.7. Application of Encryption",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.7 Application of Encryption",
           "Section": "2.7.2 Cryptographic Key Management",
           "AuditChecklist": [
             "Are procedures for the generation, use, storage, distribution, modification, recovery, and destruction of cryptographic keys established and implemented?",
@@ -2116,8 +2116,8 @@
       ],
       "Attributes": [
         {
-          "Domain": "2. Security Control Requirements",
-          "Subdomain": "2.8. Security for Information System Introduction and Development",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.8 Security in Information System Introduction and Development",
           "Section": "2.8.1 Definition of Security Requirements",
           "AuditChecklist": [
             "When introducing, developing, or modifying an information system, are procedures for reviewing the validity of information protection and personal information protection aspects and for acquisition established and implemented?",
@@ -2167,8 +2167,8 @@
       ],
       "Attributes": [
         {
-          "Domain": "2. Security Control Requirements",
-          "Subdomain": "2.8. Security for Information System Introduction and Development",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.8 Security in Information System Introduction and Development",
           "Section": "2.8.2 Review and Testing of Security Requirements",
           "AuditChecklist": [
             "When introducing, developing, or modifying an information system, are tests conducted to verify whether the security requirements defined during the analysis and design stages have been effectively applied?",
@@ -2208,8 +2208,8 @@
       ],
       "Attributes": [
         {
-          "Domain": "2. Security Requirements for Protection Measures",
-          "Subdomain": "2.8. Security for Information System Introduction and Development",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.8 Security in Information System Introduction and Development",
           "Section": "2.8.3 Separation of Test and Production Environments",
           "AuditChecklist": [
             "Are development and test systems separated from the production system?",
@@ -2237,8 +2237,8 @@
       ],
       "Attributes": [
         {
-          "Domain": "2. Protection Measure Requirements",
-          "Subdomain": "2.8. Security in Information System Introduction and Development",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.8 Security in Information System Introduction and Development",
           "Section": "2.8.4 Test Data Security",
           "AuditChecklist": [
             "Is the use of actual operational data restricted during the development and testing of information systems?",
@@ -2269,8 +2269,8 @@
       ],
       "Attributes": [
         {
-          "Domain": "2. Protection Measure Requirements",
-          "Subdomain": "2.8. Security in Information System Introduction and Development",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.8 Security in Information System Introduction and Development",
           "Section": "2.8.5 Source Program Management",
           "AuditChecklist": [
             "Have procedures been established and implemented to control access to source programs by unauthorized persons?",
@@ -2297,8 +2297,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Domain": "2. Protection Measure Requirements",
-          "Subdomain": "2.8. Security in Information System Introduction and Development",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.8 Security in Information System Introduction and Development",
           "Section": "2.8.6 Transition to Operational Environment",
           "AuditChecklist": [
             "Have control procedures been established and implemented to safely transition newly introduced, developed, or modified systems to the operational environment?",
@@ -2341,8 +2341,8 @@
       ],
       "Attributes": [
         {
-          "Domain": "2. Protection Measure Requirements",
-          "Subdomain": "2.9. System and Service Operations Management",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.9 System and Service Operation Management",
           "Section": "2.9.1 Change Management",
           "AuditChecklist": [
             "Have procedures been established and implemented for changes to assets related to information systems (hardware, operating systems, commercial software packages, etc.)?",
@@ -2409,8 +2409,8 @@
       ],
       "Attributes": [
         {
-          "Domain": "2. Protection Measure Requirements",
-          "Subdomain": "2.9. System and Service Operations Management",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.9 System and Service Operation Management",
           "Section": "2.9.2 Performance and Fault Management",
           "AuditChecklist": [
             "Have procedures been established and implemented to continuously monitor performance and capacity to ensure the availability of information systems?",
@@ -2480,8 +2480,8 @@
       ],
       "Attributes": [
         {
-          "Domain": "2. Protection Measure Requirements",
-          "Subdomain": "2.9. System and Service Operation Management",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.9 System and Service Operation Management",
           "Section": "2.9.3 Backup and Recovery Management",
           "AuditChecklist": [
             "Have backup and recovery procedures been established and implemented, including targets, frequency, methods, and procedures?",
@@ -2595,8 +2595,8 @@
       ],
       "Attributes": [
         {
-          "Domain": "2. Protection Measure Requirements",
-          "Subdomain": "2.9. System and Service Operation Management",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.9 System and Service Operation Management",
           "Section": "2.9.4 Log and Access Record Management",
           "AuditChecklist": [
             "Has the organization established log management procedures for information systems such as servers, applications, security systems, and network systems, and is it generating and storing the necessary logs accordingly?",
@@ -2658,8 +2658,8 @@
       ],
       "Attributes": [
         {
-          "Domain": "2. Protection Control Requirements",
-          "Subdomain": "2.9. System and Service Operation Management",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.9 System and Service Operation Management",
           "Section": "2.9.5 Log and Access Record Inspection",
           "AuditChecklist": [
             "Are there established log review and monitoring procedures, including the frequency, targets, and methods for detecting errors, misuse (unauthorized access, excessive queries, etc.), fraud, and other anomalies in the information system?",
@@ -2693,8 +2693,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Domain": "2. Protection Control Requirements",
-          "Subdomain": "2.9. System and Service Operation Management",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.9 System and Service Operation Management",
           "Section": "2.9.6 Time Synchronization",
           "AuditChecklist": [
             "Is the system time synchronized with the standard time?",
@@ -2719,8 +2719,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Domain": "2. Protection Control Requirements",
-          "Subdomain": "2.9. System and Service Operation Management",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.9 System and Service Operation Management",
           "Section": "2.9.7 Reuse and Disposal of Information Assets",
           "AuditChecklist": [
             "Are secure reuse and disposal procedures for information assets established and implemented?",
@@ -2831,8 +2831,8 @@
       ],
       "Attributes": [
         {
-          "Domain": "2. Security Control Requirements",
-          "Subdomain": "2.10. System and Service Security Management",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.10 System and Service Security Management",
           "Section": "2.10.1 Security System Operation",
           "AuditChecklist": [
             "Has the organization established and implemented operational procedures for the security systems in use?",
@@ -2872,8 +2872,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Domain": "2. Protective Measure Requirements",
-          "Subdomain": "2.10. System and Service Security Management",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.10 System and Service Security Management",
           "Section": "2.10.2 Cloud Security",
           "AuditChecklist": [
             "Is the responsibility and role for information protection and personal information protection clearly defined with the cloud service provider, and is it reflected in contracts (such as SLA)?",
@@ -2984,8 +2984,8 @@
       ],
       "Attributes": [
         {
-          "Domain": "2. Protective Measure Requirements",
-          "Subdomain": "2.10. System and Service Security Management",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.10 System and Service Security Management",
           "Section": "2.10.3 Public Server Security",
           "AuditChecklist": [
             "Are protective measures established and implemented for the operation of public servers?",
@@ -3014,8 +3014,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Domain": "2. Protection Measure Requirements",
-          "Subdomain": "2.10. System and Service Security Management",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.10 System and Service Security Management",
           "Section": "2.10.4 Security for Electronic Transactions and FinTech",
           "AuditChecklist": [
             "Are protection measures established and implemented to ensure the safety and reliability of transactions when providing electronic transaction and FinTech services?",
@@ -3059,8 +3059,8 @@
       ],
       "Attributes": [
         {
-          "Domain": "2. Protection Measure Requirements",
-          "Subdomain": "2.10. System and Service Security Management",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.10 System and Service Security Management",
           "Section": "2.10.5 Secure Information Transmission",
           "AuditChecklist": [
             "Has a secure transmission policy been established when transmitting personal and critical information to external organizations?",
@@ -3093,8 +3093,8 @@
       ],
       "Attributes": [
         {
-          "Domain": "2. Protection Measure Requirements",
-          "Subdomain": "2.10. System and Service Security Management",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.10 System and Service Security Management",
           "Section": "2.10.6 Security for Business Devices",
           "AuditChecklist": [
             "Are security control policies, such as device authentication, approval, access scope, and security settings, established and implemented for devices used for business purposes, such as PCs, laptops, virtual PCs, and tablets?",
@@ -3129,8 +3129,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Domain": "2. Security Control Requirements",
-          "Subdomain": "2.10. System and Service Security Management",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.10 System and Service Security Management",
           "Section": "2.10.7 Management of Removable Media",
           "AuditChecklist": [
             "Are policies and procedures established and implemented for handling (use), storage, disposal, and reuse of removable media such as external hard drives, USB memory, and CDs?",
@@ -3179,8 +3179,8 @@
       ],
       "Attributes": [
         {
-          "Domain": "2. Security Control Requirements",
-          "Subdomain": "2.10. System and Service Security Management",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.10 System and Service Security Management",
           "Section": "2.10.8 Patch Management",
           "AuditChecklist": [
             "Are patch management policies and procedures for operating systems (OS) and software established and implemented according to the characteristics and importance of each asset, such as servers, network systems, security systems, and PCs?",
@@ -3213,8 +3213,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Domain": "2. Security Control Requirements",
-          "Subdomain": "2.10. System and Service Security Management",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.10 System and Service Security Management",
           "Section": "2.10.9 Malware Control",
           "AuditChecklist": [
             "Are protection measures established and implemented to protect information systems and business terminals from malware such as viruses, worms, Trojans, and ransomware?",
@@ -3248,8 +3248,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Domain": "2. Protective Measures Requirements",
-          "Subdomain": "2.11. Incident Prevention and Response",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.11 Incident Prevention and Response",
           "Section": "2.11.1 Establishment of Incident Prevention and Response System",
           "AuditChecklist": [
             "Has the organization established procedures and systems to prevent security breaches and personal information leaks and to respond quickly and effectively when incidents occur?",
@@ -3307,8 +3307,8 @@
       ],
       "Attributes": [
         {
-          "Domain": "2. Protective Measures Requirements",
-          "Subdomain": "2.11. Incident Prevention and Response",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.11 Incident Prevention and Response",
           "Section": "2.11.2 Vulnerability Inspection and Remediation",
           "AuditChecklist": [
             "Has the organization established and implemented procedures for conducting regular vulnerability inspections of information systems?",
@@ -3371,8 +3371,8 @@
       ],
       "Attributes": [
         {
-          "Domain": "2. Protection Measures Requirements",
-          "Subdomain": "2.11. Incident Prevention and Response",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.11 Incident Prevention and Response",
           "Section": "2.11.3 Abnormal Behavior Analysis and Monitoring",
           "AuditChecklist": [
             "Is the organization collecting, analyzing, and monitoring network traffic, data flows, and event logs from major information systems, applications, networks, and security systems to detect abnormal behaviors such as intrusion attempts, personal information leakage attempts, or fraudulent activities?",
@@ -3403,8 +3403,8 @@
       ],
       "Attributes": [
         {
-          "Domain": "2. Protection Measures Requirements",
-          "Subdomain": "2.11. Incident Prevention and Response",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.11 Incident Prevention and Response",
           "Section": "2.11.4 Incident Response Training and Improvement",
           "AuditChecklist": [
             "Has the organization established a simulation training plan for responding to security incidents and personal information leakage incidents, and are such training exercises conducted at least once a year?",
@@ -3431,8 +3431,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Domain": "2. Protection Measures Requirements",
-          "Subdomain": "2.11. Incident Prevention and Response",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.11 Incident Prevention and Response",
           "Section": "2.11.5 Incident Response and Recovery",
           "AuditChecklist": [
             "When signs of or actual incidents of security breaches or personal information leakage are detected, is the organization responding and reporting promptly according to the defined incident response procedures?",
@@ -3501,8 +3501,8 @@
       ],
       "Attributes": [
         {
-          "Domain": "2. Protective Measure Requirements",
-          "Subdomain": "2.12. Disaster Recovery",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.12 Disaster Recovery",
           "Section": "2.12.1 Safety Measures for Disaster Preparedness",
           "AuditChecklist": [
             "Has the organization identified IT disaster types that could threaten the continuity of core services (businesses) and analyzed the expected scale of damage and impact on operations to identify core IT services (businesses) and systems?",
@@ -3570,8 +3570,8 @@
       ],
       "Attributes": [
         {
-          "Domain": "2. Protective Measure Requirements",
-          "Subdomain": "2.12. Disaster Recovery",
+          "Domain": "2. Control Measures Requirements",
+          "Subdomain": "2.12 Disaster Recovery",
           "Section": "2.12.2 Disaster Recovery Testing and Improvement",
           "AuditChecklist": [
             "Has the organization established and implemented disaster recovery test plans to evaluate the effectiveness of the established IT disaster recovery system?",
@@ -3599,7 +3599,7 @@
       "Attributes": [
         {
           "Domain": "3. Requirements for Each Stage of Personal Information Processing",
-          "Subdomain": "3.1. Protection Measures during Personal Information Collection",
+          "Subdomain": "3.1 Protection Measures for Personal Information Collection",
           "Section": "3.1.1 Collection and Use of Personal Information",
           "AuditChecklist": [
             "When collecting personal information, is it collected in accordance with lawful requirements such as obtaining the data subjectโ€™s consent, complying with legal obligations, or concluding and fulfilling contracts?",
@@ -3645,7 +3645,7 @@
       "Attributes": [
         {
           "Domain": "3. Requirements for Each Stage of Personal Information Processing",
-          "Subdomain": "3.1. Protection Measures during Personal Information Collection",
+          "Subdomain": "3.1 Protection Measures for Personal Information Collection",
           "Section": "3.1.2 Restrictions on the Collection of Personal Information",
           "AuditChecklist": [
             "When collecting personal information, is only the minimum amount of information necessary for the intended purpose being collected?",
@@ -3678,7 +3678,7 @@
       "Attributes": [
         {
           "Domain": "3. Requirements for Each Stage of Personal Information Processing",
-          "Subdomain": "3.1. Protection Measures during Personal Information Collection",
+          "Subdomain": "3.1 Protection Measures for Personal Information Collection",
           "Section": "3.1.3 Restrictions on the Processing of Resident Registration Numbers",
           "AuditChecklist": [
             "Are resident registration numbers only processed when there is a clear legal basis?",
@@ -3713,8 +3713,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Domain": "3. Personal Information Processing Requirements",
-          "Subdomain": "3.1. Protection Measures for Personal Information Collection",
+          "Domain": "3. Requirements for Each Stage of Personal Information Processing",
+          "Subdomain": "3.1 Protection Measures for Personal Information Collection",
           "Section": "3.1.4 Restriction on Processing of Sensitive and Unique Identifying Information",
           "AuditChecklist": [
             "Is sensitive information processed only with the separate consent of the data subject or when legally required?",
@@ -3744,8 +3744,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Domain": "3. Personal Information Processing Requirements",
-          "Subdomain": "3.1. Protection Measures for Personal Information Collection",
+          "Domain": "3. Requirements for Each Stage of Personal Information Processing",
+          "Subdomain": "3.1 Protection Measures for Personal Information Collection",
           "Section": "3.1.5 Indirect Collection of Personal Information",
           "AuditChecklist": [
             "When receiving personal information from a third party, is it clearly stated in the contract that the responsibility for obtaining consent for the collection of personal information lies with the party providing the information?",
@@ -3779,8 +3779,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Domain": "3. Personal Information Processing Requirements",
-          "Subdomain": "3.1. Protection Measures for Personal Information Collection",
+          "Domain": "3. Requirements for Each Stage of Personal Information Processing",
+          "Subdomain": "3.1 Protection Measures for Personal Information Collection",
           "Section": "3.1.6 Installation and Operation of Video Information Processing Devices",
           "AuditChecklist": [
             "When installing and operating fixed video information processing devices in public places, is it reviewed whether the installation meets legal requirements?",
@@ -3819,7 +3819,7 @@
       "Attributes": [
         {
           "Domain": "3. Requirements for Each Stage of Personal Information Processing",
-          "Subdomain": "3.1. Protection Measures When Collecting Personal Information",
+          "Subdomain": "3.1 Protection Measures for Personal Information Collection",
           "Section": "3.1.7 Collection and Use of Personal Information for Marketing Purposes",
           "AuditChecklist": [
             "When obtaining consent from data subjects to process personal information for the purpose of promoting or recommending goods or services, is the data subject clearly informed, and is separate consent obtained?",
@@ -3861,7 +3861,7 @@
       "Attributes": [
         {
           "Domain": "3. Requirements for Each Stage of Personal Information Processing",
-          "Subdomain": "3.2. Protection Measures When Retaining and Using Personal Information",
+          "Subdomain": "3.2 Protection Measures When Retaining and Using Personal Information",
           "Section": "3.2.1 Management of Personal Information Status",
           "AuditChecklist": [
             "Is the status of collected and retained personal information, including the items, volume, purpose and method of processing, and retention period, regularly managed?",
@@ -3904,7 +3904,7 @@
       "Attributes": [
         {
           "Domain": "3. Requirements for Each Stage of Personal Information Processing",
-          "Subdomain": "3.2. Protection Measures for Retention and Use of Personal Information",
+          "Subdomain": "3.2 Protection Measures When Retaining and Using Personal Information",
           "Section": "3.2.2 Personal Information Quality Assurance",
           "AuditChecklist": [
             "Are procedures and methods in place to maintain personal information in an accurate and up-to-date state?",
@@ -3932,7 +3932,7 @@
       "Attributes": [
         {
           "Domain": "3. Requirements for Each Stage of Personal Information Processing",
-          "Subdomain": "3.2. Protection Measures for Retention and Use of Personal Information",
+          "Subdomain": "3.2 Protection Measures When Retaining and Using Personal Information",
           "Section": "3.2.3 Protection of User Device Access",
           "AuditChecklist": [
             "When accessing information stored on the user's mobile device or functions installed on the device, are users clearly informed and their consent obtained?",
@@ -3963,7 +3963,7 @@
       "Attributes": [
         {
           "Domain": "3. Requirements for Each Stage of Personal Information Processing",
-          "Subdomain": "3.2. Protection Measures for Retention and Use of Personal Information",
+          "Subdomain": "3.2 Protection Measures When Retaining and Using Personal Information",
           "Section": "3.2.4 Use and Provision of Personal Information Beyond Purpose",
           "AuditChecklist": [
             "Is personal information used or provided only within the scope of the purpose consented to by the data subject at the time of collection or as permitted by law?",
@@ -4000,7 +4000,7 @@
       "Attributes": [
         {
           "Domain": "3. Requirements for Each Stage of Personal Information Processing",
-          "Subdomain": "3.2. Protection Measures for Retention and Use of Personal Information",
+          "Subdomain": "3.2 Protection Measures When Retaining and Using Personal Information",
           "Section": "3.2.5 Processing of Pseudonymized Information",
           "AuditChecklist": [
             "When processing pseudonymized information, are procedures established for purpose limitation, pseudonymization methods and standards, adequacy review, prohibition of re-identification, and actions in case of re-identification?",
@@ -4035,7 +4035,7 @@
       "Attributes": [
         {
           "Domain": "3. Requirements for Each Stage of Personal Information Processing",
-          "Subdomain": "3.3. Protective Measures When Providing Personal Information",
+          "Subdomain": "3.3 Protection Measures When Providing Personal Information",
           "Section": "3.3.1 Provision of Personal Information to Third Parties",
           "AuditChecklist": [
             "When providing personal information to third parties, are legal requirements such as consent from the data subject or compliance with legal obligations clearly identified and followed?",
@@ -4074,7 +4074,7 @@
       "Attributes": [
         {
           "Domain": "3. Requirements for Each Stage of Personal Information Processing",
-          "Subdomain": "3.3. Protective Measures When Providing Personal Information",
+          "Subdomain": "3.3 Protection Measures When Providing Personal Information",
           "Section": "3.3.2 Outsourcing of Personal Information Processing",
           "AuditChecklist": [
             "When outsourcing personal information processing tasks (including sub-outsourcing) to third parties, are the details of the outsourced tasks and the trustees regularly updated and disclosed on the website?",
@@ -4106,7 +4106,7 @@
       "Attributes": [
         {
           "Domain": "3. Requirements for Each Stage of Personal Information Processing",
-          "Subdomain": "3.3. Protective Measures When Providing Personal Information",
+          "Subdomain": "3.3 Protection Measures When Providing Personal Information",
           "Section": "3.3.3 Transfer of Personal Information Due to Business Transfers",
           "AuditChecklist": [
             "When transferring personal information to another party due to the transfer or merger of all or part of the business, are the necessary matters communicated to the data subjects in advance?",
@@ -4137,7 +4137,7 @@
       "Attributes": [
         {
           "Domain": "3. Requirements for Each Stage of Personal Information Processing",
-          "Subdomain": "3.3. Protection Measures When Providing Personal Information",
+          "Subdomain": "3.3 Protection Measures When Providing Personal Information",
           "Section": "3.3.4 Transfer of Personal Information Abroad",
           "AuditChecklist": [
             "When transferring personal information abroad, has the data subject been fully informed of all notification requirements and obtained separate consent, or complied with certification or recognition, as required by law?",
@@ -4171,7 +4171,7 @@
       "Attributes": [
         {
           "Domain": "3. Requirements for Each Stage of Personal Information Processing",
-          "Subdomain": "3.4. Protection Measures When Destroying Personal Information",
+          "Subdomain": "3.4 Protection Measures When Destroying Personal Information",
           "Section": "3.4.1 Destruction of Personal Information",
           "AuditChecklist": [
             "Has an internal policy been established regarding the retention period and destruction of personal information?",
@@ -4205,7 +4205,7 @@
       "Attributes": [
         {
           "Domain": "3. Requirements for Each Stage of Personal Information Processing",
-          "Subdomain": "3.4. Protection Measures When Destroying Personal Information",
+          "Subdomain": "3.4 Protection Measures When Destroying Personal Information",
           "Section": "3.4.2 Measures When Retaining Personal Information After Purpose Is Achieved",
           "AuditChecklist": [
             "When personal information is retained beyond the retention period or after the processing purpose has been achieved, in accordance with relevant laws, is it limited to the minimum necessary period and only the minimum necessary information?",
@@ -4238,7 +4238,7 @@
       "Attributes": [
         {
           "Domain": "3. Requirements for Each Stage of Personal Information Processing",
-          "Subdomain": "3.5. Protection of Data Subject's Rights",
+          "Subdomain": "3.5 Protection of Data Subject's Rights",
           "Section": "3.5.1 Disclosure of Privacy Policy",
           "AuditChecklist": [
             "Is the privacy policy written in clear and easy-to-understand language, covering all the contents required by law?",
@@ -4270,7 +4270,7 @@
       "Attributes": [
         {
           "Domain": "3. Requirements for Each Stage of Personal Information Processing",
-          "Subdomain": "3.5. Protection of Data Subject's Rights",
+          "Subdomain": "3.5 Protection of Data Subject's Rights",
           "Section": "3.5.2 Guaranteeing Data Subject's Rights",
           "AuditChecklist": [
             "Are procedures in place to ensure that data subjects or their representatives can exercise their rights (hereinafter referred to as 'Requests for Access, etc.') to access, rectify, delete, or suspend the processing of their personal information in a way that is not more difficult than the process used for collecting it?",
@@ -4309,7 +4309,7 @@
       "Attributes": [
         {
           "Domain": "3. Requirements for Each Stage of Personal Information Processing",
-          "Subdomain": "3.5. Protection of Data Subject's Rights",
+          "Subdomain": "3.5 Protection of Data Subject's Rights",
           "Section": "3.5.3 Notification to Data Subjects",
           "AuditChecklist": [
             "If the organization is legally obligated to do so, does it periodically notify data subjects of the use and provision of their personal information, or provide them with access to an information system where they can review such details?",
diff --git a/prowler/compliance/aws/prowler_threatscore_aws.json b/prowler/compliance/aws/prowler_threatscore_aws.json
new file mode 100644
index 0000000000..c53b7e1590
--- /dev/null
+++ b/prowler/compliance/aws/prowler_threatscore_aws.json
@@ -0,0 +1,1846 @@
+{
+  "Framework": "ProwlerThreatScore",
+  "Version": "1.0",
+  "Provider": "AWS",
+  "Description": "Prowler ThreatScore Compliance Framework for AWS ensures that the AWS account 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 MFA is enabled for the 'root' user account",
+      "Checks": [
+        "iam_root_mfa_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "MFA enabled for 'root'",
+          "Section": "1. IAM",
+          "SubSection": "1.1 Authentication",
+          "AttributeDescription": "The root user account holds the highest level of privileges within an AWS account. Enabling Multi-Factor Authentication (MFA) enhances security by adding an additional layer of protection beyond just a username and password. With MFA activated, users must provide their credentials (username and password) along with a unique authentication code generated by their AWS MFA device when signing into an AWS website.",
+          "AdditionalInformation": "Enabling MFA enhances console security by requiring the authenticating user to both possess a time-sensitive key-generating device and have knowledge of their credentials.",
+          "LevelOfRisk": 5
+        }
+      ]
+    },
+    {
+      "Id": "1.1.2",
+      "Description": "Ensure hardware MFA is enabled for the 'root' user account",
+      "Checks": [
+        "iam_root_hardware_mfa_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "Hardware MFA enabled for 'root'",
+          "Section": "1. IAM",
+          "SubSection": "1.1 Authentication",
+          "AttributeDescription": "The root user account in AWS has the highest level of privileges. Multi-Factor Authentication (MFA) enhances security by adding an extra layer of protection beyond a username and password. When MFA is enabled, users must enter their credentials along with a unique authentication code generated by their AWS MFA device when signing into an AWS website.",
+          "AdditionalInformation": "A hardware MFA has a smaller attack surface compared to a virtual MFA. Unlike a virtual MFA, which relies on a mobile device that may be vulnerable to malware or compromise, a hardware MFA operates independently, reducing exposure to potential security threats.",
+          "LevelOfRisk": 5
+        }
+      ]
+    },
+    {
+      "Id": "1.1.3",
+      "Description": "Ensure multi-factor authentication (MFA) is enabled for all IAM users that have console access",
+      "Checks": [
+        "iam_user_mfa_enabled_console_access"
+      ],
+      "Attributes": [
+        {
+          "Title": "MFA enabled for IAM console users",
+          "Section": "1. IAM",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "1.1.4",
+      "Description": "Ensure IAM password policy requires minimum length of 14 or greater",
+      "Checks": [
+        "iam_password_policy_minimum_length_14"
+      ],
+      "Attributes": [
+        {
+          "Title": "IAM password lenght 14 or greater",
+          "Section": "1. IAM",
+          "SubSection": "1.1 Authentication",
+          "AttributeDescription": "Password policies help enforce password complexity requirements to strengthen account security. In AWS IAM, password policies can be configured to ensure that user passwords meet specific criteria, including a minimum length requirement. It is recommended to enforce a minimum password length of 14 characters to enhance security.",
+          "AdditionalInformation": "Requiring longer and more complex passwords reduces the risk of compromise from brute force attacks, credential stuffing, and other password-based threats. A 14-character minimum makes it significantly harder for attackers to guess or crack passwords, improving overall account security and resilience.",
+          "LevelOfRisk": 3
+        }
+      ]
+    },
+    {
+      "Id": "1.1.5",
+      "Description": "Ensure IAM password policy prevents password reuse",
+      "Checks": [
+        "iam_password_policy_reuse_24"
+      ],
+      "Attributes": [
+        {
+          "Title": "IAM prevent password reuse",
+          "Section": "1. IAM",
+          "SubSection": "1.1 Authentication",
+          "AttributeDescription": "IAM password policies can be configured to prevent users from reusing previous passwords. This ensures that users create new, unique passwords instead of cycling through old ones. It is recommended to enforce password history restrictions to enhance security.",
+          "AdditionalInformation": "Blocking password reuse helps mitigate the risk of credential-based attacks, such as brute force and credential stuffing. It prevents users from reverting to previously compromised passwords, reducing the likelihood of unauthorized access.",
+          "LevelOfRisk": 3
+        }
+      ]
+    },
+    {
+      "Id": "1.1.6",
+      "Description": "Ensure IAM password policy require at least one number",
+      "Checks": [
+        "iam_password_policy_number"
+      ],
+      "Attributes": [
+        {
+          "Title": "IAM password requires one number or more",
+          "Section": "1. IAM",
+          "SubSection": "1.1 Authentication",
+          "AttributeDescription": "Password policies help enforce password complexity requirements to strengthen account security. In AWS IAM, password policies can be configured to ensure that user passwords meet specific criteria, including using at least number as requirement. It is recommended to enforce the usage of one number to enhance security.",
+          "AdditionalInformation": "Requiring more complex passwords reduces the risk of compromise from brute force attacks, credential stuffing, and other password-based threats. Using a number at least makes it significantly harder for attackers to guess or crack passwords, improving overall account security and resilience.",
+          "LevelOfRisk": 3
+        }
+      ]
+    },
+    {
+      "Id": "1.1.7",
+      "Description": "Ensure IAM password policy require at least one symbol",
+      "Checks": [
+        "iam_password_policy_symbol"
+      ],
+      "Attributes": [
+        {
+          "Title": "IAM password policy require one symbol or more",
+          "Section": "1. IAM",
+          "SubSection": "1.1 Authentication",
+          "AttributeDescription": "IAM password policies can be configured to enforce the use of at least one special character (symbol) in user passwords. Special characters (e.g., @, #, $, %) add complexity, making passwords harder to guess or crack. It is recommended to require at least one symbol in IAM passwords to enhance security.",
+          "AdditionalInformation": "Requiring a symbol in passwords increases entropy, making brute-force and dictionary attacks more difficult. Attackers often rely on common or predictable password patterns, and enforcing special characters helps reduce the effectiveness of such attacks. This policy strengthens overall password security and aligns with industry best practices.",
+          "LevelOfRisk": 3
+        }
+      ]
+    },
+    {
+      "Id": "1.1.8",
+      "Description": "Ensure IAM password policy require at least one lowercase letter",
+      "Checks": [
+        "iam_password_policy_lowercase"
+      ],
+      "Attributes": [
+        {
+          "Title": "IAM password policy require one lowercase or more",
+          "Section": "1. IAM",
+          "SubSection": "1.1 Authentication",
+          "AttributeDescription": "IAM password policies can be configured to enforce the use of at least one lowercase letter in user passwords. Including lowercase letters increases password complexity, making them more resistant to brute-force and dictionary attacks. It is recommended to require at least one lowercase letter in IAM passwords to strengthen security.",
+          "AdditionalInformation": "Requiring at least one lowercase letter ensures that passwords are not composed solely of numbers or uppercase letters, which are easier to guess. Attackers often use wordlists and predictable patterns when attempting to crack passwords. By enforcing lowercase letters, password complexity improves, reducing the likelihood of unauthorized access.",
+          "LevelOfRisk": 3
+        }
+      ]
+    },
+    {
+      "Id": "1.1.9",
+      "Description": "Ensure IAM password policy requires at least one uppercase letter",
+      "Checks": [
+        "iam_password_policy_uppercase"
+      ],
+      "Attributes": [
+        {
+          "Title": "IAM password policy require one uppercase or more",
+          "Section": "1. IAM",
+          "SubSection": "1.1 Authentication",
+          "AttributeDescription": "IAM password policies can be configured to enforce the use of at least one uppercase letter in user passwords. Including uppercase letters increases password complexity, making them more resilient to brute-force and dictionary attacks. It is recommended to require at least one uppercase letter in IAM passwords to enhance security.",
+          "AdditionalInformation": "Requiring at least one uppercase letter ensures that passwords are not composed solely of lowercase letters or numbers, which are more predictable and easier to crack. Attackers often rely on common word variations in password attacks, and enforcing uppercase letters adds an additional layer of complexity, reducing the risk of unauthorized access.",
+          "LevelOfRisk": 3
+        }
+      ]
+    },
+    {
+      "Id": "1.1.10",
+      "Description": "Ensure credentials unused for 45 days or more are disabled",
+      "Checks": [
+        "iam_user_accesskey_unused",
+        "iam_user_console_access_unused"
+      ],
+      "Attributes": [
+        {
+          "Title": "IAM credentials unused disabled",
+          "Section": "1. IAM",
+          "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": 2
+        }
+      ]
+    },
+    {
+      "Id": "1.1.11",
+      "Description": "Ensure access keys are rotated every 90 days or less",
+      "Checks": [
+        "iam_rotate_access_key_90_days"
+      ],
+      "Attributes": [
+        {
+          "Title": "IAM rotate access keys 90 days",
+          "Section": "1. IAM",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "1.1.12",
+      "Description": "Ensure IAM password policy expires passwords within 90 days or less",
+      "Checks": [
+        "iam_password_policy_expires_passwords_within_90_days_or_less"
+      ],
+      "Attributes": [
+        {
+          "Title": "IAM password expires within 90 days",
+          "Section": "1. IAM",
+          "SubSection": "1.1 Authentication",
+          "AttributeDescription": "IAM password policies can be configured to enforce password expiration after a defined period. It is recommended that passwords be set to expire within 90 days or less to ensure users regularly update their credentials. This helps mitigate security risks associated with stale or compromised passwords that remain active for extended periods.",
+          "AdditionalInformation": "Requiring password expiration within 90 days or less reduces the risk of credential-based attacks, such as brute-force attacks and credential stuffing, by ensuring that old passwords cannot be used indefinitely. If a password has been exposed or compromised without detection, regular expiration limits the window of opportunity for an attacker to exploit it. This policy enforces stronger access control and aligns with industry security best practices.",
+          "LevelOfRisk": 3
+        }
+      ]
+    },
+    {
+      "Id": "1.1.13",
+      "Description": "Ensure no root account access key exists",
+      "Checks": [
+        "iam_no_root_access_key"
+      ],
+      "Attributes": [
+        {
+          "Title": "No root access key",
+          "Section": "1. IAM",
+          "SubSection": "1.1 Authentication",
+          "AttributeDescription": "The root account in AWS has unrestricted administrative privileges and should be protected with the highest security measures. Access keys provide programmatic access to AWS, but when linked to the root account, they pose a significant security risk. It is recommended that no access keys be associated with the root account, ensuring that all programmatic access is managed through IAM roles and users with least privilege access.",
+          "AdditionalInformation": "The root account holds the highest level of privileges in an AWS environment. AWS Access Keys enable programmatic access to AWS resources, but when associated with the root account, they pose a significant security risk. It is recommended to remove all access keys linked to the root account to minimize potential attack vectors. Eliminating root access keys reduces the risk of unauthorized access and enforces the use of role-based IAM accounts with least privilege, promoting a more secure and controlled access management approach.",
+          "LevelOfRisk": 5
+        }
+      ]
+    },
+    {
+      "Id": "1.2.1",
+      "Description": "Ensure IAM policies are attached only to groups or roles",
+      "Checks": [
+        "iam_policy_attached_only_to_group_or_roles"
+      ],
+      "Attributes": [
+        {
+          "Title": "IAM policies attached to group or roles",
+          "Section": "1. IAM",
+          "SubSection": "1.2 Authorization",
+          "AttributeDescription": "IAM policies define permissions that control access to AWS resources. To ensure scalability, security, and manageability, it is recommended that IAM policies be attached only to groups or roles rather than individual users. By assigning permissions at the group or role level, organizations can apply consistent security policies and avoid permission sprawl.",
+          "AdditionalInformation": "Attaching policies to groups or roles simplifies access control, reduces security risks, and improves compliance tracking. This approach prevents overprivileged accounts and ensures a structured, scalable IAM policy framework.",
+          "LevelOfRisk": 1
+        }
+      ]
+    },
+    {
+      "Id": "1.2.2",
+      "Description": "Ensure IAM users receive permissions only through groups",
+      "Checks": [
+        "iam_policy_attached_only_to_group_or_roles"
+      ],
+      "Attributes": [
+        {
+          "Title": "IAM users get permissions through groups",
+          "Section": "1. IAM",
+          "SubSection": "1.2 Authorization",
+          "AttributeDescription": "IAM users gain access to AWS services, functions, and data through IAM policies. There are four ways to assign policies to a user: 1.Inline (User-Specific) Policy โ€“ Editing the policy directly within the userโ€™s profile.2.Directly Attached Policy โ€“ Assigning a standalone policy to a user.3.Group-Based Policy (Recommended) โ€“ Adding the user to an IAM group with an attached policy. 4.Group with Inline Policy โ€“ Assigning an inline policy to a group that includes the user.Among these methods, only the third approach (group-based policies) is recommended for security and manageability.",
+          "AdditionalInformation": "Managing IAM permissions exclusively through groups ensures consistent, scalable, and role-based access control. This approach reduces the risk of excessive privileges, simplifies auditing, and aligns user permissions with organizational roles.",
+          "LevelOfRisk": 1
+        }
+      ]
+    },
+    {
+      "Id": "1.3.1",
+      "Description": "Ensure IAM policies that allow full *:* administrative privileges are not attached",
+      "Checks": [
+        "iam_aws_attached_policy_no_administrative_privileges",
+        "iam_customer_attached_policy_no_administrative_privileges"
+      ],
+      "Attributes": [
+        {
+          "Title": "IAM policies with full privileges not attached",
+          "Section": "1. IAM",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "1.2.3",
+      "Description": "Ensure a support role has been created to manage incidents with AWS Support",
+      "Checks": [
+        "iam_support_role_created"
+      ],
+      "Attributes": [
+        {
+          "Title": "Support role exists to manage incidents",
+          "Section": "1. IAM",
+          "SubSection": "1.2 Authorization",
+          "AttributeDescription": "AWS offers a Support Center for incident notification, response, technical support, and customer service assistance. To ensure secure and controlled access, an IAM role should be created with a properly assigned policy, allowing only authorized users to manage incidents with AWS Support.",
+          "AdditionalInformation": "Implementing least privilege access control ensures that only designated users can interact with AWS Support. Assigning an IAM role with a specific policy limits access to only necessary actions, reducing the risk of unauthorized modifications or exposure of sensitive account information.",
+          "LevelOfRisk": 1
+        }
+      ]
+    },
+    {
+      "Id": "1.2.4",
+      "Description": "Ensure IAM instance roles are used for AWS resource access from instances",
+      "Checks": [
+        "ec2_instance_profile_attached"
+      ],
+      "Attributes": [
+        {
+          "Title": "Roles used for resource access from instances",
+          "Section": "1. IAM",
+          "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": 2
+        }
+      ]
+    },
+    {
+      "Id": "4.1.3",
+      "Description": "Ensure that all expired SSL/TLS certificates stored in AWS IAM are removed",
+      "Checks": [
+        "iam_no_expired_server_certificates_stored"
+      ],
+      "Attributes": [
+        {
+          "Title": "Expired SSL/TLS certificates removed",
+          "Section": "4. Encryption",
+          "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": 5
+        }
+      ]
+    },
+    {
+      "Id": "1.2.5",
+      "Description": "Avoid the use of the 'root' account",
+      "Checks": [
+        "iam_avoid_root_usage"
+      ],
+      "Attributes": [
+        {
+          "Title": "Don't use root account",
+          "Section": "1. IAM",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "1.2.6",
+      "Description": "Ensure that IAM Access Analyzer is enabled for all regions",
+      "Checks": [
+        "accessanalyzer_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "Access Analyzer enabled",
+          "Section": "1. IAM",
+          "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": 2
+        }
+      ]
+    },
+    {
+      "Id": "1.2.7",
+      "Description": "Ensure IAM users are managed centrally via identity federation or AWS Organizations for multi-account environments",
+      "Checks": [
+        "iam_check_saml_providers_sts"
+      ],
+      "Attributes": [
+        {
+          "Title": "IAM users managed centrally or by organizations",
+          "Section": "1. IAM",
+          "SubSection": "1.2 Authorization",
+          "AttributeDescription": "In multi-account AWS environments, centralizing IAM user management improves control, security, and access management efficiency. Instead of creating separate IAM users in each account, access should be managed through role assumption. This can be achieved using AWS Organizations or federation with an external identity provider (e.g., AWS IAM Identity Center, Okta, or Active Directory).",
+          "AdditionalInformation": "Centralizing IAM user management into a single identity store simplifies administration, reduces the risk of access misconfigurations, and enforces consistent security policies across all accounts. This approach enhances security, scalability, and compliance while minimizing user duplication and permission errors.",
+          "LevelOfRisk": 1
+        }
+      ]
+    },
+    {
+      "Id": "1.3.2",
+      "Description": "Ensure access to AWSCloudShellFullAccess is restricted",
+      "Checks": [
+        "iam_policy_cloudshell_admin_not_attached"
+      ],
+      "Attributes": [
+        {
+          "Title": "AWSCloudShellFullAccess restricted",
+          "Section": "1. IAM",
+          "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": 2
+        }
+      ]
+    },
+    {
+      "Id": "1.3.3",
+      "Description": "Ensure no IAM Inline policies allow actions that may lead into Privilege Escalation",
+      "Checks": [
+        "iam_inline_policy_allows_privilege_escalation"
+      ],
+      "Attributes": [
+        {
+          "Title": "IAM policy allow privilege escalation",
+          "Section": "1. IAM",
+          "SubSection": "1.3 Privilege Escalation Prevention",
+          "AttributeDescription": "IAM inline policies define permissions directly attached to users, groups, or roles, rather than being managed as standalone policies. If improperly configured, these policies can grant actions that enable privilege escalation, allowing users to elevate their access beyond intended permissions. Privilege escalation can occur through misconfigured IAM roles, excessive permissions, or indirect access paths, potentially leading to unauthorized control over AWS resources.",
+          "AdditionalInformation": "Users with some IAM permissions are allowed to elevate their privileges up to administrator rights.",
+          "LevelOfRisk": 4
+        }
+      ]
+    },
+    {
+      "Id": "4.1.1",
+      "Description": "Ensure S3 Bucket Policy is set to deny HTTP requests",
+      "Checks": [
+        "s3_bucket_secure_transport_policy"
+      ],
+      "Attributes": [
+        {
+          "Title": "S3 bucket deny HTTP requests",
+          "Section": "4. Encryption",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "4.1.2",
+      "Description": "Ensure that EC2 Metadata Service only allows IMDSv2",
+      "Checks": [
+        "ec2_instance_imdsv2_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "EC2 Metadata Service only allows IMDSv2",
+          "Section": "4. Encryption",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "2.2.1",
+      "Description": "Ensure MFA Delete is enabled on S3 buckets",
+      "Checks": [
+        "s3_bucket_no_mfa_delete"
+      ],
+      "Attributes": [
+        {
+          "Title": "MFA delete enabled on S3 buckets",
+          "Section": "2. Attack Surface",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "2.2.2",
+      "Description": "Ensure all data in Amazon S3 has been discovered, classified, and secured when necessary",
+      "Checks": [
+        "macie_is_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "Macie enabled",
+          "Section": "2. Attack Surface",
+          "SubSection": "2.2 Storage",
+          "AttributeDescription": "Amazon S3 buckets may store sensitive data that needs to be discovered, classified, monitored, and protected to maintain security and compliance. Amazon Macie, along with third-party tools, can automatically inventory S3 buckets and identify sensitive data at scale.",
+          "AdditionalInformation": "Using automated data discovery and classification tools, such as Amazon Macie, enhances security by continuously monitoring S3 buckets for sensitive information. Macie leverages machine learning and pattern matching to detect and protect critical data, reducing the risk of data leaks and unauthorized access.",
+          "LevelOfRisk": 1
+        }
+      ]
+    },
+    {
+      "Id": "2.1.1",
+      "Description": "Ensure the default security group of every VPC restricts all traffic",
+      "Checks": [
+        "ec2_securitygroup_default_restrict_traffic"
+      ],
+      "Attributes": [
+        {
+          "Title": "Default SG of VPC restrict all traffic",
+          "Section": "2. Attack Surface",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "2.1.2",
+      "Description": "Ensure routing tables for VPC peering are least access",
+      "Checks": [
+        "vpc_peering_routing_tables_with_least_privilege"
+      ],
+      "Attributes": [
+        {
+          "Title": "Routing tables for VPC least access",
+          "Section": "2. Attack Surface",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "2.1.3",
+      "Description": "Ensure no Network ACLs allow ingress from 0.0.0.0/0 to remote server administration ports",
+      "Checks": [
+        "ec2_networkacl_allow_ingress_any_port",
+        "ec2_networkacl_allow_ingress_tcp_port_22",
+        "ec2_networkacl_allow_ingress_tcp_port_3389"
+      ],
+      "Attributes": [
+        {
+          "Title": "No Network ACLs allow ingress from 0.0.0.0/0 to remote server administration ports",
+          "Section": "2. Attack Surface",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "2.1.4",
+      "Description": "Ensure no security groups allow ingress from 0.0.0.0/0 to remote server administration ports",
+      "Checks": [
+        "ec2_securitygroup_allow_ingress_from_internet_to_all_ports",
+        "ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_22",
+        "ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_3389"
+      ],
+      "Attributes": [
+        {
+          "Title": "No SG allow ingress from 0.0.0.0/0 to remote server administration ports",
+          "Section": "2. Attack Surface",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "2.2.3",
+      "Description": "Ensure EBS snapshots are not publicly accessible",
+      "Checks": [
+        "ec2_ebs_public_snapshot"
+      ],
+      "Attributes": [
+        {
+          "Title": "EBS snapshots nor publicy accessible",
+          "Section": "2. Attack Surface",
+          "SubSection": "2.2 Storage",
+          "AttributeDescription": "Amazon Elastic Block Store (EBS) snapshots contain backups of EC2 volumes, which may include sensitive data such as credentials, application configurations, or customer information. EBS snapshots should never be publicly accessible to prevent unauthorized access and data exposure. By default, snapshots are private, but they can be manually shared with other AWS accounts or made public, which poses a significant security risk if misconfigured.",
+          "AdditionalInformation": "Exposing EBS snapshots publicly increases the risk of data breaches, unauthorized access, and compliance violations. Attackers can scan for publicly accessible snapshots and extract sensitive information. To prevent data leaks, snapshots should be restricted to specific AWS accounts or kept private unless explicitly needed for sharing. Implementing proper access controls helps protect critical data and maintain compliance with security best practices.",
+          "LevelOfRisk": 5
+        }
+      ]
+    },
+    {
+      "Id": "4.2.1",
+      "Description": "Ensure EBS volume encryption is enabled in all regions",
+      "Checks": [
+        "ec2_ebs_volume_encryption"
+      ],
+      "Attributes": [
+        {
+          "Title": "EBS volume encryption",
+          "Section": "4. Encryption",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "4.2.2",
+      "Description": "Ensure that encryption-at-rest is enabled for RDS instances",
+      "Checks": [
+        "rds_instance_storage_encrypted"
+      ],
+      "Attributes": [
+        {
+          "Title": "RDS instances encryption at rest enabled",
+          "Section": "4. Encryption",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "2.3.1",
+      "Description": "Ensure SNS topics do not allow global send or subscribe",
+      "Checks": [
+        "sns_topics_not_publicly_accessible"
+      ],
+      "Attributes": [
+        {
+          "Title": "SNS topics do not allow global send or subscribe",
+          "Section": "2. Attack Surface",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "2.2.4",
+      "Description": "Ensure RDS snapshots are not publicly accessible",
+      "Checks": [
+        "rds_instance_no_public_access"
+      ],
+      "Attributes": [
+        {
+          "Title": "RDS snapshots not publicy accessible",
+          "Section": "2. Attack Surface",
+          "SubSection": "2.2 Storage",
+          "AttributeDescription": "Amazon Relational Database Service (RDS) snapshots store backups of database instances, potentially containing sensitive data such as customer records, credentials, and application configurations. By default, RDS snapshots are private, but they can be shared with other AWS accounts or made public, which can lead to data exposure if misconfigured. To prevent unauthorized access, RDS snapshots should never be publicly accessible unless explicitly required and secured.",
+          "AdditionalInformation": "Publicly accessible RDS snapshots create a serious security risk, as anyone can copy the snapshot and restore the database, exposing sensitive information. Attackers actively scan for publicly available snapshots to extract credentials, personally identifiable information (PII), or business-critical data. To prevent unauthorized access and data leaks, RDS snapshots should remain private or restricted to trusted AWS accounts following the principle of least privilege.",
+          "LevelOfRisk": 5
+        }
+      ]
+    },
+    {
+      "Id": "2.2.5",
+      "Description": "Ensure the S3 bucket CloudTrail logs is not publicly accessible",
+      "Checks": [
+        "cloudtrail_logs_s3_bucket_is_not_publicly_accessible"
+      ],
+      "Attributes": [
+        {
+          "Title": "S3 bucket CloudTrail logs is not publicly accessible",
+          "Section": "2. Attack Surface",
+          "SubSection": "2.2 Storage",
+          "AttributeDescription": "AWS CloudTrail logs record account activity, including API calls, user actions, and resource modifications, making them critical for security monitoring and compliance auditing. These logs are typically stored in an Amazon S3 bucket for long-term retention and analysis. To protect sensitive security data, the S3 bucket storing CloudTrail logs should never be publicly accessible.",
+          "AdditionalInformation": "If the S3 bucket containing CloudTrail logs is publicly accessible, unauthorized users could access sensitive security information, including API calls, IAM activity, and infrastructure changes. Exposing CloudTrail logs can help attackers reconstruct system activity, identify vulnerabilities, and plan targeted attacks. To prevent data leaks and unauthorized access, CloudTrail log buckets should be restricted using IAM policies, bucket policies, and S3 Block Public Access settings.",
+          "LevelOfRisk": 5
+        }
+      ]
+    },
+    {
+      "Id": "2.2.6",
+      "Description": "Ensure Redshift clusters do not have a public endpoint",
+      "Checks": [
+        "redshift_cluster_public_access"
+      ],
+      "Attributes": [
+        {
+          "Title": "Redshift clusters dont have a public endpoint",
+          "Section": "2. Attack Surface",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "2.1.5",
+      "Description": "Ensure ApiGateway endpoint is not public",
+      "Checks": [
+        "apigateway_restapi_public"
+      ],
+      "Attributes": [
+        {
+          "Title": "ApiGateway endpoint is public",
+          "Section": "2. Attack Surface",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "2.3.2",
+      "Description": "Ensure that amazon EC2 instances launched using Auto Scaling group launch configurations do not have Public IP addresses",
+      "Checks": [
+        "autoscaling_group_launch_configuration_no_public_ip"
+      ],
+      "Attributes": [
+        {
+          "Title": "EC2 instances launched using autoscaling group launch configurations do not have Public IP addresses",
+          "Section": "2. Attack Surface",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "2.3.3",
+      "Description": "Ensure that lambda functions have not resource-based policy set as Public",
+      "Checks": [
+        "awslambda_function_not_publicly_accessible"
+      ],
+      "Attributes": [
+        {
+          "Title": "Lambda functions have not resource-based policy set as Public",
+          "Section": "2. Attack Surface",
+          "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": 5
+        }
+      ]
+    },
+    {
+      "Id": "2.3.4",
+      "Description": "Ensure that Lambda have not public URL Function",
+      "Checks": [
+        "awslambda_function_url_public"
+      ],
+      "Attributes": [
+        {
+          "Title": "Lambda have not public URL Function",
+          "Section": "2. Attack Surface",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "2.3.5",
+      "Description": "Ensure DMS instances are not publicly accessible",
+      "Checks": [
+        "dms_instance_no_public_access"
+      ],
+      "Attributes": [
+        {
+          "Title": "DMS instances are not publicly accessible",
+          "Section": "2. Attack Surface",
+          "SubSection": "2.3 Application",
+          "AttributeDescription": "AWS Database Migration Service (DMS) instances facilitate data migration between databases across on-premises and cloud environments. By default, DMS instances can be configured with publicly accessible endpoints, making them reachable from the internet. To enhance security and prevent unauthorized access, DMS instances should not be publicly accessible unless explicitly required and properly secured.",
+          "AdditionalInformation": "Publicly accessible DMS instances increase the risk of unauthorized access, data interception, and potential exploitation. Attackers could target exposed instances to steal or manipulate sensitive data during migration. Restricting public access ensures data migrations remain secure, limiting access to trusted networks, private VPCs, and authorized IAM roles, thereby reducing the attack surface and ensuring compliance with security best practices.",
+          "LevelOfRisk": 5
+        }
+      ]
+    },
+    {
+      "Id": "2.2.7",
+      "Description": "Ensure DocumentDB manual cluster snapshot is not public",
+      "Checks": [
+        "documentdb_cluster_public_snapshot"
+      ],
+      "Attributes": [
+        {
+          "Title": "DocumentDB manual cluster snapshot is not public",
+          "Section": "2. Attack Surface",
+          "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": 5
+        }
+      ]
+    },
+    {
+      "Id": "2.3.6",
+      "Description": "Ensure there are no EC2 AMIs set as Public",
+      "Checks": [
+        "ec2_ami_public"
+      ],
+      "Attributes": [
+        {
+          "Title": "No EC2 AMIs set as Public",
+          "Section": "2. Attack Surface",
+          "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": 5
+        }
+      ]
+    },
+    {
+      "Id": "2.2.8",
+      "Description": "Ensure that public access to EBS snapshots is disabled",
+      "Checks": [
+        "ec2_ebs_snapshot_account_block_public_access"
+      ],
+      "Attributes": [
+        {
+          "Title": "Public access to EBS snapshots is disabled",
+          "Section": "2. Attack Surface",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "2.1.6",
+      "Description": "Ensure that ec2 common ports from instances are not internet-exposed",
+      "Checks": [
+        "ec2_instance_port_cassandra_exposed_to_internet",
+        "ec2_instance_port_cifs_exposed_to_internet",
+        "ec2_instance_port_elasticsearch_kibana_exposed_to_internet",
+        "ec2_instance_port_ftp_exposed_to_internet",
+        "ec2_instance_port_kafka_exposed_to_internet",
+        "ec2_instance_port_kerberos_exposed_to_internet",
+        "ec2_instance_port_ldap_exposed_to_internet",
+        "ec2_instance_port_memcached_exposed_to_internet",
+        "ec2_instance_port_mongodb_exposed_to_internet",
+        "ec2_instance_port_mysql_exposed_to_internet",
+        "ec2_instance_port_oracle_exposed_to_internet",
+        "ec2_instance_port_postgresql_exposed_to_internet",
+        "ec2_instance_port_rdp_exposed_to_internet",
+        "ec2_instance_port_redis_exposed_to_internet",
+        "ec2_instance_port_sqlserver_exposed_to_internet",
+        "ec2_instance_port_ssh_exposed_to_internet",
+        "ec2_instance_port_telnet_exposed_to_internet"
+      ],
+      "Attributes": [
+        {
+          "Title": "Common ports from instances are not exposed",
+          "Section": "2. Attack Surface",
+          "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": 5
+        }
+      ]
+    },
+    {
+      "Id": "2.1.7",
+      "Description": "Ensure that ec2 security groups do not allow ingress from internet to common ports",
+      "Checks": [
+        "ec2_securitygroup_allow_ingress_from_internet_to_high_risk_tcp_ports",
+        "ec2_securitygroup_allow_ingress_from_internet_to_port_mongodb_27017_27018",
+        "ec2_securitygroup_allow_ingress_from_internet_to_tcp_ftp_port_20_21",
+        "ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_22",
+        "ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_3389",
+        "ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_cassandra_7199_9160_8888",
+        "ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_elasticsearch_kibana_9200_9300_5601",
+        "ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_kafka_9092",
+        "ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_memcached_11211",
+        "ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_mysql_3306",
+        "ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_oracle_1521_2483",
+        "ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_postgres_5432",
+        "ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_redis_6379",
+        "ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_sql_server_1433_1434",
+        "ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_telnet_23"
+      ],
+      "Attributes": [
+        {
+          "Title": "Common ports from security groups do not allow ingress traffic",
+          "Section": "2. Attack Surface",
+          "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": 5
+        }
+      ]
+    },
+    {
+      "Id": "2.3.7",
+      "Description": "Ensure there are no ECR repositories set as Public",
+      "Checks": [
+        "ecr_repositories_not_publicly_accessible"
+      ],
+      "Attributes": [
+        {
+          "Title": "No ECR repositories set as Public",
+          "Section": "2. Attack Surface",
+          "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": 5
+        }
+      ]
+    },
+    {
+      "Id": "2.3.8",
+      "Description": "Ensure ECS services do not assign public IPs automatically",
+      "Checks": [
+        "ecs_service_no_assign_public_ip"
+      ],
+      "Attributes": [
+        {
+          "Title": "No ECS services assign public IPs automatically",
+          "Section": "2. Attack Surface",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "2.3.9",
+      "Description": "Ensure ECS task sets do not automatically assign public IP addresses",
+      "Checks": [
+        "ecs_task_set_no_assign_public_ip"
+      ],
+      "Attributes": [
+        {
+          "Title": "No ECS tasks sets assign public IPs autocatically",
+          "Section": "2. Attack Surface",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "2.2.9",
+      "Description": "Ensure EFS mount targets are not publicly accessible",
+      "Checks": [
+        "efs_mount_target_not_publicly_accessible"
+      ],
+      "Attributes": [
+        {
+          "Title": "No EFS mount targets are publicly accessible",
+          "Section": "2. Attack Surface",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "2.2.10",
+      "Description": "Ensure that EFS do not have policies which allow access to any client within the VPC",
+      "Checks": [
+        "efs_not_publicly_accessible"
+      ],
+      "Attributes": [
+        {
+          "Title": "No EFS have policies which allow access to any client within the VPC",
+          "Section": "2. Attack Surface",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "2.1.8",
+      "Description": "Ensure EKS cluster Network Policy is Enabled and Set as Appropriate",
+      "Checks": [
+        "eks_cluster_network_policy_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "EKS cluster Network Policy is Enabled and Set as Appropriate",
+          "Section": "2. Attack Surface",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "2.1.9",
+      "Description": "Ensure EKS Clusters are not publicly accessible",
+      "Checks": [
+        "eks_cluster_not_publicly_accessible"
+      ],
+      "Attributes": [
+        {
+          "Title": "EKS Clusters are not publicly accessible",
+          "Section": "2. Attack Surface",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "2.1.10",
+      "Description": "Ensure EKS Clusters are created with Private Nodes",
+      "Checks": [
+        "eks_cluster_private_nodes_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "EKS Clusters are created with Private Nodes",
+          "Section": "2. Attack Surface",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "2.2.11",
+      "Description": "Ensure Elasticache Cluster is not using a public subnet",
+      "Checks": [
+        "elasticache_cluster_uses_public_subnet"
+      ],
+      "Attributes": [
+        {
+          "Title": "Elasticache Cluster is not using a public subnet",
+          "Section": "2. Attack Surface",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "2.3.10",
+      "Description": "Ensure no Elastic Load Balancers are facing internet",
+      "Checks": [
+        "elbv2_internet_facing"
+      ],
+      "Attributes": [
+        {
+          "Title": "No Elastic Load Balancers are facing internet",
+          "Section": "2. Attack Surface",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "2.3.11",
+      "Description": "Ensure EMR Account Public Access Block enabled",
+      "Checks": [
+        "emr_cluster_account_public_block_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "EMR Account Public Access Block enabled",
+          "Section": "2. Attack Surface",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "2.3.12",
+      "Description": "Ensure EMR cluster is not publicly accessible",
+      "Checks": [
+        "emr_cluster_publicly_accesible"
+      ],
+      "Attributes": [
+        {
+          "Title": "EMR cluster is not publicly accessible",
+          "Section": "2. Attack Surface",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "2.3.13",
+      "Description": "Ensure that your AWS EventBridge event bus is not exposed to everyone",
+      "Checks": [
+        "eventbridge_bus_exposed"
+      ],
+      "Attributes": [
+        {
+          "Title": "AWS EventBridge event bus is not exposed to everyone",
+          "Section": "2. Attack Surface",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "2.2.12",
+      "Description": "Ensure S3 Glacier vaults have not policies which allow access to everyone",
+      "Checks": [
+        "glacier_vaults_policy_public_access"
+      ],
+      "Attributes": [
+        {
+          "Title": "S3 Glacier vaults have not policies which allow access to everyone",
+          "Section": "2. Attack Surface",
+          "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": 5
+        }
+      ]
+    },
+    {
+      "Id": "2.2.13",
+      "Description": "Ensure Glue Data Catalogs are not publicly accessible",
+      "Checks": [
+        "glue_data_catalogs_not_publicly_accessible"
+      ],
+      "Attributes": [
+        {
+          "Title": "Glue Data Catalogs are not publicly accessible",
+          "Section": "2. Attack Surface",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "2.3.14",
+      "Description": "Ensure Kafka Cluster is not exposed to the public",
+      "Checks": [
+        "kafka_cluster_is_public"
+      ],
+      "Attributes": [
+        {
+          "Title": "Kafka Cluster is not exposed to the public",
+          "Section": "2. Attack Surface",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "2.2.14",
+      "Description": "Ensure there are no internet exposed KMS keys",
+      "Checks": [
+        "kms_key_not_publicly_accessible"
+      ],
+      "Attributes": [
+        {
+          "Title": "No internet exposed KMS keys",
+          "Section": "2. Attack Surface",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "2.3.15",
+      "Description": "Ensure lightsail database is not in public mode",
+      "Checks": [
+        "lightsail_database_public"
+      ],
+      "Attributes": [
+        {
+          "Title": "Lightsail database not public",
+          "Section": "2. Attack Surface",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "2.3.16",
+      "Description": "Ensure that Lightsail instances are not publicly accessible",
+      "Checks": [
+        "lightsail_instance_public"
+      ],
+      "Attributes": [
+        {
+          "Title": "Lightsail instances are not publicly accessible",
+          "Section": "2. Attack Surface",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "2.3.17",
+      "Description": "Ensure MQ brokers are not publicly accessible",
+      "Checks": [
+        "mq_broker_not_publicly_accessible"
+      ],
+      "Attributes": [
+        {
+          "Title": "MQ brokers not publicly accessible",
+          "Section": "2. Attack Surface",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "2.3.18",
+      "Description": "Ensure NeptuneDB manual cluster snapshot is not public",
+      "Checks": [
+        "neptune_cluster_public_snapshot"
+      ],
+      "Attributes": [
+        {
+          "Title": "NeptuneDB manual cluster snapshot is not public",
+          "Section": "2. Attack Surface",
+          "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": 5
+        }
+      ]
+    },
+    {
+      "Id": "2.3.19",
+      "Description": "Ensure Neptune Cluster is not using a public subnet",
+      "Checks": [
+        "neptune_cluster_uses_public_subnet"
+      ],
+      "Attributes": [
+        {
+          "Title": "Neptune Cluster is not using a public subnet",
+          "Section": "2. Attack Surface",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "2.3.20",
+      "Description": "Ensure Amazon Opensearch/Elasticsearch domains are not publicly accessible",
+      "Checks": [
+        "opensearch_service_domains_not_publicly_accessible"
+      ],
+      "Attributes": [
+        {
+          "Title": "Amazon Opensearch/Elasticsearch domains are not publicly accessible",
+          "Section": "2. Attack Surface",
+          "SubSection": "2.3 Application",
+          "AttributeDescription": "Amazon OpenSearch (formerly Elasticsearch) domains provide search, analytics, and log management capabilities for applications. If an OpenSearch/Elasticsearch domain is publicly accessible, it can be reached from the internet, exposing sensitive data and administrative controls to unauthorized users. To enhance security, OpenSearch domains should be restricted to private networks, ensuring access is limited to trusted VPCs, IAM roles, or specific security group rules.",
+          "AdditionalInformation": "Publicly accessible OpenSearch/Elasticsearch domains pose a significant security risk, as attackers could execute unauthorized queries, modify data, or gain administrative control over the cluster. This could lead to data breaches, service disruptions, and compliance violations. To mitigate these risks, OpenSearch domains should be deployed in private subnets, with access controlled using VPC restrictions, fine-grained access control (FGAC), IAM policies, and security group rules, ensuring secure and isolated search and analytics operations.",
+          "LevelOfRisk": 5
+        }
+      ]
+    },
+    {
+      "Id": "2.2.15",
+      "Description": "Ensure that S3 buckets have not policies which allow WRITE access",
+      "Checks": [
+        "s3_bucket_policy_public_write_access"
+      ],
+      "Attributes": [
+        {
+          "Title": "S3 buckets have not policies which allow WRITE access",
+          "Section": "2. Attack Surface",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "2.2.16",
+      "Description": "Ensure there are no S3 buckets listable by Everyone or Any AWS customer",
+      "Checks": [
+        "s3_bucket_public_list_acl"
+      ],
+      "Attributes": [
+        {
+          "Title": "No S3 buckets are listable by Everyone or Any AWS customer",
+          "Section": "2. Attack Surface",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "2.2.17",
+      "Description": "Ensure there are no S3 buckets writable by Everyone or Any AWS customer",
+      "Checks": [
+        "s3_bucket_public_write_acl"
+      ],
+      "Attributes": [
+        {
+          "Title": "No S3 buckets writable by Everyone or Any AWS customer",
+          "Section": "2. Attack Surface",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "2.3.21",
+      "Description": "Ensure Amazon SageMaker Notebook instances have not direct internet access",
+      "Checks": [
+        "sagemaker_notebook_instance_without_direct_internet_access_configured"
+      ],
+      "Attributes": [
+        {
+          "Title": "Amazon SageMaker Notebook instances have not direct internet access",
+          "Section": "2. Attack Surface",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "2.2.18",
+      "Description": "Ensure Secrets Manager secrets are not publicly accessible",
+      "Checks": [
+        "secretsmanager_not_publicly_accessible"
+      ],
+      "Attributes": [
+        {
+          "Title": "Secrets Manager secrets are not publicly accessible",
+          "Section": "2. Attack Surface",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "2.3.22",
+      "Description": "Ensure that SES identities are not publicly accessible",
+      "Checks": [
+        "ses_identity_not_publicly_accessible"
+      ],
+      "Attributes": [
+        {
+          "Title": "SES identities are not publicly accessible",
+          "Section": "2. Attack Surface",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "2.3.23",
+      "Description": "Ensure SQS queues have not policy set as Public",
+      "Checks": [
+        "sqs_queues_not_publicly_accessible"
+      ],
+      "Attributes": [
+        {
+          "Title": "SQS queues have not policy set as Public",
+          "Section": "2. Attack Surface",
+          "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": 5
+        }
+      ]
+    },
+    {
+      "Id": "2.3.24",
+      "Description": "Ensure that there are not SSM Documents set as public",
+      "Checks": [
+        "ssm_documents_set_as_public"
+      ],
+      "Attributes": [
+        {
+          "Title": "No SSM Documents are set as public",
+          "Section": "2. Attack Surface",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "3.1.1",
+      "Description": "Ensure CloudTrail is enabled in all regions",
+      "Checks": [
+        "cloudtrail_multi_region_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "CloudTrail enabled",
+          "Section": "3. Logging and Monitoring",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "3.1.2",
+      "Description": "Ensure CloudTrail log file validation is enabled",
+      "Checks": [
+        "cloudtrail_log_file_validation_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "CloudTrail file validation enabled",
+          "Section": "3. Logging and Monitoring",
+          "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": 2
+        }
+      ]
+    },
+    {
+      "Id": "3.3.1",
+      "Description": "Ensure AWS Config is enabled in all regions",
+      "Checks": [
+        "config_recorder_all_regions_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "AWS Config is enabled",
+          "Section": "3. Logging and Monitoring",
+          "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": 2
+        }
+      ]
+    },
+    {
+      "Id": "3.1.3",
+      "Description": "Ensure that server access logging is enabled on the CloudTrail S3 bucket",
+      "Checks": [
+        "cloudtrail_logs_s3_bucket_access_logging_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "Server access logging is enabled on the CloudTrail S3 bucket",
+          "Section": "3. Logging and Monitoring",
+          "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": 2
+        }
+      ]
+    },
+    {
+      "Id": "4.2.3",
+      "Description": "Ensure CloudTrail logs are encrypted at rest using KMS CMKs",
+      "Checks": [
+        "cloudtrail_kms_encryption_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "CloudTrail logs are encrypted at rest using KMS CMKs",
+          "Section": "4. Encryption",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "3.2.1",
+      "Description": "Ensure rotation for customer-created symmetric CMKs is enabled",
+      "Checks": [
+        "kms_cmk_rotation_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "Rotation for customer-created symmetric CMKs enabled",
+          "Section": "3. Logging and Monitoring",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "3.1.4",
+      "Description": "Ensure VPC flow logging is enabled in all VPCs",
+      "Checks": [
+        "vpc_flow_logs_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "VPC flow logging enabled in all VPCs",
+          "Section": "3. Logging and Monitoring",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "3.1.5",
+      "Description": "Ensure that object-level logging for write events is enabled for S3 buckets",
+      "Checks": [
+        "cloudtrail_s3_dataevents_write_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "Object-level logging for write events is enabled for S3 buckets",
+          "Section": "3. Logging and Monitoring",
+          "SubSection": "3.1 Logging",
+          "AttributeDescription": "S3 object-level API operations, such as GetObject, PutObject, and DeleteObject, are classified as data events in AWS CloudTrail. By default, CloudTrail does not log data events, meaning detailed tracking of individual object interactions is not enabled. To enhance visibility and security, it is recommended to enable object-level logging for S3 buckets to monitor access and modification activities.",
+          "AdditionalInformation": "Enabling object-level logging helps organizations meet compliance requirements, enhance security monitoring, and detect unauthorized access. It allows administrators to analyze user behavior, track modifications to critical data, and respond to security incidents in real time using Amazon CloudWatch Events, ensuring greater control over S3 bucket activity.",
+          "LevelOfRisk": 1
+        }
+      ]
+    },
+    {
+      "Id": "3.1.6",
+      "Description": "Ensure that object-level logging for read events is enabled for S3 buckets",
+      "Checks": [
+        "cloudtrail_s3_dataevents_read_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "Object-level logging for read events is enabled for S3 buckets",
+          "Section": "3. Logging and Monitoring",
+          "SubSection": "3.1 Logging",
+          "AttributeDescription": "S3 object-level API operations, such as GetObject, PutObject, and DeleteObject, are classified as data events in AWS CloudTrail. By default, CloudTrail does not log data events, meaning individual object interactions are not tracked unless explicitly enabled. To improve security monitoring and compliance, it is recommended to enable object-level logging for S3 buckets.",
+          "AdditionalInformation": "Object-level logging enhances data security, compliance, and operational visibility by providing detailed tracking of who accessed, modified, or deleted objects within S3 buckets. This enables organizations to monitor user behavior, detect unauthorized access, and quickly respond to potential security incidents using Amazon CloudWatch Events.",
+          "LevelOfRisk": 1
+        }
+      ]
+    },
+    {
+      "Id": "3.3.2",
+      "Description": "Ensure unauthorized API calls are monitored",
+      "Checks": [
+        "cloudwatch_log_metric_filter_unauthorized_api_calls"
+      ],
+      "Attributes": [
+        {
+          "Title": "Unauthorized API calls are monitored",
+          "Section": "3. Logging and Monitoring",
+          "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": 2
+        }
+      ]
+    },
+    {
+      "Id": "3.3.3",
+      "Description": "Ensure management console sign-in without MFA is monitored",
+      "Checks": [
+        "cloudwatch_log_metric_filter_sign_in_without_mfa"
+      ],
+      "Attributes": [
+        {
+          "Title": "Management console sign-in without MFA is monitored",
+          "Section": "3. Logging and Monitoring",
+          "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": 2
+        }
+      ]
+    },
+    {
+      "Id": "3.3.4",
+      "Description": "Ensure usage of the root account is monitored",
+      "Checks": [
+        "cloudwatch_log_metric_filter_root_usage"
+      ],
+      "Attributes": [
+        {
+          "Title": "Usage of root account monitored",
+          "Section": "3. Logging and Monitoring",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "3.3.5",
+      "Description": "Ensure IAM policy changes are monitored",
+      "Checks": [
+        "cloudwatch_log_metric_filter_policy_changes"
+      ],
+      "Attributes": [
+        {
+          "Title": "IAM policy changes are monitored",
+          "Section": "3. Logging and Monitoring",
+          "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": 2
+        }
+      ]
+    },
+    {
+      "Id": "3.3.6",
+      "Description": "Ensure CloudTrail configuration changes are monitored",
+      "Checks": [
+        "cloudwatch_log_metric_filter_and_alarm_for_cloudtrail_configuration_changes_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "CloudTrail configuration changes are monitored",
+          "Section": "3. Logging and Monitoring",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "3.3.7",
+      "Description": "Ensure AWS Management Console authentication failures are monitored",
+      "Checks": [
+        "cloudwatch_log_metric_filter_authentication_failures"
+      ],
+      "Attributes": [
+        {
+          "Title": "AWS Management Console authentication failures are monitored",
+          "Section": "3. Logging and Monitoring",
+          "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": 2
+        }
+      ]
+    },
+    {
+      "Id": "3.3.8",
+      "Description": "Ensure disabling or scheduled deletion of customer created CMKs is monitored",
+      "Checks": [
+        "cloudwatch_log_metric_filter_disable_or_scheduled_deletion_of_kms_cmk"
+      ],
+      "Attributes": [
+        {
+          "Title": "Disabling or scheduled deletion of customer created CMKs is monitored",
+          "Section": "3. Logging and Monitoring",
+          "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": 2
+        }
+      ]
+    },
+    {
+      "Id": "3.3.9",
+      "Description": "Ensure S3 bucket policy changes are monitored",
+      "Checks": [
+        "cloudwatch_log_metric_filter_for_s3_bucket_policy_changes"
+      ],
+      "Attributes": [
+        {
+          "Title": "S3 bucket policy changes are monitored",
+          "Section": "3. Logging and Monitoring",
+          "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": 2
+        }
+      ]
+    },
+    {
+      "Id": "3.3.10",
+      "Description": "Ensure AWS Config configuration changes are monitored",
+      "Checks": [
+        "cloudwatch_log_metric_filter_and_alarm_for_aws_config_configuration_changes_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "AWS Config configuration changes are monitored",
+          "Section": "3. Logging and Monitoring",
+          "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": 2
+        }
+      ]
+    },
+    {
+      "Id": "3.3.11",
+      "Description": "Ensure security group changes are monitored",
+      "Checks": [
+        "cloudwatch_log_metric_filter_security_group_changes"
+      ],
+      "Attributes": [
+        {
+          "Title": "Security group changes are monitored",
+          "Section": "3. Logging and Monitoring",
+          "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. Security groups act as stateful packet filters that control inbound and outbound traffic within a VPC. It is recommended to establish a metric filter and alarm to detect changes to security groups to prevent unauthorized modifications that could expose resources to security threats.",
+          "AdditionalInformation": "Monitoring security group changes helps ensure that network access controls remain secure and that AWS resources are not unintentionally exposed. Unauthorized or accidental modifications to security groups can create security gaps, increasing the risk of data breaches and unauthorized access. Real-time alerts enable security teams to detect, investigate, and respond to security group changes quickly, maintaining a strong network security posture.",
+          "LevelOfRisk": 3
+        }
+      ]
+    },
+    {
+      "Id": "3.3.12",
+      "Description": "Ensure Network Access Control List (NACL) changes are monitored",
+      "Checks": [
+        "cloudwatch_changes_to_network_acls_alarm_configured"
+      ],
+      "Attributes": [
+        {
+          "Title": "Network Access Control List (NACL) changes are monitored",
+          "Section": "3. Logging and Monitoring",
+          "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": 2
+        }
+      ]
+    },
+    {
+      "Id": "3.3.13",
+      "Description": "Ensure changes to network gateways are monitored",
+      "Checks": [
+        "cloudwatch_changes_to_network_gateways_alarm_configured"
+      ],
+      "Attributes": [
+        {
+          "Title": "Changes to network gateways are monitored",
+          "Section": "3. Logging and Monitoring",
+          "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": 2
+        }
+      ]
+    },
+    {
+      "Id": "3.3.14",
+      "Description": "Ensure route table changes are monitored",
+      "Checks": [
+        "cloudwatch_changes_to_network_route_tables_alarm_configured"
+      ],
+      "Attributes": [
+        {
+          "Title": "Route table changes are monitored",
+          "Section": "3. Logging and Monitoring",
+          "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": 2
+        }
+      ]
+    },
+    {
+      "Id": "3.3.15",
+      "Description": "Ensure VPC changes are monitored",
+      "Checks": [
+        "cloudwatch_changes_to_vpcs_alarm_configured"
+      ],
+      "Attributes": [
+        {
+          "Title": "VPC changes are monitored",
+          "Section": "3. Logging and Monitoring",
+          "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": 2
+        }
+      ]
+    },
+    {
+      "Id": "3.3.16",
+      "Description": "Ensure AWS Organizations changes are monitored",
+      "Checks": [
+        "cloudwatch_log_metric_filter_aws_organizations_changes"
+      ],
+      "Attributes": [
+        {
+          "Title": "AWS Organizations changes are monitored",
+          "Section": "3. Logging and Monitoring",
+          "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": 2
+        }
+      ]
+    },
+    {
+      "Id": "3.3.17",
+      "Description": "Ensure AWS Security Hub is enabled",
+      "Checks": [
+        "securityhub_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "Security Hub enabled",
+          "Section": "3. Logging and Monitoring",
+          "SubSection": "3.3 Monitoring",
+          "AttributeDescription": "AWS Security Hub centralizes security data from multiple AWS services and third-party security tools, allowing for real-time threat detection, risk assessment, and compliance monitoring. When enabled, Security Hub aggregates, organizes, and prioritizes security findings from services such as Amazon GuardDuty, Amazon Inspector, and Amazon Macie, as well as integrated third-party security products. This provides organizations with a unified security management platform to enhance threat visibility.",
+          "AdditionalInformation": "Enabling AWS Security Hub provides a comprehensive view of your security posture, helping to identify vulnerabilities, detect threats, and enforce security best practices. It allows organizations to monitor security trends, benchmark environments against industry standards, and quickly respond to high-priority security issues, strengthening overall AWS security governance and compliance.",
+          "LevelOfRisk": 3
+        }
+      ]
+    },
+    {
+      "Id": "3.2.2",
+      "Description": "Ensure CloudWatch Log Groups have a retention policy of specific days",
+      "Checks": [
+        "cloudwatch_log_group_retention_policy_specific_days_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "CloudWatch Log Groups have a retention policy of specific days",
+          "Section": "3. Logging and Monitoring",
+          "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": 2
+        }
+      ]
+    }
+  ]
+}
diff --git a/prowler/compliance/aws/soc2_aws.json b/prowler/compliance/aws/soc2_aws.json
index 6892326938..0160111ef0 100644
--- a/prowler/compliance/aws/soc2_aws.json
+++ b/prowler/compliance/aws/soc2_aws.json
@@ -4,34 +4,6 @@
   "Provider": "AWS",
   "Description": "System and Organization Controls (SOC), defined by the American Institute of Certified Public Accountants (AICPA), is the name of a set of reports that's produced during an audit. It's intended for use by service organizations (organizations that provide information systems as a service to other organizations) to issue validated reports of internal controls over those information systems to the users of those services. The reports focus on controls grouped into five categories known as Trust Service Principles.",
   "Requirements": [
-    {
-      "Id": "cc_1_1",
-      "Name": "CC1.1 COSO Principle 1: The entity demonstrates a commitment to integrity and ethical values",
-      "Description": "Sets the Tone at the Top - The board of directors and management, at all levels, demonstrate through their directives, actions, and behavior the importance of integrity and ethical values to support the functioning of the system of internal control. Establishes Standards of Conduct - The expectations of the board of directors and senior management concerning integrity and ethical values are defined in the entityโ€™s standards of conduct and understood at all levels of the entity and by outsourced service providers and business partners. Evaluates Adherence to Standards of Conduct - Processes are in place to evaluate the performance of individuals and teams against the entityโ€™s expected standards of conduct. Addresses Deviations in a Timely Manner - Deviations from the entityโ€™s expected standards of conduct are identified and remedied in a timely and consistent manner.",
-      "Attributes": [
-        {
-          "ItemId": "cc_1_1",
-          "Section": "CC1.0 - Common Criteria Related to Control Environment",
-          "Service": "aws",
-          "Type": "manual"
-        }
-      ],
-      "Checks": []
-    },
-    {
-      "Id": "cc_1_2",
-      "Name": "CC1.2 COSO Principle 2: The board of directors demonstrates independence from management and exercises oversight of the development and performance of internal control",
-      "Description": "Establishes Oversight Responsibilities - The board of directors identifies and accepts its oversight responsibilities in relation to established requirements and expectations. Applies Relevant Expertise - The board of directors defines, maintains, and periodically evaluates the skills and expertise needed among its members to enable them to ask probing questions of senior management and take commensurate action. Operates Independently - The board of directors has sufficient members who are independent from management and objective in evaluations and decision making. Additional point of focus specifically related to all engagements using the trust services criteria: Supplements Board Expertise - The board of directors supplements its expertise relevant to security, availability, processing integrity, confidentiality, and privacy, as needed, through the use of a subcommittee or consultants.",
-      "Attributes": [
-        {
-          "ItemId": "cc_1_2",
-          "Section": "CC1.0 - Common Criteria Related to Control Environment",
-          "Service": "aws",
-          "Type": "manual"
-        }
-      ],
-      "Checks": []
-    },
     {
       "Id": "cc_1_3",
       "Name": "CC1.3 COSO Principle 3: Management establishes, with board oversight, structures, reporting lines, and appropriate authorities and responsibilities in the pursuit of objectives",
@@ -40,7 +12,7 @@
         {
           "ItemId": "cc_1_3",
           "Section": "CC1.0 - Common Criteria Related to Control Environment",
-          "Service": "aws",
+          "Service": "iam",
           "Type": "automated"
         }
       ],
@@ -53,34 +25,6 @@
         "iam_user_console_access_unused"
       ]
     },
-    {
-      "Id": "cc_1_4",
-      "Name": "CC1.4 COSO Principle 4: The entity demonstrates a commitment to attract, develop, and retain competent individuals in alignment with objectives",
-      "Description": "Establishes Policies and Practices - Policies and practices reflect expectations of competence necessary to support the achievement of objectives. Evaluates Competence and Addresses Shortcomings - The board of directors and management evaluate competence across the entity and in outsourced service providers in relation to established policies and practices and act as necessary to address shortcomings. Attracts, Develops, and Retains Individuals - The entity provides the mentoring and training needed to attract, develop, and retain sufficient and competent personnel and outsourced service providers to support the achievement of objectives. Plans and Prepares for Succession - Senior management and the board of directors develop contingency plans for assignments of responsibility important for internal control. Additional point of focus specifically related to all engagements using the trust services criteria: Considers the Background of Individuals - The entity considers the background of potential and existing personnel, contractors, and vendor employees when determining whether to employ and retain the individuals. Considers the Technical Competency of Individuals - The entity considers the technical competency of potential and existing personnel, contractors, and vendor employees when determining whether to employ and retain the individuals. Provides Training to Maintain Technical Competencies - The entity provides training programs, including continuing education and training, to ensure skill sets and technical competency of existing personnel, contractors, and vendor employees are developed and maintained.",
-      "Attributes": [
-        {
-          "ItemId": "cc_1_4",
-          "Section": "CC1.0 - Common Criteria Related to Control Environment",
-          "Service": "aws",
-          "Type": "manual"
-        }
-      ],
-      "Checks": []
-    },
-    {
-      "Id": "cc_1_5",
-      "Name": "CC1.5 COSO Principle 5: The entity holds individuals accountable for their internal control responsibilities in the pursuit of objectives",
-      "Description": "Enforces Accountability Through Structures, Authorities, and Responsibilities - Management and the board of directors establish the mechanisms to communicate and hold individuals accountable for performance of internal control responsibilities across the entity and implement corrective action as necessary. Establishes Performance Measures, Incentives, and Rewards - Management and the board of directors establish performance measures, incentives, and other rewards appropriate for responsibilities at all levels of the entity, reflecting appropriate dimensions of performance and expected standards of conduct, and considering the achievement of both short-term and longer-term objectives. Evaluates Performance Measures, Incentives, and Rewards for Ongoing Relevance - Management and the board of directors align incentives and rewards with the fulfillment of internal control responsibilities in the achievement of objectives. Considers Excessive Pressures - Management and the board of directors evaluate and adjust pressures associated with the achievement of objectives as they assign responsibilities, develop performance measures, and evaluate performance. Evaluates Performance and Rewards or Disciplines Individuals - Management and the board of directors evaluate performance of internal control responsibilities, including adherence to standards of conduct and expected levels of competence, and provide rewards or exercise disciplinary action, as appropriate.",
-      "Attributes": [
-        {
-          "ItemId": "cc_1_5",
-          "Section": "CC1.0 - Common Criteria Related to Control Environment",
-          "Service": "aws",
-          "Type": "manual"
-        }
-      ],
-      "Checks": []
-    },
     {
       "Id": "cc_2_1",
       "Name": "CC2.1 COSO Principle 13: The entity obtains or generates and uses relevant, quality information to support the functioning of internal control",
@@ -100,34 +44,6 @@
         "config_recorder_all_regions_enabled"
       ]
     },
-    {
-      "Id": "cc_2_2",
-      "Name": "CC2.2 COSO Principle 14: The entity internally communicates information, including objectives and responsibilities for internal control, necessary to support the functioning of internal control",
-      "Description": "Communicates Internal Control Information - A process is in place to communicate required information to enable all personnel to understand and carry out their internal control responsibilities. Communicates With the Board of Directors - Communication exists between management and the board of directors so that both have information needed to fulfill their roles with respect to the entityโ€™s objectives. Provides Separate Communication Lines - Separate communication channels, such as whistle-blower hotlines, are in place and serve as fail-safe mechanisms to enable anonymous or confidential communication when normal channels are inoperative or ineffective. Selects Relevant Method of Communication - The method of communication considers the timing, audience, and nature of the information. Additional point of focus specifically related to all engagements using the trust services criteria: Communicates Responsibilities - Entity personnel with responsibility for designing, developing, implementing,operating, maintaining, or monitoring system controls receive communications about their responsibilities, including changes in their responsibilities, and have the information necessary to carry out those responsibilities. Communicates Information on Reporting Failures, Incidents, Concerns, and Other Mattersโ€”Entity personnel are provided with information on how to report systems failures, incidents, concerns, and other complaints to personnel. Communicates Objectives and Changes to Objectives - The entity communicates its objectives and changes to those objectives to personnel in a timely manner. Communicates Information to Improve Security Knowledge and Awareness - The entity communicates information to improve security knowledge and awareness and to model appropriate security behaviors to personnel through a security awareness training program. Additional points of focus that apply only when an engagement using the trust services criteria is performed at the system level: Communicates Information About System Operation and Boundaries - The entity prepares and communicates information about the design and operation of the system and its boundaries to authorized personnel to enable them to understand their role in the system and the results of system operation. Communicates System Objectives - The entity communicates its objectives to personnel to enable them to carry out their responsibilities. Communicates System Changes - System changes that affect responsibilities or the achievement of the entity's objectives are communicated in a timely manner.",
-      "Attributes": [
-        {
-          "ItemId": "cc_2_2",
-          "Section": "CC2.0 - Common Criteria Related to Communication and Information",
-          "Service": "aws",
-          "Type": "manual"
-        }
-      ],
-      "Checks": []
-    },
-    {
-      "Id": "cc_2_3",
-      "Name": "CC2.3 COSO Principle 15: The entity communicates with external parties regarding matters affecting the functioning of internal control",
-      "Description": "Communicates to External Parties - Processes are in place to communicate relevant and timely information to external parties, including shareholders, partners, owners, regulators, customers, financial analysts, and other external parties. Enables Inbound Communications - Open communication channels allow input from customers, consumers, suppliers, external auditors, regulators, financial analysts, and others, providing management and the board of directors with relevant information. Communicates With the Board of Directors - Relevant information resulting from assessments conducted by external parties is communicated to the board of directors. Provides Separate Communication Lines - Separate communication channels, such as whistle-blower hotlines, are in place and serve as fail-safe mechanisms to enable anonymous or confidential communication when normal channels are inoperative or ineffective. Selects Relevant Method of Communication - The method of communication considers the timing, audience, and nature of the communication and legal, regulatory, and fiduciary requirements and expectations. Communicates Objectives Related to Confidentiality and Changes to Objectives - The entity communicates, to external users, vendors, business partners and others whose products and services are part of the system, objectives and changes to objectives related to confidentiality. Additional point of focus that applies only to an engagement using the trust services criteria for privacy: Communicates Objectives Related to Privacy and Changes to Objectives - The entity communicates, to external users, vendors, business partners and others whose products and services are part of the system, objectives related to privacy and changes to those objectives. Additional points of focus that apply only when an engagement using the trust services criteria is performed at the system level: Communicates Information About System Operation and Boundaries - The entity prepares and communicates information about the design and operation of the system and its boundaries to authorized external users to permit users to understand their role in the system and the results of system operation. Communicates System Objectives - The entity communicates its system objectives to appropriate external users. Communicates System Responsibilities - External users with responsibility for designing, developing, implementing, operating, maintaining, and monitoring system controls receive communications about their responsibilities and have the information necessary to carry out those responsibilities. Communicates Information on Reporting System Failures, Incidents, Concerns, and Other Matters - External users are provided with information on how to report systems failures, incidents, concerns, and other complaints to appropriate personnel.",
-      "Attributes": [
-        {
-          "ItemId": "cc_2_3",
-          "Section": "CC2.0 - Common Criteria Related to Communication and Information",
-          "Service": "aws",
-          "Type": "manual"
-        }
-      ],
-      "Checks": []
-    },
     {
       "Id": "cc_3_1",
       "Name": "CC3.1 COSO Principle 6: The entity specifies objectives with sufficient clarity to enable the identification and assessment of risks relating to objectives",
@@ -174,10 +90,16 @@
           "ItemId": "cc_3_3",
           "Section": "CC3.0 - Common Criteria Related to Risk Assessment",
           "Service": "aws",
-          "Type": "manual"
+          "Type": "automated"
         }
       ],
-      "Checks": []
+      "Checks": [
+        "iam_inline_policy_allows_privilege_escalation",
+        "iam_policy_no_full_access_to_cloudtrail",
+        "cloudtrail_threat_detection_privilege_escalation",
+        "cloudtrail_threat_detection_enumeration",
+        "cloudtrail_threat_detection_llm_jacking"
+      ]
     },
     {
       "Id": "cc_3_4",
@@ -195,20 +117,6 @@
         "config_recorder_all_regions_enabled"
       ]
     },
-    {
-      "Id": "cc_4_1",
-      "Name": "CC4.1 COSO Principle 16: The entity selects, develops, and performs ongoing and/or separate evaluations to ascertain whether the components of internal control are present and functioning",
-      "Description": "Considers a Mix of Ongoing and Separate Evaluations - Management includes a balance of ongoing and separate evaluations. Considers Rate of Change - Management considers the rate of change in business and business processes when selecting and developing ongoing and separate evaluations. Establishes Baseline Understanding - The design and current state of an internal control system are used to establish a baseline for ongoing and separate evaluations. Uses Knowledgeable Personnel - Evaluators performing ongoing and separate evaluations have sufficient knowledge to understand what is being evaluated. Integrates With Business Processes - Ongoing evaluations are built into the business processes and adjust to changing conditions. Adjusts Scope and Frequencyโ€”Management varies the scope and frequency of separate evaluations depending on risk. Objectively Evaluates - Separate evaluations are performed periodically to provide objective feedback. Considers Different Types of Ongoing and Separate Evaluations - Management uses a variety of different types of ongoing and separate evaluations, including penetration testing, independent certification made against established specifications (for example, ISO certifications), and internal audit assessments.",
-      "Attributes": [
-        {
-          "ItemId": "cc_4_1",
-          "Section": "CC4.0 - Monitoring Activities",
-          "Service": "aws",
-          "Type": "manual"
-        }
-      ],
-      "Checks": []
-    },
     {
       "Id": "cc_4_2",
       "Name": "CC4.2 COSO Principle 17: The entity evaluates and communicates internal control deficiencies in a timely manner to those parties responsible for taking corrective action, including senior management and the board of directors, as appropriate",
@@ -226,20 +134,6 @@
         "guardduty_no_high_severity_findings"
       ]
     },
-    {
-      "Id": "cc_5_1",
-      "Name": "CC5.1 COSO Principle 10: The entity selects and develops control activities that contribute to the mitigation of risks to the achievement of objectives to acceptable levels",
-      "Description": "Integrates With Risk Assessment - Control activities help ensure that risk responses that address and mitigate risks are carried out. Considers Entity-Specific Factors - Management considers how the environment, complexity, nature, and scope of its operations, as well as the specific characteristics of its organization, affect the selection and development of control activities. Determines Relevant Business Processes - Management determines which relevant business processes require control activities. Evaluates a Mix of 2017 Data Submitted Types - Control activities include a range and variety of controls and may include a balance of approaches to mitigate risks, considering both manual and automated controls, and preventive and detective controls. Considers at What Level Activities Are Applied - Management considers control activities at various levels in the entity. Addresses Segregation of Duties - Management segregates incompatible duties, and where such segregation is not practical, management selects and develops alternative control activities.",
-      "Attributes": [
-        {
-          "ItemId": "cc_5_1",
-          "Section": "CC5.0 - Control Activities",
-          "Service": "aws",
-          "Type": "manual"
-        }
-      ],
-      "Checks": []
-    },
     {
       "Id": "cc_5_2",
       "Name": "CC5.2 COSO Principle 11: The entity also selects and develops general control activities over technology to support the achievement of objectives",
@@ -248,25 +142,22 @@
         {
           "ItemId": "cc_5_2",
           "Section": "CC5.0 - Control Activities",
-          "Service": "aws",
-          "Type": "manual"
+          "Service": "cloudwatch",
+          "Type": "automated"
         }
       ],
-      "Checks": []
-    },
-    {
-      "Id": "cc_5_3",
-      "Name": "CCC5.3 COSO Principle 12: The entity deploys control activities through policies that establish what is expected and in procedures that put policies into action",
-      "Description": "Establishes Policies and Procedures to Support Deployment of Management โ€˜s Directives - Management establishes control activities that are built into business processes and employeesโ€™ day-to-day activities through policies establishing what is expected and relevant procedures specifying actions. Establishes Responsibility and Accountability for Executing Policies and Procedures - Management establishes responsibility and accountability for control activities with management (or other designated personnel) of the business unit or function in which the relevant risks reside. Performs in a Timely Manner - Responsible personnel perform control activities in a timely manner as defined by the policies and procedures. Takes Corrective Action - Responsible personnel investigate and act on matters identified as a result of executing control activities. Performs Using Competent Personnel - Competent personnel with sufficient authority perform control activities with diligence and continuing focus. Reassesses Policies and Procedures - Management periodically reviews control activities to determine their continued relevance and refreshes them when necessary.",
-      "Attributes": [
-        {
-          "ItemId": "cc_5_3",
-          "Section": "CC5.0 - Control Activities",
-          "Service": "aws",
-          "Type": "manual"
-        }
-      ],
-      "Checks": []
+      "Checks": [
+        "cloudwatch_changes_to_network_acls_alarm_configured",
+        "cloudwatch_changes_to_network_gateways_alarm_configured",
+        "cloudwatch_changes_to_network_route_tables_alarm_configured",
+        "cloudwatch_changes_to_vpcs_alarm_configured",
+        "cloudwatch_log_metric_filter_and_alarm_for_aws_config_configuration_changes_enabled",
+        "cloudwatch_log_metric_filter_and_alarm_for_cloudtrail_configuration_changes_enabled",
+        "cloudwatch_log_metric_filter_aws_organizations_changes",
+        "cloudwatch_log_metric_filter_for_s3_bucket_policy_changes",
+        "cloudwatch_log_metric_filter_policy_changes",
+        "cloudwatch_log_metric_filter_security_group_changes"
+      ]
     },
     {
       "Id": "cc_6_1",
@@ -318,34 +209,6 @@
         "iam_inline_policy_no_administrative_privileges"
       ]
     },
-    {
-      "Id": "cc_6_4",
-      "Name": "CC6.4 The entity restricts physical access to facilities and protected information assets to authorized personnel to meet the entityโ€™s objectives",
-      "Description": "Creates or Modifies Physical Access - Processes are in place to create or modify physical access to facilities such as data centers, office spaces, and work areas, based on authorization from the system's asset owner. Removes Physical Access - Processes are in place to remove access to physical resources when an individual no longer requires access. Reviews Physical Access - Processes are in place to periodically review physical access to ensure consistency with job responsibilities.",
-      "Attributes": [
-        {
-          "ItemId": "cc_6_4",
-          "Section": "CC6.0 - Logical and Physical Access",
-          "Service": "aws",
-          "Type": "manual"
-        }
-      ],
-      "Checks": []
-    },
-    {
-      "Id": "cc_6_5",
-      "Name": "CC6.5 The entity discontinues logical and physical protections over physical assets only after the ability to read or recover data and software from those assets has been diminished and is no longer required to meet the entityโ€™s objectives",
-      "Description": "Identifies Data and Software for Disposal - Procedures are in place to identify data and software stored on equipment to be disposed and to render such data and software unreadable. Removes Data and Software From Entity Control - Procedures are in place to remove data and software stored on equipment to be removed from the physical control of the entity and to render such data and software unreadable.",
-      "Attributes": [
-        {
-          "ItemId": "cc_6_5",
-          "Section": "CC6.0 - Logical and Physical Access",
-          "Service": "aws",
-          "Type": "manual"
-        }
-      ],
-      "Checks": []
-    },
     {
       "Id": "cc_6_6",
       "Name": "CC6.6 The entity implements logical access security measures to protect against threats from sources outside its system boundaries",
@@ -359,7 +222,51 @@
         }
       ],
       "Checks": [
-        "ec2_instance_public_ip"
+        "ec2_instance_public_ip",
+        "ec2_ami_public",
+        "ec2_ebs_public_snapshot",
+        "ec2_ebs_snapshot_account_block_public_access",
+        "ec2_launch_template_no_public_ip",
+        "ec2_securitygroup_allow_wide_open_public_ipv4",
+        "vpc_subnet_no_public_ip_by_default",
+        "vpc_subnet_separate_private_public",
+        "ec2_instance_port_cassandra_exposed_to_internet",
+        "ec2_instance_port_cifs_exposed_to_internet",
+        "ec2_instance_port_elasticsearch_kibana_exposed_to_internet",
+        "ec2_instance_port_ftp_exposed_to_internet",
+        "ec2_instance_port_kafka_exposed_to_internet",
+        "ec2_instance_port_kerberos_exposed_to_internet",
+        "ec2_instance_port_ldap_exposed_to_internet",
+        "ec2_instance_port_memcached_exposed_to_internet",
+        "ec2_instance_port_mongodb_exposed_to_internet",
+        "ec2_instance_port_mysql_exposed_to_internet",
+        "ec2_instance_port_oracle_exposed_to_internet",
+        "ec2_instance_port_postgresql_exposed_to_internet",
+        "ec2_instance_port_rdp_exposed_to_internet",
+        "ec2_instance_port_redis_exposed_to_internet",
+        "ec2_instance_port_sqlserver_exposed_to_internet",
+        "ec2_instance_port_ssh_exposed_to_internet",
+        "ec2_instance_port_telnet_exposed_to_internet",
+        "ec2_networkacl_allow_ingress_any_port",
+        "ec2_networkacl_allow_ingress_tcp_port_22",
+        "ec2_networkacl_allow_ingress_tcp_port_3389",
+        "ec2_securitygroup_allow_ingress_from_internet_to_all_ports",
+        "ec2_securitygroup_allow_ingress_from_internet_to_any_port",
+        "ec2_securitygroup_allow_ingress_from_internet_to_high_risk_tcp_ports",
+        "ec2_securitygroup_allow_ingress_from_internet_to_port_mongodb_27017_27018",
+        "ec2_securitygroup_allow_ingress_from_internet_to_tcp_ftp_port_20_21",
+        "ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_22",
+        "ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_3389",
+        "ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_cassandra_7199_9160_8888",
+        "ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_elasticsearch_kibana_9200_9300_5601",
+        "ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_kafka_9092",
+        "ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_memcached_11211",
+        "ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_mysql_3306",
+        "ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_oracle_1521_2483",
+        "ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_postgres_5432",
+        "ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_redis_6379",
+        "ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_sql_server_1433_1434",
+        "ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_telnet_23"
       ]
     },
     {
@@ -370,12 +277,20 @@
         {
           "ItemId": "cc_6_7",
           "Section": "CC6.0 - Logical and Physical Access",
-          "Service": "acm",
+          "Service": "aws",
           "Type": "automated"
         }
       ],
       "Checks": [
-        "acm_certificates_expiration_check"
+        "acm_certificates_expiration_check",
+        "dms_endpoint_redis_in_transit_encryption_enabled",
+        "dynamodb_accelerator_cluster_in_transit_encryption_enabled",
+        "ec2_transitgateway_auto_accept_vpc_attachments",
+        "elasticache_redis_cluster_in_transit_encryption_enabled",
+        "kafka_cluster_in_transit_encryption_enabled",
+        "kafka_connector_in_transit_encryption_enabled",
+        "redshift_cluster_in_transit_encryption_enabled",
+        "transfer_server_in_transit_encryption_enabled"
       ]
     },
     {
@@ -517,10 +432,17 @@
           "ItemId": "cc_7_5",
           "Section": "CC7.0 - System Operations",
           "Service": "aws",
-          "Type": "manual"
+          "Type": "automated"
         }
       ],
-      "Checks": []
+      "Checks": [
+        "ec2_ebs_snapshots_encrypted",
+        "ec2_ebs_volume_snapshots_exists",
+        "neptune_cluster_copy_tags_to_snapshots",
+        "neptune_cluster_snapshot_encrypted",
+        "rds_instance_copy_tags_to_snapshots",
+        "redshift_cluster_automated_snapshot"
+      ]
     },
     {
       "Id": "cc_8_1",
@@ -530,7 +452,7 @@
         {
           "ItemId": "cc_8_1",
           "Section": "CC8.0 - Change Management",
-          "Service": "aws",
+          "Service": "config",
           "Type": "automated"
         }
       ],
@@ -538,55 +460,13 @@
         "config_recorder_all_regions_enabled"
       ]
     },
-    {
-      "Id": "cc_9_1",
-      "Name": "CC9.1 The entity identifies, selects, and develops risk mitigation activities for risks arising from potential business disruptions",
-      "Description": "Considers Mitigation of Risks of Business Disruption - Risk mitigation activities include the development of planned policies, procedures, communications, and alternative processing solutions to respond to, mitigate, and recover from security events that disrupt business operations. Those policies and procedures include monitoring processes and information and communications to meet the entity's objectives during response, mitigation, and recovery efforts. Considers the Use of Insurance to Mitigate Financial Impact Risks - The risk management activities consider the use of insurance to offset the financial impact of loss events that would otherwise impair the ability of the entity to meet its objectives.",
-      "Attributes": [
-        {
-          "ItemId": "cc_9_1",
-          "Section": "CC9.0 - Risk Mitigation",
-          "Service": "aws",
-          "Type": "manual"
-        }
-      ],
-      "Checks": []
-    },
-    {
-      "Id": "cc_9_2",
-      "Name": "CC9.2 The entity assesses and manages risks associated with vendors and business partners",
-      "Description": "Establishes Requirements for Vendor and Business Partner Engagements - The entity establishes specific requirements for a vendor and business partner engagement that includes (1) scope of services and product specifications, (2) roles and responsibilities, (3) compliance requirements, and (4) service levels. Assesses Vendor and Business Partner Risks - The entity assesses, on a periodic basis, the risks that vendors and business partners (and those entitiesโ€™ vendors and business partners) represent to the achievement of the entity's objectives. Assigns Responsibility and Accountability for Managing Vendors and Business Partners - The entity assigns responsibility and accountability for the management of risks associated with vendors and business partners. Establishes Communication Protocols for Vendors and Business Partners - The entity establishes communication and resolution protocols for service or product issues related to vendors and business partners. Establishes Exception Handling Procedures From Vendors and Business Partners - The entity establishes exception handling procedures for service or product issues related to vendors and business partners. Assesses Vendor and Business Partner Performance - The entity periodically assesses the performance of vendors and business partners. Implements Procedures for Addressing Issues Identified During Vendor and Business Partner Assessments - The entity implements procedures for addressing issues identified with vendor and business partner relationships. Implements Procedures for Terminating Vendor and Business Partner Relationships - The entity implements procedures for terminating vendor and business partner relationships. Obtains Confidentiality Commitments from Vendors and Business Partners - The entity obtains confidentiality commitments that are consistent with the entityโ€™s confidentiality commitments and requirements from vendors and business partners who have access to confidential information. Assesses Compliance With Confidentiality Commitments of Vendors and Business Partners - On a periodic and as-needed basis, the entity assesses compliance by vendors and business partners with the entityโ€™s confidentiality commitments and requirements. Obtains Privacy Commitments from Vendors and Business Partners - The entity obtains privacy commitments, consistent with the entityโ€™s privacy commitments and requirements, from vendors and business partners who have access to personal information. Assesses Compliance with Privacy Commitments of Vendors and Business Partners - On a periodic and as-needed basis, the entity assesses compliance by vendors and business partners with the entityโ€™s privacy commitments and requirements and takes corrective action as necessary.",
-      "Attributes": [
-        {
-          "ItemId": "cc_9_2",
-          "Section": "CC9.0 - Risk Mitigation",
-          "Service": "aws",
-          "Type": "manual"
-        }
-      ],
-      "Checks": []
-    },
     {
       "Id": "cc_a_1_1",
-      "Name": "A1.1 The entity maintains, monitors, and evaluates current processing capacity and use of system components (infrastructure, data, and software) to manage capacity demand and to enable the implementation of additional capacity to help meet its objectives",
-      "Description": "Measures Current Usage - The use of the system components is measured to establish a baseline for capacity management and to use when evaluating the risk of impaired availability due to capacity constraints. Forecasts Capacity - The expected average and peak use of system components is forecasted and compared to system capacity and associated tolerances. Forecasting considers capacity in the event of the failure of system components that constrain capacity. Makes Changes Based on Forecasts - The system change management process is initiated when forecasted usage exceeds capacity tolerances.",
-      "Attributes": [
-        {
-          "ItemId": "cc_a_1_1",
-          "Section": "CCA1.0 - Additional Criterial for Availability",
-          "Service": "aws",
-          "Type": "manual"
-        }
-      ],
-      "Checks": []
-    },
-    {
-      "Id": "cc_a_1_2",
       "Name": "A1.2 The entity authorizes, designs, develops or acquires, implements, operates, approves, maintains, and monitors environmental protections, software, data back-up processes, and recovery infrastructure to meet its objectives",
       "Description": "Measures Current Usage - The use of the system components is measured to establish a baseline for capacity management and to use when evaluating the risk of impaired availability due to capacity constraints. Forecasts Capacity - The expected average and peak use of system components is forecasted and compared to system capacity and associated tolerances. Forecasting considers capacity in the event of the failure of system components that constrain capacity. Makes Changes Based on Forecasts - The system change management process is initiated when forecasted usage exceeds capacity tolerances.",
       "Attributes": [
         {
-          "ItemId": "cc_a_1_2",
+          "ItemId": "cc_a_1_1",
           "Section": "CCA1.0 - Additional Criterial for Availability",
           "Service": "aws",
           "Type": "automated"
@@ -603,23 +483,36 @@
         "rds_instance_backup_enabled",
         "rds_instance_integration_cloudwatch_logs",
         "redshift_cluster_automated_snapshot",
-        "s3_bucket_object_versioning"
+        "s3_bucket_object_versioning",
+        "apigatewayv2_api_access_logging_enabled",
+        "appsync_field_level_logging_enabled",
+        "athena_workgroup_logging_enabled",
+        "awslambda_function_invoke_api_operations_cloudtrail_logging_enabled",
+        "bedrock_model_invocation_logging_enabled",
+        "cloudfront_distributions_logging_enabled",
+        "cloudtrail_logs_s3_bucket_access_logging_enabled",
+        "codebuild_project_logging_enabled",
+        "datasync_task_logging_enabled",
+        "dms_replication_task_source_logging_enabled",
+        "dms_replication_task_target_logging_enabled",
+        "ec2_client_vpn_endpoint_connection_logging_enabled",
+        "ecs_task_definitions_logging_enabled",
+        "elasticbeanstalk_environment_cloudwatch_logging_enabled",
+        "elb_logging_enabled",
+        "elbv2_logging_enabled",
+        "glue_etl_jobs_logging_enabled",
+        "mq_broker_logging_enabled",
+        "networkfirewall_logging_enabled",
+        "opensearch_service_domains_audit_logging_enabled",
+        "opensearch_service_domains_cloudwatch_logging_enabled",
+        "route53_public_hosted_zones_cloudwatch_logging_enabled",
+        "s3_bucket_server_access_logging_enabled",
+        "stepfunctions_statemachine_logging_enabled",
+        "waf_global_webacl_logging_enabled",
+        "wafv2_webacl_logging_enabled",
+        "wafv2_webacl_rule_logging_enabled"
       ]
     },
-    {
-      "Id": "cc_a_1_3",
-      "Name": "A1.3 The entity tests recovery plan procedures supporting system recovery to meet its objectives",
-      "Description": "Implements Business Continuity Plan Testing - Business continuity plan testing is performed on a periodic basis. The testing includes (1) development of testing scenarios based on threat likelihood and magnitude; (2) consideration of system components from across the entity that can impair the availability; (3) scenarios that consider the potential for the lack of availability of key personnel; and (4) revision of continuity plans and systems based on test results. Tests Integrity and Completeness of Back-Up Data - The integrity and completeness of back-up information is tested on a periodic basis.",
-      "Attributes": [
-        {
-          "ItemId": "cc_a_1_3",
-          "Section": "CCA1.0 - Additional Criterial for Availability",
-          "Service": "aws",
-          "Type": "manual"
-        }
-      ],
-      "Checks": []
-    },
     {
       "Id": "cc_c_1_1",
       "Name": "C1.1 The entity identifies and maintains confidential information to meet the entityโ€™s objectives related to confidentiality",
@@ -628,7 +521,7 @@
         {
           "ItemId": "cc_c_1_1",
           "Section": "CCC1.0 - Additional Criterial for Confidentiality",
-          "Service": "aws",
+          "Service": "rds",
           "Type": "automated"
         }
       ],
@@ -644,265 +537,15 @@
         {
           "ItemId": "cc_c_1_2",
           "Section": "CCC1.0 - Additional Criterial for Confidentiality",
-          "Service": "s3",
+          "Service": "aws",
           "Type": "automated"
         }
       ],
       "Checks": [
-        "s3_bucket_object_versioning"
+        "s3_bucket_object_versioning",
+        "cloudwatch_log_group_retention_policy_specific_days_enabled",
+        "kinesis_stream_data_retention_period"
       ]
-    },
-    {
-      "Id": "p_1_1",
-      "Name": "P1.1 The entity provides notice to data subjects about its privacy practices to meet the entityโ€™s objectives related to privacy",
-      "Description": "The entity provides notice to data subjects about its privacy practices to meet the entityโ€™s objectives related to privacy. The notice is updated and communicated to data subjects in a timely manner for changes to the entityโ€™s privacy practices, including changes in the use of personal information, to meet the entityโ€™s objectives related to privacy. Communicates to Data Subjects - Notice is provided to data subjects regarding the following: Purpose for collecting personal informationChoice and consentTypes of personal information collectedMethods of collection (for example, use of cookies or other tracking techniques)Use, retention, and disposalAccessDisclosure to third partiesSecurity for privacyQuality, including data subjectsโ€™ responsibilities for qualityMonitoring and enforcementIf personal information is collected from sources other than the individual, such sources are described in the privacy notice. Provides Notice to Data Subjects - Notice is provided to data subjects (1) at or before the time personal information is collected or as soon as practical thereafter, (2) at or before the entity changes its privacy notice or as soon as practical thereafter, or (3) before personal information is used for new purposes not previously identified. Covers Entities and Activities in Notice - An objective description of the entities and activities covered is included in the entityโ€™s privacy notice. Uses Clear and Conspicuous Language - The entityโ€™s privacy notice is conspicuous and uses clear language.",
-      "Attributes": [
-        {
-          "ItemId": "p_1_1",
-          "Section": "P1.0 - Privacy Criteria Related to Notice and Communication of Objectives Related to Privacy",
-          "Service": "aws",
-          "Type": "manual"
-        }
-      ],
-      "Checks": []
-    },
-    {
-      "Id": "p_2_1",
-      "Name": "P2.1 The entity communicates choices available regarding the collection, use, retention, disclosure, and disposal of personal information to the data subjects and the consequences, if any, of each choice",
-      "Description": "The entity communicates choices available regarding the collection, use, retention, disclosure, and disposal of personal information to the data subjects and the consequences, if any, of each choice. Explicit consent for the collection, use, retention, disclosure, and disposal of personal information is obtained from data subjects or other authorized persons, if required. Such consent is obtained only for the intended purpose of the information to meet the entityโ€™s objectives related to privacy. The entityโ€™s basis for determining implicit consent for the collection, use, retention, disclosure, and disposal of personal information is documented. Communicates to Data Subjects - Data subjects are informed (a) about the choices available to them with respect to the collection, use, and disclosure of personal information and (b) that implicit or explicit consent is required to collect, use, and disclose personal information, unless a law or regulation specifically requires or allows otherwise. Communicates Consequences of Denying or Withdrawing Consent - When personal information is collected, data subjects are informed of the consequences of refusing to provide personal information or denying or withdrawing consent to use personal information for purposes identified in the notice. Obtains Implicit or Explicit Consent - Implicit or explicit consent is obtained from data subjects at or before the time personal information is collected or soon thereafter. The individualโ€™s preferences expressed in his or her consent are confirmed and implemented. Documents and Obtains Consent for New Purposes and Uses - If information that was previously collected is to be used for purposes not previously identified in the privacy notice, the new purpose is documented, the data subject is notified, and implicit or explicit consent is obtained prior to such new use or purpose. Obtains Explicit Consent for Sensitive Information - Explicit consent is obtained directly from the data subject when sensitive personal information is collected, used, or disclosed, unless a law or regulation specifically requires otherwise.",
-      "Attributes": [
-        {
-          "ItemId": "p_2_1",
-          "Section": "P2.0 - Privacy Criteria Related to Choice and Consent",
-          "Service": "aws",
-          "Type": "manual"
-        }
-      ],
-      "Checks": []
-    },
-    {
-      "Id": "p_3_1",
-      "Name": "P3.1 Personal information is collected consistent with the entityโ€™s objectives related to privacy",
-      "Description": "Limits the Collection of Personal Information - The collection of personal information is limited to that necessary to meet the entityโ€™s objectives. Collects Information by Fair and Lawful Means - Methods of collecting personal information are reviewed by management before they are implemented to confirm that personal information is obtained (a) fairly, without intimidation or deception, and (b) lawfully, adhering to all relevant rules of law, whether derived from statute or common law, relating to the collection of personal information. Collects Information From Reliable Sources - Management confirms that third parties from whom personal information is collected (that is, sources other than the individual) are reliable sources that collect information fairly and lawfully. Informs Data Subjects When Additional Information Is Acquired - Data subjects are informed if the entity develops or acquires additional information about them for its use.",
-      "Attributes": [
-        {
-          "ItemId": "p_3_1",
-          "Section": "P3.0 - Privacy Criteria Related to Collection",
-          "Service": "aws",
-          "Type": "manual"
-        }
-      ],
-      "Checks": []
-    },
-    {
-      "Id": "p_3_2",
-      "Name": "P3.2 For information requiring explicit consent, the entity communicates the need for such consent, as well as the consequences of a failure to provide consent for the request for personal information, and obtains the consent prior to the collection of the information to meet the entityโ€™s objectives related to privacy",
-      "Description": "Obtains Explicit Consent for Sensitive Information - Explicit consent is obtained directly from the data subject when sensitive personal information is collected, used, or disclosed, unless a law or regulation specifically requires otherwise. Documents Explicit Consent to Retain Information - Documentation of explicit consent for the collection, use, or disclosure of sensitive personal information is retained in accordance with objectives related to privacy.",
-      "Attributes": [
-        {
-          "ItemId": "p_3_2",
-          "Section": "P3.0 - Privacy Criteria Related to Collection",
-          "Service": "aws",
-          "Type": "manual"
-        }
-      ],
-      "Checks": []
-    },
-    {
-      "Id": "p_4_1",
-      "Name": "P4.1 The entity limits the use of personal information to the purposes identified in the entityโ€™s objectives related to privacy",
-      "Description": "Uses Personal Information for Intended Purposes - Personal information is used only for the intended purposes for which it was collected and only when implicit or explicit consent has been obtained unless a law or regulation specifically requires otherwise.",
-      "Attributes": [
-        {
-          "ItemId": "p_4_1",
-          "Section": "P4.0 - Privacy Criteria Related to Use, Retention, and Disposal",
-          "Service": "aws",
-          "Type": "manual"
-        }
-      ],
-      "Checks": []
-    },
-    {
-      "Id": "p_4_2",
-      "Name": "P4.2 The entity retains personal information consistent with the entityโ€™s objectives related to privacy",
-      "Description": "Retains Personal Information - Personal information is retained for no longer than necessary to fulfill the stated purposes, unless a law or regulation specifically requires otherwise. Protects Personal Information - Policies and procedures have been implemented to protect personal information from erasure or destruction during the specified retention period of the information.",
-      "Attributes": [
-        {
-          "ItemId": "p_4_2",
-          "Section": "P4.0 - Privacy Criteria Related to Use, Retention, and Disposal",
-          "Service": "aws",
-          "Type": "manual"
-        }
-      ],
-      "Checks": []
-    },
-    {
-      "Id": "p_4_3",
-      "Name": "P4.3 The entity securely disposes of personal information to meet the entityโ€™s objectives related to privacy",
-      "Description": "Captures, Identifies, and Flags Requests for Deletion - Requests for deletion of personal information are captured, and information related to the requests is identified and flagged for destruction to meet the entityโ€™s objectives related to privacy. Disposes of, Destroys, and Redacts Personal Information - Personal information no longer retained is anonymized, disposed of, or destroyed in a manner that prevents loss, theft, misuse, or unauthorized access. Destroys Personal Information - Policies and procedures are implemented to erase or otherwise destroy personal information that has been identified for destruction.",
-      "Attributes": [
-        {
-          "ItemId": "p_4_3",
-          "Section": "P4.0 - Privacy Criteria Related to Use, Retention, and Disposal",
-          "Service": "aws",
-          "Type": "manual"
-        }
-      ],
-      "Checks": []
-    },
-    {
-      "Id": "p_5_1",
-      "Name": "P5.1 The entity grants identified and authenticated data subjects the ability to access their stored personal information for review and, upon request, provides physical or electronic copies of that information to data subjects to meet the entityโ€™s objectives related to privacy",
-      "Description": "The entity grants identified and authenticated data subjects the ability to access their stored personal information for review and, upon request, provides physical or electronic copies of that information to data subjects to meet the entityโ€™s objectives related to privacy. If access is denied, data subjects are informed of the denial and reason for such denial, as required, to meet the entityโ€™s objectives related to privacy. Authenticates Data Subjectsโ€™ Identity - The identity of data subjects who request access to their personal information is authenticated before they are given access to that information. Permits Data Subjects Access to Their Personal Information - Data subjects are able to determine whether the entity maintains personal information about them and, upon request, may obtain access to their personal information. Provides Understandable Personal Information Within Reasonable Time - Personal information is provided to data subjects in an understandable form, in a reasonable time frame, and at a reasonable cost, if any. Informs Data Subjects If Access Is Denied - When data subjects are denied access to their personal information, the entity informs them of the denial and the reason for the denial in a timely manner, unless prohibited by law or regulation.",
-      "Attributes": [
-        {
-          "ItemId": "p_5_1",
-          "Section": "P5.0 - Privacy Criteria Related to Access",
-          "Service": "aws",
-          "Type": "manual"
-        }
-      ],
-      "Checks": []
-    },
-    {
-      "Id": "p_5_2",
-      "Name": "P5.2 The entity corrects, amends, or appends personal information based on information provided by data subjects and communicates such information to third parties, as committed or required, to meet the entityโ€™s objectives related to privacy",
-      "Description": "The entity corrects, amends, or appends personal information based on information provided by data subjects and communicates such information to third parties, as committed or required, to meet the entityโ€™s objectives related to privacy. If a request for correction is denied, data subjects are informed of the denial and reason for such denial to meet the entityโ€™s objectives related to privacy. Communicates Denial of Access Requests - Data subjects are informed, in writing, of the reason a request for access to their personal information was denied, the source of the entityโ€™s legal right to deny such access, if applicable, and the individualโ€™s right, if any, to challenge such denial, as specifically permitted or required by law or regulation. Permits Data Subjects to Update or Correct Personal Information - Data subjects are able to update or correct personal information held by the entity. The entity provides such updated or corrected information to third parties that were previously provided with the data subjectโ€™s personal information consistent with the entityโ€™s objective related to privacy. Communicates Denial of Correction Requests - Data subjects are informed, in writing, about the reason a request for correction of personal information was denied and how they may appeal.",
-      "Attributes": [
-        {
-          "ItemId": "p_5_2",
-          "Section": "P5.0 - Privacy Criteria Related to Access",
-          "Service": "aws",
-          "Type": "manual"
-        }
-      ],
-      "Checks": []
-    },
-    {
-      "Id": "p_6_1",
-      "Name": "P6.1 The entity discloses personal information to third parties with the explicit consent of data subjects, and such consent is obtained prior to disclosure to meet the entityโ€™s objectives related to privacy",
-      "Description": "Communicates Privacy Policies to Third Parties - Privacy policies or other specific instructions or requirements for handling personal information are communicated to third parties to whom personal information is disclosed. Discloses Personal Information Only When Appropriate - Personal information is disclosed to third parties only for the purposes for which it was collected or created and only when implicit or explicit consent has been obtained from the data subject, unless a law or regulation specifically requires otherwise. Discloses Personal Information Only to Appropriate Third Parties - Personal information is disclosed only to third parties who have agreements with the entity to protect personal information in a manner consistent with the relevant aspects of the entityโ€™s privacy notice or other specific instructions or requirements. The entity has procedures in place to evaluate that the third parties have effective controls to meet the terms of the agreement, instructions, or requirements.",
-      "Attributes": [
-        {
-          "ItemId": "p_6_1",
-          "Section": "P6.0 - Privacy Criteria Related to Disclosure and Notification",
-          "Service": "aws",
-          "Type": "manual"
-        }
-      ],
-      "Checks": []
-    },
-    {
-      "Id": "p_6_2",
-      "Name": "P6.2 The entity creates and retains a complete, accurate, and timely record of authorized disclosures of personal information to meet the entityโ€™s objectives related to privacy",
-      "Description": "Creates and Retains Record of Authorized Disclosures - The entity creates and maintains a record of authorized disclosures of personal information that is complete, accurate, and timely.",
-      "Attributes": [
-        {
-          "ItemId": "p_6_2",
-          "Section": "P6.0 - Privacy Criteria Related to Disclosure and Notification",
-          "Service": "aws",
-          "Type": "manual"
-        }
-      ],
-      "Checks": []
-    },
-    {
-      "Id": "p_6_3",
-      "Name": "P6.3 The entity creates and retains a complete, accurate, and timely record of detected or reported unauthorized disclosures (including breaches) of personal information to meet the entityโ€™s objectives related to privacy",
-      "Description": "Creates and Retains Record of Detected or Reported Unauthorized Disclosures - The entity creates and maintains a record of detected or reported unauthorized disclosures of personal information that is complete, accurate, and timely.",
-      "Attributes": [
-        {
-          "ItemId": "p_6_3",
-          "Section": "P6.0 - Privacy Criteria Related to Disclosure and Notification",
-          "Service": "aws",
-          "Type": "manual"
-        }
-      ],
-      "Checks": []
-    },
-    {
-      "Id": "p_6_4",
-      "Name": "P6.4 The entity obtains privacy commitments from vendors and other third parties who have access to personal information to meet the entityโ€™s objectives related to privacy",
-      "Description": "The entity obtains privacy commitments from vendors and other third parties who have access to personal information to meet the entityโ€™s objectives related to privacy. The entity assesses those partiesโ€™ compliance on a periodic and as-needed basis and takes corrective action, if necessary. Discloses Personal Information Only to Appropriate Third Parties - Personal information is disclosed only to third parties who have agreements with the entity to protect personal information in a manner consistent with the relevant aspects of the entityโ€™s privacy notice or other specific instructions or requirements. The entity has procedures in place to evaluate that the third parties have effective controls to meet the terms of the agreement, instructions, or requirements. Remediates Misuse of Personal Information by a Third Party - The entity takes remedial action in response to misuse of personal information by a third party to whom the entity has transferred such information.",
-      "Attributes": [
-        {
-          "ItemId": "p_6_4",
-          "Section": "P6.0 - Privacy Criteria Related to Disclosure and Notification",
-          "Service": "aws",
-          "Type": "manual"
-        }
-      ],
-      "Checks": []
-    },
-    {
-      "Id": "p_6_5",
-      "Name": "P6.5 The entity obtains commitments from vendors and other third parties with access to personal information to notify the entity in the event of actual or suspected unauthorized disclosures of personal information",
-      "Description": "The entity obtains commitments from vendors and other third parties with access to personal information to notify the entity in the event of actual or suspected unauthorized disclosures of personal information. Such notifications are reported to appropriate personnel and acted on in accordance with established incident response procedures to meet the entityโ€™s objectives related to privacy. Remediates Misuse of Personal Information by a Third Party - The entity takes remedial action in response to misuse of personal information by a third party to whom the entity has transferred such information. Reports Actual or Suspected Unauthorized Disclosures - A process exists for obtaining commitments from vendors and other third parties to report to the entity actual or suspected unauthorized disclosures of personal information.",
-      "Attributes": [
-        {
-          "ItemId": "p_6_5",
-          "Section": "P6.0 - Privacy Criteria Related to Disclosure and Notification",
-          "Service": "aws",
-          "Type": "manual"
-        }
-      ],
-      "Checks": []
-    },
-    {
-      "Id": "p_6_6",
-      "Name": "P6.6 The entity provides notification of breaches and incidents to affected data subjects, regulators, and others to meet the entityโ€™s objectives related to privacy",
-      "Description": "Remediates Misuse of Personal Information by a Third Party - The entity takes remedial action in response to misuse of personal information by a third party to whom the entity has transferred such information. Reports Actual or Suspected Unauthorized Disclosures - A process exists for obtaining commitments from vendors and other third parties to report to the entity actual or suspected unauthorized disclosures of personal information.",
-      "Attributes": [
-        {
-          "ItemId": "p_6_6",
-          "Section": "P6.0 - Privacy Criteria Related to Disclosure and Notification",
-          "Service": "aws",
-          "Type": "manual"
-        }
-      ],
-      "Checks": []
-    },
-    {
-      "Id": "p_6_7",
-      "Name": "P6.7 The entity provides data subjects with an accounting of the personal information held and disclosure of the data subjectsโ€™ personal information, upon the data subjectsโ€™ request, to meet the entityโ€™s objectives related to privacy",
-      "Description": "Identifies Types of Personal Information and Handling Process - The types of personal information and sensitive personal information and the related processes, systems, and third parties involved in the handling of such information are identified. Captures, Identifies, and Communicates Requests for Information - Requests for an accounting of personal information held and disclosures of the data subjectsโ€™ personal information are captured, and information related to the requests is identified and communicated to data subjects to meet the entityโ€™s objectives related to privacy.",
-      "Attributes": [
-        {
-          "ItemId": "p_6_7",
-          "Section": "P6.0 - Privacy Criteria Related to Disclosure and Notification",
-          "Service": "aws",
-          "Type": "manual"
-        }
-      ],
-      "Checks": []
-    },
-    {
-      "Id": "p_7_1",
-      "Name": "P7.1 The entity collects and maintains accurate, up-to-date, complete, and relevant personal information to meet the entityโ€™s objectives related to privacy",
-      "Description": "Ensures Accuracy and Completeness of Personal Information - Personal information is accurate and complete for the purposes for which it is to be used. Ensures Relevance of Personal Information - Personal information is relevant to the purposes for which it is to be used.",
-      "Attributes": [
-        {
-          "ItemId": "p_7_1",
-          "Section": "P7.0 - Privacy Criteria Related to Quality",
-          "Service": "aws",
-          "Type": "manual"
-        }
-      ],
-      "Checks": []
-    },
-    {
-      "Id": "p_8_1",
-      "Name": "P8.1 The entity implements a process for receiving, addressing, resolving, and communicating the resolution of inquiries, complaints, and disputes from data subjects and others and periodically monitors compliance to meet the entityโ€™s objectives related to privacy",
-      "Description": "The entity implements a process for receiving, addressing, resolving, and communicating the resolution of inquiries, complaints, and disputes from data subjects and others and periodically monitors compliance to meet the entityโ€™s objectives related to privacy. Corrections and other necessary actions related to identified deficiencies are made or taken in a timely manner. Communicates to Data Subjectsโ€”Data subjects are informed about how to contact the entity with inquiries, complaints, and disputes. Addresses Inquiries, Complaints, and Disputes - A process is in place to address inquiries, complaints, and disputes. Documents and Communicates Dispute Resolution and Recourse - Each complaint is addressed, and the resolution is documented and communicated to the individual. Documents and Reports Compliance Review Results - Compliance with objectives related to privacy are reviewed and documented, and the results of such reviews are reported to management. If problems are identified, remediation plans are developed and implemented. Documents and Reports Instances of Noncompliance - Instances of noncompliance with objectives related to privacy are documented and reported and, if needed, corrective and disciplinary measures are taken on a timely basis. Performs Ongoing Monitoring - Ongoing procedures are performed for monitoring the effectiveness of controls over personal information and for taking timely corrective actions when necessary.",
-      "Attributes": [
-        {
-          "ItemId": "p_8_1",
-          "Section": "P8.0 - Privacy Criteria Related to Monitoring and Enforcement",
-          "Service": "aws",
-          "Type": "manual"
-        }
-      ],
-      "Checks": []
     }
   ]
 }
diff --git a/prowler/compliance/azure/cis_2.0_azure.json b/prowler/compliance/azure/cis_2.0_azure.json
index 6e914f5057..94983dab94 100644
--- a/prowler/compliance/azure/cis_2.0_azure.json
+++ b/prowler/compliance/azure/cis_2.0_azure.json
@@ -12,7 +12,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "SubSection": "1.1 Security Defaults",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
@@ -35,7 +35,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "SubSection": "1.1 Security Defaults",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
@@ -58,7 +58,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "SubSection": "1.1 Security Defaults",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
@@ -79,7 +79,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "SubSection": "1.1 Security Defaults",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
@@ -102,7 +102,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "SubSection": "1.2 Conditional Access",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
@@ -123,7 +123,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "SubSection": "1.2 Conditional Access",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
@@ -144,7 +144,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "SubSection": "1.2 Conditional Access",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
@@ -165,7 +165,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "SubSection": "1.2 Conditional Access",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
@@ -186,7 +186,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "SubSection": "1.2 Conditional Access",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
@@ -207,7 +207,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "SubSection": "1.2 Conditional Access",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
@@ -230,7 +230,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Require administrators or appropriately delegated users to create new tenants.",
@@ -250,7 +250,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "This recommendation extends guest access review by utilizing the Azure AD Privileged Identity Management feature provided in Azure AD Premium P2. Azure AD is extended to include Azure AD B2B collaboration, allowing you to invite people from outside your organization to be guest users in your cloud account and sign in with their own work, school, or social identities. Guest users allow you to share your company's applications and services with users from any other organization, while maintaining control over your own corporate data. Work with external partners, large or small, even if they don't have Azure AD or an IT department. A simple invitation and redemption process lets partners use their own credentials to access your company's resources a a guest user.",
@@ -270,7 +270,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Azure AD is extended to include Azure AD B2B collaboration, allowing you to invite people from outside your organization to be guest users in your cloud account and sign in with their own work, school, or social identities. Guest users allow you to share your company's applications and services with users from any other organization, while maintaining control over your own corporate data. Work with external partners, large or small, even if they don't have Azure AD or an IT department. A simple invitation and redemption process lets partners use their own credentials to access your company's resources as a guest user. Guest users in every subscription should be review on a regular basis to ensure that inactive and unneeded accounts are removed.",
@@ -290,7 +290,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Ensures that two alternate forms of identification are provided before allowing a password reset.",
@@ -310,7 +310,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Microsoft Azure provides a Global Banned Password policy that applies to Azure administrative and normal user accounts. This is not applied to user accounts that are synced from an on-premise Active Directory unless Azure AD Connect is used and you enable EnforceCloudPasswordPolicyForPasswordSyncedUsers. Please see the list in default values on the specifics of this policy. To further password security, it is recommended to further define a custom banned password policy.",
@@ -330,7 +330,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Ensure that the number of days before users are asked to re-confirm their authentication information is not set to 0.",
@@ -350,7 +350,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Ensure that users are notified on their primary and secondary emails on password resets.",
@@ -370,7 +370,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Ensure that all Global Administrators are notified if any other administrator resets their password.",
@@ -392,7 +392,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Require administrators to provide consent for applications before use.",
@@ -414,7 +414,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Allow users to provide consent for selected permissions when a request is coming from a verified publisher.",
@@ -434,7 +434,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Require administrators to provide consent for the apps before use.",
@@ -456,7 +456,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Require administrators or appropriately delegated users to register third-party applications.",
@@ -478,7 +478,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Limit guest user permissions.",
@@ -500,7 +500,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Restrict invitations to users with specific administrative roles only.",
@@ -520,7 +520,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Restrict access to the Azure AD administration portal to administrators only. NOTE: This only affects access to the Azure AD administrator's web portal. This setting does not prohibit privileged users from using other methods such as Rest API or Powershell to obtain sensitive information from Azure AD.",
@@ -540,7 +540,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Restricts group creation to administrators with permissions only.",
@@ -562,7 +562,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Restrict security group creation to administrators only.",
@@ -582,7 +582,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Restrict security group management to administrators only.",
@@ -604,7 +604,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Restrict Microsoft 365 group creation to administrators only.",
@@ -624,7 +624,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Joining or registering devices to the active directory should require Multi-factor authentication.",
@@ -646,7 +646,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "The principle of least privilege should be followed and only necessary privileges should be assigned instead of allowing full administrative access.",
@@ -668,7 +668,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Resource locking is a powerful protection mechanism that can prevent inadvertent modification/deletion of resources within Azure subscriptions/Resource Groups and is a recommended NIST configuration.",
@@ -688,7 +688,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Users who are set as subscription owners are able to make administrative changes to the subscriptions and move them into and out of Azure Active Directories.",
@@ -710,7 +710,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
@@ -733,7 +733,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
@@ -756,7 +756,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
@@ -779,7 +779,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
@@ -802,7 +802,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
@@ -825,7 +825,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
@@ -848,7 +848,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
@@ -871,7 +871,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
@@ -894,7 +894,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
@@ -917,7 +917,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
@@ -940,7 +940,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
@@ -963,7 +963,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
@@ -986,7 +986,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
@@ -1009,7 +1009,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
@@ -1032,7 +1032,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
@@ -1055,7 +1055,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
@@ -1076,7 +1076,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
@@ -1099,7 +1099,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
@@ -1122,7 +1122,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -1145,7 +1145,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -1168,7 +1168,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
@@ -1191,7 +1191,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
@@ -1214,7 +1214,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.2 Microsoft Defender for IoT",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
@@ -1237,7 +1237,7 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Storage Accounts",
+          "Section": "3 Storage Accounts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Enable data encryption in transit.",
@@ -1259,7 +1259,7 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Storage Accounts",
+          "Section": "3 Storage Accounts",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Enabling encryption at the hardware level on top of the default software encryption for Storage Accounts accessing Azure storage solutions.",
@@ -1279,7 +1279,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "3. Storage Accounts",
+          "Section": "3 Storage Accounts",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Access Keys authenticate application access requests to data contained in Storage Accounts. A periodic rotation of these keys is recommended to ensure that potentially compromised keys cannot result in a long-term exploitable credential. The 'Rotation Reminder' is an automatic reminder feature for a manual procedure.",
@@ -1301,7 +1301,7 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Storage Accounts",
+          "Section": "3 Storage Accounts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "For increased security, regenerate storage account access keys periodically.",
@@ -1321,7 +1321,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "3. Storage Accounts",
+          "Section": "3 Storage Accounts",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "The Storage Queue service stores messages that may be read by any client who has access to the storage account. A queue can contain an unlimited number of messages, each of which can be up to 64KB in size using version 2011-08-18 or newer. Storage Logging happens server-side and allows details for both successful and failed requests to be recorded in the storage account. These logs allow users to see the details of read, write, and delete operations against the queues. Storage Logging log entries contain the following information about individual requests: Timing information such as start time, end-to-end latency, and server latency, authentication details, concurrency information, and the sizes of the request and response messages.",
@@ -1341,7 +1341,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "3. Storage Accounts",
+          "Section": "3 Storage Accounts",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Expire shared access signature tokens within an hour.",
@@ -1363,7 +1363,7 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Storage Accounts",
+          "Section": "3 Storage Accounts",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Disallowing public access for a storage account overrides the public access settings for individual containers in that storage account.",
@@ -1385,7 +1385,7 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Storage Accounts",
+          "Section": "3 Storage Accounts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Restricting default network access helps to provide a new layer of security, since storage accounts accept connections from clients on any network. To limit access to selected networks, the default action must be changed.",
@@ -1407,7 +1407,7 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Storage Accounts",
+          "Section": "3 Storage Accounts",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Some Azure services that interact with storage accounts operate from networks that can't be granted access through network rules. To help this type of service work as intended, allow the set of trusted Azure services to bypass the network rules. These services will then use strong authentication to access the storage account. If the Allow trusted Azure services exception is enabled, the following services are granted access to the storage account: Azure Backup, Azure Site Recovery, Azure DevTest Labs, Azure Event Grid, Azure Event Hubs, Azure Networking, Azure Monitor, and Azure SQL Data Warehouse (when registered in the subscription).",
@@ -1429,7 +1429,7 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Storage Accounts",
+          "Section": "3 Storage Accounts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Use private endpoints for your Azure Storage accounts to allow clients and services to securely access data located over a network via an encrypted Private Link. To do this, the private endpoint uses an IP address from the VNet for each service. Network traffic between disparate services securely traverses encrypted over the VNet. This VNet can also link addressing space, extending your network and accessing resources on it. Similarly, it can be a tunnel through public networks to connect remote infrastructures together. This creates further security through segmenting network traffic and preventing outside sources from accessing it.",
@@ -1451,7 +1451,7 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Storage Accounts",
+          "Section": "3 Storage Accounts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "The Azure Storage blobs contain data like ePHI or Financial, which can be secret or personal. Data that is erroneously modified or deleted by an application or other storage account user will cause data loss or unavailability. It is recommended that both Azure Containers with attached Blob Storage and standalone containers with Blob Storage be made recoverable by enabling the soft delete configuration. This is to save and recover data when blobs or blob snapshots are deleted.",
@@ -1473,7 +1473,7 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Storage Accounts",
+          "Section": "3 Storage Accounts",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Enable sensitive data encryption at rest using Customer Managed Keys rather than Microsoft Managed keys.",
@@ -1493,7 +1493,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "3. Storage Accounts",
+          "Section": "3 Storage Accounts",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "The Storage Blob service provides scalable, cost-efficient object storage in the cloud. Storage Logging happens server-side and allows details for both successful and failed requests to be recorded in the storage account. These logs allow users to see the details of read, write, and delete operations against the blobs. Storage Logging log entries contain the following information about individual requests: timing information such as start time, end-to-end latency, and server latency; authentication details; concurrency information; and the sizes of the request and response messages.",
@@ -1513,7 +1513,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "3. Storage Accounts",
+          "Section": "3 Storage Accounts",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Azure Table storage is a service that stores structured NoSQL data in the cloud, providing a key/attribute store with a schema-less design. Storage Logging happens server-side and allows details for both successful and failed requests to be recorded in the storage account. These logs allow users to see the details of read, write, and delete operations against the tables. Storage Logging log entries contain the following information about individual requests: timing information such as start time, end-to-end latency, and server latency; authentication details; concurrency information; and the sizes of the request and response messages.",
@@ -1535,7 +1535,7 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Storage Accounts",
+          "Section": "3 Storage Accounts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "In some cases, Azure Storage sets the minimum TLS versio n to be version 1.0 by default. TLS 1.0 is a legacy version and has known vulnerabilities. This minimum TLSversion can be configured to be later protocols such as TLS 1.2.",
@@ -1557,7 +1557,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.1 SQL Server - Auditing",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -1580,7 +1580,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.1 SQL Server - Auditing",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -1603,7 +1603,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.1 SQL Server - Auditing",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
@@ -1626,7 +1626,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.1 SQL Server - Auditing",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -1649,7 +1649,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.1 SQL Server - Auditing",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -1672,7 +1672,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.1 SQL Server - Auditing",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -1695,7 +1695,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.2 SQL Server - Microsoft Defender for SQL",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
@@ -1718,7 +1718,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.2 SQL Server - Microsoft Defender for SQL",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
@@ -1741,7 +1741,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.2 SQL Server - Microsoft Defender for SQL",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
@@ -1764,7 +1764,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.2 SQL Server - Microsoft Defender for SQL",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
@@ -1787,7 +1787,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.2 SQL Server - Microsoft Defender for SQL",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -1810,7 +1810,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.3 PostgreSQL Database Server",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -1833,7 +1833,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.3 PostgreSQL Database Server",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -1856,7 +1856,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.3 PostgreSQL Database Server",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -1879,7 +1879,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.3 PostgreSQL Database Server",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -1902,7 +1902,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.3 PostgreSQL Database Server",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -1925,7 +1925,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.3 PostgreSQL Database Server",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -1948,7 +1948,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.3 PostgreSQL Database Server",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -1969,7 +1969,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.3 PostgreSQL Database Server",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -1988,11 +1988,11 @@
       "Id": "4.4.1",
       "Description": "Ensure 'Enforce SSL connection' is set to 'Enabled' for Standard MySQL Database Server",
       "Checks": [
-        "postgresql_flexible_server_allow_access_services_disabled"
+        "mysql_flexible_server_ssl_connection_enabled"
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.4 MySQL Database",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -2015,7 +2015,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.4 MySQL Database",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -2038,7 +2038,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.4 MySQL Database",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
@@ -2061,7 +2061,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.4 MySQL Database",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
@@ -2084,7 +2084,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.5 Cosmos DB",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
@@ -2107,7 +2107,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.5 Cosmos DB",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
@@ -2130,7 +2130,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.5 Cosmos DB",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
@@ -2153,7 +2153,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Logging and Monitoring",
+          "Section": "5 Logging and Monitoring",
           "SubSection": "5.1 Configuring Diagnostic Settings",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
@@ -2176,7 +2176,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Logging and Monitoring",
+          "Section": "5 Logging and Monitoring",
           "SubSection": "5.1 Configuring Diagnostic Settings",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -2199,7 +2199,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Logging and Monitoring",
+          "Section": "5 Logging and Monitoring",
           "SubSection": "5.1 Configuring Diagnostic Settings",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -2222,7 +2222,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Logging and Monitoring",
+          "Section": "5 Logging and Monitoring",
           "SubSection": "5.1 Configuring Diagnostic Settings",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
@@ -2245,7 +2245,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Logging and Monitoring",
+          "Section": "5 Logging and Monitoring",
           "SubSection": "5.1 Configuring Diagnostic Settings",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -2268,7 +2268,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Logging and Monitoring",
+          "Section": "5 Logging and Monitoring",
           "SubSection": "5.1 Configuring Diagnostic Settings",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
@@ -2291,7 +2291,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Logging and Monitoring",
+          "Section": "5 Logging and Monitoring",
           "SubSection": "5.1 Configuring Diagnostic Settings",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
@@ -2314,7 +2314,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Logging and Monitoring",
+          "Section": "5 Logging and Monitoring",
           "SubSection": "5.2 Monitoring using Activity Log Alerts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -2337,7 +2337,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Logging and Monitoring",
+          "Section": "5 Logging and Monitoring",
           "SubSection": "5.2 Monitoring using Activity Log Alerts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -2360,7 +2360,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Logging and Monitoring",
+          "Section": "5 Logging and Monitoring",
           "SubSection": "5.2 Monitoring using Activity Log Alerts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -2383,7 +2383,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Logging and Monitoring",
+          "Section": "5 Logging and Monitoring",
           "SubSection": "5.2 Monitoring using Activity Log Alerts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -2406,7 +2406,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Logging and Monitoring",
+          "Section": "5 Logging and Monitoring",
           "SubSection": "5.2 Monitoring using Activity Log Alerts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -2429,7 +2429,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Logging and Monitoring",
+          "Section": "5 Logging and Monitoring",
           "SubSection": "5.2 Monitoring using Activity Log Alerts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -2452,7 +2452,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Logging and Monitoring",
+          "Section": "5 Logging and Monitoring",
           "SubSection": "5.2 Monitoring using Activity Log Alerts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -2475,7 +2475,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Logging and Monitoring",
+          "Section": "5 Logging and Monitoring",
           "SubSection": "5.2 Monitoring using Activity Log Alerts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -2498,7 +2498,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Logging and Monitoring",
+          "Section": "5 Logging and Monitoring",
           "SubSection": "5.2 Monitoring using Activity Log Alerts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -2521,7 +2521,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Logging and Monitoring",
+          "Section": "5 Logging and Monitoring",
           "SubSection": "5.2 Monitoring using Activity Log Alerts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -2542,7 +2542,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "5. Logging and Monitoring",
+          "Section": "5 Logging and Monitoring",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Resource Logs capture activity to the data access plane while the Activity log is a subscription-level log for the control plane. Resource-level diagnostic logs provide insight into operations that were performed within that resource itself; for example, reading or updating a secret from a Key Vault. Currently, 95 Azure resources support Azure Monitoring (See the more information section for a complete list), including Network Security Groups, Load Balancers, Key Vault, AD, Logic Apps, and CosmosDB. The content of these logs varies by resource type. A number of back-end services were not configured to log and store Resource Logs for certain activities or for a sufficient length. It is crucial that monitoring is correctly configured to log all relevant activities and retain those logs for a sufficient length of time. Given that the mean time to detection in an enterprise is 240 days, a minimum retention period of two years is recommended.",
@@ -2562,7 +2562,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "5. Logging and Monitoring",
+          "Section": "5 Logging and Monitoring",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "The use of Basic or Free SKUs in Azure whilst cost effective have significant limitations in terms of what can be monitored and what support can be realized from Microsoft. Typically, these SKUโ€™s do not have a service SLA and Microsoft will usually refuse to provide support for them. Consequently Basic/Free SKUs should never be used for production workloads.",
@@ -2584,7 +2584,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Logging and Monitoring",
+          "Section": "5 Logging and Monitoring",
           "SubSection": "5.3 Configuring Application Insights",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
diff --git a/prowler/compliance/azure/cis_2.1_azure.json b/prowler/compliance/azure/cis_2.1_azure.json
index 32336ba368..e6b6a128cf 100644
--- a/prowler/compliance/azure/cis_2.1_azure.json
+++ b/prowler/compliance/azure/cis_2.1_azure.json
@@ -12,7 +12,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1.Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Require administrators or appropriately delegated users to create new tenants.",
@@ -32,7 +32,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1.Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Microsoft Entra ID is extended to include Azure AD B2B collaboration, allowing you to invite people from outside your organization to be guest users in your cloud account and sign in with their own work, school, or social identities. Guest users allow you to share your company's applications and services with users from any other organization, while maintaining control over your own corporate data.   Work with external partners, large or small, even if they don't have Azure AD or an IT department. A simple invitation and redemption process lets partners use their own credentials to access your company's resources as a guest user.  Guest users in every subscription should be review on a regular basis to ensure that inactive and unneeded accounts are removed.",
@@ -52,7 +52,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1.Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Ensures that two alternate forms of identification are provided before allowing a password reset.",
@@ -72,7 +72,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1.Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Microsoft Azure provides a Global Banned Password policy that applies to Azure administrative and normal user accounts. This is not applied to user accounts that are synced from an on-premise Active Directory unless Microsoft Entra ID Connect is used and you enable EnforceCloudPasswordPolicyForPasswordSyncedUsers. Please see the list in default values on the specifics of this policy. To further password security, it is recommended to further define a custom banned password policy.",
@@ -92,7 +92,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1.Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Ensure that the number of days before users are asked to re-confirm their authentication information is not set to 0.",
@@ -112,7 +112,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1.Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Ensure that users are notified on their primary and secondary emails on password resets.",
@@ -132,7 +132,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1.Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Ensure that all Global Administrators are notified if any other administrator resets their password.",
@@ -154,7 +154,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1.Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Require administrators to provide consent for applications before use.",
@@ -176,7 +176,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1.Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Allow users to provide consent for selected permissions when a request is coming from a verified publisher.",
@@ -196,7 +196,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1.Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Require administrators to provide consent for the apps before use.",
@@ -218,7 +218,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1.Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Require administrators or appropriately delegated users to register third-party applications.",
@@ -240,7 +240,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1.Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Limit guest user permissions.",
@@ -262,7 +262,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1.Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Restrict invitations to users with specific administrative roles only.",
@@ -282,7 +282,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1.Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Restrict access to the Microsoft Entra ID administration center to administrators only.  **NOTE**: This only affects access to the Entra ID administrator's web portal. This setting does not prohibit privileged users from using other methods such as Rest API or Powershell to obtain sensitive information from Microsoft Entra ID.",
@@ -302,7 +302,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1.Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Restrict access to group web interface in the Access Panel portal.",
@@ -324,7 +324,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1.Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Restrict security group creation to administrators only.",
@@ -344,7 +344,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1.Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Restrict security group management to administrators only.",
@@ -366,7 +366,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1.Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Restrict Microsoft 365 group creation to administrators only.",
@@ -386,7 +386,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1.Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Joining or registering devices to Microsoft Entra ID should require Multi-factor authentication.",
@@ -408,7 +408,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1.Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "The principle of least privilege should be followed and only necessary privileges should be assigned instead of allowing full administrative access.",
@@ -430,7 +430,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1.Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Resource locking is a powerful protection mechanism that can prevent inadvertent modification/deletion of resources within Azure subscriptions/Resource Groups and is a recommended NIST configuration.",
@@ -450,7 +450,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1.Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Users who are set as subscription owners are able to make administrative changes to the subscriptions and move them into and out of Microsoft Entra ID.",
@@ -472,7 +472,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1.Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "This recommendation aims to maintain a balance between security and operational efficiency by ensuring that a minimum of 2 and a maximum of 4 users are assigned the Global Administrator role in Microsoft Entra ID. Having at least two Global Administrators ensures redundancy, while limiting the number to four reduces the risk of excessive privileged access.",
@@ -494,7 +494,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1.Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "SubSection": "1.1 Security Defaults Security Defaults",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
@@ -517,7 +517,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1.Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "SubSection": "1.1 Security Defaults Security Defaults",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
@@ -540,7 +540,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1.Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "SubSection": "1.1 Security Defaults Security Defaults",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
@@ -561,7 +561,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1.Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "SubSection": "1.1 Security Defaults Security Defaults",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
@@ -584,7 +584,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1.Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "SubSection": "1.2 Conditional Access",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
@@ -605,7 +605,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1.Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "SubSection": "1.2 Conditional Access",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
@@ -626,7 +626,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1.Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "SubSection": "1.2 Conditional Access",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
@@ -647,7 +647,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1.Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "SubSection": "1.2 Conditional Access",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
@@ -668,7 +668,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1.Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "SubSection": "1.2 Conditional Access",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
@@ -691,7 +691,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1.Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "SubSection": "1.2 Conditional Access",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
@@ -712,7 +712,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1.Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "SubSection": "1.2 Conditional Access",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
@@ -735,7 +735,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
@@ -758,7 +758,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
@@ -781,7 +781,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
@@ -804,7 +804,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
@@ -827,7 +827,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
@@ -850,7 +850,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
@@ -873,7 +873,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
@@ -896,7 +896,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
@@ -919,7 +919,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
@@ -942,7 +942,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
@@ -965,7 +965,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
@@ -988,7 +988,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -1011,7 +1011,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
@@ -1034,7 +1034,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -1057,7 +1057,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
@@ -1078,7 +1078,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
@@ -1101,7 +1101,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -1124,7 +1124,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -1147,7 +1147,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -1170,7 +1170,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
@@ -1193,7 +1193,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
@@ -1214,7 +1214,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.1 Microsoft Defender for Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
@@ -1237,7 +1237,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Microsoft Defender",
+          "Section": "2 Microsoft Defender",
           "SubSection": "2.2 Microsoft Defender for IoT",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
@@ -1260,7 +1260,7 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Storage Accounts",
+          "Section": "3 Storage Accounts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Enable data encryption in transit.",
@@ -1282,7 +1282,7 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Storage Accounts",
+          "Section": "3 Storage Accounts",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Enabling encryption at the hardware level on top of the default software encryption for Storage Accounts accessing Azure storage solutions.",
@@ -1302,7 +1302,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "3. Storage Accounts",
+          "Section": "3 Storage Accounts",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Access Keys authenticate application access requests to data contained in Storage Accounts. A periodic rotation of these keys is recommended to ensure that potentially compromised keys cannot result in a long-term exploitable credential. The Rotation Reminder is an automatic reminder feature for a manual procedure.",
@@ -1324,7 +1324,7 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Storage Accounts",
+          "Section": "3 Storage Accounts",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "For increased security, regenerate storage account access keys periodically.",
@@ -1344,7 +1344,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "3. Storage Accounts",
+          "Section": "3 Storage Accounts",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "The Storage Queue service stores messages that may be read by any client who has access to the storage account. A queue can contain an unlimited number of messages, each of which can be up to 64KB in size using version 2011-08-18 or newer. Storage Logging happens server-side and allows details for both successful and failed requests to be recorded in the storage account. These logs allow users to see the details of read, write, and delete operations against the queues. Storage Logging log entries contain the following information about individual requests: Timing information such as start time, end-to-end latency, and server latency, authentication details, concurrency information, and the sizes of the request and response messages.",
@@ -1364,7 +1364,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "3. Storage Accounts",
+          "Section": "3 Storage Accounts",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Expire shared access signature tokens within an hour.",
@@ -1386,7 +1386,7 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Storage Accounts",
+          "Section": "3 Storage Accounts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Disallowing public network access for a storage account overrides the public access settings for individual containers in that storage account for Azure Resource Manager Deployment Model storage accounts. Azure Storage accounts that use the classic deployment model will be retired on August 31, 2024.",
@@ -1408,7 +1408,7 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Storage Accounts",
+          "Section": "3 Storage Accounts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Restricting default network access helps to provide a new layer of security, since storage accounts accept connections from clients on any network. To limit access to selected networks, the default action must be changed.",
@@ -1430,7 +1430,7 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Storage Accounts",
+          "Section": "3 Storage Accounts",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Some Azure services that interact with storage accounts operate from networks that can't be granted access through network rules. To help this type of service work as intended, allow the set of trusted Azure services to bypass the network rules. These services will then use strong authentication to access the storage account. If the Allow trusted Azure services exception is enabled, the following services are granted access to the storage account: Azure Backup, Azure Site Recovery, Azure DevTest Labs, Azure Event Grid, Azure Event Hubs, Azure Networking, Azure Monitor, and Azure SQL Data Warehouse (when registered in the subscription).",
@@ -1452,7 +1452,7 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Storage Accounts",
+          "Section": "3 Storage Accounts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Use private endpoints for your Azure Storage accounts to allow clients and services to securely access data located over a network via an encrypted Private Link. To do this, the private endpoint uses an IP address from the VNet for each service. Network traffic between disparate services securely traverses encrypted over the VNet. This VNet can also link addressing space, extending your network and accessing resources on it. Similarly, it can be a tunnel through public networks to connect remote infrastructures together. This creates further security through segmenting network traffic and preventing outside sources from accessing it.",
@@ -1474,7 +1474,7 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Storage Accounts",
+          "Section": "3 Storage Accounts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "The Azure Storage blobs contain data like ePHI or Financial, which can be secret or personal. Data that is erroneously modified or deleted by an application or other storage account user will cause data loss or unavailability.  It is recommended that both Azure Containers with attached Blob Storage and standalone containers with Blob Storage be made recoverable by enabling the **soft delete** configuration. This is to save and recover data when blobs or blob snapshots are deleted.",
@@ -1496,7 +1496,7 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Storage Accounts",
+          "Section": "3 Storage Accounts",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Enable sensitive data encryption at rest using Customer Managed Keys (CMK) rather than Microsoft Managed keys.",
@@ -1516,7 +1516,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "3. Storage Accounts",
+          "Section": "3 Storage Accounts",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "The Storage Blob service provides scalable, cost-efficient object storage in the cloud. Storage Logging happens server-side and allows details for both successful and failed requests to be recorded in the storage account. These logs allow users to see the details of read, write, and delete operations against the blobs. Storage Logging log entries contain the following information about individual requests: timing information such as start time, end-to-end latency, and server latency; authentication details; concurrency information; and the sizes of the request and response messages.",
@@ -1536,7 +1536,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "3. Storage Accounts",
+          "Section": "3 Storage Accounts",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Azure Table storage is a service that stores structured NoSQL data in the cloud, providing a key/attribute store with a schema-less design. Storage Logging happens server-side and allows details for both successful and failed requests to be recorded in the storage account. These logs allow users to see the details of read, write, and delete operations against the tables. Storage Logging log entries contain the following information about individual requests: timing information such as start time, end-to-end latency, and server latency; authentication details; concurrency information; and the sizes of the request and response messages.",
@@ -1558,7 +1558,7 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Storage Accounts",
+          "Section": "3 Storage Accounts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "In some cases, Azure Storage sets the minimum TLS version to be version 1.0 by default. TLS 1.0 is a legacy version and has known vulnerabilities. This minimum TLS version can be configured to be later protocols such as TLS 1.2.",
@@ -1578,7 +1578,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "3. Storage Accounts",
+          "Section": "3 Storage Accounts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Cross Tenant Replication in Azure allows data to be replicated across multiple Azure tenants. While this feature can be beneficial for data sharing and availability, it also poses a significant security risk if not properly managed. Unauthorized data access, data leakage, and compliance violations are potential risks. Disabling Cross Tenant Replication ensures that data is not inadvertently replicated across different tenant boundaries without explicit authorization.",
@@ -1598,7 +1598,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "3. Storage Accounts",
+          "Section": "3 Storage Accounts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "The Azure Storage setting โ€˜Allow Blob Anonymous Accessโ€™ (aka allowBlobPublicAccess) controls whether anonymous access is allowed for blob data in a storage account. When this property is set to True, it enables public read access to blob data, which can be convenient for sharing data but may carry security risks. When set to False, it disallows public access to blob data, providing a more secure storage environment.",
@@ -1620,7 +1620,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.1 SQL Server - Auditing",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -1643,7 +1643,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.1 SQL Server - Auditing",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -1666,7 +1666,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.1 SQL Server - Auditing",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
@@ -1689,7 +1689,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.1 SQL Server - Auditing",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -1712,7 +1712,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.1 SQL Server - Auditing",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -1735,7 +1735,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.1 SQL Server - Auditing",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -1758,7 +1758,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.3 PostgreSQL Database Server. Storage Accounts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -1781,7 +1781,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.3 PostgreSQL Database Server. Storage Accounts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -1804,7 +1804,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.3 PostgreSQL Database Server. Storage Accounts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -1827,7 +1827,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.3 PostgreSQL Database Server. Storage Accounts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -1850,7 +1850,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.3 PostgreSQL Database Server. Storage Accounts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -1873,7 +1873,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.3 PostgreSQL Database Server. Storage Accounts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -1896,7 +1896,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.3 PostgreSQL Database Server. Storage Accounts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -1917,7 +1917,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.3 PostgreSQL Database Server. Storage Accounts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -1940,7 +1940,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.4 MySQL Database",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -1963,7 +1963,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.4 MySQL Database",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -1986,7 +1986,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.4 MySQL Database",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
@@ -2009,7 +2009,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.4 MySQL Database",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
@@ -2032,7 +2032,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.5 Cosmos DB",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
@@ -2055,7 +2055,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.5 Cosmos DB",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
@@ -2078,7 +2078,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Database Services",
+          "Section": "4 Database Services",
           "SubSection": "4.5 Cosmos DB",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
@@ -2099,7 +2099,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "5. Logging and Monitoring",
+          "Section": "5 Logging and Monitoring",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Resource Logs capture activity to the data access plane while the Activity log is a subscription-level log for the control plane. Resource-level diagnostic logs provide insight into operations that were performed within that resource itself; for example, reading or updating a secret from a Key Vault. Currently, 95 Azure resources support Azure Monitoring (See the more information section for a complete list), including Network Security Groups, Load Balancers, Key Vault, AD, Logic Apps, and CosmosDB. The content of these logs varies by resource type.  A number of back-end services were not configured to log and store Resource Logs for certain activities or for a sufficient length. It is crucial that monitoring is correctly configured to log all relevant activities and retain those logs for a sufficient length of time. Given that the mean time to detection in an enterprise is 240 days, a minimum retention period of two years is recommended.",
@@ -2119,7 +2119,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "5. Logging and Monitoring",
+          "Section": "5 Logging and Monitoring",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "The use of Basic or Free SKUs in Azure whilst cost effective have significant limitations in terms of what can be monitored and what support can be realized from Microsoft. Typically, these SKUโ€™s do not have a service SLA and Microsoft may refuse to provide support for them. Consequently Basic/Free SKUs should never be used for production workloads.",
@@ -2141,7 +2141,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Logging and Monitoring",
+          "Section": "5 Logging and Monitoring",
           "SubSection": "5.1 Configuring Diagnostic Settings",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
@@ -2164,7 +2164,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Logging and Monitoring",
+          "Section": "5 Logging and Monitoring",
           "SubSection": "5.1 Configuring Diagnostic Settings",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -2187,7 +2187,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Logging and Monitoring",
+          "Section": "5 Logging and Monitoring",
           "SubSection": "5.1 Configuring Diagnostic Settings",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
@@ -2210,7 +2210,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Logging and Monitoring",
+          "Section": "5 Logging and Monitoring",
           "SubSection": "5.1 Configuring Diagnostic Settings",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -2233,7 +2233,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Logging and Monitoring",
+          "Section": "5 Logging and Monitoring",
           "SubSection": "5.1 Configuring Diagnostic Settings",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
@@ -2256,7 +2256,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Logging and Monitoring",
+          "Section": "5 Logging and Monitoring",
           "SubSection": "5.1 Configuring Diagnostic Settings",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
@@ -2279,7 +2279,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Logging and Monitoring",
+          "Section": "5 Logging and Monitoring",
           "SubSection": "5.2 Monitoring using Activity Log Alerts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -2302,7 +2302,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Logging and Monitoring",
+          "Section": "5 Logging and Monitoring",
           "SubSection": "5.2 Monitoring using Activity Log Alerts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -2325,7 +2325,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Logging and Monitoring",
+          "Section": "5 Logging and Monitoring",
           "SubSection": "5.2 Monitoring using Activity Log Alerts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -2348,7 +2348,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Logging and Monitoring",
+          "Section": "5 Logging and Monitoring",
           "SubSection": "5.2 Monitoring using Activity Log Alerts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -2371,7 +2371,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Logging and Monitoring",
+          "Section": "5 Logging and Monitoring",
           "SubSection": "5.2 Monitoring using Activity Log Alerts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -2394,7 +2394,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Logging and Monitoring",
+          "Section": "5 Logging and Monitoring",
           "SubSection": "5.2 Monitoring using Activity Log Alerts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -2417,7 +2417,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Logging and Monitoring",
+          "Section": "5 Logging and Monitoring",
           "SubSection": "5.2 Monitoring using Activity Log Alerts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -2440,7 +2440,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Logging and Monitoring",
+          "Section": "5 Logging and Monitoring",
           "SubSection": "5.2 Monitoring using Activity Log Alerts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -2463,7 +2463,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Logging and Monitoring",
+          "Section": "5 Logging and Monitoring",
           "SubSection": "5.2 Monitoring using Activity Log Alerts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -2486,7 +2486,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Logging and Monitoring",
+          "Section": "5 Logging and Monitoring",
           "SubSection": "5.2 Monitoring using Activity Log Alerts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
@@ -2509,7 +2509,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Logging and Monitoring",
+          "Section": "5 Logging and Monitoring",
           "SubSection": "5.3 Configuring Application Insights. Storage Accounts",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
@@ -2532,7 +2532,7 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Networking",
+          "Section": "6 Networking",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Network security groups should be periodically evaluated for port misconfigurations. Where certain ports and protocols may be exposed to the Internet, they should be evaluated for necessity and restricted wherever they are not explicitly required.",
@@ -2554,7 +2554,7 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Networking",
+          "Section": "6 Networking",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Network security groups should be periodically evaluated for port misconfigurations. Where certain ports and protocols may be exposed to the Internet, they should be evaluated for necessity and restricted wherever they are not explicitly required.",
@@ -2576,7 +2576,7 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Networking",
+          "Section": "6 Networking",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Network security groups should be periodically evaluated for port misconfigurations. Where certain ports and protocols may be exposed to the Internet, they should be evaluated for necessity and restricted wherever they are not explicitly required.",
@@ -2598,7 +2598,7 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Networking",
+          "Section": "6 Networking",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Network security groups should be periodically evaluated for port misconfigurations. Where certain ports and protocols may be exposed to the Internet, they should be evaluated for necessity and restricted wherever they are not explicitly required and narrowly configured.",
@@ -2620,7 +2620,7 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Networking",
+          "Section": "6 Networking",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Network Security Group Flow Logs should be enabled and the retention period set to greater than or equal to 90 days.",
@@ -2642,7 +2642,7 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Networking",
+          "Section": "6 Networking",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Enable Network Watcher for physical regions in Azure subscriptions.",
@@ -2662,7 +2662,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "6. Networking",
+          "Section": "6 Networking",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Public IP Addresses provide tenant accounts with Internet connectivity for resources contained within the tenant. During the creation of certain resources in Azure, a Public IP Address may be created. All Public IP Addresses within the tenant should be periodically reviewed for accuracy and necessity.",
@@ -2684,7 +2684,7 @@
       ],
       "Attributes": [
         {
-          "Section": "7. Virtual Machines",
+          "Section": "7 Virtual Machines",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "The Azure Bastion service allows secure remote access to Azure Virtual Machines over the Internet without exposing remote access protocol ports and services directly to the Internet. The Azure Bastion service provides this access using TLS over 443/TCP, and subscribes to hardened configurations within an organization's Azure Active Directory service.",
@@ -2706,7 +2706,7 @@
       ],
       "Attributes": [
         {
-          "Section": "7. Virtual Machines",
+          "Section": "7 Virtual Machines",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Migrate blob-based VHDs to Managed Disks on Virtual Machines to exploit the default features of this configuration. The features include:  1) Default Disk Encryption 2) Resilience, as Microsoft will managed the disk storage and move around if underlying hardware goes faulty 3) Reduction of costs over storage accounts",
@@ -2728,7 +2728,7 @@
       ],
       "Attributes": [
         {
-          "Section": "7. Virtual Machines",
+          "Section": "7 Virtual Machines",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Ensure that OS disks (boot volumes) and data disks (non-boot volumes) are encrypted with CMK (Customer Managed Keys). Customer Managed keys can be either ADE or Server Side Encryption (SSE).",
@@ -2750,7 +2750,7 @@
       ],
       "Attributes": [
         {
-          "Section": "7. Virtual Machines",
+          "Section": "7 Virtual Machines",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Ensure that unattached disks in a subscription are encrypted with a Customer Managed Key (CMK).",
@@ -2770,7 +2770,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "7. Virtual Machines",
+          "Section": "7 Virtual Machines",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "For added security, only install organization-approved extensions on VMs.",
@@ -2792,7 +2792,7 @@
       ],
       "Attributes": [
         {
-          "Section": "7. Virtual Machines",
+          "Section": "7 Virtual Machines",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Install endpoint protection for all virtual machines.",
@@ -2812,7 +2812,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "7. Virtual Machines",
+          "Section": "7 Virtual Machines",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "**NOTE: This is a legacy recommendation. Managed Disks are encrypted by default and recommended for all new VM implementations.**  VHD (Virtual Hard Disks) are stored in blob storage and are the old-style disks that were attached to Virtual Machines. The blob VHD was then leased to the VM. By default, storage accounts are not encrypted, and Microsoft Defender will then recommend that the OS disks should be encrypted. Storage accounts can be encrypted as a whole using PMK or CMK. This should be turned on for storage accounts containing VHDs.",
@@ -2834,7 +2834,7 @@
       ],
       "Attributes": [
         {
-          "Section": "7. Virtual Machines",
+          "Section": "7 Virtual Machines",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Verify identities without MFA that can log in to a privileged virtual machine using separate login credentials. An adversary can leverage the access to move laterally and perform actions with the virtual machine's managed identity. Make sure the virtual machine only has necessary permissions, and revoke the admin-level permissions according to the least privileges principal",
@@ -2856,7 +2856,7 @@
       ],
       "Attributes": [
         {
-          "Section": "7. Virtual Machines",
+          "Section": "7 Virtual Machines",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "When **Secure Boot** and **vTPM** are enabled together, they provide a strong foundation for protecting your VM from boot attacks. For example, if an attacker attempts to replace the bootloader with a malicious version, Secure Boot will prevent the VM from booting. If the attacker is able to bypass Secure Boot and install a malicious bootloader, vTPM can be used to detect the intrusion and alert you.",
@@ -2878,7 +2878,7 @@
       ],
       "Attributes": [
         {
-          "Section": "8. Key Vault",
+          "Section": "8 Key Vault",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Ensure that all Keys in Role Based Access Control (RBAC) Azure Key Vaults have an expiration date set.",
@@ -2900,7 +2900,7 @@
       ],
       "Attributes": [
         {
-          "Section": "8. Key Vault",
+          "Section": "8 Key Vault",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Ensure that all Keys in Non Role Based Access Control (RBAC) Azure Key Vaults have an expiration date set.",
@@ -2922,7 +2922,7 @@
       ],
       "Attributes": [
         {
-          "Section": "8. Key Vault",
+          "Section": "8 Key Vault",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Ensure that all Secrets in Role Based Access Control (RBAC) Azure Key Vaults have an expiration date set.",
@@ -2944,7 +2944,7 @@
       ],
       "Attributes": [
         {
-          "Section": "8. Key Vault",
+          "Section": "8 Key Vault",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Ensure that all Secrets in Non Role Based Access Control (RBAC) Azure Key Vaults have an expiration date set.",
@@ -2966,7 +2966,7 @@
       ],
       "Attributes": [
         {
-          "Section": "8. Key Vault",
+          "Section": "8 Key Vault",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "The Key Vault contains object keys, secrets, and certificates. Accidental unavailability of a Key Vault can cause immediate data loss or loss of security functions (authentication, validation, verification, non-repudiation, etc.) supported by the Key Vault objects.  It is recommended the Key Vault be made recoverable by enabling the Do Not Purge and Soft Delete functions. This is in order to prevent loss of encrypted data, including storage accounts, SQL databases, and/or dependent services provided by Key Vault objects (Keys, Secrets, Certificates) etc. This may happen in the case of accidental deletion by a user or from disruptive activity by a malicious user.  WARNING: A current limitation is that role assignments disappearing when Key Vault is deleted. All role assignments will need to be recreated after recovery.",
@@ -2988,7 +2988,7 @@
       ],
       "Attributes": [
         {
-          "Section": "8. Key Vault",
+          "Section": "8 Key Vault",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "WARNING: Role assignments disappear when a Key Vault has been deleted (soft-delete) and recovered. Afterwards it will be required to recreate all role assignments. This is a limitation of the soft-delete feature across all Azure services.",
@@ -3010,7 +3010,7 @@
       ],
       "Attributes": [
         {
-          "Section": "8. Key Vault",
+          "Section": "8 Key Vault",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Private endpoints will secure network traffic from Azure Key Vault to the resources requesting secrets and keys.",
@@ -3032,7 +3032,7 @@
       ],
       "Attributes": [
         {
-          "Section": "8. Key Vault",
+          "Section": "8 Key Vault",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Automatic Key Rotation is available in Public Preview. The currently supported applications are Key Vault, Managed Disks, and Storage accounts accessing keys within Key Vault. The number of supported applications will incrementally increased.",
@@ -3054,7 +3054,7 @@
       ],
       "Attributes": [
         {
-          "Section": "9. AppService",
+          "Section": "9 AppService",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Azure App Service Authentication is a feature that can prevent anonymous HTTP requests from reaching a Web Application or authenticate those with tokens before they reach the app. If an anonymous request is received from a browser, App Service will redirect to a logon page. To handle the logon process, a choice from a set of identity providers can be made, or a custom authentication mechanism can be implemented.",
@@ -3076,7 +3076,7 @@
       ],
       "Attributes": [
         {
-          "Section": "9. AppService",
+          "Section": "9 AppService",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Azure Web Apps allows sites to run under both HTTP and HTTPS by default. Web apps can be accessed by anyone using non-secure HTTP links by default.  Non-secure HTTP requests can be restricted and all HTTP requests redirected to the secure HTTPS port. It is recommended to enforce HTTPS-only traffic.",
@@ -3098,7 +3098,7 @@
       ],
       "Attributes": [
         {
-          "Section": "9. AppService",
+          "Section": "9 AppService",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "The TLS (Transport Layer Security) protocol secures transmission of data over the internet using standard encryption technology. Encryption should be set with the latest version of TLS. App service allows TLS 1.2 by default, which is the recommended TLS level by industry standards such as PCI DSS.",
@@ -3120,7 +3120,7 @@
       ],
       "Attributes": [
         {
-          "Section": "9. AppService",
+          "Section": "9 AppService",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Managed service identity in App Service provides more security by eliminating secrets from the app, such as credentials in the connection strings. When registering an App Service with Entra ID, the app will connect to other Azure services securely without the need for usernames and passwords.",
@@ -3142,7 +3142,7 @@
       ],
       "Attributes": [
         {
-          "Section": "9. AppService",
+          "Section": "9 AppService",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Periodically newer versions are released for PHP software either due to security flaws or to include additional functionality. Using the latest PHP version for web apps is recommended in order to take advantage of security fixes, if any, and/or additional functionalities of the newer version.",
@@ -3164,7 +3164,7 @@
       ],
       "Attributes": [
         {
-          "Section": "9. AppService",
+          "Section": "9 AppService",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Periodically, newer versions are released for Python software either due to security flaws or to include additional functionality. Using the latest full Python version for web apps is recommended in order to take advantage of security fixes, if any, and/or additional functionalities of the newer version.",
@@ -3186,7 +3186,7 @@
       ],
       "Attributes": [
         {
-          "Section": "9. AppService",
+          "Section": "9 AppService",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Periodically, newer versions are released for Java software either due to security flaws or to include additional functionality. Using the latest Java version for web apps is recommended in order to take advantage of security fixes, if any, and/or new functionalities of the newer version.",
@@ -3208,7 +3208,7 @@
       ],
       "Attributes": [
         {
-          "Section": "9. AppService",
+          "Section": "9 AppService",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Periodically, newer versions are released for HTTP either due to security flaws or to include additional functionality. Using the latest HTTP version for web apps to take advantage of security fixes, if any, and/or new functionalities of the newer version.",
@@ -3230,7 +3230,7 @@
       ],
       "Attributes": [
         {
-          "Section": "9. AppService",
+          "Section": "9 AppService",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "By default, Azure Functions, Web, and API Services  can be deployed over FTP. If FTP is required for an essential deployment workflow, FTPS should be required for FTP login for all App Service Apps and Functions.",
@@ -3250,7 +3250,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "9. AppService",
+          "Section": "9 AppService",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Azure Key Vault will store multiple types of sensitive information such as encryption keys, certificate thumbprints, and Managed Identity Credentials. Access to these 'Secrets' can be controlled through granular permissions.",
@@ -3270,7 +3270,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "10. Miscellaneous",
+          "Section": "10 Miscellaneous",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Resource Manager Locks provide a way for administrators to lock down Azure resources to prevent deletion of, or modifications to, a resource. These locks sit outside of the Role Based Access Controls (RBAC) hierarchy and, when applied, will place restrictions on the resource for all users. These locks are very useful when there is an important resource in a subscription that users should not be able to delete or change. Locks can help prevent accidental and malicious changes or deletion.",
diff --git a/prowler/compliance/azure/cis_3.0_azure.json b/prowler/compliance/azure/cis_3.0_azure.json
index a72b5907ac..0ba6c77444 100644
--- a/prowler/compliance/azure/cis_3.0_azure.json
+++ b/prowler/compliance/azure/cis_3.0_azure.json
@@ -12,7 +12,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Identity",
+          "Section": "2 Identity",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Require administrators or appropriately delegated users to create new tenants.",
@@ -32,7 +32,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "2. Identity",
+          "Section": "2 Identity",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Microsoft Entra ID has native and extended identity functionality allowing you to invite people from outside your organization to be guest users in your cloud account and sign in with their own work, school, or social identities.",
@@ -52,7 +52,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "2. Identity",
+          "Section": "2 Identity",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Ensures that two alternate forms of identification are provided before allowing a password reset.",
@@ -72,7 +72,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "2. Identity",
+          "Section": "2 Identity",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "The account lockout threshold determines how many failed login attempts are permitted prior to placing the account in a locked-out state and initiating a variable lockout duration.",
@@ -92,7 +92,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "2. Identity",
+          "Section": "2 Identity",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "The account lockout duration value determines how long an account retains the status of lockout, and therefore how long before a user can continue to attempt to login after passing the lockout threshold.",
@@ -112,7 +112,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "2. Identity",
+          "Section": "2 Identity",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Microsoft Azure provides a Global Banned Password policy that applies to Azure administrative and normal user accounts. This is not applied to user accounts that are synced from an on-premise Active Directory unless Microsoft Entra ID Connect is used and you enable EnforceCloudPasswordPolicyForPasswordSyncedUsers.Please see the list in default values on the specifics of this policy. To further password security, it is recommended to further define a custom banned password policy.",
@@ -132,7 +132,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "2. Identity",
+          "Section": "2 Identity",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Ensure that the number of days before users are asked to re-confirm their authentication information is not set to 0.",
@@ -152,7 +152,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "2. Identity",
+          "Section": "2 Identity",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Ensure that users are notified on their primary and alternate emails on password resets.",
@@ -172,7 +172,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "2. Identity",
+          "Section": "2 Identity",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Ensure that all Global Administrators are notified if any other administrator resets their password.",
@@ -194,7 +194,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Identity",
+          "Section": "2 Identity",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Require administrators to provide consent for applications before use.",
@@ -216,7 +216,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Identity",
+          "Section": "2 Identity",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Allow users to provide consent for selected permissions when a request is coming from a verified publisher.",
@@ -238,7 +238,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Identity",
+          "Section": "2 Identity",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Require administrators or appropriately delegated users to register third-party applications.",
@@ -260,7 +260,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Identity",
+          "Section": "2 Identity",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Limit guest user permissions.",
@@ -282,7 +282,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Identity",
+          "Section": "2 Identity",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Restrict invitations to users with specific administrative roles only.",
@@ -302,7 +302,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "2. Identity",
+          "Section": "2 Identity",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Restrict access to the Microsoft Entra ID administration center to administrators only.**NOTE**: This only affects access to the Entra ID administrator's web portal. This setting does not prohibit privileged users from using other methods such as Rest API or Powershell to obtain sensitive information from Microsoft Entra ID.",
@@ -322,7 +322,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "2. Identity",
+          "Section": "2 Identity",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Restrict access to group web interface in the Access Panel portal.",
@@ -344,7 +344,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Identity",
+          "Section": "2 Identity",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Restrict security group creation to administrators only.",
@@ -364,7 +364,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "2. Identity",
+          "Section": "2 Identity",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Restrict security group management to administrators only.",
@@ -386,7 +386,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Identity",
+          "Section": "2 Identity",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Restrict Microsoft 365 group creation to administrators only.",
@@ -406,7 +406,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "2. Identity",
+          "Section": "2 Identity",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "**NOTE:** This recommendation is only relevant if your subscription is using Per-User MFA. If your organization is licensed to use Conditional Access, the preferred method of requiring MFA to join devices to Entra ID is to use a Conditional Access policy (see additional information below for link).Joining or registering devices to Microsoft Entra ID should require multi-factor authentication.",
@@ -428,7 +428,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Identity",
+          "Section": "2 Identity",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "The principle of least privilege should be followed and only necessary privileges should be assigned instead of allowing full administrative access.",
@@ -450,7 +450,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Identity",
+          "Section": "2 Identity",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Resource locking is a powerful protection mechanism that can prevent inadvertent modification/deletion of resources within Azure subscriptions/Resource Groups and is a recommended NIST configuration.",
@@ -470,7 +470,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "2. Identity",
+          "Section": "2 Identity",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Users who are set as subscription owners are able to make administrative changes to the subscriptions and move them into and out of Microsoft Entra ID.",
@@ -492,7 +492,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Identity",
+          "Section": "2 Identity",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "This recommendation aims to maintain a balance between security and operational efficiency by ensuring that a minimum of 2 and a maximum of 4 users are assigned the Global Administrator role in Microsoft Entra ID. Having at least two Global Administrators ensures redundancy, while limiting the number to four reduces the risk of excessive privileged access.",
@@ -514,8 +514,8 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Identity",
-          "SubSection": "2.1. Security Defaults (Per-User MFA)",
+          "Section": "2 Identity",
+          "SubSection": "2.1 Security Defaults (Per-User MFA)",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "[**IMPORTANT - Please read the section overview:** If your organization pays for Microsoft Entra ID licensing (included in Microsoft 365 E3, E5, or F5, and EM&S E3 or E5 licenses) and **CAN** use Conditional Access, ignore the recommendations in this section and proceed to the Conditional Access section.]Security defaults in Microsoft Entra ID make it easier to be secure and help protect your organization. Security defaults contain preconfigured security settings for common attacks.Security defaults is available to everyone. The goal is to ensure that all organizations have a basic level of security enabled at no extra cost. You may turn on security defaults in the Azure portal.",
@@ -537,8 +537,8 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Identity",
-          "SubSection": "2.1. Security Defaults (Per-User MFA)",
+          "Section": "2 Identity",
+          "SubSection": "2.1 Security Defaults (Per-User MFA)",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "[**IMPORTANT - Please read the section overview:** If your organization pays for Microsoft Entra ID licensing (included in Microsoft 365 E3, E5, or F5, and EM&S E3 or E5 licenses) and **CAN** use Conditional Access, ignore the recommendations in this section and proceed to the Conditional Access section.]Enable multi-factor authentication for all roles, groups, and users that have write access or permissions to Azure resources. These include custom created objects or built-in roles such as;- Service Co-Administrators- Subscription Owners- Contributors",
@@ -560,8 +560,8 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Identity",
-          "SubSection": "2.1. Security Defaults (Per-User MFA)",
+          "Section": "2 Identity",
+          "SubSection": "2.1 Security Defaults (Per-User MFA)",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "[**IMPORTANT - Please read the section overview:** If your organization pays for Microsoft Entra ID licensing (included in Microsoft 365 E3, E5, or F5, and EM&S E3 or E5 licenses) and **CAN** use Conditional Access, ignore the recommendations in this section and proceed to the Conditional Access section.]Enable multi-factor authentication for all non-privileged users.",
@@ -581,8 +581,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "2. Identity",
-          "SubSection": "2.1. Security Defaults (Per-User MFA)",
+          "Section": "2 Identity",
+          "SubSection": "2.1 Security Defaults (Per-User MFA)",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "[**IMPORTANT - Please read the section overview:** If your organization pays for Microsoft Entra ID licensing (included in Microsoft 365 E3, E5, or F5, and EM&S E3 or E5 licenses) and **CAN** use Conditional Access, ignore the recommendations in this section and proceed to the Conditional Access section.]Do not allow users to remember multi-factor authentication on devices.",
@@ -604,8 +604,8 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Identity",
-          "SubSection": "2.2. Conditional Access",
+          "Section": "2 Identity",
+          "SubSection": "2.2 Conditional Access",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Microsoft Entra ID Conditional Access allows an organization to configure `Named locations` and configure whether those locations are trusted or untrusted. These settings provide organizations the means to specify Geographical locations for use in conditional access policies, or define actual IP addresses and IP ranges and whether or not those IP addresses and/or ranges are trusted by the organization.",
@@ -625,8 +625,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "2. Identity",
-          "SubSection": "2.2. Conditional Access",
+          "Section": "2 Identity",
+          "SubSection": "2.2 Conditional Access",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "**CAUTION**: If these policies are created without first auditing and testing the result, misconfiguration can potentially lock out administrators or create undesired access issues.Conditional Access Policies can be used to block access from geographic locations that are deemed out-of-scope for your organization or application. The scope and variables for this policy should be carefully examined and defined.",
@@ -646,8 +646,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "2. Identity",
-          "SubSection": "2.2. Conditional Access",
+          "Section": "2 Identity",
+          "SubSection": "2.2 Conditional Access",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Conditional Access Policies can be used to prevent the Device code authentication flow. Device code flow should be permitted only for users that regularly perform duties that explicitly require the use of Device Code to authenticate, such as utilizing Azure with PowerShell.",
@@ -667,8 +667,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "2. Identity",
-          "SubSection": "2.2. Conditional Access",
+          "Section": "2 Identity",
+          "SubSection": "2.2 Conditional Access",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "For designated users, they will be prompted to use their multi-factor authentication (MFA) process on login.",
@@ -688,8 +688,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "2. Identity",
-          "SubSection": "2.2. Conditional Access",
+          "Section": "2 Identity",
+          "SubSection": "2.2 Conditional Access",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "For designated users, they will be prompted to use their multi-factor authentication (MFA) process on logins.",
@@ -709,8 +709,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "2. Identity",
-          "SubSection": "2.2. Conditional Access",
+          "Section": "2 Identity",
+          "SubSection": "2.2 Conditional Access",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Entra ID tracks the behavior of sign-in events. If the Entra ID domain is licensed with P2, the sign-in behavior can be used as a detection mechanism for additional scrutiny during the sign-in event. If this policy is set up, then Risky Sign-in events will prompt users to use multi-factor authentication (MFA) tokens on login for additional verification.",
@@ -732,8 +732,8 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Identity",
-          "SubSection": "2.2. Conditional Access",
+          "Section": "2 Identity",
+          "SubSection": "2.2 Conditional Access",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "This recommendation ensures that users accessing the Windows Azure Service Management API (i.e. Azure Powershell, Azure CLI, Azure Resource Manager API, etc.) are required to use multi-factor authentication (MFA) credentials when accessing resources through the Windows Azure Service Management API.",
@@ -755,8 +755,8 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Identity",
-          "SubSection": "2.2. Conditional Access",
+          "Section": "2 Identity",
+          "SubSection": "2.2 Conditional Access",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "This recommendation ensures that users accessing Microsoft Admin Portals (i.e. Microsoft 365 Admin, Microsoft 365 Defender, Exchange Admin Center, Azure Portal, etc.) are required to use multi-factor authentication (MFA) credentials when logging into an Admin Portal.",
@@ -778,8 +778,8 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Security",
-          "SubSection": "3.1. Microsoft Defender For Cloud",
+          "Section": "3 Security",
+          "SubSection": "3.1 Microsoft Defender For Cloud",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Ensure that the latest OS patches for all virtual machines are applied.",
@@ -801,8 +801,8 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Security",
-          "SubSection": "3.1. Microsoft Defender For Cloud",
+          "Section": "3 Security",
+          "SubSection": "3.1 Microsoft Defender For Cloud",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "The Microsoft Cloud Security Benchmark (or 'MCSB') is an Azure Policy Initiative containing many security policies to evaluate resource configuration against best practice recommendations. If a policy in the MCSB is set with effect type `Disabled`, it is not evaluated and may prevent administrators from being informed of valuable security recommendations.",
@@ -824,8 +824,8 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Security",
-          "SubSection": "3.1. Microsoft Defender For Cloud",
+          "Section": "3 Security",
+          "SubSection": "3.1 Microsoft Defender For Cloud",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Enable security alert emails to subscription owners.",
@@ -847,8 +847,8 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Security",
-          "SubSection": "3.1. Microsoft Defender For Cloud",
+          "Section": "3 Security",
+          "SubSection": "3.1 Microsoft Defender For Cloud",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Microsoft Defender for Cloud emails the subscription owners whenever a high-severity alert is triggered for their subscription. You should provide a security contact email address as an additional email address.",
@@ -870,8 +870,8 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Security",
-          "SubSection": "3.1. Microsoft Defender For Cloud",
+          "Section": "3 Security",
+          "SubSection": "3.1 Microsoft Defender For Cloud",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Enables emailing security alerts to the subscription owner or other designated security contact.",
@@ -891,8 +891,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "3. Security",
-          "SubSection": "3.1. Microsoft Defender For Cloud",
+          "Section": "3 Security",
+          "SubSection": "3.1 Microsoft Defender For Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "An organization's attack surface is the collection of assets with a public network identifier or URI that an external threat actor can see or access from outside your cloud. It is the set of points on the boundary of a system, a system element, system component, or an environment where an attacker can try to enter, cause an effect on, or extract data from, that system, system element, system component, or environment. The larger the attack surface, the harder it is to protect.This tool can be configured to scan your organization's online infrastructure such as specified domains, hosts, CIDR blocks, and SSL certificates, and store them in an Inventory. Inventory items can be added, reviewed, approved, and removed, and may contain enrichments ('insights') and additional information collected from the tool's different scan engines and open-source intelligence sources.A Defender EASM workspace will generate an Inventory of publicly exposed assets by crawling and scanning the internet using _Seeds_ you provide when setting up the tool. Seeds can be FQDNs, IP CIDR blocks, and WHOIS records.Defender EASM will generate Insights within 24-48 hours after Seeds are provided, and these insights include vulnerability data (CVEs), ports and protocols, and weak or expired SSL certificates that could be used by an attacker for reconnaisance or exploitation.Results are classified High/Medium/Low and some of them include proposed mitigations.",
@@ -914,8 +914,8 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Security",
-          "SubSection": "3.1. Microsoft Defender For Cloud",
+          "Section": "3 Security",
+          "SubSection": "3.1 Microsoft Defender For Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "[**NOTE:** As of August 1, 2023 customers with an existing subscription to Defender for DNS can continue to use the service, but new subscribers will receive alerts about suspicious DNS activity as part of Defender for Servers P2.]Microsoft Defender for DNS scans all network traffic exiting from within a subscription.",
@@ -937,8 +937,8 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Security",
-          "SubSection": "3.1.1 Microsoft Cloud Security Posture Management (CSPM)",
+          "Section": "3 Security",
+          "SubSection": "3.1 Microsoft Defender For Cloud",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Enable automatic provisioning of the monitoring agent to collect security data.**DEPRECATION PLANNED:** The Log Analytics Agent is slated for deprecation in August 2024. The Microsoft Defender for Endpoint agent, in tandem with new agentless capabilities will be providing replacement functionality. More detail is available here: [https://techcommunity.microsoft.com/t5/microsoft-defender-for-cloud/microsoft-defender-for-cloud-strategy-and-plan-towards-log/ba-p/3883341](https://techcommunity.microsoft.com/t5/microsoft-defender-for-cloud/microsoft-defender-for-cloud-strategy-and-plan-towards-log/ba-p/3883341).",
@@ -960,8 +960,8 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Security",
-          "SubSection": "3.1.1 Microsoft Cloud Security Posture Management (CSPM)",
+          "Section": "3 Security",
+          "SubSection": "3.1 Microsoft Defender For Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "This integration setting enables Microsoft Defender for Cloud Apps (formerly 'Microsoft Cloud App Security' or 'MCAS' - see additional info) to communicate with Microsoft Defender for Cloud.",
@@ -983,8 +983,8 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Security",
-          "SubSection": "3.1.3. Defender Plan: Servers",
+          "Section": "3 Security",
+          "SubSection": "3.1 Microsoft Defender For Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Turning on Microsoft Defender for Servers enables threat detection for Servers, providing threat intelligence, anomaly detection, and behavior analytics in the Microsoft Defender for Cloud.",
@@ -1006,8 +1006,8 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Security",
-          "SubSection": "3.1.3. Defender Plan: Servers",
+          "Section": "3 Security",
+          "SubSection": "3.1 Microsoft Defender For Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Enable vulnerability assessment for machines on both Azure and hybrid (Arc enabled) machines.",
@@ -1027,8 +1027,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "3. Security",
-          "SubSection": "3.1.3. Defender Plan: Servers",
+          "Section": "3 Security",
+          "SubSection": "3.1 Microsoft Defender For Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "The Endpoint protection component enables Microsoft Defender for Endpoint (formerly 'Advanced Threat Protection' or 'ATP' or 'WDATP' - see additional info) to communicate with Microsoft Defender for Cloud.**IMPORTANT:** When enabling integration between DfE & DfC it needs to be taken into account that this will have some side effects that may be undesirable.1. For server 2019 & above if defender is installed (default for these server SKUs) this will trigger a deployment of the new unified agent and link to any of the extended configuration in the Defender portal.1. If the new unified agent is required for server SKUs of Win 2016 or Linux and lower there is additional integration that needs to be switched on and agents need to be aligned.",
@@ -1048,8 +1048,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "3. Security",
-          "SubSection": "3.1.3. Defender Plan: Servers",
+          "Section": "3 Security",
+          "SubSection": "3.1 Microsoft Defender For Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Using disk snapshots, the agentless scanner scans for installed software, vulnerabilities, and plain text secrets.",
@@ -1069,8 +1069,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "3. Security",
-          "SubSection": "3.1.3. Defender Plan: Servers",
+          "Section": "3 Security",
+          "SubSection": "3.1 Microsoft Defender For Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "File Integrity Monitoring (FIM) is a feature that monitors critical system files in Windows or Linux for potential signs of attack or compromise.",
@@ -1092,8 +1092,8 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Security",
-          "SubSection": "3.1.4. Defender Plan: Containers",
+          "Section": "3 Security",
+          "SubSection": "3.1 Microsoft Defender For Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Turning on Microsoft Defender for Containers enables threat detection for Container Registries including Kubernetes, providing threat intelligence, anomaly detection, and behavior analytics in the Microsoft Defender for Cloud. The following services will be enabled for container instances:- Defender agent in Azure- Azure Policy for Kubernetes- Agentless discovery for Kubernetes- Agentless container vulnerability assessment",
@@ -1113,8 +1113,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "3. Security",
-          "SubSection": "3.1.4. Defender Plan: Containers",
+          "Section": "3 Security",
+          "SubSection": "3.1 Microsoft Defender For Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Enable automatic discovery and configuration scanning of the Microsoft Kubernetes clusters.",
@@ -1134,8 +1134,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "3. Security",
-          "SubSection": "3.1.4. Defender Plan: Containers",
+          "Section": "3 Security",
+          "SubSection": "3.1 Microsoft Defender For Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Enable automatic vulnerability management for images stored in ACR or running in AKS clusters.",
@@ -1157,8 +1157,8 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Security",
-          "SubSection": "3.1.5. Defender Plan: Storage",
+          "Section": "3 Security",
+          "SubSection": "3.1 Microsoft Defender For Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Turning on Microsoft Defender for Storage enables threat detection for Storage, providing threat intelligence, anomaly detection, and behavior analytics in the Microsoft Defender for Cloud.",
@@ -1180,8 +1180,8 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Security",
-          "SubSection": "3.1.6. Defender Plan: App Service",
+          "Section": "3 Security",
+          "SubSection": "3.1 Microsoft Defender For Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Turning on Microsoft Defender for App Service enables threat detection for App Service, providing threat intelligence, anomaly detection, and behavior analytics in the Microsoft Defender for Cloud.",
@@ -1203,8 +1203,8 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Security",
-          "SubSection": "3.1.7. Defender Plan: Databases",
+          "Section": "3 Security",
+          "SubSection": "3.1 Microsoft Defender For Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Microsoft Defender for Azure Cosmos DB scans all incoming network requests for threats to your Azure Cosmos DB resources.",
@@ -1226,8 +1226,8 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Security",
-          "SubSection": "3.1.7. Defender Plan: Databases",
+          "Section": "3 Security",
+          "SubSection": "3.1 Microsoft Defender For Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Turning on Microsoft Defender for Open-source relational databases enables threat detection for Open-source relational databases, providing threat intelligence, anomaly detection, and behavior analytics in the Microsoft Defender for Cloud.",
@@ -1249,8 +1249,8 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Security",
-          "SubSection": "3.1.7. Defender Plan: Databases",
+          "Section": "3 Security",
+          "SubSection": "3.1 Microsoft Defender For Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Turning on Microsoft Defender for Azure SQL Databases enables threat detection for Managed Instance Azure SQL databases, providing threat intelligence, anomaly detection, and behavior analytics in Microsoft Defender for Cloud.",
@@ -1272,8 +1272,8 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Security",
-          "SubSection": "3.1.7. Defender Plan: Databases",
+          "Section": "3 Security",
+          "SubSection": "3.1 Microsoft Defender For Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Turning on Microsoft Defender for SQL servers on machines enables threat detection for SQL servers on machines, providing threat intelligence, anomaly detection, and behavior analytics in Microsoft Defender for Cloud.",
@@ -1295,8 +1295,8 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Security",
-          "SubSection": "3.1.8. Defender Plan: Key Vault",
+          "Section": "3 Security",
+          "SubSection": "3.1 Microsoft Defender For Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Turning on Microsoft Defender for Key Vault enables threat detection for Key Vault, providing threat intelligence, anomaly detection, and behavior analytics in the Microsoft Defender for Cloud.",
@@ -1318,8 +1318,8 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Security",
-          "SubSection": "3.1.9. Defender Plan: Resource Manager",
+          "Section": "3 Security",
+          "SubSection": "3.1 Microsoft Defender For Cloud",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Microsoft Defender for Resource Manager scans incoming administrative requests to change your infrastructure from both CLI and the Azure portal.",
@@ -1341,8 +1341,8 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Security",
-          "SubSection": "3.2. Microsoft Defender for IoT",
+          "Section": "3 Security",
+          "SubSection": "3.2 Microsoft Defender for IoT",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Microsoft Defender for IoT acts as a central security hub for IoT devices within your organization.",
@@ -1364,8 +1364,8 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Security",
-          "SubSection": "3.3. Key Vault",
+          "Section": "3 Security",
+          "SubSection": "3.3 Key Vault",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Ensure that all Keys in Role Based Access Control (RBAC) Azure Key Vaults have an expiration date set.",
@@ -1387,8 +1387,8 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Security",
-          "SubSection": "3.3. Key Vault",
+          "Section": "3 Security",
+          "SubSection": "3.3 Key Vault",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Ensure that all Keys in Non Role Based Access Control (RBAC) Azure Key Vaults have an expiration date set.",
@@ -1410,8 +1410,8 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Security",
-          "SubSection": "3.3. Key Vault",
+          "Section": "3 Security",
+          "SubSection": "3.3 Key Vault",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Ensure that all Secrets in Role Based Access Control (RBAC) Azure Key Vaults have an expiration date set.",
@@ -1433,8 +1433,8 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Security",
-          "SubSection": "3.3. Key Vault",
+          "Section": "3 Security",
+          "SubSection": "3.3 Key Vault",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Ensure that all Secrets in Non Role Based Access Control (RBAC) Azure Key Vaults have an expiration date set.",
@@ -1456,8 +1456,8 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Security",
-          "SubSection": "3.3. Key Vault",
+          "Section": "3 Security",
+          "SubSection": "3.3 Key Vault",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "The Key Vault contains object keys, secrets, and certificates. Accidental unavailability of a Key Vault can cause immediate data loss or loss of security functions (authentication, validation, verification, non-repudiation, etc.) supported by the Key Vault objects.It is recommended the Key Vault be made recoverable by enabling the 'Do Not Purge' and 'Soft Delete' functions. This is in order to prevent loss of encrypted data, including storage accounts, SQL databases, and/or dependent services provided by Key Vault objects (Keys, Secrets, Certificates) etc. This may happen in the case of accidental deletion by a user or from disruptive activity by a malicious user.**NOTE:** In February 2025, Microsoft will enable soft-delete protection on all key vaults, and users will no longer be able to opt out of or turn off soft-delete. **WARNING:** A current limitation is that role assignments disappearing when Key Vault is deleted. All role assignments will need to be recreated after recovery.",
@@ -1479,8 +1479,8 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Security",
-          "SubSection": "3.3. Key Vault",
+          "Section": "3 Security",
+          "SubSection": "3.3 Key Vault",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "The recommended way to access Key Vaults is to use the Azure Role-Based Access Control (RBAC) permissions model.Azure RBAC is an authorization system built on Azure Resource Manager that provides fine-grained access management of Azure resources. It allows users to manage Key, Secret, and Certificate permissions. It provides one place to manage all permissions across all key vaults.",
@@ -1502,8 +1502,8 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Security",
-          "SubSection": "3.3. Key Vault",
+          "Section": "3 Security",
+          "SubSection": "3.3 Key Vault",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Private endpoints will secure network traffic from Azure Key Vault to the resources requesting secrets and keys.",
@@ -1525,8 +1525,8 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Security",
-          "SubSection": "3.3. Key Vault",
+          "Section": "3 Security",
+          "SubSection": "3.3 Key Vault",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Automatic Key Rotation is available in Public Preview. The currently supported applications are Key Vault, Managed Disks, and Storage accounts accessing keys within Key Vault. The number of supported applications will incrementally increased.",
@@ -1548,7 +1548,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Storage Accounts",
+          "Section": "4 Storage Accounts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Enable data encryption in transit.",
@@ -1568,7 +1568,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "4. Storage Accounts",
+          "Section": "4 Storage Accounts",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Enabling encryption at the hardware level on top of the default software encryption for Storage Accounts accessing Azure storage solutions.",
@@ -1590,7 +1590,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Storage Accounts",
+          "Section": "4 Storage Accounts",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Access Keys authenticate application access requests to data contained in Storage Accounts. A periodic rotation of these keys is recommended to ensure that potentially compromised keys cannot result in a long-term exploitable credential. The 'Rotation Reminder' is an automatic reminder feature for a manual procedure.",
@@ -1612,7 +1612,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Storage Accounts",
+          "Section": "4 Storage Accounts",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "For increased security, regenerate storage account access keys periodically.",
@@ -1632,7 +1632,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "4. Storage Accounts",
+          "Section": "4 Storage Accounts",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Expire shared access signature tokens within an hour.",
@@ -1654,7 +1654,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Storage Accounts",
+          "Section": "4 Storage Accounts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Disallowing public network access for a storage account overrides the public access settings for individual containers in that storage account for Azure Resource Manager Deployment Model storage accounts. Azure Storage accounts that use the classic deployment model will be retired on August 31, 2024.",
@@ -1676,7 +1676,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Storage Accounts",
+          "Section": "4 Storage Accounts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Restricting default network access helps to provide a new layer of security, since storage accounts accept connections from clients on any network. To limit access to selected networks, the default action must be changed.",
@@ -1698,7 +1698,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Storage Accounts",
+          "Section": "4 Storage Accounts",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "_NOTE:_ This recommendation assumes that the `Public network access` parameter is set to `Enabled from selected virtual networks and IP addresses`. Please ensure the prerequisite recommendation has been implemented before proceeding:ย - Ensure Default Network Access Rule for Storage Accounts is Set to DenySome Azure services that interact with storage accounts operate from networks that can't be granted access through network rules. To help this type of service work as intended, allow the set of trusted Azure services to bypass the network rules. These services will then use strong authentication to access the storage account. If the `Allow Azure services on the trusted services list to access this storage account` exception is enabled, the following services are granted access to the storage account: Azure Backup, Azure Data Box, Azure DevTest Labs, Azure Event Grid, Azure Event Hubs, Azure File Sync, Azure HDInsight, Azure Import/Export, Azure Monitor, Azure Networking Services, and Azure Site Recovery (when registered in the subscription).",
@@ -1720,7 +1720,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Storage Accounts",
+          "Section": "4 Storage Accounts",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Use private endpoints for your Azure Storage accounts to allow clients and services to securely access data located over a network via an encrypted Private Link. To do this, the private endpoint uses an IP address from the VNet for each service. Network traffic between disparate services securely traverses encrypted over the VNet. This VNet can also link addressing space, extending your network and accessing resources on it. Similarly, it can be a tunnel through public networks to connect remote infrastructures together. This creates further security through segmenting network traffic and preventing outside sources from accessing it.",
@@ -1742,7 +1742,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Storage Accounts",
+          "Section": "4 Storage Accounts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "The Azure Storage blobs contain data like ePHI or Financial, which can be secret or personal. Data that is erroneously modified or deleted by an application or other storage account user will cause data loss or unavailability.It is recommended that both Azure Containers with attached Blob Storage and standalone containers with Blob Storage be made recoverable by enabling the **soft delete** configuration. This is to save and recover data when blobs or blob snapshots are deleted.",
@@ -1764,7 +1764,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Storage Accounts",
+          "Section": "4 Storage Accounts",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Enable sensitive data encryption at rest using Customer Managed Keys (CMK) rather than Microsoft Managed keys.",
@@ -1784,7 +1784,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "4. Storage Accounts",
+          "Section": "4 Storage Accounts",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "The Storage Queue service stores messages that may be read by any client who has access to the storage account. A queue can contain an unlimited number of messages, each of which can be up to 64KB in size using version 2011-08-18 or newer. Storage Logging happens server-side and allows details for both successful and failed requests to be recorded in the storage account. These logs allow users to see the details of read, write, and delete operations against the queues. Storage Logging log entries contain the following information about individual requests: Timing information such as start time, end-to-end latency, and server latency, authentication details, concurrency information, and the sizes of the request and response messages.",
@@ -1804,7 +1804,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "4. Storage Accounts",
+          "Section": "4 Storage Accounts",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "The Storage Blob service provides scalable, cost-efficient object storage in the cloud. Storage Logging happens server-side and allows details for both successful and failed requests to be recorded in the storage account. These logs allow users to see the details of read, write, and delete operations against the blobs. Storage Logging log entries contain the following information about individual requests: timing information such as start time, end-to-end latency, and server latency; authentication details; concurrency information; and the sizes of the request and response messages.",
@@ -1824,7 +1824,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "4. Storage Accounts",
+          "Section": "4 Storage Accounts",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Azure Table storage is a service that stores structured NoSQL data in the cloud, providing a key/attribute store with a schema-less design. Storage Logging happens server-side and allows details for both successful and failed requests to be recorded in the storage account. These logs allow users to see the details of read, write, and delete operations against the tables. Storage Logging log entries contain the following information about individual requests: timing information such as start time, end-to-end latency, and server latency; authentication details; concurrency information; and the sizes of the request and response messages.",
@@ -1846,7 +1846,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Storage Accounts",
+          "Section": "4 Storage Accounts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "In some cases, Azure Storage sets the minimum TLS version to be version 1.0 by default. TLS 1.0 is a legacy version and has known vulnerabilities. This minimum TLS version can be configured to be later protocols such as TLS 1.2.",
@@ -1866,7 +1866,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "4. Storage Accounts",
+          "Section": "4 Storage Accounts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Cross Tenant Replication in Azure allows data to be replicated across multiple Azure tenants. While this feature can be beneficial for data sharing and availability, it also poses a significant security risk if not properly managed. Unauthorized data access, data leakage, and compliance violations are potential risks. Disabling Cross Tenant Replication ensures that data is not inadvertently replicated across different tenant boundaries without explicit authorization.",
@@ -1886,7 +1886,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "4. Storage Accounts",
+          "Section": "4 Storage Accounts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "The Azure Storage setting โ€˜Allow Blob Anonymous Accessโ€™ (aka 'allowBlobPublicAccess') controls whether anonymous access is allowed for blob data in a storage account. When this property is set to True, it enables public read access to blob data, which can be convenient for sharing data but may carry security risks. When set to False, it disallows public access to blob data, providing a more secure storage environment.",
@@ -1908,8 +1908,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Database Services",
-          "SubSection": "5.1. Azure SQL Database",
+          "Section": "5 Database Services",
+          "SubSection": "5.1 Azure SQL Database",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Enable auditing on SQL Servers.",
@@ -1931,8 +1931,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Database Services",
-          "SubSection": "5.1. Azure SQL Database",
+          "Section": "5 Database Services",
+          "SubSection": "5.1 Azure SQL Database",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Ensure that no SQL Databases allow ingress from 0.0.0.0/0 (ANY IP).",
@@ -1954,8 +1954,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Database Services",
-          "SubSection": "5.1. Azure SQL Database",
+          "Section": "5 Database Services",
+          "SubSection": "5.1 Azure SQL Database",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Transparent Data Encryption (TDE) with Customer-managed key support provides increased transparency and control over the TDE Protector, increased security with an HSM-backed external service, and promotion of separation of duties.With TDE, data is encrypted at rest with a symmetric key (called the database encryption key) stored in the database or data warehouse distribution. To protect this data encryption key (DEK) in the past, only a certificate that the Azure SQL Service managed could be used. Now, with Customer-managed key support for TDE, the DEK can be protected with an asymmetric key that is stored in the Azure Key Vault. The Azure Key Vault is a highly available and scalable cloud-based key store which offers central key management, leverages FIPS 140-2 Level 2 validated hardware security modules (HSMs), and allows separation of management of keys and data for additional security.Based on business needs or criticality of data/databases hosted on a SQL server, it is recommended that the TDE protector is encrypted by a key that is managed by the data owner (Customer-managed key).",
@@ -1977,8 +1977,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Database Services",
-          "SubSection": "5.1. Azure SQL Database",
+          "Section": "5 Database Services",
+          "SubSection": "5.1 Azure SQL Database",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Use Microsoft Entra authentication for authentication with SQL Database to manage credentials in a single place.",
@@ -2000,8 +2000,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Database Services",
-          "SubSection": "5.1. Azure SQL Database",
+          "Section": "5 Database Services",
+          "SubSection": "5.1 Azure SQL Database",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Enable Transparent Data Encryption on every SQL server.",
@@ -2023,8 +2023,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Database Services",
-          "SubSection": "5.1. Azure SQL Database",
+          "Section": "5 Database Services",
+          "SubSection": "5.1 Azure SQL Database",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "SQL Server Audit Retention should be configured to be greater than 90 days.",
@@ -2044,8 +2044,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "5. Database Services",
-          "SubSection": "5.1. Azure SQL Database",
+          "Section": "5 Database Services",
+          "SubSection": "5.1 Azure SQL Database",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Disabling public network access restricts the service from accessing public networks.",
@@ -2067,8 +2067,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Database Services",
-          "SubSection": "5.2. Azure SQL Database for PostgreSQL",
+          "Section": "5 Database Services",
+          "SubSection": "5.2 Azure SQL Database for PostgreSQL",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Enable `require_secure_transport` on `PostgreSQL flexible servers`.",
@@ -2090,8 +2090,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Database Services",
-          "SubSection": "5.2. Azure SQL Database for PostgreSQL",
+          "Section": "5 Database Services",
+          "SubSection": "5.2 Azure SQL Database for PostgreSQL",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Enable `log_checkpoints` on `PostgreSQL flexible servers`.",
@@ -2113,8 +2113,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Database Services",
-          "SubSection": "5.2. Azure SQL Database for PostgreSQL",
+          "Section": "5 Database Services",
+          "SubSection": "5.2 Azure SQL Database for PostgreSQL",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Enable connection throttling on `PostgreSQL flexible servers`.",
@@ -2136,8 +2136,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Database Services",
-          "SubSection": "5.2. Azure SQL Database for PostgreSQL",
+          "Section": "5 Database Services",
+          "SubSection": "5.2 Azure SQL Database for PostgreSQL",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Ensure `logfiles.retention_days` on `PostgreSQL flexible servers` is set to an appropriate value.",
@@ -2159,8 +2159,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Database Services",
-          "SubSection": "5.2. Azure SQL Database for PostgreSQL",
+          "Section": "5 Database Services",
+          "SubSection": "5.2 Azure SQL Database for PostgreSQL",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Disable access from Azure services to `PostgreSQL flexible server`.",
@@ -2182,8 +2182,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Database Services",
-          "SubSection": "5.2. Azure SQL Database for PostgreSQL",
+          "Section": "5 Database Services",
+          "SubSection": "5.2 Azure SQL Database for PostgreSQL",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Enable `log_connections` on `PostgreSQL single servers`.**NOTE:** This recommendation currently only applies to Single Server, not Flexible Server. See additional information below for details about the planned retirement of Azure PostgreSQL Single Server.",
@@ -2205,8 +2205,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Database Services",
-          "SubSection": "5.2. Azure SQL Database for PostgreSQL",
+          "Section": "5 Database Services",
+          "SubSection": "5.2 Azure SQL Database for PostgreSQL",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Enable `log_disconnections` on `PostgreSQL Servers`.**NOTE:** This recommendation currently only applies to Single Server, not Flexible Server. See additional information below for details about the planned retirement of Azure PostgreSQL Single Server.",
@@ -2226,8 +2226,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "5. Database Services",
-          "SubSection": "5.2. Azure SQL Database for PostgreSQL",
+          "Section": "5 Database Services",
+          "SubSection": "5.2 Azure SQL Database for PostgreSQL",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Azure Database for PostgreSQL servers should be created with 'infrastructure double encryption' enabled.**NOTE:** This recommendation currently only applies to Single Server, not Flexible Server. See additional information below for details about the planned retirement of Azure PostgreSQL Single Server.",
@@ -2249,8 +2249,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Database Services",
-          "SubSection": "5.3. Azure for MySQL",
+          "Section": "5 Database Services",
+          "SubSection": "5.3 Azure for MySQL",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Enable `require_secure_transport` on `MySQL flexible servers`.",
@@ -2270,8 +2270,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "5. Database Services",
-          "SubSection": "5.3. Azure for MySQL",
+          "Section": "5 Database Services",
+          "SubSection": "5.3 Azure for MySQL",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Ensure `tls_version` on `MySQL flexible servers` is set to use TLS version 1.2 or higher.",
@@ -2293,8 +2293,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Database Services",
-          "SubSection": "5.3. Azure for MySQL",
+          "Section": "5 Database Services",
+          "SubSection": "5.3 Azure for MySQL",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Enable `audit_log_enabled` on `MySQL flexible servers`.",
@@ -2316,8 +2316,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Database Services",
-          "SubSection": "5.3. Azure for MySQL",
+          "Section": "5 Database Services",
+          "SubSection": "5.3 Azure for MySQL",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Set `audit_log_events` to include `CONNECTION` on `MySQL flexible servers`.",
@@ -2339,8 +2339,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Database Services",
-          "SubSection": "5.4. Azure Cosmos DB",
+          "Section": "5 Database Services",
+          "SubSection": "5.4 Azure Cosmos DB",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Limiting your Cosmos DB to only communicate on whitelisted networks lowers its attack footprint.",
@@ -2362,8 +2362,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Database Services",
-          "SubSection": "5.4. Azure Cosmos DB",
+          "Section": "5 Database Services",
+          "SubSection": "5.4 Azure Cosmos DB",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Private endpoints limit network traffic to approved sources.",
@@ -2385,8 +2385,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Database Services",
-          "SubSection": "5.4. Azure Cosmos DB",
+          "Section": "5 Database Services",
+          "SubSection": "5.4 Azure Cosmos DB",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Cosmos DB can use tokens or Entra ID for client authentication which in turn will use Azure RBAC for authorization. Using Entra ID is significantly more secure because Entra ID handles the credentials and allows for MFA and centralized management, and the Azure RBAC is better integrated with the rest of Azure.",
@@ -2406,7 +2406,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "6. Logging and Monitoring",
+          "Section": "6 Logging and Monitoring",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Resource Logs capture activity to the data access plane while the Activity log is a subscription-level log for the control plane. Resource-level diagnostic logs provide insight into operations that were performed within that resource itself; for example, reading or updating a secret from a Key Vault. Currently, 95 Azure resources support Azure Monitoring (See the more information section for a complete list), including Network Security Groups, Load Balancers, Key Vault, AD, Logic Apps, and CosmosDB. The content of these logs varies by resource type.A number of back-end services were not configured to log and store Resource Logs for certain activities or for a sufficient length. It is crucial that monitoring is correctly configured to log all relevant activities and retain those logs for a sufficient length of time. Given that the mean time to detection in an enterprise is 240 days, a minimum retention period of two years is recommended.",
@@ -2426,7 +2426,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "6. Logging and Monitoring",
+          "Section": "6 Logging and Monitoring",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "The use of Basic or Free SKUs in Azure whilst cost effective have significant limitations in terms of what can be monitored and what support can be realized from Microsoft. Typically, these SKUโ€™s do not have a service SLA and Microsoft may refuse to provide support for them. Consequently Basic/Free SKUs should never be used for production workloads.",
@@ -2448,8 +2448,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Logging and Monitoring",
-          "SubSection": "6.1. Configuring Diagnostic Settings",
+          "Section": "6 Logging and Monitoring",
+          "SubSection": "6.1 Configuring Diagnostic Settings",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Enable Diagnostic settings for exporting activity logs.Diagnostic settings are available for each individual resource within a subscription. Settings should be configured for all appropriate resources for your environment.",
@@ -2471,8 +2471,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Logging and Monitoring",
-          "SubSection": "6.1. Configuring Diagnostic Settings",
+          "Section": "6 Logging and Monitoring",
+          "SubSection": "6.1 Configuring Diagnostic Settings",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "**Prerequisite**: A Diagnostic Setting must exist. If a Diagnostic Setting does not exist, the navigation and options within this recommendation will not be available. Please review the recommendation at the beginning of this subsection titled: 'Ensure that a 'Diagnostic Setting' exists.'The diagnostic setting should be configured to log the appropriate activities from the control/management plane.",
@@ -2494,8 +2494,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Logging and Monitoring",
-          "SubSection": "6.1. Configuring Diagnostic Settings",
+          "Section": "6 Logging and Monitoring",
+          "SubSection": "6.1 Configuring Diagnostic Settings",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Storage accounts with the activity log exports can be configured to use Customer Managed Keys (CMK).",
@@ -2517,8 +2517,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Logging and Monitoring",
-          "SubSection": "6.1. Configuring Diagnostic Settings",
+          "Section": "6 Logging and Monitoring",
+          "SubSection": "6.1 Configuring Diagnostic Settings",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Enable AuditEvent logging for key vault instances to ensure interactions with key vaults are logged and available.",
@@ -2540,8 +2540,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Logging and Monitoring",
-          "SubSection": "6.1. Configuring Diagnostic Settings",
+          "Section": "6 Logging and Monitoring",
+          "SubSection": "6.1 Configuring Diagnostic Settings",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Ensure that network flow logs are captured and fed into a central log analytics workspace.",
@@ -2563,8 +2563,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Logging and Monitoring",
-          "SubSection": "6.1. Configuring Diagnostic Settings",
+          "Section": "6 Logging and Monitoring",
+          "SubSection": "6.1 Configuring Diagnostic Settings",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Enable AppServiceHTTPLogs diagnostic log category for Azure App Service instances to ensure all http requests are captured and centrally logged.",
@@ -2586,8 +2586,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Logging and Monitoring",
-          "SubSection": "6.2. Monitoring using Activity Log Alerts",
+          "Section": "6 Logging and Monitoring",
+          "SubSection": "6.2 Monitoring using Activity Log Alerts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Create an activity log alert for the Create Policy Assignment event.",
@@ -2609,8 +2609,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Logging and Monitoring",
-          "SubSection": "6.2. Monitoring using Activity Log Alerts",
+          "Section": "6 Logging and Monitoring",
+          "SubSection": "6.2 Monitoring using Activity Log Alerts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Create an activity log alert for the Delete Policy Assignment event.",
@@ -2632,8 +2632,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Logging and Monitoring",
-          "SubSection": "6.2. Monitoring using Activity Log Alerts",
+          "Section": "6 Logging and Monitoring",
+          "SubSection": "6.2 Monitoring using Activity Log Alerts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Create an Activity Log Alert for the Create or Update Network Security Group event.",
@@ -2655,8 +2655,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Logging and Monitoring",
-          "SubSection": "6.2. Monitoring using Activity Log Alerts",
+          "Section": "6 Logging and Monitoring",
+          "SubSection": "6.2 Monitoring using Activity Log Alerts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Create an activity log alert for the Delete Network Security Group event.",
@@ -2678,8 +2678,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Logging and Monitoring",
-          "SubSection": "6.2. Monitoring using Activity Log Alerts",
+          "Section": "6 Logging and Monitoring",
+          "SubSection": "6.2 Monitoring using Activity Log Alerts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Create an activity log alert for the Create or Update Security Solution event.",
@@ -2701,8 +2701,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Logging and Monitoring",
-          "SubSection": "6.2. Monitoring using Activity Log Alerts",
+          "Section": "6 Logging and Monitoring",
+          "SubSection": "6.2 Monitoring using Activity Log Alerts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Create an activity log alert for the Delete Security Solution event.",
@@ -2724,8 +2724,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Logging and Monitoring",
-          "SubSection": "6.2. Monitoring using Activity Log Alerts",
+          "Section": "6 Logging and Monitoring",
+          "SubSection": "6.2 Monitoring using Activity Log Alerts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Create an activity log alert for the Create or Update SQL Server Firewall Rule event.",
@@ -2747,8 +2747,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Logging and Monitoring",
-          "SubSection": "6.2. Monitoring using Activity Log Alerts",
+          "Section": "6 Logging and Monitoring",
+          "SubSection": "6.2 Monitoring using Activity Log Alerts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Create an activity log alert for the 'Delete SQL Server Firewall Rule.",
@@ -2770,8 +2770,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Logging and Monitoring",
-          "SubSection": "6.2. Monitoring using Activity Log Alerts",
+          "Section": "6 Logging and Monitoring",
+          "SubSection": "6.2 Monitoring using Activity Log Alerts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Create an activity log alert for the Create or Update Public IP Addresses rule.",
@@ -2793,8 +2793,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Logging and Monitoring",
-          "SubSection": "6.2. Monitoring using Activity Log Alerts",
+          "Section": "6 Logging and Monitoring",
+          "SubSection": "6.2 Monitoring using Activity Log Alerts",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Create an activity log alert for the Delete Public IP Address rule.",
@@ -2816,7 +2816,7 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Logging and Monitoring",
+          "Section": "6 Logging and Monitoring",
           "SubSection": "6.3. Configuring Application Insights",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
@@ -2839,7 +2839,7 @@
       ],
       "Attributes": [
         {
-          "Section": "7. Networking",
+          "Section": "7 Networking",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Network security groups should be periodically evaluated for port misconfigurations. Where certain ports and protocols may be exposed to the Internet, they should be evaluated for necessity and restricted wherever they are not explicitly required.",
@@ -2861,7 +2861,7 @@
       ],
       "Attributes": [
         {
-          "Section": "7. Networking",
+          "Section": "7 Networking",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Network security groups should be periodically evaluated for port misconfigurations. Where certain ports and protocols may be exposed to the Internet, they should be evaluated for necessity and restricted wherever they are not explicitly required.",
@@ -2883,7 +2883,7 @@
       ],
       "Attributes": [
         {
-          "Section": "7. Networking",
+          "Section": "7 Networking",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Network security groups should be periodically evaluated for port misconfigurations. Where certain ports and protocols may be exposed to the Internet, they should be evaluated for necessity and restricted wherever they are not explicitly required.",
@@ -2905,7 +2905,7 @@
       ],
       "Attributes": [
         {
-          "Section": "7. Networking",
+          "Section": "7 Networking",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Network security groups should be periodically evaluated for port misconfigurations. Where certain ports and protocols may be exposed to the Internet, they should be evaluated for necessity and restricted wherever they are not explicitly required and narrowly configured.",
@@ -2927,7 +2927,7 @@
       ],
       "Attributes": [
         {
-          "Section": "7. Networking",
+          "Section": "7 Networking",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Network Security Group Flow Logs should be enabled and the retention period set to greater than or equal to 90 days.",
@@ -2949,7 +2949,7 @@
       ],
       "Attributes": [
         {
-          "Section": "7. Networking",
+          "Section": "7 Networking",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Enable Network Watcher for physical regions in Azure subscriptions.",
@@ -2969,7 +2969,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "7. Networking",
+          "Section": "7 Networking",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Public IP Addresses provide tenant accounts with Internet connectivity for resources contained within the tenant. During the creation of certain resources in Azure, a Public IP Address may be created. All Public IP Addresses within the tenant should be periodically reviewed for accuracy and necessity.",
@@ -2991,7 +2991,7 @@
       ],
       "Attributes": [
         {
-          "Section": "8. Virtual Machines",
+          "Section": "8 Virtual Machines",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "The Azure Bastion service allows secure remote access to Azure Virtual Machines over the Internet without exposing remote access protocol ports and services directly to the Internet. The Azure Bastion service provides this access using TLS over 443/TCP, and subscribes to hardened configurations within an organization's Azure Active Directory service.",
@@ -3013,7 +3013,7 @@
       ],
       "Attributes": [
         {
-          "Section": "8. Virtual Machines",
+          "Section": "8 Virtual Machines",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Migrate blob-based VHDs to Managed Disks on Virtual Machines to exploit the default features of this configuration.The features include: 1) Default Disk Encryption2) Resilience, as Microsoft will managed the disk storage and move around if underlying hardware goes faulty3) Reduction of costs over storage accounts",
@@ -3035,7 +3035,7 @@
       ],
       "Attributes": [
         {
-          "Section": "8. Virtual Machines",
+          "Section": "8 Virtual Machines",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Ensure that OS disks (boot volumes) and data disks (non-boot volumes) are encrypted with CMK (Customer Managed Keys).Customer Managed keys can be either ADE or Server Side Encryption (SSE).",
@@ -3057,7 +3057,7 @@
       ],
       "Attributes": [
         {
-          "Section": "8. Virtual Machines",
+          "Section": "8 Virtual Machines",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Ensure that unattached disks in a subscription are encrypted with a Customer Managed Key (CMK).",
@@ -3077,7 +3077,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "8. Virtual Machines",
+          "Section": "8 Virtual Machines",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Virtual Machine Disks and snapshots can be configured to allow access from different network resources.",
@@ -3097,7 +3097,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "8. Virtual Machines",
+          "Section": "8 Virtual Machines",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Data Access Authentication Mode provides a method of uploading or exporting Virtual Machine Disks.",
@@ -3117,7 +3117,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "8. Virtual Machines",
+          "Section": "8 Virtual Machines",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "For added security, only install organization-approved extensions on VMs.",
@@ -3139,7 +3139,7 @@
       ],
       "Attributes": [
         {
-          "Section": "8. Virtual Machines",
+          "Section": "8 Virtual Machines",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Install endpoint protection for all virtual machines.",
@@ -3159,7 +3159,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "8. Virtual Machines",
+          "Section": "8 Virtual Machines",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "**NOTE: This is a legacy recommendation. Managed Disks are encrypted by default and recommended for all new VM implementations.**VHD (Virtual Hard Disks) are stored in blob storage and are the old-style disks that were attached to Virtual Machines. The blob VHD was then leased to the VM. By default, storage accounts are not encrypted, and Microsoft Defender will then recommend that the OS disks should be encrypted. Storage accounts can be encrypted as a whole using PMK or CMK. This should be turned on for storage accounts containing VHDs.",
@@ -3181,7 +3181,7 @@
       ],
       "Attributes": [
         {
-          "Section": "8. Virtual Machines",
+          "Section": "8 Virtual Machines",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Verify identities without MFA that can log in to a privileged virtual machine using separate login credentials. An adversary can leverage the access to move laterally and perform actions with the virtual machine's managed identity. Make sure the virtual machine only has necessary permissions, and revoke the admin-level permissions according to the least privileges principal",
@@ -3203,7 +3203,7 @@
       ],
       "Attributes": [
         {
-          "Section": "8. Virtual Machines",
+          "Section": "8 Virtual Machines",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "When **Secure Boot** and **vTPM** are enabled together, they provide a strong foundation for protecting your VM from boot attacks. For example, if an attacker attempts to replace the bootloader with a malicious version, Secure Boot will prevent the VM from booting. If the attacker is able to bypass Secure Boot and install a malicious bootloader, vTPM can be used to detect the intrusion and alert you.",
@@ -3225,7 +3225,7 @@
       ],
       "Attributes": [
         {
-          "Section": "9. AppService",
+          "Section": "9 AppService",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Azure App Service allows apps to run under both HTTP and HTTPS by default. Apps can be accessed by anyone using non-secure HTTP links by default. Non-secure HTTP requests can be restricted and all HTTP requests redirected to the secure HTTPS port. It is recommended to enforce HTTPS-only traffic.",
@@ -3247,7 +3247,7 @@
       ],
       "Attributes": [
         {
-          "Section": "9. AppService",
+          "Section": "9 AppService",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Azure App Service Authentication is a feature that can prevent anonymous HTTP requests from reaching a Web Application or authenticate those with tokens before they reach the app. If an anonymous request is received from a browser, App Service will redirect to a logon page. To handle the logon process, a choice from a set of identity providers can be made, or a custom authentication mechanism can be implemented.",
@@ -3269,7 +3269,7 @@
       ],
       "Attributes": [
         {
-          "Section": "9. AppService",
+          "Section": "9 AppService",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "By default, App Services can be deployed over FTP. If FTP is required for an essential deployment workflow, FTPS should be required for FTP login for all App Services.If FTPS is not expressly required for the App, the recommended setting is `Disabled.`",
@@ -3291,7 +3291,7 @@
       ],
       "Attributes": [
         {
-          "Section": "9. AppService",
+          "Section": "9 AppService",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "The TLS (Transport Layer Security) protocol secures transmission of data over the internet using standard encryption technology. Encryption should be set with the latest version of TLS. App service allows TLS 1.2 by default, which is the recommended TLS level by industry standards such as PCI DSS.",
@@ -3313,7 +3313,7 @@
       ],
       "Attributes": [
         {
-          "Section": "9. AppService",
+          "Section": "9 AppService",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Managed service identity in App Service provides more security by eliminating secrets from the app, such as credentials in the connection strings. When registering an App Service with Entra ID, the app will connect to other Azure services securely without the need for usernames and passwords.",
@@ -3333,7 +3333,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "9. AppService",
+          "Section": "9 AppService",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Basic Authentication provides the ability to create identities and authentication for an App Service without a centralized Identity Provider. For a more effective, capable, and secure solution for Identity, Authentication, Authorization, and Accountability, a centralized Identity Provider such as Entra ID is strongly advised.",
@@ -3355,7 +3355,7 @@
       ],
       "Attributes": [
         {
-          "Section": "9. AppService",
+          "Section": "9 AppService",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Periodically, older versions of PHP may be deprecated and no longer supported. Using a supported version of PHP for app services is recommended to avoid potential unpatched vulnerabilities.",
@@ -3377,7 +3377,7 @@
       ],
       "Attributes": [
         {
-          "Section": "9. AppService",
+          "Section": "9 AppService",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Periodically, older versions of Python may be deprecated and no longer supported. Using a supported version of Python for app services is recommended to avoid potential unpatched vulnerabilities.",
@@ -3399,7 +3399,7 @@
       ],
       "Attributes": [
         {
-          "Section": "9. AppService",
+          "Section": "9 AppService",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Periodically, older versions of Java may be deprecated and no longer supported. Using a supported version of Java for app services is recommended to avoid potential unpatched vulnerabilities.",
@@ -3421,7 +3421,7 @@
       ],
       "Attributes": [
         {
-          "Section": "9. AppService",
+          "Section": "9 AppService",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Periodically, newer versions are released for HTTP either due to security flaws or to include additional functionality. Using the latest HTTP version for apps to take advantage of security fixes, if any, and/or new functionalities of the newer version.",
@@ -3441,7 +3441,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "9. AppService",
+          "Section": "9 AppService",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Azure Key Vault will store multiple types of sensitive information such as encryption keys, certificate thumbprints, and Managed Identity Credentials. Access to these 'Secrets' can be controlled through granular permissions.",
@@ -3461,7 +3461,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "9. AppService",
+          "Section": "9 AppService",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Remote Debugging allows Azure App Service to be debugged in real-time directly on the Azure environment. When remote debugging is enabled, it opens a communication channel that could potentially be exploited by unauthorized users if not properly secured.",
@@ -3481,7 +3481,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "10",
+          "Section": "10 Miscellaneous",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Resource Manager Locks provide a way for administrators to lock down Azure resources to prevent deletion of, or modifications to, a resource. These locks sit outside of the Role Based Access Controls (RBAC) hierarchy and, when applied, will place restrictions on the resource for all users. These locks are very useful when there is an important resource in a subscription that users should not be able to delete or change. Locks can help prevent accidental and malicious changes or deletion.",
diff --git a/prowler/compliance/azure/prowler_threatscore_azure.json b/prowler/compliance/azure/prowler_threatscore_azure.json
new file mode 100644
index 0000000000..12ad818a27
--- /dev/null
+++ b/prowler/compliance/azure/prowler_threatscore_azure.json
@@ -0,0 +1,1317 @@
+{
+  "Framework": "ProwlerThreatScore",
+  "Version": "1.0",
+  "Provider": "Azure",
+  "Description": "Prowler ThreatScore Compliance Framework for Azure ensures that the Azure subscription 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 Security Defaults is enabled on Microsoft Entra ID",
+      "Checks": [
+        "entra_security_defaults_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "Security Defaults enabled on Entra ID",
+          "Section": "1. IAM",
+          "SubSection": "1.1 Authentication",
+          "AttributeDescription": "Microsoft Entra ID Security Defaults offer preconfigured security settings designed to protect organizations from common identity attacks at no additional cost. These settings enforce basic security measures such as MFA registration, risk-based authentication prompts, and blocking legacy authentication clients that do not support MFA. Security defaults are available to all organizations and can be enabled via the Azure portal to strengthen authentication security.",
+          "AdditionalInformation": "Security defaults provide built-in protections to reduce the risk of unauthorized access until organizations configure their own identity security policies. By requiring MFA, blocking weak authentication methods, and adapting authentication challenges based on risk factors, these settings create a stronger security foundation without additional licensing requirements.",
+          "LevelOfRisk": 4
+        }
+      ]
+    },
+    {
+      "Id": "1.1.2",
+      "Description": "Ensure that 'Multi-Factor Auth Status' is 'Enabled' for all Privileged Users",
+      "Checks": [
+        "entra_privileged_user_has_mfa"
+      ],
+      "Attributes": [
+        {
+          "Title": "MFA enabled for privileged users",
+          "Section": "1. IAM",
+          "SubSection": "1.1 Authentication",
+          "AttributeDescription": "[IMPORTANT] If your organization has Microsoft Entra ID licensing (included in Microsoft 365 E3, E5, F5, or EM&S E3/E5) and can use Conditional Access, you may skip this section and proceed to Conditional Access. Enable multi-factor authentication (MFA) for all users, roles, and groups with write access to Azure resources. This includes both custom-created roles and built-in roles such as: Service Co-Administrators, Subscription Owners, Contributors",
+          "AdditionalInformation": "MFA enhances security by requiring two or more authentication factors, ensuring that only authorized users gain access. It significantly reduces the risk of unauthorized access, credential theft, and privilege escalation. By implementing MFA, attackers must compromise multiple authentication mechanisms, making breaches far more difficult and improving overall Azure resource security.",
+          "LevelOfRisk": 4
+        }
+      ]
+    },
+    {
+      "Id": "1.1.3",
+      "Description": "Ensure that 'Multi-Factor Auth Status' is 'Enabled' for all Non-Privileged Users",
+      "Checks": [
+        "entra_non_privileged_user_has_mfa"
+      ],
+      "Attributes": [
+        {
+          "Title": "MFA enabled for non-privileged users",
+          "Section": "1. IAM",
+          "SubSection": "1.1 Authentication",
+          "AttributeDescription": "[IMPORTANT] If your organization has Microsoft Entra ID licensing (included in Microsoft 365 E3, E5, F5, or EM&S E3/E5) and can use Conditional Access, you may skip this section and proceed to Conditional Access. Enable multi-factor authentication (MFA) for all non-privileged users to enhance security and prevent unauthorized access.",
+          "AdditionalInformation": "MFA strengthens authentication by requiring at least two verification factors, making it significantly harder for attackers to gain access using stolen credentials. Even if one authentication factor is compromised, an additional layer of security reduces the risk of unauthorized account access, enhancing overall identity and access management security.",
+          "LevelOfRisk": 4
+        }
+      ]
+    },
+    {
+      "Id": "1.1.4",
+      "Description": "Ensure Multi-factor Authentication is Required for Windows Azure Service Management API",
+      "Checks": [
+        "entra_conditional_access_policy_require_mfa_for_management_api"
+      ],
+      "Attributes": [
+        {
+          "Title": "MFA Required for Windows Azure Service Management API",
+          "Section": "1. IAM",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "1.1.5",
+      "Description": "Ensure Multi-factor Authentication is Required to access Microsoft Admin Portals",
+      "Checks": [
+        "defender_ensure_defender_for_server_is_on"
+      ],
+      "Attributes": [
+        {
+          "Title": "MFA Required to access Microsoft Admin Portals",
+          "Section": "1. IAM",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "1.1.6",
+      "Description": "Ensure only MFA enabled identities can access privileged Virtual Machine",
+      "Checks": [
+        "entra_user_with_vm_access_has_mfa"
+      ],
+      "Attributes": [
+        {
+          "Title": "Only MFA enabled identities can access privileged Virtual Machine",
+          "Section": "1. IAM",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "1.2.1",
+      "Description": "Ensure that '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.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": 4
+        }
+      ]
+    },
+    {
+      "Id": "1.2.2",
+      "Description": "Ensure fewer than 5 users have global administrator assignment",
+      "Checks": [
+        "entra_global_admin_in_less_than_five_users"
+      ],
+      "Attributes": [
+        {
+          "Title": "Fewer than 5 users have global administrator assignment",
+          "Section": "1. IAM",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "1.2.3",
+      "Description": "Ensure That 'Guest users access restrictions' is set to 'Guest user access is restricted to properties and memberships of their own directory objects'",
+      "Checks": [
+        "entra_policy_guest_users_access_restrictions"
+      ],
+      "Attributes": [
+        {
+          "Title": "Guest users access restrictions' is set to 'Guest user access is restricted to properties and memberships of their own directory objects'",
+          "Section": "1. IAM",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "1.2.4",
+      "Description": "Ensure `User consent for applications` is set to `Do not allow user consent` ",
+      "Checks": [
+        "entra_policy_restricts_user_consent_for_apps"
+      ],
+      "Attributes": [
+        {
+          "Title": "`User consent for applications` is set to `Do not allow user consent` ",
+          "Section": "1. IAM",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "1.2.5",
+      "Description": "Ensure โ€˜User consent for applicationsโ€™ Is Set To โ€˜Allow for Verified Publishersโ€™",
+      "Checks": [
+        "entra_policy_user_consent_for_verified_apps"
+      ],
+      "Attributes": [
+        {
+          "Title": "โ€˜User consent for applicationsโ€™ Is Set To โ€˜Allow for Verified Publishersโ€™",
+          "Section": "1. IAM",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "1.2.6",
+      "Description": "Ensure Trusted Locations Are Defined",
+      "Checks": [
+        "entra_trusted_named_locations_exists"
+      ],
+      "Attributes": [
+        {
+          "Title": "Trusted Locations Are Defined",
+          "Section": "1. IAM",
+          "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": 2
+        }
+      ]
+    },
+    {
+      "Id": "1.3.1",
+      "Description": "Ensure that 'Users can create security groups in Azure portals, API or PowerShell' is set to 'No'",
+      "Checks": [
+        "entra_policy_default_users_cannot_create_security_groups"
+      ],
+      "Attributes": [
+        {
+          "Title": "Users can create security groups in Azure portals, API or PowerShell' is set to 'No'",
+          "Section": "1. IAM",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "1.3.2",
+      "Description": "Ensure That โ€˜Users Can Register Applicationsโ€™ Is Set to โ€˜Noโ€™",
+      "Checks": [
+        "entra_policy_ensure_default_user_cannot_create_apps"
+      ],
+      "Attributes": [
+        {
+          "Title": "โ€˜Users Can Register Applicationsโ€™ Is Set to โ€˜Noโ€™",
+          "Section": "1. IAM",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "1.3.3",
+      "Description": "Ensure that 'Guest invite restrictions' is set to 'Only users assigned to specific admin roles can invite guest users'",
+      "Checks": [
+        "entra_policy_guest_invite_only_for_admin_roles"
+      ],
+      "Attributes": [
+        {
+          "Title": "Guest invite restrictions' is set to 'Only users assigned to specific admin roles can invite guest users'",
+          "Section": "1. IAM",
+          "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": 2
+        }
+      ]
+    },
+    {
+      "Id": "1.3.4",
+      "Description": "Ensure that 'Users can create Microsoft 365 groups in Azure portals, API or PowerShell' is set to 'No'",
+      "Checks": [
+        "entra_users_cannot_create_microsoft_365_groups"
+      ],
+      "Attributes": [
+        {
+          "Title": "Users can create Microsoft 365 groups in Azure portals, API or PowerShell' is set to 'No'",
+          "Section": "1. IAM",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "2.1.1",
+      "Description": "Ensure that RDP access from the Internet is evaluated and restricted",
+      "Checks": [
+        "network_rdp_internet_access_restricted"
+      ],
+      "Attributes": [
+        {
+          "Title": "RDP access from the Internet is evaluated and restricted",
+          "Section": "2. Attack Surface",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "2.1.2",
+      "Description": "Ensure that SSH access from the Internet is evaluated and restricted",
+      "Checks": [
+        "network_ssh_internet_access_restricted"
+      ],
+      "Attributes": [
+        {
+          "Title": "SSH access from the Internet is evaluated and restricted",
+          "Section": "2. Attack Surface",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "2.1.3",
+      "Description": "Ensure that UDP access from the Internet is evaluated and restricted",
+      "Checks": [
+        "network_udp_internet_access_restricted"
+      ],
+      "Attributes": [
+        {
+          "Title": "UDP access from the Internet is evaluated and restricted",
+          "Section": "2. Attack Surface",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "2.1.4",
+      "Description": "Ensure that HTTP(S) access from the Internet is evaluated and restricted",
+      "Checks": [
+        "network_http_internet_access_restricted"
+      ],
+      "Attributes": [
+        {
+          "Title": "HTTP(S) access from the Internet is evaluated and restricted",
+          "Section": "2. Attack Surface",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "2.1.5",
+      "Description": "Ensure an Azure Bastion Host Exists",
+      "Checks": [
+        "network_bastion_host_exists"
+      ],
+      "Attributes": [
+        {
+          "Title": "Ensure Azure Bastion Host Exists",
+          "Section": "2. Attack Surface",
+          "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": 2
+        }
+      ]
+    },
+    {
+      "Id": "2.2.1",
+      "Description": "Ensure that Microsoft Entra authentication is Configured for SQL Servers",
+      "Checks": [
+        "sqlserver_azuread_administrator_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "Microsoft Entra authentication is Configured for SQL Servers",
+          "Section": "2. Attack Surface",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "2.2.2",
+      "Description": "Ensure 'Allow public access from any Azure service within Azure to this server' for PostgreSQL flexible server is disabled ",
+      "Checks": [
+        "postgresql_flexible_server_allow_access_services_disabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "Allow public access from any Azure service within Azure to this server' for PostgreSQL flexible server is disabled ",
+          "Section": "2. Attack Surface",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "2.2.3",
+      "Description": "Ensure That 'Firewalls & Networks' Is Limited to Use Selected Networks Instead of All Networks",
+      "Checks": [
+        "cosmosdb_account_firewall_use_selected_networks"
+      ],
+      "Attributes": [
+        {
+          "Title": "Firewalls & Networks' Is Limited to Use Selected Networks Instead of All Networks",
+          "Section": "2. Attack Surface",
+          "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": 2
+        }
+      ]
+    },
+    {
+      "Id": "2.2.4",
+      "Description": "Ensure That Private Endpoints Are Used Where Possible",
+      "Checks": [
+        "cosmosdb_account_use_private_endpoints"
+      ],
+      "Attributes": [
+        {
+          "Title": "Private Endpoints Are Used",
+          "Section": "2. Attack Surface",
+          "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": 2
+        }
+      ]
+    },
+    {
+      "Id": "2.2.5",
+      "Description": "Use Entra ID Client Authentication and Azure RBAC where possible",
+      "Checks": [
+        "cosmosdb_account_use_aad_and_rbac"
+      ],
+      "Attributes": [
+        {
+          "Title": "Entra ID Client Authentication and Azure RBAC where possible",
+          "Section": "2. Attack Surface",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "2.2.6",
+      "Description": "Ensure that 'Public Network Access' is 'Disabled' for storage accounts",
+      "Checks": [
+        "storage_blob_public_access_level_is_disabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "Public Network Access' is 'Disabled' for storage accounts",
+          "Section": "2. Attack Surface",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "2.2.7",
+      "Description": "Ensure Default Network Access Rule for Storage Accounts is Set to Deny",
+      "Checks": [
+        "storage_default_network_access_rule_is_denied"
+      ],
+      "Attributes": [
+        {
+          "Title": "Default Network Access Rule for Storage Accounts is Set to Deny",
+          "Section": "2. Attack Surface",
+          "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": 2
+        }
+      ]
+    },
+    {
+      "Id": "2.2.8",
+      "Description": "Ensure 'Allow Azure services on the trusted services list to access this storage account' is Enabled for Storage Account Access",
+      "Checks": [
+        "storage_ensure_azure_services_are_trusted_to_access_is_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "Allow Azure services on the trusted services list to access this storage account' is Enabled for Storage Account Access",
+          "Section": "2. Attack Surface",
+          "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": 2
+        }
+      ]
+    },
+    {
+      "Id": "2.2.9",
+      "Description": "Ensure Private Endpoints are used to access Storage Accounts",
+      "Checks": [
+        "storage_ensure_private_endpoints_in_storage_accounts"
+      ],
+      "Attributes": [
+        {
+          "Title": "Private Endpoint used to access Storage Accounts",
+          "Section": "2. Attack Surface",
+          "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": 2
+        }
+      ]
+    },
+    {
+      "Id": "2.2.10",
+      "Description": "Ensure no Azure SQL Databases allow ingress from 0.0.0.0/0",
+      "Checks": [
+        "sqlserver_unrestricted_inbound_access"
+      ],
+      "Attributes": [
+        {
+          "Title": "Azure SQL Databases do not allow ingress from 0.0.0.0/0",
+          "Section": "2. Attack Surface",
+          "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": 5
+        }
+      ]
+    },
+    {
+      "Id": "2.3.1",
+      "Description": "Ensure App Service Authentication is set up for apps in Azure App Service",
+      "Checks": [
+        "app_ensure_auth_is_set_up"
+      ],
+      "Attributes": [
+        {
+          "Title": "App Service Authentication is set up for apps in Azure App Service",
+          "Section": "2. Attack Surface",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "2.3.2",
+      "Description": "Ensure 'FTP State' is set to 'FTPS Only' or 'Disabled' ",
+      "Checks": [
+        "app_ftp_deployment_disabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "FTP State' is set to 'FTPS Only' or 'Disabled' ",
+          "Section": "2. Attack Surface",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "3.1.1",
+      "Description": "Ensure server parameter 'log_checkpoints' is set to 'ON' for PostgreSQL flexible server",
+      "Checks": [
+        "postgresql_flexible_server_log_checkpoints_on"
+      ],
+      "Attributes": [
+        {
+          "Title": "log_checkpoints' is set to 'ON' for PostgreSQL flexible server",
+          "Section": "3. Logging and Monitoring",
+          "SubSection": "3.1 Logging",
+          "AttributeDescription": "Enable log_checkpoints on PostgreSQL flexible servers to log checkpoint activity, generating query and error logs that aid in monitoring and troubleshooting database performance.",
+          "AdditionalInformation": "Logging checkpoints helps track database activity, errors, and performance issues, providing valuable insights for troubleshooting and optimization. While transaction logs remain inaccessible, query and error logs allow identification and resolution of configuration errors and inefficiencies, improving database reliability and performance.",
+          "LevelOfRisk": 3
+        }
+      ]
+    },
+    {
+      "Id": "3.1.2",
+      "Description": "Ensure server parameter 'connection_throttle.enable' is set to 'ON' for PostgreSQL flexible server",
+      "Checks": [
+        "postgresql_flexible_server_connection_throttling_on"
+      ],
+      "Attributes": [
+        {
+          "Title": "connection_throttle.enable' is set to 'ON' for PostgreSQL flexible server",
+          "Section": "3. Logging and Monitoring",
+          "SubSection": "3.1 Logging",
+          "AttributeDescription": "Enable connection throttling on PostgreSQL flexible servers to regulate concurrent connections and generate logs for monitoring and troubleshooting.",
+          "AdditionalInformation": "Connection throttling helps prevent Denial of Service (DoS) attacks by limiting excessive connections that could exhaust resources. It also protects against system failures or degraded performance caused by high user loads. Query and error logs provide insights into connection issues, enabling faster troubleshooting and performance optimization.",
+          "LevelOfRisk": 3
+        }
+      ]
+    },
+    {
+      "Id": "3.1.3",
+      "Description": "Ensure server parameter 'log_connections' is set to 'ON' for PostgreSQL single server",
+      "Checks": [
+        "postgresql_flexible_server_log_connections_on"
+      ],
+      "Attributes": [
+        {
+          "Title": "log_connections' is set to 'ON' for PostgreSQL single server",
+          "Section": "3. Logging and Monitoring",
+          "SubSection": "3.1 Logging",
+          "AttributeDescription": "Enable log_connections on PostgreSQL Single Servers to record connection attempts and authentication events for security monitoring and auditing. (Note: This recommendation applies only to Single Server, as Azure PostgreSQL Single Server is planned for retirement.)",
+          "AdditionalInformation": "Logging connection attempts helps detect unauthorized access, failed authentication attempts, and potential security threats. These logs provide valuable insights for troubleshooting, auditing, and identifying suspicious activities, enhancing overall database security and monitoring.",
+          "LevelOfRisk": 3
+        }
+      ]
+    },
+    {
+      "Id": "3.1.4",
+      "Description": "Ensure server parameter 'log_disconnections' is set to 'ON' for PostgreSQL single server",
+      "Checks": [
+        "postgresql_flexible_server_log_disconnections_on"
+      ],
+      "Attributes": [
+        {
+          "Title": "log_disconnections' is set to 'ON' for PostgreSQL single server",
+          "Section": "3. Logging and Monitoring",
+          "SubSection": "3.1 Logging",
+          "AttributeDescription": "Enable log_disconnections on PostgreSQL Servers to record session termination events, including session duration. (Note: This recommendation applies only to Single Server, as Azure PostgreSQL Single Server is planned for retirement.)",
+          "AdditionalInformation": "Logging disconnections provides visibility into session activity and duration, helping to analyze user behavior, detect anomalies, and troubleshoot performance issues. These logs contribute to audit trails, security monitoring, and database performance optimization.",
+          "LevelOfRisk": 3
+        }
+      ]
+    },
+    {
+      "Id": "3.1.5",
+      "Description": "Ensure server parameter 'audit_log_enabled' is set to 'ON' for MySQL flexible server",
+      "Checks": [
+        "mysql_flexible_server_audit_log_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "audit_log_enabled' is set to 'ON' for MySQL flexible server",
+          "Section": "3. Logging and Monitoring",
+          "SubSection": "3.1 Logging",
+          "AttributeDescription": "Enable audit_log_enabled on MySQL flexible servers to capture logs for connection attempts, DDL/DML activity, and other database events for security and monitoring purposes.",
+          "AdditionalInformation": "Logging database activity helps detect unauthorized access, troubleshoot issues, and analyze performance bottlenecks. Enabling audit logs enhances security visibility, compliance monitoring, and incident response by providing valuable insights into database operations.",
+          "LevelOfRisk": 3
+        }
+      ]
+    },
+    {
+      "Id": "3.1.6",
+      "Description": "Ensure server parameter 'audit_log_events' has 'CONNECTION' set for MySQL flexible server",
+      "Checks": [
+        "mysql_flexible_server_audit_log_connection_activated"
+      ],
+      "Attributes": [
+        {
+          "Title": "audit_log_events' has 'CONNECTION' set for MySQL flexible server",
+          "Section": "3. Logging and Monitoring",
+          "SubSection": "3.1 Logging",
+          "AttributeDescription": "Configure audit_log_events on MySQL flexible servers to include CONNECTION events, ensuring that successful and failed connection attempts are logged.",
+          "AdditionalInformation": "Logging CONNECTION events provides visibility into authentication attempts, helping to detect unauthorized access, troubleshoot issues, and optimize database performance. These logs are essential for security monitoring, compliance, and identifying potential misconfigurations or attack attempts.",
+          "LevelOfRisk": 3
+        }
+      ]
+    },
+    {
+      "Id": "3.1.7",
+      "Description": "Ensure that logging for Azure Key Vault is 'Enabled' ",
+      "Checks": [
+        "keyvault_logging_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "Logging for Azure Keyvault enabled",
+          "Section": "3. Logging and Monitoring",
+          "SubSection": "3.1 Logging",
+          "AttributeDescription": "Enable AuditEvent logging for Azure Key Vault to track and log interactions with keys, certificates, and other sensitive information.",
+          "AdditionalInformation": "Logging Key Vault access events provides an audit trail that helps monitor who accessed the vault, when, and how. This enhances security, compliance, and incident response by ensuring logs are stored in a designated Azure Storage account or Log Analytics workspace, allowing centralized monitoring across multiple Key Vaults.",
+          "LevelOfRisk": 3
+        }
+      ]
+    },
+    {
+      "Id": "3.1.8",
+      "Description": "Ensure that Network Security Group Flow logs are captured and sent to Log Analytics",
+      "Checks": [
+        "network_flow_log_captured_sent"
+      ],
+      "Attributes": [
+        {
+          "Title": "Network Security Group Flow logs are captured and sent to Log Analytics",
+          "Section": "3. Logging and Monitoring",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "3.1.9",
+      "Description": "Ensure that logging for Azure AppService 'HTTP logs' is enabled",
+      "Checks": [
+        "app_http_logs_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "Logging for Azure AppService 'HTTP logs' is enabled",
+          "Section": "3. Logging and Monitoring",
+          "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": 1
+        }
+      ]
+    },
+    {
+      "Id": "3.2.1",
+      "Description": "Ensure that 'Auditing' Retention is 'greater than 90 days'",
+      "Checks": [
+        "sqlserver_auditing_retention_90_days"
+      ],
+      "Attributes": [
+        {
+          "Title": "Auditing' Retention is 'greater than 90 days'",
+          "Section": "3. Logging and Monitoring",
+          "SubSection": "3.2 Retention",
+          "AttributeDescription": "Configure SQL Server Audit Retention to retain logs for more than 90 days to ensure long-term visibility into database activity and security events.",
+          "AdditionalInformation": "Maintaining audit logs for over 90 days helps detect anomalies, security breaches, and unauthorized access. Longer retention periods allow organizations to analyze historical data, support compliance requirements, and strengthen forensic investigations.",
+          "LevelOfRisk": 3
+        }
+      ]
+    },
+    {
+      "Id": "3.2.1",
+      "Description": "Ensure that Network Security Group Flow Log retention period is 'greater than 90 days'",
+      "Checks": [
+        "network_flow_log_more_than_90_days"
+      ],
+      "Attributes": [
+        {
+          "Title": "Network Security Group Flow Log retention period is 'greater than 90 days'",
+          "Section": "3. Logging and Monitoring",
+          "SubSection": "3.2 Retention",
+          "AttributeDescription": "Enable Network Security Group (NSG) Flow Logs and configure the retention period to at least 90 days to capture and store IP traffic data for security monitoring and analysis.",
+          "AdditionalInformation": "NSG Flow Logs provide visibility into network traffic, helping detect anomalies, unauthorized access, and potential security breaches. Retaining logs for at least 90 days ensures that historical data is available for incident investigation, compliance, and forensic analysis, strengthening overall network security monitoring.",
+          "LevelOfRisk": 3
+        }
+      ]
+    },
+    {
+      "Id": "3.2.2",
+      "Description": "Ensure server parameter 'logfiles.retention_days' is greater than 3 days for PostgreSQL flexible server",
+      "Checks": [
+        "postgresql_flexible_server_log_retention_days_greater_3"
+      ],
+      "Attributes": [
+        {
+          "Title": "logfiles.retention_days' is greater than 3 days for PostgreSQL flexible server",
+          "Section": "3. Logging and Monitoring",
+          "SubSection": "3.2 Retention",
+          "AttributeDescription": "Ensure that logfiles.retention_days on PostgreSQL flexible servers is set to an appropriate value to maintain access to historical logs for monitoring and troubleshooting.",
+          "AdditionalInformation": "Setting an appropriate log retention period ensures that query and error logs are available for diagnosing configuration issues, troubleshooting errors, and optimizing performance. Retaining logs for a sufficient duration supports security analysis, compliance requirements, and operational debugging while preventing unnecessary storage consumption.",
+          "LevelOfRisk": 3
+        }
+      ]
+    },
+    {
+      "Id": "3.2.3",
+      "Description": "Ensure that a 'Diagnostic Setting' exists for Subscription Activity Logs",
+      "Checks": [
+        "monitor_diagnostic_settings_exists"
+      ],
+      "Attributes": [
+        {
+          "Title": "Diagnostic Setting' exists for Subscription Activity Logs",
+          "Section": "3. Logging and Monitoring",
+          "SubSection": "3.2 Retention",
+          "AttributeDescription": "Enable Diagnostic Settings to export activity logs for all appropriate resources within a subscription, ensuring long-term visibility into security and operational events.",
+          "AdditionalInformation": "By default, logs are retained for only 90 days. Configuring diagnostic settings allows logs to be exported and stored for extended periods, enabling security analysis, compliance monitoring, and forensic investigations within an Azure subscription.",
+          "LevelOfRisk": 3
+        }
+      ]
+    },
+    {
+      "Id": "3.3.1",
+      "Description": "Ensure that 'Auditing' is set to 'On' ",
+      "Checks": [
+        "sqlserver_auditing_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "Auditing' is set to 'On'",
+          "Section": "3. Logging and Monitoring",
+          "SubSection": "3.3 Monitoring",
+          "AttributeDescription": "Enable auditing on Azure SQL Servers to track and log database events for security and compliance purposes.",
+          "AdditionalInformation": "Auditing at the server level ensures that all existing and newly created databases inherit auditing policies, providing consistent monitoring across the SQL environment. It does not override database-level auditing policies but complements them. Audit logs are stored in Azure Storage, helping organizations maintain regulatory compliance, monitor database activity, and detect anomalies that may indicate security threats or operational concerns.",
+          "LevelOfRisk": 3
+        }
+      ]
+    },
+    {
+      "Id": "3.3.10",
+      "Description": "Ensure that Activity Log Alert exists for Delete SQL Server Firewall Rule",
+      "Checks": [
+        "monitor_alert_delete_sqlserver_fr"
+      ],
+      "Attributes": [
+        {
+          "Title": "Activity Log Alert exists for Delete SQL Server Firewall Rule",
+          "Section": "3. Logging and Monitoring",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "3.3.11",
+      "Description": "Ensure that Activity Log Alert exists for Create or Update Public IP Address rule",
+      "Checks": [
+        "monitor_alert_create_update_public_ip_address_rule"
+      ],
+      "Attributes": [
+        {
+          "Title": "Activity Log Alert exists for Create or Update Public IP Address rule",
+          "Section": "3. Logging and Monitoring",
+          "SubSection": "3.3 Monitoring",
+          "AttributeDescription": "Create an Activity Log Alert for the Create or Update Public IP Address event to monitor changes in public IP configurations.",
+          "AdditionalInformation": "Tracking public IP address modifications provides visibility into network access changes, helping detect unauthorized or misconfigured public exposure. Timely alerts enable faster detection and response to potential security risks, ensuring a controlled and secure network environment.",
+          "LevelOfRisk": 4
+        }
+      ]
+    },
+    {
+      "Id": "3.3.12",
+      "Description": "Ensure that Activity Log Alert exists for Delete Public IP Address rule",
+      "Checks": [
+        "monitor_alert_delete_public_ip_address_rule"
+      ],
+      "Attributes": [
+        {
+          "Title": "Activity Log Alert exists for Delete Public IP Address rule",
+          "Section": "3. Logging and Monitoring",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "3.3.13",
+      "Description": "Ensure Application Insights are Configured",
+      "Checks": [
+        "appinsights_ensure_is_configured"
+      ],
+      "Attributes": [
+        {
+          "Title": "Application Insights are Configured",
+          "Section": "3. Logging and Monitoring",
+          "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": 1
+        }
+      ]
+    },
+    {
+      "Id": "3.3.14",
+      "Description": "Ensure that Network Watcher is 'Enabled' for Azure Regions that are in use",
+      "Checks": [
+        "network_watcher_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "Network Watcher 'Enabled' for used Regions",
+          "Section": "3. Logging and Monitoring",
+          "SubSection": "3.3 Monitoring",
+          "AttributeDescription": "Enable Network Watcher for all Azure regions within your subscription to monitor and diagnose network activity.",
+          "AdditionalInformation": "Network Watcher provides network diagnostic and visualization tools that help organizations analyze traffic, troubleshoot connectivity issues, and detect anomalies. Enabling it enhances network visibility, security monitoring, and operational insights across Azure environments.",
+          "LevelOfRisk": 3
+        }
+      ]
+    },
+    {
+      "Id": "3.3.15",
+      "Description": "Ensure that Endpoint Protection for all Virtual Machines is installed",
+      "Checks": [
+        "defender_assessments_vm_endpoint_protection_installed"
+      ],
+      "Attributes": [
+        {
+          "Title": "Endpoint Protection for all Virtual Machines is installed",
+          "Section": "3. Logging and Monitoring",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "3.3.16",
+      "Description": "Ensure that Microsoft Defender Recommendation for 'Apply system updates' status is 'Completed'",
+      "Checks": [
+        "defender_ensure_system_updates_are_applied"
+      ],
+      "Attributes": [
+        {
+          "Title": "Defender Recommendation for 'Apply system updates' status is 'Completed'",
+          "Section": "3. Logging and Monitoring",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "3.3.17",
+      "Description": "Ensure that Microsoft Cloud Security Benchmark policies are not set to 'Disabled'",
+      "Checks": [
+        "policy_ensure_asc_enforcement_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "Microsoft Cloud Security Benchmark policies are not set to 'Disabled'",
+          "Section": "3. Logging and Monitoring",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "3.3.18",
+      "Description": "Ensure That 'All users with the following roles' is set to 'Owner'",
+      "Checks": [
+        "defender_ensure_notify_emails_to_owners"
+      ],
+      "Attributes": [
+        {
+          "Title": "All users with the following roles' is set to 'Owner'",
+          "Section": "3. Logging and Monitoring",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "3.3.19",
+      "Description": "Ensure 'Additional email addresses' is Configured with a Security Contact Email",
+      "Checks": [
+        "defender_additional_email_configured_with_a_security_contact"
+      ],
+      "Attributes": [
+        {
+          "Title": "Additional email addresses' is Configured with a Security Contact Email",
+          "Section": "3. Logging and Monitoring",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "3.3.2",
+      "Description": "Ensure Diagnostic Setting captures appropriate categories",
+      "Checks": [
+        "monitor_diagnostic_setting_with_appropriate_categories"
+      ],
+      "Attributes": [
+        {
+          "Title": "Diagnostic Setting captures appropriate categories",
+          "Section": "3. Logging and Monitoring",
+          "SubSection": "3.3 Monitoring",
+          "AttributeDescription": "Ensure that Diagnostic Settings are configured to log relevant control and management plane activities for enhanced visibility and security monitoring. (Note: A Diagnostic Setting must exist for this configuration to be available.)",
+          "AdditionalInformation": "Diagnostic settings determine how logs are exported and stored. Capturing logs from the control and management plane enables proper alerting, monitoring, and analysis of administrative actions, helping to detect unauthorized changes and security threats.",
+          "LevelOfRisk": 3
+        }
+      ]
+    },
+    {
+      "Id": "3.3.20",
+      "Description": "Ensure That 'Notify about alerts with the following severity' is Set to 'High'",
+      "Checks": [
+        "defender_ensure_notify_alerts_severity_is_high"
+      ],
+      "Attributes": [
+        {
+          "Title": "Notify about alerts with the following severity' is Set to 'High'",
+          "Section": "3. Logging and Monitoring",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "3.3.21",
+      "Description": "Ensure That Microsoft Defender for DNS Is Set To 'On'",
+      "Checks": [
+        "defender_ensure_defender_for_dns_is_on"
+      ],
+      "Attributes": [
+        {
+          "Title": "Defender for DNS Is Set To 'On'",
+          "Section": "3. Logging and Monitoring",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "3.3.3",
+      "Description": "Ensure that Activity Log Alert exists for Create Policy Assignment",
+      "Checks": [
+        "monitor_alert_create_policy_assignment"
+      ],
+      "Attributes": [
+        {
+          "Title": "Activity Log Alert exists for Create Policy Assignment",
+          "Section": "3. Logging and Monitoring",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "3.3.4",
+      "Description": "Ensure that Activity Log Alert exists for Delete Policy Assignment",
+      "Checks": [
+        "monitor_alert_delete_policy_assignment"
+      ],
+      "Attributes": [
+        {
+          "Title": "Activity Log Alert exists for Delete Policy Assignment",
+          "Section": "3. Logging and Monitoring",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "3.3.5",
+      "Description": "Ensure that Activity Log Alert exists for Create or Update Network Security Group",
+      "Checks": [
+        "monitor_alert_create_update_nsg"
+      ],
+      "Attributes": [
+        {
+          "Title": "Activity Log Alert exists for Create or Update Network Security Group",
+          "Section": "3. Logging and Monitoring",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "3.3.6",
+      "Description": "Ensure that Activity Log Alert exists for Delete Network Security Group",
+      "Checks": [
+        "monitor_alert_delete_nsg"
+      ],
+      "Attributes": [
+        {
+          "Title": "Activity Log Alert exists for Delete Network Security Group",
+          "Section": "3. Logging and Monitoring",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "3.3.7",
+      "Description": "Ensure that Activity Log Alert exists for Create or Update Security Solution",
+      "Checks": [
+        "monitor_alert_create_update_security_solution"
+      ],
+      "Attributes": [
+        {
+          "Title": "Activity Log Alert exists for Create or Update Security Solution",
+          "Section": "3. Logging and Monitoring",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "3.3.8",
+      "Description": "Ensure that Activity Log Alert exists for Delete Security Solution",
+      "Checks": [
+        "monitor_alert_delete_security_solution"
+      ],
+      "Attributes": [
+        {
+          "Title": "Activity Log Alert exists for Delete Security Solution",
+          "Section": "3. Logging and Monitoring",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "3.3.9",
+      "Description": "Ensure that Activity Log Alert exists for Create or Update SQL Server Firewall Rule",
+      "Checks": [
+        "monitor_alert_create_update_sqlserver_fr"
+      ],
+      "Attributes": [
+        {
+          "Title": "Activity Log Alert exists for Create or Update SQL Server Firewall Rule",
+          "Section": "3. Logging and Monitoring",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "4.1.1",
+      "Description": "Ensure server parameter 'require_secure_transport' is set to 'ON' for PostgreSQL flexible server",
+      "Checks": [
+        "postgresql_flexible_server_enforce_ssl_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "require_secure_transport' is set to 'ON' for PostgreSQL flexible server",
+          "Section": "4. Encryption",
+          "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": 2
+        }
+      ]
+    },
+    {
+      "Id": "4.1.2",
+      "Description": "Ensure server parameter 'require_secure_transport' is set to 'ON' for MySQL flexible server",
+      "Checks": [
+        "postgresql_flexible_server_enforce_ssl_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "require_secure_transport' is set to 'ON' for MySQL flexible server",
+          "Section": "4. Encryption",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "4.1.3",
+      "Description": "Ensure the 'Minimum TLS version' for storage accounts is set to 'Version 1.2'",
+      "Checks": [
+        "storage_ensure_minimum_tls_version_12"
+      ],
+      "Attributes": [
+        {
+          "Title": "Minimum TLS version' for storage accounts is set to 'Version 1.2'",
+          "Section": "4. Encryption",
+          "SubSection": "4.1 In-Transit",
+          "AttributeDescription": "Ensure that the minimum TLS version for Azure Storage is set to TLS 1.2 or higher to mitigate security vulnerabilities associated with older TLS versions.",
+          "AdditionalInformation": "TLS 1.0 is outdated and has known security vulnerabilities that can expose data in transit to attacks and interception. Upgrading to TLS 1.2 or later enhances encryption security, ensuring secure communication between clients and Azure Storage while reducing the risk of data compromise.",
+          "LevelOfRisk": 2
+        }
+      ]
+    },
+    {
+      "Id": "4.1.4",
+      "Description": "Ensure 'HTTPS Only' is set to `On`",
+      "Checks": [
+        "app_ensure_http_is_redirected_to_https"
+      ],
+      "Attributes": [
+        {
+          "Title": "`HTTPS Only' is set to `On`",
+          "Section": "4. Encryption",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "4.1.5",
+      "Description": "Ensure Web App is using the latest version of TLS encryption",
+      "Checks": [
+        "app_minimum_tls_version_12"
+      ],
+      "Attributes": [
+        {
+          "Title": "Web App is using the latest version of TLS encryption",
+          "Section": "4. Encryption",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "4.1.6",
+      "Description": "Ensure that 'HTTP20enabled' is set to 'true'",
+      "Checks": [
+        "app_ensure_using_http20"
+      ],
+      "Attributes": [
+        {
+          "Title": "HTTP20enabled' is set to 'true'",
+          "Section": "4. Encryption",
+          "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": 1
+        }
+      ]
+    },
+    {
+      "Id": "4.2.1",
+      "Description": "Ensure Storage for Critical Data are Encrypted with Customer Managed Keys (CMK)",
+      "Checks": [
+        "storage_ensure_encryption_with_customer_managed_keys"
+      ],
+      "Attributes": [
+        {
+          "Title": "Storage for Critical Data are Encrypted CMK",
+          "Section": "4. Encryption",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "4.2.2",
+      "Description": "Ensure SQL server's Transparent Data Encryption (TDE) protector is encrypted with Customer-managed key",
+      "Checks": [
+        "sqlserver_tde_encrypted_with_cmk"
+      ],
+      "Attributes": [
+        {
+          "Title": "SQL server's TDE protector is encrypted with CMK",
+          "Section": "4. Encryption",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "4.2.3",
+      "Description": "Ensure that 'Data encryption' is set to 'On' on a SQL Database",
+      "Checks": [
+        "sqlserver_tde_encryption_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "Data encryption' is set to 'On' on a SQL Database",
+          "Section": "4. Encryption",
+          "SubSection": "4.2 At-Rest",
+          "AttributeDescription": "Enable Transparent Data Encryption (TDE) on all Azure SQL Servers to ensure real-time encryption and decryption of databases, backups, and transaction logs at rest. TDE operates seamlessly without requiring modifications to applications.",
+          "AdditionalInformation": "TDE helps protect Azure SQL Databases from unauthorized access and malicious activity by encrypting data at rest. This ensures that database files, backups, and logs remain secure, reducing the risk of data breaches while maintaining operational transparency.",
+          "LevelOfRisk": 3
+        }
+      ]
+    },
+    {
+      "Id": "4.2.4",
+      "Description": "Ensure the storage account containing the container with activity logs is encrypted with Customer Managed Key (CMK)",
+      "Checks": [
+        "monitor_storage_account_with_activity_logs_cmk_encrypted"
+      ],
+      "Attributes": [
+        {
+          "Title": "Storage account with logs encrypted with CMK",
+          "Section": "4. Encryption",
+          "SubSection": "4.2 At-Rest",
+          "AttributeDescription": "Configure storage accounts used for activity log exports to use Customer Managed Keys (CMK) for enhanced security and access control.",
+          "AdditionalInformation": "Using CMKs for log storage provides additional confidentiality controls, ensuring that only users with read access to the storage account and explicit decrypt permissions can access the logs. This enhances data security by restricting unauthorized access and strengthening compliance with encryption and access management policies.",
+          "LevelOfRisk": 3
+        }
+      ]
+    }
+  ]
+}
diff --git a/prowler/compliance/azure/soc2_azure.json b/prowler/compliance/azure/soc2_azure.json
new file mode 100644
index 0000000000..ccbf57acfe
--- /dev/null
+++ b/prowler/compliance/azure/soc2_azure.json
@@ -0,0 +1,623 @@
+{
+  "Framework": "SOC2",
+  "Version": "",
+  "Provider": "Azure",
+  "Description": "System and Organization Controls (SOC), defined by the American Institute of Certified Public Accountants (AICPA), is the name of a set of reports that's produced during an audit. It's intended for use by service organizations (organizations that provide information systems as a service to other organizations) to issue validated reports of internal controls over those information systems to the users of those services. The reports focus on controls grouped into five categories known as Trust Service Principles.",
+  "Requirements": [
+    {
+      "Id": "cc_1_3",
+      "Name": "CC1.3 COSO Principle 3: Management establishes, with board oversight, structures, reporting lines, and appropriate authorities and responsibilities in the pursuit of objectives",
+      "Description": "Considers All Structures of the Entity - Management and the board of directors consider the multiple structures used (including operating units, legal entities, geographic distribution, and outsourced service providers) to support the achievement of objectives. Establishes Reporting Lines - Management designs and evaluates lines of reporting for each entity structure to enable execution of authorities and responsibilities and flow of information to manage the activities of the entity. Defines, Assigns, and Limits Authorities and Responsibilities - Management and the board of directors delegate authority, define responsibilities, and use appropriate processes and technology to assign responsibility and segregate duties as necessary at the various levels of the organization. Additional points of focus specifically related to all engagements using the trust services criteria: Addresses Specific Requirements When Defining Authorities and Responsibilitiesโ€”Management and the board of directors consider requirements relevant to security, availability, processing integrity, confidentiality, and privacy when defining authorities and responsibilities. Considers Interactions With External Parties When Establishing Structures, Reporting Lines, Authorities, and Responsibilities โ€” Management and the board of directors consider the need for the entity to interact with and monitor the activities of external parties when establishing structures, reporting lines, authorities, and responsibilities.",
+      "Attributes": [
+        {
+          "ItemId": "cc_1_3",
+          "Section": "CC1.0 - Common Criteria Related to Control Environment",
+          "Service": "entra",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "entra_conditional_access_policy_require_mfa_for_management_api",
+        "entra_global_admin_in_less_than_five_users",
+        "entra_non_privileged_user_has_mfa",
+        "entra_policy_default_users_cannot_create_security_groups",
+        "entra_policy_ensure_default_user_cannot_create_apps",
+        "entra_policy_ensure_default_user_cannot_create_tenants",
+        "entra_policy_guest_invite_only_for_admin_roles",
+        "entra_policy_guest_users_access_restrictions",
+        "entra_policy_restricts_user_consent_for_apps",
+        "entra_policy_user_consent_for_verified_apps",
+        "entra_privileged_user_has_mfa",
+        "entra_security_defaults_enabled",
+        "entra_trusted_named_locations_exists",
+        "entra_user_with_vm_access_has_mfa",
+        "entra_users_cannot_create_microsoft_365_groups"
+      ]
+    },
+    {
+      "Id": "cc_2_1",
+      "Name": "CC2.1 COSO Principle 13: The entity obtains or generates and uses relevant, quality information to support the functioning of internal control",
+      "Description": "Identifies Information Requirements - A process is in place to identify the information required and expected to support the functioning of the other components of internal control and the achievement of the entityโ€™s objectives. Captures Internal and External Sources of Data - Information systems capture internal and external sources of data. Processes Relevant Data Into Information - Information systems process and transform relevant data into information. Maintains Quality Throughout Processing - Information systems produce information that is timely, current, accurate, complete, accessible, protected, verifiable, and retained. Information is reviewed to assess its relevance in supporting the internal control components.",
+      "Attributes": [
+        {
+          "ItemId": "cc_2_1",
+          "Section": "CC2.0 - Common Criteria Related to Communication and Information",
+          "Service": "monitor",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "monitor_alert_create_policy_assignment",
+        "monitor_alert_create_update_nsg",
+        "monitor_alert_create_update_public_ip_address_rule",
+        "monitor_alert_create_update_security_solution",
+        "monitor_alert_create_update_sqlserver_fr",
+        "monitor_alert_delete_nsg",
+        "monitor_alert_delete_policy_assignment",
+        "monitor_alert_delete_public_ip_address_rule",
+        "monitor_alert_delete_security_solution",
+        "monitor_alert_delete_sqlserver_fr"
+      ]
+    },
+    {
+      "Id": "cc_3_1",
+      "Name": "CC3.1 COSO Principle 6: The entity specifies objectives with sufficient clarity to enable the identification and assessment of risks relating to objectives",
+      "Description": "Operations Objectives: Reflects Management's Choices - Operations objectives reflect management's choices about structure, industry considerations, and performance of the entity. Considers Tolerances for Risk - Management considers the acceptable levels of variation relative to the achievement of operations objectives. External Financial Reporting Objectives: Complies With Applicable Accounting Standards - Financial reporting objectives are consistent with accounting principles suitable and available for that entity. The accounting principles selected are appropriate in the circumstances. External Nonfinancial Reporting Objectives: Complies With Externally Established Frameworks - Management establishes objectives consistent with laws and regulations or standards and frameworks of recognized external organizations. Reflects Entity Activities - External reporting reflects the underlying transactions and events within a range of acceptable limits. Considers the Required Level of Precisionโ€”Management reflects the required level of precision and accuracy suitable for user needs and based on criteria established by third parties in nonfinancial reporting. Internal Reporting Objectives: Reflects Management's Choices - Internal reporting provides management with accurate and complete information regarding management's choices and information needed in managing the entity. Considers the Required Level of Precisionโ€”Management reflects the required level of precision and accuracy suitable for user needs in nonfinancial reporting objectives and materiality within financial reporting objectives. Reflects Entity Activitiesโ€”Internal reporting reflects the underlying transactions and events within a range of acceptable limits. Compliance Objectives: Reflects External Laws and Regulations - Laws and regulations establish minimum standards of conduct, which the entity integrates into compliance objectives. Considers Tolerances for Risk - Management considers the acceptable levels of variation relative to the achievement of operations objectives. Additional point of focus specifically related to all engagements using the trust services criteria: Establishes Sub-objectives to Support Objectivesโ€”Management identifies sub-objectives related to security, availability, processing integrity, confidentiality, and privacy to support the achievement of the entityโ€™s objectives related to reporting, operations, and compliance.",
+      "Attributes": [
+        {
+          "ItemId": "cc_3_1",
+          "Section": "CC3.0 - Common Criteria Related to Risk Assessment",
+          "Service": "azure",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "defender_ensure_defender_for_app_services_is_on",
+        "defender_ensure_defender_for_arm_is_on",
+        "defender_ensure_defender_for_azure_sql_databases_is_on",
+        "defender_ensure_defender_for_containers_is_on",
+        "defender_ensure_defender_for_cosmosdb_is_on",
+        "defender_ensure_defender_for_databases_is_on",
+        "defender_ensure_defender_for_dns_is_on",
+        "defender_ensure_defender_for_keyvault_is_on",
+        "defender_ensure_defender_for_os_relational_databases_is_on",
+        "defender_ensure_defender_for_server_is_on",
+        "defender_ensure_defender_for_sql_servers_is_on",
+        "defender_ensure_defender_for_storage_is_on",
+        "defender_ensure_iot_hub_defender_is_on",
+        "defender_ensure_mcas_is_enabled",
+        "defender_ensure_notify_alerts_severity_is_high",
+        "defender_ensure_notify_emails_to_owners",
+        "defender_ensure_system_updates_are_applied",
+        "defender_ensure_wdatp_is_enabled",
+        "sqlserver_microsoft_defender_enabled"
+      ]
+    },
+    {
+      "Id": "cc_3_2",
+      "Name": "CC3.2 COSO Principle 7: The entity identifies risks to the achievement of its objectives across the entity and analyzes risks as a basis for determining how the risks should be managed",
+      "Description": "Includes Entity, Subsidiary, Division, Operating Unit, and Functional Levels - The entity identifies and assesses risk at the entity, subsidiary, division, operating unit, and functional levels relevant to the achievement of objectives. Analyzes Internal and External Factors - Risk identification considers both internal and external factors and their impact on the achievement of objectives. Involves Appropriate Levels of Management - The entity puts into place effective risk assessment mechanisms that involve appropriate levels of management. Estimates Significance of Risks Identified - Identified risks are analyzed through a process that includes estimating the potential significance of the risk. Determines How to Respond to Risks - Risk assessment includes considering how the risk should be managed and whether to accept, avoid, reduce, or share the risk. Additional points of focus specifically related to all engagements using the trust services criteria: Identifies and Assesses Criticality of Information Assets and Identifies Threats and Vulnerabilities - The entity's risk identification and assessment process includes (1) identifying information assets, including physical devices and systems, virtual devices, software, data and data flows, external information systems, and organizational roles; (2) assessing the criticality of those information assets; (3) identifying the threats to the assets from intentional (including malicious) and unintentional acts and environmental events; and (4) identifying the vulnerabilities of the identified assets.",
+      "Attributes": [
+        {
+          "ItemId": "cc_3_2",
+          "Section": "CC3.0 - Common Criteria Related to Risk Assessment",
+          "Service": "azure",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "defender_additional_email_configured_with_a_security_contact",
+        "defender_assessments_vm_endpoint_protection_installed",
+        "defender_auto_provisioning_log_analytics_agent_vms_on",
+        "defender_auto_provisioning_vulnerabilty_assessments_machines_on",
+        "defender_container_images_resolved_vulnerabilities",
+        "defender_container_images_scan_enabled",
+        "defender_ensure_defender_for_app_services_is_on",
+        "defender_ensure_defender_for_arm_is_on",
+        "defender_ensure_defender_for_azure_sql_databases_is_on",
+        "defender_ensure_defender_for_containers_is_on",
+        "defender_ensure_defender_for_cosmosdb_is_on",
+        "defender_ensure_defender_for_databases_is_on",
+        "defender_ensure_defender_for_dns_is_on",
+        "defender_ensure_defender_for_keyvault_is_on",
+        "defender_ensure_defender_for_os_relational_databases_is_on",
+        "defender_ensure_defender_for_server_is_on",
+        "defender_ensure_defender_for_sql_servers_is_on",
+        "defender_ensure_defender_for_storage_is_on",
+        "defender_ensure_iot_hub_defender_is_on",
+        "defender_ensure_mcas_is_enabled",
+        "defender_ensure_notify_alerts_severity_is_high",
+        "defender_ensure_notify_emails_to_owners",
+        "defender_ensure_system_updates_are_applied",
+        "defender_ensure_wdatp_is_enabled",
+        "sqlserver_microsoft_defender_enabled"
+      ]
+    },
+    {
+      "Id": "cc_3_3",
+      "Name": "CC3.3 COSO Principle 8: The entity considers the potential for fraud in assessing risks to the achievement of objectives",
+      "Description": "Considers Various Types of Fraud - The assessment of fraud considers fraudulent reporting, possible loss of assets, and corruption resulting from the various ways that fraud and misconduct can occur. Assesses Incentives and Pressures - The assessment of fraud risks considers incentives and pressures. Assesses Opportunities - The assessment of fraud risk considers opportunities for unauthorized acquisition,use, or disposal of assets, altering the entityโ€™s reporting records, or committing other inappropriate acts. Assesses Attitudes and Rationalizations - The assessment of fraud risk considers how management and other personnel might engage in or justify inappropriate actions. Additional point of focus specifically related to all engagements using the trust services criteria: Considers the Risks Related to the Use of IT and Access to Information - The assessment of fraud risks includes consideration of threats and vulnerabilities that arise specifically from the use of IT and access to information.",
+      "Attributes": [
+        {
+          "ItemId": "cc_3_3",
+          "Section": "CC3.0 - Common Criteria Related to Risk Assessment",
+          "Service": "azure",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "aks_clusters_created_with_private_nodes",
+        "app_function_identity_without_admin_privileges",
+        "containerregistry_uses_private_link",
+        "cosmosdb_account_use_private_endpoints",
+        "entra_non_privileged_user_has_mfa",
+        "entra_privileged_user_has_mfa",
+        "entra_user_with_vm_access_has_mfa",
+        "keyvault_private_endpoints",
+        "monitor_storage_account_with_activity_logs_is_private",
+        "storage_ensure_private_endpoints_in_storage_accounts"
+      ]
+    },
+    {
+      "Id": "cc_4_2",
+      "Name": "CC4.2 COSO Principle 17: The entity evaluates and communicates internal control deficiencies in a timely manner to those parties responsible for taking corrective action, including senior management and the board of directors, as appropriate",
+      "Description": "Assesses Results - Management and the board of directors, as appropriate, assess results of ongoing and separate evaluations. Communicates Deficiencies - Deficiencies are communicated to parties responsible for taking corrective action and to senior management and the board of directors, as appropriate. Monitors Corrective Action - Management tracks whether deficiencies are remedied on a timely basis.",
+      "Attributes": [
+        {
+          "ItemId": "cc_4_2",
+          "Section": "CC4.0 - Monitoring Activities",
+          "Service": "azure",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "defender_additional_email_configured_with_a_security_contact",
+        "defender_assessments_vm_endpoint_protection_installed",
+        "defender_auto_provisioning_log_analytics_agent_vms_on",
+        "defender_auto_provisioning_vulnerabilty_assessments_machines_on",
+        "defender_container_images_resolved_vulnerabilities",
+        "defender_container_images_scan_enabled",
+        "defender_ensure_defender_for_app_services_is_on",
+        "defender_ensure_defender_for_arm_is_on",
+        "defender_ensure_defender_for_azure_sql_databases_is_on",
+        "defender_ensure_defender_for_containers_is_on",
+        "defender_ensure_defender_for_cosmosdb_is_on",
+        "defender_ensure_defender_for_databases_is_on",
+        "defender_ensure_defender_for_dns_is_on",
+        "defender_ensure_defender_for_keyvault_is_on",
+        "defender_ensure_defender_for_os_relational_databases_is_on",
+        "defender_ensure_defender_for_server_is_on",
+        "defender_ensure_defender_for_sql_servers_is_on",
+        "defender_ensure_defender_for_storage_is_on",
+        "defender_ensure_iot_hub_defender_is_on",
+        "defender_ensure_mcas_is_enabled",
+        "defender_ensure_notify_alerts_severity_is_high",
+        "defender_ensure_notify_emails_to_owners",
+        "defender_ensure_system_updates_are_applied",
+        "defender_ensure_wdatp_is_enabled",
+        "sqlserver_microsoft_defender_enabled"
+      ]
+    },
+    {
+      "Id": "cc_5_2",
+      "Name": "CC5.2 COSO Principle 11: The entity also selects and develops general control activities over technology to support the achievement of objectives",
+      "Description": "Determines Dependency Between the Use of Technology in Business Processes and Technology General Controls - Management understands and determines the dependency and linkage between business processes, automated control activities, and technology general controls. Establishes Relevant Technology Infrastructure Control Activities - Management selects and develops control activities over the technology infrastructure, which are designed and implemented to help ensure the completeness, accuracy, and availability of technology processing. Establishes Relevant Security Management Process Controls Activities - Management selects and develops control activities that are designed and implemented to restrict technology access rights to authorized users commensurate with their job responsibilities and to protect the entityโ€™s assets from external threats. Establishes Relevant Technology Acquisition, Development, and Maintenance Process Control Activities - Management selects and develops control activities over the acquisition, development, and maintenance of technology and its infrastructure to achieve managementโ€™s objectives.",
+      "Attributes": [
+        {
+          "ItemId": "cc_5_2",
+          "Section": "CC5.0 - Control Activities",
+          "Service": "monitor",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "monitor_alert_create_policy_assignment",
+        "monitor_alert_create_update_nsg",
+        "monitor_alert_create_update_public_ip_address_rule",
+        "monitor_alert_create_update_security_solution",
+        "monitor_alert_create_update_sqlserver_fr",
+        "monitor_alert_delete_nsg",
+        "monitor_alert_delete_policy_assignment",
+        "monitor_alert_delete_public_ip_address_rule",
+        "monitor_alert_delete_security_solution",
+        "monitor_alert_delete_sqlserver_fr"
+      ]
+    },
+    {
+      "Id": "cc_6_1",
+      "Name": "CC6.1 The entity implements logical access security software, infrastructure, and architectures over protected information assets to protect them from security events to meet the entity's objectives",
+      "Description": "Identifies and Manages the Inventory of Information Assets - The entity identifies, inventories, classifies, and manages information assets. Restricts Logical Access - Logical access to information assets, including hardware, data (at-rest, during processing, or in transmission), software, administrative authorities, mobile devices, output, and offline system components is restricted through the use of access control software and rule sets. Identifies and Authenticates Users - Persons, infrastructure and software are identified and authenticated prior to accessing information assets, whether locally or remotely. Considers Network Segmentation - Network segmentation permits unrelated portions of the entity's information system to be isolated from each other. Manages Points of Access - Points of access by outside entities and the types of data that flow through the points of access are identified, inventoried, and managed. The types of individuals and systems using each point of access are identified, documented, and managed. Restricts Access to Information Assets - Combinations of data classification, separate data structures, port restrictions, access protocol restrictions, user identification, and digital certificates are used to establish access control rules for information assets. Manages Identification and Authentication - Identification and authentication requirements are established, documented, and managed for individuals and systems accessing entity information, infrastructure and software. Manages Credentials for Infrastructure and Software - New internal and external infrastructure and software are registered, authorized, and documented prior to being granted access credentials and implemented on the network or access point. Credentials are removed and access is disabled when access is no longer required or the infrastructure and software are no longer in use. Uses Encryption to Protect Data - The entity uses encryption to supplement other measures used to protect data-at-rest, when such protections are deemed appropriate based on assessed risk. Protects Encryption Keys - Processes are in place to protect encryption keys during generation, storage, use, and destruction.",
+      "Attributes": [
+        {
+          "ItemId": "cc_6_1",
+          "Section": "CC6.0 - Logical and Physical Access",
+          "Service": "azure",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "aks_clusters_public_access_disabled",
+        "app_function_not_publicly_accessible",
+        "containerregistry_not_publicly_accessible",
+        "network_public_ip_shodan",
+        "storage_blob_public_access_level_is_disabled"
+      ]
+    },
+    {
+      "Id": "cc_6_2",
+      "Name": "CC6.2 Prior to issuing system credentials and granting system access, the entity registers and authorizes new internal and external users whose access is administered by the entity",
+      "Description": "Prior to issuing system credentials and granting system access, the entity registers and authorizes new internal and external users whose access is administered by the entity. For those users whose access is administered by the entity, user system credentials are removed when user access is no longer authorized. Controls Access Credentials to Protected Assets - Information asset access credentials are created based on an authorization from the system's asset owner or authorized custodian. Removes Access to Protected Assets When Appropriate - Processes are in place to remove credential access when an individual no longer requires such access. Reviews Appropriateness of Access Credentials - The appropriateness of access credentials is reviewed on a periodic basis for unnecessary and inappropriate individuals with credentials.",
+      "Attributes": [
+        {
+          "ItemId": "cc_6_2",
+          "Section": "CC6.0 - Logical and Physical Access",
+          "Service": "azure",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "mysql_flexible_server_minimum_tls_version_12",
+        "mysql_flexible_server_ssl_connection_enabled",
+        "postgresql_flexible_server_enforce_ssl_enabled",
+        "sqlserver_recommended_minimal_tls_version",
+        "sqlserver_tde_encrypted_with_cmk",
+        "sqlserver_tde_encryption_enabled",
+        "sqlserver_unrestricted_inbound_access",
+        "storage_secure_transfer_required_is_enabled"
+      ]
+    },
+    {
+      "Id": "cc_6_3",
+      "Name": "CC6.3 The entity authorizes, modifies, or removes access to data, software, functions, and other protected information assets based on roles, responsibilities, or the system design and changes, giving consideration to the concepts of least privilege and segregation of duties, to meet the entityโ€™s objectives",
+      "Description": "Creates or Modifies Access to Protected Information Assets - Processes are in place to create or modify access to protected information assets based on authorization from the assetโ€™s owner. Removes Access to Protected Information Assets - Processes are in place to remove access to protected information assets when an individual no longer requires access. Uses Role-Based Access Controls - Role-based access control is utilized to support segregation of incompatible functions.",
+      "Attributes": [
+        {
+          "ItemId": "cc_6_3",
+          "Section": "CC6.0 - Logical and Physical Access",
+          "Service": "entra",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "entra_non_privileged_user_has_mfa",
+        "entra_privileged_user_has_mfa",
+        "entra_user_with_vm_access_has_mfa"
+      ]
+    },
+    {
+      "Id": "cc_6_6",
+      "Name": "CC6.6 The entity implements logical access security measures to protect against threats from sources outside its system boundaries",
+      "Description": "Restricts Access โ€” The types of activities that can occur through a communication channel (for example, FTP site, router port) are restricted. Protects Identification and Authentication Credentials โ€” Identification and authentication credentials are protected during transmission outside its system boundaries. Requires Additional Authentication or Credentials โ€” Additional authentication information or credentials are required when accessing the system from outside its boundaries. Implements Boundary Protection Systems โ€” Boundary protection systems (for example, firewalls, demilitarized zones, and intrusion detection systems) are implemented to protect external access points from attempts and unauthorized access and are monitored to detect such attempts.",
+      "Attributes": [
+        {
+          "ItemId": "cc_6_6",
+          "Section": "CC6.0 - Logical and Physical Access",
+          "Service": "azure",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "network_http_internet_access_restricted",
+        "network_rdp_internet_access_restricted",
+        "network_ssh_internet_access_restricted",
+        "network_udp_internet_access_restricted",
+        "mysql_flexible_server_ssl_connection_enabled",
+        "postgresql_flexible_server_enforce_ssl_enabled",
+        "app_minimum_tls_version_12",
+        "mysql_flexible_server_minimum_tls_version_12",
+        "sqlserver_recommended_minimal_tls_version",
+        "storage_ensure_minimum_tls_version_12"
+      ]
+    },
+    {
+      "Id": "cc_6_7",
+      "Name": "CC6.7 The entity restricts the transmission, movement, and removal of information to authorized internal and external users and processes, and protects it during transmission, movement, or removal to meet the entityโ€™s objectives",
+      "Description": "Restricts the Ability to Perform Transmission - Data loss prevention processes and technologies are used to restrict ability to authorize and execute transmission, movement and removal of information. Uses Encryption Technologies or Secure Communication Channels to Protect Data - Encryption technologies or secured communication channels are used to protect transmission of data and other communications beyond connectivity access points. Protects Removal Media - Encryption technologies and physical asset protections are used for removable media (such as USB drives and back-up tapes), as appropriate. Protects Mobile Devices - Processes are in place to protect mobile devices (such as laptops, smart phones and tablets) that serve as information assets.",
+      "Attributes": [
+        {
+          "ItemId": "cc_6_7",
+          "Section": "CC6.0 - Logical and Physical Access",
+          "Service": "azure",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "app_minimum_tls_version_12",
+        "monitor_storage_account_with_activity_logs_cmk_encrypted",
+        "sqlserver_tde_encrypted_with_cmk",
+        "sqlserver_tde_encryption_enabled",
+        "storage_ensure_encryption_with_customer_managed_keys",
+        "storage_infrastructure_encryption_is_enabled",
+        "storage_secure_transfer_required_is_enabled",
+        "vm_ensure_attached_disks_encrypted_with_cmk",
+        "vm_ensure_unattached_disks_encrypted_with_cmk"
+      ]
+    },
+    {
+      "Id": "cc_6_8",
+      "Name": "CC6.8 The entity implements controls to prevent or detect and act upon the introduction of unauthorized or malicious software to meet the entityโ€™s objectives",
+      "Description": "Restricts Application and Software Installation - The ability to install applications and software is restricted to authorized individuals. Detects Unauthorized Changes to Software and Configuration Parameters - Processes are in place to detect changes to software and configuration parameters that may be indicative of unauthorized or malicious software. Uses a Defined Change Control Process - A management-defined change control process is used for the implementation of software. Uses Antivirus and Anti-Malware Software - Antivirus and anti-malware software is implemented and maintained to provide for the interception or detection and remediation of malware. Scans Information Assets from Outside the Entity for Malware and Other Unauthorized Software - Procedures are in place to scan information assets that have been transferred or returned to the entityโ€™s custody for malware and other unauthorized software and to remove any items detected prior to its implementation on the network.",
+      "Attributes": [
+        {
+          "ItemId": "cc_6_8",
+          "Section": "CC6.0 - Logical and Physical Access",
+          "Service": "azure",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "defender_additional_email_configured_with_a_security_contact",
+        "defender_assessments_vm_endpoint_protection_installed",
+        "defender_auto_provisioning_log_analytics_agent_vms_on",
+        "defender_auto_provisioning_vulnerabilty_assessments_machines_on",
+        "defender_container_images_resolved_vulnerabilities",
+        "defender_container_images_scan_enabled",
+        "defender_ensure_defender_for_app_services_is_on",
+        "defender_ensure_defender_for_arm_is_on",
+        "defender_ensure_defender_for_azure_sql_databases_is_on",
+        "defender_ensure_defender_for_containers_is_on",
+        "defender_ensure_defender_for_cosmosdb_is_on",
+        "defender_ensure_defender_for_databases_is_on",
+        "defender_ensure_defender_for_dns_is_on",
+        "defender_ensure_defender_for_keyvault_is_on",
+        "defender_ensure_defender_for_os_relational_databases_is_on",
+        "defender_ensure_defender_for_server_is_on",
+        "defender_ensure_defender_for_sql_servers_is_on",
+        "defender_ensure_defender_for_storage_is_on",
+        "defender_ensure_iot_hub_defender_is_on",
+        "defender_ensure_mcas_is_enabled",
+        "defender_ensure_notify_alerts_severity_is_high",
+        "defender_ensure_notify_emails_to_owners",
+        "defender_ensure_system_updates_are_applied",
+        "defender_ensure_wdatp_is_enabled",
+        "sqlserver_microsoft_defender_enabled"
+      ]
+    },
+    {
+      "Id": "cc_7_1",
+      "Name": "CC7.1 To meet its objectives, the entity uses detection and monitoring procedures to identify (1) changes to configurations that result in the introduction of new vulnerabilities, and (2) susceptibilities to newly discovered vulnerabilities",
+      "Description": "Uses Defined Configuration Standards - Management has defined configuration standards. Monitors Infrastructure and Software - The entity monitors infrastructure and software for noncompliance with the standards, which could threaten the achievement of the entity's objectives. Implements Change-Detection Mechanisms - The IT system includes a change-detection mechanism (for example, file integrity monitoring tools) to alert personnel to unauthorized modifications of critical system files, configuration files, or content files. Detects Unknown or Unauthorized Components - Procedures are in place to detect the introduction of unknown or unauthorized components. Conducts Vulnerability Scans - The entity conducts vulnerability scans designed to identify potential vulnerabilities or misconfigurations on a periodic basis and after any significant change in the environment and takes action to remediate identified deficiencies on a timely basis.",
+      "Attributes": [
+        {
+          "ItemId": "cc_7_1",
+          "Section": "CC7.0 - System Operations",
+          "Service": "azure",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "defender_additional_email_configured_with_a_security_contact",
+        "defender_assessments_vm_endpoint_protection_installed",
+        "defender_auto_provisioning_log_analytics_agent_vms_on",
+        "defender_auto_provisioning_vulnerabilty_assessments_machines_on",
+        "defender_container_images_resolved_vulnerabilities",
+        "defender_container_images_scan_enabled",
+        "defender_ensure_defender_for_app_services_is_on",
+        "defender_ensure_defender_for_arm_is_on",
+        "defender_ensure_defender_for_azure_sql_databases_is_on",
+        "defender_ensure_defender_for_containers_is_on",
+        "defender_ensure_defender_for_cosmosdb_is_on",
+        "defender_ensure_defender_for_databases_is_on",
+        "defender_ensure_defender_for_dns_is_on",
+        "defender_ensure_defender_for_keyvault_is_on",
+        "defender_ensure_defender_for_os_relational_databases_is_on",
+        "defender_ensure_defender_for_server_is_on",
+        "defender_ensure_defender_for_sql_servers_is_on",
+        "defender_ensure_defender_for_storage_is_on",
+        "defender_ensure_iot_hub_defender_is_on",
+        "defender_ensure_mcas_is_enabled",
+        "defender_ensure_notify_alerts_severity_is_high",
+        "defender_ensure_notify_emails_to_owners",
+        "defender_ensure_system_updates_are_applied",
+        "defender_ensure_wdatp_is_enabled",
+        "sqlserver_microsoft_defender_enabled"
+      ]
+    },
+    {
+      "Id": "cc_7_2",
+      "Name": "CC7.2 The entity monitors system components and the operation of those components for anomalies that are indicative of malicious acts, natural disasters, and errors affecting the entity's ability to meet its objectives; anomalies are analyzed to determine whether they represent security events",
+      "Description": "Implements Detection Policies, Procedures, and Tools - Detection policies and procedures are defined and implemented, and detection tools are implemented on Infrastructure and software to identify anomalies in the operation or unusual activity on systems. Procedures may include (1) a defined governance process for security event detection and management that includes provision of resources; (2) use of intelligence sources to identify newly discovered threats and vulnerabilities; and (3) logging of unusual system activities. Designs Detection Measures - Detection measures are designed to identify anomalies that could result from actual or attempted (1) compromise of physical barriers; (2) unauthorized actions of authorized personnel; (3) use of compromised identification and authentication credentials; (4) unauthorized access from outside the system boundaries; (5) compromise of authorized external parties; and (6) implementation or connection of unauthorized hardware and software. Implements Filters to Analyze Anomalies - Management has implemented procedures to filter, summarize, and analyze anomalies to identify security events. Monitors Detection Tools for Effective Operation - Management has implemented processes to monitor the effectiveness of detection tools.",
+      "Attributes": [
+        {
+          "ItemId": "cc_7_2",
+          "Section": "CC7.0 - System Operations",
+          "Service": "azure",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "app_http_logs_enabled",
+        "defender_auto_provisioning_log_analytics_agent_vms_on",
+        "keyvault_logging_enabled",
+        "monitor_storage_account_with_activity_logs_cmk_encrypted",
+        "monitor_storage_account_with_activity_logs_is_private",
+        "mysql_flexible_server_audit_log_connection_activated",
+        "mysql_flexible_server_audit_log_enabled",
+        "network_flow_log_captured_sent",
+        "network_flow_log_more_than_90_days",
+        "postgresql_flexible_server_log_checkpoints_on",
+        "postgresql_flexible_server_log_connections_on",
+        "postgresql_flexible_server_log_disconnections_on",
+        "postgresql_flexible_server_log_retention_days_greater_3"
+      ]
+    },
+    {
+      "Id": "cc_7_3",
+      "Name": "CC7.3 The entity evaluates security events to determine whether they could or have resulted in a failure of the entity to meet its objectives (security incidents) and, if so, takes actions to prevent or address such failures",
+      "Description": "Responds to Security Incidents - Procedures are in place for responding to security incidents and evaluating the effectiveness of those policies and procedures on a periodic basis. Communicates and Reviews Detected Security Events - Detected security events are communicated to and reviewed by the individuals responsible for the management of the security program and actions are taken, if necessary. Develops and Implements Procedures to Analyze Security Incidents - Procedures are in place to analyze security incidents and determine system impact. Assesses the Impact on Personal Information - Detected security events are evaluated to determine whether they could or did result in the unauthorized disclosure or use of personal information and whether there has been a failure to comply with applicable laws or regulations. Determines Personal Information Used or Disclosed - When an unauthorized use or disclosure of personal information has occurred, the affected information is identified.",
+      "Attributes": [
+        {
+          "ItemId": "cc_7_3",
+          "Section": "CC7.0 - System Operations",
+          "Service": "azure",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "app_http_logs_enabled",
+        "defender_auto_provisioning_log_analytics_agent_vms_on",
+        "keyvault_logging_enabled",
+        "monitor_storage_account_with_activity_logs_cmk_encrypted",
+        "monitor_storage_account_with_activity_logs_is_private",
+        "mysql_flexible_server_audit_log_connection_activated",
+        "mysql_flexible_server_audit_log_enabled",
+        "network_flow_log_captured_sent",
+        "network_flow_log_more_than_90_days",
+        "postgresql_flexible_server_log_checkpoints_on",
+        "postgresql_flexible_server_log_connections_on",
+        "postgresql_flexible_server_log_disconnections_on",
+        "postgresql_flexible_server_log_retention_days_greater_3",
+        "defender_ensure_notify_alerts_severity_is_high",
+        "monitor_alert_create_policy_assignment",
+        "monitor_alert_create_update_nsg",
+        "monitor_alert_create_update_public_ip_address_rule",
+        "monitor_alert_create_update_security_solution",
+        "monitor_alert_create_update_sqlserver_fr",
+        "monitor_alert_delete_nsg",
+        "monitor_alert_delete_policy_assignment",
+        "monitor_alert_delete_public_ip_address_rule",
+        "monitor_alert_delete_security_solution",
+        "monitor_alert_delete_sqlserver_fr"
+      ]
+    },
+    {
+      "Id": "cc_7_4",
+      "Name": "CC7.4 The entity responds to identified security incidents by executing a defined incident response program to understand, contain, remediate, and communicate security incidents, as appropriate",
+      "Description": "Assigns Roles and Responsibilities - Roles and responsibilities for the design, implementation, maintenance, and execution of the incident response program are assigned, including the use of external resources when necessary. Contains Security Incidents - Procedures are in place to contain security incidents that actively threaten entity objectives. Mitigates Ongoing Security Incidents - Procedures are in place to mitigate the effects of ongoing security incidents. Ends Threats Posed by Security Incidents - Procedures are in place to end the threats posed by security incidents through closure of the vulnerability, removal of unauthorized access, and other remediation actions. Restores Operations - Procedures are in place to restore data and business operations to an interim state that permits the achievement of entity objectives. Develops and Implements Communication Protocols for Security Incidents - Protocols for communicating security incidents and actions taken to affected parties are developed and implemented to meet the entity's objectives. Obtains Understanding of Nature of Incident and Determines Containment Strategy - An understanding of the nature (for example, the method by which the incident occurred and the affected system resources) and severity of the security incident is obtained to determine the appropriate containment strategy, including (1) a determination of the appropriate response time frame, and (2) the determination and execution of the containment approach. Remediates Identified Vulnerabilities - Identified vulnerabilities are remediated through the development and execution of remediation activities. Communicates Remediation Activities - Remediation activities are documented and communicated in accordance with the incident response program. Evaluates the Effectiveness of Incident Response - The design of incident response activities is evaluated for effectiveness on a periodic basis. Periodically Evaluates Incidents - Periodically, management reviews incidents related to security, availability, processing integrity, confidentiality, and privacy and identifies the need for system changes based on incident patterns and root causes. Communicates Unauthorized Use and Disclosure - Events that resulted in unauthorized use or disclosure of personal information are communicated to the data subjects, legal and regulatory authorities, and others as required. Application of Sanctions - The conduct of individuals and organizations operating under the authority of the entity and involved in the unauthorized use or disclosure of personal information is evaluated and, if appropriate, sanctioned in accordance with entity policies and legal and regulatory requirements.",
+      "Attributes": [
+        {
+          "ItemId": "cc_7_4",
+          "Section": "CC7.0 - System Operations",
+          "Service": "azure",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "defender_ensure_notify_alerts_severity_is_high",
+        "monitor_alert_create_policy_assignment",
+        "monitor_alert_create_update_nsg",
+        "monitor_alert_create_update_public_ip_address_rule",
+        "monitor_alert_create_update_security_solution",
+        "monitor_alert_create_update_sqlserver_fr",
+        "monitor_alert_delete_nsg",
+        "monitor_alert_delete_policy_assignment",
+        "monitor_alert_delete_public_ip_address_rule",
+        "monitor_alert_delete_security_solution",
+        "monitor_alert_delete_sqlserver_fr",
+        "storage_ensure_soft_delete_is_enabled",
+        "vm_ensure_attached_disks_encrypted_with_cmk",
+        "vm_ensure_unattached_disks_encrypted_with_cmk"
+      ]
+    },
+    {
+      "Id": "cc_7_5",
+      "Name": "CC7.5 The entity identifies, develops, and implements activities to recover from identified security incidents",
+      "Description": "Restores the Affected Environment - The activities restore the affected environment to functional operation by rebuilding systems, updating software, installing patches, and changing configurations, as needed. Communicates Information About the Event - Communications about the nature of the incident, recovery actions taken, and activities required for the prevention of future security events are made to management and others as appropriate (internal and external). Determines Root Cause of the Event - The root cause of the event is determined. Implements Changes to Prevent and Detect Recurrences - Additional architecture or changes to preventive and detective controls, or both, are implemented to prevent and detect recurrences on a timely basis. Improves Response and Recovery Procedures - Lessons learned are analyzed, and the incident response plan and recovery procedures are improved. Implements Incident Recovery Plan Testing - Incident recovery plan testing is performed on a periodic basis. The testing includes (1) development of testing scenarios based on threat likelihood and magnitude; (2) consideration of relevant system components from across the entity that can impair availability; (3) scenarios that consider the potential for the lack of availability of key personnel; and (4) revision of continuity plans and systems based on test results.",
+      "Attributes": [
+        {
+          "ItemId": "cc_7_5",
+          "Section": "CC7.0 - System Operations",
+          "Service": "azure",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "vm_ensure_attached_disks_encrypted_with_cmk",
+        "vm_ensure_unattached_disks_encrypted_with_cmk",
+        "storage_ensure_encryption_with_customer_managed_keys",
+        "storage_infrastructure_encryption_is_enabled"
+      ]
+    },
+    {
+      "Id": "cc_8_1",
+      "Name": "CC8.1 The entity authorizes, designs, develops or acquires, configures, documents, tests, approves, and implements changes to infrastructure, data, software, and procedures to meet its objectives",
+      "Description": "Manages Changes Throughout the System Lifecycle - A process for managing system changes throughout the lifecycle of the system and its components (infrastructure, data, software and procedures) is used to support system availability and processing integrity. Authorizes Changes - A process is in place to authorize system changes prior to development. Designs and Develops Changes - A process is in place to design and develop system changes. Documents Changes - A process is in place to document system changes to support ongoing maintenance of the system and to support system users in performing their responsibilities. Tracks System Changes - A process is in place to track system changes prior to implementation. Configures Software - A process is in place to select and implement the configuration parameters used to control the functionality of software. Tests System Changes - A process is in place to test system changes prior to implementation. Approves System Changes - A process is in place to approve system changes prior to implementation. Deploys System Changes - A process is in place to implement system changes. Identifies and Evaluates System Changes - Objectives affected by system changes are identified, and the ability of the modified system to meet the objectives is evaluated throughout the system development life cycle. Identifies Changes in Infrastructure, Data, Software, and Procedures Required to Remediate Incidents - Changes in infrastructure, data, software, and procedures required to remediate incidents to continue to meet objectives are identified, and the change process is initiated upon identification. Creates Baseline Configuration of IT Technology - A baseline configuration of IT and control systems is created and maintained. Provides for Changes Necessary in Emergency Situations - A process is in place for authorizing, designing, testing, approving and implementing changes necessary in emergency situations (that is, changes that need to be implemented in an urgent timeframe). Protects Confidential Information - The entity protects confidential information during system design, development, testing, implementation, and change processes to meet the entityโ€™s objectives related to confidentiality. Protects Personal Information - The entity protects personal information during system design, development, testing, implementation, and change processes to meet the entityโ€™s objectives related to privacy.",
+      "Attributes": [
+        {
+          "ItemId": "cc_8_1",
+          "Section": "CC8.0 - Change Management",
+          "Service": "monitor",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "monitor_alert_create_policy_assignment",
+        "monitor_alert_create_update_nsg",
+        "monitor_alert_create_update_public_ip_address_rule",
+        "monitor_alert_create_update_security_solution",
+        "monitor_alert_create_update_sqlserver_fr",
+        "monitor_alert_delete_nsg",
+        "monitor_alert_delete_policy_assignment",
+        "monitor_alert_delete_public_ip_address_rule",
+        "monitor_alert_delete_security_solution",
+        "monitor_alert_delete_sqlserver_fr",
+        "monitor_diagnostic_setting_with_appropriate_categories",
+        "monitor_diagnostic_settings_exists",
+        "monitor_storage_account_with_activity_logs_cmk_encrypted"
+      ]
+    },
+    {
+      "Id": "cc_a_1_1",
+      "Name": "A1.2 The entity authorizes, designs, develops or acquires, implements, operates, approves, maintains, and monitors environmental protections, software, data back-up processes, and recovery infrastructure to meet its objectives",
+      "Description": "Measures Current Usage - The use of the system components is measured to establish a baseline for capacity management and to use when evaluating the risk of impaired availability due to capacity constraints. Forecasts Capacity - The expected average and peak use of system components is forecasted and compared to system capacity and associated tolerances. Forecasting considers capacity in the event of the failure of system components that constrain capacity. Makes Changes Based on Forecasts - The system change management process is initiated when forecasted usage exceeds capacity tolerances.",
+      "Attributes": [
+        {
+          "ItemId": "cc_a_1_1",
+          "Section": "CCA1.0 - Additional Criterial for Availability",
+          "Service": "azure",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "app_http_logs_enabled",
+        "defender_auto_provisioning_log_analytics_agent_vms_on",
+        "keyvault_logging_enabled",
+        "monitor_storage_account_with_activity_logs_cmk_encrypted",
+        "monitor_storage_account_with_activity_logs_is_private",
+        "mysql_flexible_server_audit_log_connection_activated",
+        "mysql_flexible_server_audit_log_enabled",
+        "network_flow_log_captured_sent",
+        "network_flow_log_more_than_90_days",
+        "postgresql_flexible_server_log_checkpoints_on",
+        "postgresql_flexible_server_log_connections_on",
+        "postgresql_flexible_server_log_disconnections_on",
+        "postgresql_flexible_server_log_retention_days_greater_3"
+      ]
+    },
+    {
+      "Id": "cc_c_1_1",
+      "Name": "C1.1 The entity identifies and maintains confidential information to meet the entityโ€™s objectives related to confidentiality",
+      "Description": "Identifies Confidential information - Procedures are in place to identify and designate confidential information when it is received or created and to determine the period over which the confidential information is to be retained. Protects Confidential Information from Destruction - Procedures are in place to protect confidential information from erasure or destruction during the specified retention period of the information",
+      "Attributes": [
+        {
+          "ItemId": "cc_c_1_1",
+          "Section": "CCC1.0 - Additional Criterial for Confidentiality",
+          "Service": "storage",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "storage_ensure_soft_delete_is_enabled"
+      ]
+    },
+    {
+      "Id": "cc_c_1_2",
+      "Name": "C1.2 The entity disposes of confidential information to meet the entityโ€™s objectives related to confidentiality",
+      "Description": "Identifies Confidential Information for Destruction - Procedures are in place to identify confidential information requiring destruction when the end of the retention period is reached. Destroys Confidential Information - Procedures are in place to erase or otherwise destroy confidential information that has been identified for destruction.",
+      "Attributes": [
+        {
+          "ItemId": "cc_c_1_2",
+          "Section": "CCC1.0 - Additional Criterial for Confidentiality",
+          "Service": "azure",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "network_flow_log_more_than_90_days",
+        "postgresql_flexible_server_log_retention_days_greater_3",
+        "sqlserver_auditing_retention_90_days",
+        "storage_ensure_soft_delete_is_enabled"
+      ]
+    }
+  ]
+}
diff --git a/prowler/compliance/gcp/cis_2.0_gcp.json b/prowler/compliance/gcp/cis_2.0_gcp.json
index abc6238a09..6ef4d575e4 100644
--- a/prowler/compliance/gcp/cis_2.0_gcp.json
+++ b/prowler/compliance/gcp/cis_2.0_gcp.json
@@ -10,7 +10,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Use corporate login credentials instead of personal accounts, such as Gmail accounts.",
@@ -29,7 +29,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Setup multi-factor authentication for Google Cloud Platform accounts.",
@@ -48,7 +48,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Setup Security Key Enforcement for Google Cloud Platform admin accounts.",
@@ -69,7 +69,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "API Keys should only be used for services in cases where other authentication methods are unavailable. API keys are always at risk because they can be viewed publicly, such as from within a browser, or they can be accessed on a device where the key resides. It is recommended to restrict API keys to use (call) only APIs required by an application.",
@@ -90,7 +90,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "API Keys should only be used for services in cases where other authentication methods are unavailable. If they are in use it is recommended to rotate API keys every 90 days.",
@@ -111,7 +111,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "API Keys should only be used for services in cases where other authentication methods are unavailable. Unused keys with their permissions in tact may still exist within a project. Keys are insecure because they can be viewed publicly, such as from within a browser, or they can be accessed on a device where the key resides. It is recommended to use standard authentication flow instead.",
@@ -132,7 +132,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended that Essential Contacts is configured to designate email addresses for Google Cloud services to notify of important technical or security information.",
@@ -153,7 +153,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Google Cloud Key Management Service stores cryptographic keys in a hierarchical structure designed for useful and elegant access control management.   The format for the rotation schedule depends on the client library that is used. For the gcloud command-line tool, the next rotation time must be in `ISO` or `RFC3339` format, and the rotation period must be in the form `INTEGERUNIT`, where units can be one of seconds (s), minutes (m), hours (h) or days (d).",
@@ -174,7 +174,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended that the IAM policy on Cloud KMS `cryptokeys` should restrict anonymous and/or public access.",
@@ -195,7 +195,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "When you use Dataproc, cluster and job data is stored on Persistent Disks (PDs) associated with the Compute Engine VMs in your cluster and in a Cloud Storage staging bucket. This PD and bucket data is encrypted using a Google-generated data encryption key (DEK) and key encryption key (KEK). The CMEK feature allows you to create, use, and revoke the key encryption key (KEK). Google still controls the data encryption key (DEK).",
@@ -216,7 +216,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended to assign the `Service Account User (iam.serviceAccountUser)` and `Service Account Token Creator (iam.serviceAccountTokenCreator)` roles to a user for a specific service account rather than assigning the role to a user at project level.",
@@ -237,7 +237,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended that the principle of 'Separation of Duties' is enforced while assigning KMS related roles to users.",
@@ -256,7 +256,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "API Keys should only be used for services in cases where other authentication methods are unavailable. In this case, unrestricted keys are insecure because they can be viewed publicly, such as from within a browser, or they can be accessed on a device where the key resides. It is recommended to restrict API key usage to trusted hosts, HTTP referrers and apps. It is recommended to use the more secure standard authentication flow instead.",
@@ -277,7 +277,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended that the principle of 'Separation of Duties' is enforced while assigning service-account related roles to users.",
@@ -298,7 +298,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "A service account is a special Google account that belongs to an application or a VM, instead of to an individual end-user. The application uses the service account to call the service's Google API so that users aren't directly involved. It's recommended not to use admin access for ServiceAccount.",
@@ -319,7 +319,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "User managed service accounts should not have user-managed keys.",
@@ -340,7 +340,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Service Account keys consist of a key ID (Private_key_Id) and Private key, which are used to sign programmatic requests users make to Google cloud services accessible to that particular service account. It is recommended that all Service Account keys are regularly rotated.",
@@ -359,7 +359,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Google Cloud Functions allow you to host serverless code that is executed when an event is triggered, without the requiring the management a host operating system. These functions can also store environment variables to be used by the code that may contain authentication or other information that needs to remain confidential.",
@@ -380,7 +380,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Logging and Monitoring",
+          "Section": "2 Logging and Monitoring",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "GCP Access Approval enables you to require your organizations' explicit approval whenever Google support try to access your projects. You can then select users within your organization who can approve these requests through giving them a security role in IAM. All access requests display which Google Employee requested them in an email or Pub/Sub message that you can choose to Approve. This adds an additional control and logging of who in your organization approved/denied these requests.",
@@ -401,7 +401,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Logging and Monitoring",
+          "Section": "2 Logging and Monitoring",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "GCP Cloud Asset Inventory is services that provides a historical view of GCP resources and IAM policies through a time-series database. The information recorded includes metadata on Google Cloud resources, metadata on policies set on Google Cloud projects or resources, and runtime information gathered within a Google Cloud resource.",
@@ -422,7 +422,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Logging and Monitoring",
+          "Section": "2 Logging and Monitoring",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "In order to prevent unnecessary project ownership assignments to users/service-accounts and further misuses of projects and resources, all `roles/Owner` assignments should be monitored.  Members (users/Service-Accounts) with a role assignment to primitive role `roles/Owner` are project owners.  The project owner has all the privileges on the project the role belongs to. These are summarized below: - All viewer permissions on all GCP Services within the project - Permissions for actions that modify the state of all GCP services within the project - Manage roles and permissions for a project and all resources within the project - Set up billing for a project  Granting the owner role to a member (user/Service-Account) will allow that member to modify the Identity and Access Management (IAM) policy. Therefore, grant the owner role only if the member has a legitimate purpose to manage the IAM policy. This is because the project IAM policy contains sensitive access control data. Having a minimal set of users allowed to manage IAM policy will simplify any auditing that may be necessary.",
@@ -443,7 +443,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Logging and Monitoring",
+          "Section": "2 Logging and Monitoring",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Logging enabled on a HTTPS Load Balancer will show all network traffic and its destination.",
@@ -464,7 +464,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Logging and Monitoring",
+          "Section": "2 Logging and Monitoring",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended that Cloud Audit Logging is configured to track all admin activities and read, write access to user data.",
@@ -485,7 +485,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Logging and Monitoring",
+          "Section": "2 Logging and Monitoring",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Cloud DNS logging records the queries from the name servers within your VPC to Stackdriver. Logged queries can come from Compute Engine VMs, GKE containers, or other GCP resources provisioned within the VPC.",
@@ -506,7 +506,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Logging and Monitoring",
+          "Section": "2 Logging and Monitoring",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Enabling retention policies on log buckets will protect logs stored in cloud storage buckets from being overwritten or accidentally deleted. It is recommended to set up retention policies and configure Bucket Lock on all storage buckets that are used as log sinks.",
@@ -527,7 +527,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Logging and Monitoring",
+          "Section": "2 Logging and Monitoring",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended to create a sink that will export copies of all the log entries. This can help aggregate logs from multiple projects and export them to a Security Information and Event Management (SIEM).",
@@ -548,7 +548,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Logging and Monitoring",
+          "Section": "2 Logging and Monitoring",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Google Cloud Platform (GCP) services write audit log entries to the Admin Activity and Data Access logs to help answer the questions of, \"who did what, where, and when?\" within GCP projects.  Cloud audit logging records information includes the identity of the API caller, the time of the API call, the source IP address of the API caller, the request parameters, and the response elements returned by GCP services. Cloud audit logging provides a history of GCP API calls for an account, including API calls made via the console, SDKs, command-line tools, and other GCP services.",
@@ -569,7 +569,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Logging and Monitoring",
+          "Section": "2 Logging and Monitoring",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended that a metric filter and alarm be established for Cloud Storage Bucket IAM changes.",
@@ -590,7 +590,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Logging and Monitoring",
+          "Section": "2 Logging and Monitoring",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended that a metric filter and alarm be established for changes to Identity and Access Management (IAM) role creation, deletion and updating activities.",
@@ -611,7 +611,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Logging and Monitoring",
+          "Section": "2 Logging and Monitoring",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended that a metric filter and alarm be established for SQL instance configuration changes.",
@@ -632,7 +632,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Logging and Monitoring",
+          "Section": "2 Logging and Monitoring",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended that a metric filter and alarm be established for Virtual Private Cloud (VPC) network changes.",
@@ -651,7 +651,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "2. Logging and Monitoring",
+          "Section": "2 Logging and Monitoring",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "GCP Access Transparency provides audit logs for all actions that Google personnel take in your Google Cloud resources.",
@@ -672,7 +672,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Logging and Monitoring",
+          "Section": "2 Logging and Monitoring",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended that a metric filter and alarm be established for Virtual Private Cloud (VPC) Network Firewall rule changes.",
@@ -693,7 +693,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Logging and Monitoring",
+          "Section": "2 Logging and Monitoring",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended that a metric filter and alarm be established for Virtual Private Cloud (VPC) network route changes.",
@@ -714,7 +714,7 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Networking",
+          "Section": "3 Networking",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "In order to prevent use of legacy networks, a project should not have a legacy network configured. As of now, Legacy Networks are gradually being phased out, and you can no longer create projects with them. This recommendation is to check older projects to ensure that they are not using Legacy Networks.",
@@ -735,7 +735,7 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Networking",
+          "Section": "3 Networking",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Cloud Domain Name System (DNS) is a fast, reliable and cost-effective domain name system that powers millions of domains on the internet. Domain Name System Security Extensions (DNSSEC) in Cloud DNS enables domain owners to take easy steps to protect their domains against DNS hijacking and man-in-the-middle and other attacks.",
@@ -756,7 +756,7 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Networking",
+          "Section": "3 Networking",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "GCP `Firewall Rules` are specific to a `VPC Network`. Each rule either `allows` or `denies` traffic when its conditions are met. Its conditions allow users to specify the type of traffic, such as ports and protocols, and the source or destination of the traffic, including IP addresses, subnets, and instances.  Firewall rules are defined at the VPC network level and are specific to the network in which they are defined. The rules themselves cannot be shared among networks. Firewall rules only support IPv4 traffic. When specifying a source for an ingress rule or a destination for an egress rule by address, an `IPv4` address or `IPv4 block in CIDR` notation can be used. Generic `(0.0.0.0/0)` incoming traffic from the Internet to a VPC or VM instance using `RDP` on `Port 3389` can be avoided.",
@@ -777,7 +777,7 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Networking",
+          "Section": "3 Networking",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "NOTE: Currently, the SHA1 algorithm has been removed from general use by Google, and, if being used, needs to be whitelisted on a project basis by Google and will also, therefore, require a Google Cloud support contract.  DNSSEC algorithm numbers in this registry may be used in CERT RRs. Zone signing (DNSSEC) and transaction security mechanisms (SIG(0) and TSIG) make use of particular subsets of these algorithms. The algorithm used for key signing should be a recommended one and it should be strong.",
@@ -798,7 +798,7 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Networking",
+          "Section": "3 Networking",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "NOTE: Currently, the SHA1 algorithm has been removed from general use by Google, and, if being used, needs to be whitelisted on a project basis by Google and will also, therefore, require a Google Cloud support contract.  DNSSEC algorithm numbers in this registry may be used in CERT RRs. Zone signing (DNSSEC) and transaction security mechanisms (SIG(0) and TSIG) make use of particular subsets of these algorithms. The algorithm used for key signing should be a recommended one and it should be strong.",
@@ -819,7 +819,7 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Networking",
+          "Section": "3 Networking",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "GCP `Firewall Rules` are specific to a `VPC Network`. Each rule either `allows` or `denies` traffic when its conditions are met. Its conditions allow the user to specify the type of traffic, such as ports and protocols, and the source or destination of the traffic, including IP addresses, subnets, and instances.  Firewall rules are defined at the VPC network level and are specific to the network in which they are defined. The rules themselves cannot be shared among networks. Firewall rules only support IPv4 traffic. When specifying a source for an ingress rule or a destination for an egress rule by address, only an `IPv4` address or `IPv4 block in CIDR` notation can be used. Generic `(0.0.0.0/0)` incoming traffic from the internet to VPC or VM instance using `SSH` on `Port 22` can be avoided.",
@@ -840,7 +840,7 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Networking",
+          "Section": "3 Networking",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "To prevent use of `default` network, a project should not have a `default` network.",
@@ -861,7 +861,7 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Networking",
+          "Section": "3 Networking",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Flow Logs is a feature that enables users to capture information about the IP traffic going to and from network interfaces in the organization's VPC Subnets. Once a flow log is created, the user can view and retrieve its data in Stackdriver Logging. It is recommended that Flow Logs be enabled for every business-critical VPC subnet.",
@@ -880,7 +880,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "3. Networking",
+          "Section": "3 Networking",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Secure Sockets Layer (SSL) policies determine what port Transport Layer Security (TLS) features clients are permitted to use when connecting to load balancers. To prevent usage of insecure features, SSL policies should use (a) at least TLS 1.2 with the MODERN profile; or (b) the RESTRICTED profile, because it effectively requires clients to use TLS 1.2 regardless of the chosen minimum TLS version; or (3) a CUSTOM profile that does not support any of the following features:  ``` TLS_RSA_WITH_AES_128_GCM_SHA256 TLS_RSA_WITH_AES_256_GCM_SHA384 TLS_RSA_WITH_AES_128_CBC_SHA TLS_RSA_WITH_AES_256_CBC_SHA TLS_RSA_WITH_3DES_EDE_CBC_SHA ```",
@@ -899,7 +899,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "3. Networking",
+          "Section": "3 Networking",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "IAP authenticates the user requests to your apps via a Google single sign in. You can then manage these users with permissions to control access. It is recommended to use both IAP permissions and firewalls to restrict this access to your apps with sensitive information.",
@@ -920,7 +920,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Virtual Machines",
+          "Section": "4 Virtual Machines",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Interacting with a serial port is often referred to as the serial console, which is similar to using a terminal window, in that input and output is entirely in text mode and there is no graphical interface or mouse support.  If you enable the interactive serial console on an instance, clients can attempt to connect to that instance from any IP address. Therefore interactive serial console support should be disabled.",
@@ -941,7 +941,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Virtual Machines",
+          "Section": "4 Virtual Machines",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended to use Instance specific SSH key(s) instead of using common/shared project-wide SSH key(s) to access Instances.",
@@ -962,7 +962,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Virtual Machines",
+          "Section": "4 Virtual Machines",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "To defend against advanced threats and ensure that the boot loader and firmware on your VMs are signed and untampered, it is recommended that Compute instances are launched with Shielded VM enabled.",
@@ -983,7 +983,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Virtual Machines",
+          "Section": "4 Virtual Machines",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Enabling OS login binds SSH certificates to IAM users and facilitates effective SSH certificate management.",
@@ -1004,7 +1004,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Virtual Machines",
+          "Section": "4 Virtual Machines",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Compute instances should not be configured to have external IP addresses.",
@@ -1025,7 +1025,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Virtual Machines",
+          "Section": "4 Virtual Machines",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Google Cloud encrypts data at-rest and in-transit, but customer data must be decrypted for processing. Confidential Computing is a breakthrough technology which encrypts data in-useโ€”while it is being processed. Confidential Computing environments keep data encrypted in memory and elsewhere outside the central processing unit (CPU).   Confidential VMs leverage the Secure Encrypted Virtualization (SEV) feature of AMD EPYCโ„ข CPUs. Customer data will stay encrypted while it is used, indexed, queried, or trained on. Encryption keys are generated in hardware, per VM, and not exportable. Thanks to built-in hardware optimizations of both performance and security, there is no significant performance penalty to Confidential Computing workloads.",
@@ -1046,7 +1046,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Virtual Machines",
+          "Section": "4 Virtual Machines",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended to configure your instance to not use the default Compute Engine service account because it has the Editor role on the project.",
@@ -1067,7 +1067,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Virtual Machines",
+          "Section": "4 Virtual Machines",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "To support principle of least privileges and prevent potential privilege escalation it is recommended that instances are not assigned to default service account `Compute Engine default service account` with Scope `Allow full access to all Cloud APIs`.",
@@ -1088,7 +1088,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Virtual Machines",
+          "Section": "4 Virtual Machines",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Compute Engine instance cannot forward a packet unless the source IP address of the packet matches the IP address of the instance. Similarly, GCP won't deliver a packet whose destination IP address is different than the IP address of the instance receiving the packet. However, both capabilities are required if you want to use instances to help route packets.  Forwarding of data packets should be disabled to prevent data loss or information disclosure.",
@@ -1107,7 +1107,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "4. Virtual Machines",
+          "Section": "4 Virtual Machines",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "In order to maintain the highest level of security all connections to an application should be secure by default.",
@@ -1128,7 +1128,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Virtual Machines",
+          "Section": "4 Virtual Machines",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Customer-Supplied Encryption Keys (CSEK) are a feature in Google Cloud Storage and Google Compute Engine. If you supply your own encryption keys, Google uses your key to protect the Google-generated keys used to encrypt and decrypt your data. By default, Google Compute Engine encrypts all data at rest. Compute Engine handles and manages this encryption for you without any additional actions on your part. However, if you wanted to control and manage this encryption yourself, you can provide your own encryption keys.",
@@ -1147,7 +1147,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "4. Virtual Machines",
+          "Section": "4 Virtual Machines",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Google Cloud Virtual Machines have the ability via an OS Config agent API to periodically (about every 10 minutes) report OS inventory data. A patch compliance API periodically reads this data, and cross references metadata to determine if the latest updates are installed.  This is not the only Patch Management solution available to your organization and you should weigh your needs before committing to using this method.",
@@ -1168,7 +1168,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Storage",
+          "Section": "5 Storage",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended that IAM policy on Cloud Storage bucket does not allows anonymous or public access.",
@@ -1189,7 +1189,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Storage",
+          "Section": "5 Storage",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended that uniform bucket-level access is enabled on Cloud Storage buckets.",
@@ -1210,7 +1210,7 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
+          "Section": "6 Cloud SQL Database Services",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended to have all SQL database instances set to enable automated backups.",
@@ -1231,7 +1231,7 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
+          "Section": "6 Cloud SQL Database Services",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended to configure Second Generation Sql instance to use private IPs instead of public IPs.",
@@ -1252,7 +1252,7 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
+          "Section": "6 Cloud SQL Database Services",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Database Server should accept connections only from trusted Network(s)/IP(s) and restrict access from public IP addresses.",
@@ -1273,7 +1273,7 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
+          "Section": "6 Cloud SQL Database Services",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended to enforce all incoming connections to SQL database instance to use SSL.",
@@ -1292,8 +1292,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
-          "SubSection": "6.1. MySQL Database",
+          "Section": "6 Cloud SQL Database Services",
+          "SubSection": "6.1 MySQL Database",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "It is recommended to set a password for the administrative user (`root` by default) to prevent unauthorized access to the SQL database instances.  This recommendation is applicable only for MySQL Instances. PostgreSQL does not offer any setting for No Password from the cloud console.",
@@ -1314,8 +1314,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
-          "SubSection": "6.1. MySQL Database",
+          "Section": "6 Cloud SQL Database Services",
+          "SubSection": "6.1 MySQL Database",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended to set `skip_show_database` database flag for Cloud SQL Mysql instance to `on`",
@@ -1336,8 +1336,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
-          "SubSection": "6.1. MySQL Database",
+          "Section": "6 Cloud SQL Database Services",
+          "SubSection": "6.1 MySQL Database",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended to set the `local_infile` database flag for a Cloud SQL MySQL instance to `off`.",
@@ -1358,8 +1358,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
-          "SubSection": "6.2. PostgreSQL Database",
+          "Section": "6 Cloud SQL Database Services",
+          "SubSection": "6.2 PostgreSQL Database",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "The `log_error_verbosity` flag controls the verbosity/details of messages logged. Valid values are: - `TERSE` - `DEFAULT` - `VERBOSE`  `TERSE` excludes the logging of `DETAIL`, `HINT`, `QUERY`, and `CONTEXT` error information.  `VERBOSE` output includes the `SQLSTATE` error code, source code file name, function name, and line number that generated the error.  Ensure an appropriate value is set to 'DEFAULT' or stricter.",
@@ -1380,8 +1380,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
-          "SubSection": "6.2. PostgreSQL Database",
+          "Section": "6 Cloud SQL Database Services",
+          "SubSection": "6.2 PostgreSQL Database",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "The `log_min_error_statement` flag defines the minimum message severity level that are considered as an error statement. Messages for error statements are logged with the SQL statement. Valid values include `DEBUG5`, `DEBUG4`, `DEBUG3`, `DEBUG2`, `DEBUG1`, `INFO`, `NOTICE`, `WARNING`, `ERROR`, `LOG`, `FATAL`, and `PANIC`. Each severity level includes the subsequent levels mentioned above. Ensure a value of `ERROR` or stricter is set.",
@@ -1402,8 +1402,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
-          "SubSection": "6.2. PostgreSQL Database",
+          "Section": "6 Cloud SQL Database Services",
+          "SubSection": "6.2 PostgreSQL Database",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "The value of `log_statement` flag determined the SQL statements that are logged. Valid values are: - `none` - `ddl` - `mod` - `all`  The value `ddl` logs all data definition statements. The value `mod` logs all ddl statements, plus data-modifying statements.  The statements are logged after a basic parsing is done and statement type is determined, thus this does not logs statements with errors. When using extended query protocol, logging occurs after an Execute message is received and values of the Bind parameters are included.  A value of 'ddl' is recommended unless otherwise directed by your organization's logging policy.",
@@ -1424,8 +1424,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
-          "SubSection": "6.2. PostgreSQL Database",
+          "Section": "6 Cloud SQL Database Services",
+          "SubSection": "6.2 PostgreSQL Database",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Instance addresses can be public IP or private IP. Public IP means that the instance is accessible through the public internet. In contrast, instances using only private IP are not accessible through the public internet, but are accessible through a Virtual Private Cloud (VPC).  Limiting network access to your database will limit potential attacks.",
@@ -1446,8 +1446,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
-          "SubSection": "6.2. PostgreSQL Database",
+          "Section": "6 Cloud SQL Database Services",
+          "SubSection": "6.2 PostgreSQL Database",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Ensure `cloudsql.enable_pgaudit` database flag for Cloud SQL PostgreSQL instance is set to `on` to allow for centralized logging.",
@@ -1468,8 +1468,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
-          "SubSection": "6.2. PostgreSQL Database",
+          "Section": "6 Cloud SQL Database Services",
+          "SubSection": "6.2 PostgreSQL Database",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Enabling the `log_connections` setting causes each attempted connection to the server to be logged, along with successful completion of client authentication. This parameter cannot be changed after the session starts.",
@@ -1490,8 +1490,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
-          "SubSection": "6.2. PostgreSQL Database",
+          "Section": "6 Cloud SQL Database Services",
+          "SubSection": "6.2 PostgreSQL Database",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Enabling the `log_disconnections` setting logs the end of each session, including the session duration.",
@@ -1512,8 +1512,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
-          "SubSection": "6.2. PostgreSQL Database",
+          "Section": "6 Cloud SQL Database Services",
+          "SubSection": "6.2 PostgreSQL Database",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "The `log_min_duration_statement` flag defines the minimum amount of execution time of a statement in milliseconds where the total duration of the statement is logged. Ensure that `log_min_duration_statement` is disabled, i.e., a value of `-1` is set.",
@@ -1534,8 +1534,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
-          "SubSection": "6.2. PostgreSQL Database",
+          "Section": "6 Cloud SQL Database Services",
+          "SubSection": "6.2 PostgreSQL Database",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "The `log_min_messages` flag defines the minimum message severity level that is considered as an error statement. Messages for error statements are logged with the SQL statement. Valid values include `DEBUG5`, `DEBUG4`, `DEBUG3`, `DEBUG2`, `DEBUG1`, `INFO`, `NOTICE`, `WARNING`, `ERROR`, `LOG`, `FATAL`, and `PANIC`. Each severity level includes the subsequent levels mentioned above. ERROR is considered the best practice setting. Changes should only be made in accordance with the organization's logging policy.",
@@ -1556,8 +1556,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
-          "SubSection": "6.3. SQL Server",
+          "Section": "6 Cloud SQL Database Services",
+          "SubSection": "6.3 SQL Server",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended to set `3625 (trace flag)` database flag for Cloud SQL SQL Server instance to `on`.",
@@ -1578,8 +1578,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
-          "SubSection": "6.3. SQL Server",
+          "Section": "6 Cloud SQL Database Services",
+          "SubSection": "6.3 SQL Server",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended to set `external scripts enabled` database flag for Cloud SQL SQL Server instance to `off`",
@@ -1600,8 +1600,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
-          "SubSection": "6.3. SQL Server",
+          "Section": "6 Cloud SQL Database Services",
+          "SubSection": "6.3 SQL Server",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended to set `remote access` database flag for Cloud SQL SQL Server instance to `off`.",
@@ -1622,8 +1622,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
-          "SubSection": "6.3. SQL Server",
+          "Section": "6 Cloud SQL Database Services",
+          "SubSection": "6.3 SQL Server",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended to check the `user connections` for a Cloud SQL SQL Server instance to ensure that it is not artificially limiting connections.",
@@ -1644,8 +1644,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
-          "SubSection": "6.3. SQL Server",
+          "Section": "6 Cloud SQL Database Services",
+          "SubSection": "6.3 SQL Server",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended that, `user options` database flag for Cloud SQL SQL Server instance should not be configured.",
@@ -1666,8 +1666,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
-          "SubSection": "6.3. SQL Server",
+          "Section": "6 Cloud SQL Database Services",
+          "SubSection": "6.3 SQL Server",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended to set `contained database authentication` database flag for Cloud SQL on the SQL Server instance to `off`.",
@@ -1688,8 +1688,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
-          "SubSection": "6.3. SQL Server",
+          "Section": "6 Cloud SQL Database Services",
+          "SubSection": "6.3 SQL Server",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended to set `cross db ownership chaining` database flag for Cloud SQL SQL Server instance to `off`.",
@@ -1710,7 +1710,7 @@
       ],
       "Attributes": [
         {
-          "Section": "7. BigQuery",
+          "Section": "7 BigQuery",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "BigQuery by default encrypts the data as rest by employing `Envelope Encryption` using Google managed cryptographic keys. The data is encrypted using the `data encryption keys` and data encryption keys themselves are further encrypted using `key encryption keys`. This is seamless and do not require any additional input from the user. However, if you want to have greater control, Customer-managed encryption keys (CMEK) can be used as encryption key management solution for BigQuery Data Sets.",
@@ -1731,7 +1731,7 @@
       ],
       "Attributes": [
         {
-          "Section": "7. BigQuery",
+          "Section": "7 BigQuery",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "BigQuery by default encrypts the data as rest by employing `Envelope Encryption` using Google managed cryptographic keys. The data is encrypted using the `data encryption keys` and data encryption keys themselves are further encrypted using `key encryption keys`. This is seamless and do not require any additional input from the user. However, if you want to have greater control, Customer-managed encryption keys (CMEK) can be used as encryption key management solution for BigQuery Data Sets. If CMEK is used, the CMEK is used to encrypt the data encryption keys instead of using google-managed encryption keys.",
@@ -1752,7 +1752,7 @@
       ],
       "Attributes": [
         {
-          "Section": "7. BigQuery",
+          "Section": "7 BigQuery",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended that the IAM policy on BigQuery datasets does not allow anonymous and/or public access.",
diff --git a/prowler/compliance/gcp/cis_3.0_gcp.json b/prowler/compliance/gcp/cis_3.0_gcp.json
index a0e860e81d..8ebe8cd6df 100644
--- a/prowler/compliance/gcp/cis_3.0_gcp.json
+++ b/prowler/compliance/gcp/cis_3.0_gcp.json
@@ -10,7 +10,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Use corporate login credentials instead of consumer accounts, such as Gmail accounts.",
@@ -30,7 +30,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Setup multi-factor authentication for Google Cloud Platform accounts.",
@@ -50,7 +50,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Setup Security Key Enforcement for Google Cloud Platform admin accounts.",
@@ -72,7 +72,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "User-managed service accounts should not have user-managed keys.",
@@ -94,7 +94,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "A service account is a special Google account that belongs to an application or a VM, instead of to an individual end-user. The application uses the service account to call the service's Google API so that users aren't directly involved. It's recommended not to use admin access for ServiceAccount.",
@@ -116,7 +116,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended to assign the `Service Account User (iam.serviceAccountUser)` and `Service Account Token Creator (iam.serviceAccountTokenCreator)` roles to a user for a specific service account rather than assigning the role to a user at project level.",
@@ -138,7 +138,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Service Account keys consist of a key ID (Private_key_Id) and Private key, which are used to sign programmatic requests users make to Google cloud services accessible to that particular service account. It is recommended that all Service Account keys are regularly rotated.",
@@ -160,7 +160,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended that the principle of 'Separation of Duties' is enforced while assigning service-account related roles to users.",
@@ -182,7 +182,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended that the IAM policy on Cloud KMS `cryptokeys` should restrict anonymous and/or public access.",
@@ -204,7 +204,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Google Cloud Key Management Service stores cryptographic keys in a hierarchical structure designed for useful and elegant access control management. The format for the rotation schedule depends on the client library that is used. For the gcloud command-line tool, the next rotation time must be in `ISO` or `RFC3339` format, and the rotation period must be in the form `INTEGER[UNIT]`, where units can be one of seconds (s), minutes (m), hours (h) or days (d).",
@@ -226,7 +226,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended that the principle of 'Separation of Duties' is enforced while assigning KMS related roles to users.",
@@ -248,7 +248,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "API Keys should only be used for services in cases where other authentication methods are unavailable. Unused keys with their permissions in tact may still exist within a project. Keys are insecure because they can be viewed publicly, such as from within a browser, or they can be accessed on a device where the key resides. It is recommended to use standard authentication flow instead.",
@@ -268,7 +268,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "API Keys should only be used for services in cases where other authentication methods are unavailable. In this case, unrestricted keys are insecure because they can be viewed publicly, such as from within a browser, or they can be accessed on a device where the key resides. It is recommended to restrict API key usage to trusted hosts, HTTP referrers and apps. It is recommended to use the more secure standard authentication flow instead.",
@@ -290,7 +290,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "API Keys should only be used for services in cases where other authentication methods are unavailable. API keys are always at risk because they can be viewed publicly, such as from within a browser, or they can be accessed on a device where the key resides. It is recommended to restrict API keys to use (call) only APIs required by an application.",
@@ -312,7 +312,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "API Keys should only be used for services in cases where other authentication methods are unavailable. If they are in use it is recommended to rotate API keys every 90 days.",
@@ -334,7 +334,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended that Essential Contacts is configured to designate email addresses for Google Cloud services to notify of important technical or security information.",
@@ -354,7 +354,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Identity and Access Management",
+          "Section": "1 Identity and Access Management",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Google Cloud Functions allow you to host serverless code that is executed when an event is triggered, without the requiring the management a host operating system. These functions can also store environment variables to be used by the code that may contain authentication or other information that needs to remain confidential.",
@@ -376,7 +376,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Logging and Monitoring",
+          "Section": "2 Logging and Monitoring",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended that Cloud Audit Logging is configured to track all admin activities and read, write access to user data.",
@@ -398,7 +398,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Logging and Monitoring",
+          "Section": "2 Logging and Monitoring",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended to create a sink that will export copies of all the log entries. This can help aggregate logs from multiple projects and export them to a Security Information and Event Management (SIEM).",
@@ -420,7 +420,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Logging and Monitoring",
+          "Section": "2 Logging and Monitoring",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Enabling retention policies on log buckets will protect logs stored in cloud storage buckets from being overwritten or accidentally deleted. It is recommended to set up retention policies and configure Bucket Lock on all storage buckets that are used as log sinks.",
@@ -442,7 +442,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Logging and Monitoring",
+          "Section": "2 Logging and Monitoring",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "In order to prevent unnecessary project ownership assignments to users/service-accounts and further misuses of projects and resources, all `roles/Owner` assignments should be monitored.Members (users/Service-Accounts) with a role assignment to primitive role `roles/Owner` are project owners.The project owner has all the privileges on the project the role belongs to. These are summarized below:- All viewer permissions on all GCP Services within the project- Permissions for actions that modify the state of all GCP services within the project- Manage roles and permissions for a project and all resources within the project- Set up billing for a projectGranting the owner role to a member (user/Service-Account) will allow that member to modify the Identity and Access Management (IAM) policy. Therefore, grant the owner role only if the member has a legitimate purpose to manage the IAM policy. This is because the project IAM policy contains sensitive access control data. Having a minimal set of users allowed to manage IAM policy will simplify any auditing that may be necessary.",
@@ -464,7 +464,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Logging and Monitoring",
+          "Section": "2 Logging and Monitoring",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Google Cloud Platform (GCP) services write audit log entries to the Admin Activity and Data Access logs to help answer the questions of, \"who did what, where, and when?\" within GCP projects.Cloud audit logging records information includes the identity of the API caller, the time of the API call, the source IP address of the API caller, the request parameters, and the response elements returned by GCP services. Cloud audit logging provides a history of GCP API calls for an account, including API calls made via the console, SDKs, command-line tools, and other GCP services.",
@@ -486,7 +486,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Logging and Monitoring",
+          "Section": "2 Logging and Monitoring",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended that a metric filter and alarm be established for changes to Identity and Access Management (IAM) role creation, deletion and updating activities.",
@@ -508,7 +508,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Logging and Monitoring",
+          "Section": "2 Logging and Monitoring",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended that a metric filter and alarm be established for Virtual Private Cloud (VPC) Network Firewall rule changes.",
@@ -530,7 +530,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Logging and Monitoring",
+          "Section": "2 Logging and Monitoring",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended that a metric filter and alarm be established for Virtual Private Cloud (VPC) network route changes.",
@@ -552,7 +552,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Logging and Monitoring",
+          "Section": "2 Logging and Monitoring",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended that a metric filter and alarm be established for Virtual Private Cloud (VPC) network changes.",
@@ -574,7 +574,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Logging and Monitoring",
+          "Section": "2 Logging and Monitoring",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended that a metric filter and alarm be established for Cloud Storage Bucket IAM changes.",
@@ -596,7 +596,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Logging and Monitoring",
+          "Section": "2 Logging and Monitoring",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended that a metric filter and alarm be established for SQL instance configuration changes.",
@@ -616,7 +616,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "2. Logging and Monitoring",
+          "Section": "2 Logging and Monitoring",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Cloud DNS logging records the queries from the name servers within your VPC to Stackdriver. Logged queries can come from Compute Engine VMs, GKE containers, or other GCP resources provisioned within the VPC.",
@@ -638,7 +638,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Logging and Monitoring",
+          "Section": "2 Logging and Monitoring",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "GCP Cloud Asset Inventory is services that provides a historical view of GCP resources and IAM policies through a time-series database. The information recorded includes metadata on Google Cloud resources, metadata on policies set on Google Cloud projects or resources, and runtime information gathered within a Google Cloud resource.Cloud Asset Inventory Service (CAIS) API enablement is not required for operation of the service, but rather enables the mechanism for searching/exporting CAIS asset data directly.",
@@ -658,7 +658,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "2. Logging and Monitoring",
+          "Section": "2 Logging and Monitoring",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "GCP Access Transparency provides audit logs for all actions that Google personnel take in your Google Cloud resources.",
@@ -680,7 +680,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Logging and Monitoring",
+          "Section": "2 Logging and Monitoring",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "GCP Access Approval enables you to require your organizations' explicit approval whenever Google support try to access your projects. You can then select users within your organization who can approve these requests through giving them a security role in IAM. All access requests display which Google Employee requested them in an email or Pub/Sub message that you can choose to Approve. This adds an additional control and logging of who in your organization approved/denied these requests.",
@@ -702,7 +702,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. Logging and Monitoring",
+          "Section": "2 Logging and Monitoring",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Logging enabled on a HTTPS Load Balancer will show all network traffic and its destination.",
@@ -724,7 +724,7 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Networking",
+          "Section": "3 Networking",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "To prevent use of `default` network, a project should not have a `default` network.",
@@ -746,7 +746,7 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Networking",
+          "Section": "3 Networking",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "In order to prevent use of legacy networks, a project should not have a legacy network configured. As of now, Legacy Networks are gradually being phased out, and you can no longer create projects with them. This recommendation is to check older projects to ensure that they are not using Legacy Networks.",
@@ -768,7 +768,7 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Networking",
+          "Section": "3 Networking",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Cloud Domain Name System (DNS) is a fast, reliable and cost-effective domain name system that powers millions of domains on the internet. Domain Name System Security Extensions (DNSSEC) in Cloud DNS enables domain owners to take easy steps to protect their domains against DNS hijacking and man-in-the-middle and other attacks.",
@@ -790,7 +790,7 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Networking",
+          "Section": "3 Networking",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "NOTE: Currently, the SHA1 algorithm has been removed from general use by Google, and, if being used, needs to be whitelisted on a project basis by Google and will also, therefore, require a Google Cloud support contract.DNSSEC algorithm numbers in this registry may be used in CERT RRs. Zone signing (DNSSEC) and transaction security mechanisms (SIG(0) and TSIG) make use of particular subsets of these algorithms. The algorithm used for key signing should be a recommended one and it should be strong.",
@@ -812,7 +812,7 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Networking",
+          "Section": "3 Networking",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "NOTE: Currently, the SHA1 algorithm has been removed from general use by Google, and, if being used, needs to be whitelisted on a project basis by Google and will also, therefore, require a Google Cloud support contract.DNSSEC algorithm numbers in this registry may be used in CERT RRs. Zone signing (DNSSEC) and transaction security mechanisms (SIG(0) and TSIG) make use of particular subsets of these algorithms. The algorithm used for key signing should be a recommended one and it should be strong.",
@@ -834,7 +834,7 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Networking",
+          "Section": "3 Networking",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "GCP `Firewall Rules` are specific to a `VPC Network`. Each rule either `allows` or `denies` traffic when its conditions are met. Its conditions allow the user to specify the type of traffic, such as ports and protocols, and the source or destination of the traffic, including IP addresses, subnets, and instances.Firewall rules are defined at the VPC network level and are specific to the network in which they are defined. The rules themselves cannot be shared among networks. Firewall rules only support IPv4 traffic. When specifying a source for an ingress rule or a destination for an egress rule by address, only an `IPv4` address or `IPv4 block in CIDR` notation can be used. Generic `(0.0.0.0/0)` incoming traffic from the internet to VPC or VM instance using `SSH` on `Port 22` can be avoided.",
@@ -856,7 +856,7 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Networking",
+          "Section": "3 Networking",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "GCP `Firewall Rules` are specific to a `VPC Network`. Each rule either `allows` or `denies` traffic when its conditions are met. Its conditions allow users to specify the type of traffic, such as ports and protocols, and the source or destination of the traffic, including IP addresses, subnets, and instances.Firewall rules are defined at the VPC network level and are specific to the network in which they are defined. The rules themselves cannot be shared among networks. Firewall rules only support IPv4 traffic. When specifying a source for an ingress rule or a destination for an egress rule by address, an `IPv4` address or `IPv4 block in CIDR` notation can be used. Generic `(0.0.0.0/0)` incoming traffic from the Internet to a VPC or VM instance using `RDP` on `Port 3389` can be avoided.",
@@ -878,7 +878,7 @@
       ],
       "Attributes": [
         {
-          "Section": "3. Networking",
+          "Section": "3 Networking",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Flow Logs is a feature that enables users to capture information about the IP traffic going to and from network interfaces in the organization's VPC Subnets. Once a flow log is created, the user can view and retrieve its data in Stackdriver Logging. It is recommended that Flow Logs be enabled for every business-critical VPC subnet.",
@@ -898,7 +898,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "3. Networking",
+          "Section": "3 Networking",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "Secure Sockets Layer (SSL) policies determine what port Transport Layer Security (TLS) features clients are permitted to use when connecting to load balancers. To prevent usage of insecure features, SSL policies should use (a) at least TLS 1.2 with the MODERN profile; or (b) the RESTRICTED profile, because it effectively requires clients to use TLS 1.2 regardless of the chosen minimum TLS version; or (3) a CUSTOM profile that does not support any of the following features: ```TLS_RSA_WITH_AES_128_GCM_SHA256TLS_RSA_WITH_AES_256_GCM_SHA384TLS_RSA_WITH_AES_128_CBC_SHATLS_RSA_WITH_AES_256_CBC_SHATLS_RSA_WITH_3DES_EDE_CBC_SHA```",
@@ -918,7 +918,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "3. Networking",
+          "Section": "3 Networking",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "IAP authenticates the user requests to your apps via a Google single sign in. You can then manage these users with permissions to control access. It is recommended to use both IAP permissions and firewalls to restrict this access to your apps with sensitive information.",
@@ -940,7 +940,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Virtual Machines",
+          "Section": "4 Virtual Machines",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended to configure your instance to not use the default Compute Engine service account because it has the Editor role on the project.",
@@ -962,7 +962,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Virtual Machines",
+          "Section": "4 Virtual Machines",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "To support principle of least privileges and prevent potential privilege escalation it is recommended that instances are not assigned to default service account `Compute Engine default service account` with Scope `Allow full access to all Cloud APIs`.",
@@ -984,7 +984,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Virtual Machines",
+          "Section": "4 Virtual Machines",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended to use Instance specific SSH key(s) instead of using common/shared project-wide SSH key(s) to access Instances.",
@@ -1006,7 +1006,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Virtual Machines",
+          "Section": "4 Virtual Machines",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Enabling OS login binds SSH certificates to IAM users and facilitates effective SSH certificate management.",
@@ -1028,7 +1028,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Virtual Machines",
+          "Section": "4 Virtual Machines",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Interacting with a serial port is often referred to as the serial console, which is similar to using a terminal window, in that input and output is entirely in text mode and there is no graphical interface or mouse support.If you enable the interactive serial console on an instance, clients can attempt to connect to that instance from any IP address. Therefore interactive serial console support should be disabled.",
@@ -1050,7 +1050,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Virtual Machines",
+          "Section": "4 Virtual Machines",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Compute Engine instance cannot forward a packet unless the source IP address of the packet matches the IP address of the instance. Similarly, GCP won't deliver a packet whose destination IP address is different than the IP address of the instance receiving the packet. However, both capabilities are required if you want to use instances to help route packets.Forwarding of data packets should be disabled to prevent data loss or information disclosure.",
@@ -1072,7 +1072,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Virtual Machines",
+          "Section": "4 Virtual Machines",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Customer-Supplied Encryption Keys (CSEK) are a feature in Google Cloud Storage and Google Compute Engine. If you supply your own encryption keys, Google uses your key to protect the Google-generated keys used to encrypt and decrypt your data. By default, Google Compute Engine encrypts all data at rest. Compute Engine handles and manages this encryption for you without any additional actions on your part. However, if you wanted to control and manage this encryption yourself, you can provide your own encryption keys.",
@@ -1094,7 +1094,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Virtual Machines",
+          "Section": "4 Virtual Machines",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "To defend against advanced threats and ensure that the boot loader and firmware on your VMs are signed and untampered, it is recommended that Compute instances are launched with Shielded VM enabled.",
@@ -1116,7 +1116,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Virtual Machines",
+          "Section": "4 Virtual Machines",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Compute instances should not be configured to have external IP addresses.",
@@ -1136,7 +1136,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "4. Virtual Machines",
+          "Section": "4 Virtual Machines",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "In order to maintain the highest level of security all connections to an application should be secure by default.",
@@ -1158,7 +1158,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Virtual Machines",
+          "Section": "4 Virtual Machines",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "Google Cloud encrypts data at-rest and in-transit, but customer data must be decrypted for processing. Confidential Computing is a breakthrough technology which encrypts data in-useโ€”while it is being processed. Confidential Computing environments keep data encrypted in memory and elsewhere outside the central processing unit (CPU). Confidential VMs leverage the Secure Encrypted Virtualization (SEV) feature of AMD EPYCโ„ข CPUs. Customer data will stay encrypted while it is used, indexed, queried, or trained on. Encryption keys are generated in hardware, per VM, and not exportable. Thanks to built-in hardware optimizations of both performance and security, there is no significant performance penalty to Confidential Computing workloads.",
@@ -1178,7 +1178,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "4. Virtual Machines",
+          "Section": "4 Virtual Machines",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "Google Cloud Virtual Machines have the ability via an OS Config agent API to periodically (about every 10 minutes) report OS inventory data. A patch compliance API periodically reads this data, and cross references metadata to determine if the latest updates are installed.This is not the only Patch Management solution available to your organization and you should weigh your needs before committing to using this method.",
@@ -1200,7 +1200,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Storage",
+          "Section": "5 Storage",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended that IAM policy on Cloud Storage bucket does not allows anonymous or public access.",
@@ -1222,7 +1222,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Storage",
+          "Section": "5 Storage",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended that uniform bucket-level access is enabled on Cloud Storage buckets.",
@@ -1244,7 +1244,7 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
+          "Section": "6 Cloud SQL Database Services",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended to enforce all incoming connections to SQL database instance to use SSL.",
@@ -1266,7 +1266,7 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
+          "Section": "6 Cloud SQL Database Services",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Database Server should accept connections only from trusted Network(s)/IP(s) and restrict access from public IP addresses.",
@@ -1288,7 +1288,7 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
+          "Section": "6 Cloud SQL Database Services",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended to configure Second Generation Sql instance to use private IPs instead of public IPs.",
@@ -1310,7 +1310,7 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
+          "Section": "6 Cloud SQL Database Services",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended to have all SQL database instances set to enable automated backups.",
@@ -1330,8 +1330,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
-          "SubSection": "6.1. MySQL Database",
+          "Section": "6 Cloud SQL Database Services",
+          "SubSection": "6.1 MySQL Database",
           "Profile": "Level 1",
           "AssessmentStatus": "Manual",
           "Description": "It is recommended to set a password for the administrative user (`root` by default) to prevent unauthorized access to the SQL database instances.This recommendation is applicable only for MySQL Instances. PostgreSQL does not offer any setting for No Password from the cloud console.",
@@ -1353,8 +1353,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
-          "SubSection": "6.1. MySQL Database",
+          "Section": "6 Cloud SQL Database Services",
+          "SubSection": "6.1 MySQL Database",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended to set `skip_show_database` database flag for Cloud SQL Mysql instance to `on`",
@@ -1376,8 +1376,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
-          "SubSection": "6.1. MySQL Database",
+          "Section": "6 Cloud SQL Database Services",
+          "SubSection": "6.1 MySQL Database",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended to set the `local_infile` database flag for a Cloud SQL MySQL instance to `off`.",
@@ -1399,8 +1399,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
-          "SubSection": "6.2. PostgreSQL Database",
+          "Section": "6 Cloud SQL Database Services",
+          "SubSection": "6.2 PostgreSQL Database",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "The `log_error_verbosity` flag controls the verbosity/details of messages logged. Valid values are:- `TERSE`- `DEFAULT`- `VERBOSE``TERSE` excludes the logging of `DETAIL`, `HINT`, `QUERY`, and `CONTEXT` error information.`VERBOSE` output includes the `SQLSTATE` error code, source code file name, function name, and line number that generated the error.Ensure an appropriate value is set to 'DEFAULT' or stricter.",
@@ -1422,8 +1422,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
-          "SubSection": "6.2. PostgreSQL Database",
+          "Section": "6 Cloud SQL Database Services",
+          "SubSection": "6.2 PostgreSQL Database",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Enabling the `log_connections` setting causes each attempted connection to the server to be logged, along with successful completion of client authentication. This parameter cannot be changed after the session starts.",
@@ -1445,8 +1445,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
-          "SubSection": "6.2. PostgreSQL Database",
+          "Section": "6 Cloud SQL Database Services",
+          "SubSection": "6.2 PostgreSQL Database",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Enabling the `log_disconnections` setting logs the end of each session, including the session duration.",
@@ -1468,8 +1468,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
-          "SubSection": "6.2. PostgreSQL Database",
+          "Section": "6 Cloud SQL Database Services",
+          "SubSection": "6.2 PostgreSQL Database",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "The value of `log_statement` flag determined the SQL statements that are logged. Valid values are:- `none`- `ddl`- `mod`- `all`The value `ddl` logs all data definition statements.The value `mod` logs all ddl statements, plus data-modifying statements.The statements are logged after a basic parsing is done and statement type is determined, thus this does not logs statements with errors. When using extended query protocol, logging occurs after an Execute message is received and values of the Bind parameters are included.A value of 'ddl' is recommended unless otherwise directed by your organization's logging policy.",
@@ -1491,8 +1491,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
-          "SubSection": "6.2. PostgreSQL Database",
+          "Section": "6 Cloud SQL Database Services",
+          "SubSection": "6.2 PostgreSQL Database",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "The `log_min_messages` flag defines the minimum message severity level that is considered as an error statement. Messages for error statements are logged with the SQL statement. Valid values include (from lowest to highest severity) `DEBUG5`, `DEBUG4`, `DEBUG3`, `DEBUG2`, `DEBUG1`, `INFO`, `NOTICE`, `WARNING`, `ERROR`, `LOG`, `FATAL`, and `PANIC`.Each severity level includes the subsequent levels mentioned above. ERROR is considered the best practice setting. Changes should only be made in accordance with the organization's logging policy.",
@@ -1514,8 +1514,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
-          "SubSection": "6.2. PostgreSQL Database",
+          "Section": "6 Cloud SQL Database Services",
+          "SubSection": "6.2 PostgreSQL Database",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "The `log_min_error_statement` flag defines the minimum message severity level that are considered as an error statement. Messages for error statements are logged with the SQL statement. Valid values include (from lowest to highest severity) `DEBUG5`, `DEBUG4`, `DEBUG3`, `DEBUG2`, `DEBUG1`, `INFO`, `NOTICE`, `WARNING`, `ERROR`, `LOG`, `FATAL`, and `PANIC`.Each severity level includes the subsequent levels mentioned above. Ensure a value of `ERROR` or stricter is set.",
@@ -1537,8 +1537,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
-          "SubSection": "6.2. PostgreSQL Database",
+          "Section": "6 Cloud SQL Database Services",
+          "SubSection": "6.2 PostgreSQL Database",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "The `log_min_duration_statement` flag defines the minimum amount of execution time of a statement in milliseconds where the total duration of the statement is logged. Ensure that `log_min_duration_statement` is disabled, i.e., a value of `-1` is set.",
@@ -1560,8 +1560,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
-          "SubSection": "6.2. PostgreSQL Database",
+          "Section": "6 Cloud SQL Database Services",
+          "SubSection": "6.2 PostgreSQL Database",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "Ensure `cloudsql.enable_pgaudit` database flag for Cloud SQL PostgreSQL instance is set to `on` to allow for centralized logging.",
@@ -1583,8 +1583,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
-          "SubSection": "6.3. SQL Server",
+          "Section": "6 Cloud SQL Database Services",
+          "SubSection": "6.3 SQL Server",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended to set `external scripts enabled` database flag for Cloud SQL SQL Server instance to `off`",
@@ -1606,8 +1606,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
-          "SubSection": "6.3. SQL Server",
+          "Section": "6 Cloud SQL Database Services",
+          "SubSection": "6.3 SQL Server",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended to set `cross db ownership chaining` database flag for Cloud SQL SQL Server instance to `off`.This flag is deprecated for all SQL Server versions in CGP. Going forward, you can't set its value to on. However, if you have this flag enabled, we strongly recommend that you either remove the flag from your database or set it to off. For cross-database access, use the [Microsoft tutorial for signing stored procedures with a certificate](https://learn.microsoft.com/en-us/sql/relational-databases/tutorial-signing-stored-procedures-with-a-certificate?view=sql-server-ver16).",
@@ -1629,8 +1629,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
-          "SubSection": "6.3. SQL Server",
+          "Section": "6 Cloud SQL Database Services",
+          "SubSection": "6.3 SQL Server",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended to check the `user connections` for a Cloud SQL SQL Server instance to ensure that it is not artificially limiting connections.",
@@ -1652,8 +1652,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
-          "SubSection": "6.3. SQL Server",
+          "Section": "6 Cloud SQL Database Services",
+          "SubSection": "6.3 SQL Server",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended that, `user options` database flag for Cloud SQL SQL Server instance should not be configured.",
@@ -1675,8 +1675,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
-          "SubSection": "6.3. SQL Server",
+          "Section": "6 Cloud SQL Database Services",
+          "SubSection": "6.3 SQL Server",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended to set `remote access` database flag for Cloud SQL SQL Server instance to `off`.",
@@ -1694,12 +1694,12 @@
       "Id": "6.3.6",
       "Description": "Ensure '3625 (trace flag)' database flag for all Cloud SQL Server instances is set to 'on'",
       "Checks": [
-        "cloudsql_instance_sqlserver_trace_flag\""
+        "cloudsql_instance_sqlserver_trace_flag"
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
-          "SubSection": "6.3. SQL Server",
+          "Section": "6 Cloud SQL Database Services",
+          "SubSection": "6.3 SQL Server",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended to set `3625 (trace flag)` database flag for Cloud SQL SQL Server instance to `on`.",
@@ -1721,8 +1721,8 @@
       ],
       "Attributes": [
         {
-          "Section": "6. Cloud SQL Database Services",
-          "SubSection": "6.3. SQL Server",
+          "Section": "6 Cloud SQL Database Services",
+          "SubSection": "6.3 SQL Server",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended not to set `contained database authentication` database flag for Cloud SQL on the SQL Server instance to `on`.",
@@ -1744,7 +1744,7 @@
       ],
       "Attributes": [
         {
-          "Section": "7. BigQuery",
+          "Section": "7 BigQuery",
           "Profile": "Level 1",
           "AssessmentStatus": "Automated",
           "Description": "It is recommended that the IAM policy on BigQuery datasets does not allow anonymous and/or public access.",
@@ -1766,7 +1766,7 @@
       ],
       "Attributes": [
         {
-          "Section": "7. BigQuery",
+          "Section": "7 BigQuery",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "BigQuery by default encrypts the data as rest by employing `Envelope Encryption` using Google managed cryptographic keys. The data is encrypted using the `data encryption keys` and data encryption keys themselves are further encrypted using `key encryption keys`. This is seamless and do not require any additional input from the user. However, if you want to have greater control, Customer-managed encryption keys (CMEK) can be used as encryption key management solution for BigQuery Data Sets. If CMEK is used, the CMEK is used to encrypt the data encryption keys instead of using google-managed encryption keys.",
@@ -1788,7 +1788,7 @@
       ],
       "Attributes": [
         {
-          "Section": "7. BigQuery",
+          "Section": "7 BigQuery",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "BigQuery by default encrypts the data as rest by employing `Envelope Encryption` using Google managed cryptographic keys. The data is encrypted using the `data encryption keys` and data encryption keys themselves are further encrypted using `key encryption keys`. This is seamless and do not require any additional input from the user. However, if you want to have greater control, Customer-managed encryption keys (CMEK) can be used as encryption key management solution for BigQuery Data Sets.",
@@ -1808,7 +1808,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "7. BigQuery",
+          "Section": "7 BigQuery",
           "Profile": "Level 2",
           "AssessmentStatus": "Manual",
           "Description": "BigQuery tables can contain sensitive data that for security purposes should be discovered, monitored, classified, and protected. Google Cloud's Sensitive Data Protection tools can automatically provide data classification of all BigQuery data across an organization.",
@@ -1830,7 +1830,7 @@
       ],
       "Attributes": [
         {
-          "Section": "8. Dataproc",
+          "Section": "8 Dataproc",
           "Profile": "Level 2",
           "AssessmentStatus": "Automated",
           "Description": "When you use Dataproc, cluster and job data is stored on Persistent Disks (PDs) associated with the Compute Engine VMs in your cluster and in a Cloud Storage staging bucket. This PD and bucket data is encrypted using a Google-generated data encryption key (DEK) and key encryption key (KEK). The CMEK feature allows you to create, use, and revoke the key encryption key (KEK). Google still controls the data encryption key (DEK).",
diff --git a/prowler/compliance/gcp/mitre_attack_gcp.json b/prowler/compliance/gcp/mitre_attack_gcp.json
index 1c5af68300..af1a68f851 100644
--- a/prowler/compliance/gcp/mitre_attack_gcp.json
+++ b/prowler/compliance/gcp/mitre_attack_gcp.json
@@ -141,9 +141,11 @@
         "iam_organization_essential_contacts_configured",
         "iam_role_kms_enforce_separation_of_duties",
         "iam_role_sa_enforce_separation_of_duties",
+        "iam_sa_user_managed_key_unused",
         "iam_sa_no_administrative_privileges",
         "iam_sa_no_user_managed_keys",
         "iam_sa_user_managed_key_rotate_90_days",
+        "iam_service_account_unused",
         "apikeys_key_rotated_in_90_days",
         "apikeys_api_restrictions_configured"
       ],
diff --git a/prowler/compliance/gcp/prowler_threatscore_gcp.json b/prowler/compliance/gcp/prowler_threatscore_gcp.json
new file mode 100644
index 0000000000..f21949095f
--- /dev/null
+++ b/prowler/compliance/gcp/prowler_threatscore_gcp.json
@@ -0,0 +1,977 @@
+{
+  "Framework": "ProwlerThreatScore",
+  "Version": "1.0",
+  "Provider": "GCP",
+  "Description": "Prowler ThreatScore Compliance Framework for GCP ensures that the GCP project 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 User-Managed/External Keys for Service Accounts Are Rotated Every 90 Days or Fewer",
+      "Checks": [
+        "iam_sa_user_managed_key_rotate_90_days"
+      ],
+      "Attributes": [
+        {
+          "Title": "User-Managed/External Keys for Service Accounts Are Rotated Every 90 Days or Fewer",
+          "Section": "1. IAM",
+          "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": 1
+        }
+      ]
+    },
+    {
+      "Id": "1.1.2",
+      "Description": "Ensure API Keys Only Exist for Active Services",
+      "Checks": [
+        "apikeys_key_exists"
+      ],
+      "Attributes": [
+        {
+          "Title": "API Keys Only Exist for Active Services",
+          "Section": "1. IAM",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "1.1.3",
+      "Description": "Ensure API Keys Are Rotated Every 90 Days",
+      "Checks": [
+        "apikeys_key_rotated_in_90_days"
+      ],
+      "Attributes": [
+        {
+          "Title": "API Keys Are Rotated Every 90 Days",
+          "Section": "1. IAM",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "1.2.1",
+      "Description": "Ensure That There Are Only GCP-Managed Service Account Keys for Each Service Account",
+      "Checks": [
+        "iam_sa_no_user_managed_keysiam_sa_no_user_managed_keys"
+      ],
+      "Attributes": [
+        {
+          "Title": "Only GCP-Managed Service Account Keys for Each Service Account",
+          "Section": "1. IAM",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "1.2.2",
+      "Description": "Ensure That Service Account Has No Admin Privileges",
+      "Checks": [
+        "iam_sa_no_administrative_privileges"
+      ],
+      "Attributes": [
+        {
+          "Title": "SA Has No Admin Privileges",
+          "Section": "1. IAM",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "1.2.3",
+      "Description": "Ensure That Cloud KMS Cryptokeys Are Not Anonymously or Publicly Accessible",
+      "Checks": [
+        "kms_key_not_publicly_accessible"
+      ],
+      "Attributes": [
+        {
+          "Title": "Cloud KMS Cryptokeys Are Not Anonymously or Publicly Accessible",
+          "Section": "1. IAM",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "1.2.4",
+      "Description": "Ensure KMS Encryption Keys Are Rotated Within a Period of 90 Days",
+      "Checks": [
+        "kms_key_rotation_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "KMS Encryption Keys Are Rotated Within a Period of 90 Days",
+          "Section": "1. IAM",
+          "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": 1
+        }
+      ]
+    },
+    {
+      "Id": "1.2.5",
+      "Description": "Ensure That Separation of Duties Is Enforced While Assigning KMS Related Roles to Users",
+      "Checks": [
+        "iam_role_kms_enforce_separation_of_duties"
+      ],
+      "Attributes": [
+        {
+          "Title": "Separation of Duties Is Enforced While Assigning KMS Related Roles to Users",
+          "Section": "1. IAM",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "1.2.6",
+      "Description": "Ensure API Keys Are Restricted to Only APIs That Application Needs Access",
+      "Checks": [
+        "apikeys_api_restrictions_configured"
+      ],
+      "Attributes": [
+        {
+          "Title": "API Keys Are Restricted to Only APIs That Application Needs Access",
+          "Section": "1. IAM",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "1.3.1",
+      "Description": "Ensure That IAM Users Are Not Assigned the Service Account User or Service Account Token Creator Roles at Project Level",
+      "Checks": [
+        "iam_no_service_roles_at_project_level"
+      ],
+      "Attributes": [
+        {
+          "Title": "IAM Users Are Not Assigned the SA User or SA Token Creator Roles at Project Level",
+          "Section": "1. IAM",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "1.3.2",
+      "Description": "Ensure That Separation of Duties Is Enforced While Assigning Service Account Related Roles to Users",
+      "Checks": [
+        "iam_role_kms_enforce_separation_of_duties"
+      ],
+      "Attributes": [
+        {
+          "Title": "Separation of Duties Is Enforced While Assigning Service Account Related Roles to Users",
+          "Section": "1. IAM",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "1.3.3",
+      "Description": "Ensure That Cloud Audit Logging Is Configured Properly",
+      "Checks": [
+        "iam_audit_logs_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "Cloud Audit Logging Is Configured Properly",
+          "Section": "1. IAM",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "1.3.4",
+      "Description": "Ensure Log Metric Filter and Alerts Exist for Project Ownership Assignments/Changes",
+      "Checks": [
+        "logging_log_metric_filter_and_alert_for_project_ownership_changes_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "Log Metric Filter and Alerts Exist for Project Ownership Assignments/Changes",
+          "Section": "1. IAM",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "1.3.5",
+      "Description": "Ensure That the Log Metric Filter and Alerts Exist for Audit Configuration Changes",
+      "Checks": [
+        "logging_log_metric_filter_and_alert_for_audit_configuration_changes_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "Log Metric Filter and Alerts Exist for Audit Configuration Changes",
+          "Section": "1. IAM",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "1.3.6",
+      "Description": "Ensure That the Log Metric Filter and Alerts Exist for Custom Role Changes",
+      "Checks": [
+        "logging_log_metric_filter_and_alert_for_custom_role_changes_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "Log Metric Filter and Alerts Exist for Custom Role Changes",
+          "Section": "1. IAM",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "2.1.1",
+      "Description": "Ensure That the Default Network Does Not Exist in a Project ",
+      "Checks": [
+        "compute_network_default_in_use"
+      ],
+      "Attributes": [
+        {
+          "Title": "Default Network Does Not Exist in a Project ",
+          "Section": "2. Attack Surface",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "2.1.2",
+      "Description": "Ensure Legacy Networks Do Not Exist for Older Projects",
+      "Checks": [
+        "compute_network_not_legacy"
+      ],
+      "Attributes": [
+        {
+          "Title": "Legacy Networks Do Not Exist for Older Projects",
+          "Section": "2. Attack Surface",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "2.1.4",
+      "Description": "Ensure That SSH Access Is Restricted From the Internet",
+      "Checks": [
+        "compute_firewall_ssh_access_from_the_internet_allowed"
+      ],
+      "Attributes": [
+        {
+          "Title": "SSH Access Is Restricted From the Internet",
+          "Section": "2. Attack Surface",
+          "SubSection": "2.1 Network",
+          "AttributeDescription": "GCP Firewall Rules control ingress and egress traffic within a VPC Network. These rules define traffic conditions such as ports, protocols, and source/destination IPs. Firewall rules operate at the VPC level and cannot be shared across networks. Only IPv4 addresses are supported, and it is crucial to restrict generic (0.0.0.0/0) incoming traffic, particularly for SSH on Port 22, to prevent unauthorized access.",
+          "AdditionalInformation": "Firewall rules regulate traffic flow between instances and external networks. Allowing unrestricted inbound SSH access (0.0.0.0/0 on port 22) increases security risks by exposing instances to unauthorized access and brute-force attacks. To minimize threats, internet-facing access should be limited by specifying granular IP ranges and enforcing least privilege access.",
+          "LevelOfRisk": 5
+        }
+      ]
+    },
+    {
+      "Id": "2.1.5",
+      "Description": "Ensure That RDP Access Is Restricted From the Internet",
+      "Checks": [
+        "compute_firewall_rdp_access_from_the_internet_allowed"
+      ],
+      "Attributes": [
+        {
+          "Title": "RDP Access Is Restricted From the Internet",
+          "Section": "2. Attack Surface",
+          "SubSection": "2.1 Network",
+          "AttributeDescription": "GCP Firewall Rules control incoming (ingress) and outgoing (egress) traffic within a VPC Network. Each rule specifies traffic conditions, including ports, protocols, and source/destination IPs. These rules operate at the VPC level, cannot be shared across networks, and support only IPv4 addresses. To enhance security, unrestricted RDP access (0.0.0.0/0 on port 3389) should be avoided to prevent unauthorized remote connections.",
+          "AdditionalInformation": "Firewall rules regulate traffic flow between instances and external networks. Allowing unrestricted RDP access from the Internet exposes virtual machines (VMs) to unauthorized access and brute-force attacks. To mitigate risks, internet-facing access should be restricted by enforcing least privilege access, defining specific IP ranges, and implementing secure remote access solutions such as Bastion hosts or VPNs.",
+          "LevelOfRisk": 5
+        }
+      ]
+    },
+    {
+      "Id": "2.2.1",
+      "Description": "Ensure That Cloud Storage Bucket Is Not Anonymously or Publicly Accessible",
+      "Checks": [
+        "cloudstorage_bucket_public_access"
+      ],
+      "Attributes": [
+        {
+          "Title": "Cloud Storage Bucket Is Not Anonymously or Publicly Accessible",
+          "Section": "2. Attack Surface",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "2.2.2",
+      "Description": "Ensure 'user Connections' Database Flag for Cloud Sql Sql Server Instance Is Set to a Non-limiting Value",
+      "Checks": [
+        "cloudsql_instance_sqlserver_user_connections_flag"
+      ],
+      "Attributes": [
+        {
+          "Title": "user Connections Database Flag for Cloud Sql Sql Server Instance Is Set to a Non-limiting Value",
+          "Section": "2. Attack Surface",
+          "SubSection": "2.2 Storage",
+          "AttributeDescription": "Verify the user connection limits for Cloud SQL SQL Server instances to ensure they are not unnecessarily restricting the number of simultaneous connections.",
+          "AdditionalInformation": "The user connections setting controls the maximum number of concurrent user connections allowed on an SQL Server instance. By default, SQL Server dynamically adjusts the number of connections as needed, up to a maximum of 32,767. Setting an artificial limit may prevent new connections from being established, leading to potential data loss or service outages. It is recommended to review and adjust this setting as necessary to avoid disruptions.",
+          "LevelOfRisk": 2
+        }
+      ]
+    },
+    {
+      "Id": "2.2.3",
+      "Description": "Ensure 'remote access' database flag for Cloud SQL SQL Server instance is set to 'off'",
+      "Checks": [
+        "cloudsql_instance_sqlserver_remote_access_flag"
+      ],
+      "Attributes": [
+        {
+          "Title": "remote access database flag for Cloud SQL SQL Server instance is set to off",
+          "Section": "2. Attack Surface",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "2.2.5",
+      "Description": "Ensure That Cloud SQL Database Instances Do Not Implicitly Whitelist All Public IP Addresses",
+      "Checks": [
+        "cloudsql_instance_public_access"
+      ],
+      "Attributes": [
+        {
+          "Title": "Cloud SQL Database Instances Do Not Implicitly Whitelist All Public IP Addresses",
+          "Section": "2. Attack Surface",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "2.2.6",
+      "Description": "Ensure That Cloud SQL Database Instances Do Not Have Public IPs",
+      "Checks": [
+        "cloudsql_instance_public_access"
+      ],
+      "Attributes": [
+        {
+          "Title": "Cloud SQL Database Instances Do Not Have Public IPs",
+          "Section": "2. Attack Surface",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "2.2.7",
+      "Description": "Ensure That BigQuery Datasets Are Not Anonymously or Publicly Accessible",
+      "Checks": [
+        "bigquery_dataset_public_access"
+      ],
+      "Attributes": [
+        {
+          "Title": "BigQuery Datasets Are Not Anonymously or Publicly Accessible",
+          "Section": "2. Attack Surface",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "2.3.3",
+      "Description": "Ensure That Instances Are Not Configured To Use the Default Service Account With Full Access to All Cloud APIs",
+      "Checks": [
+        "compute_instance_default_service_account_in_use_with_full_api_access"
+      ],
+      "Attributes": [
+        {
+          "Title": "Instances Are Not Configured To Use the Default Service Account With Full Access to All Cloud APIs",
+          "Section": "2. Attack Surface",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "2.3.4",
+      "Description": "Ensure Block Project-Wide SSH Keys Is Enabled for VM Instances ",
+      "Checks": [
+        "compute_instance_block_project_wide_ssh_keys_disabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "Block Project-Wide SSH Keys Is Enabled for VM Instances ",
+          "Section": "2. Attack Surface",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "2.3.5",
+      "Description": "Ensure Enable Connecting to Serial Ports Is Not Enabled for VM Instance",
+      "Checks": [
+        "compute_instance_serial_ports_in_use"
+      ],
+      "Attributes": [
+        {
+          "Title": "Enable Connecting to Serial Ports Is Not Enabled for VM Instance",
+          "Section": "2. Attack Surface",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "2.3.6",
+      "Description": "Ensure That IP Forwarding Is Not Enabled on Instances",
+      "Checks": [
+        "compute_instance_ip_forwarding_is_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "IP Forwarding Is Not Enabled on Instances",
+          "Section": "2. Attack Surface",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "2.3.7",
+      "Description": "Ensure Compute Instances Are Launched With Shielded VM Enabled",
+      "Checks": [
+        "compute_instance_shielded_vm_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "Compute Instances Are Launched With Shielded VM Enabled",
+          "Section": "2. Attack Surface",
+          "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": 2
+        }
+      ]
+    },
+    {
+      "Id": "2.3.8",
+      "Description": "Ensure That Compute Instances Do Not Have Public IP Addresses",
+      "Checks": [
+        "compute_instance_public_ip"
+      ],
+      "Attributes": [
+        {
+          "Title": "That Compute Instances Do Not Have Public IP Addresses",
+          "Section": "2. Attack Surface",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "3.1.1",
+      "Description": "Ensure That Sinks Are Configured for All Log Entries",
+      "Checks": [
+        "cloudstorage_bucket_log_retention_policy_lock"
+      ],
+      "Attributes": [
+        {
+          "Title": "Sinks Are Configured for All Log Entries",
+          "Section": "3. Logging and Monitoring",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "3.1.2",
+      "Description": "Ensure That the Log Metric Filter and Alerts Exist for VPC Network Firewall Rule Changes",
+      "Checks": [
+        "logging_log_metric_filter_and_alert_for_vpc_firewall_rule_changes_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "Log Metric Filter and Alerts Exist for VPC Network Firewall Rule Changes",
+          "Section": "3. Logging and Monitoring",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "3.1.3",
+      "Description": "Ensure That the Log Metric Filter and Alerts Exist for VPC Network Route Changes",
+      "Checks": [
+        "logging_log_metric_filter_and_alert_for_vpc_network_route_changes_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "Log Metric Filter and Alerts Exist for VPC Network Route Changes",
+          "Section": "3. Logging and Monitoring",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "3.1.4",
+      "Description": "Ensure That the Log Metric Filter and Alerts Exist for VPC Network Changes",
+      "Checks": [
+        "logging_log_metric_filter_and_alert_for_vpc_network_changes_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "Log Metric Filter and Alerts Exist for VPC Network Changes",
+          "Section": "3. Logging and Monitoring",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "3.1.5",
+      "Description": "Ensure That the Log Metric Filter and Alerts Exist for Cloud Storage IAM Permission Changes",
+      "Checks": [
+        "logging_log_metric_filter_and_alert_for_bucket_permission_changes_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "Log Metric Filter and Alerts Exist for Cloud Storage IAM Permission Changes",
+          "Section": "3. Logging and Monitoring",
+          "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": 2
+        }
+      ]
+    },
+    {
+      "Id": "3.1.6",
+      "Description": "Ensure That the Log Metric Filter and Alerts Exist for SQL Instance Configuration Changes",
+      "Checks": [
+        "logging_log_metric_filter_and_alert_for_sql_instance_configuration_changes_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "Log Metric Filter and Alerts Exist for SQL Instance Configuration Changes",
+          "Section": "3. Logging and Monitoring",
+          "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": 2
+        }
+      ]
+    },
+    {
+      "Id": "3.1.7",
+      "Description": "Ensure Logging is enabled for HTTP(S) Load Balancer ",
+      "Checks": [
+        "compute_loadbalancer_logging_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "Logging is enabled for HTTP(S) Load Balancer ",
+          "Section": "3. Logging and Monitoring",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "3.1.8",
+      "Description": "Ensure that VPC Flow Logs is Enabled for Every Subnet in a VPC Network",
+      "Checks": [
+        "compute_subnet_flow_logs_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "VPC Flow Logs is Enabled for Every Subnet in a VPC Network",
+          "Section": "3. Logging and Monitoring",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "3.1.9",
+      "Description": "Ensure That the Log_connections Database Flag for Cloud SQL PostgreSQL Instance Is Set to On",
+      "Checks": [
+        "cloudsql_instance_postgres_log_connections_flag"
+      ],
+      "Attributes": [
+        {
+          "Title": "Log_connections Database Flag for Cloud SQL PostgreSQL Instance Is Set to On",
+          "Section": "3. Logging and Monitoring",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "3.1.10",
+      "Description": "Ensure That the Log_disconnections Database Flag for Cloud SQL PostgreSQL Instance Is Set to On",
+      "Checks": [
+        "cloudsql_instance_postgres_log_disconnections_flag"
+      ],
+      "Attributes": [
+        {
+          "Title": "Log_disconnections Database Flag for Cloud SQL PostgreSQL Instance Is Set to On",
+          "Section": "3. Logging and Monitoring",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "3.1.11",
+      "Description": "Ensure Log_statement Database Flag for Cloud SQL PostgreSQL Instance Is Set Appropriately",
+      "Checks": [
+        "cloudsql_instance_postgres_log_statement_flag"
+      ],
+      "Attributes": [
+        {
+          "Title": "Log_statement Database Flag for Cloud SQL PostgreSQL Instance Is Set Appropriately",
+          "Section": "3. Logging and Monitoring",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "3.1.12",
+      "Description": "Ensure that the Log_min_messages Flag for a Cloud SQL PostgreSQL Instance is set at minimum to 'Warning'",
+      "Checks": [
+        "cloudsql_instance_postgres_log_min_messages_flag"
+      ],
+      "Attributes": [
+        {
+          "Title": "Log_min_messages Flag for a Cloud SQL PostgreSQL Instance is set at minimum to Warning",
+          "Section": "3. Logging and Monitoring",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "3.1.13",
+      "Description": "Ensure Log_min_error_statement Database Flag for Cloud SQL PostgreSQL Instance Is Set to Error or Stricter",
+      "Checks": [
+        "cloudsql_instance_postgres_log_min_error_statement_flag"
+      ],
+      "Attributes": [
+        {
+          "Title": "Log_min_error_statement Database Flag for Cloud SQL PostgreSQL Instance Is Set to Error or Stricter",
+          "Section": "3. Logging and Monitoring",
+          "SubSection": "3.1 Logging",
+          "AttributeDescription": "The log_min_error_statement setting in PostgreSQL defines the minimum severity level for statements to be logged as errors. Valid values range from DEBUG5 (least severe) to PANIC (most severe). It is recommended to set this value to ERROR or stricter to ensure only relevant error statements are logged.",
+          "AdditionalInformation": "Proper logging aids in troubleshooting and forensic analysis. If log_min_error_statement is set too leniently, excessive log entries may make it difficult to identify actual errors. Conversely, if it is set too strictly, important errors may be missed. Setting this parameter to ERROR or higher ensures that significant issues are recorded while avoiding unnecessary log clutter.",
+          "LevelOfRisk": 3
+        }
+      ]
+    },
+    {
+      "Id": "3.1.14",
+      "Description": "Ensure That the Log_min_duration_statement Database Flag for Cloud SQL PostgreSQL Instance Is Set to '-1' (Disabled) ",
+      "Checks": [
+        "cloudsql_instance_postgres_log_min_duration_statement_flag"
+      ],
+      "Attributes": [
+        {
+          "Title": "Log_min_duration_statement Database Flag for Cloud SQL PostgreSQL Instance Is Set to -1 (Disabled) ",
+          "Section": "3. Logging and Monitoring",
+          "SubSection": "3.1 Logging",
+          "AttributeDescription": "The log_min_duration_statement setting in PostgreSQL determines the minimum execution time (in milliseconds) required for a statement to be logged. It is recommended to disable this setting by setting its value to -1.",
+          "AdditionalInformation": "Logging SQL statements may expose sensitive information, which could lead to security risks if recorded in logs. Disabling this setting ensures that confidential data is not inadvertently captured. This recommendation applies to PostgreSQL database instances.",
+          "LevelOfRisk": 3
+        }
+      ]
+    },
+    {
+      "Id": "3.1.15",
+      "Description": "Ensure That 'cloudsql.enable_pgaudit' Database Flag for each Cloud Sql Postgresql Instance Is Set to 'on' For Centralized Logging",
+      "Checks": [
+        "cloudsql_instance_postgres_enable_pgaudit_flag"
+      ],
+      "Attributes": [
+        {
+          "Title": "cloudsql.enable_pgaudit Database Flag for each Cloud Sql Postgresql Instance Is Set to on For Centralized Logging",
+          "Section": "3. Logging and Monitoring",
+          "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": 2
+        }
+      ]
+    },
+    {
+      "Id": "3.2.1",
+      "Description": "Ensure That Retention Policies on Cloud Storage Buckets Used for Exporting Logs Are Configured Using Bucket Lock",
+      "Checks": [
+        "cloudstorage_bucket_log_retention_policy_lock"
+      ],
+      "Attributes": [
+        {
+          "Title": "Retention Policies on Cloud Storage Buckets Used for Exporting Logs Are Configured Using Bucket Lock ",
+          "Section": "3. Logging and Monitoring",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "3.3.1",
+      "Description": "Ensure Cloud Asset Inventory Is Enabled",
+      "Checks": [
+        "iam_cloud_asset_inventory_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "Cloud Asset Inventory Enabled",
+          "Section": "3. Logging and Monitoring",
+          "SubSection": "3.3 Monitoring",
+          "AttributeDescription": "Google Cloud Asset Inventory provides a historical view of GCP resources and IAM policies using a time-series database. It captures metadata on cloud resources, policy configurations, and runtime data. Enabling Cloud Asset Inventory allows for efficient searching and exporting of asset data.",
+          "AdditionalInformation": "Cloud Asset Inventory enhances security analysis, resource change tracking, and compliance auditing by maintaining a detailed history of GCP resources and their configurations. Enabling it across all GCP projects ensures visibility into changes, helping organizations detect misconfigurations, track policy changes, and strengthen security posture.",
+          "LevelOfRisk": 4
+        }
+      ]
+    },
+    {
+      "Id": "3.3.2",
+      "Description": "Ensure 'Access Approval' is 'Enabled'",
+      "Checks": [
+        "iam_account_access_approval_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "Access Aproval Enabled",
+          "Section": "3. Logging and Monitoring",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "4.1.1",
+      "Description": "Ensure That DNSSEC Is Enabled for Cloud DNS ",
+      "Checks": [
+        "dns_dnssec_disabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "DNSSEC Is Enabled for Cloud DNS ",
+          "Section": "4. Encryption",
+          "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": 2
+        }
+      ]
+    },
+    {
+      "Id": "4.1.2",
+      "Description": "Ensure That the Cloud SQL Database Instance Requires All Incoming Connections To Use SSL",
+      "Checks": [
+        "cloudsql_instance_ssl_connections"
+      ],
+      "Attributes": [
+        {
+          "Title": "Cloud SQL Database Instance Requires All Incoming Connections To Use SSL",
+          "Section": "4. Encryption",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "4.1.3",
+      "Description": "Ensure That RSASHA1 Is Not Used for the Key-Signing Key in Cloud DNS DNSSEC",
+      "Checks": [
+        "dns_rsasha1_in_use_to_key_sign_in_dnssec"
+      ],
+      "Attributes": [
+        {
+          "Title": "RSASHA1 Is Not Used for the Key-Signing Key in Cloud DNS DNSSEC",
+          "Section": "4. Encryption",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "4.1.4",
+      "Description": "Ensure That RSASHA1 Is Not Used for the Zone-Signing Key in Cloud DNS DNSSEC",
+      "Checks": [
+        "dns_rsasha1_in_use_to_zone_sign_in_dnssec"
+      ],
+      "Attributes": [
+        {
+          "Title": "RSASHA1 Is Not Used for the Zone-Signing Key in Cloud DNS DNSSEC",
+          "Section": "4. Encryption",
+          "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": 3
+        }
+      ]
+    },
+    {
+      "Id": "4.2.1",
+      "Description": "Ensure VM Disks for Critical VMs Are Encrypted With Customer-Supplied Encryption Keys (CSEK)",
+      "Checks": [
+        "compute_instance_encryption_with_csek_enabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "VM Disks for Critical VMs Are Encrypted With Customer-Supplied Encryption Keys (CSEK)",
+          "Section": "4. Encryption",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "4.2.2",
+      "Description": "Ensure that Dataproc Cluster is encrypted using Customer-Managed Encryption Key",
+      "Checks": [
+        "dataproc_encrypted_with_cmks_disabled"
+      ],
+      "Attributes": [
+        {
+          "Title": "Dataproc Cluster is encrypted using Customer-Managed Encryption Key",
+          "Section": "4. Encryption",
+          "SubSection": "4.2 At-Rest",
+          "AttributeDescription": "When using Dataproc, the data associated with clusters and jobs is stored on Persistent Disks (PDs) linked to the Compute Engine VMs in your cluster and in a Cloud Storage staging bucket. This data is encrypted using a Google-generated Data Encryption Key (DEK) and a Key Encryption Key (KEK). The Customer-Managed Encryption Keys (CMEK) feature allows you to create, use, and revoke the KEK, although Google still controls the DEK used to encrypt the data.",
+          "AdditionalInformation": "Dataproc cluster data is encrypted using Google-managed keys: the Data Encryption Key (DEK) and the Key Encryption Key (KEK). If you wish to have control over the encryption of your cluster data, you can use your own Customer-Managed Keys (CMKs). Cloud KMS Customer-Managed Keys can add an extra layer of security and are commonly used in environments with strict compliance and security requirements.",
+          "LevelOfRisk": 4
+        }
+      ]
+    },
+    {
+      "Id": "4.2.3",
+      "Description": "Ensure BigQuery datasets are encrypted with Customer-Managed Keys (CMKs).",
+      "Checks": [
+        "bigquery_dataset_cmk_encryption"
+      ],
+      "Attributes": [
+        {
+          "Title": "BigQuery datasets are encrypted with Customer-Managed Keys (CMKs).",
+          "Section": "4. Encryption",
+          "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": 4
+        }
+      ]
+    },
+    {
+      "Id": "4.2.4",
+      "Description": "Ensure BigQuery tables are encrypted with Customer-Managed Keys (CMKs).",
+      "Checks": [
+        "bigquery_table_cmk_encryption"
+      ],
+      "Attributes": [
+        {
+          "Title": "BigQuery tables are encrypted with Customer-Managed Keys (CMKs).",
+          "Section": "4. Encryption",
+          "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": 4
+        }
+      ]
+    }
+  ]
+}
diff --git a/prowler/compliance/gcp/soc2_gcp.json b/prowler/compliance/gcp/soc2_gcp.json
new file mode 100644
index 0000000000..55e9da8d11
--- /dev/null
+++ b/prowler/compliance/gcp/soc2_gcp.json
@@ -0,0 +1,496 @@
+{
+  "Framework": "SOC2",
+  "Version": "",
+  "Provider": "GCP",
+  "Description": "System and Organization Controls (SOC), defined by the American Institute of Certified Public Accountants (AICPA), is the name of a set of reports that's produced during an audit. It's intended for use by service organizations (organizations that provide information systems as a service to other organizations) to issue validated reports of internal controls over those information systems to the users of those services. The reports focus on controls grouped into five categories known as Trust Service Principles.",
+  "Requirements": [
+    {
+      "Id": "cc_1_3",
+      "Name": "CC1.3 COSO Principle 3: Management establishes, with board oversight, structures, reporting lines, and appropriate authorities and responsibilities in the pursuit of objectives",
+      "Description": "Considers All Structures of the Entity - Management and the board of directors consider the multiple structures used (including operating units, legal entities, geographic distribution, and outsourced service providers) to support the achievement of objectives. Establishes Reporting Lines - Management designs and evaluates lines of reporting for each entity structure to enable execution of authorities and responsibilities and flow of information to manage the activities of the entity. Defines, Assigns, and Limits Authorities and Responsibilities - Management and the board of directors delegate authority, define responsibilities, and use appropriate processes and technology to assign responsibility and segregate duties as necessary at the various levels of the organization. Additional points of focus specifically related to all engagements using the trust services criteria: Addresses Specific Requirements When Defining Authorities and Responsibilitiesโ€”Management and the board of directors consider requirements relevant to security, availability, processing integrity, confidentiality, and privacy when defining authorities and responsibilities. Considers Interactions With External Parties When Establishing Structures, Reporting Lines, Authorities, and Responsibilities โ€” Management and the board of directors consider the need for the entity to interact with and monitor the activities of external parties when establishing structures, reporting lines, authorities, and responsibilities.",
+      "Attributes": [
+        {
+          "ItemId": "cc_1_3",
+          "Section": "CC1.0 - Common Criteria Related to Control Environment",
+          "Service": "iam",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "iam_account_access_approval_enabled",
+        "iam_cloud_asset_inventory_enabled",
+        "iam_no_service_roles_at_project_level",
+        "iam_organization_essential_contacts_configured",
+        "iam_role_kms_enforce_separation_of_duties",
+        "iam_role_sa_enforce_separation_of_duties",
+        "iam_sa_no_administrative_privileges",
+        "iam_sa_no_user_managed_keys",
+        "iam_sa_user_managed_key_unused"
+      ]
+    },
+    {
+      "Id": "cc_2_1",
+      "Name": "CC2.1 COSO Principle 13: The entity obtains or generates and uses relevant, quality information to support the functioning of internal control",
+      "Description": "Identifies Information Requirements - A process is in place to identify the information required and expected to support the functioning of the other components of internal control and the achievement of the entityโ€™s objectives. Captures Internal and External Sources of Data - Information systems capture internal and external sources of data. Processes Relevant Data Into Information - Information systems process and transform relevant data into information. Maintains Quality Throughout Processing - Information systems produce information that is timely, current, accurate, complete, accessible, protected, verifiable, and retained. Information is reviewed to assess its relevance in supporting the internal control components.",
+      "Attributes": [
+        {
+          "ItemId": "cc_2_1",
+          "Section": "CC2.0 - Common Criteria Related to Communication and Information",
+          "Service": "logging",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "logging_log_metric_filter_and_alert_for_audit_configuration_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_bucket_permission_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_custom_role_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_project_ownership_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_sql_instance_configuration_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_vpc_firewall_rule_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_vpc_network_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_vpc_network_route_changes_enabled",
+        "logging_sink_created"
+      ]
+    },
+    {
+      "Id": "cc_3_1",
+      "Name": "CC3.1 COSO Principle 6: The entity specifies objectives with sufficient clarity to enable the identification and assessment of risks relating to objectives",
+      "Description": "Operations Objectives: Reflects Management's Choices - Operations objectives reflect management's choices about structure, industry considerations, and performance of the entity. Considers Tolerances for Risk - Management considers the acceptable levels of variation relative to the achievement of operations objectives. External Financial Reporting Objectives: Complies With Applicable Accounting Standards - Financial reporting objectives are consistent with accounting principles suitable and available for that entity. The accounting principles selected are appropriate in the circumstances. External Nonfinancial Reporting Objectives: Complies With Externally Established Frameworks - Management establishes objectives consistent with lgcp and regulations or standards and frameworks of recognized external organizations. Reflects Entity Activities - External reporting reflects the underlying transactions and events within a range of acceptable limits. Considers the Required Level of Precisionโ€”Management reflects the required level of precision and accuracy suitable for user needs and based on criteria established by third parties in nonfinancial reporting. Internal Reporting Objectives: Reflects Management's Choices - Internal reporting provides management with accurate and complete information regarding management's choices and information needed in managing the entity. Considers the Required Level of Precisionโ€”Management reflects the required level of precision and accuracy suitable for user needs in nonfinancial reporting objectives and materiality within financial reporting objectives. Reflects Entity Activitiesโ€”Internal reporting reflects the underlying transactions and events within a range of acceptable limits. Compliance Objectives: Reflects External Lgcp and Regulations - Lgcp and regulations establish minimum standards of conduct, which the entity integrates into compliance objectives. Considers Tolerances for Risk - Management considers the acceptable levels of variation relative to the achievement of operations objectives. Additional point of focus specifically related to all engagements using the trust services criteria: Establishes Sub-objectives to Support Objectivesโ€”Management identifies sub-objectives related to security, availability, processing integrity, confidentiality, and privacy to support the achievement of the entityโ€™s objectives related to reporting, operations, and compliance.",
+      "Attributes": [
+        {
+          "ItemId": "cc_3_1",
+          "Section": "CC3.0 - Common Criteria Related to Risk Assessment",
+          "Service": "gcp",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "gcr_container_scanning_enabled",
+        "artifacts_container_analysis_enabled"
+      ]
+    },
+    {
+      "Id": "cc_3_2",
+      "Name": "CC3.2 COSO Principle 7: The entity identifies risks to the achievement of its objectives across the entity and analyzes risks as a basis for determining how the risks should be managed",
+      "Description": "Includes Entity, Subsidiary, Division, Operating Unit, and Functional Levels - The entity identifies and assesses risk at the entity, subsidiary, division, operating unit, and functional levels relevant to the achievement of objectives. Analyzes Internal and External Factors - Risk identification considers both internal and external factors and their impact on the achievement of objectives. Involves Appropriate Levels of Management - The entity puts into place effective risk assessment mechanisms that involve appropriate levels of management. Estimates Significance of Risks Identified - Identified risks are analyzed through a process that includes estimating the potential significance of the risk. Determines How to Respond to Risks - Risk assessment includes considering how the risk should be managed and whether to accept, avoid, reduce, or share the risk. Additional points of focus specifically related to all engagements using the trust services criteria: Identifies and Assesses Criticality of Information Assets and Identifies Threats and Vulnerabilities - The entity's risk identification and assessment process includes (1) identifying information assets, including physical devices and systems, virtual devices, software, data and data flows, external information systems, and organizational roles; (2) assessing the criticality of those information assets; (3) identifying the threats to the assets from intentional (including malicious) and unintentional acts and environmental events; and (4) identifying the vulnerabilities of the identified assets.",
+      "Attributes": [
+        {
+          "ItemId": "cc_3_2",
+          "Section": "CC3.0 - Common Criteria Related to Risk Assessment",
+          "Service": "gcr",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "gcr_container_scanning_enabled"
+      ]
+    },
+    {
+      "Id": "cc_3_3",
+      "Name": "CC3.3 COSO Principle 8: The entity considers the potential for fraud in assessing risks to the achievement of objectives",
+      "Description": "Considers Various Types of Fraud - The assessment of fraud considers fraudulent reporting, possible loss of assets, and corruption resulting from the various ways that fraud and misconduct can occur. Assesses Incentives and Pressures - The assessment of fraud risks considers incentives and pressures. Assesses Opportunities - The assessment of fraud risk considers opportunities for unauthorized acquisition,use, or disposal of assets, altering the entityโ€™s reporting records, or committing other inappropriate acts. Assesses Attitudes and Rationalizations - The assessment of fraud risk considers how management and other personnel might engage in or justify inappropriate actions. Additional point of focus specifically related to all engagements using the trust services criteria: Considers the Risks Related to the Use of IT and Access to Information - The assessment of fraud risks includes consideration of threats and vulnerabilities that arise specifically from the use of IT and access to information.",
+      "Attributes": [
+        {
+          "ItemId": "cc_3_3",
+          "Section": "CC3.0 - Common Criteria Related to Risk Assessment",
+          "Service": "logging",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "logging_log_metric_filter_and_alert_for_project_ownership_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_sql_instance_configuration_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_bucket_permission_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_vpc_network_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_vpc_network_route_changes_enabled"
+      ]
+    },
+    {
+      "Id": "cc_3_4",
+      "Name": "CC3.4 COSO Principle 9: The entity identifies and assesses changes that could significantly impact the system of internal control",
+      "Description": "Assesses Changes in the External Environment - The risk identification process considers changes to the regulatory, economic, and physical environment in which the entity operates. Assesses Changes in the Business Model - The entity considers the potential impacts of new business lines, dramatically altered compositions of existing business lines, acquired or divested business operations on the system of internal control, rapid growth, changing reliance on foreign geographies, and new technologies. Assesses Changes in Leadership - The entity considers changes in management and respective attitudes and philosophies on the system of internal control. Assess Changes in Systems and Technology - The risk identification process considers changes arising from changes in the entityโ€™s systems and changes in the technology environment. Assess Changes in Vendor and Business Partner Relationships - The risk identification process considers changes in vendor and business partner relationships.",
+      "Attributes": [
+        {
+          "ItemId": "cc_3_4",
+          "Section": "CC3.0 - Common Criteria Related to Risk Assessment",
+          "Service": "iam",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "iam_cloud_asset_inventory_enabled"
+      ]
+    },
+    {
+      "Id": "cc_4_2",
+      "Name": "CC4.2 COSO Principle 17: The entity evaluates and communicates internal control deficiencies in a timely manner to those parties responsible for taking corrective action, including senior management and the board of directors, as appropriate",
+      "Description": "Assesses Results - Management and the board of directors, as appropriate, assess results of ongoing and separate evaluations. Communicates Deficiencies - Deficiencies are communicated to parties responsible for taking corrective action and to senior management and the board of directors, as appropriate. Monitors Corrective Action - Management tracks whether deficiencies are remedied on a timely basis.",
+      "Attributes": [
+        {
+          "ItemId": "cc_4_2",
+          "Section": "CC4.0 - Monitoring Activities",
+          "Service": "iam",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "iam_cloud_asset_inventory_enabled"
+      ]
+    },
+    {
+      "Id": "cc_5_2",
+      "Name": "CC5.2 COSO Principle 11: The entity also selects and develops general control activities over technology to support the achievement of objectives",
+      "Description": "Determines Dependency Between the Use of Technology in Business Processes and Technology General Controls - Management understands and determines the dependency and linkage between business processes, automated control activities, and technology general controls. Establishes Relevant Technology Infrastructure Control Activities - Management selects and develops control activities over the technology infrastructure, which are designed and implemented to help ensure the completeness, accuracy, and availability of technology processing. Establishes Relevant Security Management Process Controls Activities - Management selects and develops control activities that are designed and implemented to restrict technology access rights to authorized users commensurate with their job responsibilities and to protect the entityโ€™s assets from external threats. Establishes Relevant Technology Acquisition, Development, and Maintenance Process Control Activities - Management selects and develops control activities over the acquisition, development, and maintenance of technology and its infrastructure to achieve managementโ€™s objectives.",
+      "Attributes": [
+        {
+          "ItemId": "cc_5_2",
+          "Section": "CC5.0 - Control Activities",
+          "Service": "logging",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "logging_log_metric_filter_and_alert_for_audit_configuration_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_bucket_permission_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_custom_role_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_project_ownership_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_sql_instance_configuration_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_vpc_firewall_rule_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_vpc_network_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_vpc_network_route_changes_enabled",
+        "logging_sink_created"
+      ]
+    },
+    {
+      "Id": "cc_6_1",
+      "Name": "CC6.1 The entity implements logical access security software, infrastructure, and architectures over protected information assets to protect them from security events to meet the entity's objectives",
+      "Description": "Identifies and Manages the Inventory of Information Assets - The entity identifies, inventories, classifies, and manages information assets. Restricts Logical Access - Logical access to information assets, including hardware, data (at-rest, during processing, or in transmission), software, administrative authorities, mobile devices, output, and offline system components is restricted through the use of access control software and rule sets. Identifies and Authenticates Users - Persons, infrastructure and software are identified and authenticated prior to accessing information assets, whether locally or remotely. Considers Network Segmentation - Network segmentation permits unrelated portions of the entity's information system to be isolated from each other. Manages Points of Access - Points of access by outside entities and the types of data that flow through the points of access are identified, inventoried, and managed. The types of individuals and systems using each point of access are identified, documented, and managed. Restricts Access to Information Assets - Combinations of data classification, separate data structures, port restrictions, access protocol restrictions, user identification, and digital certificates are used to establish access control rules for information assets. Manages Identification and Authentication - Identification and authentication requirements are established, documented, and managed for individuals and systems accessing entity information, infrastructure and software. Manages Credentials for Infrastructure and Software - New internal and external infrastructure and software are registered, authorized, and documented prior to being granted access credentials and implemented on the network or access point. Credentials are removed and access is disabled when access is no longer required or the infrastructure and software are no longer in use. Uses Encryption to Protect Data - The entity uses encryption to supplement other measures used to protect data-at-rest, when such protections are deemed appropriate based on assessed risk. Protects Encryption Keys - Processes are in place to protect encryption keys during generation, storage, use, and destruction.",
+      "Attributes": [
+        {
+          "ItemId": "cc_6_1",
+          "Section": "CC6.0 - Logical and Physical Access",
+          "Service": "cloudstorage",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "cloudstorage_bucket_public_access"
+      ]
+    },
+    {
+      "Id": "cc_6_2",
+      "Name": "CC6.2 Prior to issuing system credentials and granting system access, the entity registers and authorizes new internal and external users whose access is administered by the entity",
+      "Description": "Prior to issuing system credentials and granting system access, the entity registers and authorizes new internal and external users whose access is administered by the entity. For those users whose access is administered by the entity, user system credentials are removed when user access is no longer authorized. Controls Access Credentials to Protected Assets - Information asset access credentials are created based on an authorization from the system's asset owner or authorized custodian. Removes Access to Protected Assets When Appropriate - Processes are in place to remove credential access when an individual no longer requires such access. Reviews Appropriateness of Access Credentials - The appropriateness of access credentials is reviewed on a periodic basis for unnecessary and inappropriate individuals with credentials.",
+      "Attributes": [
+        {
+          "ItemId": "cc_6_2",
+          "Section": "CC6.0 - Logical and Physical Access",
+          "Service": "cloudsql",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "cloudsql_instance_public_access"
+      ]
+    },
+    {
+      "Id": "cc_6_3",
+      "Name": "CC6.3 The entity authorizes, modifies, or removes access to data, software, functions, and other protected information assets based on roles, responsibilities, or the system design and changes, giving consideration to the concepts of least privilege and segregation of duties, to meet the entityโ€™s objectives",
+      "Description": "Creates or Modifies Access to Protected Information Assets - Processes are in place to create or modify access to protected information assets based on authorization from the assetโ€™s owner. Removes Access to Protected Information Assets - Processes are in place to remove access to protected information assets when an individual no longer requires access. Uses Role-Based Access Controls - Role-based access control is utilized to support segregation of incompatible functions.",
+      "Attributes": [
+        {
+          "ItemId": "cc_6_3",
+          "Section": "CC6.0 - Logical and Physical Access",
+          "Service": "iam",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "iam_account_access_approval_enabled",
+        "iam_role_kms_enforce_separation_of_duties",
+        "iam_role_sa_enforce_separation_of_duties",
+        "iam_sa_no_administrative_privileges",
+        "iam_sa_user_managed_key_unused"
+      ]
+    },
+    {
+      "Id": "cc_6_6",
+      "Name": "CC6.6 The entity implements logical access security measures to protect against threats from sources outside its system boundaries",
+      "Description": "Restricts Access โ€” The types of activities that can occur through a communication channel (for example, FTP site, router port) are restricted. Protects Identification and Authentication Credentials โ€” Identification and authentication credentials are protected during transmission outside its system boundaries. Requires Additional Authentication or Credentials โ€” Additional authentication information or credentials are required when accessing the system from outside its boundaries. Implements Boundary Protection Systems โ€” Boundary protection systems (for example, firewalls, demilitarized zones, and intrusion detection systems) are implemented to protect external access points from attempts and unauthorized access and are monitored to detect such attempts.",
+      "Attributes": [
+        {
+          "ItemId": "cc_6_6",
+          "Section": "CC6.0 - Logical and Physical Access",
+          "Service": "compute",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "compute_firewall_rdp_access_from_the_internet_allowed",
+        "compute_firewall_ssh_access_from_the_internet_allowed",
+        "compute_instance_block_project_wide_ssh_keys_disabled",
+        "compute_instance_ip_forwarding_is_enabled",
+        "compute_instance_public_ip",
+        "compute_instance_serial_ports_in_use",
+        "compute_network_dns_logging_enabled",
+        "compute_public_address_shodan"
+      ]
+    },
+    {
+      "Id": "cc_6_7",
+      "Name": "CC6.7 The entity restricts the transmission, movement, and removal of information to authorized internal and external users and processes, and protects it during transmission, movement, or removal to meet the entityโ€™s objectives",
+      "Description": "Restricts the Ability to Perform Transmission - Data loss prevention processes and technologies are used to restrict ability to authorize and execute transmission, movement and removal of information. Uses Encryption Technologies or Secure Communication Channels to Protect Data - Encryption technologies or secured communication channels are used to protect transmission of data and other communications beyond connectivity access points. Protects Removal Media - Encryption technologies and physical asset protections are used for removable media (such as USB drives and back-up tapes), as appropriate. Protects Mobile Devices - Processes are in place to protect mobile devices (such as laptops, smart phones and tablets) that serve as information assets.",
+      "Attributes": [
+        {
+          "ItemId": "cc_6_7",
+          "Section": "CC6.0 - Logical and Physical Access",
+          "Service": "gcp",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "dns_dnssec_disabled",
+        "dns_rsasha1_in_use_to_key_sign_in_dnssec",
+        "dns_rsasha1_in_use_to_zone_sign_in_dnssec",
+        "compute_firewall_rdp_access_from_the_internet_allowed",
+        "compute_firewall_ssh_access_from_the_internet_allowed",
+        "cloudsql_instance_ssl_connections"
+      ]
+    },
+    {
+      "Id": "cc_6_8",
+      "Name": "CC6.8 The entity implements controls to prevent or detect and act upon the introduction of unauthorized or malicious software to meet the entityโ€™s objectives",
+      "Description": "Restricts Application and Software Installation - The ability to install applications and software is restricted to authorized individuals. Detects Unauthorized Changes to Software and Configuration Parameters - Processes are in place to detect changes to software and configuration parameters that may be indicative of unauthorized or malicious software. Uses a Defined Change Control Process - A management-defined change control process is used for the implementation of software. Uses Antivirus and Anti-Malware Software - Antivirus and anti-malware software is implemented and maintained to provide for the interception or detection and remediation of malware. Scans Information Assets from Outside the Entity for Malware and Other Unauthorized Software - Procedures are in place to scan information assets that have been transferred or returned to the entityโ€™s custody for malware and other unauthorized software and to remove any items detected prior to its implementation on the network.",
+      "Attributes": [
+        {
+          "ItemId": "cc_6_8",
+          "Section": "CC6.0 - Logical and Physical Access",
+          "Service": "gcp",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "iam_cloud_asset_inventory_enabled"
+      ]
+    },
+    {
+      "Id": "cc_7_1",
+      "Name": "CC7.1 To meet its objectives, the entity uses detection and monitoring procedures to identify (1) changes to configurations that result in the introduction of new vulnerabilities, and (2) susceptibilities to newly discovered vulnerabilities",
+      "Description": "Uses Defined Configuration Standards - Management has defined configuration standards. Monitors Infrastructure and Software - The entity monitors infrastructure and software for noncompliance with the standards, which could threaten the achievement of the entity's objectives. Implements Change-Detection Mechanisms - The IT system includes a change-detection mechanism (for example, file integrity monitoring tools) to alert personnel to unauthorized modifications of critical system files, configuration files, or content files. Detects Unknown or Unauthorized Components - Procedures are in place to detect the introduction of unknown or unauthorized components. Conducts Vulnerability Scans - The entity conducts vulnerability scans designed to identify potential vulnerabilities or misconfigurations on a periodic basis and after any significant change in the environment and takes action to remediate identified deficiencies on a timely basis.",
+      "Attributes": [
+        {
+          "ItemId": "cc_7_1",
+          "Section": "CC7.0 - System Operations",
+          "Service": "iam",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "iam_cloud_asset_inventory_enabled"
+      ]
+    },
+    {
+      "Id": "cc_7_2",
+      "Name": "CC7.2 The entity monitors system components and the operation of those components for anomalies that are indicative of malicious acts, natural disasters, and errors affecting the entity's ability to meet its objectives; anomalies are analyzed to determine whether they represent security events",
+      "Description": "Implements Detection Policies, Procedures, and Tools - Detection policies and procedures are defined and implemented, and detection tools are implemented on Infrastructure and software to identify anomalies in the operation or unusual activity on systems. Procedures may include (1) a defined governance process for security event detection and management that includes provision of resources; (2) use of intelligence sources to identify newly discovered threats and vulnerabilities; and (3) logging of unusual system activities. Designs Detection Measures - Detection measures are designed to identify anomalies that could result from actual or attempted (1) compromise of physical barriers; (2) unauthorized actions of authorized personnel; (3) use of compromised identification and authentication credentials; (4) unauthorized access from outside the system boundaries; (5) compromise of authorized external parties; and (6) implementation or connection of unauthorized hardware and software. Implements Filters to Analyze Anomalies - Management has implemented procedures to filter, summarize, and analyze anomalies to identify security events. Monitors Detection Tools for Effective Operation - Management has implemented processes to monitor the effectiveness of detection tools.",
+      "Attributes": [
+        {
+          "ItemId": "cc_7_2",
+          "Section": "CC7.0 - System Operations",
+          "Service": "gcp",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "cloudsql_instance_postgres_log_connections_flag",
+        "cloudsql_instance_postgres_log_disconnections_flag",
+        "cloudsql_instance_postgres_log_error_verbosity_flag",
+        "cloudsql_instance_postgres_log_min_duration_statement_flag",
+        "cloudsql_instance_postgres_log_min_error_statement_flag",
+        "cloudsql_instance_postgres_log_min_messages_flag",
+        "cloudsql_instance_postgres_log_statement_flag",
+        "cloudstorage_bucket_log_retention_policy_lock",
+        "compute_loadbalancer_logging_enabled",
+        "compute_network_dns_logging_enabled",
+        "compute_project_os_login_enabled",
+        "compute_subnet_flow_logs_enabled",
+        "iam_audit_logs_enabled",
+        "logging_log_metric_filter_and_alert_for_audit_configuration_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_bucket_permission_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_custom_role_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_project_ownership_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_sql_instance_configuration_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_vpc_firewall_rule_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_vpc_network_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_vpc_network_route_changes_enabled",
+        "logging_sink_created"
+      ]
+    },
+    {
+      "Id": "cc_7_3",
+      "Name": "CC7.3 The entity evaluates security events to determine whether they could or have resulted in a failure of the entity to meet its objectives (security incidents) and, if so, takes actions to prevent or address such failures",
+      "Description": "Responds to Security Incidents - Procedures are in place for responding to security incidents and evaluating the effectiveness of those policies and procedures on a periodic basis. Communicates and Reviews Detected Security Events - Detected security events are communicated to and reviewed by the individuals responsible for the management of the security program and actions are taken, if necessary. Develops and Implements Procedures to Analyze Security Incidents - Procedures are in place to analyze security incidents and determine system impact. Assesses the Impact on Personal Information - Detected security events are evaluated to determine whether they could or did result in the unauthorized disclosure or use of personal information and whether there has been a failure to comply with applicable lgcp or regulations. Determines Personal Information Used or Disclosed - When an unauthorized use or disclosure of personal information has occurred, the affected information is identified.",
+      "Attributes": [
+        {
+          "ItemId": "cc_7_3",
+          "Section": "CC7.0 - System Operations",
+          "Service": "gcp",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "cloudsql_instance_postgres_log_connections_flag",
+        "cloudsql_instance_postgres_log_disconnections_flag",
+        "cloudsql_instance_postgres_log_error_verbosity_flag",
+        "cloudsql_instance_postgres_log_min_duration_statement_flag",
+        "cloudsql_instance_postgres_log_min_error_statement_flag",
+        "cloudsql_instance_postgres_log_min_messages_flag",
+        "cloudsql_instance_postgres_log_statement_flag",
+        "cloudstorage_bucket_log_retention_policy_lock",
+        "compute_loadbalancer_logging_enabled",
+        "compute_network_dns_logging_enabled",
+        "compute_project_os_login_enabled",
+        "compute_subnet_flow_logs_enabled",
+        "iam_audit_logs_enabled",
+        "logging_log_metric_filter_and_alert_for_audit_configuration_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_bucket_permission_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_custom_role_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_project_ownership_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_sql_instance_configuration_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_vpc_firewall_rule_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_vpc_network_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_vpc_network_route_changes_enabled",
+        "iam_cloud_asset_inventory_enabled"
+      ]
+    },
+    {
+      "Id": "cc_7_4",
+      "Name": "CC7.4 The entity responds to identified security incidents by executing a defined incident response program to understand, contain, remediate, and communicate security incidents, as appropriate",
+      "Description": "Assigns Roles and Responsibilities - Roles and responsibilities for the design, implementation, maintenance, and execution of the incident response program are assigned, including the use of external resources when necessary. Contains Security Incidents - Procedures are in place to contain security incidents that actively threaten entity objectives. Mitigates Ongoing Security Incidents - Procedures are in place to mitigate the effects of ongoing security incidents. Ends Threats Posed by Security Incidents - Procedures are in place to end the threats posed by security incidents through closure of the vulnerability, removal of unauthorized access, and other remediation actions. Restores Operations - Procedures are in place to restore data and business operations to an interim state that permits the achievement of entity objectives. Develops and Implements Communication Protocols for Security Incidents - Protocols for communicating security incidents and actions taken to affected parties are developed and implemented to meet the entity's objectives. Obtains Understanding of Nature of Incident and Determines Containment Strategy - An understanding of the nature (for example, the method by which the incident occurred and the affected system resources) and severity of the security incident is obtained to determine the appropriate containment strategy, including (1) a determination of the appropriate response time frame, and (2) the determination and execution of the containment approach. Remediates Identified Vulnerabilities - Identified vulnerabilities are remediated through the development and execution of remediation activities. Communicates Remediation Activities - Remediation activities are documented and communicated in accordance with the incident response program. Evaluates the Effectiveness of Incident Response - The design of incident response activities is evaluated for effectiveness on a periodic basis. Periodically Evaluates Incidents - Periodically, management reviews incidents related to security, availability, processing integrity, confidentiality, and privacy and identifies the need for system changes based on incident patterns and root causes. Communicates Unauthorized Use and Disclosure - Events that resulted in unauthorized use or disclosure of personal information are communicated to the data subjects, legal and regulatory authorities, and others as required. Application of Sanctions - The conduct of individuals and organizations operating under the authority of the entity and involved in the unauthorized use or disclosure of personal information is evaluated and, if appropriate, sanctioned in accordance with entity policies and legal and regulatory requirements.",
+      "Attributes": [
+        {
+          "ItemId": "cc_7_4",
+          "Section": "CC7.0 - System Operations",
+          "Service": "gcp",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "logging_log_metric_filter_and_alert_for_audit_configuration_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_bucket_permission_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_custom_role_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_project_ownership_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_sql_instance_configuration_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_vpc_firewall_rule_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_vpc_network_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_vpc_network_route_changes_enabled",
+        "cloudsql_instance_automated_backups"
+      ]
+    },
+    {
+      "Id": "cc_7_5",
+      "Name": "CC7.5 The entity identifies, develops, and implements activities to recover from identified security incidents",
+      "Description": "Restores the Affected Environment - The activities restore the affected environment to functional operation by rebuilding systems, updating software, installing patches, and changing configurations, as needed. Communicates Information About the Event - Communications about the nature of the incident, recovery actions taken, and activities required for the prevention of future security events are made to management and others as appropriate (internal and external). Determines Root Cause of the Event - The root cause of the event is determined. Implements Changes to Prevent and Detect Recurrences - Additional architecture or changes to preventive and detective controls, or both, are implemented to prevent and detect recurrences on a timely basis. Improves Response and Recovery Procedures - Lessons learned are analyzed, and the incident response plan and recovery procedures are improved. Implements Incident Recovery Plan Testing - Incident recovery plan testing is performed on a periodic basis. The testing includes (1) development of testing scenarios based on threat likelihood and magnitude; (2) consideration of relevant system components from across the entity that can impair availability; (3) scenarios that consider the potential for the lack of availability of key personnel; and (4) revision of continuity plans and systems based on test results.",
+      "Attributes": [
+        {
+          "ItemId": "cc_7_5",
+          "Section": "CC7.0 - System Operations",
+          "Service": "cloudsql",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "cloudsql_instance_automated_backups"
+      ]
+    },
+    {
+      "Id": "cc_8_1",
+      "Name": "CC8.1 The entity authorizes, designs, develops or acquires, configures, documents, tests, approves, and implements changes to infrastructure, data, software, and procedures to meet its objectives",
+      "Description": "Manages Changes Throughout the System Lifecycle - A process for managing system changes throughout the lifecycle of the system and its components (infrastructure, data, software and procedures) is used to support system availability and processing integrity. Authorizes Changes - A process is in place to authorize system changes prior to development. Designs and Develops Changes - A process is in place to design and develop system changes. Documents Changes - A process is in place to document system changes to support ongoing maintenance of the system and to support system users in performing their responsibilities. Tracks System Changes - A process is in place to track system changes prior to implementation. Configures Software - A process is in place to select and implement the configuration parameters used to control the functionality of software. Tests System Changes - A process is in place to test system changes prior to implementation. Approves System Changes - A process is in place to approve system changes prior to implementation. Deploys System Changes - A process is in place to implement system changes. Identifies and Evaluates System Changes - Objectives affected by system changes are identified, and the ability of the modified system to meet the objectives is evaluated throughout the system development life cycle. Identifies Changes in Infrastructure, Data, Software, and Procedures Required to Remediate Incidents - Changes in infrastructure, data, software, and procedures required to remediate incidents to continue to meet objectives are identified, and the change process is initiated upon identification. Creates Baseline Configuration of IT Technology - A baseline configuration of IT and control systems is created and maintained. Provides for Changes Necessary in Emergency Situations - A process is in place for authorizing, designing, testing, approving and implementing changes necessary in emergency situations (that is, changes that need to be implemented in an urgent timeframe). Protects Confidential Information - The entity protects confidential information during system design, development, testing, implementation, and change processes to meet the entityโ€™s objectives related to confidentiality. Protects Personal Information - The entity protects personal information during system design, development, testing, implementation, and change processes to meet the entityโ€™s objectives related to privacy.",
+      "Attributes": [
+        {
+          "ItemId": "cc_8_1",
+          "Section": "CC8.0 - Change Management",
+          "Service": "iam",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "iam_cloud_asset_inventory_enabled"
+      ]
+    },
+    {
+      "Id": "cc_a_1_1",
+      "Name": "A1.2 The entity authorizes, designs, develops or acquires, implements, operates, approves, maintains, and monitors environmental protections, software, data back-up processes, and recovery infrastructure to meet its objectives",
+      "Description": "Measures Current Usage - The use of the system components is measured to establish a baseline for capacity management and to use when evaluating the risk of impaired availability due to capacity constraints. Forecasts Capacity - The expected average and peak use of system components is forecasted and compared to system capacity and associated tolerances. Forecasting considers capacity in the event of the failure of system components that constrain capacity. Makes Changes Based on Forecasts - The system change management process is initiated when forecasted usage exceeds capacity tolerances.",
+      "Attributes": [
+        {
+          "ItemId": "cc_a_1_1",
+          "Section": "CCA1.0 - Additional Criterial for Availability",
+          "Service": "gcp",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "cloudsql_instance_postgres_log_connections_flag",
+        "cloudsql_instance_postgres_log_disconnections_flag",
+        "cloudsql_instance_postgres_log_error_verbosity_flag",
+        "cloudsql_instance_postgres_log_min_duration_statement_flag",
+        "cloudsql_instance_postgres_log_min_error_statement_flag",
+        "cloudsql_instance_postgres_log_min_messages_flag",
+        "cloudsql_instance_postgres_log_statement_flag",
+        "cloudstorage_bucket_log_retention_policy_lock",
+        "compute_loadbalancer_logging_enabled",
+        "compute_network_dns_logging_enabled",
+        "compute_project_os_login_enabled",
+        "compute_subnet_flow_logs_enabled",
+        "iam_audit_logs_enabled",
+        "logging_log_metric_filter_and_alert_for_audit_configuration_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_bucket_permission_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_custom_role_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_project_ownership_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_sql_instance_configuration_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_vpc_firewall_rule_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_vpc_network_changes_enabled",
+        "logging_log_metric_filter_and_alert_for_vpc_network_route_changes_enabled",
+        "logging_sink_created"
+      ]
+    },
+    {
+      "Id": "cc_c_1_1",
+      "Name": "C1.1 The entity identifies and maintains confidential information to meet the entityโ€™s objectives related to confidentiality",
+      "Description": "Identifies Confidential information - Procedures are in place to identify and designate confidential information when it is received or created and to determine the period over which the confidential information is to be retained. Protects Confidential Information from Destruction - Procedures are in place to protect confidential information from erasure or destruction during the specified retention period of the information",
+      "Attributes": [
+        {
+          "ItemId": "cc_c_1_1",
+          "Section": "CCC1.0 - Additional Criterial for Confidentiality",
+          "Service": "gcp",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "compute_instance_confidential_computing_enabled",
+        "bigquery_table_cmk_encryption",
+        "bigquery_dataset_cmk_encryption",
+        "compute_instance_encryption_with_csek_enabled",
+        "dataproc_encrypted_with_cmks_disabled"
+      ]
+    },
+    {
+      "Id": "cc_c_1_2",
+      "Name": "C1.2 The entity disposes of confidential information to meet the entityโ€™s objectives related to confidentiality",
+      "Description": "Identifies Confidential Information for Destruction - Procedures are in place to identify confidential information requiring destruction when the end of the retention period is reached. Destroys Confidential Information - Procedures are in place to erase or otherwise destroy confidential information that has been identified for destruction.",
+      "Attributes": [
+        {
+          "ItemId": "cc_c_1_2",
+          "Section": "CCC1.0 - Additional Criterial for Confidentiality",
+          "Service": "cloudstorage",
+          "Type": "automated"
+        }
+      ],
+      "Checks": [
+        "cloudstorage_bucket_log_retention_policy_lock"
+      ]
+    }
+  ]
+}
diff --git a/prowler/providers/microsoft365/lib/arguments/__init__.py b/prowler/compliance/github/__init__.py
similarity index 100%
rename from prowler/providers/microsoft365/lib/arguments/__init__.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/kubernetes/cis_1.10_kubernetes.json b/prowler/compliance/kubernetes/cis_1.10_kubernetes.json
index 7c7c9e6898..379504a127 100644
--- a/prowler/compliance/kubernetes/cis_1.10_kubernetes.json
+++ b/prowler/compliance/kubernetes/cis_1.10_kubernetes.json
@@ -10,8 +10,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.1. Control Plane Node Configuration Files",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Ensure that the API server pod specification file has permissions of `600` or more restrictive.",
@@ -31,8 +31,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.1. Control Plane Node Configuration Files",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Ensure that the API server pod specification file ownership is set to `root:root`.",
@@ -52,8 +52,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.1. Control Plane Node Configuration Files",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Ensure that the controller manager pod specification file has permissions of `600` or more restrictive.",
@@ -73,8 +73,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.1. Control Plane Node Configuration Files",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Ensure that the controller manager pod specification file ownership is set to `root:root`.",
@@ -94,8 +94,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.1. Control Plane Node Configuration Files",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Ensure that the scheduler pod specification file has permissions of `600` or more restrictive.",
@@ -115,8 +115,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.1. Control Plane Node Configuration Files",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Ensure that the scheduler pod specification file ownership is set to `root:root`.",
@@ -136,8 +136,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.1. Control Plane Node Configuration Files",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Ensure that the `/etc/kubernetes/manifests/etcd.yaml` file has permissions of `600` or more restrictive.",
@@ -157,8 +157,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.1. Control Plane Node Configuration Files",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Ensure that the `/etc/kubernetes/manifests/etcd.yaml` file ownership is set to `root:root`.",
@@ -178,8 +178,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.1. Control Plane Node Configuration Files",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Ensure that the Container Network Interface files have permissions of `600` or more restrictive.",
@@ -199,8 +199,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.1. Control Plane Node Configuration Files",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Ensure that the Container Network Interface files have ownership set to `root:root`.",
@@ -220,8 +220,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.1. Control Plane Node Configuration Files",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Ensure that the etcd data directory has permissions of `700` or more restrictive.",
@@ -241,8 +241,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.1. Control Plane Node Configuration Files",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Ensure that the etcd data directory ownership is set to `etcd:etcd`.",
@@ -262,8 +262,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.1. Control Plane Node Configuration Files",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Ensure that the `admin.conf` file (and `super-admin.conf` file, where it exists) have permissions of `600`.",
@@ -283,8 +283,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.1. Control Plane Node Configuration Files",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Ensure that the `admin.conf` (and `super-admin.conf` file, where it exists) file ownership is set to `root:root`.",
@@ -304,8 +304,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.1. Control Plane Node Configuration Files",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Ensure that the `scheduler.conf` file has permissions of `600` or more restrictive.",
@@ -325,8 +325,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.1. Control Plane Node Configuration Files",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Ensure that the `scheduler.conf` file ownership is set to `root:root`.",
@@ -346,8 +346,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.1. Control Plane Node Configuration Files",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Ensure that the `controller-manager.conf` file has permissions of 600 or more restrictive.",
@@ -367,8 +367,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.1. Control Plane Node Configuration Files",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Ensure that the `controller-manager.conf` file ownership is set to `root:root`.",
@@ -388,8 +388,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.1. Control Plane Node Configuration Files",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Ensure that the Kubernetes PKI directory and file ownership is set to `root:root`.",
@@ -409,8 +409,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.1. Control Plane Node Configuration Files",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Ensure that Kubernetes PKI certificate files have permissions of `600` or more restrictive.",
@@ -430,8 +430,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.1. Control Plane Node Configuration Files",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Ensure that Kubernetes PKI key files have permissions of `600`.",
@@ -453,8 +453,8 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.2. API Server",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Disable anonymous requests to the API server.",
@@ -476,8 +476,8 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.2. API Server",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Do not use token based authentication.",
@@ -499,8 +499,8 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.2. API Server",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "This admission controller rejects all net-new usage of the Service field externalIPs.",
@@ -522,8 +522,8 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.2. API Server",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Enable certificate based kubelet authentication.",
@@ -545,8 +545,8 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.2. API Server",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Verify kubelet's certificate before establishing connection.",
@@ -568,8 +568,8 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.2. API Server",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Do not always authorize all requests.",
@@ -591,8 +591,8 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.2. API Server",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Restrict kubelet nodes to reading only objects associated with them.",
@@ -614,8 +614,8 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.2. API Server",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Turn on Role Based Access Control.",
@@ -637,8 +637,8 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.2. API Server",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Limit the rate at which the API server accepts requests.",
@@ -660,8 +660,8 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.2. API Server",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Do not allow all requests.",
@@ -683,8 +683,8 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.2. API Server",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Always pull images.",
@@ -706,8 +706,8 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.2. API Server",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
           "Profile": "Level 2 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Automate service accounts management.",
@@ -729,8 +729,8 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.2. API Server",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
           "Profile": "Level 2 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Reject creating objects in a namespace that is undergoing termination.",
@@ -752,8 +752,8 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.2. API Server",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
           "Profile": "Level 2 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Limit the `Node` and `Pod` objects that a kubelet could modify.",
@@ -775,8 +775,8 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.2. API Server",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Disable profiling, if not needed.",
@@ -798,8 +798,8 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.2. API Server",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Enable auditing on the Kubernetes API Server and set the desired audit log path.",
@@ -821,8 +821,8 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.2. API Server",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Retain the logs for at least 30 days or as appropriate.",
@@ -844,8 +844,8 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.2. API Server",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Retain 10 or an appropriate number of old log files.",
@@ -867,8 +867,8 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.2. API Server",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Rotate log files on reaching 100 MB or as appropriate.",
@@ -890,8 +890,8 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.2. API Server",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Set global request timeout for API server requests as appropriate.",
@@ -913,8 +913,8 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.2. API Server",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Validate service account before validating token.",
@@ -936,8 +936,8 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.2. API Server",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Explicitly set a service account public key file for service accounts on the apiserver.",
@@ -959,8 +959,8 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.2. API Server",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "etcd should be configured to make use of TLS encryption for client connections.",
@@ -982,8 +982,8 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.2. API Server",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Setup TLS connection on the API server.",
@@ -1005,8 +1005,8 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.2. API Server",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Setup TLS connection on the API server.",
@@ -1028,8 +1028,8 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.2. API Server",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "etcd should be configured to make use of TLS encryption for client connections.",
@@ -1051,8 +1051,8 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.2. API Server",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Encrypt etcd key-value store.",
@@ -1072,8 +1072,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.2. API Server",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Where `etcd` encryption is used, appropriate providers should be configured.",
@@ -1095,8 +1095,8 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.2. API Server",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Ensure that the API server is configured to only use strong cryptographic ciphers.",
@@ -1118,8 +1118,8 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.3. Controller Manager",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.3 Controller Manager",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Activate garbage collector on pod termination, as appropriate.",
@@ -1141,8 +1141,8 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.3. Controller Manager",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.3 Controller Manager",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Disable profiling, if not needed.",
@@ -1164,8 +1164,8 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.3. Controller Manager",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.3 Controller Manager",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Use individual service account credentials for each controller.",
@@ -1187,8 +1187,8 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.3. Controller Manager",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.3 Controller Manager",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Explicitly set a service account private key file for service accounts on the controller manager.",
@@ -1210,8 +1210,8 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.3. Controller Manager",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.3 Controller Manager",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Allow pods to verify the API server's serving certificate before establishing connections.",
@@ -1233,8 +1233,8 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.3. Controller Manager",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.3 Controller Manager",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Enable kubelet server certificate rotation on controller-manager.",
@@ -1256,8 +1256,8 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.3. Controller Manager",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.3 Controller Manager",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Do not bind the Controller Manager service to non-loopback insecure addresses.",
@@ -1279,8 +1279,8 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.4. Scheduler",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.4 Scheduler",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Disable profiling, if not needed.",
@@ -1302,8 +1302,8 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
-          "SubSection": "1.4. Scheduler",
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.4 Scheduler",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Do not bind the scheduler service to non-loopback insecure addresses.",
@@ -1325,7 +1325,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. etcd",
+          "Section": "2 etcd",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Configure TLS encryption for the etcd service.",
@@ -1347,7 +1347,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. etcd",
+          "Section": "2 etcd",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Enable client authentication on etcd service.",
@@ -1369,7 +1369,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. etcd",
+          "Section": "2 etcd",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Do not use self-signed certificates for TLS.",
@@ -1391,7 +1391,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. etcd",
+          "Section": "2 etcd",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "etcd should be configured to make use of TLS encryption for peer connections.",
@@ -1413,7 +1413,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. etcd",
+          "Section": "2 etcd",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "etcd should be configured for peer authentication.",
@@ -1435,7 +1435,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. etcd",
+          "Section": "2 etcd",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Do not use automatically generated self-signed certificates for TLS connections between peers.",
@@ -1457,7 +1457,7 @@
       ],
       "Attributes": [
         {
-          "Section": "2. etcd",
+          "Section": "2 etcd",
           "Profile": "Level 2 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Use a different certificate authority for etcd from the one used for Kubernetes.",
@@ -1477,8 +1477,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "3. Control Plane Configuration",
-          "SubSection": "3.1. Authentication and Authorization",
+          "Section": "3 Control Plane Configuration",
+          "SubSection": "3.1 Authentication and Authorization",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Kubernetes provides the option to use client certificates for user authentication. However as there is no way to revoke these certificates when a user leaves an organization or loses their credential, they are not suitable for this purpose.It is not possible to fully disable client certificate use within a cluster as it is used for component to component authentication.",
@@ -1498,8 +1498,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "3. Control Plane Configuration",
-          "SubSection": "3.1. Authentication and Authorization",
+          "Section": "3 Control Plane Configuration",
+          "SubSection": "3.1 Authentication and Authorization",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Kubernetes provides service account tokens which are intended for use by workloads running in the Kubernetes cluster, for authentication to the API server.These tokens are not designed for use by end-users and do not provide for features such as revocation or expiry, making them insecure. A newer version of the feature (Bound service account token volumes) does introduce expiry but still does not allow for specific revocation.",
@@ -1519,8 +1519,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "3. Control Plane Configuration",
-          "SubSection": "3.1. Authentication and Authorization",
+          "Section": "3 Control Plane Configuration",
+          "SubSection": "3.1 Authentication and Authorization",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Kubernetes provides bootstrap tokens which are intended for use by new nodes joining the clusterThese tokens are not designed for use by end-users they are specifically designed for the purpose of bootstrapping new nodes and not for general authentication",
@@ -1540,8 +1540,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "3. Control Plane Configuration",
-          "SubSection": "3.2. Logging",
+          "Section": "3 Control Plane Configuration",
+          "SubSection": "3.2 Logging",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Kubernetes can audit the details of requests made to the API server. The `--audit-policy-file` flag must be set for this logging to be enabled.",
@@ -1561,8 +1561,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "3. Control Plane Configuration",
-          "SubSection": "3.2. Logging",
+          "Section": "3 Control Plane Configuration",
+          "SubSection": "3.2 Logging",
           "Profile": "Level 2 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Ensure that the audit policy created for the cluster covers key security concerns.",
@@ -1584,8 +1584,8 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
-          "SubSection": "4.1. Worker Node Configuration Files",
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.1 Worker Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Ensure that the `kubelet` service file has permissions of `600` or more restrictive.",
@@ -1607,8 +1607,8 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
-          "SubSection": "4.1. Worker Node Configuration Files",
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.1 Worker Node Configuration Files",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Automated",
           "Description": "Ensure that the `kubelet` service file ownership is set to `root:root`.",
@@ -1628,8 +1628,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
-          "SubSection": "4.1. Worker Node Configuration Files",
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.1 Worker Node Configuration Files",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Manual",
           "Description": "If `kube-proxy` is running, and if it is using a file-based kubeconfig file, ensure that the proxy kubeconfig file has permissions of `600` or more restrictive.",
@@ -1649,8 +1649,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
-          "SubSection": "4.1. Worker Node Configuration Files",
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.1 Worker Node Configuration Files",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Manual",
           "Description": "If `kube-proxy` is running, ensure that the file ownership of its kubeconfig file is set to `root:root`.",
@@ -1672,8 +1672,8 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
-          "SubSection": "4.1. Worker Node Configuration Files",
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.1 Worker Node Configuration Files",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Automated",
           "Description": "Ensure that the `kubelet.conf` file has permissions of `600` or more restrictive.",
@@ -1695,8 +1695,8 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
-          "SubSection": "4.1. Worker Node Configuration Files",
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.1 Worker Node Configuration Files",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Automated",
           "Description": "Ensure that the `kubelet.conf` file ownership is set to `root:root`.",
@@ -1716,8 +1716,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
-          "SubSection": "4.1. Worker Node Configuration Files",
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.1 Worker Node Configuration Files",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Manual",
           "Description": "Ensure that the certificate authorities file has permissions of `600` or more restrictive.",
@@ -1737,8 +1737,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
-          "SubSection": "4.1. Worker Node Configuration Files",
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.1 Worker Node Configuration Files",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Manual",
           "Description": "Ensure that the certificate authorities file ownership is set to `root:root`.",
@@ -1760,8 +1760,8 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
-          "SubSection": "4.1. Worker Node Configuration Files",
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.1 Worker Node Configuration Files",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Automated",
           "Description": "Ensure that if the kubelet refers to a configuration file with the `--config` argument, that file has permissions of 600 or more restrictive.",
@@ -1783,8 +1783,8 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
-          "SubSection": "4.1. Worker Node Configuration Files",
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.1 Worker Node Configuration Files",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Automated",
           "Description": "Ensure that if the kubelet refers to a configuration file with the `--config` argument, that file is owned by root:root.",
@@ -1806,8 +1806,8 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
-          "SubSection": "4.2. Kubelet",
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.2 Kubelet",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Automated",
           "Description": "Disable anonymous requests to the Kubelet server.",
@@ -1829,8 +1829,8 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
-          "SubSection": "4.2. Kubelet",
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.2 Kubelet",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Automated",
           "Description": "Do not allow all requests. Enable explicit authorization.",
@@ -1852,8 +1852,8 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
-          "SubSection": "4.2. Kubelet",
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.2 Kubelet",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Automated",
           "Description": "Enable Kubelet authentication using certificates.",
@@ -1875,8 +1875,8 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
-          "SubSection": "4.2. Kubelet",
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.2 Kubelet",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Manual",
           "Description": "Disable the read-only port.",
@@ -1898,8 +1898,8 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
-          "SubSection": "4.2. Kubelet",
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.2 Kubelet",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Manual",
           "Description": "Do not disable timeouts on streaming connections.",
@@ -1921,8 +1921,8 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
-          "SubSection": "4.2. Kubelet",
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.2 Kubelet",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Automated",
           "Description": "Allow Kubelet to manage iptables.",
@@ -1942,8 +1942,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
-          "SubSection": "4.2. Kubelet",
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.2 Kubelet",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Manual",
           "Description": "Do not override node hostnames.",
@@ -1965,8 +1965,8 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
-          "SubSection": "4.2. Kubelet",
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.2 Kubelet",
           "Profile": "Level 2 - Worker Node",
           "AssessmentStatus": "Manual",
           "Description": "Security relevant information should be captured. The eventRecordQPS on the Kubelet configuration can be used to limit the rate at which events are gathered and sets the maximum event creations per second. Setting this too low could result in relevant events not being logged, however the unlimited setting of `0` could result in a denial of service on the kubelet.",
@@ -1988,8 +1988,8 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
-          "SubSection": "4.2. Kubelet",
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.2 Kubelet",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Manual",
           "Description": "Setup TLS connection on the Kubelets.",
@@ -2011,8 +2011,8 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
-          "SubSection": "4.2. Kubelet",
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.2 Kubelet",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Automated",
           "Description": "Enable kubelet client certificate rotation.",
@@ -2032,8 +2032,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
-          "SubSection": "4.2. Kubelet",
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.2 Kubelet",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Manual",
           "Description": "Enable kubelet server certificate rotation.",
@@ -2055,8 +2055,8 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
-          "SubSection": "4.2. Kubelet",
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.2 Kubelet",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Manual",
           "Description": "Ensure that the Kubelet is configured to only use strong cryptographic ciphers.",
@@ -2076,8 +2076,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
-          "SubSection": "4.2. Kubelet",
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.2 Kubelet",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Manual",
           "Description": "Ensure that the Kubelet sets limits on the number of PIDs that can be created by pods running on the node.",
@@ -2097,8 +2097,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
-          "SubSection": "4.3. kube-proxy",
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.3 kube-proxy",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Manual",
           "Description": "Do not bind the kube-proxy metrics port to non-loopback addresses.",
@@ -2120,8 +2120,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
-          "SubSection": "5.1. RBAC and Service Accounts",
+          "Section": "5 Policies",
+          "SubSection": "5.1 RBAC and Service Accounts",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "The RBAC role `cluster-admin` provides wide-ranging powers over the environment and should be used only where and when needed.",
@@ -2143,8 +2143,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
-          "SubSection": "5.1. RBAC and Service Accounts",
+          "Section": "5 Policies",
+          "SubSection": "5.1 RBAC and Service Accounts",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "The Kubernetes API stores secrets, which may be service account tokens for the Kubernetes API or credentials used by workloads in the cluster. Access to these secrets should be restricted to the smallest possible group of users to reduce the risk of privilege escalation.",
@@ -2166,8 +2166,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
-          "SubSection": "5.1. RBAC and Service Accounts",
+          "Section": "5 Policies",
+          "SubSection": "5.1 RBAC and Service Accounts",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Automated",
           "Description": "Kubernetes Roles and ClusterRoles provide access to resources based on sets of objects and actions that can be taken on those objects. It is possible to set either of these to be the wildcard \"*\" which matches all items. Use of wildcards is not optimal from a security perspective as it may allow for inadvertent access to be granted when new resources are added to the Kubernetes API either as CRDs or in later versions of the product.",
@@ -2189,8 +2189,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
-          "SubSection": "5.1. RBAC and Service Accounts",
+          "Section": "5 Policies",
+          "SubSection": "5.1 RBAC and Service Accounts",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "The ability to create pods in a namespace can provide a number of opportunities for privilege escalation, such as assigning privileged service accounts to these pods or mounting hostPaths with access to sensitive data (unless Pod Security Policies are implemented to restrict this access)As such, access to create new pods should be restricted to the smallest possible group of users.",
@@ -2210,8 +2210,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "5. Policies",
-          "SubSection": "5.1. RBAC and Service Accounts",
+          "Section": "5 Policies",
+          "SubSection": "5.1 RBAC and Service Accounts",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "The `default` service account should not be used to ensure that rights granted to applications can be more easily audited and reviewed.",
@@ -2231,8 +2231,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "5. Policies",
-          "SubSection": "5.1. RBAC and Service Accounts",
+          "Section": "5 Policies",
+          "SubSection": "5.1 RBAC and Service Accounts",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
           "Description": "Service accounts tokens should not be mounted in pods except where the workload running in the pod explicitly needs to communicate with the API server",
@@ -2252,8 +2252,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "5. Policies",
-          "SubSection": "5.1. RBAC and Service Accounts",
+          "Section": "5 Policies",
+          "SubSection": "5.1 RBAC and Service Accounts",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "The special group `system:masters` should not be used to grant permissions to any user or service account, except where strictly necessary (e.g. bootstrapping access prior to RBAC being fully available)",
@@ -2273,8 +2273,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "5. Policies",
-          "SubSection": "5.1. RBAC and Service Accounts",
+          "Section": "5 Policies",
+          "SubSection": "5.1 RBAC and Service Accounts",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Cluster roles and roles with the impersonate, bind or escalate permissions should not be granted unless strictly required. Each of these permissions allow a particular subject to escalate their privileges beyond those explicitly granted by cluster administrators",
@@ -2296,8 +2296,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
-          "SubSection": "5.1. RBAC and Service Accounts",
+          "Section": "5 Policies",
+          "SubSection": "5.1 RBAC and Service Accounts",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "The ability to create persistent volumes in a cluster can provide an opportunity for privilege escalation, via the creation of `hostPath` volumes. As persistent volumes are not covered by Pod Security Admission, a user with access to create persistent volumes may be able to get access to sensitive files from the underlying host even where restrictive Pod Security Admission policies are in place.",
@@ -2319,8 +2319,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
-          "SubSection": "5.1. RBAC and Service Accounts",
+          "Section": "5 Policies",
+          "SubSection": "5.1 RBAC and Service Accounts",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Users with access to the `Proxy` sub-resource of `Node` objects automatically have permissions to use the Kubelet API, which may allow for privilege escalation or bypass cluster security controls such as audit logs.The Kubelet provides an API which includes rights to execute commands in any container running on the node. Access to this API is covered by permissions to the main Kubernetes API via the `node` object. The proxy sub-resource specifically allows wide ranging access to the Kubelet API.Direct access to the Kubelet API bypasses controls like audit logging (there is no audit log of Kubelet API access) and admission control.",
@@ -2342,8 +2342,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
-          "SubSection": "5.1. RBAC and Service Accounts",
+          "Section": "5 Policies",
+          "SubSection": "5.1 RBAC and Service Accounts",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Users with access to the update the `approval` sub-resource of `certificateaigningrequests` objects can approve new client certificates for the Kubernetes API effectively allowing them to create new high-privileged user accounts.This can allow for privilege escalation to full cluster administrator, depending on users configured in the cluster",
@@ -2365,8 +2365,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
-          "SubSection": "5.1. RBAC and Service Accounts",
+          "Section": "5 Policies",
+          "SubSection": "5.1 RBAC and Service Accounts",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Users with rights to create/modify/delete `validatingwebhookconfigurations` or `mutatingwebhookconfigurations` can control webhooks that can read any object admitted to the cluster, and in the case of mutating webhooks, also mutate admitted objects. This could allow for privilege escalation or disruption of the operation of the cluster.",
@@ -2388,8 +2388,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
-          "SubSection": "5.1. RBAC and Service Accounts",
+          "Section": "5 Policies",
+          "SubSection": "5.1 RBAC and Service Accounts",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Users with rights to create new service account tokens at a cluster level, can create long-lived privileged credentials in the cluster. This could allow for privilege escalation and persistent access to the cluster, even if the users account has been revoked.",
@@ -2409,8 +2409,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "5. Policies",
-          "SubSection": "5.2. Ensure that the cluster has at least one active policy control mechanism in place",
+          "Section": "5 Policies",
+          "SubSection": "5.2 Ensure that the cluster has at least one active policy control mechanism in place",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Every Kubernetes cluster should have at least one policy control mechanism in place to enforce the other requirements in this section. This could be the in-built Pod Security Admission controller, or a third party policy control system.",
@@ -2432,8 +2432,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
-          "SubSection": "5.2. Ensure that the cluster has at least one active policy control mechanism in place",
+          "Section": "5 Policies",
+          "SubSection": "5.2 Ensure that the cluster has at least one active policy control mechanism in place",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Do not generally permit containers to be run with the `securityContext.privileged` flag set to `true`.",
@@ -2455,8 +2455,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
-          "SubSection": "5.2. Ensure that the cluster has at least one active policy control mechanism in place",
+          "Section": "5 Policies",
+          "SubSection": "5.2 Ensure that the cluster has at least one active policy control mechanism in place",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Do not generally permit containers to be run with the `hostPID` flag set to true.",
@@ -2478,8 +2478,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
-          "SubSection": "5.2. Ensure that the cluster has at least one active policy control mechanism in place",
+          "Section": "5 Policies",
+          "SubSection": "5.2 Ensure that the cluster has at least one active policy control mechanism in place",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Do not generally permit containers to be run with the `hostIPC` flag set to true.",
@@ -2501,8 +2501,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
-          "SubSection": "5.2. Ensure that the cluster has at least one active policy control mechanism in place",
+          "Section": "5 Policies",
+          "SubSection": "5.2 Ensure that the cluster has at least one active policy control mechanism in place",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Do not generally permit containers to be run with the `hostNetwork` flag set to true.",
@@ -2524,8 +2524,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
-          "SubSection": "5.2. Ensure that the cluster has at least one active policy control mechanism in place",
+          "Section": "5 Policies",
+          "SubSection": "5.2 Ensure that the cluster has at least one active policy control mechanism in place",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Do not generally permit containers to be run with the `allowPrivilegeEscalation` flag set to true. Allowing this right can lead to a process running a container getting more rights than it started with.It's important to note that these rights are still constrained by the overall container sandbox, and this setting does not relate to the use of privileged containers.",
@@ -2547,8 +2547,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
-          "SubSection": "5.2. Ensure that the cluster has at least one active policy control mechanism in place",
+          "Section": "5 Policies",
+          "SubSection": "5.2 Ensure that the cluster has at least one active policy control mechanism in place",
           "Profile": "Level 2 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Do not generally permit containers to be run as the root user.",
@@ -2570,8 +2570,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
-          "SubSection": "5.2. Ensure that the cluster has at least one active policy control mechanism in place",
+          "Section": "5 Policies",
+          "SubSection": "5.2 Ensure that the cluster has at least one active policy control mechanism in place",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Do not generally permit containers with the potentially dangerous NET_RAW capability.",
@@ -2593,8 +2593,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
-          "SubSection": "5.2. Ensure that the cluster has at least one active policy control mechanism in place",
+          "Section": "5 Policies",
+          "SubSection": "5.2 Ensure that the cluster has at least one active policy control mechanism in place",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Do not generally permit containers with capabilities assigned beyond the default set.",
@@ -2616,8 +2616,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
-          "SubSection": "5.2. Ensure that the cluster has at least one active policy control mechanism in place",
+          "Section": "5 Policies",
+          "SubSection": "5.2 Ensure that the cluster has at least one active policy control mechanism in place",
           "Profile": "Level 2 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Do not generally permit containers with capabilities",
@@ -2639,8 +2639,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
-          "SubSection": "5.2. Ensure that the cluster has at least one active policy control mechanism in place",
+          "Section": "5 Policies",
+          "SubSection": "5.2 Ensure that the cluster has at least one active policy control mechanism in place",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Do not generally permit Windows containers to be run with the `hostProcess` flag set to true.",
@@ -2660,8 +2660,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "5. Policies",
-          "SubSection": "5.2. Ensure that the cluster has at least one active policy control mechanism in place",
+          "Section": "5 Policies",
+          "SubSection": "5.2 Ensure that the cluster has at least one active policy control mechanism in place",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Do not generally admit containers which make use of `hostPath` volumes.",
@@ -2683,8 +2683,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
-          "SubSection": "5.2. Ensure that the cluster has at least one active policy control mechanism in place",
+          "Section": "5 Policies",
+          "SubSection": "5.2 Ensure that the cluster has at least one active policy control mechanism in place",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Do not generally permit containers which require the use of HostPorts.",
@@ -2704,8 +2704,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "5. Policies",
-          "SubSection": "5.3. Network Policies and CNI",
+          "Section": "5 Policies",
+          "SubSection": "5.3 Network Policies and CNI",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "There are a variety of CNI plugins available for Kubernetes. If the CNI in use does not support Network Policies it may not be possible to effectively restrict traffic in the cluster.",
@@ -2725,8 +2725,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "5. Policies",
-          "SubSection": "5.3. Network Policies and CNI",
+          "Section": "5 Policies",
+          "SubSection": "5.3 Network Policies and CNI",
           "Profile": "Level 2 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Use network policies to isolate traffic in your cluster network.",
@@ -2748,8 +2748,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
-          "SubSection": "5.4. Secrets Management",
+          "Section": "5 Policies",
+          "SubSection": "5.4 Secrets Management",
           "Profile": "Level 2 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Kubernetes supports mounting secrets as data volumes or as environment variables. Minimize the use of environment variable secrets.",
@@ -2769,8 +2769,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "5. Policies",
-          "SubSection": "5.4. Secrets Management",
+          "Section": "5 Policies",
+          "SubSection": "5.4 Secrets Management",
           "Profile": "Level 2 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Consider the use of an external secrets storage and management system, instead of using Kubernetes Secrets directly, if you have more complex secret management needs. Ensure the solution requires authentication to access secrets, has auditing of access to and use of secrets, and encrypts secrets. Some solutions also make it easier to rotate secrets.",
@@ -2790,8 +2790,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "5. Policies",
-          "SubSection": "5.5. Extensible Admission Control",
+          "Section": "5 Policies",
+          "SubSection": "5.5 Extensible Admission Control",
           "Profile": "Level 2 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Configure Image Provenance for your deployment.",
@@ -2811,8 +2811,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "5. Policies",
-          "SubSection": "5.7. General Policies",
+          "Section": "5 Policies",
+          "SubSection": "5.7 General Policies",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Use namespaces to isolate your Kubernetes objects.",
@@ -2834,8 +2834,8 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
-          "SubSection": "5.7. General Policies",
+          "Section": "5 Policies",
+          "SubSection": "5.7 General Policies",
           "Profile": "Level 2 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Enable `docker/default` seccomp profile in your pod definitions.",
@@ -2855,8 +2855,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "5. Policies",
-          "SubSection": "5.7. General Policies",
+          "Section": "5 Policies",
+          "SubSection": "5.7 General Policies",
           "Profile": "Level 2 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Apply Security Context to Your Pods and Containers",
@@ -2876,8 +2876,8 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "5. Policies",
-          "SubSection": "5.7. General Policies",
+          "Section": "5 Policies",
+          "SubSection": "5.7 General Policies",
           "Profile": "Level 2 - Master Node",
           "AssessmentStatus": "Manual",
           "Description": "Kubernetes provides a default namespace, where objects are placed if no namespace is specified for them. Placing objects in this namespace makes application of RBAC and other controls more difficult.",
diff --git a/prowler/compliance/kubernetes/cis_1.11_kubernetes.json b/prowler/compliance/kubernetes/cis_1.11_kubernetes.json
new file mode 100644
index 0000000000..d091e42bae
--- /dev/null
+++ b/prowler/compliance/kubernetes/cis_1.11_kubernetes.json
@@ -0,0 +1,2980 @@
+{
+  "Framework": "CIS",
+  "Version": "1.11.1",
+  "Provider": "Kubernetes",
+  "Description": "This CIS Kubernetes Benchmark provides prescriptive guidance for establishing a secure configuration posture for Kubernetes v1.28 - v1.31",
+  "Requirements": [
+    {
+      "Id": "1.1.1",
+      "Description": "Ensure that the API server pod specification file permissions are set to 600 or more restrictive",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Ensure that the API server pod specification file has permissions of `600` or more restrictive.",
+          "RationaleStatement": "The API server pod specification file controls various parameters that set the behavior of the API server. You should restrict its file permissions to maintain the integrity of the file. The file should be writable by only the administrators on the system.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Run the below command (based on the file location on your system) on the Control Plane node. For example,  ``` chmod 600 /etc/kubernetes/manifests/kube-apiserver.yaml ```",
+          "AuditProcedure": "Run the below command (based on the file location on your system) on the Control Plane node. For example,  ``` stat -c %a /etc/kubernetes/manifests/kube-apiserver.yaml ```  Verify that the permissions are `600` or more restrictive.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/kube-apiserver/",
+          "DefaultValue": "By default, the `kube-apiserver.yaml` file has permissions of `640`."
+        }
+      ]
+    },
+    {
+      "Id": "1.1.2",
+      "Description": "Ensure that the API server pod specification file ownership is set to root:root",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Ensure that the API server pod specification file ownership is set to `root:root`.",
+          "RationaleStatement": "The API server pod specification file controls various parameters that set the behavior of the API server. You should set its file ownership to maintain the integrity of the file. The file should be owned by `root:root`.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Run the below command (based on the file location on your system) on the Control Plane node. For example,  ``` chown root:root /etc/kubernetes/manifests/kube-apiserver.yaml ```",
+          "AuditProcedure": "Run the below command (based on the file location on your system) on the Control Plane node. For example,  ``` stat -c %U:%G /etc/kubernetes/manifests/kube-apiserver.yaml ```  Verify that the ownership is set to `root:root`.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/kube-apiserver/",
+          "DefaultValue": "By default, the `kube-apiserver.yaml` file ownership is set to `root:root`."
+        }
+      ]
+    },
+    {
+      "Id": "1.1.3",
+      "Description": "Ensure that the controller manager pod specification file permissions are set to 600 or more restrictive",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Ensure that the controller manager pod specification file has permissions of `600` or more restrictive.",
+          "RationaleStatement": "The controller manager pod specification file controls various parameters that set the behavior of the Controller Manager on the master node. You should restrict its file permissions to maintain the integrity of the file. The file should be writable by only the administrators on the system.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Run the below command (based on the file location on your system) on the Control Plane node. For example,  ``` chmod 600 /etc/kubernetes/manifests/kube-controller-manager.yaml ```",
+          "AuditProcedure": "Run the below command (based on the file location on your system) on the Control Plane node. For example,  ``` stat -c %a /etc/kubernetes/manifests/kube-controller-manager.yaml ```  Verify that the permissions are `600` or more restrictive.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/kube-apiserver/",
+          "DefaultValue": "By default, the `kube-controller-manager.yaml` file has permissions of `640`."
+        }
+      ]
+    },
+    {
+      "Id": "1.1.4",
+      "Description": "Ensure that the controller manager pod specification file ownership is set to root:root",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Ensure that the controller manager pod specification file ownership is set to `root:root`.",
+          "RationaleStatement": "The controller manager pod specification file controls various parameters that set the behavior of various components of the master node. You should set its file ownership to maintain the integrity of the file. The file should be owned by `root:root`.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Run the below command (based on the file location on your system) on the Control Plane node. For example,  ``` chown root:root /etc/kubernetes/manifests/kube-controller-manager.yaml ```",
+          "AuditProcedure": "Run the below command (based on the file location on your system) on the Control Plane node. For example,  ``` stat -c %U:%G /etc/kubernetes/manifests/kube-controller-manager.yaml ```  Verify that the ownership is set to `root:root`.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/kube-controller-manager",
+          "DefaultValue": "By default, `kube-controller-manager.yaml` file ownership is set to `root:root`."
+        }
+      ]
+    },
+    {
+      "Id": "1.1.5",
+      "Description": "Ensure that the scheduler pod specification file permissions are set to 600 or more restrictive",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Ensure that the scheduler pod specification file has permissions of `600` or more restrictive.",
+          "RationaleStatement": "The scheduler pod specification file controls various parameters that set the behavior of the Scheduler service in the master node. You should restrict its file permissions to maintain the integrity of the file. The file should be writable by only the administrators on the system.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Run the below command (based on the file location on your system) on the Control Plane node. For example,  ``` chmod 600 /etc/kubernetes/manifests/kube-scheduler.yaml ```",
+          "AuditProcedure": "Run the below command (based on the file location on your system) on the Control Plane node. For example,  ``` stat -c %a /etc/kubernetes/manifests/kube-scheduler.yaml ```  Verify that the permissions are `600` or more restrictive.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/kube-scheduler/",
+          "DefaultValue": "By default, `kube-scheduler.yaml` file has permissions of `640`."
+        }
+      ]
+    },
+    {
+      "Id": "1.1.6",
+      "Description": "Ensure that the scheduler pod specification file ownership is set to root:root",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Ensure that the scheduler pod specification file ownership is set to `root:root`.",
+          "RationaleStatement": "The scheduler pod specification file controls various parameters that set the behavior of the `kube-scheduler` service in the master node. You should set its file ownership to maintain the integrity of the file. The file should be owned by `root:root`.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Run the below command (based on the file location on your system) on the Control Plane node. For example,  ``` chown root:root /etc/kubernetes/manifests/kube-scheduler.yaml ```",
+          "AuditProcedure": "Run the below command (based on the file location on your system) on the Control Plane node. For example,  ``` stat -c %U:%G /etc/kubernetes/manifests/kube-scheduler.yaml ```  Verify that the ownership is set to `root:root`.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/kube-scheduler/",
+          "DefaultValue": "By default, `kube-scheduler.yaml` file ownership is set to `root:root`."
+        }
+      ]
+    },
+    {
+      "Id": "1.1.7",
+      "Description": "Ensure that the etcd pod specification file permissions are set to 600 or more restrictive",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Ensure that the `/etc/kubernetes/manifests/etcd.yaml` file has permissions of `600` or more restrictive.",
+          "RationaleStatement": "The etcd pod specification file `/etc/kubernetes/manifests/etcd.yaml` controls various parameters that set the behavior of the `etcd` service in the master node. etcd is a highly-available key-value store which Kubernetes uses for persistent storage of all of its REST API object. You should restrict its file permissions to maintain the integrity of the file. The file should be writable by only the administrators on the system.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Run the below command (based on the file location on your system) on the Control Plane node. For example,  ``` chmod 600 /etc/kubernetes/manifests/etcd.yaml ```",
+          "AuditProcedure": "Run the below command (based on the file location on your system) on the Control Plane node. For example,  ``` stat -c %a /etc/kubernetes/manifests/etcd.yaml ```  Verify that the permissions are `600` or more restrictive.",
+          "AdditionalInformation": "",
+          "References": "https://coreos.com/etcd:https://kubernetes.io/docs/admin/etcd/",
+          "DefaultValue": "By default, `/etc/kubernetes/manifests/etcd.yaml` file has permissions of `640`."
+        }
+      ]
+    },
+    {
+      "Id": "1.1.8",
+      "Description": "Ensure that the etcd pod specification file ownership is set to root:root",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Ensure that the `/etc/kubernetes/manifests/etcd.yaml` file ownership is set to `root:root`.",
+          "RationaleStatement": "The etcd pod specification file `/etc/kubernetes/manifests/etcd.yaml` controls various parameters that set the behavior of the `etcd` service in the master node. etcd is a highly-available key-value store which Kubernetes uses for persistent storage of all of its REST API object. You should set its file ownership to maintain the integrity of the file. The file should be owned by `root:root`.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Run the below command (based on the file location on your system) on the Control Plane node. For example,  ``` chown root:root /etc/kubernetes/manifests/etcd.yaml ```",
+          "AuditProcedure": "Run the below command (based on the file location on your system) on the Control Plane node. For example,  ``` stat -c %U:%G /etc/kubernetes/manifests/etcd.yaml ```  Verify that the ownership is set to `root:root`.",
+          "AdditionalInformation": "",
+          "References": "https://coreos.com/etcd:https://kubernetes.io/docs/admin/etcd/",
+          "DefaultValue": "By default, `/etc/kubernetes/manifests/etcd.yaml` file ownership is set to `root:root`."
+        }
+      ]
+    },
+    {
+      "Id": "1.1.9",
+      "Description": "Ensure that the Container Network Interface file permissions are set to 600 or more restrictive",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Ensure that the Container Network Interface files have permissions of `600` or more restrictive.",
+          "RationaleStatement": "Container Network Interface provides various networking options for overlay networking. You should consult their documentation and restrict their respective file permissions to maintain the integrity of those files. Those files should be writable by only the administrators on the system.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Run the below command (based on the file location on your system) on the Control Plane node. For example,  ``` chmod 600  ```",
+          "AuditProcedure": "Run the below command (based on the file location on your system) on the Control Plane node. For example,  ``` stat -c %a  ```  Verify that the permissions are `600` or more restrictive.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/concepts/cluster-administration/networking/",
+          "DefaultValue": "NA"
+        }
+      ]
+    },
+    {
+      "Id": "1.1.10",
+      "Description": "Ensure that the Container Network Interface file ownership is set to root:root",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Ensure that the Container Network Interface files have ownership set to `root:root`.",
+          "RationaleStatement": "Container Network Interface provides various networking options for overlay networking. You should consult their documentation and restrict their respective file permissions to maintain the integrity of those files. Those files should be owned by `root:root`.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Run the below command (based on the file location on your system) on the Control Plane node. For example,  ``` chown root:root  ```",
+          "AuditProcedure": "Run the below command (based on the file location on your system) on the Control Plane node. For example,  ``` stat -c %U:%G  ```  Verify that the ownership is set to `root:root`.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/concepts/cluster-administration/networking/",
+          "DefaultValue": "NA"
+        }
+      ]
+    },
+    {
+      "Id": "1.1.11",
+      "Description": "Ensure that the etcd data directory permissions are set to 700 or more restrictive",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Ensure that the etcd data directory has permissions of `700` or more restrictive.",
+          "RationaleStatement": "etcd is a highly-available key-value store used by Kubernetes deployments for persistent storage of all of its REST API objects. This data directory should be protected from any unauthorized reads or writes. It should not be readable or writable by any group members or the world.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "On the etcd server node, get the etcd data directory, passed as an argument `--data-dir`, from the below command: ``` ps -ef | grep etcd ``` Run the below command (based on the etcd data directory found above). For example, ``` chmod 700 /var/lib/etcd ```",
+          "AuditProcedure": "On the etcd server node, get the etcd data directory, passed as an argument `--data-dir`, from the below command:  ``` ps -ef | grep etcd ```  Run the below command (based on the etcd data directory found above). For example,  ``` stat -c %a /var/lib/etcd ```  Verify that the permissions are `700` or more restrictive.",
+          "AdditionalInformation": "",
+          "References": "https://coreos.com/etcd/docs/latest/op-guide/configuration.html#data-dir:https://kubernetes.io/docs/admin/etcd/",
+          "DefaultValue": "By default, etcd data directory has permissions of `755`."
+        }
+      ]
+    },
+    {
+      "Id": "1.1.12",
+      "Description": "Ensure that the etcd data directory ownership is set to etcd:etcd",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Ensure that the etcd data directory ownership is set to `etcd:etcd`.",
+          "RationaleStatement": "etcd is a highly-available key-value store used by Kubernetes deployments for persistent storage of all of its REST API objects. This data directory should be protected from any unauthorized reads or writes. It should be owned by `etcd:etcd`.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "On the etcd server node, get the etcd data directory, passed as an argument `--data-dir`, from the below command: ``` ps -ef | grep etcd ``` Run the below command (based on the etcd data directory found above). For example, ``` chown etcd:etcd /var/lib/etcd ```",
+          "AuditProcedure": "On the etcd server node, get the etcd data directory, passed as an argument `--data-dir`, from the below command:  ``` ps -ef | grep etcd ```  Run the below command (based on the etcd data directory found above). For example,  ``` stat -c %U:%G /var/lib/etcd ```  Verify that the ownership is set to `etcd:etcd`.",
+          "AdditionalInformation": "",
+          "References": "https://coreos.com/etcd/docs/latest/op-guide/configuration.html#data-dir:https://kubernetes.io/docs/admin/etcd/",
+          "DefaultValue": "By default, etcd data directory ownership is set to `etcd:etcd`."
+        }
+      ]
+    },
+    {
+      "Id": "1.1.13",
+      "Description": "Ensure that the default administrative credential file permissions are set to 600",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Ensure that the `admin.conf` file (and `super-admin.conf` file, where it exists) have permissions of `600`.",
+          "RationaleStatement": "As part of initial cluster setup, default kubeconfig files are created to be used by the administrator of the cluster. These files contain private keys and certificates which allow for privileged access to the cluster. You should restrict their file permissions to maintain the integrity and confidentiality of the file(s). The file(s) should be readable and writable by only the administrators on the system.",
+          "ImpactStatement": "None.",
+          "RemediationProcedure": "Run the below command (based on the file location on your system) on the Control Plane node. For example,  ``` chmod 600 /etc/kubernetes/admin.conf ```  On Kubernetes 1.29+ the `super-admin.conf` file should also be modified, if present. For example,   ``` chmod 600 /etc/kubernetes/super-admin.conf ```",
+          "AuditProcedure": "Run the following command (based on the file location on your system) on the Control Plane node. For example,  ``` stat -c %a /etc/kubernetes/admin.conf ```  On Kubernetes version 1.29 and higher run the following command as well :-  ``` stat -c %a /etc/kubernetes/super-admin.conf ```  Verify that the permissions are `600` or more restrictive.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/:https://raesene.github.io/blog/2024/01/06/when-is-admin-not-admin/",
+          "DefaultValue": "By default, admin.conf and super-admin.conf have permissions of `600`."
+        }
+      ]
+    },
+    {
+      "Id": "1.1.14",
+      "Description": "Ensure that the default administrative credential file ownership is set to root:root",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Ensure that the `admin.conf` (and `super-admin.conf` file, where it exists) file ownership is set to `root:root`.",
+          "RationaleStatement": "As part of initial cluster setup, default kubeconfig files are created to be used by the administrator of the cluster. These files contain private keys and certificates which allow for privileged access to the cluster. You should set their file ownership to maintain the integrity and confidentiality of the file. The file(s) should be owned by `root:root`.",
+          "ImpactStatement": "None.",
+          "RemediationProcedure": "Run the below command (based on the file location on your system) on the Control Plane node. For example,  ``` chown root:root /etc/kubernetes/admin.conf ```  On Kubernetes 1.29+ the super-admin.conf file should also be modified, if present. For example,  ``` chown root:root /etc/kubernetes/super-admin.conf ```",
+          "AuditProcedure": "Run the below command (based on the file location on your system) on the Control Plane node. For example,  ``` stat -c %U:%G /etc/kubernetes/admin.conf ```  On Kubernetes version 1.29 and higher run the following command as well :-  ``` stat -c %U:%G /etc/kubernetes/super-admin.conf ```  Verify that the ownership is set to `root:root`.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/kubeadm/:https://raesene.github.io/blog/2024/01/06/when-is-admin-not-admin/",
+          "DefaultValue": "By default, `admin.conf` and `super-admin.conf` file ownership is set to `root:root`."
+        }
+      ]
+    },
+    {
+      "Id": "1.1.15",
+      "Description": "Ensure that the scheduler.conf file permissions are set to 600 or more restrictive",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Ensure that the `scheduler.conf` file has permissions of `600` or more restrictive.",
+          "RationaleStatement": "The `scheduler.conf` file is the kubeconfig file for the Scheduler. You should restrict its file permissions to maintain the integrity of the file. The file should be writable by only the administrators on the system.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Run the below command (based on the file location on your system) on the Control Plane node. For example,  ``` chmod 600 /etc/kubernetes/scheduler.conf ```",
+          "AuditProcedure": "Run the following command (based on the file location on your system) on the Control Plane node. For example,  ``` stat -c %a /etc/kubernetes/scheduler.conf ```  Verify that the permissions are `600` or more restrictive.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/",
+          "DefaultValue": "By default, `scheduler.conf` has permissions of `640`."
+        }
+      ]
+    },
+    {
+      "Id": "1.1.16",
+      "Description": "Ensure that the scheduler.conf file ownership is set to root:root",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Ensure that the `scheduler.conf` file ownership is set to `root:root`.",
+          "RationaleStatement": "The `scheduler.conf` file is the kubeconfig file for the Scheduler. You should set its file ownership to maintain the integrity of the file. The file should be owned by `root:root`.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Run the below command (based on the file location on your system) on the Control Plane node. For example,  ``` chown root:root /etc/kubernetes/scheduler.conf ```",
+          "AuditProcedure": "Run the below command (based on the file location on your system) on the Control Plane node. For example,  ``` stat -c %U:%G /etc/kubernetes/scheduler.conf ```  Verify that the ownership is set to `root:root`.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/kubeadm/",
+          "DefaultValue": "By default, `scheduler.conf` file ownership is set to `root:root`."
+        }
+      ]
+    },
+    {
+      "Id": "1.1.17",
+      "Description": "Ensure that the controller-manager.conf file permissions are set to 600 or more restrictive",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Ensure that the `controller-manager.conf` file has permissions of 600 or more restrictive.",
+          "RationaleStatement": "The `controller-manager.conf` file is the kubeconfig file for the Controller Manager. You should restrict its file permissions to maintain the integrity of the file. The file should be writable by only the administrators on the system.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Run the below command (based on the file location on your system) on the Control Plane node. For example,  ``` chmod 600 /etc/kubernetes/controller-manager.conf ```",
+          "AuditProcedure": "Run the following command (based on the file location on your system) on the Control Plane node. For example,  ``` stat -c %a /etc/kubernetes/controller-manager.conf ```  Verify that the permissions are `600` or more restrictive.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/kube-controller-manager/",
+          "DefaultValue": "By default, `controller-manager.conf` has permissions of `640`."
+        }
+      ]
+    },
+    {
+      "Id": "1.1.18",
+      "Description": "Ensure that the controller-manager.conf file ownership is set to root:root",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Ensure that the `controller-manager.conf` file ownership is set to `root:root`.",
+          "RationaleStatement": "The `controller-manager.conf` file is the kubeconfig file for the Controller Manager. You should set its file ownership to maintain the integrity of the file. The file should be owned by `root:root`.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Run the below command (based on the file location on your system) on the Control Plane node. For example,  ``` chown root:root /etc/kubernetes/controller-manager.conf ```",
+          "AuditProcedure": "Run the below command (based on the file location on your system) on the Control Plane node. For example,  ``` stat -c %U:%G /etc/kubernetes/controller-manager.conf ```  Verify that the ownership is set to `root:root`.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/kube-controller-manager/",
+          "DefaultValue": "By default, `controller-manager.conf` file ownership is set to `root:root`."
+        }
+      ]
+    },
+    {
+      "Id": "1.1.19",
+      "Description": "Ensure that the Kubernetes PKI directory and file ownership is set to root:root",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Ensure that the Kubernetes PKI directory and file ownership is set to `root:root`.",
+          "RationaleStatement": "Kubernetes makes use of a number of certificates as part of its operation. You should set the ownership of the directory containing the PKI information and all files in that directory to maintain their integrity. The directory and files should be owned by `root:root`.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Run the below command (based on the file location on your system) on the Control Plane node. For example,  ``` chown -R root:root /etc/kubernetes/pki/ ```",
+          "AuditProcedure": "Run the below command (based on the file location on your system) on the Control Plane node. For example,  ``` ls -laR /etc/kubernetes/pki/ ```  Verify that the ownership of all files and directories in this hierarchy is set to `root:root`.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/kube-apiserver/",
+          "DefaultValue": "By default, the /etc/kubernetes/pki/ directory and all of the files and directories contained within it, are set to be owned by the root user."
+        }
+      ]
+    },
+    {
+      "Id": "1.1.20",
+      "Description": "Ensure that the Kubernetes PKI certificate file permissions are set to 644 or more restrictive",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Ensure that Kubernetes PKI certificate files have permissions of `644` or more restrictive.",
+          "RationaleStatement": "Kubernetes makes use of a number of certificate files as part of the operation of its components. The permissions on these files should be set to `644` or more restrictive to protect their integrity and confidentiality.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Run the below command (based on the file location on your system) on the Control Plane node. For example,  ``` chmod -R 644 /etc/kubernetes/pki/*.crt ```",
+          "AuditProcedure": "Run the below command (based on the file location on your system) on the Control Plane node. For example,  ``` stat -c '%a' /etc/kubernetes/pki/*.crt ``` Verify that the permissions are `644` or more restrictive.  or  ``` ls -l /etc/kubernetes/pki/*.crt ``` Verify -rw------",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/kube-apiserver/",
+          "DefaultValue": "By default, the certificates used by Kubernetes are set to have permissions of `644`"
+        }
+      ]
+    },
+    {
+      "Id": "1.1.21",
+      "Description": "Ensure that the Kubernetes PKI key file permissions are set to 600",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.1 Control Plane Node Configuration Files",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Ensure that Kubernetes PKI key files have permissions of `600`.",
+          "RationaleStatement": "Kubernetes makes use of a number of key files as part of the operation of its components. The permissions on these files should be set to `600` to protect their integrity and confidentiality.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Run the below command (based on the file location on your system) on the Control Plane node. For example,  ``` chmod -R 600 /etc/kubernetes/pki/*.key ```",
+          "AuditProcedure": "Run the below command (based on the file location on your system) on the Control Plane node. For example,  ``` stat -c '%a' /etc/kubernetes/pki/*.key ``` Verify that the permissions are `600` or more restrictive.  or  ``` ls -l /etc/kubernetes/pki/*.key ``` Verify that the permissions are `-rw------`",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/kube-apiserver/",
+          "DefaultValue": "By default, the keys used by Kubernetes are set to have permissions of `600`"
+        }
+      ]
+    },
+    {
+      "Id": "1.2.1",
+      "Description": "Ensure that the --anonymous-auth argument is set to false",
+      "Checks": [
+        "apiserver_anonymous_requests"
+      ],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Disable anonymous requests to the API server.",
+          "RationaleStatement": "When enabled, requests that are not rejected by other configured authentication methods are treated as anonymous requests. These requests are then served by the API server. You should rely on authentication to authorize access and disallow anonymous requests.  If you are using RBAC authorization, it is generally considered reasonable to allow anonymous access to the API Server for health checks and discovery purposes, and hence this recommendation is not scored. However, you should consider whether anonymous discovery is an acceptable risk for your purposes.",
+          "ImpactStatement": "Anonymous requests will be rejected.",
+          "RemediationProcedure": "Edit the API server pod specification file `/etc/kubernetes/manifests/kube-apiserver.yaml` on the Control Plane node and set the below parameter.  ``` --anonymous-auth=false ```",
+          "AuditProcedure": "Run the following command on the Control Plane node:  ``` ps -ef | grep kube-apiserver ```  Verify that the `--anonymous-auth` argument is set to `false`.  Alternative Audit Method  ``` kubectl get pod -nkube-system -lcomponent=kube-apiserver -o=jsonpath='{range .items[*]}{.spec.containers[*].command} {\\}{end}' | grep '--anonymous-auth' | grep -i false ```  If the exit code is '1', then the control isn't present / failed",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/kube-apiserver/:https://kubernetes.io/docs/admin/authentication/#anonymous-requests",
+          "DefaultValue": "By default, anonymous access is enabled."
+        }
+      ]
+    },
+    {
+      "Id": "1.2.2",
+      "Description": "Ensure that the --token-auth-file parameter is not set",
+      "Checks": [
+        "apiserver_no_token_auth_file"
+      ],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Do not use token based authentication.",
+          "RationaleStatement": "The token-based authentication utilizes static tokens to authenticate requests to the apiserver. The tokens are stored in clear-text in a file on the apiserver, and cannot be revoked or rotated without restarting the apiserver. Hence, do not use static token-based authentication.",
+          "ImpactStatement": "You will have to configure and use alternate authentication mechanisms such as certificates. Static token based authentication could not be used.",
+          "RemediationProcedure": "Follow the documentation and configure alternate mechanisms for authentication. Then, edit the API server pod specification file `/etc/kubernetes/manifests/kube-apiserver.yaml` on the master node and remove the `--token-auth-file=` parameter.",
+          "AuditProcedure": "Run the following command on the Control Plane node:  ``` ps -ef | grep kube-apiserver ```  Verify that the `--token-auth-file` argument does not exist.  Alternative Audit Method  ``` kubectl get pod -nkube-system -lcomponent=kube-apiserver -o=jsonpath='{range .items[*]}{.spec.containers[*].command} {\\}{end}' | grep '--token-auth-file' | grep -i false ```  If the exit code is '1', then the control isn't present / failed",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/authentication/#static-token-file:https://kubernetes.io/docs/admin/kube-apiserver/",
+          "DefaultValue": "By default, `--token-auth-file` argument is not set."
+        }
+      ]
+    },
+    {
+      "Id": "1.2.3",
+      "Description": "Ensure that the DenyServiceExternalIPs is set",
+      "Checks": [
+        "apiserver_deny_service_external_ips"
+      ],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "This admission controller rejects all net-new usage of the Service field externalIPs.",
+          "RationaleStatement": "Most users do not need the ability to set the `externalIPs` field for a `Service` at all, and cluster admins should consider disabling this functionality by enabling the `DenyServiceExternalIPs` admission controller. Clusters that do need to allow this functionality should consider using some custom policy to manage its usage.",
+          "ImpactStatement": "When enabled, users of the cluster may not create new Services which use externalIPs and may not add new values to externalIPs on existing Service objects.",
+          "RemediationProcedure": "Edit the API server pod specification file `/etc/kubernetes/manifests/kube-apiserver.yaml` on the master node and append the Kubernetes API server flag --enable-admission-plugins with the DenyServiceExternalIPs plugin. Note, the Kubernetes API server flag --enable-admission-plugins takes a comma-delimited list of admission control plugins to be enabled, even if they are in the list of plugins enabled by default.  ``` kube-apiserver --enable-admission-plugins=DenyServiceExternalIPs ```",
+          "AuditProcedure": "Run the following command on the Control Plane node:  ``` ps -ef | grep kube-apiserver ```  Verify that the `DenyServiceExternalIPs' argument exist as a string value in --enable-admission-plugins.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/:https://kubernetes.io/docs/admin/kube-apiserver/",
+          "DefaultValue": "By default, --enable-admission-plugins=DenyServiceExternalIP argument is not set, and the use of externalIPs is authorized."
+        }
+      ]
+    },
+    {
+      "Id": "1.2.4",
+      "Description": "Ensure that the --kubelet-client-certificate and --kubelet-client-key arguments are set as appropriate",
+      "Checks": [
+        "apiserver_kubelet_tls_auth"
+      ],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Enable certificate based kubelet authentication.",
+          "RationaleStatement": "The apiserver, by default, does not authenticate itself to the kubelet's HTTPS endpoints. The requests from the apiserver are treated anonymously. You should set up certificate-based kubelet authentication to ensure that the apiserver authenticates itself to kubelets when submitting requests.",
+          "ImpactStatement": "You require TLS to be configured on apiserver as well as kubelets.",
+          "RemediationProcedure": "Follow the Kubernetes documentation and set up the TLS connection between the apiserver and kubelets. Then, edit API server pod specification file `/etc/kubernetes/manifests/kube-apiserver.yaml` on the Control Plane node and set the kubelet client certificate and key parameters as below.  ``` --kubelet-client-certificate= --kubelet-client-key= ```",
+          "AuditProcedure": "Run the following command on the Control Plane node:  ``` ps -ef | grep kube-apiserver ```  Verify that the `--kubelet-client-certificate` and `--kubelet-client-key` arguments exist and they are set as appropriate.  Alternative Audit  ``` kubectl get pod -nkube-system -lcomponent=kube-apiserver -o=jsonpath='{range .items[*]}{.spec.containers[*].command} {\\}{end}' | grep '--kubelet-client-certificate' | grep -i false ```  If the exit code is '1', then the control isn't present / failed",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/kube-apiserver/:https://kubernetes.io/docs/admin/kubelet-authentication-authorization/:https://kubernetes.io/docs/concepts/cluster-administration/master-node-communication/#apiserver---kubelet",
+          "DefaultValue": "By default, certificate-based kubelet authentication is not set."
+        }
+      ]
+    },
+    {
+      "Id": "1.2.5",
+      "Description": "Ensure that the --kubelet-certificate-authority argument is set as appropriate",
+      "Checks": [
+        "apiserver_kubelet_cert_auth"
+      ],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Verify kubelet's certificate before establishing connection.",
+          "RationaleStatement": "The connections from the apiserver to the kubelet are used for fetching logs for pods, attaching (through kubectl) to running pods, and using the kubeletโ€™s port-forwarding functionality. These connections terminate at the kubeletโ€™s HTTPS endpoint. By default, the apiserver does not verify the kubeletโ€™s serving certificate, which makes the connection subject to man-in-the-middle attacks, and unsafe to run over untrusted and/or public networks.",
+          "ImpactStatement": "You require TLS to be configured on apiserver as well as kubelets.",
+          "RemediationProcedure": "Follow the Kubernetes documentation and setup the TLS connection between the apiserver and kubelets. Then, edit the API server pod specification file `/etc/kubernetes/manifests/kube-apiserver.yaml` on the Control Plane node and set the `--kubelet-certificate-authority` parameter to the path to the cert file for the certificate authority.  ``` --kubelet-certificate-authority= ```",
+          "AuditProcedure": "Run the following command on the Control Plane node:  ``` ps -ef | grep kube-apiserver ```  Verify that the `--kubelet-certificate-authority` argument exists and is set as appropriate.  Alternative Audit  ``` kubectl get pod -nkube-system -lcomponent=kube-apiserver -o=jsonpath='{range .items[]}{.spec.containers[].command} {\\}{end}' | grep '--kubelet-certificate-authority' | grep -i false ```  If the exit code is '1', then the control isn't present / failed",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/kube-apiserver/:https://kubernetes.io/docs/admin/kubelet-authentication-authorization/:https://kubernetes.io/docs/concepts/cluster-administration/master-node-communication/#apiserver---kubelet",
+          "DefaultValue": "By default, `--kubelet-certificate-authority` argument is not set."
+        }
+      ]
+    },
+    {
+      "Id": "1.2.6",
+      "Description": "Ensure that the --authorization-mode argument is not set to AlwaysAllow",
+      "Checks": [
+        "apiserver_auth_mode_not_always_allow"
+      ],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Do not always authorize all requests.",
+          "RationaleStatement": "The API Server, can be configured to allow all requests. This mode should not be used on any production cluster.",
+          "ImpactStatement": "Only authorized requests will be served.",
+          "RemediationProcedure": "Edit the API server pod specification file `/etc/kubernetes/manifests/kube-apiserver.yaml` on the Control Plane node and set the `--authorization-mode` parameter to values other than `AlwaysAllow`. One such example could be as below.  ``` --authorization-mode=RBAC ```",
+          "AuditProcedure": "Run the following command on the Control Plane node:  ``` ps -ef | grep kube-apiserver ```  Verify that the `--authorization-mode` argument exists and is not set to `AlwaysAllow`.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/:https://kubernetes.io/docs/admin/authorization/",
+          "DefaultValue": "By default, `AlwaysAllow` is not enabled."
+        }
+      ]
+    },
+    {
+      "Id": "1.2.7",
+      "Description": "Ensure that the --authorization-mode argument includes Node",
+      "Checks": [
+        "apiserver_auth_mode_include_node"
+      ],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Restrict kubelet nodes to reading only objects associated with them.",
+          "RationaleStatement": "The `Node` authorization mode only allows kubelets to read `Secret`, `ConfigMap`, `PersistentVolume`, and `PersistentVolumeClaim` objects associated with their nodes.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Edit the API server pod specification file `/etc/kubernetes/manifests/kube-apiserver.yaml` on the Control Plane node and set the `--authorization-mode` parameter to a value that includes `Node`.  ``` --authorization-mode=Node,RBAC ```",
+          "AuditProcedure": "Run the following command on the Control Plane node:  ``` ps -ef | grep kube-apiserver ```  Verify that the `--authorization-mode` argument exists and is set to a value to include `Node`.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/kube-apiserver/:https://kubernetes.io/docs/admin/authorization/node/:https://github.com/kubernetes/kubernetes/pull/46076:https://acotten.com/post/kube17-security",
+          "DefaultValue": "By default, `Node` authorization is not enabled."
+        }
+      ]
+    },
+    {
+      "Id": "1.2.8",
+      "Description": "Ensure that the --authorization-mode argument includes RBAC",
+      "Checks": [
+        "apiserver_auth_mode_include_rbac"
+      ],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Turn on Role Based Access Control.",
+          "RationaleStatement": "Role Based Access Control (RBAC) allows fine-grained control over the operations that different entities can perform on different objects in the cluster. It is recommended to use the RBAC authorization mode.",
+          "ImpactStatement": "When RBAC is enabled you will need to ensure that appropriate RBAC settings (including Roles, RoleBindings and ClusterRoleBindings) are configured to allow appropriate access.",
+          "RemediationProcedure": "Edit the API server pod specification file `/etc/kubernetes/manifests/kube-apiserver.yaml` on the Control Plane node and set the `--authorization-mode` parameter to a value that includes `RBAC`, for example:  ``` --authorization-mode=Node,RBAC ```",
+          "AuditProcedure": "Run the following command on the Control Plane node:  ``` ps -ef | grep kube-apiserver ```  Verify that the `--authorization-mode` argument exists and is set to a value to include `RBAC`.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/reference/access-authn-authz/rbac/",
+          "DefaultValue": "By default, `RBAC` authorization is not enabled."
+        }
+      ]
+    },
+    {
+      "Id": "1.2.9",
+      "Description": "Ensure that the admission control plugin EventRateLimit is set",
+      "Checks": [
+        "apiserver_event_rate_limit"
+      ],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Limit the rate at which the API server accepts requests.",
+          "RationaleStatement": "Using `EventRateLimit` admission control enforces a limit on the number of events that the API Server will accept in a given time slice. A misbehaving workload could overwhelm and DoS the API Server, making it unavailable. This particularly applies to a multi-tenant cluster, where there might be a small percentage of misbehaving tenants which could have a significant impact on the performance of the cluster overall. Hence, it is recommended to limit the rate of events that the API server will accept.",
+          "ImpactStatement": "You need to carefully tune in limits as per your environment.",
+          "RemediationProcedure": "Follow the Kubernetes documentation and set the desired limits in a configuration file.  Then, edit the API server pod specification file `/etc/kubernetes/manifests/kube-apiserver.yaml` and set the below parameters.  ``` --enable-admission-plugins=...,EventRateLimit,... --admission-control-config-file= ```",
+          "AuditProcedure": "Run the following command on the Control Plane node:  ``` ps -ef | grep kube-apiserver ```  Verify that the `--enable-admission-plugins` argument is set to a value that includes `EventRateLimit`.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/:https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#eventratelimit:https://github.com/staebler/community/blob/9873b632f4d99b5d99c38c9b15fe2f8b93d0a746/contributors/design-proposals/admission_control_event_rate_limit.md",
+          "DefaultValue": "By default, `EventRateLimit` is not set."
+        }
+      ]
+    },
+    {
+      "Id": "1.2.10",
+      "Description": "Ensure that the admission control plugin AlwaysAdmit is not set",
+      "Checks": [
+        "apiserver_no_always_admit_plugin"
+      ],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Do not allow all requests.",
+          "RationaleStatement": "Setting admission control plugin `AlwaysAdmit` allows all requests and do not filter any requests.  The `AlwaysAdmit` admission controller was deprecated in Kubernetes v1.13. Its behavior was equivalent to turning off all admission controllers.",
+          "ImpactStatement": "Only requests explicitly allowed by the admissions control plugins would be served.",
+          "RemediationProcedure": "Edit the API server pod specification file `/etc/kubernetes/manifests/kube-apiserver.yaml` on the Control Plane node and either remove the `--enable-admission-plugins` parameter, or set it to a value that does not include `AlwaysAdmit`.",
+          "AuditProcedure": "Run the following command on the Control Plane node:  ``` ps -ef | grep kube-apiserver ```  Verify that if the `--enable-admission-plugins` argument is set, its value does not include `AlwaysAdmit`.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/:https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#alwaysadmit",
+          "DefaultValue": "`AlwaysAdmit` is not in the list of default admission plugins."
+        }
+      ]
+    },
+    {
+      "Id": "1.2.11",
+      "Description": "Ensure that the admission control plugin AlwaysPullImages is set",
+      "Checks": [
+        "apiserver_always_pull_images_plugin"
+      ],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Always pull images.",
+          "RationaleStatement": "Setting admission control policy to `AlwaysPullImages` forces every new pod to pull the required images every time. In a multi-tenant cluster users can be assured that their private images can only be used by those who have the credentials to pull them. Without this admission control policy, once an image has been pulled to a node, any pod from any user can use it simply by knowing the imageโ€™s name, without any authorization check against the image ownership. When this plug-in is enabled, images are always pulled prior to starting containers, which means valid credentials are required.",
+          "ImpactStatement": "Credentials would be required to pull the private images every time. Also, in trusted environments, this might increases load on network, registry, and decreases speed.  This setting could impact offline or isolated clusters, which have images preloaded and do not have access to a registry to pull in-use images. This setting is not appropriate for clusters which use this configuration.",
+          "RemediationProcedure": "Edit the API server pod specification file `/etc/kubernetes/manifests/kube-apiserver.yaml` on the Control Plane node and set the `--enable-admission-plugins` parameter to include `AlwaysPullImages`.  ``` --enable-admission-plugins=...,AlwaysPullImages,... ```",
+          "AuditProcedure": "Run the following command on the Control Plane node:  ``` ps -ef | grep kube-apiserver ```  Verify that the `--enable-admission-plugins` argument is set to a value that includes `AlwaysPullImages`.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/:https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#alwayspullimages",
+          "DefaultValue": "By default, `AlwaysPullImages` is not set."
+        }
+      ]
+    },
+    {
+      "Id": "1.2.12",
+      "Description": "Ensure that the admission control plugin ServiceAccount is set",
+      "Checks": [
+        "apiserver_service_account_plugin"
+      ],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
+          "Profile": "Level 2 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Automate service accounts management.",
+          "RationaleStatement": "When you create a pod, if you do not specify a service account, it is automatically assigned the `default` service account in the same namespace. You should create your own service account and let the API server manage its security tokens.",
+          "ImpactStatement": "None.",
+          "RemediationProcedure": "Follow the documentation and create `ServiceAccount` objects as per your environment. Then, edit the API server pod specification file `/etc/kubernetes/manifests/kube-apiserver.yaml` on the master node and ensure that the `--disable-admission-plugins` parameter is set to a value that does not include `ServiceAccount`.",
+          "AuditProcedure": "Run the following command on the Control Plane node:  ``` ps -ef | grep kube-apiserver ```  Verify that the `--disable-admission-plugins` argument is set to a value that does not includes `ServiceAccount`.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/:https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#serviceaccount:https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/",
+          "DefaultValue": "By default, `ServiceAccount` is set."
+        }
+      ]
+    },
+    {
+      "Id": "1.2.13",
+      "Description": "Ensure that the admission control plugin NamespaceLifecycle is set",
+      "Checks": [
+        "apiserver_namespace_lifecycle_plugin"
+      ],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
+          "Profile": "Level 2 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Reject creating objects in a namespace that is undergoing termination.",
+          "RationaleStatement": "Setting admission control policy to `NamespaceLifecycle` ensures that objects cannot be created in non-existent namespaces, and that namespaces undergoing termination are not used for creating the new objects. This is recommended to enforce the integrity of the namespace termination process and also for the availability of the newer objects.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Edit the API server pod specification file `/etc/kubernetes/manifests/kube-apiserver.yaml` on the Control Plane node and set the `--disable-admission-plugins` parameter to ensure it does not include `NamespaceLifecycle`.",
+          "AuditProcedure": "Run the following command on the Control Plane node:  ``` ps -ef | grep kube-apiserver ```  Verify that the `--disable-admission-plugins` argument is set to a value that does not include `NamespaceLifecycle`.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/:https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#namespacelifecycle",
+          "DefaultValue": "By default, `NamespaceLifecycle` is set."
+        }
+      ]
+    },
+    {
+      "Id": "1.2.14",
+      "Description": "Ensure that the admission control plugin NodeRestriction is set",
+      "Checks": [
+        "apiserver_node_restriction_plugin"
+      ],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
+          "Profile": "Level 2 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Limit the `Node` and `Pod` objects that a kubelet could modify.",
+          "RationaleStatement": "Using the `NodeRestriction` plug-in ensures that the kubelet is restricted to the `Node` and `Pod` objects that it could modify as defined. Such kubelets will only be allowed to modify their own `Node` API object, and only modify `Pod` API objects that are bound to their node.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Follow the Kubernetes documentation and configure `NodeRestriction` plug-in on kubelets. Then, edit the API server pod specification file `/etc/kubernetes/manifests/kube-apiserver.yaml` on the master node and set the `--enable-admission-plugins` parameter to a value that includes `NodeRestriction`.  ``` --enable-admission-plugins=...,NodeRestriction,... ```",
+          "AuditProcedure": "Run the following command on the Control Plane node:  ``` ps -ef | grep kube-apiserver ```  Verify that the `--enable-admission-plugins` argument is set to a value that includes `NodeRestriction`.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/:https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#noderestriction:https://kubernetes.io/docs/reference/access-authn-authz/node/",
+          "DefaultValue": "By default, `NodeRestriction` is not set."
+        }
+      ]
+    },
+    {
+      "Id": "1.2.15",
+      "Description": "Ensure that the --profiling argument is set to false",
+      "Checks": [
+        "apiserver_disable_profiling"
+      ],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Disable profiling, if not needed.",
+          "RationaleStatement": "Profiling allows for the identification of specific performance bottlenecks. It generates a significant amount of program data that could potentially be exploited to uncover system and program details. If you are not experiencing any bottlenecks and do not need the profiler for troubleshooting purposes, it is recommended to turn it off to reduce the potential attack surface.",
+          "ImpactStatement": "Profiling information would not be available.",
+          "RemediationProcedure": "Edit the API server pod specification file `/etc/kubernetes/manifests/kube-apiserver.yaml` on the Control Plane node and set the below parameter.  ``` --profiling=false ```",
+          "AuditProcedure": "Run the following command on the Control Plane node:  ``` ps -ef | grep kube-apiserver ```  Verify that the `--profiling` argument is set to `false`.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/",
+          "DefaultValue": "By default, profiling is enabled."
+        }
+      ]
+    },
+    {
+      "Id": "1.2.16",
+      "Description": "Ensure that the --audit-log-path argument is set",
+      "Checks": [
+        "apiserver_audit_log_path_set"
+      ],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Enable auditing on the Kubernetes API Server and set the desired audit log path.",
+          "RationaleStatement": "Auditing the Kubernetes API Server provides a security-relevant chronological set of records documenting the sequence of activities that have affected system by individual users, administrators or other components of the system. Even though currently, Kubernetes provides only basic audit capabilities, it should be enabled. You can enable it by setting an appropriate audit log path.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Edit the API server pod specification file `/etc/kubernetes/manifests/kube-apiserver.yaml` on the Control Plane node and set the `--audit-log-path` parameter to a suitable path and file where you would like audit logs to be written, for example:  ``` --audit-log-path=/var/log/apiserver/audit.log ```",
+          "AuditProcedure": "Run the following command on the Control Plane node:  ``` ps -ef | grep kube-apiserver ```  Verify that the `--audit-log-path` argument is set as appropriate.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/:https://kubernetes.io/docs/tasks/debug/debug-cluster/audit/:https://github.com/kubernetes/enhancements/issues/22",
+          "DefaultValue": "By default, auditing is not enabled."
+        }
+      ]
+    },
+    {
+      "Id": "1.2.17",
+      "Description": "Ensure that the --audit-log-maxage argument is set to 30 or as appropriate",
+      "Checks": [
+        "apiserver_audit_log_maxage_set"
+      ],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Retain the logs for at least 30 days or as appropriate.",
+          "RationaleStatement": "Retaining logs for at least 30 days ensures that you can go back in time and investigate or correlate any events. Set your audit log retention period to 30 days or as per your business requirements.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Edit the API server pod specification file `/etc/kubernetes/manifests/kube-apiserver.yaml` on the Control Plane node and set the `--audit-log-maxage` parameter to 30 or as an appropriate number of days:  ``` --audit-log-maxage=30 ```",
+          "AuditProcedure": "Run the following command on the Control Plane node:  ``` ps -ef | grep kube-apiserver ```  Verify that the `--audit-log-maxage` argument is set to `30` or as appropriate.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/:https://kubernetes.io/docs/tasks/debug/debug-cluster/audit/:https://github.com/kubernetes/enhancements/issues/22",
+          "DefaultValue": "By default, auditing is not enabled."
+        }
+      ]
+    },
+    {
+      "Id": "1.2.18",
+      "Description": "Ensure that the --audit-log-maxbackup argument is set to 10 or as appropriate",
+      "Checks": [
+        "apiserver_audit_log_maxbackup_set"
+      ],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Retain 10 or an appropriate number of old log files.",
+          "RationaleStatement": "Kubernetes automatically rotates the log files. Retaining old log files ensures that you would have sufficient log data available for carrying out any investigation or correlation. For example, if you have set file size of 100 MB and the number of old log files to keep as 10, you would approximate have 1 GB of log data that you could potentially use for your analysis.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Edit the API server pod specification file `/etc/kubernetes/manifests/kube-apiserver.yaml` on the Control Plane node and set the `--audit-log-maxbackup` parameter to 10 or to an appropriate value.  ``` --audit-log-maxbackup=10 ```",
+          "AuditProcedure": "Run the following command on the Control Plane node:  ``` ps -ef | grep kube-apiserver ```  Verify that the `--audit-log-maxbackup` argument is set to `10` or as appropriate.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/:https://kubernetes.io/docs/tasks/debug/debug-cluster/audit/:https://github.com/kubernetes/enhancements/issues/22",
+          "DefaultValue": "By default, auditing is not enabled."
+        }
+      ]
+    },
+    {
+      "Id": "1.2.19",
+      "Description": "Ensure that the --audit-log-maxsize argument is set to 100 or as appropriate",
+      "Checks": [
+        "apiserver_audit_log_maxsize_set"
+      ],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Rotate log files on reaching 100 MB or as appropriate.",
+          "RationaleStatement": "Kubernetes automatically rotates the log files. Retaining old log files ensures that you would have sufficient log data available for carrying out any investigation or correlation. If you have set file size of 100 MB and the number of old log files to keep as 10, you would approximate have 1 GB of log data that you could potentially use for your analysis.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Edit the API server pod specification file `/etc/kubernetes/manifests/kube-apiserver.yaml` on the Control Plane node and set the `--audit-log-maxsize` parameter to an appropriate size in MB. For example, to set it as 100 MB:  ``` --audit-log-maxsize=100 ```",
+          "AuditProcedure": "Run the following command on the Control Plane node:  ``` ps -ef | grep kube-apiserver ```  Verify that the `--audit-log-maxsize` argument is set to `100` or as appropriate.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/:https://kubernetes.io/docs/tasks/debug/debug-cluster/audit/:https://github.com/kubernetes/enhancements/issues/22",
+          "DefaultValue": "By default, auditing is not enabled."
+        }
+      ]
+    },
+    {
+      "Id": "1.2.20",
+      "Description": "Ensure that the --request-timeout argument is set as appropriate",
+      "Checks": [
+        "apiserver_request_timeout_set"
+      ],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Set global request timeout for API server requests as appropriate.",
+          "RationaleStatement": "Setting global request timeout allows extending the API server request timeout limit to a duration appropriate to the user's connection speed. By default, it is set to 60 seconds which might be problematic on slower connections making cluster resources inaccessible once the data volume for requests exceeds what can be transmitted in 60 seconds. But, setting this timeout limit to be too large can exhaust the API server resources making it prone to Denial-of-Service attack. Hence, it is recommended to set this limit as appropriate and change the default limit of 60 seconds only if needed.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Edit the API server pod specification file `/etc/kubernetes/manifests/kube-apiserver.yaml` and set the below parameter as appropriate and if needed. For example,  ``` --request-timeout=300s ```",
+          "AuditProcedure": "Run the following command on the Control Plane node:  ``` ps -ef | grep kube-apiserver ```  Verify that the `--request-timeout` argument is either not set or set to an appropriate value.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/:https://github.com/kubernetes/kubernetes/pull/51415",
+          "DefaultValue": "By default, `--request-timeout` is set to 60 seconds."
+        }
+      ]
+    },
+    {
+      "Id": "1.2.21",
+      "Description": "Ensure that the --service-account-lookup argument is set to true",
+      "Checks": [
+        "apiserver_service_account_lookup_true"
+      ],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Validate service account before validating token.",
+          "RationaleStatement": "If `--service-account-lookup` is not enabled, the apiserver only verifies that the authentication token is valid, and does not validate that the service account token mentioned in the request is actually present in etcd. This allows using a service account token even after the corresponding service account is deleted. This is an example of time of check to time of use security issue.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Edit the API server pod specification file `/etc/kubernetes/manifests/kube-apiserver.yaml` on the Control Plane node and set the below parameter.   ``` --service-account-lookup=true ```  Alternatively, you can delete the `--service-account-lookup` parameter from this file so that the default takes effect.",
+          "AuditProcedure": "Run the following command on the Control Plane node:  ``` ps -ef | grep kube-apiserver ```  Verify that if the `--service-account-lookup` argument exists it is set to `true`.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/:https://github.com/kubernetes/kubernetes/issues/24167:https://en.wikipedia.org/wiki/Time-of-check_to_time-of-use",
+          "DefaultValue": "By default, `--service-account-lookup` argument is set to `true`."
+        }
+      ]
+    },
+    {
+      "Id": "1.2.22",
+      "Description": "Ensure that the --service-account-key-file argument is set as appropriate",
+      "Checks": [
+        "apiserver_service_account_key_file_set"
+      ],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Explicitly set a service account public key file for service accounts on the apiserver.",
+          "RationaleStatement": "By default, if no `--service-account-key-file` is specified to the apiserver, it uses the private key from the TLS serving certificate to verify service account tokens. To ensure that the keys for service account tokens could be rotated as needed, a separate public/private key pair should be used for signing service account tokens. Hence, the public key should be specified to the apiserver with `--service-account-key-file`.",
+          "ImpactStatement": "The corresponding private key must be provided to the controller manager. You would need to securely maintain the key file and rotate the keys based on your organization's key rotation policy.",
+          "RemediationProcedure": "Edit the API server pod specification file `/etc/kubernetes/manifests/kube-apiserver.yaml` on the Control Plane node and set the `--service-account-key-file` parameter to the public key file for service accounts:  ``` --service-account-key-file= ```",
+          "AuditProcedure": "Run the following command on the Control Plane node:  ``` ps -ef | grep kube-apiserver ```  Verify that the `--service-account-key-file` argument exists and is set as appropriate.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/:https://github.com/kubernetes/kubernetes/issues/24167",
+          "DefaultValue": "By default, `--service-account-key-file` argument is not set."
+        }
+      ]
+    },
+    {
+      "Id": "1.2.23",
+      "Description": "Ensure that the --etcd-certfile and --etcd-keyfile arguments are set as appropriate",
+      "Checks": [
+        "apiserver_etcd_tls_config"
+      ],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "etcd should be configured to make use of TLS encryption for client connections.",
+          "RationaleStatement": "etcd is a highly-available key value store used by Kubernetes deployments for persistent storage of all of its REST API objects. These objects are sensitive in nature and should be protected by client authentication. This requires the API server to identify itself to the etcd server using a client certificate and key.",
+          "ImpactStatement": "TLS and client certificate authentication must be configured for etcd.",
+          "RemediationProcedure": "Follow the Kubernetes documentation and set up the TLS connection between the apiserver and etcd. Then, edit the API server pod specification file `/etc/kubernetes/manifests/kube-apiserver.yaml` on the master node and set the etcd certificate and key file parameters.  ``` --etcd-certfile=  --etcd-keyfile= ```",
+          "AuditProcedure": "Run the following command on the Control Plane node:  ``` ps -ef | grep kube-apiserver ```  Verify that the `--etcd-certfile` and `--etcd-keyfile` arguments exist and they are set as appropriate.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/",
+          "DefaultValue": "By default, `--etcd-certfile` and `--etcd-keyfile` arguments are not set"
+        }
+      ]
+    },
+    {
+      "Id": "1.2.24",
+      "Description": "Ensure that the --tls-cert-file and --tls-private-key-file arguments are set as appropriate",
+      "Checks": [
+        "apiserver_tls_config"
+      ],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Setup TLS connection on the API server.",
+          "RationaleStatement": "API server communication contains sensitive parameters that should remain encrypted in transit. Configure the API server to serve only HTTPS traffic.",
+          "ImpactStatement": "TLS and client certificate authentication must be configured for your Kubernetes cluster deployment.",
+          "RemediationProcedure": "Follow the Kubernetes documentation and set up the TLS connection on the apiserver. Then, edit the API server pod specification file `/etc/kubernetes/manifests/kube-apiserver.yaml` on the master node and set the TLS certificate and private key file parameters.  ``` --tls-cert-file=  --tls-private-key-file= ```",
+          "AuditProcedure": "Run the following command on the Control Plane node:  ``` ps -ef | grep kube-apiserver ```  Verify that the `--tls-cert-file` and `--tls-private-key-file` arguments exist and they are set as appropriate.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/:https://github.com/kelseyhightower/docker-kubernetes-tls-guide",
+          "DefaultValue": "By default, `--tls-cert-file` and `--tls-private-key-file` are presented and created for use."
+        }
+      ]
+    },
+    {
+      "Id": "1.2.25",
+      "Description": "Ensure that the --client-ca-file argument is set as appropriate",
+      "Checks": [
+        "apiserver_client_ca_file_set"
+      ],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Setup TLS connection on the API server.",
+          "RationaleStatement": "API server communication contains sensitive parameters that should remain encrypted in transit. Configure the API server to serve only HTTPS traffic. If `--client-ca-file` argument is set, any request presenting a client certificate signed by one of the authorities in the `client-ca-file` is authenticated with an identity corresponding to the CommonName of the client certificate.",
+          "ImpactStatement": "TLS and client certificate authentication must be configured for your Kubernetes cluster deployment.",
+          "RemediationProcedure": "Follow the Kubernetes documentation and set up the TLS connection on the apiserver. Then, edit the API server pod specification file `/etc/kubernetes/manifests/kube-apiserver.yaml` on the master node and set the client certificate authority file.  ``` --client-ca-file= ```",
+          "AuditProcedure": "Run the following command on the Control Plane node:  ``` ps -ef | grep kube-apiserver ```  Verify that the `--client-ca-file` argument exists and it is set as appropriate.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/:https://github.com/kelseyhightower/docker-kubernetes-tls-guide",
+          "DefaultValue": "By default, `--client-ca-file` argument is not set."
+        }
+      ]
+    },
+    {
+      "Id": "1.2.26",
+      "Description": "Ensure that the --etcd-cafile argument is set as appropriate",
+      "Checks": [
+        "apiserver_etcd_cafile_set"
+      ],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "etcd should be configured to make use of TLS encryption for client connections.",
+          "RationaleStatement": "etcd is a highly-available key value store used by Kubernetes deployments for persistent storage of all of its REST API objects. These objects are sensitive in nature and should be protected by client authentication. This requires the API server to identify itself to the etcd server using a SSL Certificate Authority file.",
+          "ImpactStatement": "TLS and client certificate authentication must be configured for etcd.",
+          "RemediationProcedure": "Follow the Kubernetes documentation and set up the TLS connection between the apiserver and etcd. Then, edit the API server pod specification file `/etc/kubernetes/manifests/kube-apiserver.yaml` on the master node and set the etcd certificate authority file parameter.  ``` --etcd-cafile= ```",
+          "AuditProcedure": "Run the following command on the Control Plane node:  ``` ps -ef | grep kube-apiserver ```  Verify that the `--etcd-cafile` argument exists and it is set as appropriate.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/",
+          "DefaultValue": "By default, `--etcd-cafile` is not set."
+        }
+      ]
+    },
+    {
+      "Id": "1.2.27",
+      "Description": "Ensure that the --encryption-provider-config argument is set as appropriate",
+      "Checks": [
+        "apiserver_encryption_provider_config_set"
+      ],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Encrypt etcd key-value store.",
+          "RationaleStatement": "etcd is a highly available key-value store used by Kubernetes deployments for persistent storage of all of its REST API objects. These objects are sensitive in nature and should be encrypted at rest to avoid any disclosures.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Follow the Kubernetes documentation and configure a `EncryptionConfig` file. Then, edit the API server pod specification file `/etc/kubernetes/manifests/kube-apiserver.yaml` on the master node and set the `--encryption-provider-config` parameter to the path of that file:  ``` --encryption-provider-config= ```",
+          "AuditProcedure": "Run the following command on the Control Plane node:  ``` ps -ef | grep kube-apiserver ```  Verify that the `--encryption-provider-config` argument is set to a `EncryptionConfig` file. Additionally, ensure that the `EncryptionConfig` file has all the desired `resources` covered especially any secrets.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/tasks/administer-cluster/encrypt-data/:https://acotten.com/post/kube17-security:https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/:https://github.com/kubernetes/enhancements/issues/92",
+          "DefaultValue": "By default, `--encryption-provider-config` is not set."
+        }
+      ]
+    },
+    {
+      "Id": "1.2.28",
+      "Description": "Ensure that encryption providers are appropriately configured",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Where `etcd` encryption is used, appropriate providers should be configured.",
+          "RationaleStatement": "Where `etcd` encryption is used, it is important to ensure that the appropriate set of encryption providers is used. Currently, the `aescbc`, `kms`, and `secretbox` are likely to be appropriate options.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Follow the Kubernetes documentation and configure a `EncryptionConfig` file. In this file, choose `aescbc`, `kms`, or `secretbox` as the encryption provider.",
+          "AuditProcedure": "Run the following command on the Control Plane node:  ``` ps -ef | grep kube-apiserver ```  Get the `EncryptionConfig` file set for `--encryption-provider-config` argument. Verify that `aescbc`, `kms`, or `secretbox` is set as the encryption provider for all the desired `resources`.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/tasks/administer-cluster/encrypt-data/:https://acotten.com/post/kube17-security:https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/:https://github.com/kubernetes/enhancements/issues/92:https://kubernetes.io/docs/tasks/administer-cluster/encrypt-data/#providers",
+          "DefaultValue": "By default, no encryption provider is set."
+        }
+      ]
+    },
+    {
+      "Id": "1.2.29",
+      "Description": "Ensure that the API Server only makes use of Strong Cryptographic Ciphers",
+      "Checks": [
+        "apiserver_strong_ciphers_only"
+      ],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Ensure that the API server is configured to only use strong cryptographic ciphers.",
+          "RationaleStatement": "TLS ciphers have had a number of known vulnerabilities and weaknesses, which can reduce the protection provided by them. By default Kubernetes supports a number of TLS cipher suites including some that have security concerns, weakening the protection provided.",
+          "ImpactStatement": "API server clients that cannot support modern cryptographic ciphers will not be able to make connections to the API server.",
+          "RemediationProcedure": "Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml on the Control Plane node and set the below parameter.  ``` --tls-cipher-suites=TLS_AES_128_GCM_SHA256, TLS_AES_256_GCM_SHA384, TLS_CHACHA20_POLY1305_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305, TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305, TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256. ```",
+          "AuditProcedure": "Run the following command on the Control Plane node:  ``` ps -ef | grep kube-apiserver ```  Verify that the `--tls-cipher-suites` argument is set as outlined in the remediation procedure below.",
+          "AdditionalInformation": "Insecure values: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_RC4_128_SHA, TLS_RSA_WITH_3DES_EDE_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_256_GCM_SHA384, TLS_RSA_WITH_RC4_128_SHA.",
+          "References": "https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/:https://github.com/ssllabs/research/wiki/SSL-and-TLS-Deployment-Best-Practices#23-use-secure-cipher-suites",
+          "DefaultValue": "By default the Kubernetes API server supports a wide range of TLS ciphers"
+        }
+      ]
+    },
+    {
+      "Id": "1.2.30",
+      "Description": "Ensure that the --service-account-extend-token-expiration parameter is set to false",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.2 API Server",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "By default Kubernetes extends service account token lifetimes to one year to aid in transition from the legacy token settings.",
+          "RationaleStatement": "This default setting is not ideal for security as it ignores other settings related to maximum token lifetime and means that a lost or stolen credential could be valid for an extended period of time.",
+          "ImpactStatement": "Disabling this setting means that the service account token expiry set in the cluster will be enforced, and service account tokens will expire at the end of that time frame.",
+          "RemediationProcedure": "Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml on the Control Plane node and set the --service-account-extend-token-expiration parameter to false.  ``` --service-account-extend-token-expiration=false ```",
+          "AuditProcedure": "Run the following command on the Control Plane node:  ``` ps -ef | grep kube-apiserver ```  Verify that the --service-account-extend-token-expiration argument is set to false.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/",
+          "DefaultValue": "By default, this parameter is set to true"
+        }
+      ]
+    },
+    {
+      "Id": "1.3.1",
+      "Description": "Ensure that the --terminated-pod-gc-threshold argument is set as appropriate",
+      "Checks": [
+        "controllermanager_garbage_collection"
+      ],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.3 Controller Manager",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Activate garbage collector on pod termination, as appropriate.",
+          "RationaleStatement": "Garbage collection is important to ensure sufficient resource availability and avoiding degraded performance and availability. In the worst case, the system might crash or just be unusable for a long period of time. The current setting for garbage collection is 12,500 terminated pods which might be too high for your system to sustain. Based on your system resources and tests, choose an appropriate threshold value to activate garbage collection.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Edit the Controller Manager pod specification file `/etc/kubernetes/manifests/kube-controller-manager.yaml` on the Control Plane node and set the `--terminated-pod-gc-threshold` to an appropriate threshold, for example:  ``` --terminated-pod-gc-threshold=10 ```",
+          "AuditProcedure": "Run the following command on the Control Plane node:  ``` ps -ef | grep kube-controller-manager ```  Verify that the `--terminated-pod-gc-threshold` argument is set as appropriate.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/kube-controller-manager/:https://github.com/kubernetes/kubernetes/issues/28484",
+          "DefaultValue": "By default, `--terminated-pod-gc-threshold` is set to `12500`."
+        }
+      ]
+    },
+    {
+      "Id": "1.3.2",
+      "Description": "Ensure that the --profiling argument is set to false",
+      "Checks": [
+        "controllermanager_disable_profiling"
+      ],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.3 Controller Manager",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Disable profiling, if not needed.",
+          "RationaleStatement": "Profiling allows for the identification of specific performance bottlenecks. It generates a significant amount of program data that could potentially be exploited to uncover system and program details. If you are not experiencing any bottlenecks and do not need the profiler for troubleshooting purposes, it is recommended to turn it off to reduce the potential attack surface.",
+          "ImpactStatement": "Profiling information would not be available.",
+          "RemediationProcedure": "Edit the Controller Manager pod specification file `/etc/kubernetes/manifests/kube-controller-manager.yaml` on the Control Plane node and set the below parameter.  ``` --profiling=false ```",
+          "AuditProcedure": "Run the following command on the Control Plane node:  ``` ps -ef | grep kube-controller-manager ```  Verify that the `--profiling` argument is set to `false`.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/kube-controller-manager/:https://github.com/kubernetes/community/blob/master/contributors/devel/profiling.md",
+          "DefaultValue": "By default, profiling is enabled."
+        }
+      ]
+    },
+    {
+      "Id": "1.3.3",
+      "Description": "Ensure that the --use-service-account-credentials argument is set to true",
+      "Checks": [
+        "controllermanager_service_account_credentials"
+      ],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.3 Controller Manager",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Use individual service account credentials for each controller.",
+          "RationaleStatement": "The controller manager creates a service account per controller in the `kube-system` namespace, generates a credential for it, and builds a dedicated API client with that service account credential for each controller loop to use. Setting the `--use-service-account-credentials` to `true` runs each control loop within the controller manager using a separate service account credential. When used in combination with RBAC, this ensures that the control loops run with the minimum permissions required to perform their intended tasks.",
+          "ImpactStatement": "Whatever authorizer is configured for the cluster, it must grant sufficient permissions to the service accounts to perform their intended tasks. When using the RBAC authorizer, those roles are created and bound to the appropriate service accounts in the `kube-system` namespace automatically with default roles and rolebindings that are auto-reconciled on startup.  If using other authorization methods (ABAC, Webhook, etc), the cluster deployer is responsible for granting appropriate permissions to the service accounts (the required permissions can be seen by inspecting the `controller-roles.yaml` and `controller-role-bindings.yaml` files for the RBAC roles.",
+          "RemediationProcedure": "Edit the Controller Manager pod specification file `/etc/kubernetes/manifests/kube-controller-manager.yaml` on the Control Plane node to set the below parameter.  ``` --use-service-account-credentials=true ```",
+          "AuditProcedure": "Run the following command on the Control Plane node:  ``` ps -ef | grep kube-controller-manager ```  Verify that the `--use-service-account-credentials` argument is set to `true`.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/kube-controller-manager/:https://kubernetes.io/docs/admin/service-accounts-admin/:https://github.com/kubernetes/kubernetes/blob/release-1.6/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/controller-roles.yaml:https://github.com/kubernetes/kubernetes/blob/release-1.6/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/controller-role-bindings.yaml:https://kubernetes.io/docs/admin/authorization/rbac/#controller-roles",
+          "DefaultValue": "By default, `--use-service-account-credentials` is set to false."
+        }
+      ]
+    },
+    {
+      "Id": "1.3.4",
+      "Description": "Ensure that the --service-account-private-key-file argument is set as appropriate",
+      "Checks": [
+        "controllermanager_service_account_private_key_file"
+      ],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.3 Controller Manager",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Explicitly set a service account private key file for service accounts on the controller manager.",
+          "RationaleStatement": "To ensure that keys for service account tokens can be rotated as needed, a separate public/private key pair should be used for signing service account tokens. The private key should be specified to the controller manager with `--service-account-private-key-file` as appropriate.",
+          "ImpactStatement": "You would need to securely maintain the key file and rotate the keys based on your organization's key rotation policy.",
+          "RemediationProcedure": "Edit the Controller Manager pod specification file `/etc/kubernetes/manifests/kube-controller-manager.yaml` on the Control Plane node and set the `--service-account-private-key-file` parameter to the private key file for service accounts.  ``` --service-account-private-key-file= ```",
+          "AuditProcedure": "Run the following command on the Control Plane node:  ``` ps -ef | grep kube-controller-manager ```  Verify that the `--service-account-private-key-file` argument is set as appropriate.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/kube-controller-manager/",
+          "DefaultValue": "By default, `--service-account-private-key-file` it not set."
+        }
+      ]
+    },
+    {
+      "Id": "1.3.5",
+      "Description": "Ensure that the --root-ca-file argument is set as appropriate",
+      "Checks": [
+        "controllermanager_root_ca_file_set"
+      ],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.3 Controller Manager",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Allow pods to verify the API server's serving certificate before establishing connections.",
+          "RationaleStatement": "Processes running within pods that need to contact the API server must verify the API server's serving certificate. Failing to do so could be a subject to man-in-the-middle attacks.  Providing the root certificate for the API server's serving certificate to the controller manager with the `--root-ca-file` argument allows the controller manager to inject the trusted bundle into pods so that they can verify TLS connections to the API server.",
+          "ImpactStatement": "You need to setup and maintain root certificate authority file.",
+          "RemediationProcedure": "Edit the Controller Manager pod specification file `/etc/kubernetes/manifests/kube-controller-manager.yaml` on the Control Plane node and set the `--root-ca-file` parameter to the certificate bundle file`.  ``` --root-ca-file= ```",
+          "AuditProcedure": "Run the following command on the Control Plane node:  ``` ps -ef | grep kube-controller-manager ```  Verify that the `--root-ca-file` argument exists and is set to a certificate bundle file containing the root certificate for the API server's serving certificate.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/kube-controller-manager/:https://github.com/kubernetes/kubernetes/issues/11000",
+          "DefaultValue": "By default, `--root-ca-file` is not set."
+        }
+      ]
+    },
+    {
+      "Id": "1.3.6",
+      "Description": "Ensure that the RotateKubeletServerCertificate argument is set to true",
+      "Checks": [
+        "controllermanager_rotate_kubelet_server_cert"
+      ],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.3 Controller Manager",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Enable kubelet server certificate rotation on controller-manager.",
+          "RationaleStatement": "`RotateKubeletServerCertificate` causes the kubelet to both request a serving certificate after bootstrapping its client credentials and rotate the certificate as its existing credentials expire. This automated periodic rotation ensures that the there are no downtimes due to expired certificates and thus addressing availability in the CIA security triad.  Note: This recommendation only applies if you let kubelets get their certificates from the API server. In case your kubelet certificates come from an outside authority/tool (e.g. Vault) then you need to take care of rotation yourself.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Edit the Controller Manager pod specification file `/etc/kubernetes/manifests/kube-controller-manager.yaml` on the Control Plane node and set the `--feature-gates` parameter to include `RotateKubeletServerCertificate=true`.  ``` --feature-gates=RotateKubeletServerCertificate=true ```",
+          "AuditProcedure": "Run the following command on the Control Plane node:  ``` ps -ef | grep kube-controller-manager ```  Verify that `RotateKubeletServerCertificate` argument exists and is set to `true`.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/kubelet-tls-bootstrapping/#approval-controller:https://github.com/kubernetes/features/issues/267:https://github.com/kubernetes/kubernetes/pull/45059:https://kubernetes.io/docs/admin/kube-controller-manager/",
+          "DefaultValue": "By default, `RotateKubeletServerCertificate` is set to true this recommendation verifies that it has not been disabled."
+        }
+      ]
+    },
+    {
+      "Id": "1.3.7",
+      "Description": "Ensure that the --bind-address argument is set to 127.0.0.1",
+      "Checks": [
+        "controllermanager_bind_address"
+      ],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.3 Controller Manager",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Do not bind the Controller Manager service to non-loopback insecure addresses.",
+          "RationaleStatement": "The Controller Manager API service which runs on port 10252/TCP by default is used for health and metrics information and is available without authentication or encryption. As such it should only be bound to a localhost interface, to minimize the cluster's attack surface",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Edit the Controller Manager pod specification file `/etc/kubernetes/manifests/kube-controller-manager.yaml` on the Control Plane node and ensure the correct value for the `--bind-address` parameter",
+          "AuditProcedure": "Run the following command on the Control Plane node:  ``` ps -ef | grep kube-controller-manager ```  Verify that the `--bind-address` argument is set to 127.0.0.1",
+          "AdditionalInformation": "Although the current Kubernetes documentation site says that `--address` is deprecated in favour of `--bind-address` Kubeadm 1.11 still makes use of `--address`",
+          "References": "https://kubernetes.io/docs/reference/command-line-tools-reference/kube-controller-manager/",
+          "DefaultValue": "By default, the `--bind-address` parameter is set to 0.0.0.0"
+        }
+      ]
+    },
+    {
+      "Id": "1.4.1",
+      "Description": "Ensure that the --profiling argument is set to false",
+      "Checks": [
+        "scheduler_profiling"
+      ],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.4 Scheduler",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Disable profiling, if not needed.",
+          "RationaleStatement": "Profiling allows for the identification of specific performance bottlenecks. It generates a significant amount of program data that could potentially be exploited to uncover system and program details. If you are not experiencing any bottlenecks and do not need the profiler for troubleshooting purposes, it is recommended to turn it off to reduce the potential attack surface.",
+          "ImpactStatement": "Profiling information would not be available.",
+          "RemediationProcedure": "Edit the Scheduler pod specification file `/etc/kubernetes/manifests/kube-scheduler.yaml` file on the Control Plane node and set the below parameter.  ``` --profiling=false ```",
+          "AuditProcedure": "Run the following command on the Control Plane node:  ``` ps -ef | grep kube-scheduler ```  Verify that the `--profiling` argument is set to `false`.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/kube-scheduler/:https://github.com/kubernetes/community/blob/master/contributors/devel/profiling.md",
+          "DefaultValue": "By default, profiling is enabled."
+        }
+      ]
+    },
+    {
+      "Id": "1.4.2",
+      "Description": "Ensure that the --bind-address argument is set to 127.0.0.1",
+      "Checks": [
+        "scheduler_bind_address"
+      ],
+      "Attributes": [
+        {
+          "Section": "1 Control Plane Components",
+          "SubSection": "1.4 Scheduler",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Do not bind the scheduler service to non-loopback insecure addresses.",
+          "RationaleStatement": "The Scheduler API service which runs on port 10251/TCP by default is used for health and metrics information and is available without authentication or encryption. As such it should only be bound to a localhost interface, to minimize the cluster's attack surface",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Edit the Scheduler pod specification file `/etc/kubernetes/manifests/kube-scheduler.yaml` on the Control Plane node and ensure the correct value for the `--bind-address` parameter",
+          "AuditProcedure": "Run the following command on the Control Plane node:  ``` ps -ef | grep kube-scheduler ```  Verify that the `--bind-address` argument is set to 127.0.0.1",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/reference/command-line-tools-reference/kube-scheduler/",
+          "DefaultValue": "By default, the `--bind-address` parameter is set to 0.0.0.0"
+        }
+      ]
+    },
+    {
+      "Id": "2.1",
+      "Description": "Ensure that the --cert-file and --key-file arguments are set as appropriate",
+      "Checks": [
+        "etcd_tls_encryption"
+      ],
+      "Attributes": [
+        {
+          "Section": "2 etcd",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Configure TLS encryption for the etcd service.",
+          "RationaleStatement": "etcd is a highly-available key value store used by Kubernetes deployments for persistent storage of all of its REST API objects. These objects are sensitive in nature and should be encrypted in transit.",
+          "ImpactStatement": "Client connections only over TLS would be served.",
+          "RemediationProcedure": "Follow the etcd service documentation and configure TLS encryption.  Then, edit the etcd pod specification file `/etc/kubernetes/manifests/etcd.yaml` on the master node and set the below parameters.  ``` --cert-file= --key-file= ```",
+          "AuditProcedure": "Run the following command on the etcd server node  ``` ps -ef | grep etcd ```  Verify that the `--cert-file` and the `--key-file` arguments are set as appropriate.",
+          "AdditionalInformation": "",
+          "References": "https://coreos.com/etcd/docs/latest/op-guide/security.html:https://kubernetes.io/docs/admin/etcd/",
+          "DefaultValue": "By default, TLS encryption is not set."
+        }
+      ]
+    },
+    {
+      "Id": "2.2",
+      "Description": "Ensure that the --cert-file and --key-file arguments are set as appropriate",
+      "Checks": [
+        "etcd_tls_encryption"
+      ],
+      "Attributes": [
+        {
+          "Section": "2 etcd",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Configure TLS encryption for the etcd service.",
+          "RationaleStatement": "etcd is a highly-available key value store used by Kubernetes deployments for persistent storage of all of its REST API objects. These objects are sensitive in nature and should be encrypted in transit.",
+          "ImpactStatement": "Client connections only over TLS would be served.",
+          "RemediationProcedure": "Follow the etcd service documentation and configure TLS encryption.  Then, edit the etcd pod specification file `/etc/kubernetes/manifests/etcd.yaml` on the master node and set the below parameters.  ``` --cert-file= --key-file= ```",
+          "AuditProcedure": "Run the following command on the etcd server node  ``` ps -ef | grep etcd ```  Verify that the `--cert-file` and the `--key-file` arguments are set as appropriate.",
+          "AdditionalInformation": "",
+          "References": "https://coreos.com/etcd/docs/latest/op-guide/security.html:https://kubernetes.io/docs/admin/etcd/",
+          "DefaultValue": "By default, TLS encryption is not set."
+        }
+      ]
+    },
+    {
+      "Id": "2.3",
+      "Description": "Ensure that the --client-cert-auth argument is set to true",
+      "Checks": [
+        "etcd_client_cert_auth"
+      ],
+      "Attributes": [
+        {
+          "Section": "2 etcd",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Enable client authentication on etcd service.",
+          "RationaleStatement": "etcd is a highly-available key value store used by Kubernetes deployments for persistent storage of all of its REST API objects. These objects are sensitive in nature and should not be available to unauthenticated clients. You should enable the client authentication via valid certificates to secure the access to the etcd service.",
+          "ImpactStatement": "All clients attempting to access the etcd server will require a valid client certificate.",
+          "RemediationProcedure": "Edit the etcd pod specification file `/etc/kubernetes/manifests/etcd.yaml` on the master node and set the below parameter.  ``` --client-cert-auth=true ```",
+          "AuditProcedure": "Run the following command on the etcd server node:  ``` ps -ef | grep etcd ```  Verify that the `--client-cert-auth` argument is set to `true`.",
+          "AdditionalInformation": "",
+          "References": "https://coreos.com/etcd/docs/latest/op-guide/security.html:https://kubernetes.io/docs/admin/etcd/:https://coreos.com/etcd/docs/latest/op-guide/configuration.html#client-cert-auth",
+          "DefaultValue": "By default, the etcd service can be queried by unauthenticated clients."
+        }
+      ]
+    },
+    {
+      "Id": "2.4",
+      "Description": "Ensure that the --auto-tls argument is not set to true",
+      "Checks": [
+        "etcd_no_auto_tls"
+      ],
+      "Attributes": [
+        {
+          "Section": "2 etcd",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Do not use self-signed certificates for TLS.",
+          "RationaleStatement": "etcd is a highly-available key value store used by Kubernetes deployments for persistent storage of all of its REST API objects. These objects are sensitive in nature and should not be available to unauthenticated clients. You should enable the client authentication via valid certificates to secure the access to the etcd service.",
+          "ImpactStatement": "Clients will not be able to use self-signed certificates for TLS.",
+          "RemediationProcedure": "Edit the etcd pod specification file `/etc/kubernetes/manifests/etcd.yaml` on the master node and either remove the `--auto-tls` parameter or set it to `false`.  ``` --auto-tls=false ```",
+          "AuditProcedure": "Run the following command on the etcd server node:  ``` ps -ef | grep etcd ```  Verify that if the `--auto-tls` argument exists, it is not set to `true`.",
+          "AdditionalInformation": "",
+          "References": "https://coreos.com/etcd/docs/latest/op-guide/security.html:https://kubernetes.io/docs/admin/etcd/:https://coreos.com/etcd/docs/latest/op-guide/configuration.html#auto-tls",
+          "DefaultValue": "By default, `--auto-tls` is set to `false`."
+        }
+      ]
+    },
+    {
+      "Id": "2.5",
+      "Description": "Ensure that the --peer-cert-file and --peer-key-file arguments are set as appropriate",
+      "Checks": [
+        "etcd_peer_tls_config"
+      ],
+      "Attributes": [
+        {
+          "Section": "2 etcd",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "etcd should be configured to make use of TLS encryption for peer connections.",
+          "RationaleStatement": "etcd is a highly-available key value store used by Kubernetes deployments for persistent storage of all of its REST API objects. These objects are sensitive in nature and should be encrypted in transit and also amongst peers in the etcd clusters.",
+          "ImpactStatement": "etcd cluster peers would need to set up TLS for their communication.",
+          "RemediationProcedure": "Follow the etcd service documentation and configure peer TLS encryption as appropriate for your etcd cluster.  Then, edit the etcd pod specification file `/etc/kubernetes/manifests/etcd.yaml` on the master node and set the below parameters.  ``` --peer-client-file= --peer-key-file= ```",
+          "AuditProcedure": "Run the following command on the etcd server node:  ``` ps -ef | grep etcd ```  Verify that the `--peer-cert-file` and `--peer-key-file` arguments are set as appropriate.  **Note:** This recommendation is applicable only for etcd clusters. If you are using only one etcd server in your environment then this recommendation is not applicable.",
+          "AdditionalInformation": "",
+          "References": "https://coreos.com/etcd/docs/latest/op-guide/security.html:https://kubernetes.io/docs/admin/etcd/",
+          "DefaultValue": "**Note:** This recommendation is applicable only for etcd clusters. If you are using only one etcd server in your environment then this recommendation is not applicable.  By default, peer communication over TLS is not configured."
+        }
+      ]
+    },
+    {
+      "Id": "2.6",
+      "Description": "Ensure that the --peer-client-cert-auth argument is set to true",
+      "Checks": [
+        "etcd_peer_client_cert_auth"
+      ],
+      "Attributes": [
+        {
+          "Section": "2 etcd",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "etcd should be configured for peer authentication.",
+          "RationaleStatement": "etcd is a highly-available key value store used by Kubernetes deployments for persistent storage of all of its REST API objects. These objects are sensitive in nature and should be accessible only by authenticated etcd peers in the etcd cluster.",
+          "ImpactStatement": "All peers attempting to communicate with the etcd server will require a valid client certificate for authentication.",
+          "RemediationProcedure": "Edit the etcd pod specification file `/etc/kubernetes/manifests/etcd.yaml` on the master node and set the below parameter.  ``` --peer-client-cert-auth=true ```",
+          "AuditProcedure": "Run the following command on the etcd server node:  ``` ps -ef | grep etcd ```  Verify that the `--peer-client-cert-auth` argument is set to `true`.  **Note:** This recommendation is applicable only for etcd clusters. If you are using only one etcd server in your environment then this recommendation is not applicable.",
+          "AdditionalInformation": "",
+          "References": "https://coreos.com/etcd/docs/latest/op-guide/security.html:https://kubernetes.io/docs/admin/etcd/:https://coreos.com/etcd/docs/latest/op-guide/configuration.html#peer-client-cert-auth",
+          "DefaultValue": "**Note:** This recommendation is applicable only for etcd clusters. If you are using only one etcd server in your environment then this recommendation is not applicable.  By default, `--peer-client-cert-auth` argument is set to `false`."
+        }
+      ]
+    },
+    {
+      "Id": "2.7",
+      "Description": "Ensure that the --peer-auto-tls argument is not set to true",
+      "Checks": [
+        "etcd_no_peer_auto_tls"
+      ],
+      "Attributes": [
+        {
+          "Section": "2 etcd",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Do not use automatically generated self-signed certificates for TLS connections between peers.",
+          "RationaleStatement": "etcd is a highly-available key value store used by Kubernetes deployments for persistent storage of all of its REST API objects. These objects are sensitive in nature and should be accessible only by authenticated etcd peers in the etcd cluster. Hence, do not use self-signed certificates for authentication.",
+          "ImpactStatement": "All peers attempting to communicate with the etcd server will require a valid client certificate for authentication.",
+          "RemediationProcedure": "Edit the etcd pod specification file `/etc/kubernetes/manifests/etcd.yaml` on the master node and either remove the `--peer-auto-tls` parameter or set it to `false`.  ``` --peer-auto-tls=false ```",
+          "AuditProcedure": "Run the following command on the etcd server node:  ``` ps -ef | grep etcd ```  Verify that if the `--peer-auto-tls` argument exists, it is not set to `true`. **Note:** This recommendation is applicable only for etcd clusters. If you are using only one etcd server in your environment then this recommendation is not applicable.",
+          "AdditionalInformation": "",
+          "References": "https://coreos.com/etcd/docs/latest/op-guide/security.html:https://kubernetes.io/docs/admin/etcd/:https://coreos.com/etcd/docs/latest/op-guide/configuration.html#peer-auto-tls",
+          "DefaultValue": "**Note:** This recommendation is applicable only for etcd clusters. If you are using only one etcd server in your environment then this recommendation is not applicable.  By default, `--peer-auto-tls` argument is set to `false`."
+        }
+      ]
+    },
+    {
+      "Id": "2.8",
+      "Description": "Ensure that a unique Certificate Authority is used for etcd",
+      "Checks": [
+        "etcd_unique_ca"
+      ],
+      "Attributes": [
+        {
+          "Section": "2 etcd",
+          "Profile": "Level 2 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Use a different certificate authority for etcd from the one used for Kubernetes.",
+          "RationaleStatement": "etcd is a highly available key-value store used by Kubernetes deployments for persistent storage of all of its REST API objects. Its access should be restricted to specifically designated clients and peers only.   Authentication to etcd is based on whether the certificate presented was issued by a trusted certificate authority. There is no checking of certificate attributes such as common name or subject alternative name. As such, if any attackers were able to gain access to any certificate issued by the trusted certificate authority, they would be able to gain full access to the etcd database.",
+          "ImpactStatement": "Additional management of the certificates and keys for the dedicated certificate authority will be required.",
+          "RemediationProcedure": "Follow the etcd documentation and create a dedicated certificate authority setup for the etcd service.  Then, edit the etcd pod specification file `/etc/kubernetes/manifests/etcd.yaml` on the master node and set the below parameter.  ``` --trusted-ca-file= ```",
+          "AuditProcedure": "Review the CA used by the etcd environment and ensure that it does not match the CA certificate file used for the management of the overall Kubernetes cluster.  Run the following command on the master node:  ``` ps -ef | grep etcd ```  Note the file referenced by the `--trusted-ca-file` argument.   Run the following command on the master node:   ``` ps -ef | grep apiserver ```  Verify that the file referenced by the `--client-ca-file` for apiserver is different from the `--trusted-ca-file` used by etcd.",
+          "AdditionalInformation": "",
+          "References": "https://coreos.com/etcd/docs/latest/op-guide/security.html",
+          "DefaultValue": "By default, no etcd certificate is created and used."
+        }
+      ]
+    },
+    {
+      "Id": "3.1.1",
+      "Description": "Client certificate authentication should not be used for users",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "3 Control Plane Configuration",
+          "SubSection": "3.1 Authentication and Authorization",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Kubernetes provides the option to use client certificates for user authentication. However as there is no way to revoke these certificates when a user leaves an organization or loses their credential, they are not suitable for this purpose.  It is not possible to fully disable client certificate use within a cluster as it is used for component to component authentication.",
+          "RationaleStatement": "With any authentication mechanism the ability to revoke credentials if they are compromised or no longer required, is a key control. Kubernetes client certificate authentication does not allow for this due to a lack of support for certificate revocation.",
+          "ImpactStatement": "External mechanisms for authentication generally require additional software to be deployed.",
+          "RemediationProcedure": "Alternative mechanisms provided by Kubernetes such as the use of OIDC should be implemented in place of client certificates.",
+          "AuditProcedure": "Review user access to the cluster and ensure that users are not making use of Kubernetes client certificate authentication.",
+          "AdditionalInformation": "The lack of certificate revocation was flagged up as a high risk issue in the recent Kubernetes security audit. Without this feature, client certificate authentication is not suitable for end users.",
+          "References": "",
+          "DefaultValue": "Client certificate authentication is enabled by default."
+        }
+      ]
+    },
+    {
+      "Id": "3.1.2",
+      "Description": "Service account token authentication should not be used for users",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "3 Control Plane Configuration",
+          "SubSection": "3.1 Authentication and Authorization",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Kubernetes provides service account tokens which are intended for use by workloads running in the Kubernetes cluster, for authentication to the API server.  These tokens are not designed for use by end-users and do not provide for features such as revocation or expiry, making them insecure. A newer version of the feature (Bound service account token volumes) does introduce expiry but still does not allow for specific revocation.",
+          "RationaleStatement": "With any authentication mechanism the ability to revoke credentials if they are compromised or no longer required, is a key control. Service account token authentication does not allow for this due to the use of JWT tokens as an underlying technology.",
+          "ImpactStatement": "External mechanisms for authentication generally require additional software to be deployed.",
+          "RemediationProcedure": "Alternative mechanisms provided by Kubernetes such as the use of OIDC should be implemented in place of service account tokens.",
+          "AuditProcedure": "Review user access to the cluster and ensure that users are not making use of service account token authentication.",
+          "AdditionalInformation": "",
+          "References": "",
+          "DefaultValue": "Service account token authentication is enabled by default."
+        }
+      ]
+    },
+    {
+      "Id": "3.1.3",
+      "Description": "Bootstrap token authentication should not be used for users",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "3 Control Plane Configuration",
+          "SubSection": "3.1 Authentication and Authorization",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Kubernetes provides bootstrap tokens which are intended for use by new nodes joining the cluster  These tokens are not designed for use by end-users they are specifically designed for the purpose of bootstrapping new nodes and not for general authentication",
+          "RationaleStatement": "Bootstrap tokens are not intended for use as a general authentication mechanism and impose constraints on user and group naming that do not facilitate good RBAC design. They also cannot be used with MFA resulting in a weak authentication mechanism being available.",
+          "ImpactStatement": "External mechanisms for authentication generally require additional software to be deployed.",
+          "RemediationProcedure": "Alternative mechanisms provided by Kubernetes such as the use of OIDC should be implemented in place of bootstrap tokens.",
+          "AuditProcedure": "Review user access to the cluster and ensure that users are not making use of bootstrap token authentication.",
+          "AdditionalInformation": "",
+          "References": "",
+          "DefaultValue": "Bootstrap token authentication is not enabled by default and requires an API server parameter to be set."
+        }
+      ]
+    },
+    {
+      "Id": "3.2.1",
+      "Description": "Ensure that a minimal audit policy is created",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "3 Control Plane Configuration",
+          "SubSection": "3.2 Logging",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Kubernetes can audit the details of requests made to the API server. The `--audit-policy-file` flag must be set for this logging to be enabled.",
+          "RationaleStatement": "Logging is an important detective control for all systems, to detect potential unauthorised access.",
+          "ImpactStatement": "Audit logs will be created on the master nodes, which will consume disk space. Care should be taken to avoid generating too large volumes of log information as this could impact the available of the cluster nodes.",
+          "RemediationProcedure": "Create an audit policy file for your cluster.",
+          "AuditProcedure": "Run the following command on one of the cluster master nodes:  ``` ps -ef | grep kube-apiserver ```  Verify that the `--audit-policy-file` is set. Review the contents of the file specified and ensure that it contains a valid audit policy.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/tasks/debug-application-cluster/audit/",
+          "DefaultValue": "Unless the `--audit-policy-file` flag is specified, no auditing will be carried out."
+        }
+      ]
+    },
+    {
+      "Id": "3.2.2",
+      "Description": "Ensure that the audit policy covers key security concerns",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "3 Control Plane Configuration",
+          "SubSection": "3.2 Logging",
+          "Profile": "Level 2 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Ensure that the audit policy created for the cluster covers key security concerns.",
+          "RationaleStatement": "Security audit logs should cover access and modification of key resources in the cluster, to enable them to form an effective part of a security environment.",
+          "ImpactStatement": "Increasing audit logging will consume resources on the nodes or other log destination.",
+          "RemediationProcedure": "Consider modification of the audit policy in use on the cluster to include these items, at a minimum.",
+          "AuditProcedure": "Review the audit policy provided for the cluster and ensure that it covers at least the following areas :-   - Access to Secrets managed by the cluster. Care should be taken to only log Metadata for requests to Secrets, ConfigMaps, and TokenReviews, in order to avoid the risk of logging sensitive data.  - Modification of `pod` and `deployment` objects.  - Use of `pods/exec`, `pods/portforward`, `pods/proxy` and `services/proxy`.  For most requests, minimally logging at the Metadata level is recommended (the most basic level of logging).",
+          "AdditionalInformation": "",
+          "References": "https://github.com/k8scop/k8s-security-dashboard/blob/master/configs/kubernetes/adv-audit.yaml:https://kubernetes.io/docs/tasks/debug-application-cluster/audit/#audit-policy:https://github.com/kubernetes/kubernetes/blob/master/cluster/gce/gci/configure-helper.sh#L735",
+          "DefaultValue": "By default Kubernetes clusters do not log audit information."
+        }
+      ]
+    },
+    {
+      "Id": "4.1.1",
+      "Description": "Ensure that the kubelet service file permissions are set to 600 or more restrictive",
+      "Checks": [
+        "kubelet_service_file_permissions"
+      ],
+      "Attributes": [
+        {
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.1 Worker Node Configuration Files",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Ensure that the `kubelet` service file has permissions of `600` or more restrictive.",
+          "RationaleStatement": "The `kubelet` service file controls various parameters that set the behavior of the `kubelet` service in the worker node. You should restrict its file permissions to maintain the integrity of the file. The file should be writable by only the administrators on the system.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Run the below command (based on the file location on your system) on the each worker node. For example,  ``` chmod 600 /etc/systemd/system/kubelet.service.d/kubeadm.conf ```",
+          "AuditProcedure": "Automated AAC auditing has been modified to allow CIS-CAT to input a variable for the / of the kubelet service config file.  Please set $kubelet_service_config= based on the file location on your system   for example: ``` export kubelet_service_config=/etc/systemd/system/kubelet.service.d/kubeadm.conf ```  To perform the audit manually: Run the below command (based on the file location on your system) on the each worker node. For example,  ``` stat -c %a /etc/systemd/system/kubelet.service.d/10-kubeadm.conf ```  Verify that the permissions are `600` or more restrictive.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/kubelet/:https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/#44-joining-your-nodes:https://kubernetes.io/docs/admin/kubeadm/#kubelet-drop-in",
+          "DefaultValue": "By default, the `kubelet` service file has permissions of `640`."
+        }
+      ]
+    },
+    {
+      "Id": "4.1.2",
+      "Description": "Ensure that the kubelet service file ownership is set to root:root",
+      "Checks": [
+        "kubelet_service_file_ownership_root"
+      ],
+      "Attributes": [
+        {
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.1 Worker Node Configuration Files",
+          "Profile": "Level 1 - Worker Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Ensure that the `kubelet` service file ownership is set to `root:root`.",
+          "RationaleStatement": "The `kubelet` service file controls various parameters that set the behavior of the `kubelet` service in the worker node. You should set its file ownership to maintain the integrity of the file. The file should be owned by `root:root`.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Run the below command (based on the file location on your system) on the each worker node. For example,  ``` chown root:root /etc/systemd/system/kubelet.service.d/kubeadm.conf ```",
+          "AuditProcedure": "Automated AAC auditing has been modified to allow CIS-CAT to input a variable for the / of the kubelet service config file.  Please set $kubelet_service_config= based on the file location on your system   for example: ``` export kubelet_service_config=/etc/systemd/system/kubelet.service.d/kubeadm.conf ```  To perform the audit manually: Run the below command (based on the file location on your system) on the each worker node. For example,  ``` stat -c %U:%G /etc/systemd/system/kubelet.service.d/10-kubeadm.conf ``` Verify that the ownership is set to `root:root`.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/kubelet/:https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/#44-joining-your-nodes:https://kubernetes.io/docs/admin/kubeadm/#kubelet-drop-in",
+          "DefaultValue": "By default, `kubelet` service file ownership is set to `root:root`."
+        }
+      ]
+    },
+    {
+      "Id": "4.1.3",
+      "Description": "If proxy kubeconfig file exists ensure permissions are set to 600 or more restrictive",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.1 Worker Node Configuration Files",
+          "Profile": "Level 1 - Worker Node",
+          "AssessmentStatus": "Manual",
+          "Description": "If `kube-proxy` is running, and if it is using a file-based kubeconfig file, ensure that the proxy kubeconfig file has permissions of `600` or more restrictive.",
+          "RationaleStatement": "The `kube-proxy` kubeconfig file controls various parameters of the `kube-proxy` service in the worker node. You should restrict its file permissions to maintain the integrity of the file. The file should be writable by only the administrators on the system.  It is possible to run `kube-proxy` with the kubeconfig parameters configured as a Kubernetes ConfigMap instead of a file. In this case, there is no proxy kubeconfig file.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Run the below command (based on the file location on your system) on the each worker node. For example,  ``` chmod 600  ```",
+          "AuditProcedure": "Find the kubeconfig file being used by `kube-proxy` by running the following command:   ``` ps -ef | grep kube-proxy ```  If `kube-proxy` is running, get the kubeconfig file location from the `--kubeconfig` parameter.   To perform the audit:  Run the below command (based on the file location on your system) on the each worker node. For example,  ``` stat -c %a  ```  Verify that a file is specified and it exists with permissions are `600` or more restrictive.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/kube-proxy/",
+          "DefaultValue": "By default, proxy file has permissions of `640`."
+        }
+      ]
+    },
+    {
+      "Id": "4.1.4",
+      "Description": "If proxy kubeconfig file exists ensure ownership is set to root:root",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.1 Worker Node Configuration Files",
+          "Profile": "Level 1 - Worker Node",
+          "AssessmentStatus": "Manual",
+          "Description": "If `kube-proxy` is running, ensure that the file ownership of its kubeconfig file is set to `root:root`.",
+          "RationaleStatement": "The kubeconfig file for `kube-proxy` controls various parameters for the `kube-proxy` service in the worker node. You should set its file ownership to maintain the integrity of the file. The file should be owned by `root:root`.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Run the below command (based on the file location on your system) on the each worker node. For example,  ``` chown root:root  ```",
+          "AuditProcedure": "Find the kubeconfig file being used by `kube-proxy` by running the following command:   ``` ps -ef | grep kube-proxy ```  If `kube-proxy` is running, get the kubeconfig file location from the `--kubeconfig` parameter.   To perform the audit:  Run the below command (based on the file location on your system) on the each worker node. For example,  ``` stat -c %U:%G  ```  Verify that the ownership is set to `root:root`.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/kube-proxy/",
+          "DefaultValue": "By default, `proxy` file ownership is set to `root:root`."
+        }
+      ]
+    },
+    {
+      "Id": "4.1.5",
+      "Description": "Ensure that the --kubeconfig kubelet.conf file permissions are set to 600 or more restrictive",
+      "Checks": [
+        "kubelet_conf_file_permissions"
+      ],
+      "Attributes": [
+        {
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.1 Worker Node Configuration Files",
+          "Profile": "Level 1 - Worker Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Ensure that the `kubelet.conf` file has permissions of `600` or more restrictive.",
+          "RationaleStatement": "The `kubelet.conf` file is the kubeconfig file for the node, and controls various parameters that set the behavior and identity of the worker node. You should restrict its file permissions to maintain the integrity of the file. The file should be writable by only the administrators on the system.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Run the below command (based on the file location on your system) on the each worker node. For example,  ``` chmod 600 /etc/kubernetes/kubelet.conf ```",
+          "AuditProcedure": "Automated AAC auditing has been modified to allow CIS-CAT to input a variable for the / of the kubelet config file.  Please set $kubelet_config= based on the file location on your system   for example: ``` export kubelet_config=/etc/kubernetes/kubelet.conf ```  To perform the audit manually: Run the below command (based on the file location on your system) on the each worker node. For example,  ``` stat -c %a /etc/kubernetes/kubelet.conf ```  Verify that the ownership is set to `root:root`.Verify that the permissions are `600` or more restrictive.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/kubelet/",
+          "DefaultValue": "By default, `kubelet.conf` file has permissions of `600`."
+        }
+      ]
+    },
+    {
+      "Id": "4.1.6",
+      "Description": "Ensure that the --kubeconfig kubelet.conf file ownership is set to root:root",
+      "Checks": [
+        "kubelet_conf_file_ownership"
+      ],
+      "Attributes": [
+        {
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.1 Worker Node Configuration Files",
+          "Profile": "Level 1 - Worker Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Ensure that the `kubelet.conf` file ownership is set to `root:root`.",
+          "RationaleStatement": "The `kubelet.conf` file is the kubeconfig file for the node, and controls various parameters that set the behavior and identity of the worker node. You should set its file ownership to maintain the integrity of the file. The file should be owned by `root:root`.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Run the below command (based on the file location on your system) on the each worker node. For example,  ``` chown root:root /etc/kubernetes/kubelet.conf ```",
+          "AuditProcedure": "Automated AAC auditing has been modified to allow CIS-CAT to input a variable for the / of the kubelet config file.  Please set $kubelet_config= based on the file location on your system   for example: ``` export kubelet_config=/etc/kubernetes/kubelet.conf ```  To perform the audit manually: Run the below command (based on the file location on your system) on the each worker node. For example,  ``` stat -c %U:%G /etc/kubernetes/kubelet.conf ```  Verify that the ownership is set to `root:root`.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/kubelet/",
+          "DefaultValue": "By default, `kubelet.conf` file ownership is set to `root:root`."
+        }
+      ]
+    },
+    {
+      "Id": "4.1.7",
+      "Description": "Ensure that the certificate authorities file permissions are set to 644 or more restrictive",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.1 Worker Node Configuration Files",
+          "Profile": "Level 1 - Worker Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Ensure that the certificate authorities file has permissions of `644` or more restrictive.",
+          "RationaleStatement": "The certificate authorities file controls the authorities used to validate API requests. You should restrict its file permissions to maintain the integrity of the file. The file should be writable by only the administrators on the system.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Run the following command to modify the file permissions of the `--client-ca-file`  ``` chmod 644  ```",
+          "AuditProcedure": "Run the following command:   ``` ps -ef | grep kubelet ```  Find the file specified by the `--client-ca-file` argument.  Run the following command:   ``` stat -c %a  ```  Verify that the permissions are `644` or more restrictive.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/authentication/#x509-client-certs",
+          "DefaultValue": "By default no `--client-ca-file` is specified."
+        }
+      ]
+    },
+    {
+      "Id": "4.1.8",
+      "Description": "Ensure that the client certificate authorities file ownership is set to root:root",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.1 Worker Node Configuration Files",
+          "Profile": "Level 1 - Worker Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Ensure that the certificate authorities file ownership is set to `root:root`.",
+          "RationaleStatement": "The certificate authorities file controls the authorities used to validate API requests. You should set its file ownership to maintain the integrity of the file. The file should be owned by `root:root`.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Run the following command to modify the ownership of the `--client-ca-file`.  ``` chown root:root  ```",
+          "AuditProcedure": "Run the following command:  ``` ps -ef | grep kubelet ```  Find the file specified by the `--client-ca-file` argument.  Run the following command:  ``` stat -c %U:%G  ```  Verify that the ownership is set to `root:root`.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/authentication/#x509-client-certs",
+          "DefaultValue": "By default no `--client-ca-file` is specified."
+        }
+      ]
+    },
+    {
+      "Id": "4.1.9",
+      "Description": "If the kubelet config.yaml configuration file is being used validate permissions set to 600 or more restrictive",
+      "Checks": [
+        "kubelet_config_yaml_permissions"
+      ],
+      "Attributes": [
+        {
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.1 Worker Node Configuration Files",
+          "Profile": "Level 1 - Worker Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Ensure that if the kubelet refers to a configuration file with the `--config` argument, that file has permissions of 600 or more restrictive.",
+          "RationaleStatement": "The kubelet reads various parameters, including security settings, from a config file specified by the `--config` argument. If this file is specified you should restrict its file permissions to maintain the integrity of the file. The file should be writable by only the administrators on the system.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Run the following command (using the config file location identified in the Audit step)  ``` chmod 600 /var/lib/kubelet/config.yaml ```",
+          "AuditProcedure": "Automated AAC auditing has been modified to allow CIS-CAT to input a variable for the / of the kubelet config yaml file.  Please set $kubelet_config_yaml= based on the file location on your system   for example: ``` export kubelet_config_yaml=/var/lib/kubelet/config.yaml  ```  To perform the audit manually: Run the below command (based on the file location on your system) on the each worker node. For example,  ``` stat -c %a /var/lib/kubelet/config.yaml ```  Verify that the permissions are `600` or more restrictive.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/",
+          "DefaultValue": "By default, the /var/lib/kubelet/config.yaml file as set up by `kubeadm` has permissions of 600."
+        }
+      ]
+    },
+    {
+      "Id": "4.1.10",
+      "Description": "If the kubelet config.yaml configuration file is being used validate file ownership is set to root:root",
+      "Checks": [
+        "kubelet_config_yaml_ownership"
+      ],
+      "Attributes": [
+        {
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.1 Worker Node Configuration Files",
+          "Profile": "Level 1 - Worker Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Ensure that if the kubelet refers to a configuration file with the `--config` argument, that file is owned by root:root.",
+          "RationaleStatement": "The kubelet reads various parameters, including security settings, from a config file specified by the `--config` argument. If this file is specified you should restrict its file permissions to maintain the integrity of the file. The file should be owned by root:root.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Run the following command (using the config file location identied in the Audit step)  ``` chown root:root /etc/kubernetes/kubelet.conf ```",
+          "AuditProcedure": "Automated AAC auditing has been modified to allow CIS-CAT to input a variable for the / of the kubelet config yaml file.  Please set $kubelet_config_yaml= based on the file location on your system   for example: ``` export kubelet_config_yaml=/var/lib/kubelet/config.yaml  ```  To perform the audit manually: Run the below command (based on the file location on your system) on the each worker node. For example,  ``` stat -c %U:%G /var/lib/kubelet/config.yaml ```Verify that the ownership is set to `root:root`.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/",
+          "DefaultValue": "By default, `/var/lib/kubelet/config.yaml` file as set up by `kubeadm` is owned by `root:root`."
+        }
+      ]
+    },
+    {
+      "Id": "4.2.1",
+      "Description": "Ensure that the --anonymous-auth argument is set to false",
+      "Checks": [
+        "kubelet_disable_anonymous_auth"
+      ],
+      "Attributes": [
+        {
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.2 Kubelet",
+          "Profile": "Level 1 - Worker Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Disable anonymous requests to the Kubelet server.",
+          "RationaleStatement": "When enabled, requests that are not rejected by other configured authentication methods are treated as anonymous requests. These requests are then served by the Kubelet server. You should rely on authentication to authorize access and disallow anonymous requests.",
+          "ImpactStatement": "Anonymous requests will be rejected.",
+          "RemediationProcedure": "If using a Kubelet config file, edit the file to set `authentication: anonymous: enabled` to `false`.   If using executable arguments, edit the kubelet service file `/etc/kubernetes/kubelet.conf` on each worker node and set the below parameter in `KUBELET_SYSTEM_PODS_ARGS` variable.  ``` --anonymous-auth=false ```  Based on your system, restart the `kubelet` service. For example:  ``` systemctl daemon-reload systemctl restart kubelet.service ```",
+          "AuditProcedure": "If using a Kubelet configuration file, check that there is an entry for `authentication: anonymous: enabled` set to `false`.   Run the following command on each node:  ``` ps -ef | grep kubelet ```  Verify that the `--anonymous-auth` argument is set to `false`.   This executable argument may be omitted, provided there is a corresponding entry set to `false` in the Kubelet config file.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/kubelet/:https://kubernetes.io/docs/admin/kubelet-authentication-authorization/#kubelet-authentication",
+          "DefaultValue": "By default, anonymous access is enabled."
+        }
+      ]
+    },
+    {
+      "Id": "4.2.2",
+      "Description": "Ensure that the --authorization-mode argument is not set to AlwaysAllow",
+      "Checks": [
+        "kubelet_authorization_mode"
+      ],
+      "Attributes": [
+        {
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.2 Kubelet",
+          "Profile": "Level 1 - Worker Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Do not allow all requests. Enable explicit authorization.",
+          "RationaleStatement": "Kubelets, by default, allow all authenticated requests (even anonymous ones) without needing explicit authorization checks from the apiserver. You should restrict this behavior and only allow explicitly authorized requests.",
+          "ImpactStatement": "Unauthorized requests will be denied.",
+          "RemediationProcedure": "If using a Kubelet config file, edit the file to set `authorization: mode` to `Webhook`.   If using executable arguments, edit the kubelet service file `/etc/kubernetes/kubelet.conf` on each worker node and set the below parameter in `KUBELET_AUTHZ_ARGS` variable.  ``` --authorization-mode=Webhook ```  Based on your system, restart the `kubelet` service. For example:  ``` systemctl daemon-reload systemctl restart kubelet.service ```",
+          "AuditProcedure": "Run the following command on each node:  ``` ps -ef | grep kubelet ```  If the `--authorization-mode` argument is present check that it is not set to `AlwaysAllow`. If it is not present check that there is a Kubelet config file specified by `--config`, and that file sets `authorization: mode` to something other than `AlwaysAllow`.  It is also possible to review the running configuration of a Kubelet via the `/configz` endpoint on the Kubelet API port (typically `10250/TCP`). Accessing these with appropriate credentials will provide details of the Kubelet's configuration.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/kubelet/:https://kubernetes.io/docs/admin/kubelet-authentication-authorization/#kubelet-authentication",
+          "DefaultValue": "By default, `--authorization-mode` argument is set to `AlwaysAllow`."
+        }
+      ]
+    },
+    {
+      "Id": "4.2.3",
+      "Description": "Ensure that the --client-ca-file argument is set as appropriate",
+      "Checks": [
+        "kubelet_client_ca_file_set"
+      ],
+      "Attributes": [
+        {
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.2 Kubelet",
+          "Profile": "Level 1 - Worker Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Enable Kubelet authentication using certificates.",
+          "RationaleStatement": "The connections from the apiserver to the kubelet are used for fetching logs for pods, attaching (through kubectl) to running pods, and using the kubeletโ€™s port-forwarding functionality. These connections terminate at the kubeletโ€™s HTTPS endpoint. By default, the apiserver does not verify the kubeletโ€™s serving certificate, which makes the connection subject to man-in-the-middle attacks, and unsafe to run over untrusted and/or public networks. Enabling Kubelet certificate authentication ensures that the apiserver could authenticate the Kubelet before submitting any requests.",
+          "ImpactStatement": "You require TLS to be configured on apiserver as well as kubelets.",
+          "RemediationProcedure": "If using a Kubelet config file, edit the file to set `authentication: x509: clientCAFile` to the location of the client CA file.   If using command line arguments, edit the kubelet service file `/etc/kubernetes/kubelet.conf` on each worker node and set the below parameter in `KUBELET_AUTHZ_ARGS` variable.  ``` --client-ca-file= ```  Based on your system, restart the `kubelet` service. For example:  ``` systemctl daemon-reload systemctl restart kubelet.service ```",
+          "AuditProcedure": "Run the following command on each node:  ``` ps -ef | grep kubelet ```  Verify that the `--client-ca-file` argument exists and is set to the location of the client certificate authority file.  If the `--client-ca-file` argument is not present, check that there is a Kubelet config file specified by `--config`, and that the file sets `authentication: x509: clientCAFile` to the location of the client certificate authority file.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/kubelet/:https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet-authentication-authorization/",
+          "DefaultValue": "By default, `--client-ca-file` argument is not set."
+        }
+      ]
+    },
+    {
+      "Id": "4.2.4",
+      "Description": "Verify that if defined, readOnlyPort is set to 0",
+      "Checks": [
+        "kubelet_disable_read_only_port"
+      ],
+      "Attributes": [
+        {
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.2 Kubelet",
+          "Profile": "Level 1 - Worker Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Disable the read-only port.",
+          "RationaleStatement": "The Kubelet process provides a read-only API in addition to the main Kubelet API. Unauthenticated access is provided to this read-only API which could possibly retrieve potentially sensitive information about the cluster.",
+          "ImpactStatement": "Removal of the read-only port will require that any service which made use of it will need to be re-configured to use the main Kubelet API.",
+          "RemediationProcedure": "If using a Kubelet config file, edit the file to set `readOnlyPort` to `0`.  If using command line arguments, edit the kubelet service file `/etc/kubernetes/kubelet.conf` on each worker node and set the below parameter in `KUBELET_SYSTEM_PODS_ARGS` variable.  ``` --read-only-port=0 ```  Based on your system, restart the `kubelet` service. For example:  ``` systemctl daemon-reload systemctl restart kubelet.service ```",
+          "AuditProcedure": "Run the following command on each node:  ``` ps -ef | grep kubelet ```  Verify that the `--read-only-port` argument exists and is set to `0`.  If the `--read-only-port` argument is not present, check that there is a Kubelet config file specified by `--config`. Check that if there is a `readOnlyPort` entry in the file, it is set to `0`.",
+          "AdditionalInformation": "https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/",
+          "References": "https://kubernetes.io/docs/admin/kubelet/:https://github.com/kubernetes/kubernetes/blob/6cedc0853faa118df0ba3d41b48b993422ad3df6/staging/src/k8s.io/kubelet/config/v1beta1/types.go#L142",
+          "DefaultValue": ""
+        }
+      ]
+    },
+    {
+      "Id": "4.2.5",
+      "Description": "Ensure that the --streaming-connection-idle-timeout argument is not set to 0",
+      "Checks": [
+        "kubelet_streaming_connection_timeout"
+      ],
+      "Attributes": [
+        {
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.2 Kubelet",
+          "Profile": "Level 1 - Worker Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Do not disable timeouts on streaming connections.",
+          "RationaleStatement": "Setting idle timeouts ensures that you are protected against Denial-of-Service attacks, inactive connections and running out of ephemeral ports.   **Note:** By default, `--streaming-connection-idle-timeout` is set to 4 hours which might be too high for your environment. Setting this as appropriate would additionally ensure that such streaming connections are timed out after serving legitimate use cases.",
+          "ImpactStatement": "Long-lived connections could be interrupted.",
+          "RemediationProcedure": "If using a Kubelet config file, edit the file to set `streamingConnectionIdleTimeout` to a value other than 0.   If using command line arguments, edit the kubelet service file `/etc/kubernetes/kubelet.conf` on each worker node and set the below parameter in `KUBELET_SYSTEM_PODS_ARGS` variable.  ``` --streaming-connection-idle-timeout=5m ```  Based on your system, restart the `kubelet` service. For example:  ``` systemctl daemon-reload systemctl restart kubelet.service ```",
+          "AuditProcedure": "Run the following command on each node:  ``` ps -ef | grep kubelet ```  Verify that the `--streaming-connection-idle-timeout` argument is not set to `0`.  If the argument is not present, and there is a Kubelet config file specified by `--config`, check that it does not set `streamingConnectionIdleTimeout` to 0.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/kubelet/:https://github.com/kubernetes/kubernetes/pull/18552",
+          "DefaultValue": "By default, `--streaming-connection-idle-timeout` is set to 4 hours."
+        }
+      ]
+    },
+    {
+      "Id": "4.2.6",
+      "Description": "Ensure that the --make-iptables-util-chains argument is set to true",
+      "Checks": [
+        "kubelet_manage_iptables"
+      ],
+      "Attributes": [
+        {
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.2 Kubelet",
+          "Profile": "Level 1 - Worker Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Allow Kubelet to manage iptables.",
+          "RationaleStatement": "Kubelets can automatically manage the required changes to iptables based on how you choose your networking options for the pods. It is recommended to let kubelets manage the changes to iptables. This ensures that the iptables configuration remains in sync with pods networking configuration. Manually configuring iptables with dynamic pod network configuration changes might hamper the communication between pods/containers and to the outside world. You might have iptables rules too restrictive or too open.",
+          "ImpactStatement": "Kubelet would manage the iptables on the system and keep it in sync. If you are using any other iptables management solution, then there might be some conflicts.",
+          "RemediationProcedure": "If using a Kubelet config file, edit the file to set `makeIPTablesUtilChains: true`.  If using command line arguments, edit the kubelet service file `/etc/kubernetes/kubelet.conf` on each worker node and remove the `--make-iptables-util-chains` argument from the `KUBELET_SYSTEM_PODS_ARGS` variable.  Based on your system, restart the `kubelet` service. For example:  ``` systemctl daemon-reload systemctl restart kubelet.service ```",
+          "AuditProcedure": "Run the following command on each node:  ``` ps -ef | grep kubelet ```  Verify that if the `--make-iptables-util-chains` argument exists then it is set to `true`.  If the `--make-iptables-util-chains` argument does not exist, and there is a Kubelet config file specified by `--config`, verify that the file does not set `makeIPTablesUtilChains` to `false`.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/kubelet/",
+          "DefaultValue": "By default, `--make-iptables-util-chains` argument is set to `true`."
+        }
+      ]
+    },
+    {
+      "Id": "4.2.7",
+      "Description": "Ensure that the --hostname-override argument is not set",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.2 Kubelet",
+          "Profile": "Level 1 - Worker Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Do not override node hostnames.",
+          "RationaleStatement": "Overriding hostnames could potentially break TLS setup between the kubelet and the apiserver. Additionally, with overridden hostnames, it becomes increasingly difficult to associate logs with a particular node and process them for security analytics. Hence, you should setup your kubelet nodes with resolvable FQDNs and avoid overriding the hostnames with IPs.",
+          "ImpactStatement": "Some cloud providers may require this flag to ensure that hostname matches names issued by the cloud provider. In these environments, this recommendation should not apply.",
+          "RemediationProcedure": "Edit the kubelet service file `/etc/systemd/system/kubelet.service.d/10-kubeadm.conf` on each worker node and remove the `--hostname-override` argument from the `KUBELET_SYSTEM_PODS_ARGS` variable.  Based on your system, restart the `kubelet` service. For example:  ``` systemctl daemon-reload systemctl restart kubelet.service ```",
+          "AuditProcedure": "Run the following command on each node:  ``` ps -ef | grep kubelet ```  Verify that `--hostname-override` argument does not exist.  **Note** This setting is not configurable via the Kubelet config file.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/kubelet/:https://github.com/kubernetes/kubernetes/issues/22063",
+          "DefaultValue": "By default, `--hostname-override` argument is not set."
+        }
+      ]
+    },
+    {
+      "Id": "4.2.8",
+      "Description": "Ensure that the eventRecordQPS argument is set to a level which ensures appropriate event capture",
+      "Checks": [
+        "kubelet_event_record_qps"
+      ],
+      "Attributes": [
+        {
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.2 Kubelet",
+          "Profile": "Level 2 - Worker Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Security relevant information should be captured. The eventRecordQPS on the Kubelet configuration can be used to limit the rate at which events are gathered and sets the maximum event creations per second. Setting this too low could result in relevant events not being logged, however the unlimited setting of `0` could result in a denial of service on the kubelet.",
+          "RationaleStatement": "It is important to capture all events and not restrict event creation. Events are an important source of security information and analytics that ensure that your environment is consistently monitored using the event data.",
+          "ImpactStatement": "Setting this parameter to `0` could result in a denial of service condition due to excessive events being created. The cluster's event processing and storage systems should be scaled to handle expected event loads.",
+          "RemediationProcedure": "If using a Kubelet config file, edit the file to set `eventRecordQPS:` to an appropriate level.  If using command line arguments, edit the kubelet service file `/etc/systemd/system/kubelet.service.d/10-kubeadm.conf` on each worker node and set the below parameter in `KUBELET_ARGS` variable.  Based on your system, restart the `kubelet` service. For example:  ``` systemctl daemon-reload systemctl restart kubelet.service ```",
+          "AuditProcedure": "Run the following command on each node:  ``` sudo grep eventRecordQPS /etc/systemd/system/kubelet.service.d/10-kubeadm.conf ``` or If using command line arguments, kubelet service file is located /etc/systemd/system/kubelet.service.d/10-kubelet-args.conf  ``` sudo grep eventRecordQPS /etc/systemd/system/kubelet.service.d/10-kubelet-args.conf ```  Review the value set for the argument and determine whether this has been set to an appropriate level for the cluster.  If the argument does not exist, check that there is a Kubelet config file specified by `--config` and review the value in this location.  If using command line arguments",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/kubelet/:https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/apis/kubeletconfig/v1beta1/types.go",
+          "DefaultValue": "By default, eventRecordQPS argument is set to `5`."
+        }
+      ]
+    },
+    {
+      "Id": "4.2.9",
+      "Description": "Ensure that the --tls-cert-file and --tls-private-key-file arguments are set as appropriate",
+      "Checks": [
+        "kubelet_tls_cert_and_key"
+      ],
+      "Attributes": [
+        {
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.2 Kubelet",
+          "Profile": "Level 1 - Worker Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Setup TLS connection on the Kubelets.",
+          "RationaleStatement": "The connections from the apiserver to the kubelet are used for fetching logs for pods, attaching (through kubectl) to running pods, and using the kubeletโ€™s port-forwarding functionality. These connections terminate at the kubeletโ€™s HTTPS endpoint. By default, the apiserver does not verify the kubeletโ€™s serving certificate, which makes the connection subject to man-in-the-middle attacks, and unsafe to run over untrusted and/or public networks.",
+          "ImpactStatement": "",
+          "RemediationProcedure": "If using a Kubelet config file, edit the file to set tlsCertFile to the location of the certificate file to use to identify this Kubelet, and tlsPrivateKeyFile to the location of the corresponding private key file.  If using command line arguments, edit the kubelet service file /etc/kubernetes/kubelet.conf on each worker node and set the below parameters in KUBELET_CERTIFICATE_ARGS variable.  --tls-cert-file= --tls-private-key-file= Based on your system, restart the kubelet service. For example:  ``` systemctl daemon-reload systemctl restart kubelet.service ```",
+          "AuditProcedure": "Run the following command on each node:  ``` ps -ef | grep kubelet ```  Verify that the --tls-cert-file and --tls-private-key-file arguments exist and they are set as appropriate.  If these arguments are not present, check that there is a Kubelet config specified by --config and that it contains appropriate settings for tlsCertFile and tlsPrivateKeyFile.",
+          "AdditionalInformation": "",
+          "References": "",
+          "DefaultValue": ""
+        }
+      ]
+    },
+    {
+      "Id": "4.2.10",
+      "Description": "Ensure that the --rotate-certificates argument is not set to false",
+      "Checks": [
+        "kubelet_rotate_certificates"
+      ],
+      "Attributes": [
+        {
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.2 Kubelet",
+          "Profile": "Level 1 - Worker Node",
+          "AssessmentStatus": "Automated",
+          "Description": "Enable kubelet client certificate rotation.",
+          "RationaleStatement": "The `--rotate-certificates` setting causes the kubelet to rotate its client certificates by creating new CSRs as its existing credentials expire. This automated periodic rotation ensures that the there is no downtime due to expired certificates and thus addressing availability in the CIA security triad.  **Note:** This recommendation only applies if you let kubelets get their certificates from the API server. In case your kubelet certificates come from an outside authority/tool (e.g. Vault) then you need to take care of rotation yourself.  **Note:** This feature also require the `RotateKubeletClientCertificate` feature gate to be enabled (which is the default since Kubernetes v1.7)",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "If using a Kubelet config file, edit the file to add the line `rotateCertificates: true` or remove it altogether to use the default value.  If using command line arguments, edit the kubelet service file `/etc/kubernetes/kubelet.conf` on each worker node and remove `--rotate-certificates=false` argument from the `KUBELET_CERTIFICATE_ARGS` variable or set --rotate-certificates=true .  Based on your system, restart the `kubelet` service. For example:  ``` systemctl daemon-reload systemctl restart kubelet.service ```",
+          "AuditProcedure": "Run the following command on each node:  ``` ps -ef | grep kubelet ```  Verify that the `RotateKubeletServerCertificate` argument is not present, or is set to `true`.  If the RotateKubeletServerCertificate argument is not present, verify that if there is a Kubelet config file specified by `--config`, that file does not contain `RotateKubeletServerCertificate: false`.",
+          "AdditionalInformation": "",
+          "References": "https://github.com/kubernetes/kubernetes/pull/41912:https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet-tls-bootstrapping/#kubelet-configuration:https://kubernetes.io/docs/imported/release/notes/:https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/",
+          "DefaultValue": "By default, kubelet client certificate rotation is enabled."
+        }
+      ]
+    },
+    {
+      "Id": "4.2.11",
+      "Description": "Verify that the RotateKubeletServerCertificate argument is set to true",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.2 Kubelet",
+          "Profile": "Level 1 - Worker Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Enable kubelet server certificate rotation.",
+          "RationaleStatement": "`RotateKubeletServerCertificate` causes the kubelet to both request a serving certificate after bootstrapping its client credentials and rotate the certificate as its existing credentials expire. This automated periodic rotation ensures that the there are no downtimes due to expired certificates and thus addressing availability in the CIA security triad.  Note: This recommendation only applies if you let kubelets get their certificates from the API server. In case your kubelet certificates come from an outside authority/tool (e.g. Vault) then you need to take care of rotation yourself.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Edit the kubelet service file `/etc/kubernetes/kubelet.conf` on each worker node and set the below parameter in `KUBELET_CERTIFICATE_ARGS` variable.  ``` --feature-gates=RotateKubeletServerCertificate=true ```  Based on your system, restart the `kubelet` service. For example:  ``` systemctl daemon-reload systemctl restart kubelet.service ```",
+          "AuditProcedure": "Ignore this check if serverTLSBootstrap is true in the kubelet config file or if the --rotate-server-certificates parameter is set on kubelet  Run the following command on each node:  ``` ps -ef | grep kubelet ```  Verify that `RotateKubeletServerCertificate` argument exists and is set to `true`.",
+          "AdditionalInformation": "",
+          "References": "https://github.com/kubernetes/kubernetes/pull/45059:https://kubernetes.io/docs/admin/kubelet-tls-bootstrapping/#kubelet-configuration",
+          "DefaultValue": "By default, kubelet server certificate rotation is enabled."
+        }
+      ]
+    },
+    {
+      "Id": "4.2.12",
+      "Description": "Ensure that the Kubelet only makes use of Strong Cryptographic Ciphers",
+      "Checks": [
+        "kubelet_strong_ciphers_only"
+      ],
+      "Attributes": [
+        {
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.2 Kubelet",
+          "Profile": "Level 1 - Worker Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Ensure that the Kubelet is configured to only use strong cryptographic ciphers.",
+          "RationaleStatement": "TLS ciphers have had a number of known vulnerabilities and weaknesses, which can reduce the protection provided by them. By default Kubernetes supports a number of TLS ciphersuites including some that have security concerns, weakening the protection provided.",
+          "ImpactStatement": "Kubelet clients that cannot support modern cryptographic ciphers will not be able to make connections to the Kubelet API.",
+          "RemediationProcedure": "If using a Kubelet config file, edit the file to set `tlsCipherSuites:` to `TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256` or to a subset of these values.   If using executable arguments, edit the kubelet service file `/etc/kubernetes/kubelet.conf` on each worker node and set the `--tls-cipher-suites` parameter as follows, or to a subset of these values.   ```  --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256 ```  Based on your system, restart the `kubelet` service. For example:  ``` systemctl daemon-reload systemctl restart kubelet.service ```",
+          "AuditProcedure": "The set of cryptographic ciphers currently considered secure is the following:   - `TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256` - `TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256` - `TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305` - `TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384` - `TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305` - `TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384` - `TLS_RSA_WITH_AES_256_GCM_SHA384` - `TLS_RSA_WITH_AES_128_GCM_SHA256`  Run the following command on each node:  ``` ps -ef | grep kubelet ```  If the `--tls-cipher-suites` argument is present, ensure it only contains values included in this set.   If it is not present check that there is a Kubelet config file specified by `--config`, and that file sets `tlsCipherSuites:` to only include values from this set.",
+          "AdditionalInformation": "The list chosen above should be fine for modern clients. It's essentially the list from the Mozilla Modern cipher option with the ciphersuites supporting CBC mode removed, as CBC has traditionally had a lot of issues",
+          "References": "",
+          "DefaultValue": "By default the Kubernetes API server supports a wide range of TLS ciphers"
+        }
+      ]
+    },
+    {
+      "Id": "4.2.13",
+      "Description": "Ensure that a limit is set on pod PIDs",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.2 Kubelet",
+          "Profile": "Level 1 - Worker Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Ensure that the Kubelet sets limits on the number of PIDs that can be created by pods running on the node.",
+          "RationaleStatement": "By default pods running in a cluster can consume any number of PIDs, potentially exhausting the resources available on the node. Setting an appropriate limit reduces the risk of a denial of service attack on cluster nodes.",
+          "ImpactStatement": "Setting this value will restrict the number of processes per pod. If this limit is lower than the number of PIDs required by a pod it will not operate.",
+          "RemediationProcedure": "Decide on an appropriate level for this parameter and set it, either via the `--pod-max-pids` command line parameter or the `PodPidsLimit` configuration file setting.",
+          "AuditProcedure": "Review the Kubelet's start-up parameters for the value of `--pod-max-pids`, and check the Kubelet configuration file for the `PodPidsLimit` . If neither of these values is set, then there is no limit in place.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/concepts/policy/pid-limiting/#pod-pid-limits",
+          "DefaultValue": "By default the number of PIDs is not limited."
+        }
+      ]
+    },
+    {
+      "Id": "4.2.14",
+      "Description": "Ensure that the --seccomp-default parameter is set to true",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.2 Kubelet",
+          "Profile": "Level 1 - Worker Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Ensure that the Kubelet enforces the use of the RuntimeDefault seccomp profile",
+          "RationaleStatement": "By default, Kubernetes disables the seccomp profile which ships with most container runtimes. Setting this parameter will ensure workloads running on the node are protected by the runtime's seccomp profile.",
+          "ImpactStatement": "Setting this will remove some rights from pods running on the node.",
+          "RemediationProcedure": "Set the parameter, either via the `--seccomp-default` command line parameter or the `seccompDefault` configuration file setting.",
+          "AuditProcedure": "Review the Kubelet's start-up parameters for the value of `--seccomp-default`, and check the Kubelet configuration file for the `seccompDefault` . If neither of these values is set, then the seccomp profile is not in use.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/tutorials/security/seccomp/#enable-the-use-of-runtimedefault-as-the-default-seccomp-profile-for-all-workloads",
+          "DefaultValue": "By default the seccomp profile is not enabled."
+        }
+      ]
+    },
+    {
+      "Id": "4.2.15",
+      "Description": "Ensure that the --IPAddressDeny is set to any",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.2 Kubelet",
+          "Profile": "Level 2 - Worker Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Ensuring that `--IPAddressDeny` is set to Any will facilitate allowlisting of only IP addresses that are explicitly set with the `--IPAddressAllow` parameter which will block unspecified IP addresses from communicating with the **kubelet** component.",
+          "RationaleStatement": "By default, Kubernetes allows any IP address to communicate with the **kubelet** component IP restrictions and IP whitelisting are security best practices and reduce the attack surface of the **kubelet**.",
+          "ImpactStatement": "Configuring the setting `IPAddressDeny=any` will deny service to any IP address not specified in the complimentary setting `IPAddressDeny=any` configuration parameter. Applying `IPAddressDeny=any` alone will completely disable communication with the component.",
+          "RemediationProcedure": "`IPAddressDeny=any`  `IPAddressAllow={{ kubelet_secure_addresses }}`  *Note kubelet_secure_addresses: localhost link-local {{ kube_pods_subnets | regex_replace(',', ' ') }} {{ kube_node_addresses }} {{ loadbalancer_apiserver.address | default('')",
+          "AuditProcedure": "Review the Kubelet's start-up parameters for the value of `--IPAddressDeny`, and check the Kubelet configuration file for `IPAddressDeny=any`.   If this entry is present it should be accompanied by `IPAddressAllow={{ kubelet_secure_addresses }}` to allow the control plane to communicate with the component.",
+          "AdditionalInformation": "",
+          "References": "https://github.com/kubernetes-sigs/kubespray/pull/9194/files:https://kubernetes.io/docs/concepts/services-networking/network-policies/",
+          "DefaultValue": "By default IPAddressDeny is not enabled."
+        }
+      ]
+    },
+    {
+      "Id": "4.3.1",
+      "Description": "Ensure that the kube-proxy metrics service is bound to localhost",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "4 Worker Nodes",
+          "SubSection": "4.3 kube-proxy",
+          "Profile": "Level 1 - Worker Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Do not bind the kube-proxy metrics port to non-loopback addresses.",
+          "RationaleStatement": "kube-proxy has two APIs which provided access to information about the service and can be bound to network ports. The metrics API service includes endpoints (`/metrics` and `/configz`) which disclose information about the configuration and operation of kube-proxy. These endpoints should not be exposed to untrusted networks as they do not support encryption or authentication to restrict access to the data they provide.",
+          "ImpactStatement": "3rd party services which try to access metrics or configuration information related to kube-proxy will require access to the localhost interface of the node.",
+          "RemediationProcedure": "Modify or remove any values which bind the metrics service to a non-localhost address",
+          "AuditProcedure": "review the start-up flags provided to kube proxy  Run the following command on each node: ``` ps -ef | grep -i kube-proxy ```  Ensure that the `--metrics-bind-address` parameter is not set to a value other than 127.0.0.1. From the output of this command gather the location specified in the `--config` parameter. Review any file stored at that location and ensure that it does not specify a value other than 127.0.0.1 for `metricsBindAddress`.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/",
+          "DefaultValue": "The default value is `127.0.0.1:10249`"
+        }
+      ]
+    },
+    {
+      "Id": "5.1.1",
+      "Description": "Ensure that the cluster-admin role is only used where required",
+      "Checks": [
+        "rbac_cluster_admin_usage"
+      ],
+      "Attributes": [
+        {
+          "Section": "5 Policies",
+          "SubSection": "5.1 RBAC and Service Accounts",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "The RBAC role `cluster-admin` provides wide-ranging powers over the environment and should be used only where and when needed.",
+          "RationaleStatement": "Kubernetes provides a set of default roles where RBAC is used. Some of these roles such as `cluster-admin` provide wide-ranging privileges which should only be applied where absolutely necessary. Roles such as `cluster-admin` allow super-user access to perform any action on any resource. When used in a `ClusterRoleBinding`, it gives full control over every resource in the cluster and in all namespaces. When used in a `RoleBinding`, it gives full control over every resource in the rolebinding's namespace, including the namespace itself.",
+          "ImpactStatement": "Care should be taken before removing any `clusterrolebindings` from the environment to ensure they were not required for operation of the cluster. Specifically, modifications should not be made to `clusterrolebindings` with the `system:` prefix as they are required for the operation of system components.",
+          "RemediationProcedure": "Identify all clusterrolebindings to the cluster-admin role. Check if they are used and if they need this role or if they could use a role with fewer privileges.   Where possible, first bind users to a lower privileged role and then remove the clusterrolebinding to the cluster-admin role :  ``` kubectl delete clusterrolebinding [name] ```",
+          "AuditProcedure": "Obtain a list of the principals who have access to the `cluster-admin` role by reviewing the `clusterrolebinding` output for each role binding that has access to the `cluster-admin` role.  ``` kubectl get clusterrolebindings -o=custom-columns=NAME:.metadata.name,ROLE:.roleRef.name,SUBJECT:.subjects[*].name ```  Review each principal listed and ensure that `cluster-admin` privilege is required for it.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/authorization/rbac/#user-facing-roles",
+          "DefaultValue": "By default a single `clusterrolebinding` called `cluster-admin` is provided with the `system:masters` group as its principal."
+        }
+      ]
+    },
+    {
+      "Id": "5.1.2",
+      "Description": "Minimize access to secrets",
+      "Checks": [
+        "rbac_minimize_secret_access"
+      ],
+      "Attributes": [
+        {
+          "Section": "5 Policies",
+          "SubSection": "5.1 RBAC and Service Accounts",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "The Kubernetes API stores secrets, which may be service account tokens for the Kubernetes API or credentials used by workloads in the cluster. Access to these secrets should be restricted to the smallest possible group of users to reduce the risk of privilege escalation.",
+          "RationaleStatement": "Inappropriate access to secrets stored within the Kubernetes cluster can allow for an attacker to gain additional access to the Kubernetes cluster or external resources whose credentials are stored as secrets.",
+          "ImpactStatement": "Care should be taken not to remove access to secrets to system components which require this for their operation",
+          "RemediationProcedure": "Where possible, restrict access to secret objects in the cluster by removing get, list, and watch permissions.",
+          "AuditProcedure": "Review the users who have `get`, `list`, or `watch` access to `secrets` objects in the Kubernetes API.",
+          "AdditionalInformation": "",
+          "References": "",
+          "DefaultValue": "By default in a kubeadm cluster the following list of principals have `get` privileges on `secret` objects  ``` CLUSTERROLEBINDING SUBJECT TYPE SA-NAMESPACE cluster-admin system:masters Group  system:controller:clusterrole-aggregation-controller clusterrole-aggregation-controller ServiceAccount kube-system system:controller:expand-controller expand-controller ServiceAccount kube-system system:controller:generic-garbage-collector generic-garbage-collector ServiceAccount kube-system system:controller:namespace-controller namespace-controller ServiceAccount kube-system system:controller:persistent-volume-binder persistent-volume-binder ServiceAccount kube-system system:kube-controller-manager system:kube-controller-manager User  ```"
+        }
+      ]
+    },
+    {
+      "Id": "5.1.3",
+      "Description": "Minimize wildcard use in Roles and ClusterRoles",
+      "Checks": [
+        "rbac_minimize_wildcard_use_roles"
+      ],
+      "Attributes": [
+        {
+          "Section": "5 Policies",
+          "SubSection": "5.1 RBAC and Service Accounts",
+          "Profile": "Level 1 - Worker Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Kubernetes Roles and ClusterRoles provide access to resources based on sets of objects and actions that can be taken on those objects. It is possible to set either of these to be the wildcard * which matches all items.   Use of wildcards is not optimal from a security perspective as it may allow for inadvertent access to be granted when new resources are added to the Kubernetes API either as CRDs or in later versions of the product.",
+          "RationaleStatement": "The principle of least privilege recommends that users are provided only the access required for their role and nothing more. The use of wildcard rights grants is likely to provide excessive rights to the Kubernetes API.",
+          "ImpactStatement": "",
+          "RemediationProcedure": "Where possible replace any use of wildcards in ClusterRoles and Roles with specific objects or actions.",
+          "AuditProcedure": "Retrieve the roles defined across each namespaces in the cluster and review for wildcards  ``` kubectl get roles --all-namespaces -o yaml ```  Retrieve the cluster roles defined in the cluster and review for wildcards  ``` kubectl get clusterroles -o yaml ```",
+          "AdditionalInformation": "",
+          "References": "",
+          "DefaultValue": ""
+        }
+      ]
+    },
+    {
+      "Id": "5.1.4",
+      "Description": "Minimize access to create pods",
+      "Checks": [
+        "rbac_minimize_pod_creation_access"
+      ],
+      "Attributes": [
+        {
+          "Section": "5 Policies",
+          "SubSection": "5.1 RBAC and Service Accounts",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "The ability to create pods in a namespace can provide a number of opportunities for privilege escalation, such as assigning privileged service accounts to these pods or mounting hostPaths with access to sensitive data (unless Pod Security Policies are implemented to restrict this access)  As such, access to create new pods should be restricted to the smallest possible group of users.",
+          "RationaleStatement": "The ability to create pods in a cluster opens up possibilities for privilege escalation and should be restricted, where possible.",
+          "ImpactStatement": "Care should be taken not to remove access to pods to system components which require this for their operation",
+          "RemediationProcedure": "Where possible, remove `create` access to `pod` objects in the cluster.",
+          "AuditProcedure": "Review the users who have create access to pod objects in the Kubernetes API.",
+          "AdditionalInformation": "",
+          "References": "",
+          "DefaultValue": "By default in a kubeadm cluster the following list of principals have `create` privileges on `pod` objects  ``` CLUSTERROLEBINDING SUBJECT TYPE SA-NAMESPACE cluster-admin system:masters Group  system:controller:clusterrole-aggregation-controller clusterrole-aggregation-controller ServiceAccount kube-system system:controller:daemon-set-controller daemon-set-controller ServiceAccount kube-system system:controller:job-controller job-controller ServiceAccount kube-system system:controller:persistent-volume-binder persistent-volume-binder ServiceAccount kube-system system:controller:replicaset-controller replicaset-controller ServiceAccount kube-system system:controller:replication-controller replication-controller ServiceAccount kube-system system:controller:statefulset-controller statefulset-controller ServiceAccount kube-system ```"
+        }
+      ]
+    },
+    {
+      "Id": "5.1.5",
+      "Description": "Ensure that default service accounts are not actively used.",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "5 Policies",
+          "SubSection": "5.1 RBAC and Service Accounts",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "The `default` service account should not be used to ensure that rights granted to applications can be more easily audited and reviewed.",
+          "RationaleStatement": "Kubernetes provides a default service account which is used by cluster workloads where no specific service account is assigned to the pod. Where access to the Kubernetes API from a pod is required, a specific service account should be created for that pod, and rights granted to that service account. The default service account should be configured to ensure that it does not automatically provide a service account token, and it must not have any non-default role bindings or custom role assignments",
+          "ImpactStatement": "All workloads which require access to the Kubernetes API will require an explicit service account to be created.",
+          "RemediationProcedure": "Create explicit service accounts wherever a Kubernetes workload requires specific access to the Kubernetes API server.  Modify the configuration of each default service account to include this value   ``` automountServiceAccountToken: false ```",
+          "AuditProcedure": "For each namespace in the cluster, review the rights assigned to the default service account and ensure that it has no roles or cluster roles bound to it apart from the defaults.  Additionally ensure that the `automountServiceAccountToken: false` setting is in place for each default service account.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/",
+          "DefaultValue": "By default the `default` service account allows for its service account token to be mounted in pods in its namespace."
+        }
+      ]
+    },
+    {
+      "Id": "5.1.6",
+      "Description": "Ensure that Service Account Tokens are only mounted where necessary",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "5 Policies",
+          "SubSection": "5.1 RBAC and Service Accounts",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Service accounts tokens should not be mounted in pods except where the workload running in the pod explicitly needs to communicate with the API server",
+          "RationaleStatement": "Mounting service account tokens inside pods can provide an avenue for privilege escalation attacks where an attacker is able to compromise a single pod in the cluster.  Avoiding mounting these tokens removes this attack avenue.",
+          "ImpactStatement": "Pods mounted without service account tokens will not be able to communicate with the API server, except where the resource is available to unauthenticated principals.",
+          "RemediationProcedure": "Modify the definition of pods and service accounts which do not need to mount service account tokens to disable it.",
+          "AuditProcedure": "Review pod and service account objects in the cluster and ensure that the option below is set, unless the resource explicitly requires this access.  ``` automountServiceAccountToken: false ```",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/",
+          "DefaultValue": "By default, all pods get a service account token mounted in them."
+        }
+      ]
+    },
+    {
+      "Id": "5.1.7",
+      "Description": "Avoid use of system:masters group",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "5 Policies",
+          "SubSection": "5.1 RBAC and Service Accounts",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "The special group `system:masters` should not be used to grant permissions to any user or service account, except where strictly necessary (e.g. bootstrapping access prior to RBAC being fully available)",
+          "RationaleStatement": "The `system:masters` group has unrestricted access to the Kubernetes API hard-coded into the API server source code. An authenticated user who is a member of this group cannot have their access reduced, even if all bindings and cluster role bindings which mention it, are removed.  When combined with client certificate authentication, use of this group can allow for irrevocable cluster-admin level credentials to exist for a cluster.",
+          "ImpactStatement": "Once the RBAC system is operational in a cluster `system:masters` should not be specifically required, as ordinary bindings from principals to the `cluster-admin` cluster role can be made where unrestricted access is required.",
+          "RemediationProcedure": "Remove the `system:masters` group from all users in the cluster.",
+          "AuditProcedure": "Review a list of all credentials which have access to the cluster and ensure that the group `system:masters` is not used.",
+          "AdditionalInformation": "",
+          "References": "https://github.com/kubernetes/kubernetes/blob/master/pkg/registry/rbac/escalation_check.go#L38",
+          "DefaultValue": "By default some clusters will create a break glass client certificate which is a member of this group. Access to this client certificate should be carefully controlled and it should not be used for general cluster operations."
+        }
+      ]
+    },
+    {
+      "Id": "5.1.8",
+      "Description": "Limit use of the Bind, Impersonate and Escalate permissions in the Kubernetes cluster",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "5 Policies",
+          "SubSection": "5.1 RBAC and Service Accounts",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Cluster roles and roles with the impersonate, bind or escalate permissions should not be granted unless strictly required. Each of these permissions allow a particular subject to escalate their privileges beyond those explicitly granted by cluster administrators",
+          "RationaleStatement": "The impersonate privilege allows a subject to impersonate other users gaining their rights to the cluster. The bind privilege allows the subject to add a binding to a cluster role or role which escalates their effective permissions in the cluster. The escalate privilege allows a subject to modify cluster roles to which they are bound, increasing their rights to that level.  Each of these permissions has the potential to allow for privilege escalation to cluster-admin level.",
+          "ImpactStatement": "There are some cases where these permissions are required for cluster service operation, and care should be taken before removing these permissions from system service accounts.",
+          "RemediationProcedure": "Where possible, remove the impersonate, bind, and escalate rights from subjects.",
+          "AuditProcedure": "Review the users who have access to cluster roles or roles which provide the impersonate, bind, or escalate privileges.",
+          "AdditionalInformation": "",
+          "References": "https://raesene.github.io/blog/2020/12/12/Escalating_Away/:https://raesene.github.io/blog/2021/01/16/Getting-Into-A-Bind-with-Kubernetes/",
+          "DefaultValue": "In a default kubeadm cluster, the system:masters group and clusterrole-aggregation-controller service account have access to the escalate privilege. The system:masters group also has access to bind and impersonate."
+        }
+      ]
+    },
+    {
+      "Id": "5.1.9",
+      "Description": "Minimize access to create persistent volumes",
+      "Checks": [
+        "rbac_minimize_pv_creation_access"
+      ],
+      "Attributes": [
+        {
+          "Section": "5 Policies",
+          "SubSection": "5.1 RBAC and Service Accounts",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "The ability to create persistent volumes in a cluster can provide an opportunity for privilege escalation, via the creation of `hostPath` volumes. As persistent volumes are not covered by Pod Security Admission, a user with access to create persistent volumes may be able to get access to sensitive files from the underlying host even where restrictive Pod Security Admission policies are in place.",
+          "RationaleStatement": "The ability to create persistent volumes in a cluster opens up possibilities for privilege escalation and should be restricted, where possible.",
+          "ImpactStatement": "",
+          "RemediationProcedure": "Where possible, remove `create` access to `PersistentVolume` objects in the cluster.",
+          "AuditProcedure": "Review the users who have create access to `PersistentVolume` objects in the Kubernetes API.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/concepts/security/rbac-good-practices/#persistent-volume-creation",
+          "DefaultValue": ""
+        }
+      ]
+    },
+    {
+      "Id": "5.1.10",
+      "Description": "Minimize access to the proxy sub-resource of nodes",
+      "Checks": [
+        "rbac_minimize_node_proxy_subresource_access"
+      ],
+      "Attributes": [
+        {
+          "Section": "5 Policies",
+          "SubSection": "5.1 RBAC and Service Accounts",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Users with access to the `Proxy` sub-resource of `Node` objects automatically have permissions to use the kubelet API, which may allow for privilege escalation or bypass cluster security controls such as audit logs.  The kubelet provides an API which includes rights to execute commands in any container running on the node. Access to this API is covered by permissions to the main Kubernetes API via the `node` object. The proxy sub-resource specifically allows wide ranging access to the kubelet API.  Direct access to the kubelet API bypasses controls like audit logging (there is no audit log of kubelet API access) and admission control.",
+          "RationaleStatement": "The ability to use the `proxy` sub-resource of `node` objects opens up possibilities for privilege escalation and should be restricted, where possible.",
+          "ImpactStatement": "",
+          "RemediationProcedure": "Where possible, remove access to the `proxy` sub-resource of `node` objects.",
+          "AuditProcedure": "Review the users who have access to the `proxy` sub-resource of `node` objects in the Kubernetes API.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/concepts/security/rbac-good-practices/#access-to-proxy-subresource-of-nodes:https://kubernetes.io/docs/reference/access-authn-authz/kubelet-authn-authz/#kubelet-authorization",
+          "DefaultValue": ""
+        }
+      ]
+    },
+    {
+      "Id": "5.1.11",
+      "Description": "Minimize access to the approval sub-resource of certificatesigningrequests objects",
+      "Checks": [
+        "rbac_minimize_csr_approval_access"
+      ],
+      "Attributes": [
+        {
+          "Section": "5 Policies",
+          "SubSection": "5.1 RBAC and Service Accounts",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Users with access to the update the `approval` sub-resource of `CertificateSigningRequests` objects can approve new client certificates for the Kubernetes API effectively allowing them to create new high-privileged user accounts.  This can allow for privilege escalation to full cluster administrator, depending on users configured in the cluster",
+          "RationaleStatement": "The ability to update certificate signing requests should be limited.",
+          "ImpactStatement": "",
+          "RemediationProcedure": "Where possible, remove access to the `approval` sub-resource of `CertificateSigningRequests` objects.",
+          "AuditProcedure": "Review the users who have access to update the `approval` sub-resource of `CertificateSigningRequests` objects in the Kubernetes API.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/concepts/security/rbac-good-practices/#csrs-and-certificate-issuing",
+          "DefaultValue": ""
+        }
+      ]
+    },
+    {
+      "Id": "5.1.12",
+      "Description": "Minimize access to webhook configuration objects",
+      "Checks": [
+        "rbac_minimize_webhook_config_access"
+      ],
+      "Attributes": [
+        {
+          "Section": "5 Policies",
+          "SubSection": "5.1 RBAC and Service Accounts",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Users with rights to create/modify/delete `validatingwebhookconfigurations` or `mutatingwebhookconfigurations` can control webhooks that can read any object admitted to the cluster, and in the case of mutating webhooks, also mutate admitted objects. This could allow for privilege escalation or disruption of the operation of the cluster.",
+          "RationaleStatement": "The ability to manage webhook configuration should be limited",
+          "ImpactStatement": "",
+          "RemediationProcedure": "Where possible, remove access to the `validatingwebhookconfigurations` or `mutatingwebhookconfigurations` objects",
+          "AuditProcedure": "Review the users who have access to `validatingwebhookconfigurations` or `mutatingwebhookconfigurations` objects in the Kubernetes API.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/concepts/security/rbac-good-practices/#control-admission-webhooks",
+          "DefaultValue": ""
+        }
+      ]
+    },
+    {
+      "Id": "5.1.13",
+      "Description": "Minimize access to the service account token creation",
+      "Checks": [
+        "rbac_minimize_service_account_token_creation"
+      ],
+      "Attributes": [
+        {
+          "Section": "5 Policies",
+          "SubSection": "5.1 RBAC and Service Accounts",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Users with rights to create new service account tokens at a cluster level, can create long-lived privileged credentials in the cluster. This could allow for privilege escalation and persistent access to the cluster, even if the users account has been revoked.",
+          "RationaleStatement": "The ability to create service account tokens should be limited.",
+          "ImpactStatement": "",
+          "RemediationProcedure": "Where possible, remove access to the `token` sub-resource of `serviceaccount` objects.",
+          "AuditProcedure": "Review the users who have access to create the `token` sub-resource of `serviceaccount` objects in the Kubernetes API.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/concepts/security/rbac-good-practices/#token-request",
+          "DefaultValue": ""
+        }
+      ]
+    },
+    {
+      "Id": "5.2.1",
+      "Description": "Ensure that the cluster has at least one active policy control mechanism in place",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "5 Policies",
+          "SubSection": "5.2 Pod Security Standards",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Every Kubernetes cluster should have at least one policy control mechanism in place to enforce the other requirements in this section. This could be the in-built Pod Security Admission controller, or a third party policy control system.",
+          "RationaleStatement": "Without an active policy control mechanism, it is not possible to limit the use of containers with access to underlying cluster nodes, via mechanisms like privileged containers, or the use of hostPath volume mounts.",
+          "ImpactStatement": "Where policy control systems are in place, there is a risk that workloads required for the operation of the cluster may be stopped from running. Care is required when implementing admission control policies to ensure that this does not occur.",
+          "RemediationProcedure": "Ensure that either Pod Security Admission or an external policy control system is in place for every namespace which contains user workloads.",
+          "AuditProcedure": "Review the workloads deployed to the cluster to understand if Pod Security Admission or external admission control systems are in place.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/concepts/security/pod-security-admission",
+          "DefaultValue": "By default, Pod Security Admission is enabled but no policies are in place."
+        }
+      ]
+    },
+    {
+      "Id": "5.2.2",
+      "Description": "Minimize the admission of privileged containers",
+      "Checks": [
+        "core_minimize_privileged_containers"
+      ],
+      "Attributes": [
+        {
+          "Section": "5 Policies",
+          "SubSection": "5.2 Pod Security Standards",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Do not generally permit containers to be run with the `securityContext.privileged` flag set to `true`.",
+          "RationaleStatement": "Privileged containers have access to all Linux Kernel capabilities and devices. A container running with full privileges can do almost everything that the host can do. This flag exists to allow special use-cases, like manipulating the network stack and accessing devices.   There should be at least one admission control policy defined which does not permit privileged containers.   If you need to run privileged containers, this should be defined in a separate policy and you should carefully check to ensure that only limited service accounts and users are given permission to use that policy.",
+          "ImpactStatement": "Pods defined with `spec.containers[].securityContext.privileged: true`, `spec.initContainers[].securityContext.privileged: true` and `spec.ephemeralContainers[].securityContext.privileged: true` will not be permitted.",
+          "RemediationProcedure": "Add policies to each namespace in the cluster which has user workloads to restrict the admission of privileged containers.",
+          "AuditProcedure": "Run the following command: `kubectl get pods -A -o=jsonpath='{range .items[*]}{@.metadata.name}: {@..securityContext}{end}'`It will produce an inventory of all the privileged use on the cluster, if any (please, refer to a sample below). Further grepping can be done to automate each specific violation detection. calico-kube-controllers-57b57c56f-jtmk4: {} << No Elevated Privileges calico-node-c4xv4: {} {privileged:true} {privileged:true} {privileged:true} {privileged:true} << Violates 5.2.2 dashboard-metrics-scraper-7bc864c59-2m2xw: {seccompProfile:{type:RuntimeDefault}} {allowPrivilegeEscalation:false,readOnlyRootFilesystem:true,runAsGroup:2001,runAsUser:1001}",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/concepts/security/pod-security-standards/",
+          "DefaultValue": "By default, there are no restrictions on the creation of privileged containers."
+        }
+      ]
+    },
+    {
+      "Id": "5.2.3",
+      "Description": "Minimize the admission of containers wishing to share the host process ID namespace",
+      "Checks": [
+        "core_minimize_hostPID_containers"
+      ],
+      "Attributes": [
+        {
+          "Section": "5 Policies",
+          "SubSection": "5.2 Pod Security Standards",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Do not generally permit containers to be run with the `hostPID` flag set to true.",
+          "RationaleStatement": "A container running in the host's PID namespace can inspect processes running outside the container. If the container also has access to ptrace capabilities this can be used to escalate privileges outside of the container.  There should be at least one admission control policy defined which does not permit containers to share the host PID namespace.  If you need to run containers which require hostPID, this should be defined in a separate policy and you should carefully check to ensure that only limited service accounts and users are given permission to use that policy.",
+          "ImpactStatement": "Pods defined with `spec.hostPID: true` will not be permitted unless they are run under a specific policy.",
+          "RemediationProcedure": "Configure the Admission Controller to restrict the admission of `hostPID` containers.",
+          "AuditProcedure": "Fetch hostPID from each pod with  `get pods -A -o=jsonpath='{range .items[*]}{@.metadata.name}: {@.spec.hostPID}{end}'`",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/concepts/security/pod-security-standards/",
+          "DefaultValue": "By default, there are no restrictions on the creation of `hostPID` containers."
+        }
+      ]
+    },
+    {
+      "Id": "5.2.4",
+      "Description": "Minimize the admission of containers wishing to share the host IPC namespace",
+      "Checks": [
+        "core_minimize_hostIPC_containers"
+      ],
+      "Attributes": [
+        {
+          "Section": "5 Policies",
+          "SubSection": "5.2 Pod Security Standards",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Do not generally permit containers to be run with the `hostIPC` flag set to true.",
+          "RationaleStatement": "A container running in the host's IPC namespace can use IPC to interact with processes outside the container.  There should be at least one admission control policy defined which does not permit containers to share the host IPC namespace.  If you need to run containers which require hostIPC, this should be defined in a separate policy and you should carefully check to ensure that only limited service accounts and users are given permission to use that policy.",
+          "ImpactStatement": "Pods defined with `spec.hostIPC: true` will not be permitted unless they are run under a specific policy.",
+          "RemediationProcedure": "Add policies to each namespace in the cluster which has user workloads to restrict the admission of `hostIPC` containers.",
+          "AuditProcedure": "Fetch hostIPC from each pod with  `get pods -A -o=jsonpath='{range .items[*]}{@.metadata.name}: {@.spec.hostIPC}{end}'`",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/concepts/security/pod-security-standards/",
+          "DefaultValue": "By default, there are no restrictions on the creation of `hostIPC` containers."
+        }
+      ]
+    },
+    {
+      "Id": "5.2.5",
+      "Description": "Minimize the admission of containers wishing to share the host network namespace",
+      "Checks": [
+        "core_minimize_hostNetwork_containers"
+      ],
+      "Attributes": [
+        {
+          "Section": "5 Policies",
+          "SubSection": "5.2 Pod Security Standards",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Do not generally permit containers to be run with the `hostNetwork` flag set to true.",
+          "RationaleStatement": "A container running in the host's network namespace could access the local loopback device, and could access network traffic to and from other pods.  There should be at least one admission control policy defined which does not permit containers to share the host network namespace.  If you need to run containers which require access to the host's network namespaces, this should be defined in a separate policy and you should carefully check to ensure that only limited service accounts and users are given permission to use that policy.",
+          "ImpactStatement": "Pods defined with `spec.hostNetwork: true` will not be permitted unless they are run under a specific policy.",
+          "RemediationProcedure": "Add policies to each namespace in the cluster which has user workloads to restrict the admission of `hostNetwork` containers.",
+          "AuditProcedure": "Fetch hostNetwork from each pod with `get pods -A -o=jsonpath='{range .items[*]}{@.metadata.name}: {@.spec.hostNetwork}{end}'`",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/concepts/security/pod-security-standards/",
+          "DefaultValue": "By default, there are no restrictions on the creation of `hostNetwork` containers."
+        }
+      ]
+    },
+    {
+      "Id": "5.2.6",
+      "Description": "Minimize the admission of containers with allowPrivilegeEscalation",
+      "Checks": [
+        "core_minimize_allowPrivilegeEscalation_containers"
+      ],
+      "Attributes": [
+        {
+          "Section": "5 Policies",
+          "SubSection": "5.2 Pod Security Standards",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Do not generally permit containers to be run with the `allowPrivilegeEscalation` flag set to true. Allowing this right can lead to a process running a container getting more rights than it started with.  It's important to note that these rights are still constrained by the overall container sandbox, and this setting does not relate to the use of privileged containers.",
+          "RationaleStatement": "A container running with the `allowPrivilegeEscalation` flag set to `true` may have processes that can gain more privileges than their parent.  There should be at least one admission control policy defined which does not permit containers to allow privilege escalation. The option exists (and is defaulted to true) to permit setuid binaries to run.   If you have need to run containers which use setuid binaries or require privilege escalation, this should be defined in a separate policy and you should carefully check to ensure that only limited service accounts and users are given permission to use that policy.",
+          "ImpactStatement": "Pods defined with `securityContext: allowPrivilegeEscalation: true` will not be permitted unless they are run under a specific policy.",
+          "RemediationProcedure": "Add policies to each namespace in the cluster which has user workloads to restrict the admission of containers with `securityContext: allowPrivilegeEscalation: true`",
+          "AuditProcedure": "List the policies in use for each namespace in the cluster, ensure that each policy disallows the admission of containers which allow privilege escalation. To fetch a list of pods which `allowPrivilegeEscalation` run this command: `get pods -A -o=jsonpath='{range .items[*]}{@.metadata.name}: {@..securityContext}{end}'`",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/concepts/security/pod-security-standards/",
+          "DefaultValue": "By default, there are no restrictions on contained process ability to escalate privileges, within the context of the container."
+        }
+      ]
+    },
+    {
+      "Id": "5.2.7",
+      "Description": "Minimize the admission of root containers",
+      "Checks": [
+        "core_minimize_root_containers_admission"
+      ],
+      "Attributes": [
+        {
+          "Section": "5 Policies",
+          "SubSection": "5.2 Pod Security Standards",
+          "Profile": "Level 2 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Do not generally permit containers to be run as the root user.",
+          "RationaleStatement": "Containers may run as any Linux user. Containers which run as the root user, whilst constrained by Container Runtime security features still have a escalated likelihood of container breakout.  Ideally, all containers should run as a defined non-UID 0 user.  There should be at least one admission control policy defined which does not permit root containers.  If you need to run root containers, this should be defined in a separate policy and you should carefully check to ensure that only limited service accounts and users are given permission to use that policy.",
+          "ImpactStatement": "Pods with containers which run as the root user will not be permitted.",
+          "RemediationProcedure": "Create a policy for each namespace in the cluster, ensuring that either `MustRunAsNonRoot` or `MustRunAs` with the range of UIDs not including 0, is set.",
+          "AuditProcedure": "List the policies in use for each namespace in the cluster, ensure that each policy restricts the use of root containers by setting `MustRunAsNonRoot` or `MustRunAs` with the range of UIDs not including 0.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/concepts/security/pod-security-standards/",
+          "DefaultValue": "By default, there are no restrictions on the use of root containers and if a User is not specified in the image, the container will run as root."
+        }
+      ]
+    },
+    {
+      "Id": "5.2.8",
+      "Description": "Minimize the admission of containers with the NET_RAW capability",
+      "Checks": [
+        "core_minimize_net_raw_capability_admission"
+      ],
+      "Attributes": [
+        {
+          "Section": "5 Policies",
+          "SubSection": "5.2 Pod Security Standards",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Do not generally permit containers with the potentially dangerous NET_RAW capability.",
+          "RationaleStatement": "Containers run with a default set of capabilities as assigned by the Container Runtime. By default this can include potentially dangerous capabilities. With Docker as the container runtime the NET_RAW capability is enabled which may be misused by malicious containers.  Ideally, all containers should drop this capability.  There should be at least one admission control policy defined which does not permit containers with the NET_RAW capability.  If you need to run containers with this capability, this should be defined in a separate policy and you should carefully check to ensure that only limited service accounts and users are given permission to use that policy.",
+          "ImpactStatement": "Pods with containers which run with the NET_RAW capability will not be permitted.",
+          "RemediationProcedure": "Add policies to each namespace in the cluster which has user workloads to restrict the admission of containers with the `NET_RAW` capability.",
+          "AuditProcedure": "List the policies in use for each namespace in the cluster, ensure that at least one policy disallows the admission of containers with the `NET_RAW` capability.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/concepts/security/pod-security-standards/:https://www.nccgroup.trust/uk/our-research/abusing-privileged-and-unprivileged-linux-containers/",
+          "DefaultValue": "By default, there are no restrictions on the creation of containers with the `NET_RAW` capability."
+        }
+      ]
+    },
+    {
+      "Id": "5.2.9",
+      "Description": "Minimize the admission of containers with added capabilities",
+      "Checks": [
+        "core_minimize_containers_added_capabilities"
+      ],
+      "Attributes": [
+        {
+          "Section": "5 Policies",
+          "SubSection": "5.2 Pod Security Standards",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Do not generally permit containers with capabilities assigned beyond the default set.",
+          "RationaleStatement": "Containers run with a default set of capabilities as assigned by the Container Runtime. Capabilities outside this set can be added to containers which could expose them to risks of container breakout attacks.  There should be at least one policy defined which prevents containers with capabilities beyond the default set from launching.  If you need to run containers with additional capabilities, this should be defined in a separate policy and you should carefully check to ensure that only limited service accounts and users are given permission to use that policy.",
+          "ImpactStatement": "Pods with containers which require capabilities outside the default set will not be permitted.",
+          "RemediationProcedure": "Ensure that `allowedCapabilities` is not present in policies for the cluster unless it is set to an empty array.",
+          "AuditProcedure": "Ensure that allowedCapabilities is not present in policies for the cluster unless it is set to an empty array. Run: kubectl get pods -A -o=jsonpath='{range .items[*]}{@.metadata.name}: {@..securityContext}{end}'",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/concepts/security/pod-security-standards/:https://www.nccgroup.trust/uk/our-research/abusing-privileged-and-unprivileged-linux-containers/",
+          "DefaultValue": "By default, there are no restrictions on adding capabilities to containers."
+        }
+      ]
+    },
+    {
+      "Id": "5.2.10",
+      "Description": "Minimize the admission of containers with capabilities assigned",
+      "Checks": [
+        "core_minimize_containers_capabilities_assigned"
+      ],
+      "Attributes": [
+        {
+          "Section": "5 Policies",
+          "SubSection": "5.2 Pod Security Standards",
+          "Profile": "Level 2 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Do not generally permit containers with capabilities",
+          "RationaleStatement": "Containers run with a default set of capabilities as assigned by the Container Runtime. Capabilities are parts of the rights generally granted on a Linux system to the root user.  In many cases applications running in containers do not require any capabilities to operate, so from the perspective of the principal of least privilege use of capabilities should be minimized.",
+          "ImpactStatement": "Pods with containers require capabilities to operate will not be permitted.",
+          "RemediationProcedure": "Review the use of capabilities in applications running on your cluster. Where a namespace contains applications which do not require any Linux capabilities to operate consider adding a policy which forbids the admission of containers which do not drop all capabilities.",
+          "AuditProcedure": "List the policies in use for each namespace in the cluster, ensure that at least one policy requires that capabilities are dropped by all containers.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/concepts/security/pod-security-standards/:https://www.nccgroup.trust/uk/our-research/abusing-privileged-and-unprivileged-linux-containers/",
+          "DefaultValue": "By default, there are no restrictions on the creation of containers with additional capabilities"
+        }
+      ]
+    },
+    {
+      "Id": "5.2.11",
+      "Description": "Minimize the admission of Windows HostProcess Containers",
+      "Checks": [
+        "core_minimize_admission_windows_hostprocess_containers"
+      ],
+      "Attributes": [
+        {
+          "Section": "5 Policies",
+          "SubSection": "5.2 Pod Security Standards",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Do not generally permit Windows containers to be run with the `hostProcess` flag set to true.",
+          "RationaleStatement": "A Windows container making use of the `hostProcess` flag can interact with the underlying Windows cluster node. As per the Kubernetes documentation, this provides privileged access to the Windows node.  Where Windows containers are used inside a Kubernetes cluster, there should be at least one admission control policy which does not permit `hostProcess` Windows containers.  If you need to run Windows containers which require `hostProcess`, this should be defined in a separate policy and you should carefully check to ensure that only limited service accounts and users are given permission to use that policy.",
+          "ImpactStatement": "Pods defined with `securityContext.windowsOptions.hostProcess: true` will not be permitted unless they are run under a specific policy.",
+          "RemediationProcedure": "Add policies to each namespace in the cluster which has user workloads to restrict the admission of `hostProcess` containers.",
+          "AuditProcedure": "List the policies in use for each namespace in the cluster, ensure that each policy disallows the admission of `hostProcess` containers",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/tasks/configure-pod-container/create-hostprocess-pod/:https://kubernetes.io/docs/concepts/security/pod-security-standards/",
+          "DefaultValue": "By default, there are no restrictions on the creation of `hostProcess` containers."
+        }
+      ]
+    },
+    {
+      "Id": "5.2.12",
+      "Description": "Minimize the admission of HostPath volumes",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "5 Policies",
+          "SubSection": "5.2 Pod Security Standards",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Do not generally admit containers which make use of `hostPath` volumes.",
+          "RationaleStatement": "A container which mounts a `hostPath` volume as part of its specification will have access to the filesystem of the underlying cluster node. The use of `hostPath` volumes may allow containers access to privileged areas of the node filesystem.  There should be at least one admission control policy defined which does not permit containers to mount `hostPath` volumes.  If you need to run containers which require `hostPath` volumes, this should be defined in a separate policy and you should carefully check to ensure that only limited service accounts and users are given permission to use that policy.",
+          "ImpactStatement": "Pods defined which make use of `hostPath` volumes will not be permitted unless they are run under a specific policy.",
+          "RemediationProcedure": "Add policies to each namespace in the cluster which has user workloads to restrict the admission of containers which use `hostPath` volumes.",
+          "AuditProcedure": "List the policies in use for each namespace in the cluster, ensure that each policy disallows the admission of containers with `hostPath` volumes.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/concepts/security/pod-security-standards/",
+          "DefaultValue": "By default, there are no restrictions on the creation of `hostPath` volumes."
+        }
+      ]
+    },
+    {
+      "Id": "5.2.13",
+      "Description": "Minimize the admission of containers which use HostPorts",
+      "Checks": [
+        "core_minimize_admission_hostport_containers"
+      ],
+      "Attributes": [
+        {
+          "Section": "5 Policies",
+          "SubSection": "5.2 Pod Security Standards",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Do not generally permit containers which require the use of HostPorts.",
+          "RationaleStatement": "Host ports connect containers directly to the host's network. This can bypass controls such as network policy.  There should be at least one admission control policy defined which does not permit containers which require the use of HostPorts.  If you need to run containers which require HostPorts, this should be defined in a separate policy and you should carefully check to ensure that only limited service accounts and users are given permission to use that policy.",
+          "ImpactStatement": "Pods defined with `hostPort` settings in either the container, initContainer or ephemeralContainer sections will not be permitted unless they are run under a specific policy.",
+          "RemediationProcedure": "Add policies to each namespace in the cluster which has user workloads to restrict the admission of containers which use `hostPort` sections.",
+          "AuditProcedure": "List the policies in use for each namespace in the cluster, ensure that each policy disallows the admission of containers which have `hostPort` sections.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/concepts/security/pod-security-standards/",
+          "DefaultValue": "By default, there are no restrictions on the use of HostPorts."
+        }
+      ]
+    },
+    {
+      "Id": "5.3.1",
+      "Description": "Ensure that the CNI in use supports Network Policies",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "5 Policies",
+          "SubSection": "5.3 Network Policies and CNI",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "There are a variety of CNI plugins available for Kubernetes. If the CNI in use does not support Network Policies it may not be possible to effectively restrict traffic in the cluster.",
+          "RationaleStatement": "Kubernetes network policies are enforced by the CNI plugin in use. As such it is important to ensure that the CNI plugin supports both Ingress and Egress network policies.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "If the CNI plugin in use does not support network policies, consideration should be given to making use of a different plugin, or finding an alternate mechanism for restricting traffic in the Kubernetes cluster.",
+          "AuditProcedure": "Review the documentation of CNI plugin in use by the cluster, and confirm that it supports Ingress and Egress network policies.",
+          "AdditionalInformation": "One example here is Flannel (https://github.com/coreos/flannel) which does not support Network policy unless Calico is also in use.",
+          "References": "https://kubernetes.io/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/",
+          "DefaultValue": "This will depend on the CNI plugin in use."
+        }
+      ]
+    },
+    {
+      "Id": "5.3.2",
+      "Description": "Ensure that all Namespaces have Network Policies defined",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "5 Policies",
+          "SubSection": "5.3 Network Policies and CNI",
+          "Profile": "Level 2 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Use network policies to isolate traffic in your cluster network.",
+          "RationaleStatement": "Running different applications on the same Kubernetes cluster creates a risk of one compromised application attacking a neighboring application. Network segmentation is important to ensure that containers can communicate only with those they are supposed to. A network policy is a specification of how selections of pods are allowed to communicate with each other and other network endpoints.   Network Policies are namespace scoped. When a network policy is introduced to a given namespace, all traffic not allowed by the policy is denied. However, if there are no network policies in a namespace all traffic will be allowed into and out of the pods in that namespace.",
+          "ImpactStatement": "Once network policies are in use within a given namespace, traffic not explicitly allowed by a network policy will be denied. As such it is important to ensure that, when introducing network policies, legitimate traffic is not blocked.",
+          "RemediationProcedure": "Follow the documentation and create `NetworkPolicy` objects as you need them.",
+          "AuditProcedure": "Run the below command and review the `NetworkPolicy` objects created in the cluster.  ``` kubectl get networkpolicy --all-namespaces ```  Ensure that each namespace defined in the cluster has at least one Network Policy.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/concepts/services-networking/networkpolicies/:https://octetz.com/posts/k8s-network-policy-apis:https://kubernetes.io/docs/tasks/configure-pod-container/declare-network-policy/",
+          "DefaultValue": "By default, network policies are not created."
+        }
+      ]
+    },
+    {
+      "Id": "5.4.1",
+      "Description": "Prefer using secrets as files over secrets as environment variables",
+      "Checks": [
+        "core_no_secrets_envs"
+      ],
+      "Attributes": [
+        {
+          "Section": "5 Policies",
+          "SubSection": "5.4 Secrets Management",
+          "Profile": "Level 2 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Kubernetes supports mounting secrets as data volumes or as environment variables. Minimize the use of environment variable secrets.",
+          "RationaleStatement": "It is reasonably common for application code to log out its environment (particularly in the event of an error). This will include any secret values passed in as environment variables, so secrets can easily be exposed to any user or entity who has access to the logs.",
+          "ImpactStatement": "Application code which expects to read secrets in the form of environment variables would need modification",
+          "RemediationProcedure": "If possible, rewrite application code to read secrets from mounted secret files, rather than from environment variables.",
+          "AuditProcedure": "Run the following command to find references to objects which use environment variables defined from secrets.  ``` kubectl get all -o jsonpath='{range .items[?(@..secretKeyRef)]}{.kind}{@.metadata.name}{end}' -A ```",
+          "AdditionalInformation": "Mounting secrets as volumes has the additional benefit that secret values can be updated without restarting the pod",
+          "References": "https://kubernetes.io/docs/concepts/configuration/secret/#using-secrets",
+          "DefaultValue": "By default, secrets are not defined"
+        }
+      ]
+    },
+    {
+      "Id": "5.4.2",
+      "Description": "Consider external secret storage",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "5 Policies",
+          "SubSection": "5.4 Secrets Management",
+          "Profile": "Level 2 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Consider the use of an external secrets storage and management system, instead of using Kubernetes Secrets directly, if you have more complex secret management needs. Ensure the solution requires authentication to access secrets, has auditing of access to and use of secrets, and encrypts secrets. Some solutions also make it easier to rotate secrets.",
+          "RationaleStatement": "Kubernetes supports secrets as first-class objects, but care needs to be taken to ensure that access to secrets is carefully limited. Using an external secrets provider can ease the management of access to secrets, especially where secrests are used across both Kubernetes and non-Kubernetes environments.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Refer to the secrets management options offered by your cloud provider or a third-party secrets management solution.",
+          "AuditProcedure": "Review your secrets management implementation.",
+          "AdditionalInformation": "",
+          "References": "",
+          "DefaultValue": "By default, no external secret management is configured."
+        }
+      ]
+    },
+    {
+      "Id": "5.5.1",
+      "Description": "Configure Image Provenance using ImagePolicyWebhook admission controller",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "5 Policies",
+          "SubSection": "5.5 Extensible Admission Control",
+          "Profile": "Level 2 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Configure Image Provenance for your deployment.",
+          "RationaleStatement": "Kubernetes supports plugging in provenance rules to accept or reject the images in your deployments. You could configure such rules to ensure that only approved images are deployed in the cluster.",
+          "ImpactStatement": "You need to regularly maintain your provenance configuration based on container image updates.",
+          "RemediationProcedure": "Follow the Kubernetes documentation and setup image provenance.",
+          "AuditProcedure": "Review the pod definitions in your cluster and verify that image provenance is configured as appropriate.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/admin/admission-controllers/#imagepolicywebhook:https://github.com/kubernetes/community/blob/master/contributors/design-proposals/image-provenance.md:https://hub.docker.com/r/dnurmi/anchore-toolbox/:https://github.com/kubernetes/kubernetes/issues/22888",
+          "DefaultValue": "By default, image provenance is not set."
+        }
+      ]
+    },
+    {
+      "Id": "5.6.1",
+      "Description": "Create administrative boundaries between resources using namespaces",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "5 Policies",
+          "SubSection": "5.6 General Policies",
+          "Profile": "Level 1 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Use namespaces to isolate your Kubernetes objects.",
+          "RationaleStatement": "Limiting the scope of user permissions can reduce the impact of mistakes or malicious activities. A Kubernetes namespace allows you to partition created resources into logically named groups. Resources created in one namespace can be hidden from other namespaces. By default, each resource created by a user in Kubernetes cluster runs in a default namespace, called `default`. You can create additional namespaces and attach resources and users to them. You can use Kubernetes Authorization plugins to create policies that segregate access to namespace resources between different users.",
+          "ImpactStatement": "You need to switch between namespaces for administration.",
+          "RemediationProcedure": "Follow the documentation and create namespaces for objects in your deployment as you need them.",
+          "AuditProcedure": "Run the below command and review the namespaces created in the cluster.  ``` kubectl get namespaces ```  Ensure that these namespaces are the ones you need and are adequately administered as per your requirements.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/#viewing-namespaces:http://blog.kubernetes.io/2016/08/security-best-practices-kubernetes-deployment.html:https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/589-efficient-node-heartbeats",
+          "DefaultValue": "By default, Kubernetes starts with 4 initial namespaces: 1. `default` - The default namespace for objects with no other namespace 1. `kube-system` - The namespace for objects created by the Kubernetes system 1. `kube-node-lease` - Namespace used for node heartbeats 1. `kube-public` - Namespace used for public information in a cluster"
+        }
+      ]
+    },
+    {
+      "Id": "5.6.2",
+      "Description": "Ensure that the seccomp profile is set to docker/default in your pod definitions",
+      "Checks": [
+        "core_seccomp_profile_docker_default"
+      ],
+      "Attributes": [
+        {
+          "Section": "5 Policies",
+          "SubSection": "5.6 General Policies",
+          "Profile": "Level 2 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Enable `docker/default` seccomp profile in your pod definitions.",
+          "RationaleStatement": "Seccomp (secure computing mode) is used to restrict the set of system calls applications can make, allowing cluster administrators greater control over the security of workloads running in the cluster. Kubernetes disables seccomp profiles by default for historical reasons. You should enable it to ensure that the workloads have restricted actions available within the container.",
+          "ImpactStatement": "If the `docker/default` seccomp profile is too restrictive for you, you would have to create/manage your own seccomp profiles.",
+          "RemediationProcedure": "Use security context to enable the `docker/default` seccomp profile in your pod definitions. An example is as below: ```  securityContext:  seccompProfile:  type: RuntimeDefault ```",
+          "AuditProcedure": "Review the pod definitions in your cluster. It should create a line as below:  ```  securityContext:  seccompProfile:  type: RuntimeDefault ```",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/tutorials/clusters/seccomp/:https://docs.docker.com/engine/security/seccomp/",
+          "DefaultValue": "By default, seccomp profile is set to `unconfined` which means that no seccomp profiles are enabled."
+        }
+      ]
+    },
+    {
+      "Id": "5.6.3",
+      "Description": "Apply Security Context to Your Pods and Containers",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "5 Policies",
+          "SubSection": "5.6 General Policies",
+          "Profile": "Level 2 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Apply Security Context to Your Pods and Containers",
+          "RationaleStatement": "A security context defines the operating system security settings (uid, gid, capabilities, SELinux role, etc..) applied to a container. When designing your containers and pods, make sure that you configure the security context for your pods, containers, and volumes. A security context is a property defined in the deployment yaml. It controls the security parameters that will be assigned to the pod/container/volume. There are two levels of security context: pod level security context, and container level security context.",
+          "ImpactStatement": "If you incorrectly apply security contexts, you may have trouble running the pods.",
+          "RemediationProcedure": "Follow the Kubernetes documentation and apply security contexts to your pods. For a suggested list of security contexts, you may refer to the CIS Security Benchmark for Docker Containers.",
+          "AuditProcedure": "Review the pod definitions in your cluster and verify that you have security contexts defined as appropriate.",
+          "AdditionalInformation": "",
+          "References": "https://kubernetes.io/docs/concepts/policy/security-context/:https://learn.cisecurity.org/benchmarks",
+          "DefaultValue": "By default, no security contexts are automatically applied to pods."
+        }
+      ]
+    },
+    {
+      "Id": "5.6.4",
+      "Description": "The default namespace should not be used",
+      "Checks": [],
+      "Attributes": [
+        {
+          "Section": "5 Policies",
+          "SubSection": "5.6 General Policies",
+          "Profile": "Level 2 - Master Node",
+          "AssessmentStatus": "Manual",
+          "Description": "Kubernetes provides a default namespace, where objects are placed if no namespace is specified for them. Placing objects in this namespace makes application of RBAC and other controls more difficult.",
+          "RationaleStatement": "Resources in a Kubernetes cluster should be segregated by namespace, to allow for security controls to be applied at that level and to make it easier to manage resources.",
+          "ImpactStatement": "None",
+          "RemediationProcedure": "Ensure that namespaces are created to allow for appropriate segregation of Kubernetes resources and that all new resources are created in a specific namespace.",
+          "AuditProcedure": "Run this command to list objects in default namespace  ``` kubectl get $(kubectl api-resources --verbs=list --namespaced=true -o name | paste -sd, -) --ignore-not-found -n default ```  The only entries there should be system managed resources such as the `kubernetes` service",
+          "AdditionalInformation": "",
+          "References": "",
+          "DefaultValue": "Unless a namespace is specific on object creation, the `default` namespace will be used"
+        }
+      ]
+    }
+  ]
+}
diff --git a/prowler/compliance/kubernetes/cis_1.8_kubernetes.json b/prowler/compliance/kubernetes/cis_1.8_kubernetes.json
index d5786b6668..88fcfd59b2 100644
--- a/prowler/compliance/kubernetes/cis_1.8_kubernetes.json
+++ b/prowler/compliance/kubernetes/cis_1.8_kubernetes.json
@@ -10,7 +10,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -31,7 +31,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -52,7 +52,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -73,7 +73,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -94,7 +94,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -115,7 +115,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -136,7 +136,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -157,7 +157,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -178,7 +178,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
@@ -199,7 +199,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
@@ -220,7 +220,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -241,7 +241,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -262,7 +262,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -283,7 +283,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -304,7 +304,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -325,7 +325,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -346,7 +346,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -367,7 +367,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -388,7 +388,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -409,7 +409,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
@@ -430,7 +430,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.1 Control Plane Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
@@ -453,7 +453,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
@@ -476,7 +476,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -499,7 +499,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
@@ -522,7 +522,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -545,7 +545,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -568,7 +568,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -591,7 +591,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -614,7 +614,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -637,7 +637,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
@@ -660,7 +660,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -683,7 +683,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
@@ -706,7 +706,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.2 API Server",
           "Profile": "Level 2 - Master Node",
           "AssessmentStatus": "Manual",
@@ -729,7 +729,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.2 API Server",
           "Profile": "Level 2 - Master Node",
           "AssessmentStatus": "Automated",
@@ -752,7 +752,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.2 API Server",
           "Profile": "Level 2 - Master Node",
           "AssessmentStatus": "Automated",
@@ -775,7 +775,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.2 API Server",
           "Profile": "Level 2 - Master Node",
           "AssessmentStatus": "Automated",
@@ -798,7 +798,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -821,7 +821,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -844,7 +844,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -867,7 +867,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -890,7 +890,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -913,7 +913,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
@@ -936,7 +936,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -959,7 +959,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -982,7 +982,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -1005,7 +1005,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -1028,7 +1028,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -1051,7 +1051,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -1074,7 +1074,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
@@ -1095,7 +1095,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
@@ -1118,7 +1118,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.2 API Server",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
@@ -1141,7 +1141,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.3 Controller Manager",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
@@ -1164,7 +1164,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.3 Controller Manager",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -1187,7 +1187,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.3 Controller Manager",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -1210,7 +1210,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.3 Controller Manager",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -1233,7 +1233,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.3 Controller Manager",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -1256,7 +1256,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.3 Controller Manager",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -1279,7 +1279,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.3 Controller Manager",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -1302,7 +1302,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.4 Scheduler",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -1325,7 +1325,7 @@
       ],
       "Attributes": [
         {
-          "Section": "1. Control Plane Components",
+          "Section": "1 Control Plane Components",
           "SubSection": "1.4 Scheduler",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -1500,7 +1500,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "3. Control Plane Configuration",
+          "Section": "3 Control Plane Configuration",
           "SubSection": "3.1 Authentication and Authorization",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
@@ -1521,7 +1521,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "3. Control Plane Configuration",
+          "Section": "3 Control Plane Configuration",
           "SubSection": "3.1 Authentication and Authorization",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
@@ -1542,7 +1542,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "3. Control Plane Configuration",
+          "Section": "3 Control Plane Configuration",
           "SubSection": "3.1 Authentication and Authorization",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
@@ -1563,7 +1563,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "3. Control Plane Configuration",
+          "Section": "3 Control Plane Configuration",
           "SubSection": "3.2 Logging",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
@@ -1584,7 +1584,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "3. Control Plane Configuration",
+          "Section": "3 Control Plane Configuration",
           "SubSection": "3.2 Logging",
           "Profile": "Level 2 - Master Node",
           "AssessmentStatus": "Manual",
@@ -1607,7 +1607,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
+          "Section": "4 Worker Nodes",
           "SubSection": "4.1 Worker Node Configuration Files",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -1630,7 +1630,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
+          "Section": "4 Worker Nodes",
           "SubSection": "4.1 Worker Node Configuration Files",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Automated",
@@ -1651,7 +1651,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
+          "Section": "4 Worker Nodes",
           "SubSection": "4.1 Worker Node Configuration Files",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Manual",
@@ -1672,7 +1672,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
+          "Section": "4 Worker Nodes",
           "SubSection": "4.1 Worker Node Configuration Files",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Manual",
@@ -1695,7 +1695,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
+          "Section": "4 Worker Nodes",
           "SubSection": "4.1 Worker Node Configuration Files",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Automated",
@@ -1718,7 +1718,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
+          "Section": "4 Worker Nodes",
           "SubSection": "4.1 Worker Node Configuration Files",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Automated",
@@ -1739,7 +1739,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
+          "Section": "4 Worker Nodes",
           "SubSection": "4.1 Worker Node Configuration Files",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Manual",
@@ -1760,7 +1760,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
+          "Section": "4 Worker Nodes",
           "SubSection": "4.1 Worker Node Configuration Files",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Manual",
@@ -1783,7 +1783,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
+          "Section": "4 Worker Nodes",
           "SubSection": "4.1 Worker Node Configuration Files",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Automated",
@@ -1806,7 +1806,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
+          "Section": "4 Worker Nodes",
           "SubSection": "4.1 Worker Node Configuration Files",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Automated",
@@ -1829,7 +1829,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
+          "Section": "4 Worker Nodes",
           "SubSection": "4.2 Kubelet",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Automated",
@@ -1852,7 +1852,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
+          "Section": "4 Worker Nodes",
           "SubSection": "4.2 Kubelet",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Automated",
@@ -1875,7 +1875,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
+          "Section": "4 Worker Nodes",
           "SubSection": "4.2 Kubelet",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Automated",
@@ -1898,7 +1898,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
+          "Section": "4 Worker Nodes",
           "SubSection": "4.2 Kubelet",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Manual",
@@ -1921,7 +1921,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
+          "Section": "4 Worker Nodes",
           "SubSection": "4.2 Kubelet",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Manual",
@@ -1944,7 +1944,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
+          "Section": "4 Worker Nodes",
           "SubSection": "4.2 Kubelet",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Automated",
@@ -1965,7 +1965,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
+          "Section": "4 Worker Nodes",
           "SubSection": "4.2 Kubelet",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Manual",
@@ -1988,7 +1988,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
+          "Section": "4 Worker Nodes",
           "SubSection": "4.2 Kubelet",
           "Profile": "Level 2 - Worker Node",
           "AssessmentStatus": "Manual",
@@ -2011,7 +2011,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
+          "Section": "4 Worker Nodes",
           "SubSection": "4.2 Kubelet",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Manual",
@@ -2034,7 +2034,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
+          "Section": "4 Worker Nodes",
           "SubSection": "4.2 Kubelet",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Automated",
@@ -2055,7 +2055,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
+          "Section": "4 Worker Nodes",
           "SubSection": "4.2 Kubelet",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Manual",
@@ -2078,7 +2078,7 @@
       ],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
+          "Section": "4 Worker Nodes",
           "SubSection": "4.2 Kubelet",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Manual",
@@ -2099,7 +2099,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "4. Worker Nodes",
+          "Section": "4 Worker Nodes",
           "SubSection": "4.2 Kubelet",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Manual",
@@ -2122,7 +2122,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
+          "Section": "5 Policies",
           "SubSection": "5.1 RBAC and Service Accounts",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
@@ -2145,7 +2145,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
+          "Section": "5 Policies",
           "SubSection": "5.1 RBAC and Service Accounts",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
@@ -2168,7 +2168,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
+          "Section": "5 Policies",
           "SubSection": "5.1 RBAC and Service Accounts",
           "Profile": "Level 1 - Worker Node",
           "AssessmentStatus": "Manual",
@@ -2191,7 +2191,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
+          "Section": "5 Policies",
           "SubSection": "5.1 RBAC and Service Accounts",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
@@ -2212,7 +2212,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "5. Policies",
+          "Section": "5 Policies",
           "SubSection": "5.1 RBAC and Service Accounts",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
@@ -2233,7 +2233,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "5. Policies",
+          "Section": "5 Policies",
           "SubSection": "5.1 RBAC and Service Accounts",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
@@ -2254,7 +2254,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "5. Policies",
+          "Section": "5 Policies",
           "SubSection": "5.1 RBAC and Service Accounts",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
@@ -2275,7 +2275,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "5. Policies",
+          "Section": "5 Policies",
           "SubSection": "5.1 RBAC and Service Accounts",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
@@ -2298,7 +2298,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
+          "Section": "5 Policies",
           "SubSection": "5.1 RBAC and Service Accounts",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
@@ -2321,7 +2321,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
+          "Section": "5 Policies",
           "SubSection": "5.1 RBAC and Service Accounts",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
@@ -2344,7 +2344,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
+          "Section": "5 Policies",
           "SubSection": "5.1 RBAC and Service Accounts",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
@@ -2367,7 +2367,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
+          "Section": "5 Policies",
           "SubSection": "5.1 RBAC and Service Accounts",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
@@ -2390,7 +2390,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
+          "Section": "5 Policies",
           "SubSection": "5.1 RBAC and Service Accounts",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
@@ -2411,7 +2411,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "5. Policies",
+          "Section": "5 Policies",
           "SubSection": "5.2 Pod Security Standards",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
@@ -2434,7 +2434,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
+          "Section": "5 Policies",
           "SubSection": "5.2 Pod Security Standards",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
@@ -2457,7 +2457,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
+          "Section": "5 Policies",
           "SubSection": "5.2 Pod Security Standards",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -2480,7 +2480,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
+          "Section": "5 Policies",
           "SubSection": "5.2 Pod Security Standards",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -2503,7 +2503,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
+          "Section": "5 Policies",
           "SubSection": "5.2 Pod Security Standards",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -2526,7 +2526,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
+          "Section": "5 Policies",
           "SubSection": "5.2 Pod Security Standards",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -2549,7 +2549,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
+          "Section": "5 Policies",
           "SubSection": "5.2 Pod Security Standards",
           "Profile": "Level 2 - Master Node",
           "AssessmentStatus": "Automated",
@@ -2572,7 +2572,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
+          "Section": "5 Policies",
           "SubSection": "5.2 Pod Security Standards",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -2595,7 +2595,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
+          "Section": "5 Policies",
           "SubSection": "5.2 Pod Security Standards",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Automated",
@@ -2618,7 +2618,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
+          "Section": "5 Policies",
           "SubSection": "5.2 Pod Security Standards",
           "Profile": "Level 2 - Master Node",
           "AssessmentStatus": "Manual",
@@ -2641,7 +2641,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
+          "Section": "5 Policies",
           "SubSection": "5.2 Pod Security Standards",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
@@ -2662,7 +2662,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "5. Policies",
+          "Section": "5 Policies",
           "SubSection": "5.2 Pod Security Standards",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
@@ -2685,7 +2685,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
+          "Section": "5 Policies",
           "SubSection": "5.2 Pod Security Standards",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
@@ -2706,7 +2706,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "5. Policies",
+          "Section": "5 Policies",
           "SubSection": "5.3 Network Policies and CNI",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
@@ -2727,7 +2727,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "5. Policies",
+          "Section": "5 Policies",
           "SubSection": "5.3 Network Policies and CNI",
           "Profile": "Level 2 - Master Node",
           "AssessmentStatus": "Manual",
@@ -2750,7 +2750,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
+          "Section": "5 Policies",
           "SubSection": "5.4 Secrets Management",
           "Profile": "Level 2 - Master Node",
           "AssessmentStatus": "Manual",
@@ -2771,7 +2771,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "5. Policies",
+          "Section": "5 Policies",
           "SubSection": "5.4 Secrets Management",
           "Profile": "Level 2 - Master Node",
           "AssessmentStatus": "Manual",
@@ -2792,7 +2792,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "5. Policies",
+          "Section": "5 Policies",
           "SubSection": "5.4 Secrets Management",
           "Profile": "Level 2 - Master Node",
           "AssessmentStatus": "Manual",
@@ -2813,7 +2813,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "5. Policies",
+          "Section": "5 Policies",
           "SubSection": "5.7 General Policies",
           "Profile": "Level 1 - Master Node",
           "AssessmentStatus": "Manual",
@@ -2836,7 +2836,7 @@
       ],
       "Attributes": [
         {
-          "Section": "5. Policies",
+          "Section": "5 Policies",
           "SubSection": "5.7 General Policies",
           "Profile": "Level 2 - Master Node",
           "AssessmentStatus": "Manual",
@@ -2857,7 +2857,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "5. Policies",
+          "Section": "5 Policies",
           "SubSection": "5.7 General Policies",
           "Profile": "Level 2 - Master Node",
           "AssessmentStatus": "Manual",
@@ -2878,7 +2878,7 @@
       "Checks": [],
       "Attributes": [
         {
-          "Section": "5. Policies",
+          "Section": "5 Policies",
           "SubSection": "5.7 General Policies",
           "Profile": "Level 2 - Master Node",
           "AssessmentStatus": "Manual",
diff --git a/prowler/compliance/kubernetes/pci_4.0_kubernetes.json b/prowler/compliance/kubernetes/pci_4.0_kubernetes.json
index f43d582bbe..4dde914458 100644
--- a/prowler/compliance/kubernetes/pci_4.0_kubernetes.json
+++ b/prowler/compliance/kubernetes/pci_4.0_kubernetes.json
@@ -1,78 +1,78 @@
 {
   "Framework": "PCI",
   "Version": "4.0",
-  "Provider": "Kubernetes",
+  "Provider": "Core",
   "Description": "The Payment Card Industry Data Security Standard (PCI DSS) is a proprietary information security standard. It's administered by the PCI Security Standards Council, which was founded by American Express, Discover Financial Services, JCB International, MasterCard Worldwide, and Visa Inc. PCI DSS applies to entities that store, process, or transmit cardholder data (CHD) or sensitive authentication data (SAD). This includes, but isn't limited to, merchants, processors, acquirers, issuers, and service providers. The PCI DSS is mandated by the card brands and administered by the Payment Card Industry Security Standards Council.",
   "Requirements": [
     {
       "Id": "1.2.5.1",
       "Description": "Checks if Ingress resources in Kubernetes are configured to redirect HTTP traffic to HTTPS. The rule is NON_COMPLIANT if one or more Ingress resources do not have an appropriate redirect annotation configured for HTTP to HTTPS redirection. The rule is also NON_COMPLIANT if one or more Ingress resources are forwarding traffic to another non-secure endpoint instead of redirecting to HTTPS.",
-      "Name": "Ingress Controller",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.2.5: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Ingress Controller"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.2.5.2",
       "Description": "Checks if Kubernetes Ingress resources are using deprecated SSL protocols for HTTPS communication between Ingress controllers and backend services. This rule is NON_COMPLIANT for an Ingress resource if any 'tls' configuration includes 'SSLv3'.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.2.5: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.2.5.3",
       "Description": "Checks if Kubernetes Ingress resources are configured to enforce a minimum security policy and cipher suite of TLSv1.2 or greater for TLS connections. This rule is NON_COMPLIANT for an Ingress resource if the specified minimum TLS version is below 'TLS1.2'.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.2.5: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.2.5.4",
       "Description": "Checks if Kubernetes Ingress resources are using a custom TLS certificate and are configured to use SNI for HTTPS traffic. The rule is NON_COMPLIANT if a custom TLS certificate is associated but the Ingress controller is set up to use a dedicated IP address for SSL termination.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.2.5: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.2.5.5",
       "Description": "Checks if Kubernetes Ingress resources are enforcing HTTPS for traffic to backend services. The rule is NON_COMPLIANT if 'nginx.ingress.kubernetes.io/ssl-redirect' is set to 'false' or if 'nginx.ingress.kubernetes.io/backend-protocol' is 'http' and 'nginx.ingress.kubernetes.io/force-ssl-redirect' is set to 'off'.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.2.5: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.2.5.6",
       "Description": "Checks if your Kubernetes Ingress resources enforce HTTPS for HTTP traffic. The rule is NON_COMPLIANT if there are Ingress configurations that allow HTTP traffic without a redirect to HTTPS.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.2.5: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
@@ -91,52 +91,52 @@
     {
       "Id": "1.2.5.8",
       "Description": "Checks whether your Kubernetes Ingress controllers are using custom SSL policies. The rule is only applicable if there are SSL termination configurations in the Ingress resource.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.2.5: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.2.5.9",
       "Description": "Checks if your Kubernetes Ingress resources use a predefined TLS configuration. The rule is NON_COMPLIANT if the Ingress resource's TLS configuration does not match the specified 'predefinedTLSConfig'.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "1.2.5: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.2.5.10",
       "Description": "Checks if your Kubernetes Service of type LoadBalancer is configured with SSL or HTTPS through Ingress or directly with LoadBalancer annotations. The rule is NON_COMPLIANT if there is no SSL or HTTPS configuration present.",
-      "Name": "Kubernetes LoadBalancer Service",
+      "Name": "Scheduler",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.2.5: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes LoadBalancer Service"
+          "Service": "Scheduler"
         }
       ]
     },
     {
       "Id": "1.2.5.11",
       "Description": "Checks if Kubernetes clusters have Pod Security Policies (PSP) enabled. The rule is NON_COMPLIANT if a security context is not defined in the pods or the security context does not satisfy the specified security requirements.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_security_context_deny_plugin"
       ],
       "Attributes": [
         {
           "Section": "1.2.5: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
@@ -155,962 +155,962 @@
     {
       "Id": "1.2.5.13",
       "Description": "Check if Kubernetes cluster nodes are encrypted end to end. The rule is NON_COMPLIANT if the encryption between nodes is not enabled for the Kubernetes cluster.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.2.5: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.2.5.14",
       "Description": "Checks if Kubernetes clusters require TLS/SSL encryption for API server connections. The rule is NON_COMPLIANT if the Kubernetes API server has the parameter --tls-security-mode not set to 'always'.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "1.2.5: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.2.5.15",
       "Description": "Checks if Kubernetes services are configured to require TLS for communication. The rule is NON_COMPLIANT if any service allows HTTP traffic without enforcing TLS.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "1.2.5: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.2.5.16",
       "Description": "Checks if a Kubernetes Deployment uses the FTP protocol for service communication. The rule is NON_COMPLIANT if the Deployment exposes a service with the FTP protocol enabled.",
-      "Name": "Kubernetes Deployment",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.2.5: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes Deployment"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.2.5.17",
       "Description": "Checks if Network Policies or Security Groups in Kubernetes allow unrestricted incoming traffic ('0.0.0.0/0' or '::/0') only for authorized ports and protocols (TCP/UDP). The rule is NON_COMPLIANT if such policies do not specify authorized ports.",
-      "Name": "Kubernetes Network Policy / Kubernetes Security Groups",
+      "Name": "Core",
       "Checks": [
         "core_minimize_admission_hostport_containers"
       ],
       "Attributes": [
         {
           "Section": "1.2.5: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes Network Policy / Kubernetes Security Groups"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.2.8.1",
       "Description": "Checks if Kubernetes Services are of the type specified in the rule parameter serviceType. The rule returns NON_COMPLIANT if the Service does not match the type configured in the rule parameter.",
-      "Name": "Kubernetes Service",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes Service"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.2.8.2",
       "Description": "Verifies if a Kubernetes service that exposes a REST API is configured with an SSL certificate. The status is NON_COMPLIANT if the service is not using an SSL certificate for secure communication.",
-      "Name": "Kubernetes Service",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes Service"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.2.8.3",
       "Description": "Checks if Kubernetes APIs are associated with Network Policies. The rule is NON_COMPLIANT for a Kubernetes API if it is not associated with a Network Policy.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.2.8.4",
       "Description": "Checks if Kubernetes Ingress resources are associated with Network Policies. The rule is NON_COMPLIANT if an Ingress resource is not associated with any Network Policy.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.2.8.5",
       "Description": "Checks if the TLS certificate associated with a Kubernetes Ingress resource is the default self-signed certificate. The rule is NON_COMPLIANT if an Ingress resource uses the default self-signed certificate.",
-      "Name": "Kubernetes Ingress",
+      "Name": "ETCD",
       "Checks": [
         "etcd_no_auto_tls"
       ],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes Ingress"
+          "Service": "ETCD"
         }
       ]
     },
     {
       "Id": "1.2.8.6",
       "Description": "Checks if the Bitbucket source repository URL contains sign-in credentials. The result is NON_COMPLIANT if the URL contains any sign-in information and COMPLIANT if it doesn't.",
-      "Name": "Bitbucket",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Bitbucket"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.2.8.7",
       "Description": "Checks if Kubernetes Pods have public IP addresses. The rule is NON_COMPLIANT if the Pod's IP address is part of a public IP range.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.2.8.8",
       "Description": "Checks if Kubernetes persistent volumes are accessible to all users. The rule is NON_COMPLIANT if any persistent volumes are accessible to any user (i.e., public).",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "1.2.8.9",
       "Description": "Checks if the Kubernetes NetworkPolicy allows all ingress traffic for all pods. The rule is NON_COMPLIANT if any NetworkPolicy allows traffic from all sources.",
-      "Name": "Kubernetes NetworkPolicy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes NetworkPolicy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.2.8.10",
       "Description": "Checks if the status of the Kubernetes deployment is AVAILABLE or UNAVAILABLE after the deployment execution on the pod. The rule is compliant if the status is AVAILABLE. For more information about deployments, see What is a deployment?",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.2.8.11",
       "Description": "Checks if Kubernetes Network Policies have 'AllowTraffic' enabled. The rule is NON_COMPLIANT for a Network Policy if 'AllowTraffic' is set to 'true'.",
-      "Name": "Kubernetes Network Policies",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes Network Policies"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.2.8.12",
       "Description": "Checks if the Kubernetes API server endpoint is not publicly accessible. The rule is NON_COMPLIANT if the endpoint is publicly accessible.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.2.8.13",
       "Description": "Checks if Kubernetes Services are running in a private network. The rule is NON_COMPLIANT if a Service (ClusterIP, NodePort, or LoadBalancer) has a public endpoint exposed.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_admission_hostport_containers"
       ],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.2.8.14",
       "Description": "Checks if Kubernetes Services of type LoadBalancer have associated Ingress resources configured to use TLS certificates from a specified secret. This rule is NON_COMPLIANT if at least 1 LoadBalancer Service has an associated Ingress that is either not configured with a TLS certificate or uses a certificate not from the specified secret.",
-      "Name": "Kubernetes LoadBalancer Service and Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes LoadBalancer Service and Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.2.8.15",
       "Description": "Checks if Kubernetes Services use TLS certificates provided by cert-manager or another certificate management solution. This rule is only applicable to Services with type LoadBalancer that handle HTTPS traffic, and does not apply to ClusterIP or NodePort Services.",
-      "Name": "Kubernetes Service",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes Service"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.2.8.16",
       "Description": "Checks if a Kubernetes cluster has restricted external access settings. The rule is NON_COMPLIANT if the NetworkPolicy does not restrict ingress traffic on critical ports, or if restrictions are missing for services other than the desired ports.",
-      "Name": "Kubernetes NetworkPolicy",
+      "Name": "Core",
       "Checks": [
         "core_minimize_admission_hostport_containers"
       ],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes NetworkPolicy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.2.8.17",
       "Description": "This rule prevents incoming SSH requests to the Kubernetes cluster, effectively disabling SSH access to the nodes.",
-      "Name": "Kubernetes Networking",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes Networking"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.2.8.18",
       "Description": "Checks if LoadBalancers are associated with an authorized Kubernetes Namespace. The rule is NON_COMPLIANT if LoadBalancers are associated with an unauthorized Namespace.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_namespace_lifecycle_plugin"
       ],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.2.8.19",
       "Description": "Checks if the Kubernetes ServiceAccount policy attached to the Pod prohibits public access. If the ServiceAccount policy allows public access, it is NON_COMPLIANT.",
-      "Name": "Kubernetes",
+      "Name": "RBAC (Role-Based Access Control)",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes"
+          "Service": "RBAC (Role-Based Access Control)"
         }
       ]
     },
     {
       "Id": "1.2.8.20",
       "Description": "Checks if a Kubernetes deployment is using a specific network policies to control pod traffic, where the rule is NON_COMPLIANT if the deployment does not implement network policies for security.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_admission_hostport_containers"
       ],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.2.8.21",
       "Description": "Checks if default ports for SSH/RDP ingress traffic are unrestricted in Network Policies. The rule is NON_COMPLIANT if a Network Policy allows ingress from any source IP address for ports 22 (SSH) or 3389 (RDP).",
-      "Name": "Kubernetes Network Policies",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes Network Policies"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.2.8.22",
       "Description": "Checks if a Kubernetes Network Policy is configured with a user-defined policy for fragmented packets. The rule is NON_COMPLIANT if the default action for fragmented packets does not match the user-defined action in the network policy.",
-      "Name": "Kubernetes Network Policies",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes Network Policies"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.2.8.23",
       "Description": "Check Kubernetes Network Policies are associated with pod selector rules. This rule is NON_COMPLIANT if no Network Policies are associated with the selected pods, else COMPLIANT if any Network Policy is applied to the pods.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.2.8.24",
       "Description": "Checks if a Kubernetes Network Policy has any ingress or egress rules defined. The policy is considered NON_COMPLIANT if there are no rules specified in the Network Policy.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.2.8.25",
       "Description": "Checks if there are public routes in the Kubernetes network configuration that direct traffic to an external service or endpoint. The rule is NON_COMPLIANT if a network policy allows traffic from pods to external IPs that enable unrestricted access to the Internet.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.2.8.26",
       "Description": "Checks if Kubernetes clusters are running in a private network. The rule is NON_COMPLIANT if the cluster API server endpoint is publicly accessible.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.2.8.27",
       "Description": "Checks if there are any Kubernetes Network Policies that are not the default Network Policy. The rule is NON_COMPLIANT if there are any Network Policies that are not the default Network Policy.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.2.8.28",
       "Description": "Checks if the Kubernetes Pods running in the cluster are not exposed to the public internet. The rule is NON_COMPLIANT if the Pod's service type is LoadBalancer or NodePort.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_admission_hostport_containers"
       ],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.2.8.29",
       "Description": "Checks if the Kubernetes services are not exposed externally. The rule is NON_COMPLIANT if the service type is 'LoadBalancer' or 'NodePort' which makes them accessible externally.",
-      "Name": "Kubernetes Service",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes Service"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.2.8.30",
       "Description": "Checks if Kubernetes services have network policies in place to block unauthorized access. The rule is NON_COMPLIANT if network policies are not defined to restrict access to services.",
-      "Name": "Kubernetes Network Policies",
+      "Name": "Core",
       "Checks": [
         "core_minimize_admission_hostport_containers"
       ],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes Network Policies"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.2.8.31",
       "Description": "Checks if the required network policies are configured to restrict public access for the specified Kubernetes pods. The status is only NON_COMPLIANT when the network policies do not match the predefined rules for public access control.",
-      "Name": "Kubernetes Network Policies",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes Network Policies"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.2.8.32",
       "Description": "Verifies if the required network policies for public access restrictions are configured at the cluster level. The rule is NON_COMPLIANT if the configuration does not align with defined policies or defaults for restricting external access.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.2.8.33",
       "Description": "Checks if Kubernetes services are publicly accessible. The rule is NON_COMPLIANT if a Kubernetes service is not listed in the excludedPublicServices parameter and service type is LoadBalancer or NodePort.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.2.8.34",
       "Description": "Checks if your Kubernetes Persistent Volumes do not allow public access. The rule checks the access modes and security contexts configured for the persistent volume claims and associated pods.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "1.2.8.35",
       "Description": "Checks if your Kubernetes buckets (storage classes or persistent volume claims) do not allow public write access. The rule checks the access policies and permissions defined for the storage resources.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.2.8.36",
       "Description": "Checks if a Kubernetes pod is deployed within a specific namespace or within a list of approved node selectors. The rule is NON_COMPLIANT if a pod is not deployed within the specified namespace or if its node selector does not match the approved criteria.",
-      "Name": "Kubernetes Pods",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes Pods"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.2.8.37",
       "Description": "Checks if direct internet access is disabled for a Kubernetes pod. The rule is NON_COMPLIANT if a Kubernetes pod has an external IP assigned, allowing internet access.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.2.8.38",
       "Description": "Checks if a Kubernetes Service Endpoint for the specified service is created for each Kubernetes namespace. The status is NON_COMPLIANT if a namespace does not have an endpoint created for the service.",
-      "Name": "Kubernetes Service Endpoint",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes Service Endpoint"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.2.8.39",
       "Description": "Checks if there are unused Network Policies. The rule is COMPLIANT if each Network Policy is associated with a namespace. The rule is NON_COMPLIANT if a Network Policy is not associated with any namespace.",
-      "Name": "Kubernetes Networking",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes Networking"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.2.8.40",
       "Description": "Checks if DNS resolution from the Accepter/Requester VPC to the private IP is enabled in Kubernetes. A NON_COMPLIANT status is indicated if DNS resolution from the Accepter/Requester VPC to the private IP is not enabled.",
-      "Name": "Kubernetes DNS (CoreDNS)",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes DNS (CoreDNS)"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.2.8.41",
       "Description": "Checks if Network Policies in Kubernetes allow unrestricted incoming traffic ('0.0.0.0/0' or '::/0') only for authorized ports. The rule is NON_COMPLIANT if such Network Policies do not have ports specified in the rule parameters.",
-      "Name": "Network Policies",
+      "Name": "Core",
       "Checks": [
         "core_minimize_admission_hostport_containers"
       ],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Network Policies"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.2.8.42",
       "Description": "Checks if a Kubernetes NetworkPolicy contains any ingress or egress rules. The policy is NON_COMPLIANT if there are no rules present within the NetworkPolicy.",
-      "Name": "Kubernetes NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.2.8.43",
       "Description": "Checks if a Kubernetes NetworkPolicy has any ingress or egress rules defined. The NetworkPolicy is NON_COMPLIANT if no rules are present.",
-      "Name": "Kubernetes NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.2.8.44",
       "Description": "Checks whether a Kubernetes Network Policy contains any ingress or egress rules. This rule is NON_COMPLIANT if a Network Policy does not contain any ingress or egress rules.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.2.8.45",
       "Description": "Checks if a Kubernetes NetworkPolicy has any ingress or egress rules defined. The NetworkPolicy is considered NON_COMPLIANT if there are no rules present within it.",
-      "Name": "Kubernetes NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.2.8.46",
       "Description": "Checks whether Kubernetes NetworkPolicy contains ingress or egress rules. This policy is COMPLIANT if it contains at least one rule and NON_COMPLIANT otherwise.",
-      "Name": "Kubernetes NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.2.8.47",
       "Description": "Checks if a Kubernetes NetworkPolicy contains any ingress or egress rules. The policy is NON_COMPLIANT if there are no ingress or egress rules present within the NetworkPolicy.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.2.8: Network security controls (NSCs) are configured and maintained.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.1.1",
       "Description": "Checks if a Kubernetes Ingress resource is using an Ingress Controller that is compliant with the specified security policies (e.g., a Web Application Firewall). The rule is NON_COMPLIANT if an Ingress resource is not associated with a compliant Ingress Controller or if the Ingress Controller does not meet the security policy criteria defined in the rule parameters.",
-      "Name": "Ingress Controller",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Ingress Controller"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.1.2",
       "Description": "Checks if Kubernetes Services are of the type specified in the rule parameter serviceType. The rule returns NON_COMPLIANT if the Service does not match the service type configured in the rule parameter.",
-      "Name": "Kubernetes Service",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes Service"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.1.3",
       "Description": "Checks if a Kubernetes Ingress resource is configured with TLS settings. The rule is NON_COMPLIANT if the Ingress does not have an associated TLS certificate.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.1.4",
       "Description": "Checks if Kubernetes Ingress resources are associated with NetworkPolicies. The rule is NON_COMPLIANT for a Kubernetes Ingress if it is not associated with a NetworkPolicy.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.1.5",
       "Description": "Checks if Kubernetes Ingress resources are associated with any network policies. The rule is NON_COMPLIANT if an Ingress resource is not associated with a network policy.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.1.6",
       "Description": "Verifies if the TLS certificate associated with a Kubernetes Ingress resource is a custom certificate. The rule is NON_COMPLIANT if an Ingress resource uses the default or self-signed TLS certificate.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.1.7",
       "Description": "Checks if the Bitbucket source repository URL contains sign-in credentials. The rule is NON_COMPLIANT if the URL contains any sign-in information and COMPLIANT if it doesn't.",
-      "Name": "Bitbucket",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Bitbucket"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.1.8",
       "Description": "Checks if Kubernetes pods are accessible from outside the cluster via their services. The rule is NON_COMPLIANT if the service type is LoadBalancer or NodePort, which exposes the pods to the public.",
-      "Name": "Kubernetes Services",
+      "Name": "Core",
       "Checks": [
         "core_minimize_admission_hostport_containers"
       ],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes Services"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.1.9",
       "Description": "Checks if Kubernetes persistent volume snapshots are publicly accessible. The rule is NON_COMPLIANT if any Kubernetes persistent volume snapshots are publicly accessible.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "1.3.1.10",
       "Description": "Checks if the Kubernetes NetworkPolicy allows access for all pods. The rule is NON_COMPLIANT if 'allowAll' is present and set to true.",
-      "Name": "Kubernetes NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.1.11",
       "Description": "Checks if the status of a Kubernetes configuration or deployment is healthy (COMPLIANT) or unhealthy (NON_COMPLIANT) after applying the configuration to the pod. The rule is compliant if the pod is running without errors. For more information about pod statuses, see Kubernetes Pod Lifecycle.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.1.12",
       "Description": "Checks if Kubernetes Network Policies have 'AllowAllIngress' configured. The rule is NON_COMPLIANT for a Network Policy if 'AllowAllIngress' is set to 'true'.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.1.13",
       "Description": "Checks if the Kubernetes API server endpoint is not publicly accessible. The rule is NON_COMPLIANT if the endpoint is publicly accessible.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.1.14",
       "Description": "Checks if Kubernetes clusters are configured with custom network policies. The rule is NON_COMPLIANT for a Kubernetes cluster if it is using the default network policies.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.1.15",
       "Description": "Checks if Kubernetes services are within a defined Network Policy. The rule is NON_COMPLIANT if a service is exposed publicly without proper network isolation.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.1.16",
       "Description": "Checks if Kubernetes Ingress resources have TLS settings configured to use certificates from a trusted certificate management service. This rule is NON_COMPLIANT if at least 1 Ingress has at least 1 TLS entry that is configured without a certificate or is configured with a certificate different from a trusted certificate management service.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.1.17",
       "Description": "Checks if Ingress resources in Kubernetes use SSL certificates provided by a certificate management solution (e.g., Cert-Manager). To use this rule, ensure an Ingress resource is configured with TLS settings. This rule is only applicable to Ingress resources and does not check LoadBalancer services directly.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.1.18",
       "Description": "Checks if a Kubernetes Cluster has network policies that restrict public access. The rule is NON_COMPLIANT if network policies allow access to any port other than Port 22.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.1.19",
       "Description": "In Kubernetes, the rule INCOMING_SSH_DISABLED corresponds to a NetworkPolicy that restricts incoming traffic on port 22 (SSH) to prevent unauthorized access, reflecting the restricted-ssh policy. This NetworkPolicy can be used to control the flow of traffic to pods in a namespace, effectively disabling incoming SSH access as specified by the rule name.",
-      "Name": "NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.1.20",
       "Description": "The rule identifier for Kubernetes resources is commonly the name of the resource, while the rule name can refer to the specific configuration or a higher-level abstraction. For example, in Kubernetes, a Deployment (which could represent multiple instances of pods) could be associated with a label that identifies it, but the deployment itself may have a distinct name. This mirrors the difference between the rule identifier and rule name for EC2 instances in VPC.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.1.21",
       "Description": "Checks if Kubernetes services are associated with an authorized namespace. The rule is NON_COMPLIANT if services are linked to an unauthorized namespace.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_namespace_lifecycle_plugin"
       ],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.1.22",
       "Description": "Checks if the Kubernetes Service account policy attached to the Pod prohibits public access. If the Service account policy allows public access, it is NON_COMPLIANT.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.1.23",
       "Description": "Checks if a Kubernetes Pod is allowed access to a specific namespace. The rule is NON_COMPLIANT if the Pod does not have appropriate Network Policies enabling access to the namespace.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
@@ -1129,1268 +1129,1268 @@
     {
       "Id": "1.3.1.25",
       "Description": "Checks if a Kubernetes Network Policy is configured with a user defined default action for fragmented packets. The rule is NON_COMPLIANT if the default action for fragmented packets does not match with user defined default action.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.1.26",
       "Description": "Check if Kubernetes NetworkPolicy has ingress or egress rules defined. The policy is NON_COMPLIANT if no ingress or egress rules are defined, otherwise it is COMPLIANT if at least one rule exists.",
-      "Name": "Kubernetes NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.1.27",
       "Description": "Checks if a Kubernetes NetworkPolicy object has any ingress or egress rules defined. The rule is NON_COMPLIANT if there are no rules in the NetworkPolicy.",
-      "Name": "Kubernetes NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.1.28",
       "Description": "Checks if there are public routes in the Kubernetes networking configuration to an Internet Gateway (IGW). The rule is NON_COMPLIANT if a route to an IGW has a destination CIDR block of '0.0.0.0/0' or '::/0' or if a destination CIDR block does not match the rule parameter.",
-      "Name": "Kubernetes Networking",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes Networking"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.1.29",
       "Description": "Checks if Kubernetes services are configured to only be accessible within a cluster network. The rule is NON_COMPLIANT if a service has a type of LoadBalancer or NodePort, which exposes it publicly.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_admission_hostport_containers"
       ],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.1.30",
       "Description": "Checks if there are any Kubernetes Network Policies that are not the default Network Policy. The rule is NON_COMPLIANT if there are any Network Policies that are not the default Network Policy.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.1.31",
       "Description": "Checks if the Kubernetes services of type LoadBalancer are not publicly accessible. The rule is NON_COMPLIANT if the externalTrafficPolicy field is set to Local, allowing direct access from outside the cluster.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.1.32",
       "Description": "Checks if Kubernetes clusters are not publicly accessible. The rule is NON_COMPLIANT if the service is exposed through a LoadBalancer type service or has a public IP assigned.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.1.33",
       "Description": "Checks if a Kubernetes cluster has 'NetworkPolicy' applied. The rule is NON_COMPLIANT if 'NetworkPolicy' is not enforced or if the configuration.networkPolicy field is 'false'.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.1.34",
       "Description": "Checks if Kubernetes services have network policies that block public access to sensitive endpoints. The rule is NON_COMPLIANT if network policies are not in place to restrict public access to these services.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_admission_hostport_containers"
       ],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.1.35",
       "Description": "Checks if the required Network Policies to restrict public access are configured at the cluster level. The rule is only NON_COMPLIANT when the specified NetworkPolicy settings do not match the desired configuration.",
-      "Name": "Kubernetes Network Policies",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes Network Policies"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.1.36",
       "Description": "Checks if the required network policies for pod security are configured at the namespace level. The rule is NON_COMPLIANT if the configuration item does not align with one or more settings from the defined policies (or default).",
-      "Name": "NetworkPolicy",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "NetworkPolicy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.1.37",
       "Description": "Checks if Kubernetes services are publicly accessible. The rule is NON_COMPLIANT if a Kubernetes service is not listed in the excludedPublicServices parameter and service type is LoadBalancer or NodePort.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.1.38",
       "Description": "Checks if your Kubernetes Secrets do not allow public access. The rule checks the Secret's permissions (RBAC), the Namespace isolation, and the network policies.",
-      "Name": "Kubernetes Secrets",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_secret_access"
       ],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes Secrets"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "1.3.1.39",
       "Description": "Checks if your Kubernetes Persistent Volumes do not allow public write access by evaluating the access modes and appropriate role-based access control (RBAC) settings.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "1.3.1.40",
       "Description": "Checks if a Kubernetes Pod is running within a specific Namespace or within a list of approved Labels. The rule is NON_COMPLIANT if a Pod is not running within the specified Namespace or if its Labels are not included in the parameter list.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.1.41",
       "Description": "Checks if direct internet access is disabled for a Kubernetes pod. The rule is NON_COMPLIANT if a pod has an external access configuration or uses LoadBalancer type service.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.1.42",
       "Description": "Checks if a Kubernetes Service has an Endpoint for each corresponding Pod in the specified namespace. The rule is NON_COMPLIANT if a Kubernetes Service does not have an Endpoint created for its Pods.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.1.43",
       "Description": "Checks if there are unused network policies. The rule is COMPLIANT if each network policy is associated with a pod or service. The rule is NON_COMPLIANT if a network policy is not associated with a pod or service.",
-      "Name": "Kubernetes Networking",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes Networking"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.1.44",
       "Description": "Checks if DNS resolution between pods in different namespaces within the Kubernetes cluster is enabled. The rule is NON_COMPLIANT if DNS resolution between those pods is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.1.45",
       "Description": "Verifies that NetworkPolicies are configured to restrict unrestricted incoming traffic ('0.0.0.0/0' or '::/0') and only allow inbound TCP or UDP connections on specified ports. The rule is considered NON_COMPLIANT if any NetworkPolicy does not specify allowed ports.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.1.46",
       "Description": "Checks if both network policies in Kubernetes are in 'Active' status. The rule is NON_COMPLIANT if one or both network policies are not 'Active'.",
-      "Name": "Kubernetes Networking",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes Networking"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.1.47",
       "Description": "Checks if a Kubernetes Network Policy contains any ingress or egress rules. The policy is NON_COMPLIANT if there are no rules specified within the Network Policy.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.1.48",
       "Description": "Checks if a Kubernetes NetworkPolicy contains any ingress or egress rules. The policy is NON_COMPLIANT if no rules are present within the NetworkPolicy.",
-      "Name": "Kubernetes NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.1.49",
       "Description": "Checks whether a Kubernetes Ingress resource has any associated Ingress rules for routing traffic. This state is considered NON_COMPLIANT if the Ingress resource does not contain any Ingress rules.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.1.50",
       "Description": "Checks if a Kubernetes Network Policy has any ingress or egress rules. The policy is NON_COMPLIANT if there are no rules defined within the Network Policy.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.1.51",
       "Description": "Checks whether a Kubernetes NetworkPolicy contains at least one rule. This NetworkPolicy is COMPLIANT if it contains at least one rule, and NON_COMPLIANT otherwise.",
-      "Name": "Kubernetes NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.1.52",
       "Description": "Checks if a Kubernetes Network Policy exists within a namespace. The policy is NON_COMPLIANT if there are no Network Policies defined in the namespace.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.1: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.2.1",
       "Description": "Checks if a Kubernetes Ingress resource is using an associated NetworkPolicy to control access. The rule is NON_COMPLIANT if a NetworkPolicy is not used or if the used NetworkPolicy does not match the criteria specified in the rule parameter.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.2.2",
       "Description": "Checks if Kubernetes Services are of the type specified in the rule parameter serviceType. The rule returns NON_COMPLIANT if the Service does not match the endpoint type configured in the rule parameter.",
-      "Name": "Kubernetes Service",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes Service"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.2.3",
       "Description": "Verifies if a Kubernetes Ingress resource is configured with TLS settings. The status is NON_COMPLIANT if the Ingress does not have TLS defined, indicating that SSL certificates are not associated.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.2.4",
       "Description": "Checks if Kubernetes services are protected by Network Policies. The rule is NON_COMPLIANT for a Kubernetes service if it is not associated with a Network Policy.",
-      "Name": "Kubernetes Networking",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes Networking"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.2.5",
       "Description": "Checks if Kubernetes Ingress resources are associated with Network Policies. The rule is NON_COMPLIANT if an Ingress resource is not associated with a Network Policy that restricts traffic.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.2.6",
       "Description": "Checks if the TLS certificate associated with a Kubernetes Ingress resource is the default TLS certificate. The rule is NON_COMPLIANT if an Ingress resource uses the default TLS certificate.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.2.7",
       "Description": "Verifies if the Bitbucket source repository URL includes authentication credentials. The status is NON_COMPLIANT if the URL contains any credentials, otherwise it is COMPLIANT.",
-      "Name": "Bitbucket",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Bitbucket"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.2.8",
       "Description": "Checks if Kubernetes pods are running with public IP addresses. The rule is NON_COMPLIANT if the pod's service type is set to 'LoadBalancer' and an external IP is assigned.",
-      "Name": "Kubernetes Pods",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes Pods"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.2.9",
       "Description": "Checks if Kubernetes PersistentVolumeClaims (PVCs) are using publicly accessible storage classes. The rule is NON_COMPLIANT if any PVCs are using public storage classes that expose sensitive data.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "1.3.2.10",
       "Description": "Checks if the Kubernetes NetworkPolicy allows access for all clients. The rule is NON_COMPLIANT if 'allow All' is present and set to true.",
-      "Name": "Kubernetes NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.2.11",
       "Description": "Checks if the status of a Kubernetes deployment is AVAILABLE or NOT_AVAILABLE after the deployment execution on the cluster. The rule is compliant if the field status is AVAILABLE. For more information about deployments, see What is a deployment?.",
-      "Name": "Kubernetes Deployment",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes Deployment"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.2.12",
       "Description": "Checks if Kubernetes Cluster has 'AutoAcceptSharedAttachments' enabled for network routing. The rule is NON_COMPLIANT for a Cluster if 'AutoAcceptSharedAttachments' is set to 'enable'.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.2.13",
       "Description": "Checks if the Kubernetes API server endpoint is configured to be private and not publicly accessible. The rule is NON_COMPLIANT if the endpoint is accessible from the public internet.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.2.14",
       "Description": "Checks if Kubernetes pods are configured with a custom network policy. The rule is NON_COMPLIANT for a pod if it is using the default network policy.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.2.15",
       "Description": "Checks if Kubernetes OpenSearch deployments are within a Kubernetes cluster and not exposed through a public service. The rule is NON_COMPLIANT if an OpenSearch deployment is exposed via a LoadBalancer service type.",
-      "Name": "Kubernetes OpenSearch",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes OpenSearch"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.2.16",
       "Description": "Verifies if Kubernetes Ingress resources are configured with TLS settings that utilize certificates from a configured certificate manager, such as Cert-Manager. The rule is NON_COMPLIANT if at least 1 Ingress resource has at least 1 rule that is configured without a TLS certificate or is configured with a certificate that is not managed by the certificate manager.",
-      "Name": "Ingress Controller",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Ingress Controller"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.2.17",
       "Description": "Checks if the Kubernetes Ingress uses SSL certificates provided by a Certificate Manager. To use this rule, configure an Ingress resource with SSL or HTTPS settings. This rule is only applicable to Ingress resources. This rule does not check Services of type NodePort or ClusterIP.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.2.18",
       "Description": "Checks if a Kubernetes account has network policies configured to prevent public access. The rule is NON_COMPLIANT if any network policies allow traffic from outside the cluster or if services other than Port 22 are exposed without proper restrictions.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_admission_hostport_containers"
       ],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.2.19",
       "Description": "The Kubernetes equivalent of this rule involves creating a NetworkPolicy that restricts incoming SSH traffic (port 22) to pods, effectively disabling SSH access for incoming connections. The rule identifier is designed to prevent unauthorized access to the service running in the cluster.",
-      "Name": "NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.2.20",
       "Description": "The rule identifier (INSTANCES_IN_VPC) represents a specific rule for managing instances in a VPC, while the rule name (ec2-instances-in-vpc) provides a human-readable label for the same rule within a Kubernetes context. This can be associated with network policies or security groups managing pod communication within a cluster.",
-      "Name": "NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.2.21",
       "Description": "Checks if Kubernetes services are attached to authorized namespaces. The rule is NON_COMPLIANT if services are attached to unauthorized namespaces.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_namespace_lifecycle_plugin"
       ],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.2.22",
       "Description": "Checks if the Kubernetes Pod's NetworkPolicy prevents public access to the Pods. If the NetworkPolicy allows public access, it is considered NON_COMPLIANT.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.2.23",
       "Description": "Checks if a Kubernetes deployment is configured to run within a specified network policy. The rule is NON_COMPLIANT if the deployment is not using the appropriate network policy to restrict access to the cluster.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.2.24",
       "Description": "Checks if the Kubernetes NetworkPolicy allows unrestricted ingress traffic on ports 22 (SSH) and 3389 (RDP) from any source IP. The rule is NON_COMPLIANT if a NetworkPolicy permits ingress on these ports without restrictions.",
-      "Name": "NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.2.25",
       "Description": "Checks if a Kubernetes NetworkPolicy is configured with a user-defined action for fragmented packets. The rule is NON_COMPLIANT if the action for fragmented packets does not match the user-defined default action.",
-      "Name": "Kubernetes NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.2.26",
       "Description": "Verify if a Kubernetes NetworkPolicy is associated with at least one ingress or egress rule. The policy is NON_COMPLIANT if there are no ingress or egress rules defined, otherwise COMPLIANT if at least one rule exists.",
-      "Name": "Kubernetes NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.2.27",
       "Description": "Checks if a Kubernetes Network Policy contains ingress or egress rules. The policy is NON_COMPLIANT if there are no rules defined in the Network Policy.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.2.28",
       "Description": "Verifies if there are Kubernetes services with type LoadBalancer that expose ports to external traffic. The status is NON_COMPLIANT if a service allows unrestricted access (i.e., has '0.0.0.0/0' in its ingress rules) or if the service does not comply with the specified network policies.",
-      "Name": "Kubernetes Service",
+      "Name": "Core",
       "Checks": [
         "core_minimize_admission_hostport_containers"
       ],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes Service"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.2.29",
       "Description": "Checks if Kubernetes pods are running inside a Kubernetes cluster network (VPC equivalent). The rule is NON_COMPLIANT if a pod is exposed via a public IP address or LoadBalancer service type without appropriate network policies.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.2.30",
       "Description": "Checks if there are any Kubernetes NetworkPolicies that are not the default NetworkPolicy. The rule is NON_COMPLIANT if there are any NetworkPolicies that are not the default NetworkPolicy.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.2.31",
       "Description": "Checks if the Kubernetes Database (e.g., PostgreSQL, MySQL) instances are not publicly accessible. The rule is NON_COMPLIANT if the service type is LoadBalancer or Ingress and has an external IP.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.2.32",
       "Description": "Checks if Kubernetes clusters are not publicly accessible. The rule is NON_COMPLIANT if the service is exposed via a LoadBalancer type with an external IP address.",
-      "Name": "Kubernetes Cluster",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes Cluster"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.2.33",
       "Description": "Checks if a Kubernetes Cluster has 'Network Policy' enabled to restrict pod communication. The rule is NON_COMPLIANT if 'networkPolicy' is not enabled or if the Network Policy configuration field is 'false'.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.2.34",
       "Description": "Checks if Kubernetes Secrets have restrictive access control policies. The rule is NON_COMPLIANT if Secrets are not configured with appropriate role-based access controls (RBAC) to restrict access.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_secret_access"
       ],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "1.3.2.35",
       "Description": "Checks if the required network policies are configured at the namespace level. The rule is only NON_COMPLIANT when the network policies defined do not match the corresponding settings in the Kubernetes configuration.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.2.36",
       "Description": "Checks if the required network policies are configured at the namespace level. The rule is NON_COMPLIANT if the configuration item does not match one or more settings from parameters (or default).",
-      "Name": "Kubernetes Network Policies",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes Network Policies"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.2.37",
       "Description": "Checks if Kubernetes services are publicly accessible. The rule is NON_COMPLIANT if a Kubernetes service is not listed in the excludedPublicServices parameter and service type is LoadBalancer or NodePort.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.2.38",
       "Description": "Checks if your Kubernetes PersistentVolumeClaims do not allow public access. The rule verifies the access modes and any role-based access control (RBAC) policies applied to the persistent volumes.",
-      "Name": "Kubernetes Persistent Storage",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes Persistent Storage"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "1.3.2.39",
       "Description": "Checks if your Kubernetes Persistent Volume Claims (PVCs) do not allow public write access. The rule examines the access modes defined in the PVC, the associated Persistent Volumes (PVs), and the underlying StorageClass configurations to ensure they do not permit public write operations.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "1.3.2.40",
       "Description": "Checks if a Kubernetes pod is deployed within a specific namespace or within a list of approved network policies. The rule is NON_COMPLIANT if a pod is not deployed within the specified namespace or if the applied network policy does not match the approved list.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.2.41",
       "Description": "Checks if direct internet access is disabled for a Kubernetes Pod. The rule is NON_COMPLIANT if a Pod is configured with a public IP or can communicate with the internet directly.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.2.42",
       "Description": "Checks if a Kubernetes Service has an Endpoints object created for each defined Service. The rule is NON_COMPLIANT if a Kubernetes Service does not have an Endpoints object created.",
-      "Name": "Kubernetes Service",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes Service"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.2.43",
       "Description": "Checks if there are unused network policies in Kubernetes. The rule is COMPLIANT if each network policy is associated with a pod or namespace. The rule is NON_COMPLIANT if a network policy is not associated with a pod or namespace.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.2.44",
       "Description": "Checks if DNS resolution from Kubernetes cluster to private IP is enabled. The rule is NON_COMPLIANT if DNS resolution from Kubernetes cluster to private IP is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.2.45",
       "Description": "Checks if Network Policies or Security Groups in Kubernetes allow unrestricted incoming traffic ('0.0.0.0/0') only for TCP or UDP connections on authorized ports. The rule is NON_COMPLIANT if such policies or configurations do not restrict to specified ports.",
-      "Name": "Network Policies",
+      "Name": "Core",
       "Checks": [
         "core_minimize_admission_hostport_containers"
       ],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Network Policies"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.2.46",
       "Description": "Verifies if both Kubernetes cluster nodes in a specified node pool are in Ready status. The rule is NON_COMPLIANT if one or more nodes are in NotReady status.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.2.47",
       "Description": "Checks if a Kubernetes Network Policy contains any ingress or egress rules. The policy is NON_COMPLIANT if there are no rules defined within the Network Policy.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.2.48",
       "Description": "Checks if a Kubernetes NetworkPolicy contains any ingress or egress rules. The NetworkPolicy is NON_COMPLIANT if no ingress or egress rules are present.",
-      "Name": "NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.2.49",
       "Description": "Checks whether a Kubernetes Network Policy contains any ingress or egress rules. This policy is NON_COMPLIANT if a Network Policy does not contain any ingress or egress rules.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.2.50",
       "Description": "Checks if the Network Policies in the Kubernetes cluster contain any ingress or egress rules. The policy is marked NON_COMPLIANT if there are no rules present within a Network Policy.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.3.2.51",
       "Description": "Checks whether the Kubernetes NetworkPolicy includes at least one ingress or egress rule. This policy is COMPLIANT if it contains at least one rule and NON_COMPLIANT otherwise.",
-      "Name": "Kubernetes NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.3.2.52",
       "Description": "Checks if a Kubernetes NetworkPolicy contains any ingress or egress rules. The policy is NON_COMPLIANT if there are no ingress or egress rules defined within the NetworkPolicy.",
-      "Name": "Kubernetes NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.3.2: Network access to and from the cardholder data environment is restricted.",
-          "Service": "Kubernetes NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.4.1.1",
       "Description": "Checks if a Kubernetes Ingress resource is using an NGINX Ingress Controller with a specified set of annotations for WAF rules. The rule is NON_COMPLIANT if an Ingress resource does not use the specified NGINX Ingress Controller or if the associated WAF settings do not match those defined in the rule parameters.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.1: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.4.1.2",
       "Description": "Checks if Kubernetes Services are of the type specified in the rule parameter serviceType. The rule returns NON_COMPLIANT if the Service does not match the service type configured in the rule parameter.",
-      "Name": "Kubernetes Service",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.1: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes Service"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.1.3",
       "Description": "Checks if Kubernetes clusters are configured with a custom network policy. The rule is NON_COMPLIANT for a Kubernetes deployment if it is using the default network policy.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "1.4.1: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.1.4",
       "Description": "The rule identifier INSTANCES_IN_VPC and rule name ec2-instances-in-vpc represent configurations that allow EC2 instances within a specific Virtual Private Cloud (VPC) to communicate with each other. In Kubernetes, a similar concept entails configuring network policies that control traffic between pods within a namespace or cluster, ensuring that only authorized communications are permitted.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.1: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.1.5",
       "Description": "Checks if network policies are enforced for authorized namespaces in Kubernetes. The rule is NON_COMPLIANT if network policies are applied to unauthorized namespaces.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "1.4.1: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.1.6",
       "Description": "Check if there are public routes in the route table in Kubernetes. The rule is NON_COMPLIANT if there is an ingress rule allowing traffic to pod IPs or services exposed to the internet with a target CIDR block of '0.0.0.0/0' or if the ingress rule does not match the specified parameters.",
-      "Name": "Kubernetes Networking",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.1: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes Networking"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.1.7",
       "Description": "Checks if Kubernetes cluster has network policies enabled. The rule is NON_COMPLIANT if network policies are not enabled or if any namespace does not have at least one network policy configured.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "1.4.1: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.1.8",
       "Description": "Checks if a Kubernetes Pod is deployed within a specified namespace or within a list of approved labels. The rule is NON_COMPLIANT if a Pod is not deployed within the specified namespace or if its labels do not match the approved list.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.1: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.1.9",
       "Description": "Verifies that DNS resolution is enabled for services within the Kubernetes cluster and that pods can resolve private IPs appropriately. The rule is NON_COMPLIANT if DNS resolution from a pod in one namespace to a service in another namespace using private IP addresses is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.1: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.1.10",
       "Description": "Checks if both Kubernetes network connections (e.g., ingress controllers or service mesh tunnels) are healthy and operational. The rule is NON_COMPLIANT if one or both connections report an unhealthy status.",
-      "Name": "Kubernetes Networking",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.1: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes Networking"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.2.1",
       "Description": "Checks if a Kubernetes Ingress resource is using a configured Network Policy. The rule is NON_COMPLIANT if no Network Policy is applied to the Ingress or if the applied Network Policy does not match the expected configuration defined in the rule parameters.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.4.2.2",
       "Description": "Checks if Kubernetes Services are of the type specified in the rule parameter serviceType. The rule returns NON_COMPLIANT if the Service does not match the type configured in the rule parameter.",
-      "Name": "Kubernetes Service",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes Service"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.2.3",
       "Description": "Checks if a Kubernetes Ingress resource has an associated TLS secret. The rule is NON_COMPLIANT if the Ingress does not have a defined TLS configuration.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.4.2.4",
       "Description": "Checks if Kubernetes APIs are associated with Network Policies. The rule is NON_COMPLIANT for a Kubernetes API if it is not associated with a Network Policy.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.2.5",
       "Description": "Checks if Kubernetes Ingress resources are associated with a Network Policy. The rule is NON_COMPLIANT if an Ingress resource is not associated with any Network Policy.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.2.6",
       "Description": "Checks if the certificate associated with a Kubernetes Ingress resource is the default SSL certificate. The rule is NON_COMPLIANT if an Ingress resource uses the default SSL certificate instead of a custom one.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.4.2.7",
       "Description": "Checks if the Bitbucket source repository URL contains sign-in credentials or not. The rule is NON_COMPLIANT if the URL contains any sign-in information and COMPLIANT if it doesn't.",
-      "Name": "Bitbucket",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Bitbucket"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.2.8",
       "Description": "Checks if Kubernetes services are exposed to the public. The rule is NON_COMPLIANT if the service type is set to LoadBalancer and it has an external IP address.",
-      "Name": "Kubernetes Service",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes Service"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.4.2.9",
       "Description": "Checks if Kubernetes persistent volume snapshots are public. The rule is NON_COMPLIANT if any Kubernetes persistent volume snapshots are public.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.2.10",
       "Description": "Checks if the Kubernetes NetworkPolicy allows all Pods to communicate with each other. The policy is NON_COMPLIANT if 'allowAll' is present and set to true.",
-      "Name": "Kubernetes NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
@@ -2409,78 +2409,66 @@
     {
       "Id": "1.4.2.12",
       "Description": "Checks if Kubernetes Network Policies have 'Ingress' rules set to allow traffic from specific namespaces. The rule is NON_COMPLIANT for a Network Policy if 'Ingress' rules allow traffic from any source.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.2.13",
       "Description": "Checks if the Kubernetes API server endpoint is not publicly accessible. The rule is NON_COMPLIANT if the endpoint is publicly accessible.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.4.2.14",
       "Description": "Checks if Kubernetes clusters are running in a private network. The rule is NON_COMPLIANT if a Kubernetes service has a public IP address exposed.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.2.15",
       "Description": "Checks if Kubernetes Ingress resources are configured to use TLS certificates from a trusted certificate provider (like Cert Manager). This rule is NON_COMPLIANT if at least 1 Ingress resource has at least 1 HTTPS entry that is configured without a TLS certificate or is configured with a certificate not issued by a trusted certificate authority.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Ingress"
-        }
-      ]
-    },
-    {
-      "Id": "1.4.2.16",
-      "Description": "Checks if the Ingress Controllers in Kubernetes use SSL certificates provided by a certificate manager such as cert-manager or AWS Certificate Manager. To use this rule, ensure that Ingress resources are configured with HTTPS routes. This rule is applicable to Ingress Controllers and does not check for LoadBalancer services without an Ingress configuration.",
-      "Name": "Ingress Controller",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Ingress Controller"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.4.2.17",
       "Description": "Checks if an account in Kubernetes has network policies that restrict public access. The rule is NON_COMPLIANT if AllowAllIngress is true, or if true, ports other than Port 22 are listed in IngressRules.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
@@ -2499,98 +2487,98 @@
     {
       "Id": "1.4.2.19",
       "Description": "Checks if Kubernetes Ingress Controllers are attached to an authorized namespace. The rule is NON_COMPLIANT if Ingress Controllers are attached to an unauthorized namespace.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.2.20",
       "Description": "Checks if the Kubernetes Pod Security Policy attached to the Pod resource prohibits public access. If the Pod Security Policy allows public access it is NON_COMPLIANT.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.2.21",
       "Description": "Checks if a Kubernetes Pod is allowed access to a virtual private cloud (VPC). The rule is NON_COMPLIANT if the Pod does not specify a VPC network (using the appropriate CNI plugin).",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.2.22",
       "Description": "Checks if Kubernetes network policies allow unrestricted ingress traffic for SSH (port 22) and RDP (port 3389) to the specified pods. The rule is NON_COMPLIANT if a network policy does not restrict ingress traffic from certain CIDR blocks for these ports.",
-      "Name": "Kubernetes Network Policies",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes Network Policies"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.4.2.23",
       "Description": "Checks if a Kubernetes NetworkPolicy is configured with a user-defined ingress or egress rule that includes specific handling of fragmented packets. The rule is NON_COMPLIANT if the handling of fragmented packets does not match the user-defined rule.",
-      "Name": "Kubernetes NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.4.2.24",
       "Description": "Check if a Kubernetes Network Policy is associated with PodSelectors that define stateful or stateless traffic rules. This rule is NON_COMPLIANT if no PodSelectors are defined for the Network Policy, otherwise it is COMPLIANT if any PodSelector exists.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.2.25",
       "Description": "Checks if a Kubernetes NetworkPolicy contains ingress or egress rules. The policy is NON_COMPLIANT if there are no rules defined in a NetworkPolicy.",
-      "Name": "Kubernetes NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.4.2.26",
       "Description": "Checks for public routes in the Kubernetes network configuration. The rule is NON_COMPLIANT if a service is exposed to the internet with a LoadBalancer or NodePort type that allows access to all IP ranges (0.0.0.0/0 or ::/0) without restrictions on CIDR blocks.",
-      "Name": "Kubernetes Networking",
+      "Name": "Core",
       "Checks": [
         "core_minimize_admission_hostport_containers"
       ],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes Networking"
+          "Service": "Core"
         }
       ]
     },
@@ -2609,4228 +2597,3886 @@
     {
       "Id": "1.4.2.28",
       "Description": "Checks if there are any Kubernetes Network Policies that are not the default Network Policy. The rule is NON_COMPLIANT if there are any Network Policies that are not the default Network Policy.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.2.29",
       "Description": "Checks if the Kubernetes databases are not publicly accessible. The rule is NON_COMPLIANT if the service is exposed through a LoadBalancer type or NodePort type which allows external traffic.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.2.30",
       "Description": "Checks if Kubernetes clusters are not publicly accessible. The rule is NON_COMPLIANT if the externalIPs field is set in the Service configuration.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.4.2.31",
       "Description": "Checks if a Kubernetes cluster has the NetworkPolicy enabled for enhanced security. The rule is NON_COMPLIANT if NetworkPolicy is not enabled or if there are no defined ingress/egress rules that enforce strict network traffic controls.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.2.32",
       "Description": "Checks if Kubernetes Services have `spec.type` set to `ClusterIP` to restrict external access. The rule is NON_COMPLIANT if `spec.type` is set to `NodePort` or `LoadBalancer`, allowing external access.",
-      "Name": "Kubernetes Service",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes Service"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.4.2.33",
       "Description": "Checks if the required NetworkPolicy settings for public access are configured at the namespace level in Kubernetes. The rule is only NON_COMPLIANT when the NetworkPolicy does not restrict traffic accordingly to the desired configuration.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.2.34",
       "Description": "Verifies that the necessary Kubernetes Network Policy measures are enforced at the cluster level. The rule is NON_COMPLIANT if the network policies do not align with the specified requirements or defaults.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.2.35",
       "Description": "Checks if Kubernetes ConfigMaps and Secrets are publicly accessible. The rule is NON_COMPLIANT if a ConfigMap or Secret is not listed in the excludedPublicConfigMaps and excludedPublicSecrets parameters and is exposed through a public service.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_secret_access"
       ],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "1.4.2.36",
       "Description": "Checks if your Kubernetes Pods do not allow unauthorized access by verifying Network Policies, Pod Security Policies, and Role-Based Access Control (RBAC) settings.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pod_creation_access"
       ],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "1.4.2.37",
       "Description": "Checks if your Kubernetes Persistent Volumes do not allow public write access. The rule checks the Volume Permissions, StorageClass settings, and Role-Based Access Control (RBAC) configurations.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "1.4.2.38",
       "Description": "Checks if a Kubernetes pod is deployed in a specific namespace and if its node is part of an approved node pool. The rule is NON_COMPLIANT if a pod is not deployed within the specified namespace or if its node is not included in the parameter list of approved node pools.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.2.39",
       "Description": "Checks if direct internet access is disabled for a Kubernetes pod. The rule is NON_COMPLIANT if a pod is internet-enabled (i.e., has an external IP or is not using a NetworkPolicy to restrict internet access).",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.2.40",
       "Description": "Checks if Kubernetes Endpoints for the service specified are created for each namespace. The rule is NON_COMPLIANT if a namespace doesn't have an Endpoint created for the specified service.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.2.41",
       "Description": "Checks if there are unused network policies. The rule is COMPLIANT if each network policy is associated with a pod or namespace. The rule is NON_COMPLIANT if a network policy is not associated with a pod or namespace.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.2.42",
       "Description": "Checks if DNS resolution from the Kubernetes pod network to the service's private IP is enabled. The rule is NON_COMPLIANT if DNS resolution from the pod network to the service's private IP is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.2.43",
       "Description": "Validates that Kubernetes NetworkPolicies permit only specific ingress traffic, disallowing unrestricted access ('0.0.0.0/0' or '::/0') and restricting allowed protocols (TCP or UDP) to defined ports. A NetworkPolicy is deemed NON_COMPLIANT if it allows access on ports that are not specified in the policy criteria.",
-      "Name": "Kubernetes NetworkPolicy",
+      "Name": "Core",
       "Checks": [
         "core_minimize_admission_hostport_containers"
       ],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes NetworkPolicy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.2.44",
       "Description": "Checks if both Kubernetes network interfaces (e.g., pod network and service network) are operational. The rule is NON_COMPLIANT if one or both interfaces are not responding.",
-      "Name": "Kubernetes Networking",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes Networking"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.2.45",
       "Description": "Checks if a Kubernetes Network Policy contains any ingress or egress rules. The policy is NON_COMPLIANT if there are no rules present within the policy.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.2.46",
       "Description": "Checks if a Kubernetes Network Policy defines any ingress or egress rules. The policy is NON_COMPLIANT if no rules are present within the Network Policy.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.2.47",
       "Description": "Checks whether a Kubernetes NetworkPolicy contains any ingress or egress rules. This policy is NON_COMPLIANT if a NetworkPolicy does not contain any rules.",
-      "Name": "Kubernetes NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.4.2.48",
       "Description": "Checks if Kubernetes Network Policies contain any rules. The policy is NON_COMPLIANT if there are no rules present within a Kubernetes Network Policy.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.2.49",
       "Description": "Checks whether an Ingress resource in Kubernetes has defined annotations for security policies. This Ingress is COMPLIANT if it includes at least one security policy annotation and NON_COMPLIANT otherwise.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.4.2.50",
       "Description": "Checks if a Kubernetes Network Policy is defined for a namespace. The policy is NON_COMPLIANT if there are no Network Policies present within the namespace.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.2: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.3.1",
       "Description": "Checks if a Kubernetes NetworkPolicy is configured with a user-defined default action for fragmented packets. The rule is NON_COMPLIANT if the default action for fragmented packets does not match the user-defined default action.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.3: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.3.2",
       "Description": "Checks if a Kubernetes Network Policy is configured with a user-defined default action for ingress and egress traffic. This rule is NON_COMPLIANT if the default action for traffic does not match the user-defined default action.",
-      "Name": "Kubernetes Network Policies",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.3: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes Network Policies"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.4.3.3",
       "Description": "Check Kubernetes NetworkPolicy is defined with at least one ingress or egress rule. This rule is NON_COMPLIANT if no ingress or egress rules are included in the NetworkPolicy else COMPLIANT if any one of the rules exists.",
-      "Name": "Kubernetes NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.3: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.4.4.1",
       "Description": "Checks if a Kubernetes Ingress resource is using a specific NetworkPolicy. The rule is NON_COMPLIANT if a NetworkPolicy is not applied to the Ingress or if the applied NetworkPolicy does not match the specified criteria.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.4: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.4.2",
       "Description": "Checks if Kubernetes Ingress resources are configured with the specified type in the rule parameter. The rule returns NON_COMPLIANT if the Ingress resource does not match the specified configuration type set in the rule parameter.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.4: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.4.4.3",
       "Description": "Checks if Kubernetes clusters are configured with a custom network policy. The rule is NON_COMPLIANT for a Kubernetes cluster if it is using the default network policy.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "1.4.4: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.4.4",
       "Description": "Kubernetes equivalent for managing instances within a specific pod network, ensuring that the pods communicate internally while restricting external access.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.4: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.4.5",
       "Description": "Checks if ingress or egress network policies are attached to an authorized Kubernetes namespace. The rule is NON_COMPLIANT if network policies are attached to an unauthorized namespace.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "1.4.4: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.4.6",
       "Description": "Checks if there are public ingress rules in the Kubernetes NetworkPolicy that allow traffic from external sources. The rule is NON_COMPLIANT if a NetworkPolicy allows traffic from any external IP address (e.g., 0.0.0.0/0) or if an ingress rule does not match the specified allowed source CIDR blocks.",
-      "Name": "Kubernetes Networking",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.4: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes Networking"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.4.7",
       "Description": "Checks if a Kubernetes cluster has network policies implemented. The rule is NON_COMPLIANT if network policies are not defined or if the policies.allowIngress field is 'false'.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_admission_hostport_containers"
       ],
       "Attributes": [
         {
           "Section": "1.4.4: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.4.8",
       "Description": "Checks if a Kubernetes pod is deployed within a specific namespace or within a list of approved labels. The rule is NON_COMPLIANT if a pod is not deployed within the specified namespace or if its labels are not included in the parameter list.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.4: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.4.9",
       "Description": "Verifies whether DNS resolution between the accepter/requester VPC and private IP is enabled in Kubernetes. The state is considered NON_COMPLIANT if DNS resolution from the specified VPC to the private IP is not enabled.",
-      "Name": "Kubernetes DNS",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.4: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes DNS"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.4.4.10",
       "Description": "Checks if both Kubernetes Network Policies associated with the pod are in ENFORCED status. The rule is NON_COMPLIANT if one or both policies are in DISABLED status.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.4.4: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.5.1",
       "Description": "Checks if Kubernetes Pods are configured to use public IP addresses for their Network Interfaces. The rule is NON_COMPLIANT if the default Pod specification has at least 1 Network Interface with 'hostNetwork' set to 'true'.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "1.4.5: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.4.5.2",
       "Description": "Checks if Kubernetes Pods are configured to share the host's process namespace. The rule is NON_COMPLIANT if the hostPID parameter is set to 'true'.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostPID_containers"
       ],
       "Attributes": [
         {
           "Section": "1.4.5: Network connections between trusted and untrusted networks are controlled.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.5.1.1",
       "Description": "Checks if Kubernetes Services are of the type specified in the rule parameter serviceType. The rule returns NON_COMPLIANT if the Service does not match the type configured in the rule parameter.",
-      "Name": "Kubernetes Services",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes Services"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.5.1.2",
       "Description": "Checks if a Kubernetes Ingress resource has TLS configuration. The rule is NON_COMPLIANT if the Ingress does not have an associated TLS secret for HTTPS.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.5.1.3",
       "Description": "Checks if Kubernetes Services are associated with Network Policies. The rule is NON_COMPLIANT for a Kubernetes Service if it is not associated with a Network Policy.",
-      "Name": "Kubernetes Service",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes Service"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.5.1.4",
       "Description": "Checks if Kubernetes Ingress resources are associated with a network policy. The rule is NON_COMPLIANT if an Ingress resource is not associated with a network policy.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.5.1.5",
       "Description": "Checks if the TLS certificate associated with a Kubernetes Ingress resource is the default certificate. The rule is NON_COMPLIANT if an Ingress uses the default TLS certificate.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.5.1.6",
       "Description": "Checks if the Bitbucket source repository URL contains sign-in credentials. The status is NON_COMPLIANT if the URL contains any sign-in information and COMPLIANT if it doesn't.",
-      "Name": "Bitbucket",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Bitbucket"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.5.1.7",
       "Description": "Checks if Kubernetes services are of type LoadBalancer, as they can be publicly accessible. The rule is NON_COMPLIANT if the service type is LoadBalancer and it exposes the service to the public network.",
-      "Name": "Kubernetes Service",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes Service"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.5.1.8",
       "Description": "Checks if Kubernetes persistent volumes are public. The rule is NON_COMPLIANT if any persistent volumes are accessible publicly without appropriate security measures.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "1.5.1.9",
       "Description": "Checks if the Kubernetes Network Policy permits traffic for all pods in the selected namespace. The policy is NON_COMPLIANT if 'ingress' rules allow traffic from all sources.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.5.1.10",
       "Description": "Checks if the status of the Kubernetes Deployment is 'AVAILABLE' or 'UNAVAILABLE' after the deployment process. The deployment is compliant if the status is 'AVAILABLE'.",
-      "Name": "Kubernetes Deployment",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes Deployment"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.5.1.11",
       "Description": "Checks if Kubernetes Network Policies have 'allowExternal' enabled. The rule is NON_COMPLIANT for a Network Policy if 'allowExternal' is set to 'false'.",
-      "Name": "Kubernetes Network Policies",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes Network Policies"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.5.1.12",
       "Description": "Checks if the Kubernetes API server endpoint is not publicly accessible. The rule is NON_COMPLIANT if the endpoint is publicly accessible.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.5.1.13",
       "Description": "Checks if Kubernetes OpenSearch (Elasticsearch) instances are configured within a Kubernetes cluster. The rule is NON_COMPLIANT if an OpenSearch Service instance is exposed outside of the cluster.",
-      "Name": "Kubernetes OpenSearch (Elasticsearch)",
+      "Name": "Scheduler",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes OpenSearch (Elasticsearch)"
+          "Service": "Scheduler"
         }
       ]
     },
     {
       "Id": "1.5.1.14",
       "Description": "Checks if Ingress resources in Kubernetes have TLS configured with certificates from a trusted certificate provider. This rule is NON_COMPLIANT if at least 1 Ingress has at least 1 TLS secret that is either missing or uses a certificate not issued by a trusted Certificate Authority.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.5.1.15",
       "Description": "Checks if Kubernetes Ingress Resources are configured to use TLS certificates provided by a Certificate Manager. To use this rule, ensure that TLS configuration is present in your Ingress Resource. This rule is only applicable to Kubernetes Ingress Resources and does not check other service types such as ClusterIP or NodePort.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.5.1.16",
       "Description": "Checks if a Kubernetes cluster has network policies that restrict public access. The rule is NON_COMPLIANT if NetworkPolicySpec.PodSelector does not restrict access to specific pods, or if it allows traffic on ports other than the specified secure ports (e.g., Port 22).",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_admission_hostport_containers"
       ],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.5.1.17",
       "Description": "A Kubernetes Network Policy that restricts all incoming traffic to a pod, preventing SSH access from any external source, thus effectively disabling incoming SSH traffic.",
-      "Name": "NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.5.1.18",
       "Description": "Checks if network policies are applied to authorized namespaces in Kubernetes. The rule is NON_COMPLIANT if network policies are applied to unauthorized namespaces.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.5.1.19",
       "Description": "Checks if the Kubernetes PodSecurityPolicy attached to the Pod resource prohibits public access. If the PodSecurityPolicy allows public access, it is NON_COMPLIANT.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.5.1.20",
       "Description": "Checks if a Kubernetes Pod (representing a Lambda function) is allowed access to a Virtual Private Cloud (VPC). The rule is NON_COMPLIANT if the Pod is not configured to use a specific VPC network through Kubernetes Network Policies or specific annotations.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.5.1.21",
       "Description": "Checks if default ports for SSH/RDP ingress traffic for Kubernetes Network Policies are unrestricted. The rule is NON_COMPLIANT if a Network Policy allows an ingress traffic rule from any source CIDR block for ports 22 (SSH) or 3389 (RDP).",
-      "Name": "Kubernetes Network Policies",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes Network Policies"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.5.1.22",
       "Description": "Checks if a Kubernetes NetworkPolicy is configured with a user-defined action for fragmented packets. The rule is NON_COMPLIANT if the action for fragmented packets does not match the user-defined default action.",
-      "Name": "Kubernetes NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.5.1.23",
       "Description": "Check Kubernetes NetworkPolicy is associated with at least one ingress or egress rule. This rule is NON_COMPLIANT if no ingress or egress rules are associated with the NetworkPolicy else COMPLIANT if any one of the rule types exists.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.5.1.24",
       "Description": "Checks if a Kubernetes Network Policy contains ingress or egress rules. The policy is NON_COMPLIANT if there are no rules defined in the Network Policy.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.5.1.25",
       "Description": "Checks if there are public routes in the Kubernetes network configuration that allow external access. The rule is NON_COMPLIANT if a network policy allows all traffic to/from the pod(s) without restriction (similar to having a route to an IGW with a destination CIDR block of '0.0.0.0/0' or '::/0').",
-      "Name": "Kubernetes Networking",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes Networking"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.5.1.26",
       "Description": "Checks if Kubernetes clusters are deployed within a Virtual Private Cloud (VPC). The rule is NON_COMPLIANT if a Kubernetes service is exposed with a LoadBalancer type that allows public access.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.5.1.27",
       "Description": "Checks if there are any Kubernetes Network Policies that are not the default Network Policy. The rule is NON_COMPLIANT if there are any Network Policies that are not the default Network Policy.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.5.1.28",
       "Description": "Checks if the Kubernetes services are not exposed externally. The rule is NON_COMPLIANT if the type field of the service is set to 'LoadBalancer' or 'NodePort'.",
-      "Name": "Kubernetes Service",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes Service"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.5.1.29",
       "Description": "Checks if Kubernetes services are not publicly accessible. The rule is NON_COMPLIANT if the service type is 'LoadBalancer' or 'NodePort' allowing external access.",
-      "Name": "Kubernetes Service",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes Service"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.5.1.30",
       "Description": "Checks if Kubernetes services have network policies that prevent public access. The rule is NON_COMPLIANT if network policies are not configured to restrict public access to Kubernetes services.",
-      "Name": "Kubernetes Services",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes Services"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.5.1.31",
       "Description": "Verifies if the necessary public access settings for Kubernetes resources are configured at the cluster level. The status is marked as NON_COMPLIANT only when the specified security settings do not align with the expected configurations.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.5.1.32",
       "Description": "Verifies if the required network policies for ingress and egress traffic are configured for the Kubernetes cluster. The rule is NON_COMPLIANT if the network policy does not match one or more settings from parameters (or default).",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_admission_hostport_containers"
       ],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.5.1.33",
       "Description": "Checks if Kubernetes Services are publicly accessible. The rule is NON_COMPLIANT if a Service type is LoadBalancer or NodePort and not listed in the excludedServices parameter.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.5.1.34",
       "Description": "Checks if your Kubernetes Cluster does not allow public access to sensitive services. The rule checks the Network Policies, the Service type (such as LoadBalancer or NodePort), and the RBAC permissions.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.5.1.35",
       "Description": "Checks if your Kubernetes persistent volumes do not allow public write access. The rule checks the PersistentVolumeClaim settings, the storage class, and the access modes of the persistent volumes.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "1.5.1.36",
       "Description": "Checks if a Kubernetes pod is deployed within a specific namespace or within a list of approved namespaces. The rule is NON_COMPLIANT if a pod is not deployed within the designated namespace or if its namespace is not included in the parameter list.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.5.1.37",
       "Description": "Checks if direct internet access is disabled for a Kubernetes pod. The rule is NON_COMPLIANT if the pod has an outgoing IP address allowing internet access.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.5.1.38",
       "Description": "Checks if a Kubernetes Service has Endpoints created for each associated Pod within the specified namespace. The state is NON_COMPLIANT if any Pod associated with the Kubernetes Service does not have an Endpoint created.",
-      "Name": "Kubernetes Service",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes Service"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.5.1.39",
       "Description": "Checks if there are unused Network Policies. The rule is COMPLIANT if each Network Policy is associated with a Pod. The rule is NON_COMPLIANT if a Network Policy is not associated with a Pod.",
-      "Name": "Networking",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Networking"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.5.1.40",
       "Description": "Verifies Kubernetes NetworkPolicies to ensure that unrestricted ingress connections (from '0.0.0.0/0') only allow inbound TCP or UDP traffic on specified ports. NetworkPolicies are considered NON_COMPLIANT if they do not define allowed ports in their specifications.",
-      "Name": "Kubernetes NetworkPolicies",
+      "Name": "Core",
       "Checks": [
         "core_minimize_admission_hostport_containers"
       ],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes NetworkPolicies"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.5.1.41",
       "Description": "Checks if a Kubernetes NetworkPolicy contains any ingress or egress rules. The policy is NON_COMPLIANT if there are no rules present within the NetworkPolicy.",
-      "Name": "Kubernetes NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.5.1.42",
       "Description": "Checks if a Kubernetes NetworkPolicy contains any ingress or egress rules. The NetworkPolicy is NON_COMPLIANT if no rules are defined within it.",
-      "Name": "Kubernetes NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "1.5.1.43",
       "Description": "Checks whether a Kubernetes NetworkPolicy contains any ingress or egress rules. This rule is NON_COMPLIANT if a NetworkPolicy does not contain any ingress or egress rules.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.5.1.44",
       "Description": "Checks if Kubernetes Network Policies contain any rules. The rule is NON_COMPLIANT if there are no rules present within a Kubernetes Network Policy.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.5.1.45",
       "Description": "Checks whether the Kubernetes Network Policy contains ingress or egress rules. This Network Policy is COMPLIANT if it defines at least one ingress or egress rule and NON_COMPLIANT otherwise.",
-      "Name": "Kubernetes Networking",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes Networking"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "1.5.1.46",
       "Description": "Checks if a Kubernetes NetworkPolicy contains any ingress or egress rules. The rule is NON_COMPLIANT if there are no ingress or egress rules present within a NetworkPolicy.",
-      "Name": "Kubernetes NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "1.5.1: Risks to the CDE from computing devices that are able to connect to both untrusted networks and the CDE are mitigated.",
-          "Service": "Kubernetes NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.1.1",
       "Description": "Checks if Kubernetes Ingress resources have access logging enabled. The rule is NON_COMPLIANT if 'accessLogSettings' is not present in Ingress configuration.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.1.2",
       "Description": "Checks if all methods in Kubernetes Ingress resources have access logs enabled. The rule is NON_COMPLIANT if access logging is not enabled, or if the logging level is neither ERROR nor INFO.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
-        }
-      ]
-    },
-    {
-      "Id": "10.2.1.1.3",
-      "Description": "Checks if Zephyr Tracing is enabled on Kubernetes Ingress Controllers. The rule is COMPLIANT if Zephyr Tracing is enabled and NON_COMPLIANT otherwise.",
-      "Name": "Kubernetes Ingress Controller",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.2.1.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress Controller"
-        }
-      ]
-    },
-    {
-      "Id": "10.2.1.1.4",
-      "Description": "Checks if an AWS AppSync API has logging enabled. The rule is NON_COMPLIANT if logging is not enabled, or 'fieldLogLevel' is neither ERROR nor ALL.",
-      "Name": "AWS AppSync",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.2.1.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "AWS AppSync"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.1.5",
       "Description": "Checks if Kubernetes Services are configured with the correct session affinity settings. The rule is NON_COMPLIANT if Service session affinity does not match the user-defined session affinity settings.",
-      "Name": "Kubernetes Service",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Service"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.1.6",
       "Description": "Checks if Kubernetes Ingress resources are configured to log access requests to a designated logging system. The rule is NON_COMPLIANT if an Ingress resource does not have logging configured.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.1.7",
       "Description": "Checks if at least one Kubernetes Audit Policy is logging events for all pods. The rule is NON_COMPLIANT if there are no audit policies or if no policies record pod events.",
-      "Name": "Kubernetes Audit",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Audit"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.1.8",
       "Description": "Checks if Kubernetes PodDisruptionBudgets (PDBs) have a policy configured for the desired states. Optionally verifies if any policies match a specified label selector. The rule is NON_COMPLIANT if there is no policy specified for the PDB or optional parameter.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "10.2.1.1.9",
-      "Description": "Checks if a Kubernetes resource type has a Prometheus alert for the named metric. For resource type, you can specify Pods, Deployments, StatefulSets, or Services. The rule is COMPLIANT if the named metric has a resource identifier and a corresponding Prometheus alert.",
-      "Name": "Kubernetes",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.2.1.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "10.2.1.1.10",
-      "Description": "The Kubernetes equivalent of monitoring for enabled CloudTrail in AWS can be likened to ensuring that auditing is enabled in the cluster, which tracks API calls and the actions performed on resources. This is critical for security and compliance purposes.",
-      "Name": "Kubernetes Audit Logging",
-      "Checks": [
-        "apiserver_audit_log_path_set"
-      ],
-      "Attributes": [
-        {
-          "Section": "10.2.1.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Audit Logging"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.1.11",
       "Description": "Checks if a Kubernetes Pod has at least one logging option enabled. The rule is NON_COMPLIANT if the status of all present logging configurations is set to 'DISABLED'.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.1.12",
       "Description": "Checks if logging is enabled with a valid severity level for Kubernetes Cluster events. The rule is NON_COMPLIANT if logging is not enabled or logging for cluster events has a severity level that is not valid.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.1.13",
       "Description": "Checks if a Kubernetes cluster has audit logging enabled. The rule is NON_COMPLIANT if the Kubernetes cluster does not have audit logging enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.1.14",
       "Description": "Checks if Kubernetes Cluster has audit logging enabled. The rule is NON_COMPLIANT if 'audit-log.enabled' is set to false.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.1.15",
       "Description": "Verifies whether the Kubernetes cluster has the necessary monitoring (such as Prometheus) enabled for its pods. The status is NON_COMPLIANT if monitoring is not properly configured.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.1.16",
       "Description": "Checks if log configuration is set on active Kubernetes Pods. This rule is NON_COMPLIANT if any active Pod does not have a valid logging configuration defined in its container specifications or if the logging configuration is null in at least one container definition.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.1.17",
       "Description": "Checks if a Kubernetes cluster is configured with logging enabled. The rule is NON_COMPLIANT if logging for Kubernetes clusters is not enabled for all log types such as API server logs, audit logs, and etcd logs.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.1.18",
       "Description": "Checks if Kubernetes Pods are configured to send logs to a logging backend (e.g., Fluentd, Elasticsearch, or similar). The rule is NON_COMPLIANT if the logging configuration is not set up correctly or disabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.1.19",
       "Description": "Checks if the Kubernetes Ingress resource has access logging enabled with specified S3 bucket for logs. The rule is NON_COMPLIANT if the log configuration is not set or bucket does not match the specified S3 bucket name.",
-      "Name": "Ingress Controller",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Ingress Controller"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.1.20",
       "Description": "Checks if Kubernetes brokers have audit logging enabled. The rule is NON_COMPLIANT if a broker does not have audit logging enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.1.21",
       "Description": "Checks if a Kubernetes pod has audit logging enabled. The rule is NON_COMPLIANT if the pod does not have audit logging enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.1.22",
       "Description": "In Kubernetes, a similar rule could be the requirement to enable audit logging across multiple Kubernetes clusters located in different regions to ensure comprehensive tracking of user activities and resource access.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.1.23",
       "Description": "Checks if a Kubernetes cluster has logging enabled for audit logs. The rule is NON_COMPLIANT if the Kubernetes cluster does not have audit logging enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.1.24",
       "Description": "Checks if Kubernetes Network Policies have logging enabled for traffic flow. The rule is NON_COMPLIANT if logging is not configured for any defined policy. You can specify which logging level or type you want the rule to check.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.1.25",
       "Description": "Checks if Kubernetes clusters have logging configured to send logs to an external logging service (e.g., Elasticsearch, Fluentd) for monitoring and auditing. The rule is NON_COMPLIANT if the clusters do not have log forwarding configured.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.1.26",
       "Description": "Checks if the respective logs of Kubernetes clusters are enabled. The rule is NON_COMPLIANT if any log types are not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.1.27",
       "Description": "Checks if Kubernetes clusters are logging audits to a specific logging service. The rule is NON_COMPLIANT if audit logging is not enabled for a Kubernetes cluster or if the 'logDestination' parameter is provided but the audit logging destination does not match.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.1.28",
       "Description": "Checks if Kubernetes clusters have the specified security settings. The rule is NON_COMPLIANT if the Kubernetes cluster is not using a configured network policy or if role-based access control (RBAC) is not properly enforced, or if audit logging is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.1.29",
       "Description": "Checks if DNS query logging is enabled for your Kubernetes cluster's CoreDNS. The rule is NON_COMPLIANT if DNS query logging is not enabled for your Kubernetes cluster's CoreDNS.",
-      "Name": "CoreDNS",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "CoreDNS"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.1.30",
       "Description": "Checks if logging is enabled for your Kubernetes Pods. The rule is NON_COMPLIANT if logging is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.1.31",
       "Description": "Checks if Kubernetes Pod Security Standards are enforced for a namespace. The rule is NON_COMPLIANT if Pod Security Standards are not enforced.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.1.32",
       "Description": "Checks if Kubernetes Event logging is enabled for the delivery status of events sent to a resource for the endpoints. The rule is NON_COMPLIANT if the delivery status notification for events is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.1.33",
       "Description": "Checks if Kubernetes Audit Logging is enabled. The rule is NON_COMPLIANT if an audit logging configuration is not present or the logging level does not meet the minimum required level.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.1.34",
       "Description": "Checks if Kubernetes network policies are applied and enforced for all namespaces. The rule is NON_COMPLIANT if network policies are not applied to at least one namespace.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.1.35",
       "Description": "Checks if logging is enabled on Kubernetes Ingress resources. The rule is NON_COMPLIANT if logging is enabled but the log output destination does not match the specified configuration.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.1.36",
       "Description": "Checks if the monitoring metrics collection on Kubernetes Network Policies is enabled. The rule is NON_COMPLIANT if the 'monitoringMetricsEnabled' field is set to false.",
-      "Name": "Kubernetes Network Policies",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Network Policies"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.1.37",
       "Description": "Checks if logging is enabled on Kubernetes Ingress resources. The rule is NON_COMPLIANT for an Ingress resource if it does not have logging enabled.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.2.1",
       "Description": "Checks if Kubernetes Ingress resources have access logging enabled. The rule is NON_COMPLIANT if 'accessLog' annotation is not present in the Ingress configuration.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.2.2",
       "Description": "Checks if all methods in Kubernetes Ingress have access logging enabled. The rule is NON_COMPLIANT if access logging is not enabled, or if logging level is neither ERROR nor INFO.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.2.3",
       "Description": "Checks if OpenTelemetry tracing is enabled on Kubernetes API services. The rule is COMPLIANT if OpenTelemetry tracing is enabled and NON_COMPLIANT otherwise.",
-      "Name": "Kubernetes API Services",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes API Services"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.2.4",
       "Description": "Checks if a Kubernetes API server has audit logging enabled. The rule is NON_COMPLIANT if audit logging is not enabled, or 'audit-log-path' is not set to a valid file path.",
-      "Name": "Kubernetes API Server",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes API Server"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.2.5",
       "Description": "Checks if Kubernetes Services are configured with appropriate session affinity settings. The rule is NON_COMPLIANT if the session affinity settings do not match the user defined criteria for session persistence.",
-      "Name": "Kubernetes Services",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Services"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.2.6",
       "Description": "Checks if Kubernetes Ingress resources are configured to log access to the backend services. The rule is NON_COMPLIANT if an Ingress resource does not have access logging enabled.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.2.7",
       "Description": "Checks if at least one Kubernetes Audit Policy is logging API requests for all pods and namespaces. The rule is NON_COMPLIANT if there are no policies or if policies do not record pod and namespace API requests.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "10.2.1.2.8",
-      "Description": "The rule identifier CLOUD_TRAIL_ENABLED is equivalent to the Kubernetes configuration where a specific resource or service is monitored to ensure that CloudTrail is enabled for audit logging and security compliance.",
-      "Name": "CloudTrail",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.2.1.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "CloudTrail"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.2.9",
       "Description": "Checks if a Kubernetes Pod has at least one logging mechanism enabled (such as stdout/stderr logging or integration with a logging sidecar). The rule is NON_COMPLIANT if the logging configurations are all set to 'DISABLED'.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.2.10",
       "Description": "Checks if logging is enabled with a valid severity level for Kubernetes pod events. The rule is NON_COMPLIANT if logging is not enabled or the logging severity level for pod events is not valid.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "10.2.1.2.11",
-      "Description": "Checks if a Kubernetes MongoDB instance has logging enabled for audit logs. The rule is NON_COMPLIANT if the MongoDB instance does not have logging enabled for audit logs.",
-      "Name": "Kubernetes",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.2.1.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.2.12",
       "Description": "Checks if a Kubernetes cluster has logging enabled for its pods. The rule is NON_COMPLIANT if the pod spec 'spec.containers[].logConfig.enabled' is set to false.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.2.13",
       "Description": "Checks if logging is configured for active Kubernetes Pods and their associated Container definitions. This rule is NON_COMPLIANT if an active Pod does not have logging configured or if the logging configuration is absent in at least one Container specification.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.2.14",
       "Description": "Checks if a Kubernetes cluster is configured with logging enabled. The rule is NON_COMPLIANT if logging for the Kubernetes cluster is not enabled for all log types, such as container logs, audit logs, and application logs.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.2.15",
       "Description": "Checks if Kubernetes pods are configured to send logs to a logging backend (such as Fluentd or Elasticsearch). The rule is NON_COMPLIANT if the logging configuration does not send logs appropriately.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.2.16",
       "Description": "Checks if the Kubernetes Ingress and Service resources have access logging enabled. The rule is NON_COMPLIANT if the access logging is not configured or does not point to the specified log storage location (like a specific S3 bucket or object storage equivalent).",
-      "Name": "Ingress Controller (e.g., NGINX Ingress Controller)",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Ingress Controller (e.g., NGINX Ingress Controller)"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.2.17",
       "Description": "Checks if Kubernetes clusters have audit logging enabled. The rule is NON_COMPLIANT if a cluster does not have audit logging enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.2.18",
       "Description": "Checks if a Kubernetes cluster has audit logging enabled. The rule is NON_COMPLIANT if the Kubernetes audit logging is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "10.2.1.2.19",
-      "Description": "The rule identifier MULTI_REGION_CLOUD_TRAIL_ENABLED is different from the rule name multi-region-cloudtrail-enabled.",
-      "Name": "Kubernetes",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.2.1.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.2.20",
       "Description": "Checks if a Kubernetes cluster has logging enabled for audit logs. The rule is NON_COMPLIANT if the Kubernetes cluster does not have logging enabled for audit logs.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.2.21",
       "Description": "Checks if Kubernetes Network Policies have logging enabled. The rule is NON_COMPLIANT if a logging type is not configured. You can specify which logging type you want the rule to check.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Network Policy"
-        }
-      ]
-    },
-    {
-      "Id": "10.2.1.2.22",
-      "Description": "Checks if Amazon Aurora MySQL-Compatible Edition clusters are configured to publish audit logs to Amazon CloudWatch Logs. The rule is NON_COMPLIANT if Aurora MySQL-Compatible Edition clusters do not have audit log publishing configured.",
-      "Name": "Amazon Aurora",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.2.1.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Amazon Aurora"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.2.23",
       "Description": "Checks if respective logs of Kubernetes Pods are enabled. The rule is NON_COMPLIANT if any log types are not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.2.24",
       "Description": "Checks if Kubernetes clusters are logging audit events to a specific logging service. The rule is NON_COMPLIANT if audit logging is not enabled for a Kubernetes cluster or if the 'auditLogDestination' parameter is provided but the audit logging destination does not match.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.2.25",
       "Description": "Checks if Kubernetes clusters have the specified settings. The rule is NON_COMPLIANT if the Kubernetes cluster is not using network policies, does not have role-based access control (RBAC) enabled, or if the cluster does not have audit logging enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.2.26",
       "Description": "Checks if DNS query logging is enabled for your Kubernetes DNS services. The rule is NON_COMPLIANT if DNS query logging is not enabled for your Kubernetes DNS services.",
-      "Name": "Kubernetes DNS",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes DNS"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.2.27",
       "Description": "Checks if logging is enabled for your Kubernetes clusters. The rule is NON_COMPLIANT if logging is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.2.28",
       "Description": "Checks if a Kubernetes pod has logging enabled. The rule is NON_COMPLIANT if a pod does not have logging enabled or the logging configuration is not at the minimum level provided.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.2.29",
       "Description": "Checks if Kubernetes Network Policies are defined and enforced for all namespaces. The rule is NON_COMPLIANT if network policies are not defined for at least one namespace.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.2.30",
       "Description": "Checks if logging is enabled on Kubernetes Ingress controllers. The rule is NON_COMPLIANT if logging is enabled but the logging destination does not match the expected configuration.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.2.31",
       "Description": "Checks if logging is enabled on Kubernetes Ingress resources. The rule is NON_COMPLIANT for an Ingress resource, if it does not have access logging enabled.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.3.1",
       "Description": "Checks if Kubernetes Ingress resources have access logging enabled. The rule is NON_COMPLIANT if 'accessLog' configuration is not specified in the Ingress resource.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.3: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.3.2",
       "Description": "Checks if all methods in Kubernetes Ingress resources have access logging enabled. The rule is NON_COMPLIANT if access logging is not enabled, or if the log level is neither ERROR nor INFO.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.3: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.3.3",
       "Description": "Checks if OpenTelemetry tracing is enabled on Kubernetes API services. The rule is COMPLIANT if OpenTelemetry tracing is enabled and NON_COMPLIANT otherwise.",
-      "Name": "Kubernetes API Services",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.3: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes API Services"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.3.4",
       "Description": "Checks if a Kubernetes Service has logging enabled. The rule is NON_COMPLIANT if logging is not enabled or if the log level is set to a value other than ERROR or ALL.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.3: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.3.5",
       "Description": "Checks if Kubernetes Services of type LoadBalancer are configured with a user-defined health check configuration. The rule is NON_COMPLIANT if the health check settings do not match the user-defined settings.",
-      "Name": "Kubernetes LoadBalancer Service",
+      "Name": "Scheduler",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.3: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes LoadBalancer Service"
+          "Service": "Scheduler"
         }
       ]
     },
     {
       "Id": "10.2.1.3.6",
       "Description": "Checks if Kubernetes Ingress resources are configured to log access traffic to a specified logging service. The rule is NON_COMPLIANT if an Ingress resource does not have access logging enabled.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.3: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.3.7",
       "Description": "Checks if at least one Kubernetes Audit Policy is configured to log data access events for all Pods. The rule is NON_COMPLIANT if there are no policies or if no policies record data access events.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.3: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "10.2.1.3.8",
-      "Description": "The Kubernetes equivalent for monitoring whether AWS CloudTrail is enabled, by checking if the relevant audit logging service is active in the cluster.",
-      "Name": "Kubernetes Audit Logging",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.2.1.3: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Audit Logging"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.3.9",
       "Description": "Checks if a Kubernetes Pod has at least one logging mechanism enabled. The rule is NON_COMPLIANT if all present logging configurations are set to 'DISABLED'.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.3: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.3.10",
       "Description": "Checks if logging is enabled with a valid severity level for Kubernetes pod events in a target namespace. The rule is NON_COMPLIANT if logging is not enabled or pod event logging of a target namespace has a severity level that is not valid.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.3: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.3.11",
       "Description": "Checks if a Kubernetes cluster has logging enabled via a logging agent (like Fluentd) to export logs to a monitoring service (like Elasticsearch or CloudWatch) for audit purposes. The rule is NON_COMPLIANT if the Kubernetes cluster does not have log export enabled for audit logs.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.3: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.3.12",
       "Description": "Checks if the Kubernetes cluster has logging enabled for its pods. The rule is NON_COMPLIANT if 'spec.containers.logging' is set to false.",
-      "Name": "Kubernetes Cluster",
+      "Name": "Kubelet",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.3: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Cluster"
+          "Service": "Kubelet"
         }
       ]
     },
     {
       "Id": "10.2.1.3.13",
       "Description": "Checks if log configuration is set on active Kubernetes Pods. This rule is NON_COMPLIANT if an active Pod does not have logging configuration defined in its specification or the value for the logging configuration is null in at least one container definition.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.3: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.3.14",
       "Description": "Checks if a Kubernetes cluster is configured with logging enabled. The rule is NON_COMPLIANT if logging for Kubernetes clusters is not enabled for all log types.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.3: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.3.15",
       "Description": "Checks if Kubernetes Pods are configured to send logs to a centralized logging solution (like Fluentd or Elasticsearch). The rule is NON_COMPLIANT if the logging configuration is not set to forward logs.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.3: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.3.16",
       "Description": "Checks if the Kubernetes Ingress and LoadBalancer services have logging enabled. The rule is NON_COMPLIANT if the ingress.annotations indicates logging is disabled or the configured log destination is not equal to the specified logging destination.",
-      "Name": "Ingress and LoadBalancer",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.3: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Ingress and LoadBalancer"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.3.17",
       "Description": "Checks if Kubernetes clusters have auditing enabled. The rule is NON_COMPLIANT if audit logging is not enabled in the cluster.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.3: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.3.18",
       "Description": "Checks if a Kubernetes cluster has audit logging enabled. The rule is NON_COMPLIANT if audit logging is not enabled for the Kubernetes API server.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.3: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "10.2.1.3.19",
-      "Description": "The equivalence in Kubernetes relates to the configuration for enabling multi-region auditing across a cloud environment, similar to how 'MULTI_REGION_CLOUD_TRAIL_ENABLED' is utilized in AWS for CloudTrail logging in multiple regions. In Kubernetes, this can be associated with logging and monitoring across multiple clusters or namespaces, which may use tools such as Fluentd or Elasticsearch.",
-      "Name": "Kubernetes Logging",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.2.1.3: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Logging"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.3.20",
       "Description": "Checks if a Kubernetes cluster has logging enabled and if logs are being exported to an external logging service like Elasticsearch or a similar service. The rule is NON_COMPLIANT if logging is not enabled or if logs are not exported.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.3: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.3.21",
       "Description": "Checks if Kubernetes Network Policies are configured with appropriate logging. The rule is NON_COMPLIANT if a logging mechanism is not configured for traffic flow monitoring.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.3: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Network Policy"
-        }
-      ]
-    },
-    {
-      "Id": "10.2.1.3.22",
-      "Description": "Checks if Amazon Aurora MySQL-Compatible Edition clusters in Kubernetes are configured to publish audit logs to a centralized logging solution such as Fluentd, ELK Stack, or similar. The rule is NON_COMPLIANT if Aurora MySQL-Compatible Edition clusters do not have audit log publishing configured.",
-      "Name": "Kubernetes",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.2.1.3: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.3.23",
       "Description": "Checks if respective logs of Kubernetes are enabled. The rule is NON_COMPLIANT if any log types are not enabled, such as audit logs or container logs.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.3: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.3.24",
       "Description": "Checks if Kubernetes clusters have audit logging configured to send logs to a specific log aggregation service. The rule is NON_COMPLIANT if audit logging is not enabled for a Kubernetes cluster or if the 'logAggregationService' parameter is provided but the audit logging destination does not match.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.3: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.3.25",
       "Description": "Checks if Kubernetes clusters have the specified settings. The rule is NON_COMPLIANT if the Kubernetes cluster is not using secrets for managing sensitive information or if the cluster does not have audit logging enabled.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_secret_access"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.3: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "10.2.1.3.26",
       "Description": "Checks if DNS query logging is enabled for your Kubernetes cluster's CoreDNS configuration. The rule is NON_COMPLIANT if DNS query logging is not enabled for CoreDNS.",
-      "Name": "CoreDNS",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.3: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "CoreDNS"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.3.27",
       "Description": "Checks if logging is enabled for your Kubernetes Pods. The rule is NON_COMPLIANT if logging is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.3: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.3.28",
       "Description": "Checks if a Kubernetes Job has logging enabled. The rule is NON_COMPLIANT if a Job does not have logging enabled or the logging configuration is not at the minimum level provided.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.3: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.3.29",
       "Description": "Checks if Kubernetes NetworkPolicy resources are defined and enforced for all namespaces. The rule is NON_COMPLIANT if NetworkPolicy is not defined for at least one namespace.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.3: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.3.30",
       "Description": "Checks if logging is enabled on Kubernetes Ingress resources. The rule is NON_COMPLIANT if the logging is enabled but the logging destination does not match the specified value.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.3: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.3.31",
       "Description": "Checks if logging is enabled on Kubernetes Ingress resources. The rule is NON_COMPLIANT for an Ingress resource if it does not have access logging enabled.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.3: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.4.1",
       "Description": "Checks if Kubernetes Ingress resources have access logging enabled. The rule is NON_COMPLIANT if 'accessLog' annotation is not present in the Ingress configuration.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.4: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.4.2",
       "Description": "Checks if all methods in Kubernetes Ingress resources have access logging enabled. The rule is NON_COMPLIANT if access logging is not enabled, or if logging level is neither ERROR nor INFO.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.4: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.4.3",
       "Description": "Checks if OpenTelemetry tracing is enabled on Kubernetes services that expose APIs. The rule is COMPLIANT if OpenTelemetry tracing is enabled, and NON_COMPLIANT otherwise.",
-      "Name": "Kubernetes Services",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.4: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Services"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.4.4",
       "Description": "Checks if a Kubernetes API server has audit logging enabled. The rule is NON_COMPLIANT if audit logging is not enabled, or if 'auditLogPath' is not set or is set to an invalid log level.",
-      "Name": "Kubernetes API Server",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.4: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes API Server"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.4.5",
       "Description": "Checks if Kubernetes Services of type LoadBalancer are configured with an appropriate externalTrafficPolicy. The rule is NON_COMPLIANT if the externalTrafficPolicy does not match the user-defined externalTrafficPolicy for preserving client source IP.",
-      "Name": "Kubernetes LoadBalancer Service",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.4: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes LoadBalancer Service"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.4.6",
       "Description": "Checks if Kubernetes Ingress resources are configured to log access to a specified logging service. The rule is NON_COMPLIANT if an Ingress resource does not have logging configured.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.4: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.4.7",
       "Description": "Checks if at least one Kubernetes Audit Policy is configured to log request and response data for all Pods in the cluster. The rule is NON_COMPLIANT if there are no audit policies or if none of the policies record Pod data events.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.4: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "10.2.1.4.8",
-      "Description": "In Kubernetes, the equivalent of monitoring and ensuring that a specific service (CloudTrail) is enabled corresponds to implementing an Admission Controller that enforces policy checks on resource creation and modification, ensuring that necessary logging and monitoring (like AWS CloudTrail) is active. In this case, the rule identifier is akin to a specific policy or validation check, while the rule name can be considered as a user-friendly label for that check.",
-      "Name": "Admission Controller",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.2.1.4: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Admission Controller"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.4.9",
       "Description": "Checks if a Kubernetes Pod's logging mechanism is properly configured. The rule is NON_COMPLIANT if all logging options (such as stdout/stderr or external logging solutions) are disabled.",
-      "Name": "Kubernetes Pod",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.4: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Pod"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.4.10",
       "Description": "Checks if logging is enabled with a valid severity level for Kubernetes events of a target pod. The rule is NON_COMPLIANT if logging is not enabled or if pod logging has a severity level that is not valid.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.4: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.4.11",
       "Description": "Checks if a Kubernetes cluster has the logging feature enabled for audit logs. The rule is NON_COMPLIANT if a Kubernetes cluster does not have logging enabled for audit logs.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.4: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.4.12",
       "Description": "Checks if Kubernetes Deployment has logging enabled for applications. The rule is NON_COMPLIANT if 'spec.template.spec.containers[0].env' does not contain a logging environment variable set to true.",
-      "Name": "Kubernetes Deployment",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.4: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Deployment"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.4.13",
       "Description": "Checks if logging is configured for active Kubernetes Pods. This rule is NON_COMPLIANT if an active Pod does not have logging configured or the logging configuration is null for at least one container within the Pod.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.4: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.4.14",
       "Description": "Checks if a Kubernetes cluster is configured with logging enabled. The rule is NON_COMPLIANT if logging for the Kubernetes cluster is not enabled for all log types, such as application logs, audit logs, and kubelet logs.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.4: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.4.15",
       "Description": "Checks if Kubernetes clusters are configured to send logs to a logging solution (such as Fluentd or Elasticsearch) via log aggregation. The rule is NON_COMPLIANT if the logging agent is not properly configured.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.4: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.4.16",
       "Description": "Checks if the Kubernetes Ingress has logging enabled. The rule is NON_COMPLIANT if the access logs are not directed to the specified log location or if the logging configuration is not enabled.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.4: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
-        }
-      ]
-    },
-    {
-      "Id": "10.2.1.4.17",
-      "Description": "Checks if Kafka brokers deployed in a Kubernetes cluster have logging enabled. The rule is NON_COMPLIANT if a broker does not have logging enabled.",
-      "Name": "Kafka",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.2.1.4: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kafka"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.4.18",
       "Description": "Checks if a Kubernetes cluster has audit logging enabled. The rule is NON_COMPLIANT if the cluster does not have audit logging enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.4: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "10.2.1.4.19",
-      "Description": "In Kubernetes, this rule indicates that a specific resource or controller must be configured to enable functionality across multiple regions, similar to Multi-Region CloudTrail in AWS, ensuring that events are captured from all regions in a centralized manner.",
-      "Name": "Kubernetes",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.2.1.4: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.4.20",
       "Description": "Checks if a Kubernetes cluster has logging enabled with a centralized logging solution, such as Elasticsearch, Fluentd, and Kibana (EFK) or Loki, for audit logs. The rule is NON_COMPLIANT if logging is not enabled for audit logs in the Kubernetes cluster.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.4: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.4.21",
       "Description": "Checks if the Kubernetes Network Policy logs are enabled. The rule is NON_COMPLIANT if logging is not configured for the specified Network Policy types.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.4: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.4.22",
       "Description": "Checks if Kubernetes clusters are configured to send audit logs to a logging service like Fluentd or ElasticSearch. The rule is NON_COMPLIANT if Kubernetes clusters do not have audit log publishing configured.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.4: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.4.23",
       "Description": "Checks if respective logs of Kubernetes are enabled. The rule is NON_COMPLIANT if any log types are not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.4: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "10.2.1.4.24",
-      "Description": "Checks if Amazon EKS clusters are logging audits to a specific cloud storage. The rule is NON_COMPLIANT if audit logging is not enabled for an EKS cluster or if the 'bucketNames' parameter is provided but the audit logging destination does not match.",
-      "Name": "Amazon EKS",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.2.1.4: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Amazon EKS"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.4.25",
       "Description": "Checks if Kubernetes clusters have the specified security settings. The rule is NON_COMPLIANT if the Kubernetes cluster does not have encryption enabled for secrets or uses an invalid encryption key, or if the cluster does not have auditing enabled.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_secret_access"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.4: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "10.2.1.4.26",
       "Description": "Checks if DNS query logging is enabled for your Kubernetes cluster's CoreDNS. The rule is NON_COMPLIANT if DNS query logging is not enabled for CoreDNS in the Kubernetes cluster.",
-      "Name": "CoreDNS",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.4: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "CoreDNS"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.4.27",
       "Description": "Checks if logging is enabled for your Kubernetes pods. The rule is NON_COMPLIANT if logging is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.4: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.4.28",
       "Description": "Checks if Kubernetes Pods have logging enabled. The rule is NON_COMPLIANT if a Pod does not have logging enabled or the logging configuration is not at the minimum level required.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.4: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.4.29",
       "Description": "Checks if Kubernetes network policies are enforced and configured for all namespaces. The rule is NON_COMPLIANT if network policies are not defined for at least one namespace.",
-      "Name": "Kubernetes Network Policies",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.4: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Network Policies"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.4.30",
       "Description": "Checks if logging is enabled on Kubernetes Ingress controllers. The rule is NON_COMPLIANT if logging is enabled but the logging destination does not match the expected configuration.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.4: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.4.31",
       "Description": "Checks if logging is enabled on Kubernetes Ingress resources. The rule is NON_COMPLIANT for an Ingress resource if it does not have access logging enabled.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.4: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.5.1",
       "Description": "Checks if Kubernetes Ingress resources have access logging enabled. The rule is NON_COMPLIANT if 'accessLogs' settings are not present in the Ingress configuration.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.5: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.5.2",
       "Description": "Checks if all methods in Kubernetes Ingress have access logging enabled. The rule is NON_COMPLIANT if access logging is not enabled, or if the log level is neither ERROR nor INFO.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.5: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.5.3",
       "Description": "Checks if OpenTelemetry tracing is enabled on Kubernetes Ingress resources. The rule is COMPLIANT if OpenTelemetry tracing is enabled and NON_COMPLIANT otherwise.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.5: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.5.4",
       "Description": "Checks if a Kubernetes API server has audit logging enabled. The rule is NON_COMPLIANT if audit logging is not enabled, or if 'logLevel' is neither 'Error' nor 'All'.",
-      "Name": "Kubernetes API Server",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.5: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes API Server"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.5.5",
       "Description": "Checks if Kubernetes Services are configured with a user-defined session affinity setting. The rule is NON_COMPLIANT if the service session affinity does not match the user-defined session affinity mode.",
-      "Name": "Kubernetes Service",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.5: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Service"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.5.6",
       "Description": "Checks if Kubernetes Ingress resources are configured to log requests to a specified logging service. The rule is NON_COMPLIANT if an Ingress resource does not have logging configured.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.5: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.5.7",
       "Description": "Checks if at least one Kubernetes audit policy is configured to log API requests for all namespaces. The rule is NON_COMPLIANT if there are no audit policies or if existing policies do not log API requests.",
-      "Name": "Kubernetes Audit",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.5: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Audit"
-        }
-      ]
-    },
-    {
-      "Id": "10.2.1.5.8",
-      "Description": "The rule identifier CLOUD_TRAIL_ENABLED corresponds to the rule name cloudtrail-enabled in Kubernetes, indicating that it is used to verify if AWS CloudTrail is enabled for monitoring and logging API calls.",
-      "Name": "AWS CloudTrail",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.2.1.5: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "AWS CloudTrail"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.5.9",
       "Description": "Checks if a Kubernetes Pod has at least one logging mechanism configured. The rule is NON_COMPLIANT if the status of all present logging configurations is set to 'DISABLED'.",
-      "Name": "Kubernetes Pod",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.5: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Pod"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.5.10",
       "Description": "Checks if logging is enabled with a valid severity level for Kubernetes Pod events. The rule is NON_COMPLIANT if logging is not enabled or Pod logging has a severity level that is not valid.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.5: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.5.11",
       "Description": "Checks if a Kubernetes cluster has logging enabled for audit logs. The rule is NON_COMPLIANT if a Kubernetes cluster does not have logging enabled for audit logs.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.5: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.5.12",
       "Description": "Checks if Kubernetes has client connection logging enabled for its API server. The rule is NON_COMPLIANT if the 'audit-log.enabled' setting is set to false.",
-      "Name": "Kubernetes API Server",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.5: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes API Server"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.5.13",
       "Description": "Checks if log settings are defined in active Kubernetes Pod specifications. This rule is NON_COMPLIANT if an active Pod does not have the logging configuration defined or the value for logging is null in at least one container definition.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.5: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.5.14",
       "Description": "Checks if a Kubernetes cluster is configured with logging enabled. The rule is NON_COMPLIANT if logging for the Kubernetes cluster is not enabled for all log types.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.5: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.5.15",
       "Description": "Checks if Kubernetes Pods are configured to send logs to a central logging solution (e.g., Fluentd, Elasticsearch, or others). The rule is NON_COMPLIANT if the logging agent is not deployed or configured incorrectly.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.5: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.5.16",
       "Description": "Checks if the Ingress Resource has access logging enabled. The rule is NON_COMPLIANT if the annotations for access logs are not set correctly or do not match the specified S3 bucket name.",
-      "Name": "Ingress Controller",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.5: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Ingress Controller"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.5.17",
       "Description": "Checks if Kubernetes clusters have audit logging enabled. The rule is NON_COMPLIANT if a cluster does not have audit logging enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.5: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.5.18",
       "Description": "Checks if a Kubernetes pod has audit logging enabled. The rule is NON_COMPLIANT if the pod does not have audit logging enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.5: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "10.2.1.5.19",
-      "Description": "The rule identifier is MULTI_REGION_CLOUD_TRAIL_ENABLED, while the rule name is represented as multi-region-cloudtrail-enabled, indicating a distinction between the two in resource management.",
-      "Name": "AWS CloudTrail",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.2.1.5: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "AWS CloudTrail"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.5.20",
       "Description": "Checks if a Kubernetes cluster has logging enabled for audit logs. The rule is NON_COMPLIANT if a Kubernetes cluster does not have audit log export enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.5: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.5.21",
       "Description": "Checks if Kubernetes Network Policies have logging enabled. The rule is NON_COMPLIANT if a logging type is not configured. You can specify which logging type you want the rule to check.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.5: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.5.22",
       "Description": "Checks if Kubernetes clusters are configured to log audit events to a logging solution. The rule is NON_COMPLIANT if Kubernetes clusters do not have audit logging configured.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.5: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.5.23",
       "Description": "Checks if the respective logs of Kubernetes pods are enabled. The rule is NON_COMPLIANT if any log settings for the pods are not configured correctly.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.5: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.5.24",
       "Description": "Checks if Kubernetes pods are logging audits to a specific logging service. The rule is NON_COMPLIANT if audit logging is not enabled for a pod or if the 'logDestination' parameter is provided but the logging destination does not match.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.5: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.5.25",
       "Description": "Checks if Kubernetes clusters have the specified settings. The rule is NON_COMPLIANT if the Kubernetes cluster is not encrypted or uses a different encryption key, or if the cluster does not have auditing enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.5: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.5.26",
       "Description": "Checks if DNS query logging is enabled for your Kubernetes cluster Ingress resources. The rule is NON_COMPLIANT if DNS query logging is not enabled for your Ingress resources.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.5: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.5.27",
       "Description": "Checks if logging is enabled for your Kubernetes cluster resources. The rule is NON_COMPLIANT if logging is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.5: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.5.28",
       "Description": "Checks if a Kubernetes Job has logging enabled. The rule is NON_COMPLIANT if a Job does not have logging enabled or the logging configuration is not at the minimum level provided.",
-      "Name": "Kubernetes Job",
+      "Name": "Kubelet",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.5: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Job"
+          "Service": "Kubelet"
         }
       ]
     },
     {
       "Id": "10.2.1.5.29",
       "Description": "Checks if Kubernetes Network Policies are configured and enforced for all namespaces. The rule is NON_COMPLIANT if network policies are not enforced for at least one namespace.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.5: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.5.30",
       "Description": "Checks if logging is enabled on Kubernetes Ingress resources. The rule is NON_COMPLIANT if the logging is enabled but the logging destination does not match the expected value.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.5: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.5.31",
       "Description": "Checks if logging is enabled on the Kubernetes Ingress resource. The Ingress is considered NON_COMPLIANT if it does not have logging enabled for traffic monitoring.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.5: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.6.1",
       "Description": "Checks if Kubernetes Ingress resources have access logging enabled. The rule is NON_COMPLIANT if 'access-log' annotation is not present in the Ingress configuration.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.6: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.6.2",
       "Description": "Checks if all methods in Kubernetes Ingress resources have access logging enabled. The rule is NON_COMPLIANT if access logging is not enabled, or if the log level is neither ERROR nor INFO.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.6: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.6.3",
       "Description": "Checks if OpenTelemetry tracing is enabled on Kubernetes Ingress resources. The rule is COMPLIANT if OpenTelemetry tracing is enabled and NON_COMPLIANT otherwise.",
-      "Name": "Ingress Controller",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.6: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Ingress Controller"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.6.4",
       "Description": "Checks if a Kubernetes API has logging enabled. The rule is NON_COMPLIANT if logging is not enabled, or if the log level is neither ERROR nor ALL.",
-      "Name": "Kubernetes API",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.6: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes API"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.6.5",
       "Description": "Checks if Kubernetes Services are configured with a specific Session Affinity setting. The rule is NON_COMPLIANT if the Service's Session Affinity does not match the user defined Session Affinity setting.",
-      "Name": "Kubernetes Service",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.6: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Service"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.6.6",
       "Description": "Checks if Kubernetes services have access logging configured to an external logging system. The rule is NON_COMPLIANT if a Kubernetes service does not have logging enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.6: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.6.7",
       "Description": "Checks if at least one Kubernetes Audit Policy is configured to record 'Read' events for all PersistentVolumeClaims (PVCs). The rule is NON_COMPLIANT if there are no Audit Policies that record 'Read' events for PVCs.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.6: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "10.2.1.6.8",
-      "Description": "The equivalence in Kubernetes for enabling CloudTrail in AWS is similar to ensuring that audit logging is enabled for security monitoring in Kubernetes. This can be achieved by configuring the audit logging settings in the Kubernetes API server.",
-      "Name": "Kubernetes",
-      "Checks": [
-        "apiserver_audit_log_path_set"
-      ],
-      "Attributes": [
-        {
-          "Section": "10.2.1.6: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "10.2.1.6.9",
       "Description": "Checks if a Kubernetes Pod has at least one logging mechanism enabled. The rule is NON_COMPLIANT if there are no logging configurations set for the Pod.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.6: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.6.10",
       "Description": "Checks if logging is enabled with a valid severity level for Kubernetes deployment events. The rule is NON_COMPLIANT if logging is not enabled or deployment logging has a severity level that is not valid.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.6: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.6.11",
       "Description": "Checks if a Kubernetes cluster has logging enabled for audit logs. The rule is NON_COMPLIANT if the Kubernetes cluster does not have logging enabled for audit logs.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.6: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.6.12",
       "Description": "Checks if the Kubernetes Cluster has logging enabled for client connections to the API server. The rule is NON_COMPLIANT if 'apiServer.clientConnectionLogging' is set to false.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.6: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.6.13",
       "Description": "Checks if the logging configuration is set on active Kubernetes Pod specifications. This rule is NON_COMPLIANT if an active Pod does not have a logging configuration defined or if the value for logging is null in at least one container specification.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.6: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.6.14",
       "Description": "Checks if a Kubernetes cluster is configured with logging enabled for all log types (e.g., audit logs, application logs). The rule is NON_COMPLIANT if logging is not enabled for all types in the cluster.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.6: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.6.15",
       "Description": "Checks if Kubernetes Pods are configured to send logs to a centralized logging service. The rule is NON_COMPLIANT if the value of 'log-driver' is not set to 'fluentd' or 'json-file'.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.6: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.6.16",
       "Description": "Checks if the Kubernetes Ingress and Service resources have logging enabled. The rule is NON_COMPLIANT if the access logs are not configured to store logs in a specified logging backend, or if the logging backend does not match the required configuration.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.6: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.6.17",
       "Description": "Checks if Kubernetes clusters have audit logging enabled. The rule is NON_COMPLIANT if a cluster does not have audit logging enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.6: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.6.18",
       "Description": "Checks if a Kubernetes pod has audit logging enabled. The rule is NON_COMPLIANT if the pod does not have audit logging enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.6: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "10.2.1.6.19",
-      "Description": "The rule identifier 'MULTI_REGION_CLOUD_TRAIL_ENABLED' corresponds to the Kubernetes equivalent of enabling multi-region logging for a CloudTrail service, reflecting compliance and enhanced observability of resources across multiple regions.",
-      "Name": "CloudTrail",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.2.1.6: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "CloudTrail"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.6.20",
       "Description": "Checks if a Kubernetes database (such as PostgreSQL) cluster has logging enabled to a logging service (e.g., Fluentd, Elasticsearch) for auditing purposes. The rule is NON_COMPLIANT if the database cluster does not have logging enabled for audit logs.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.6: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.6.21",
       "Description": "Checks if Kubernetes NetworkPolicies have logging enabled. The rule is NON_COMPLIANT if no logging configuration is specified for the NetworkPolicy. You can specify which logging type to check for, such as audit logging or other logging mechanisms.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.6: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.6.22",
       "Description": "Checks if Kubernetes clusters have audit logging configured to output logs to a specified location. The rule is NON_COMPLIANT if Kubernetes clusters do not have audit log publishing configured.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.6: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "10.2.1.6.23",
-      "Description": "Checks if the logging is enabled for the respective Kubernetes Pods or StatefulSets. The rule is NON_COMPLIANT if any log types are not enabled.",
-      "Name": "Kubernetes",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.2.1.6: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.6.24",
       "Description": "Checks if Kubernetes clusters are logging audits to a specific logging service. The rule is NON_COMPLIANT if audit logging is not enabled for a Kubernetes cluster or if a specific 'loggingDestination' parameter is provided but the audit logging destination does not match.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.6: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.6.25",
       "Description": "Checks if Kubernetes clusters have the specified settings. The rule is NON_COMPLIANT if the Kubernetes cluster does not have encryption enabled for secrets or if it is using an insecure storage backend, or if an audit logging mechanism is not configured.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_no_secrets_envs"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.6: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.6.26",
       "Description": "Checks if DNS query logging is enabled for your Kubernetes cluster's CoreDNS configuration. The rule is NON_COMPLIANT if DNS query logging is not enabled for CoreDNS.",
-      "Name": "CoreDNS",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.6: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "CoreDNS"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.6.27",
       "Description": "Checks if logging is enabled for your Kubernetes Pods. The rule is NON_COMPLIANT if logging is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.6: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.6.28",
       "Description": "Checks if Kubernetes Pods have logging enabled. The rule is NON_COMPLIANT if a Pod does not have logging enabled or the logging configuration is not at the minimum level specified.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.6: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.6.29",
       "Description": "Checks if Kubernetes Network Policies are implemented and enforced for all namespaces. The rule is NON_COMPLIANT if network policies are not enforced for at least one namespace.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.6: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.6.30",
       "Description": "Checks if logging is enabled on Kubernetes Ingress resources. The rule is NON_COMPLIANT if logging is enabled but the logging destination does not match the specified parameter value.",
-      "Name": "Ingress Controller",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.6: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Ingress Controller"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.6.31",
       "Description": "Checks if logging is enabled on Kubernetes Ingress controllers. The rule is NON_COMPLIANT for an Ingress resource if it does not have logging enabled.",
-      "Name": "Ingress Controller",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.6: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Ingress Controller"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.7.1",
       "Description": "Checks if Kubernetes Ingress resources have access logging enabled. The rule is NON_COMPLIANT if 'access-log' annotation is not present in the Ingress configuration.",
-      "Name": "Ingress Controller",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.7: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Ingress Controller"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.7.2",
       "Description": "Checks if all methods in Kubernetes Ingress resources have access logging enabled. The rule is NON_COMPLIANT if access logging is not enabled, or if the logging level is neither ERROR nor INFO.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.7: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.7.3",
       "Description": "Checks if OpenTelemetry tracing is enabled for Kubernetes Ingress resources. The rule is COMPLIANT if OpenTelemetry tracing is enabled and NON_COMPLIANT otherwise.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.7: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.7.4",
       "Description": "Checks if a Kubernetes cluster has logging enabled for its pods. The rule is NON_COMPLIANT if logging is not configured, or the log level is neither ERROR nor ALL.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.7: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.7.5",
       "Description": "Checks if Kubernetes Services are configured with a user-defined session affinity mode. The rule is NON_COMPLIANT if the Service's session affinity mode does not match the user-defined session affinity mode.",
-      "Name": "Kubernetes Services",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.7: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Services"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.7.6",
       "Description": "Checks if Kubernetes Ingress resources are configured to enable access logging to a designated storage backend. The rule is NON_COMPLIANT if an Ingress resource does not have logging configured.",
-      "Name": "Ingress Controller",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.7: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Ingress Controller"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.7.7",
       "Description": "Checks if at least one Kubernetes audit policy is configured to log all requests to all pods and services. The rule is NON_COMPLIANT if there are no audit policies or if they do not record requests to all resources.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.7: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "10.2.1.7.8",
-      "Description": "In Kubernetes, the equivalence for monitoring and ensuring that a specific service is enabled, akin to checking if AWS CloudTrail is enabled, can be represented by monitoring the existence of a specific Deployment or Service that ensures logging and auditing is being executed correctly. Similar to the AWS rule, this would involve verifying configurations or custom resources that ensure that logging is enabled within the cluster.",
-      "Name": "Kubernetes Logging (e.g., Fluentd, Elasticsearch)",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.2.1.7: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Logging (e.g., Fluentd, Elasticsearch)"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.7.9",
       "Description": "Checks if a Kubernetes Pod has at least one logging configuration enabled. The rule is NON_COMPLIANT if the status of all present logging configurations is set to 'DISABLED'.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.7: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.7.10",
       "Description": "Checks if logging is enabled with a valid severity level for Kubernetes pod events associated with a target application. The rule is NON_COMPLIANT if logging is not enabled or pod logging severity level for the target application is not valid.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.7: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "10.2.1.7.11",
-      "Description": "Checks if a MongoDB instance running on Kubernetes has logging enabled to a monitoring solution (like Prometheus) for audit logs. The rule is NON_COMPLIANT if the MongoDB instance does not have logging enabled for audit logs.",
-      "Name": "MongoDB on Kubernetes",
-      "Checks": [
-        "apiserver_audit_log_path_set"
-      ],
-      "Attributes": [
-        {
-          "Section": "10.2.1.7: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "MongoDB on Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.7.12",
       "Description": "Checks if the Kubernetes Cluster has logging enabled for connections to services. The rule is NON_COMPLIANT if 'logging.configuration.enabled' is set to false.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.7: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.7.13",
       "Description": "Checks if logConfiguration is set on active Kubernetes Pod specifications. This rule is NON_COMPLIANT if an active Pod does not have a logging configuration specified or if the logging configuration is null in at least one container definition.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.7: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.7.14",
       "Description": "Checks if a Kubernetes cluster is configured with logging enabled. The rule is NON_COMPLIANT if logging for the Kubernetes cluster is not enabled for all log types, including audit logs, application logs, and any other relevant log types.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.7: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.7.15",
       "Description": "Checks if Kubernetes clusters are configured to send logs to a centralized logging service like Elasticsearch or a monitoring tool like Prometheus. The rule is NON_COMPLIANT if logging is not properly configured or if logs are not being collected.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.7: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.7.16",
       "Description": "Checks if the Kubernetes Ingress resources have access logging enabled. The rule is NON_COMPLIANT if the access logging is not configured or if the configured logging destination does not match the specified S3 bucket name.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.7: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.7.17",
       "Description": "Checks if Kubernetes clusters have audit logging enabled. The rule is NON_COMPLIANT if a cluster does not have audit logging enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.7: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.7.18",
       "Description": "Checks if a Kubernetes cluster has audit logging enabled. The rule is NON_COMPLIANT if the cluster does not have audit logging enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.7: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "10.2.1.7.19",
-      "Description": "The Kubernetes equivalent for cloud resource monitoring with a focus on enabling multi-region logging, akin to enabling CloudTrail for multiple regions in AWS.",
-      "Name": "Kubernetes",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.2.1.7: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.7.20",
       "Description": "Checks if a Kubernetes cluster has audit logging enabled. The rule is NON_COMPLIANT if the Kubernetes cluster does not have audit logging enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.7: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.7.21",
       "Description": "Checks if Kubernetes Network Policies have logging enabled. The rule is NON_COMPLIANT if a logging type is not configured. You can specify which logging type you want the rule to check.",
-      "Name": "Kubernetes Network Policies",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.7: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Network Policies"
-        }
-      ]
-    },
-    {
-      "Id": "10.2.1.7.22",
-      "Description": "Checks if Amazon Aurora MySQL-Compatible Edition clusters are configured to publish audit logs to Amazon CloudWatch Logs. The rule is NON_COMPLIANT if Aurora MySQL-Compatible Edition clusters do not have audit log publishing configured.",
-      "Name": "Amazon Aurora",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.2.1.7: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Amazon Aurora"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.7.23",
       "Description": "Checks if the respective logs of Kubernetes pods are enabled. The rule is NON_COMPLIANT if any log types are not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.7: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.7.24",
       "Description": "Checks if Kubernetes clusters are auditing logs to a specific logging service. The rule is NON_COMPLIANT if audit logging is not enabled for a Kubernetes cluster or if the 'logDestination' parameter is provided but the audit logging destination does not match.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.7: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.7.25",
       "Description": "Checks if Kubernetes clusters have the specified settings. The rule is NON_COMPLIANT if the Kubernetes cluster is not using Role-Based Access Control (RBAC) or if a cluster does not have audit logging enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.7: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.7.26",
       "Description": "Checks if DNS logging is enabled for your Kubernetes cluster's CoreDNS or kube-dns configuration. The rule is NON_COMPLIANT if DNS query logging is not enabled for the DNS service in the cluster.",
-      "Name": "CoreDNS / kube-dns",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.7: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "CoreDNS / kube-dns"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.7.27",
       "Description": "Checks if logging is enabled for your Kubernetes Pods. The rule is NON_COMPLIANT if logging is not enabled.",
-      "Name": "Kubernetes Pods",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.7: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Pods"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.7.28",
       "Description": "Checks if Kubernetes workloads have logging enabled. The rule is NON_COMPLIANT if a workload does not have logging enabled or the logging configuration does not meet the minimum specified requirements.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.7: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.7.29",
       "Description": "Checks if Kubernetes Network Policies are configured and applied for all namespaces. The rule is NON_COMPLIANT if network policies are not applied in at least one namespace.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "10.2.1.7: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.7.30",
       "Description": "Checks if logging is enabled on Kubernetes Network Policies. The rule is NON_COMPLIANT if logging is enabled but the logging destination does not match the expected values.",
-      "Name": "Kubernetes Network Policies",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.7: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Network Policies"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.7.31",
       "Description": "Checks if logging is enabled on Kubernetes Ingress resources. The rule is NON_COMPLIANT for an Ingress resource if it does not have logging enabled.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1.7: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.1",
       "Description": "Checks if Kubernetes Ingress resources have access logging enabled. The rule is NON_COMPLIANT if 'accessLog' annotation is not present in Ingress configuration.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.2",
       "Description": "Checks if all methods in Kubernetes Ingress resources have logging enabled. The rule is NON_COMPLIANT if logging is not enabled or if the log level is neither ERROR nor INFO.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.3",
       "Description": "Checks if OpenTelemetry tracing is enabled on Kubernetes services. The rule is COMPLIANT if OpenTelemetry tracing is enabled and NON_COMPLIANT otherwise.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.4",
       "Description": "Checks if a Kubernetes API server has audit logging enabled. The rule is NON_COMPLIANT if audit logging is not enabled, or the audit policy does not include both 'metadata' and 'requestBodies' logs.",
-      "Name": "Kubernetes API Server",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes API Server"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.5",
       "Description": "Checks if Kubernetes Ingress controllers are configured with appropriate desynchronization mitigation settings as per user-defined requirements. The rule is NON_COMPLIANT if the Ingress desync mitigation settings do not match user-defined configurations.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.6",
       "Description": "Checks if Kubernetes Ingress resources are configured to log access details. The rule is NON_COMPLIANT if an Ingress resource does not have logging enabled.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.7",
       "Description": "Checks if at least one Kubernetes Audit Policy is logging access events for all Pods in the cluster. The rule is NON_COMPLIANT if there are no audit records for Pod access events.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "10.2.1.8",
-      "Description": "The Kubernetes equivalent involves ensuring that logs and events are being recorded properly, similar to how AWS CloudTrail captures API activity. This can be achieved by enabling logging features on the Kubernetes cluster, particularly through mechanisms like audit logging and monitoring tools.",
-      "Name": "Kubernetes Audit Logging",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.2.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Audit Logging"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.9",
       "Description": "Checks if a Kubernetes Pod has at least one logging mechanism enabled. The rule is NON_COMPLIANT if the status of all present logging configurations (such as logging to stdout/stderr or using a sidecar for logging) is set to 'DISABLED'.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.10",
       "Description": "Checks if logging is enabled with a valid severity level for Kubernetes pod events of a target application. The rule is NON_COMPLIANT if logging is not enabled or pod logging of a target application has a severity level that is not valid.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "10.2.1.11",
-      "Description": "Checks if a MongoDB instance running on Kubernetes has logging enabled to a specified logging service. The rule is NON_COMPLIANT if the MongoDB instance does not have logging enabled.",
-      "Name": "MongoDB on Kubernetes",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.2.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "MongoDB on Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.12",
       "Description": "Checks if Kubernetes cluster has logging for connections to services enabled. The rule is NON_COMPLIANT if 'service.spec.sessionAffinity' is not set to 'ClientIP'.",
-      "Name": "Kubernetes Services",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Services"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.13",
       "Description": "Checks if the logging configuration is set on active Kubernetes Pods. This rule is NON_COMPLIANT if an active Pod does not have logging configuration defined or the value for the logging configuration is null in at least one container within the Pod.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.14",
       "Description": "Checks if a Kubernetes cluster is configured with logging enabled. The rule is NON_COMPLIANT if logging for the Kubernetes cluster is not enabled for all log types such as audit logs, application logs, and system logs.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.15",
       "Description": "Checks if Kubernetes applications are configured to send logs to a logging solution like Fluentd or ELK Stack. The rule is NON_COMPLIANT if the logging configuration is not set up properly.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.16",
       "Description": "Checks if the Kubernetes LoadBalancer service has logging enabled. The rule is NON_COMPLIANT if the service annotations for external-dns are not set correctly or if the S3 bucket for logs is not properly configured.",
-      "Name": "Kubernetes LoadBalancer Service",
+      "Name": "Scheduler",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes LoadBalancer Service"
+          "Service": "Scheduler"
         }
       ]
     },
     {
       "Id": "10.2.1.17",
       "Description": "Checks if Kubernetes clusters have audit logging enabled. The rule is NON_COMPLIANT if a cluster does not have audit logging enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.18",
       "Description": "Checks if a Kubernetes cluster has auditing enabled. The rule is NON_COMPLIANT if auditing is not configured properly.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "10.2.1.19",
-      "Description": "In Kubernetes, the equivalent concept to monitoring policies like 'MULTI_REGION_CLOUD_TRAIL_ENABLED' can be represented as a 'Policy' or 'Rule', which defines the configurations and behaviors needed for a multi-cluster environment spread across different regions. The rule name ('multi-region-cloudtrail-enabled') is how it's referenced in specific configurations, while the identifier ('MULTI_REGION_CLOUD_TRAIL_ENABLED') serves as a unique key for programmatic access and management.",
-      "Name": "Kubernetes Policy Management",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.2.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Policy Management"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.20",
       "Description": "Checks if a Kubernetes cluster has logging enabled for audit logs. The rule is NON_COMPLIANT if the Kubernetes cluster does not have logging enabled for audit logs.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.21",
       "Description": "Checks if Kubernetes Network Policies have logging enabled. The rule is NON_COMPLIANT if a logging type is not configured. You can specify which logging type you want the rule to check.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Network Policy"
-        }
-      ]
-    },
-    {
-      "Id": "10.2.1.22",
-      "Description": "Checks if Amazon Aurora MySQL-Compatible Edition clusters are configured to publish audit logs to Amazon CloudWatch Logs. The rule is NON_COMPLIANT if Aurora MySQL-Compatible Edition clusters do not have audit log publishing configured.",
-      "Name": "Amazon Aurora MySQL-Compatible Edition",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.2.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Amazon Aurora MySQL-Compatible Edition"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.23",
       "Description": "Checks if respective logs of Kubernetes Pods are enabled. The rule is NON_COMPLIANT if any logs related to the application are not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.24",
       "Description": "Checks if Kubernetes Pods are logging events to a specific logging service. The rule is NON_COMPLIANT if logging is not enabled for a Pod or if the 'logDestination' parameter is provided but the logging service does not match.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.25",
       "Description": "Checks if Kubernetes clusters have the specified settings. The rule is NON_COMPLIANT if the Kubernetes cluster does not have Secrets encryption enabled or uses an insecure key, or if audit logging is not enabled for the cluster.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_no_secrets_envs"
       ],
       "Attributes": [
         {
           "Section": "10.2.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.26",
       "Description": "Checks if DNS query logging is enabled for Kubernetes services using CoreDNS. The rule is NON_COMPLIANT if DNS query logging is not enabled for CoreDNS in your Kubernetes cluster.",
-      "Name": "CoreDNS",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "CoreDNS"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.27",
       "Description": "Checks if logging is enabled for your Kubernetes Pods. The rule is NON_COMPLIANT if logging is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
@@ -6849,1192 +6495,1120 @@
     {
       "Id": "10.2.1.29",
       "Description": "Checks if Kubernetes Network Policies are configured and enforced for all namespaces. The rule is NON_COMPLIANT if Network Policies are not configured for at least one namespace.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "10.2.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.1.30",
       "Description": "Checks if logging is enabled on Kubernetes Ingress resources. The rule is NON_COMPLIANT if the logging is enabled but the logging destination does not match the expected configuration.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.1.31",
       "Description": "Checks if logging is enabled for Kubernetes Ingress resources. The rule is NON_COMPLIANT for an Ingress resource if it does not have access logging enabled.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.1: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.2.1",
       "Description": "Checks if Kubernetes Ingress resources have access logging enabled. The rule is NON_COMPLIANT if access logging annotations are not present in the Ingress resource configuration.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.2.2",
       "Description": "Checks if all methods in Kubernetes Ingress have access logging enabled. The rule is NON_COMPLIANT if access logging is not enabled or if the log level is neither ERROR nor INFO.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.2.3",
       "Description": "Checks if OpenTelemetry tracing is enabled for Kubernetes services. The rule is COMPLIANT if OpenTelemetry tracing is enabled and NON_COMPLIANT otherwise.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.2.4",
       "Description": "Checks if a Kubernetes API server has audit logging enabled. The rule is NON_COMPLIANT if audit logging is not configured or 'audit-log-path' does not have a valid path set.",
-      "Name": "Kubernetes API Server",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes API Server"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.2.5",
       "Description": "Checks if Kubernetes Services are configured with appropriate LoadBalancer settings. The rule is NON_COMPLIANT if the Service's LoadBalancer settings do not match the user-defined configurations for handling desynchronization scenarios.",
-      "Name": "Kubernetes Service",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Service"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.2.6",
       "Description": "Checks if Kubernetes Ingress resources are configured to enable access logging. The rule is NON_COMPLIANT if an Ingress resource does not have access logging configured.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.2.7",
       "Description": "Checks if at least one Kubernetes Audit Policy is configured to log access to all Pods in the cluster. The rule is NON_COMPLIANT if there are no audit policies or if no policies log Pod access events.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "10.2.2.8",
-      "Description": "The rule identifier CLOUD_TRAIL_ENABLED relates to ensuring that AWS CloudTrail is enabled for monitoring API calls, while its equivalent in Kubernetes could be ensuring that audit logging is enabled for monitoring API requests within the Kubernetes cluster. This helps maintain security and compliance by tracking changes and access in the cluster.",
-      "Name": "Kubernetes Audit Logging",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.2.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Audit Logging"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.2.9",
       "Description": "Checks if a Kubernetes Pod has at least one logging option enabled. The rule is NON_COMPLIANT if the status of all present logging configurations is set to 'DISABLED'.",
-      "Name": "Kubernetes Pod Logging",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Pod Logging"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.2.10",
       "Description": "Checks if logging is enabled with a valid severity level for a Kubernetes Deployment's application logs. The rule is NON_COMPLIANT if logging is not enabled or application logging has a severity level that is not valid.",
-      "Name": "Kubernetes Deployment",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Deployment"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.2.11",
       "Description": "Checks if a Kubernetes cluster has logging enabled for audit logs. The rule is NON_COMPLIANT if the Kubernetes cluster does not have audit logging enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.2.12",
       "Description": "Checks if Kubernetes API server has audit logging enabled. The rule is NON_COMPLIANT if 'audit-log-path' is set to an empty value or audit logging is not configured.",
-      "Name": "Kubernetes API Server",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes API Server"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.2.13",
       "Description": "Checks if logging is configured for active Kubernetes Pods. This rule is NON_COMPLIANT if an active Pod does not have logging configured, or the value for logging is null in at least one container definition.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.2.14",
       "Description": "Checks if a Kubernetes cluster has logging enabled for all log types, such as audit logs, application logs, and cluster logs. The rule is NON_COMPLIANT if logging for the Kubernetes cluster is not enabled for all log types.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.2.15",
       "Description": "Checks if Kubernetes Pods are configured to send logs to a centralized logging system (e.g., Fluentd or Elasticsearch). The rule is NON_COMPLIANT if the logging driver or configuration is not set to forward logs.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.2.16",
       "Description": "Checks if the Kubernetes Ingress resources have access logging enabled. The rule is NON_COMPLIANT if the access logging is not configured correctly or pointing to the specified S3 bucket for log storage.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.2.17",
       "Description": "Checks if Kubernetes brokers (such as those created with Strimzi or similar tools) have logging enabled for auditing (e.g., using Fluentd, Elasticsearch, and Kibana). The rule is NON_COMPLIANT if a broker does not have audit logging enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.2.18",
       "Description": "Checks if a Kubernetes pod has audit logging enabled. The rule is NON_COMPLIANT if the pod does not have audit logging enabled.",
-      "Name": "Kubernetes Pod",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Pod"
-        }
-      ]
-    },
-    {
-      "Id": "10.2.2.19",
-      "Description": "In Kubernetes, a valid equivalent for monitoring multi-region cloud activities can be achieved by using Cross-Cluster Services or utilizing Kubernetes' built-in audit logging mechanisms to track operations across multiple clusters in different regions.",
-      "Name": "Kubernetes",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.2.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.2.20",
       "Description": "Checks if a Kubernetes cluster has logging enabled for audit logs. The rule is NON_COMPLIANT if a Kubernetes cluster does not have logging enabled for audit logs.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.2.21",
       "Description": "Checks if Kubernetes Network Policies have logging enabled. The rule is NON_COMPLIANT if a logging type is not configured for traffic policies. You can specify which logging type you want the rule to check.",
-      "Name": "Kubernetes Network Policies",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Network Policies"
-        }
-      ]
-    },
-    {
-      "Id": "10.2.2.22",
-      "Description": "In Kubernetes, ensure that your MySQL database (Deployed using a StatefulSet or similar) is configured to log queries or audit logs and send those logs to a logging solution like Elasticsearch, Fluentd, or a similar service integrated with CloudWatch. The rule is NON_COMPLIANT if MySQL clusters do not have appropriate logging or auditing configured.",
-      "Name": "MySQL StatefulSet",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.2.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "MySQL StatefulSet"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.2.23",
       "Description": "Checks if the respective logs of the Kubernetes cluster (such as auditing, application logs, or container logs) are enabled. The rule is NON_COMPLIANT if any logging mechanisms are not enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.2.24",
       "Description": "Checks if Kubernetes clusters are logging audits to a specific logging service. The rule is NON_COMPLIANT if audit logging is not enabled for a Kubernetes cluster or if the 'logDestination' parameter is provided but the audit logging destination does not match.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.2.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.2.25",
       "Description": "Checks if Kubernetes clusters have the specified settings. The rule is NON_COMPLIANT if the Kubernetes cluster does not have encryption for etcd enabled, or if the cluster does not have audit logging enabled.",
-      "Name": "Kubernetes",
+      "Name": "ETCD",
       "Checks": [
         "etcd_tls_encryption"
       ],
       "Attributes": [
         {
           "Section": "10.2.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "ETCD"
         }
       ]
     },
     {
       "Id": "10.2.2.26",
       "Description": "Checks if DNS query logging is enabled for your Kubernetes cluster's CoreDNS configurations. The rule is NON_COMPLIANT if DNS query logging is not enabled for the CoreDNS service associated with the cluster's ingress traffic management.",
-      "Name": "CoreDNS",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "CoreDNS"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.2.27",
       "Description": "Checks if logging is enabled for your Kubernetes clusters. The rule is NON_COMPLIANT if logging is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.2.28",
       "Description": "Checks if a Kubernetes Pod has logging enabled. The rule is NON_COMPLIANT if a Pod does not have logging enabled or the logging configuration is not at the minimum level provided.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.2.29",
       "Description": "Checks if Kubernetes Network Policies are configured and enforced for all namespaces. The rule is NON_COMPLIANT if Network Policies are not enabled for at least one namespace.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "10.2.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.2.2.30",
       "Description": "Checks if logging is enabled on Kubernetes Ingress resources. The rule is NON_COMPLIANT if logging is enabled but the logging destination does not match the specified configuration.",
-      "Name": "Ingress Controller",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Ingress Controller"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.2.2.31",
       "Description": "Checks if logging is enabled on Kubernetes Ingress resources. The rule is NON_COMPLIANT for an Ingress resource, if it does not have logging enabled.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.2.2: Audit logs are implemented to support the detection of anomalies and suspicious activity, and the forensic analysis of events.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.3.1.1",
       "Description": "Checks if Kubernetes Ingress resources have access logging enabled. The rule is NON_COMPLIANT if access logging configuration is not defined in the Ingress resource annotations.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.3.1: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.3.1.2",
       "Description": "Checks if all methods in Kubernetes Ingress resources have access logging enabled. The rule is NON_COMPLIANT if logging is not enabled, or if log level is neither ERROR nor INFO.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.3.1: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.3.1.3",
       "Description": "Checks if OpenTelemetry tracing is enabled on Kubernetes Ingress controllers. The rule is COMPLIANT if OpenTelemetry tracing is enabled and NON_COMPLIANT otherwise.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.3.1: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.3.1.4",
       "Description": "Checks if a Kubernetes API server has audit logging enabled. The rule is NON_COMPLIANT if audit logging is not enabled, or 'audit.log.level' is neither 'ERROR' nor 'ALL'.",
-      "Name": "Kubernetes API Server",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.3.1: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes API Server"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.3.1.5",
       "Description": "Checks if Kubernetes Services that use LoadBalancer type are configured with a user-defined externalTrafficPolicy. The rule is NON_COMPLIANT if the externalTrafficPolicy does not match the user-defined externalTrafficPolicy.",
-      "Name": "Kubernetes Services",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "10.3.1: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes Services"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.3.1.6",
       "Description": "Checks if Kubernetes Ingress resources are configured to enable access logging to a specified logging service (e.g., Fluentd or a centralized logging system). The rule is NON_COMPLIANT if an Ingress resource does not have logging configured.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.3.1: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.3.1.7",
       "Description": "Checks if at least one Kubernetes Audit Policy is enforcing the logging of access events for all pods in the cluster. The rule is NON_COMPLIANT if there are no audit logs or if the audit policies do not record access events for pods.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.3.1: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.3.1.8",
       "Description": "The Kubernetes equivalent of enabling CloudTrail would be to ensure that logging and monitoring services are set up for tracking user activity and changes within the cluster. This typically involves using tools like Fluentd, Elasticsearch, Kibana (the EFK stack), or Kubernetes' built-in audit logging.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.3.1: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.3.1.9",
       "Description": "Checks if a Kubernetes Pod has at least one logging option enabled. The rule is NON_COMPLIANT if the status of all present log configurations is set to 'DISABLED'.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.3.1: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.3.1.10",
       "Description": "Checks if logging is enabled with a valid severity level for Kubernetes pod events. The rule is NON_COMPLIANT if logging is not enabled or pod event logging has a severity level that is not valid.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.3.1: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "10.3.1.11",
-      "Description": "Checks if a Kubernetes MongoDB instance running on a cluster has logging enabled for audit logs. The rule is NON_COMPLIANT if a MongoDB instance in the Kubernetes cluster does not have auditing logs enabled.",
-      "Name": "MongoDB on Kubernetes",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.3.1: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "MongoDB on Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.3.1.12",
       "Description": "Checks if the Kubernetes cluster has client connection logging enabled in the Ingress controller. The status is NON_COMPLIANT if 'clientLogging.enabled' is set to false.",
-      "Name": "Ingress Controller",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.3.1: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Ingress Controller"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.3.1.13",
       "Description": "Checks if logging is configured for active Kubernetes Pods. This rule is NON_COMPLIANT if an active Pod does not have a logging configuration set or the logging configuration is null in at least one container specification.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.3.1: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.3.1.14",
       "Description": "Checks if a Kubernetes cluster is configured with logging enabled. The rule is NON_COMPLIANT if logging for the Kubernetes cluster is not enabled for all log types, such as audit logs, application logs, and container logs.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.3.1: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.3.1.15",
       "Description": "Checks if Kubernetes pods are configured to send logs to a centralized logging system (like Fluentd, ELK stack, or any other log management solution). The rule is NON_COMPLIANT if the logging configuration does not forward logs to the configured logging system.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.3.1: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.3.1.16",
       "Description": "Checks if the Kubernetes Service of type LoadBalancer has logging enabled. The rule is NON_COMPLIANT if the service does not have an annotation for logging enabled or the designated logging namespace does not match the expected value.",
-      "Name": "Kubernetes Service",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.3.1: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes Service"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.3.1.17",
       "Description": "Checks if Kubernetes Pods have auditing enabled. The rule is NON_COMPLIANT if a Pod does not have auditing enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.3.1: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.3.1.18",
       "Description": "Checks if a Kubernetes cluster has audit logging enabled. The rule is NON_COMPLIANT if the audit logging is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.3.1: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "10.3.1.19",
-      "Description": "The multi-region-cloudtrail-enabled rule ensures that AWS CloudTrail is enabled across multiple regions, providing enhanced visibility and security for resource activity in the cloud environment.",
-      "Name": "AWS CloudTrail",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.3.1: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "AWS CloudTrail"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.3.1.20",
       "Description": "Checks if a Kubernetes cluster has logging enabled for audit logs. The rule is NON_COMPLIANT if the Kubernetes cluster does not have audit logging enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.3.1: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.3.1.21",
       "Description": "Checks if Kubernetes Network Policies have logging enabled. The rule is NON_COMPLIANT if logging is not configured for the Network Policies. You can specify which logging type you want the rule to check.",
-      "Name": "Kubernetes Network Policies",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.3.1: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes Network Policies"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.3.1.22",
       "Description": "Checks if Kubernetes clusters are configured to log audit events to a specified logging solution. The rule is NON_COMPLIANT if Kubernetes clusters do not have audit logging configured.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.3.1: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.3.1.23",
       "Description": "Checks if the necessary logging is enabled for the Kubernetes cluster and its components. The rule is NON_COMPLIANT if any required log types, such as audit logs or application logs, are not enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.3.1: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.3.1.24",
       "Description": "Checks if Kubernetes clusters are logging audits to a specific logging service. The rule is NON_COMPLIANT if audit logging is not enabled for a Kubernetes cluster or if the specified logging destination does not match the expected service.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.3.1: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.3.1.25",
       "Description": "Checks if Kubernetes clusters have the specified security settings. The rule is NON_COMPLIANT if the Kubernetes cluster is not using encryption for secrets or configurations, or if audit logging is not enabled for the cluster.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_secret_access"
       ],
       "Attributes": [
         {
           "Section": "10.3.1: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "10.3.1.26",
       "Description": "Checks if CoreDNS logging is enabled for your Kubernetes cluster. The rule is NON_COMPLIANT if CoreDNS logging is not enabled for your Kubernetes cluster.",
-      "Name": "CoreDNS",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.3.1: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "CoreDNS"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.3.1.27",
       "Description": "Checks if logging is enabled for your Kubernetes pods. The rule is NON_COMPLIANT if logging is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.3.1: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "10.3.1.28",
-      "Description": "Checks if Kubernetes StatefulSet has logging enabled. The rule is NON_COMPLIANT if a StatefulSet does not have logging enabled or the logging configuration is not at the minimum level provided.",
-      "Name": "Kubernetes StatefulSet",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.3.1: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes StatefulSet"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.3.1.29",
       "Description": "Checks if Kubernetes Network Policies are defined and enforced for all namespaces. The rule is NON_COMPLIANT if network policies are not configured for at least one namespace.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "10.3.1: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.3.1.30",
       "Description": "Checks if logging is enabled on Kubernetes Ingress resources. The rule is NON_COMPLIANT if logging is enabled but the logging destination does not match the expected destination parameter.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.3.1: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.3.1.31",
       "Description": "Checks if logging is enabled on Kubernetes Ingress resources. The rule is NON_COMPLIANT for an Ingress resource, if it does not have logging enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.3.1: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.3.2.1",
       "Description": "Checks if a Kubernetes namespace has an associated Network Policy that prevents pod egress. The rule is NON_COMPLIANT if the namespace does not have network policies or has policies that do not include appropriate deny rules for egress traffic (rules that restrict access to external services).",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.3.2: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.3.2.2",
       "Description": "Checks that there is at least one Kubernetes Audit Policy defined with security best practices. This rule is COMPLIANT if there is at least one audit policy that meets all of the following:",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.3.2: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.3.2.3",
       "Description": "Checks if Kubernetes secrets are encrypted at rest using a specified encryption provider configuration. The rule is NON_COMPLIANT if a secret is not encrypted or is encrypted with a key not specified in the rule parameters.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_encryption_provider_config_set"
       ],
       "Attributes": [
         {
           "Section": "10.3.2: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.3.2.4",
       "Description": "Checks if Kubernetes Secrets are configured to use encryption at rest. The rule is COMPLIANT if the encryption configuration is defined in the Kubernetes cluster.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_encryption_provider_config_set"
       ],
       "Attributes": [
         {
           "Section": "10.3.2: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.3.2.5",
       "Description": "Checks if Kubernetes audit logging is enabled and configured properly. It is recommended that audit logging is enabled for all clusters to ensure logs are validated for compliance. The rule is NON_COMPLIANT if audit logging is not enabled or misconfigured.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.3.2: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.3.2.6",
       "Description": "Checks if Kubernetes Services are exposed publicly. The rule is NON_COMPLIANT if the service type is set to LoadBalancer or if the service has an External IP.",
-      "Name": "Kubernetes Service",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "10.3.2: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes Service"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.3.2.7",
       "Description": "Checks if Kubernetes PersistentVolume (PV) snapshots are public. The rule is NON_COMPLIANT if any Kubernetes PersistentVolume snapshots are public.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "10.3.2: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "10.3.2.8",
       "Description": "Checks if Kubernetes Persistent Volumes (PVs) are not publicly accessible. The rule is NON_COMPLIANT if one or more Persistent Volumes have the accessModes field set to 'ReadWriteMany' allowing multiple pods (potentially from different namespaces) to access the volume, making it publicly accessible.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "10.3.2: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "10.3.2.9",
       "Description": "Checks if Kubernetes Pods have read-only access to their root filesystems. The rule is NON_COMPLIANT if the readOnlyRootFilesystem field in the Pod's security context is set to 'false'.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_root_containers_admission"
       ],
       "Attributes": [
         {
           "Section": "10.3.2: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.3.2.10",
       "Description": "Checks if Kubernetes Persistent Volumes (PVs) are configured to enforce a specific mount path. The rule is NON_COMPLIANT if the value of 'mountPath' is set to '/' (default root directory).",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "10.3.2: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "10.3.2.11",
       "Description": "Checks if Kubernetes persistent volume claims (PVC) access modes are configured to enforce a user identity. The rule is NON_COMPLIANT if access modes do not enforce the required security context or if parameters provided in the PVC do not match the expected configuration.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "10.3.2: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "10.3.2.12",
       "Description": "Checks if a Kubernetes cluster has public access settings correctly configured for its services. The rule is NON_COMPLIANT if 'AllowExternalAccess' is set to true and there are services exposed to the public via LoadBalancer or NodePort types, except for port 22.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "10.3.2: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.3.2.13",
       "Description": "Checks if the Kubernetes Service policy attached to the Service resource prohibits public access. If the Service policy allows public access, it is NON_COMPLIANT.",
-      "Name": "Kubernetes Service",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.3.2: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes Service"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.3.2.14",
       "Description": "Checks if a Kubernetes persistent volume is publicly accessible. The rule is NON_COMPLIANT if any existing or new persistent volume is exposed to the public.",
-      "Name": "Kubernetes Persistent Volumes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "10.3.2: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes Persistent Volumes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "10.3.2.15",
       "Description": "Checks if the Kubernetes database service (e.g., PostgreSQL, MySQL) instances are not exposed to the external network. The rule is NON_COMPLIANT if the service type is 'LoadBalancer' or if there's an ingress route allowing external traffic.",
-      "Name": "Kubernetes Service",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.3.2: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes Service"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.3.2.16",
       "Description": "Checks if Kubernetes Persistent Volume (PV) claims are publicly accessible. The rule is NON_COMPLIANT if any existing and new Persistent Volumes are configured inappropriately, allowing public access.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "10.3.2: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "10.3.2.17",
       "Description": "Checks if Kubernetes clusters are not publicly accessible. The rule is NON_COMPLIANT if the cluster's LoadBalancer service has an external IP configured, allowing public access.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "10.3.2: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.3.2.18",
       "Description": "Checks if Kubernetes services have network policies that restrict public access. The rule is NON_COMPLIANT if network policies are not enforced for services that are exposed to the public.",
-      "Name": "Kubernetes Services",
+      "Name": "Core",
       "Checks": [
         "core_minimize_admission_hostport_containers"
       ],
       "Attributes": [
         {
           "Section": "10.3.2: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes Services"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.3.2.19",
       "Description": "Checks if the required network policies are configured to restrict public access to Kubernetes services. The rule is only NON_COMPLIANT when the network policy settings do not align with the expected configuration.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [
         "core_minimize_admission_hostport_containers"
       ],
       "Attributes": [
         {
           "Section": "10.3.2: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.3.2.20",
       "Description": "Checks if the required Network Policies for public access are configured at the namespace level. The rule is NON_COMPLIANT if the Network Policies do not match one or more settings from parameters (or default).",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.3.2: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.3.2.21",
       "Description": "Checks if Kubernetes services are publicly accessible. The rule is NON_COMPLIANT if a service is not listed in the excludedPublicServices parameter and service type is 'LoadBalancer' or has a public IP.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "10.3.2: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.3.2.22",
       "Description": "Checks if two-factor authentication (2FA) is enabled for Kubernetes secrets management. The rule is NON_COMPLIANT if 2FA is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.3.2: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.3.2.23",
       "Description": "Checks if your Kubernetes storage classes do not allow public access. The rule checks the security context, role-based access control (RBAC) settings, and the PersistentVolumeClaims (PVCs) configurations.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "10.3.2: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "10.3.2.24",
       "Description": "Checks if your Kubernetes Persistent Volume Claims (PVCs) do not allow public write access. The rule evaluates the Access Modes settings, the Persistent Volume (PV) policies, and any associated Role-Based Access Control (RBAC) configurations.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "10.3.2: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "10.3.2.25",
       "Description": "Checks if direct internet access is disabled for a Kubernetes Pod. The rule is NON_COMPLIANT if a Pod is configured with Internet access through a NetworkPolicy that allows external traffic.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.3.2: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.3.2.26",
       "Description": "Checks if Kubernetes ConfigMaps owned by the namespace are accessible publicly. The rule is NON_COMPLIANT if ConfigMaps with the owner 'Self' are exposed to external traffic.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "10.3.2: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.3.3.1",
       "Description": "Checks if Kubernetes database instances (such as PostgreSQL or MySQL running on Kubernetes) are protected by a backup plan. The rule is NON_COMPLIANT if the database instance is not protected by a backup plan.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.3.3: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
@@ -8065,80 +7639,68 @@
     {
       "Id": "10.3.3.4",
       "Description": "Checks that there is at least one Kubernetes audit log configuration defined with security best practices. This rule is COMPLIANT if there is at least one configuration that meets all of the following criteria: audit logs are enabled, retention policies are set, and sensitive request logging is implemented.",
-      "Name": "Kubernetes Audit Logs",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.3.3: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes Audit Logs"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.3.3.5",
       "Description": "Checks if Kubernetes Persistent Volume Claims (PVCs) are using encrypted storage classes with specific encryption keys. The rule is NON_COMPLIANT if a PVC is not using an encrypted storage class or is using an encryption key not specified in the rule parameter.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "10.3.3: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "10.3.3.6",
       "Description": "Checks if Kubernetes Secrets are created with encryption at rest enabled. The rule is COMPLIANT if the 'encryption' key is defined in the Kubernetes configuration.",
-      "Name": "Kubernetes Secrets",
+      "Name": "API Server",
       "Checks": [
         "apiserver_encryption_provider_config_set"
       ],
       "Attributes": [
         {
           "Section": "10.3.3: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes Secrets"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.3.3.7",
       "Description": "Checks if Kubernetes Audit Logging is configured to generate logs with proper validation. Kubernetes recommends that log validation must be enabled for auditing to ensure integrity and reliability of the logs. The rule is NON_COMPLIANT if audit logging validation is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.3.3: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "10.3.3.8",
-      "Description": "Checks if RDS DB instances have backups enabled. Optionally, the rule checks the backup retention period and the backup window.",
-      "Name": "AWS RDS",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.3.3: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "AWS RDS"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.3.3.9",
       "Description": "Checks whether a Kubernetes Persistent Volume (PV) is included in a Backup Storage Class. The rule is NON_COMPLIANT if Persistent Volumes are not present in any Backup Storage Class.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.3.3: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
@@ -8157,78 +7719,78 @@
     {
       "Id": "10.3.3.11",
       "Description": "Checks if Kubernetes Persistent Volumes are protected by a backup plan. The rule is NON_COMPLIANT if the Persistent Volume is not covered by a backup plan.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "10.3.3: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "10.3.3.12",
       "Description": "Check if Kubernetes Persistent Volumes (PVs) are included in backup plans. The rule is NON_COMPLIANT if Persistent Volumes are not included in backup plans.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.3.3: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.3.3.13",
       "Description": "Checks if Kubernetes Persistent Volumes (PVs) are protected by a backup plan. The rule is NON_COMPLIANT if the Persistent Volume is not covered by a backup plan.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "10.3.3: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "10.3.3.14",
       "Description": "Checks if Kubernetes Pods are protected by a backup plan. The rule is NON_COMPLIANT if the Kubernetes Pod is not covered by a backup plan.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.3.3: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.3.3.15",
       "Description": "Checks if Persistent Volume Claims (PVCs) that are backed by Persistent Volumes (PVs) are included in backup plans for Kubernetes clusters. The rule is NON_COMPLIANT if PVCs backed by PVs are not included in the backup plans.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "10.3.3: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "10.3.3.16",
       "Description": "Checks if Kubernetes Persistent Volumes (PVs) are protected by a backup policy. The rule is NON_COMPLIANT if the PV is not covered by a backup policy.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.3.3: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
@@ -8247,302 +7809,266 @@
     {
       "Id": "10.3.3.18",
       "Description": "Checks if Kubernetes Persistent Volumes are protected by a backup plan. The rule is NON_COMPLIANT if the Persistent Volume is not covered by a backup plan.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "10.3.3: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "10.3.3.19",
-      "Description": "Checks if a Kubernetes StatefulSet's persistent volume claims have a retention period set to a specific duration. The rule is NON_COMPLIANT if the retention period is less than the value specified by the parameter.",
-      "Name": "Kubernetes",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.3.3: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "10.3.3.20",
-      "Description": "Checks if Kubernetes databases managed by StatefulSets or Deployments are included in backup plans. The rule is NON_COMPLIANT if any database is not included in a backup plan.",
-      "Name": "Kubernetes",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.3.3: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "10.3.3.21",
       "Description": "Checks if Kubernetes persistent volumes are protected by a backup plan. The rule is NON_COMPLIANT if the persistent volume is not covered by a backup plan.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.3.3: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.3.3.22",
       "Description": "Checks that Kubernetes persistent volume claims (PVCs) are configured with appropriate storage requests that are not less than the minimum required size and not greater than the maximum allowed size. The rule is NON_COMPLIANT if the size of the PVC is less than MinStorageSize or greater than MaxStorageSize.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "10.3.3: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "10.3.3.23",
       "Description": "Checks if Kubernetes Services are publicly accessible. The rule is NON_COMPLIANT if a Service is not listed in the excludedPublicServices parameter and its type is LoadBalancer or NodePort.",
-      "Name": "Kubernetes Services",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "10.3.3: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes Services"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.3.3.24",
       "Description": "Checks if Kubernetes persistent volume claims (PVCs) are protected by a backup solution. The rule is NON_COMPLIANT if the persistent volume claims are not covered by a backup plan.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "10.3.3: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "10.3.4.1",
       "Description": "Checks if a Kubernetes Ingress resource backed by a Service of type 'ClusterIP' has appropriate annotations for secure TLS configuration. The rule is NON_COMPLIANT if the Ingress resource is configured to route traffic to a 'ClusterIP' Service and does not have the required TLS annotations, or the Service is not of type 'ClusterIP'.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "10.3.4: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.3.4.2",
       "Description": "Checks if a Kubernetes Ingress resource has annotation for access control enabled. The rule is NON_COMPLIANT for Ingress resources that don't have access control enabled for services.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.3.4: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.3.4.3",
       "Description": "Checks that there is at least one Kubernetes Auditing configuration defined with security best practices. This rule is COMPLIANT if there is at least one audit policy that meets all of the following criteria: properly configured for logging, retains logs for an appropriate timeframe, and includes all critical API requests.",
-      "Name": "Kubernetes Audit",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.3.4: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes Audit"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.3.4.4",
       "Description": "Verifies if Kubernetes Secrets are encrypted with a specified KMS provider or a custom key. The check is NON_COMPLIANT if a Secret is not encrypted with any KMS provider or is encrypted with a key not defined in the policy.",
-      "Name": "Kubernetes Secrets",
+      "Name": "Core",
       "Checks": [
         "core_no_secrets_envs"
       ],
       "Attributes": [
         {
           "Section": "10.3.4: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes Secrets"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.3.4.5",
       "Description": "Checks if Kubernetes secrets are configured to use encryption at rest. The rule is COMPLIANT if the encryption configuration specifies a valid encryption provider with secrets encryption enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_encryption_provider_config_set"
       ],
       "Attributes": [
         {
           "Section": "10.3.4: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.3.4.6",
       "Description": "Checks if Kubernetes Audit Logs are configured to include a signature for log integrity. It is recommended that the audit log validation feature must be enabled across all namespaces. The rule is NON_COMPLIANT if the validation is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.3.4: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.3.4.7",
       "Description": "Checks if the Kubernetes PersistentVolume has a retention policy enabled. The rule is NON_COMPLIANT if the retention policy is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.3.4: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.3.4.8",
       "Description": "Checks if Kubernetes persistent volumes (PVs) are improperly exposed. The rule is NON_COMPLIANT if a PV is not listed in the excludedPersistentVolumes parameter and its access mode allows public access.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "10.3.4: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "10.3.4.9",
       "Description": "Checks if versioning is enabled for your Kubernetes Persistent Volume Claims (PVCs). Optionally, the rule checks if data protection features like volume snapshots are enabled for your PVCs.",
-      "Name": "Kubernetes Persistent Volumes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "10.3.4: Audit logs are protected from destruction and unauthorized modifications.",
-          "Service": "Kubernetes Persistent Volumes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "10.4.1.1.1",
       "Description": "Checks if OpenTelemetry tracing is enabled on Kubernetes Ingress controllers. The rule is COMPLIANT if OpenTelemetry tracing is enabled and NON_COMPLIANT otherwise.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.4.1.1: Audit logs are reviewed to identify anomalies or suspicious activity.",
-          "Service": "Kubernetes Ingress"
-        }
-      ]
-    },
-    {
-      "Id": "10.4.1.1.2",
-      "Description": "Checks if a Kubernetes resource type has a Prometheus alert for the named metric. For resource type, you can specify Pods, Deployments, StatefulSets, or Services. The rule is COMPLIANT if the named metric has a resource ID and Prometheus alert.",
-      "Name": "Kubernetes",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.4.1.1: Audit logs are reviewed to identify anomalies or suspicious activity.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.4.1.1.3",
       "Description": "Checks if Kubernetes Audit Logs are configured to be sent to a logging service. The audit policy is considered NON_COMPLIANT if the output configuration for audit logs does not include a specified logging endpoint.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.4.1.1: Audit logs are reviewed to identify anomalies or suspicious activity.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.4.1.1.4",
       "Description": "Checks if detailed monitoring is enabled for Kubernetes Pods. The rule is NON_COMPLIANT if detailed monitoring is not enabled, indicating that metrics for resource usage and performance are not being collected aggressively.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.4.1.1: Audit logs are reviewed to identify anomalies or suspicious activity.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.4.1.1.5",
       "Description": "Checks if the Kubernetes Pod Security Policies are enabled for a Kubernetes cluster. The rule is NON_COMPLIANT if Pod Security Policies are not enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_security_context_deny_plugin"
       ],
       "Attributes": [
         {
           "Section": "10.4.1.1: Audit logs are reviewed to identify anomalies or suspicious activity.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.4.1.1.6",
       "Description": "Checks if Kubernetes Event Exporter is configured to log delivery status of events sent to a specific namespace or resource. The rule is NON_COMPLIANT if the delivery status logging for events is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.4.1.1: Audit logs are reviewed to identify anomalies or suspicious activity.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.4.1.1.7",
       "Description": "Checks if metrics collection for Kubernetes Ingress resources is enabled. The rule is NON_COMPLIANT if the 'metrics.enabled' field is set to false in the Ingress controller configuration.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.4.1.1: Audit logs are reviewed to identify anomalies or suspicious activity.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
@@ -8558,79 +8084,67 @@
         }
       ]
     },
-    {
-      "Id": "10.4.1.2",
-      "Description": "Checks if a Kubernetes resource type has an associated Prometheus alert for the named metric. For resource type, you can specify Pods, Deployments, StatefulSets, or Services. The rule is COMPLIANT if the named metric has a resource name and Prometheus alert.",
-      "Name": "Kubernetes",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.4.1: Audit logs are reviewed to identify anomalies or suspicious activity.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
     {
       "Id": "10.4.1.3",
       "Description": "Checks if detailed monitoring is enabled for Kubernetes Pods. The rule is NON_COMPLIANT if detailed monitoring is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.4.1: Audit logs are reviewed to identify anomalies or suspicious activity.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.4.1.4",
       "Description": "Checks if a Kubernetes cluster has the PodSecurityPolicy enabled. The rule is NON_COMPLIANT if PodSecurityPolicies are not enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_security_context_deny_plugin"
       ],
       "Attributes": [
         {
           "Section": "10.4.1: Audit logs are reviewed to identify anomalies or suspicious activity.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.4.1.5",
       "Description": "Checks if Kubernetes events logging is enabled for the delivery status of notification messages sent to endpoints. The rule is NON_COMPLIANT if the delivery status notification for messages is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.4.1: Audit logs are reviewed to identify anomalies or suspicious activity.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.4.1.6",
       "Description": "Checks if Kubernetes auditing is enabled on the cluster. The status is NON_COMPLIANT if the 'audit.log' is not configured or the logging level is set to off.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.4.1: Audit logs are reviewed to identify anomalies or suspicious activity.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.4.2.1",
       "Description": "Checks if OpenTelemetry tracing is enabled for Kubernetes Ingress controllers. The rule is COMPLIANT if OpenTelemetry tracing is enabled and NON_COMPLIANT otherwise.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.4.2: Audit logs are reviewed to identify anomalies or suspicious activity.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
@@ -8646,77 +8160,65 @@
         }
       ]
     },
-    {
-      "Id": "10.4.2.3",
-      "Description": "Checks if a Kubernetes resource type has a Prometheus alert configured for the specified metric. For resource types, you can specify Pods, Deployments, StatefulSets, or Services. The rule is COMPLIANT if the named metric has a resource name and Prometheus alert.",
-      "Name": "Kubernetes",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.4.2: Audit logs are reviewed to identify anomalies or suspicious activity.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
     {
       "Id": "10.4.2.4",
       "Description": "Checks if the Kubernetes cluster has the appropriate monitoring set up using tools like Prometheus or Grafana. The rule is NON_COMPLIANT if monitoring is not enabled for the pods or nodes.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.4.2: Audit logs are reviewed to identify anomalies or suspicious activity.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.4.2.5",
       "Description": "Checks if Kubernetes Pod Security Policies are enabled in a cluster. The rule is NON_COMPLIANT if Pod Security Policies are not enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_security_context_deny_plugin"
       ],
       "Attributes": [
         {
           "Section": "10.4.2: Audit logs are reviewed to identify anomalies or suspicious activity.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.4.2.6",
       "Description": "Checks if Kubernetes Event logging is enabled for the delivery status of notification messages sent to a service. The rule is NON_COMPLIANT if the delivery status notification for messages is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.4.2: Audit logs are reviewed to identify anomalies or suspicious activity.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.4.2.7",
       "Description": "Checks if Kubernetes resource monitoring metrics collection is enabled for a specific deployment or pod. The resource is considered NON_COMPLIANT if the 'spec.monitoring.enabled' field is set to false.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.4.2: Audit logs are reviewed to identify anomalies or suspicious activity.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.4.3.1",
       "Description": "Checks if Kubernetes alerts (such as those from Prometheus Alertmanager) have an action configured for firing, pending, or resolved states. Optionally checks if any actions match a specific handler or notification channel. The rule is NON_COMPLIANT if there is no action specified for the alert or the optional parameter.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.4.3: Audit logs are reviewed to identify anomalies or suspicious activity.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
@@ -8747,746 +8249,698 @@
     {
       "Id": "10.5.1.3",
       "Description": "Checks that there is at least one Kubernetes Audit Policy defined with security best practices. This rule is COMPLIANT if there is at least one Audit Policy that meets all of the following security standards.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.5.1: Audit log history is retained and available for analysis.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.5.1.4",
       "Description": "Checks if a Kubernetes Log retention policy is set to retain logs for more than 365 days or a specified retention period. The rule is NON_COMPLIANT if the retention period is less than MinRetentionTime, if specified, or else 365 days.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_maxage_set"
       ],
       "Attributes": [
         {
           "Section": "10.5.1: Audit log history is retained and available for analysis.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.5.1.5",
       "Description": "Checks if a Kubernetes Persistent Volume Claim (PVC) retention period is set to a specific number of days. The rule is NON_COMPLIANT if the retention period is less than the value specified by the parameter.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.5.1: Audit log history is retained and available for analysis.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.5.1.6",
       "Description": "Checks if point-in-time recovery (PITR) is enabled for Kubernetes persistent volume claims (PVCs). The rule is NON_COMPLIANT if PITR is not enabled for PVCs.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.5.1: Audit log history is retained and available for analysis.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.5.1.7",
       "Description": "Checks if Persistent Volumes (PVs) are bound to Persistent Volume Claims (PVCs), and optionally checks if the PVCs have a 'reclaimPolicy' set to 'Delete' when the associated Pods are terminated.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.5.1: Audit log history is retained and available for analysis.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.5.1.8",
       "Description": "Checks if a private Kubernetes Container Registry (e.g., Google Container Registry, Docker Registry) has at least one lifecycle policy configured. The rule is NON_COMPLIANT if no lifecycle policy is configured for the private registry.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.5.1: Audit log history is retained and available for analysis.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.5.1.9",
       "Description": "Checks if Kubernetes clusters are configured to send logs to a centralized logging service (e.g., Fluentd, ELK stack). The rule is COMPLIANT if logging is enabled for the pods in the cluster. This rule is NON_COMPLIANT if logging is not configured.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.5.1: Audit log history is retained and available for analysis.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.5.1.10",
       "Description": "Checks if Kubernetes clusters have audit logging enabled. The rule is NON_COMPLIANT if a Kubernetes cluster does not have audit logging enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.5.1: Audit log history is retained and available for analysis.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.5.1.11",
       "Description": "Checks if Kubernetes clusters are configured to send logs to a logging solution (like Elasticsearch or a centralized logging system). The rule is NON_COMPLIANT if logging is not configured.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.5.1: Audit log history is retained and available for analysis.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.5.1.12",
       "Description": "Checks if a Kubernetes PersistentVolume (PV) has a reclaim policy set to 'Delete' or 'Retain'. The PersistentVolume is CONFLICTING if there are no reclaim policy settings or the policy does not match the specified criteria.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.5.1: Audit log history is retained and available for analysis.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.5.1.13",
       "Description": "Checks if Kubernetes Persistent Volume Claims (PVCs) have lifecycle policies configured to automatically manage the lifecycle of storage resources. The rule is NON_COMPLIANT if the lifecycle policy is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.5.1: Audit log history is retained and available for analysis.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.6.3.1",
       "Description": "Checks if Kubernetes Ingress resources have access logging enabled. The rule is NON_COMPLIANT if 'accessLog' is not present in the Ingress configuration.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.6.3.2",
       "Description": "Checks if all methods in Kubernetes Ingress resources have access logging enabled. The rule is NON_COMPLIANT if access logging is not enabled, or if the logging level is neither ERROR nor INFO.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.6.3.3",
       "Description": "Checks if OpenTelemetry tracing is enabled on Kubernetes Ingress resources. The rule is COMPLIANT if tracing is enabled and NON_COMPLIANT otherwise.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.6.3.4",
       "Description": "Checks if a Kubernetes API server has audit logging enabled. The rule is NON_COMPLIANT if audit logging is not enabled, or if 'logLevel' is neither ERROR nor ALL.",
-      "Name": "Kubernetes API Server",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Kubernetes API Server"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.6.3.5",
       "Description": "Checks if Kubernetes Services are configured with an appropriate session affinity mode. The rule is NON_COMPLIANT if the service's session affinity does not match the user-defined session affinity settings.",
-      "Name": "Kubernetes Service",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Kubernetes Service"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.6.3.6",
       "Description": "Checks if Kubernetes Ingress resources are configured to log HTTP traffic to a specified logging service. The rule is NON_COMPLIANT if an Ingress resource does not have logging configured.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.6.3.7",
       "Description": "Checks if at least one Kubernetes Audit Policy is configured to log events for all API calls related to Pods. The rule is NON_COMPLIANT if there are no audit policies or if no policies record Pod events.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.6.3.8",
       "Description": "Checks if Kubernetes events have a corresponding alert configured in Prometheus for critical states. Optionally checks if any alerts match a specific label selector. The rule is NON_COMPLIANT if there is no alert specified for the event or optional parameter.",
-      "Name": "Prometheus",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Prometheus"
-        }
-      ]
-    },
-    {
-      "Id": "10.6.3.9",
-      "Description": "Checks if a Kubernetes resource type has a Prometheus alert for the named metric. For resource type, you can specify Pods, Deployments, StatefulSets, or Services. The rule is COMPLIANT if the named metric has a resource ID and Prometheus alert.",
-      "Name": "Prometheus",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Prometheus"
-        }
-      ]
-    },
-    {
-      "Id": "10.6.3.10",
-      "Description": "The rule identifier for enabling CloudTrail is CLOUD_TRAIL_ENABLED, while the rule name used in the implementation is cloudtrail-enabled.",
-      "Name": "AWS CloudTrail",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "AWS CloudTrail"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.6.3.11",
       "Description": "Checks if a Kubernetes Pod has at least one logging mechanism (e.g., Fluentd, Logstash) enabled. The rule is NON_COMPLIANT if all logging configurations are set to 'DISABLED'.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.6.3.12",
       "Description": "Checks if logging is enabled with a valid severity level for Kubernetes Pod events. The rule is NON_COMPLIANT if logging is not enabled or Pod logging has a severity level that is not valid.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.6.3.13",
       "Description": "Checks if a Kubernetes cluster has audit logging enabled for its API server. The rule is NON_COMPLIANT if audit logging is not enabled for the API server in the Kubernetes cluster.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.6.3.14",
       "Description": "Checks if Kubernetes has logging enabled for its client connections to ensure compliance. The rule is NON_COMPLIANT if the 'logging.enabled' setting is set to false in the Kubernetes API Server configuration.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.6.3.15",
       "Description": "Checks if detailed monitoring is enabled for Pods in Kubernetes. The rule is NON_COMPLIANT if detailed monitoring (e.g., custom metrics or logging) is not set up for the Pods.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.6.3.16",
       "Description": "Checks if Kubernetes Pods have read-only access to their root filesystems. The rule is NON_COMPLIANT if the readOnlyRootFilesystem parameter in the Pod security context is set to 'false'.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_root_containers_admission"
       ],
       "Attributes": [
         {
           "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.6.3.17",
       "Description": "Checks if logging is configured for active Kubernetes Pods. This rule is NON_COMPLIANT if an active Pod does not have the logging configuration (such as a sidecar for logging or specific logging annotations) defined or the value for logging is null in at least one container in the Pod specification.",
-      "Name": "Kubernetes Pods",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Kubernetes Pods"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.6.3.18",
       "Description": "Checks if a Kubernetes cluster has logging enabled via a logging solution like Fluentd or Elasticsearch. The rule is NON_COMPLIANT if logging is not enabled for all log types (e.g., application logs, system logs, audit logs).",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.6.3.19",
       "Description": "Checks if Kubernetes clusters are configured to send logs to a centralized logging solution (like Elasticsearch or fluentd). The rule is NON_COMPLIANT if the value of 'logOptions' is not configured properly or set to false.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.6.3.20",
       "Description": "Checks if the Kubernetes Ingress resources have access logging enabled. The rule is NON_COMPLIANT if the ingress annotations for 'nginx.ingress.kubernetes.io/access-log' are not set to true or the 'nginx.ingress.kubernetes.io/access-log-bucket' annotation does not match the specified S3 bucket name.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.6.3.21",
       "Description": "Verifies if Kubernetes users (or service accounts) are associated with at least one Role or ClusterRole binding.",
-      "Name": "Kubernetes Role-Based Access Control (RBAC)",
+      "Name": "Role-Based Access Control (RBAC)",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Kubernetes Role-Based Access Control (RBAC)"
+          "Service": "Role-Based Access Control (RBAC)"
         }
       ]
     },
     {
       "Id": "10.6.3.22",
       "Description": "Checks if Kubernetes clusters have auditing enabled. The rule is NON_COMPLIANT if auditing is not enabled for a cluster.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.6.3.23",
       "Description": "Checks if a Kubernetes cluster has auditing enabled and configured properly. The rule is NON_COMPLIANT if auditing is not enabled or configured as required.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "10.6.3.24",
-      "Description": "In Kubernetes, the equivalent concept to monitoring multi-region cloud resources could be represented via a combination of multi-cluster or multi-namespace configurations along with monitoring tools like Prometheus or Grafana, ensuring observability across different geographical locations, similar to how a cloud trail would log events across multiple regions.",
-      "Name": "Kubernetes",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.6.3.25",
       "Description": "Checks if a Kubernetes cluster has logging enabled for audit logs. The rule is NON_COMPLIANT if an audit log is not enabled for the Kubernetes cluster.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.6.3.26",
       "Description": "Checks if Kubernetes Network Policies have logging enabled. The rule is NON_COMPLIANT if a logging type is not configured. You can specify which logging type you want the rule to check.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.6.3.27",
       "Description": "Checks if Kubernetes clusters have Role-Based Access Control (RBAC) enabled. The rule is NON_COMPLIANT if RBAC is not configured for the Kubernetes cluster.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.6.3.28",
       "Description": "Checks if Kubernetes pods have logging enabled to send logs to a centralized logging system, such as Elasticsearch or Fluentd. The rule is NON_COMPLIANT if pods do not have proper logging configurations to push logs to the centralized logging system.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.6.3.29",
       "Description": "Checks if respective logs of Kubernetes clusters are enabled. The rule is NON_COMPLIANT if any log types such as audit logs or application logs are not enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.6.3.30",
       "Description": "Checks if Kubernetes clusters are configured to log audits to a specific log destination. The rule is NON_COMPLIANT if audit logging is not enabled for a Kubernetes cluster or if the 'logDestination' parameter is provided but the audit logging destination does not match.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.6.3.31",
       "Description": "Checks if Kubernetes clusters have the specified security settings. The rule is NON_COMPLIANT if the Kubernetes cluster is not using encryption for secrets, or if a cluster does not have audit logging enabled.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_secret_access"
       ],
       "Attributes": [
         {
           "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "10.6.3.32",
       "Description": "Checks if DNS query logging is enabled for your Kubernetes cluster's CoreDNS configuration. The rule is NON_COMPLIANT if DNS query logging is not enabled for CoreDNS.",
-      "Name": "CoreDNS",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "CoreDNS"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.6.3.33",
       "Description": "Checks if a Kubernetes Role or ClusterRole does not allow blocklisted verbs (e.g., 'get', 'delete') on resources within a namespace for principals from other namespaces. For example, the rule checks that the Role or ClusterRole does not allow any actions like 'get pods' or 'delete deployments' on resources within any namespace. The rule is NON_COMPLIANT if any blocklisted actions are allowed by the Role or ClusterRole.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.6.3.34",
       "Description": "Checks if logging is enabled for your Kubernetes pods. The rule is NON_COMPLIANT if logging is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.6.3.35",
       "Description": "Verifies that the Kubernetes ClusterRole and RoleBinding do not grant permissions to access resources across different namespaces unless explicitly specified by the control policies you define.",
-      "Name": "Kubernetes RBAC (Role-Based Access Control)",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Kubernetes RBAC (Role-Based Access Control)"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "10.6.3.36",
       "Description": "Checks if a specific Kubernetes cluster has the PodSecurity admission controller enabled. The rule is NON_COMPLIANT if the PodSecurity admission controller is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_security_context_deny_plugin"
       ],
       "Attributes": [
         {
           "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.6.3.37",
       "Description": "Checks if Kubernetes Event Logging is enabled for the delivery status of event notifications sent to a namespace. The rule is NON_COMPLIANT if the event logging for notifications is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.6.3.38",
       "Description": "Checks if Kubernetes Pod has logging enabled. The rule is NON_COMPLIANT if a Pod does not have logging configured or the logging level is below the minimum required settings.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.6.3.39",
       "Description": "Checks if Kubernetes Network Policies are applied and enforced for all namespaces. The rule is NON_COMPLIANT if network policies are not configured for at least one namespace.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.6.3.40",
       "Description": "Checks if logging is enabled on Kubernetes Network Policies. The rule is NON_COMPLIANT if logging is enabled but the logging destination does not match the specified value.",
-      "Name": "Kubernetes Network Policies",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Kubernetes Network Policies"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.6.3.41",
       "Description": "Checks if Kubernetes Network Policy metrics collection on a specific Network Policy is enabled. The policy is NON_COMPLIANT if the 'spec.policyTypes' field does not include 'Ingress' or 'Egress'.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.6.3.42",
       "Description": "Checks if logging is enabled on Kubernetes Network Policies. The rule is NON_COMPLIANT for a Network Policy if it does not have logging enabled.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.6.3: Time-synchronization mechanisms support consistent time settings across all systems.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.7.1.1",
       "Description": "Checks if OpenTelemetry tracing is enabled on Kubernetes REST APIs. The rule is COMPLIANT if OpenTelemetry tracing is enabled and NON_COMPLIANT otherwise.",
-      "Name": "Kubernetes API",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.7.1: Failures of critical security control systems are detected, reported, and responded to promptly.",
-          "Service": "Kubernetes API"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.7.1.2",
       "Description": "Checks if your Kubernetes deployments send event notifications to a designated service, such as an external monitoring tool or messaging system (e.g., Slack, PagerDuty). Optionally checks if specified external services are used. The rule is NON_COMPLIANT if Kubernetes deployments do not send notifications.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.7.1: Failures of critical security control systems are detected, reported, and responded to promptly.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.7.1.3",
       "Description": "Checks if Kubernetes PodDisruptionBudgets have a specified action for the conditions when 'disruptionAllowed' is not adhered to, i.e., when disruptions are allowed or not allowed. Optionally checks if any actions match a specific label or annotation. The rule is NON_COMPLIANT if there is no action specified for the PodDisruptionBudget or the optional parameter.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.7.1: Failures of critical security control systems are detected, reported, and responded to promptly.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "10.7.1.4",
-      "Description": "Checks if a Kubernetes resource type (such as Pods, Deployments, or StatefulSets) has a Prometheus alert for the specified metric. The rule is COMPLIANT if the named metric has a resource identifier and a corresponding Prometheus alert.",
-      "Name": "Kubernetes",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.7.1: Failures of critical security control systems are detected, reported, and responded to promptly.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.7.1.5",
       "Description": "Checks if detailed monitoring is enabled for Kubernetes Pods. The rule is NON_COMPLIANT if detailed monitoring (such as Prometheus metrics) is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.7.1: Failures of critical security control systems are detected, reported, and responded to promptly.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.7.1.6",
       "Description": "Checks if Kubernetes Pod Security Policy is enabled for a Kubernetes cluster. The rule is NON_COMPLIANT if Pod Security Policy is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_security_context_deny_plugin"
       ],
       "Attributes": [
         {
           "Section": "10.7.1: Failures of critical security control systems are detected, reported, and responded to promptly.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
@@ -9505,336 +8959,288 @@
     {
       "Id": "10.7.1.8",
       "Description": "Checks if Kubernetes logging for security metrics collection on a specific Pod or Deployment is enabled. The rule is NON_COMPLIANT if the 'logging.enabled' field is set to false.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.7.1: Failures of critical security control systems are detected, reported, and responded to promptly.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.7.2.1",
       "Description": "Checks if OpenTelemetry tracing is enabled on Kubernetes services. The rule is COMPLIANT if tracing is enabled and NON_COMPLIANT otherwise.",
-      "Name": "Kubernetes Services",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.7.2: Failures of critical security control systems are detected, reported, and responded to promptly.",
-          "Service": "Kubernetes Services"
-        }
-      ]
-    },
-    {
-      "Id": "10.7.2.2",
-      "Description": "Checks if your Kubernetes resources (such as Deployments or StatefulSets) send event notifications to an external notification system (like an SNS topic). Optionally checks if specified notification endpoints are used. The rule is NON_COMPLIANT if Kubernetes resources do not send notifications.",
-      "Name": "Kubernetes",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.7.2: Failures of critical security control systems are detected, reported, and responded to promptly.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.7.2.3",
       "Description": "Checks if Kubernetes custom resource alerts (e.g., Prometheus Alertmanager alerts) have an action configured for firing (ALARM), pending (INSUFFICIENT_DATA), or resolved (OK) states. Optionally checks if any actions match a specified Kubernetes resource (like a Service or Deployment). The rule is NON_COMPLIANT if there is no action specified for the alert or optional parameter.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.7.2: Failures of critical security control systems are detected, reported, and responded to promptly.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "10.7.2.4",
-      "Description": "Checks if a Kubernetes resource type has a Prometheus alert for the named metric. For resource types, you can specify Pods, Deployments, StatefulSets, or Services. The rule is COMPLIANT if the named metric has a resource ID and Prometheus alert.",
-      "Name": "Prometheus",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "10.7.2: Failures of critical security control systems are detected, reported, and responded to promptly.",
-          "Service": "Prometheus"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.7.2.5",
       "Description": "Checks if Prometheus monitoring is enabled for Kubernetes pods. The rule is NON_COMPLIANT if Prometheus monitoring is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.7.2: Failures of critical security control systems are detected, reported, and responded to promptly.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.7.2.6",
       "Description": "Checks if the Kubernetes Security Context is configured for a Pod. The rule is NON_COMPLIANT if the Security Context is not defined, which could lead to security vulnerabilities.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_security_context_deny_plugin"
       ],
       "Attributes": [
         {
           "Section": "10.7.2: Failures of critical security control systems are detected, reported, and responded to promptly.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "10.7.2.7",
       "Description": "Checks if Kubernetes Event Logging is enabled for the delivery status of events sent to a namespace or pod. The rule is NON_COMPLIANT if the event logging for messages is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.7.2: Failures of critical security control systems are detected, reported, and responded to promptly.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "10.7.2.8",
       "Description": "Checks if the Kubernetes security metrics collection is enabled for Network Policies. The rule is NON_COMPLIANT if the 'spec.metrics.enabled' field is set to false.",
-      "Name": "Kubernetes Network Policies",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "10.7.2: Failures of critical security control systems are detected, reported, and responded to promptly.",
-          "Service": "Kubernetes Network Policies"
-        }
-      ]
-    },
-    {
-      "Id": "11.3.1.1.1",
-      "Description": "Verifies that all specified Kubernetes applications (such as Deployments, StatefulSets, etc.) are deployed and running in the cluster. Optionally, it can check for the minimum acceptable version of these applications. Additionally, it can be scoped to certain nodes based on their labels or annotations to apply the check only to nodes matching a specified platform.",
-      "Name": "Kubernetes",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "11.3.1.1: External and internal vulnerabilities are regularly identified, prioritized, and addressed.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "11.3.1.1.2",
       "Description": "Checks if the compliance status of the Kubernetes node's patch compliance is UP_TO_DATE or OUTDATED after the patch installation on the node. The rule is compliant if the field status is UP_TO_DATE.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "11.3.1.1: External and internal vulnerabilities are regularly identified, prioritized, and addressed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "11.3.1.2.1",
       "Description": "Checks if a private Kubernetes container registry has image scanning enabled. The rule is NON_COMPLIANT if the container images in the registry are not scanned regularly for vulnerabilities or are not scanned upon image push. For detailed information on enabling image scanning, refer to the Kubernetes container security best practices documentation.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "11.3.1.2: External and internal vulnerabilities are regularly identified, prioritized, and addressed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "11.3.1.3.1",
       "Description": "Verifies that all specified Kubernetes applications (pods or deployments) are present in the cluster, with the option to check for minimum acceptable versions and to target specific node/platform types.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "11.3.1.3: External and internal vulnerabilities are regularly identified, prioritized, and addressed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "11.3.1.3.2",
       "Description": "Checks if the compliance status of a Kubernetes pod's deployment is READY or NOT_READY after updates or changes to the pod. The rule is compliant if the condition status is READY.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "11.3.1.3: External and internal vulnerabilities are regularly identified, prioritized, and addressed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "11.3.1.3.3",
       "Description": "Checks if a private Kubernetes container registry has image scanning enabled. The rule is NON_COMPLIANT if the private container registry's scan policy is not set to scan on push or continuous scan.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "11.3.1.3: External and internal vulnerabilities are regularly identified, prioritized, and addressed.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "11.3.1.1",
-      "Description": "Verifies if all specified Kubernetes applications (such as Deployments, StatefulSets, etc.) are deployed in the cluster. Optionally, the minimum required version of each application can be checked. Additionally, the rule can be limited to specific node selectors or taints to target nodes running on certain platforms.",
-      "Name": "Kubernetes",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "11.3.1: External and internal vulnerabilities are regularly identified, prioritized, and addressed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "11.3.1.2",
       "Description": "Checks if the compliance status of the Kubernetes deployment is 'COMPLIANT' or 'NON_COMPLIANT' after the update to the application. The rule is compliant if the status field in the deployment returns 'COMPLIANT'.",
-      "Name": "Kubernetes Deployment",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "11.3.1: External and internal vulnerabilities are regularly identified, prioritized, and addressed.",
-          "Service": "Kubernetes Deployment"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "11.3.1.3",
       "Description": "Checks if a private Kubernetes container registry (e.g., Azure Container Registry, Google Container Registry) has image scanning enabled. The rule is NON_COMPLIANT if the container registry's scan frequency is not set to scan on push or continuous scan.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "11.3.1: External and internal vulnerabilities are regularly identified, prioritized, and addressed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "11.5.1.1.1",
       "Description": "Checks whether a Kubernetes LoadBalancer Service or Ingress resource has any associated protection mechanisms, such as network policies for security, and if they have specified Ingress rules associated for additional security configurations.",
-      "Name": "Kubernetes LoadBalancer Service / Ingress",
+      "Name": "Core",
       "Checks": [
         "core_minimize_admission_hostport_containers"
       ],
       "Attributes": [
         {
           "Section": "11.5.1.1: Network intrusions and unexpected file changes are detected and responded to.",
-          "Service": "Kubernetes LoadBalancer Service / Ingress"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "11.5.1.1.2",
       "Description": "Checks if Kubernetes Pod Security Policies are enabled in your Kubernetes cluster. If you provide a central management cluster, the policy evaluates the Pod Security results in the centralized context. The policy is COMPLIANT when Pod Security Policies are enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_security_context_deny_plugin"
       ],
       "Attributes": [
         {
           "Section": "11.5.1.1: Network intrusions and unexpected file changes are detected and responded to.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "11.5.1.1",
       "Description": "Checks whether a Kubernetes Service has Network Policies or Ingress controllers configured for protection against DDoS attacks. It also checks if they have specific authorization rules defined for the Ingress resources.",
-      "Name": "Kubernetes Service",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "11.5.1: Network intrusions and unexpected file changes are detected and responded to.",
-          "Service": "Kubernetes Service"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "11.5.1.2",
       "Description": "Checks if Kubernetes Pod Security Policies are enabled in your Kubernetes cluster. If you provide a cluster for centralization, the rule evaluates the Pod Security Policies in the centralized cluster. The rule is COMPLIANT when Pod Security Policies are enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_security_context_deny_plugin"
       ],
       "Attributes": [
         {
           "Section": "11.5.1: Network intrusions and unexpected file changes are detected and responded to.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "11.5.2.1",
       "Description": "Checks if your Kubernetes resources (like Pods, Deployments, etc.) send event notifications to a designated Pub/Sub topic. Optionally checks if specified Pub/Sub topics are utilized. The rule is NON_COMPLIANT if Kubernetes resources do not send notifications.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "11.5.2: Network intrusions and unexpected file changes are detected and responded to.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "11.5.2.2",
       "Description": "Verifies if Kubernetes liveness probes or readiness probes have valid actions configured for different states. It checks if any actions are set to change the pod's status based on these probes. The rule is NON_COMPLIANT if no actions are specified for the probes.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "11.5.2: Network intrusions and unexpected file changes are detected and responded to.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "11.5.2.3",
       "Description": "Verifies if Kubernetes alerts configured in Prometheus with the specified metric name meet the defined conditions.",
-      "Name": "Prometheus",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "11.5.2: Network intrusions and unexpected file changes are detected and responded to.",
-          "Service": "Prometheus"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "11.5.2.4",
       "Description": "Checks if Kubernetes audit logs are configured to send logs to a log management system like Elasticsearch or a logging solution such as Fluentd or another log aggregator. The audit logging is NON_COMPLIANT if the output destination is not specified or if the audit log file is not configured.",
-      "Name": "Kubernetes Audit Logging",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "11.5.2: Network intrusions and unexpected file changes are detected and responded to.",
-          "Service": "Kubernetes Audit Logging"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "11.5.2.5",
       "Description": "Checks if Kubernetes Event Notifications for a specific resource (e.g., Pod or Service) are enabled. The rule is NON_COMPLIANT if Event Notifications are not set on the resource, or if the event type or notification endpoint do not match the expected event types and notification URL.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "11.5.2: Network intrusions and unexpected file changes are detected and responded to.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
@@ -9850,27 +9256,15 @@
         }
       ]
     },
-    {
-      "Id": "11.6.1.1",
-      "Description": "Checks if your Kubernetes resources (such as Deployments or StatefulSets) send event notifications to a specified messaging service (such as NATS or RabbitMQ). Optionally checks if specific messaging queues or topics are utilized for notifications. The rule is NON_COMPLIANT if Kubernetes resources do not send notifications.",
-      "Name": "Kubernetes",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "11.6.1: Unauthorized changes on payment pages are detected and responded to.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
     {
       "Id": "11.6.1.2",
       "Description": "Checks if Kubernetes Horizontal Pod Autoscaler (HPA) has correctly configured scaling actions for different metrics. Optionally checks if any scaling actions match a specific deployment or resource. The rule is NON_COMPLIANT if there are no scaling actions defined for the HPA or optional parameters.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "11.6.1: Unauthorized changes on payment pages are detected and responded to.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
@@ -9889,14 +9283,14 @@
     {
       "Id": "11.6.1.4",
       "Description": "Checks if Kubernetes Audit Logs are configured to send logs to a specified logging service. The audit logging is NON_COMPLIANT if the logging configuration does not point to an active logging backend such as Elasticsearch or a central logging service.",
-      "Name": "Kubernetes Audit Logging",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "11.6.1: Unauthorized changes on payment pages are detected and responded to.",
-          "Service": "Kubernetes Audit Logging"
+          "Service": "API Server"
         }
       ]
     },
@@ -9915,36 +9309,24 @@
     {
       "Id": "11.6.1.6",
       "Description": "Checks if Kubernetes Event Logging is enabled for the delivery status of events sent to a specified namespace. The rule is NON_COMPLIANT if the event logging for notifications is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "11.6.1: Unauthorized changes on payment pages are detected and responded to.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "12.10.5.1",
-      "Description": "Checks if your Kubernetes resources (like Deployments or StatefulSets) are configured to send events to an external notification system, such as an SNS-like service. Optionally checks if specified notification endpoints are used. The rule is NON_COMPLIANT if Kubernetes resources do not send notifications.",
-      "Name": "Kubernetes",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "12.10.5: Suspected and confirmed security incidents that could impact the CDE are responded to immediately.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "12.10.5.2",
       "Description": "Checks if Kubernetes PodDisruptionBudgets (PDBs) have a set number of allowed disruptions configured. Optionally checks if any disruptions match a specific label selector. The rule is NON_COMPLIANT if there are no disruptions allowed in the PDB or optional parameter.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "12.10.5: Suspected and confirmed security incidents that could impact the CDE are responded to immediately.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
@@ -9963,26 +9345,26 @@
     {
       "Id": "12.10.5.4",
       "Description": "Checks if Kubernetes audit logging is configured to send logs to a specified logging backend. The audit policy is NON_COMPLIANT if the audit backend configuration is not set or if the logging destination is empty.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "12.10.5: Suspected and confirmed security incidents that could impact the CDE are responded to immediately.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "12.10.5.5",
       "Description": "Checks if Kubernetes events are enabled for a specific resource. The rule is NON_COMPLIANT if events are not set for the resource, or if the event type or destination do not match the eventTypes and destination parameters.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "12.10.5: Suspected and confirmed security incidents that could impact the CDE are responded to immediately.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
@@ -10001,154 +9383,154 @@
     {
       "Id": "12.4.2.1.1",
       "Description": "Checks if a Kubernetes cluster shares resources (like ConfigMaps or Secrets) to multiple namespaces when integration is enabled with Kubernetes RBAC. The rule is NON_COMPLIANT if the resource is scoped to a single namespace instead of being cluster-wide.",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_secret_access"
       ],
       "Attributes": [
         {
           "Section": "12.4.2.1: PCI DSS compliance is managed.",
-          "Service": "Kubernetes RBAC"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "2.2.5.1",
       "Description": "Checks if HTTP to HTTPS redirection is configured on all Ingress resources of the Kubernetes cluster. The rule is NON_COMPLIANT if one or more Ingress resources do not have an HTTP to HTTPS redirection configured. The rule is also NON_COMPLIANT if one or more Ingress resources have forwarding to an HTTP service instead of redirection.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "2.2.5: System components are configured and managed securely.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "2.2.5.2",
       "Description": "Checks if Kubernetes Ingress resources are using deprecated SSL protocols for HTTPS communication between Ingress controllers and backend services. This rule is NON_COMPLIANT if any Ingress definition includes 'sslPolicy' that allows 'SSLv3'.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "2.2.5: System components are configured and managed securely.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "2.2.5.3",
       "Description": "Checks if Kubernetes Ingress resources are using a minimum security policy and cipher suite of TLSv1.2 or greater for HTTPS connections. This rule is NON_COMPLIANT for an Ingress resource if the minTLSVersion is below 'VersionTLS12'.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "2.2.5: System components are configured and managed securely.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "2.2.5.4",
       "Description": "Checks if Kubernetes Ingress resources are using a custom TLS secret and are configured to use SNI to serve HTTPS requests. The rule is NON_COMPLIANT if a custom TLS secret is associated but the Ingress is not configured for SNI.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "2.2.5: System components are configured and managed securely.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "2.2.5.5",
       "Description": "Checks if Kubernetes Ingress resources are encrypting traffic to backend services. The rule is NON_COMPLIANT if 'backendService' is using unencrypted HTTP endpoints instead of HTTPS or if 'TLS settings' are not properly configured for secure connections.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "2.2.5: System components are configured and managed securely.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "2.2.5.6",
       "Description": "Checks if your Kubernetes Ingress resources enforce HTTPS. The rule is NON_COMPLIANT if any Ingress resource allows HTTP traffic without redirecting to HTTPS.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "2.2.5: System components are configured and managed securely.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "2.2.5.7",
       "Description": "Check if Kubernetes pods that require encrypted communications between instances have TLS (Transport Layer Security) enabled for pod-to-pod communication. The rule is NON_COMPLIANT if TLS encryption is not enabled for these communications.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "2.2.5: System components are configured and managed securely.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "2.2.5.8",
       "Description": "Checks whether your Kubernetes Ingress resources are using a custom SSL certificate for secure connections. This rule only applies if there are Ingress resources defined with SSL settings.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "2.2.5: System components are configured and managed securely.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "2.2.5.9",
       "Description": "Checks if your Kubernetes Ingress resource uses a predefined TLS configuration. The rule is NON_COMPLIANT if the Ingress TLS configuration does not equal the value of the parameter 'predefinedPolicyName'.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "2.2.5: System components are configured and managed securely.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "2.2.5.10",
       "Description": "Checks if your Kubernetes Service is configured with TLS for secure communication. The rule is NON_COMPLIANT if a Service does not have an associated TLS configuration for HTTPS traffic.",
-      "Name": "Kubernetes Service",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "2.2.5: System components are configured and managed securely.",
-          "Service": "Kubernetes Service"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "2.2.5.11",
       "Description": "Checks if Kubernetes clusters have Pod Security Policies enabled. The rule is NON_COMPLIANT if a Pod Security Policy is not attached to the cluster or the policy does not satisfy the specified rule parameters.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_security_context_deny_plugin"
       ],
       "Attributes": [
         {
           "Section": "2.2.5: System components are configured and managed securely.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
@@ -10167,78 +9549,78 @@
     {
       "Id": "2.2.5.13",
       "Description": "Check if Kubernetes Secrets are encrypted at rest and if communication between pods is encrypted. The rule is NON_COMPLIANT if encryption for Secrets is not enabled or if Network Policies do not ensure encrypted communication between pods.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_no_secrets_envs"
       ],
       "Attributes": [
         {
           "Section": "2.2.5: System components are configured and managed securely.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "2.2.5.14",
       "Description": "Checks if Kubernetes clusters require TLS encryption for communication. The rule is NON_COMPLIANT if any Kubernetes cluster has the API Server's --insecure-port parameter set to a value other than 0, allowing unencrypted traffic.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "2.2.5: System components are configured and managed securely.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "2.2.5.15",
       "Description": "Checks if Ingress resources have rules that require TLS for connections. The rule is NON_COMPLIANT if any Ingress resource allows HTTP connections without TLS.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "2.2.5: System components are configured and managed securely.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "2.2.5.16",
       "Description": "Checks if a Kubernetes service uses FTP for endpoint connection. The rule is NON_COMPLIANT if the service type is set to 'ClusterIP' with a port configuration for FTP (port 21).",
-      "Name": "Kubernetes Service",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "2.2.5: System components are configured and managed securely.",
-          "Service": "Kubernetes Service"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "2.2.5.17",
       "Description": "Verifies that NetworkPolicies in Kubernetes are configured to limit incoming traffic only to specified ports, ensuring that unrestricted traffic ('0.0.0.0/0' or '::/0') is not allowed except on authorized TCP or UDP ports. If there are NetworkPolicies that do not specify the allowed ports, they are considered NON_COMPLIANT.",
-      "Name": "NetworkPolicies",
+      "Name": "Core",
       "Checks": [
         "core_minimize_admission_hostport_containers"
       ],
       "Attributes": [
         {
           "Section": "2.2.5: System components are configured and managed securely.",
-          "Service": "NetworkPolicies"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "2.2.7.1",
       "Description": "Checks if Ingress resources in Kubernetes are configured to redirect HTTP traffic to HTTPS. The rule is NON_COMPLIANT if one or more Ingress resources do not have HTTP to HTTPS redirection configured or if they forward traffic to another HTTP service instead of redirecting.",
-      "Name": "Ingress Controller",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "2.2.7: System components are configured and managed securely.",
-          "Service": "Ingress Controller"
+          "Service": "API Server"
         }
       ]
     },
@@ -10257,38 +9639,38 @@
     {
       "Id": "2.2.7.3",
       "Description": "Checks if Kubernetes Ingress resources are enforcing SSL/TLS for traffic to backend services. The rule is NON_COMPLIANT if 'backendProtocol' is 'http' or if 'backendProtocol' is 'https' but 'tls' is not specified for the Ingress resource.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "2.2.7: System components are configured and managed securely.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "2.2.7.4",
       "Description": "Checks if your Kubernetes Ingress resources enforce HTTPS connections. The rule is NON_COMPLIANT if the Ingress resource allows HTTP traffic without redirecting to HTTPS.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "2.2.7: System components are configured and managed securely.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "2.2.7.5",
       "Description": "Checks if your Kubernetes Pods have NetworkPolicies set to enforce traffic control. The rule is NON_COMPLIANT if a Pod is not restricted by NetworkPolicies to prevent unauthorized access.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "2.2.7: System components are configured and managed securely.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
@@ -10307,28 +9689,28 @@
     {
       "Id": "2.2.7.7",
       "Description": "Checks if Kubernetes clusters have TLS encryption enabled for communication between pods and services. The rule is NON_COMPLIANT if TLS encryption is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "2.2.7: System components are configured and managed securely.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "2.2.7.8",
       "Description": "Checks if Kubernetes Secrets are encrypted in transit. The rule is NON_COMPLIANT for a Kubernetes cluster if 'encryptionProviders' are not configured to enable encryption for Secrets during transit.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_no_secrets_envs"
       ],
       "Attributes": [
         {
           "Section": "2.2.7: System components are configured and managed securely.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
@@ -10347,78 +9729,78 @@
     {
       "Id": "2.2.7.10",
       "Description": "Checks if the Ingress resources in Kubernetes use SSL certificates provided by a Certificate Manager (e.g., Cert-Manager or similar). To use this rule, an Ingress resource should be configured with TLS settings. This rule is only applicable to Ingress resources. This rule does not check services without Ingress, such as NodePorts or ClusterIPs.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "2.2.7: System components are configured and managed securely.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "2.2.7.11",
       "Description": "Checks whether your Kubernetes Ingress resources are using a custom TLS configuration. The rule is only applicable if there are TLS-enabled Ingress resources defined.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "2.2.7: System components are configured and managed securely.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "2.2.7.12",
       "Description": "Checks if your Kubernetes Ingress controllers use a predefined TLS policy. The rule is NON_COMPLIANT if the Ingress TLS configuration does not match the specified 'predefinedPolicyName'.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "2.2.7: System components are configured and managed securely.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "2.2.7.13",
       "Description": "Checks if the Kubernetes Service is configured with HTTPS or SSL settings for its corresponding LoadBalancer. The rule is NON_COMPLIANT if the Service is not configured with SSL or HTTPS.",
-      "Name": "Kubernetes Service",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "2.2.7: System components are configured and managed securely.",
-          "Service": "Kubernetes Service"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "2.2.7.14",
       "Description": "Verifies if Kubernetes clusters have security contexts with Kerberos enabled. The rule is NON_COMPLIANT if a security context is not defined for the pod or the security context does not satisfy the specified rule parameters for Kerberos authentication.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_security_context_deny_plugin"
       ],
       "Attributes": [
         {
           "Section": "2.2.7: System components are configured and managed securely.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "2.2.7.15",
       "Description": "Checks if a Kubernetes cluster enforces encrypted communication (TLS) for inter-pod communication. The rule is NON_COMPLIANT if plain text communication is allowed between pods.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "2.2.7: System components are configured and managed securely.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
@@ -10437,38 +9819,38 @@
     {
       "Id": "2.2.7.17",
       "Description": "Check if Kubernetes cluster nodes have encrypted communication enabled. The rule is NON_COMPLIANT if the encryption between nodes is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "2.2.7: System components are configured and managed securely.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "2.2.7.18",
       "Description": "Checks if Kubernetes clusters require TLS/SSL encryption for connections to SQL clients. The rule is NON_COMPLIANT if any Kubernetes cluster has the configuration for TLS/SSL not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "2.2.7: System components are configured and managed securely.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "2.2.7.19",
       "Description": "Checks if Kubernetes services have Network Policies that require requests to use secure connections (TLS). The rule is NON_COMPLIANT if any service allows HTTP traffic without enforcing TLS.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "2.2.7: System components are configured and managed securely.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
@@ -10508,51 +9890,27 @@
         }
       ]
     },
-    {
-      "Id": "3.2.1.4",
-      "Description": "Checks if a Kubernetes StatefulSet has a retention policy set for the PVCs that is equal to or greater than a specified number of days. The rule is NON_COMPLIANT if the retention policy is less than the specified value.",
-      "Name": "Kubernetes StatefulSet",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "3.2.1: Storage of account data is kept to a minimum.",
-          "Service": "Kubernetes StatefulSet"
-        }
-      ]
-    },
-    {
-      "Id": "3.2.1.5",
-      "Description": "Checks if point-in-time recovery (PITR) is enabled for the main persistent storage service within Kubernetes, such as a StatefulSet with a database service. The rule is NON_COMPLIANT if PITR functionality is not configured for the storage used by StatefulSets.",
-      "Name": "StatefulSet / Persistent Volume",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "3.2.1: Storage of account data is kept to a minimum.",
-          "Service": "StatefulSet / Persistent Volume"
-        }
-      ]
-    },
     {
       "Id": "3.2.1.6",
       "Description": "Checks if Persistent Volumes (PVs) are bound to Persistent Volume Claims (PVCs) in Kubernetes. Optionally checks if the storage class of the PVC specifies reclaim policy as 'Delete' when the PVC is deleted.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.2.1: Storage of account data is kept to a minimum.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.2.1.7",
       "Description": "Checks if a private Kubernetes container registry has at least one lifecycle policy configured. The rule is NON_COMPLIANT if no lifecycle policy is configured for the Kubernetes container registry.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.2.1: Storage of account data is kept to a minimum.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
@@ -10571,12 +9929,12 @@
     {
       "Id": "3.2.1.9",
       "Description": "Checks if Kubernetes persistent volumes (PVs) have lifecycle policies configured. The rule is NON_COMPLIANT if a Kubernetes persistent volume does not have a defined reclaim policy.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.2.1: Storage of account data is kept to a minimum.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
@@ -10607,12 +9965,12 @@
     {
       "Id": "3.3.1.1.3",
       "Description": "Checks if a Kubernetes Namespace's resource quota for log retention is set to greater than 365 days or else a specified retention limit. The rule is NON_COMPLIANT if the log retention period is less than MinRetentionTime, if specified, or else 365 days.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.3.1.1: Sensitive authentication data (SAD) is not stored after authorization.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
@@ -10628,63 +9986,51 @@
         }
       ]
     },
-    {
-      "Id": "3.3.1.1.5",
-      "Description": "Checks if point-in-time recovery (PITR) is enabled for Kubernetes StatefulSets. The rule is NON_COMPLIANT if PITR is not enabled for StatefulSets.",
-      "Name": "Kubernetes StatefulSets",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "3.3.1.1: Sensitive authentication data (SAD) is not stored after authorization.",
-          "Service": "Kubernetes StatefulSets"
-        }
-      ]
-    },
     {
       "Id": "3.3.1.1.6",
       "Description": "Checks if Persistent Volumes (PVs) are bound to Persistent Volume Claims (PVCs). Optionally checks if PVCs have a finalizer to ensure they are deleted when the associated Pods are terminated.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.3.1.1: Sensitive authentication data (SAD) is not stored after authorization.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.3.1.1.7",
       "Description": "Checks if a private Kubernetes container registry has at least one lifecycle policy configured. The rule is NON_COMPLIANT if no lifecycle policy is configured for the private registry.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.3.1.1: Sensitive authentication data (SAD) is not stored after authorization.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.3.1.1.8",
       "Description": "Checks if a Kubernetes Persistent Volume (PV) has a Retain policy set for its lifecycle. The PV is considered NON_COMPLIANT if there are no active reclaim policies or the policies do not match the desired parameter values.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.3.1.1: Sensitive authentication data (SAD) is not stored after authorization.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.3.1.1.9",
       "Description": "Checks if Kubernetes buckets (such as those used with object storage solutions like MinIO or cloud providers) have a lifecycle management policy configured. The rule is NON_COMPLIANT if the lifecycle policy is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.3.1.1: Sensitive authentication data (SAD) is not stored after authorization.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
@@ -10700,29 +10046,17 @@
         }
       ]
     },
-    {
-      "Id": "3.3.1.3.2",
-      "Description": "Checks if a Kubernetes PersistentVolumeClaim (PVC) retains data for a period that meets the specified retention policy. The rule is NON_COMPLIANT if the PVC's retention strategy is less than the required retention period.",
-      "Name": "PersistentVolumeClaim",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "3.3.1.3: Sensitive authentication data (SAD) is not stored after authorization.",
-          "Service": "PersistentVolumeClaim"
-        }
-      ]
-    },
     {
       "Id": "3.3.1.3.3",
       "Description": "Checks if a Kubernetes Cluster's Log retention policy is set to retain logs for more than 365 days. The policy is NON_COMPLIANT if the retention period is less than MinRetentionTime, if specified, or else 365 days.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_maxage_set"
       ],
       "Attributes": [
         {
           "Section": "3.3.1.3: Sensitive authentication data (SAD) is not stored after authorization.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
@@ -10753,50 +10087,38 @@
     {
       "Id": "3.3.1.3.6",
       "Description": "Checks if Persistent Volumes (PVs) are bound to Persistent Volume Claims (PVCs). Optionally checks if the volumes are set to delete upon PVC deletion.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.3.1.3: Sensitive authentication data (SAD) is not stored after authorization.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.3.1.3.7",
       "Description": "Checks if a private Kubernetes container registry has at least one lifecycle policy configured. The rule is NON_COMPLIANT if no lifecycle policy is configured for the Kubernetes container registry.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.3.1.3: Sensitive authentication data (SAD) is not stored after authorization.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "3.3.1.3.8",
-      "Description": "Checks if a Kubernetes PersistentVolumeClaim (PVC) has a defined storage class and lifecycle rules. The claim is NON_COMPLIANT if there are no active storage class settings or the settings do not match the specified parameters.",
-      "Name": "Kubernetes",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "3.3.1.3: Sensitive authentication data (SAD) is not stored after authorization.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.3.1.3.9",
       "Description": "Checks if Kubernetes Persistent Volumes (PVs) have a retention policy configured. The rule is NON_COMPLIANT if a retention policy is not enabled on the Persistent Volume.",
-      "Name": "Kubernetes Persistent Volumes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "3.3.1.3: Sensitive authentication data (SAD) is not stored after authorization.",
-          "Service": "Kubernetes Persistent Volumes"
+          "Service": "RBAC"
         }
       ]
     },
@@ -10827,24 +10149,12 @@
     {
       "Id": "3.3.2.3",
       "Description": "Checks if a Kubernetes Pod's logging retention policy is set to greater than 365 days or a specified minimum retention time. The rule is NON_COMPLIANT if the retention period is less than MinRetentionTime, if specified, or else 365 days.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.3.2: Sensitive authentication data (SAD) is not stored after authorization.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "3.3.2.4",
-      "Description": "Checks if a Kubernetes StatefulSet's `spec.revisionHistoryLimit` is set to a specific number of revisions (days can be interpreted as a number of revisions). The rule is NON_COMPLIANT if the revision history limit is less than the value specified by the parameter.",
-      "Name": "Kubernetes",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "3.3.2: Sensitive authentication data (SAD) is not stored after authorization.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
@@ -10863,48 +10173,48 @@
     {
       "Id": "3.3.2.6",
       "Description": "Checks if Persistent Volumes (PVs) are bound to Pods in a Kubernetes cluster. Optionally checks if Persistent Volumes are configured to be deleted when their associated Pods are deleted.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.3.2: Sensitive authentication data (SAD) is not stored after authorization.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.3.2.7",
       "Description": "Checks if a private Kubernetes image registry has at least one lifecycle policy configured. The rule is NON_COMPLIANT if no lifecycle policy is configured for the Kubernetes private image registry.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.3.2: Sensitive authentication data (SAD) is not stored after authorization.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.3.2.8",
       "Description": "Checks if a Kubernetes Persistent Volume (PV) has a defined reclaim policy. The status is NON_COMPLIANT if there is no active reclaim policy or the policy does not match the required values.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.3.2: Sensitive authentication data (SAD) is not stored after authorization.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.3.2.9",
       "Description": "Checks if Kubernetes persistent volumes have lifecycle policies configured. The rule is NON_COMPLIANT if Kubernetes persistent volumes do not have lifecycle policies enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.3.2: Sensitive authentication data (SAD) is not stored after authorization.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
@@ -10935,26 +10245,26 @@
     {
       "Id": "3.3.3.3",
       "Description": "Checks if a Kubernetes Cluster's log retention policy for the logging service is set to retain logs for more than 365 days or else a specified retention period. The rule is NON_COMPLIANT if the retention period is less than MinRetentionTime, if specified, or else 365 days.",
-      "Name": "Kubernetes Logging Service",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_maxage_set"
       ],
       "Attributes": [
         {
           "Section": "3.3.3: Sensitive authentication data (SAD) is not stored after authorization.",
-          "Service": "Kubernetes Logging Service"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.3.3.4",
       "Description": "Checks if a Kubernetes Persistent Volume Claim (PVC) storage class retention period is set to a specific value. The rule is NON_COMPLIANT if the retention period is less than the value specified by the parameter.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.3.3: Sensitive authentication data (SAD) is not stored after authorization.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
@@ -10985,12 +10295,12 @@
     {
       "Id": "3.3.3.7",
       "Description": "Checks if a private Kubernetes container registry has at least one retention policy configured. The rule is NON_COMPLIANT if no retention policy is configured for the Kubernetes private container registry.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.3.3: Sensitive authentication data (SAD) is not stored after authorization.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
@@ -11009,570 +10319,534 @@
     {
       "Id": "3.3.3.9",
       "Description": "Checks if Kubernetes persistent volume claims (PVCs) have a storage lifecycle management policy configured. The rule is NON_COMPLIANT if the lifecycle policy for PVCs is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.3.3: Sensitive authentication data (SAD) is not stored after authorization.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.5.1.1.1",
       "Description": "Checks if Kubernetes Secrets that contain TLS certificates are about to expire within the specified number of days. TLS certificates in Kubernetes can be renewed, but manually managed certificates may not be automatically updated. The rule is NON_COMPLIANT if your certificates are about to expire.",
-      "Name": "Kubernetes Secrets",
+      "Name": "RBAC (Role-Based Access Control)",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.5.1.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes Secrets"
+          "Service": "RBAC (Role-Based Access Control)"
         }
       ]
     },
     {
       "Id": "3.5.1.1.2",
       "Description": "Checks if Kubernetes CertificateSigningRequests (CSRs) exist that are not in 'Approved' status. The rule is NON_COMPLIANT for CSRs that are not approved by the controller (i.e., in 'Pending' status).",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_csr_approval_access"
       ],
       "Attributes": [
         {
           "Section": "3.5.1.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "3.5.1.1.3",
       "Description": "Checks if a Kubernetes Ingress resource is configured with TLS. The rule is NON_COMPLIANT if the Ingress does not have an associated TLS secret for SSL termination.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.5.1.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.5.1.1.4",
       "Description": "Checks if the certificate associated with a Kubernetes Ingress resource is a custom SSL certificate. The rule is NON_COMPLIANT if an Ingress resource uses the default SSL certificate (kubernetes.io/tls-cert).",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "3.5.1.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.5.1.1.5",
       "Description": "Checks if Kubernetes Services of type LoadBalancer have TLS configured correctly using certificates from a trusted Certificate Authority (CA). This rule is NON_COMPLIANT if at least 1 LoadBalancer service has at least 1 listener (Ingress) that is configured without a valid TLS certificate from a supported CA or is configured with a certificate that is not trusted.",
-      "Name": "Kubernetes LoadBalancer Service",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "3.5.1.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes LoadBalancer Service"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.5.1.1.6",
       "Description": "Checks if the Ingress resources in Kubernetes use TLS certificates provided by a certificate management solution (like Cert-Manager). To use this rule, an Ingress resource with a TLS section must be configured in the cluster. This rule is only applicable to Ingress resources. This rule does not check for services without Ingress or other types of Load Balancers.",
-      "Name": "Ingress Controller",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "3.5.1.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Ingress Controller"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.5.1.1.7",
       "Description": "Checks if the Kubernetes Role or ClusterRole definitions do not allow actions on Kubernetes secrets that are disallowed by policy. The rule is NON_COMPLIANT if any disallowed action is permitted on Kubernetes secrets by the managed Role or ClusterRole.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_secret_access"
       ],
       "Attributes": [
         {
           "Section": "3.5.1.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "3.5.1.1.8",
       "Description": "Checks if the Role-Based Access Control (RBAC) settings in your Kubernetes cluster do not allow blocked actions on all cluster resources. The rule is NON_COMPLIANT if any blocked action is allowed on any resources in the cluster role bindings.",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "3.5.1.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes RBAC"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "3.5.1.1.9",
       "Description": "Checks if Kubernetes Secrets are not marked for deletion. The rule is NON_COMPLIANT if Secrets are scheduled for deletion.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.5.1.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.5.1.3.1",
       "Description": "Checks if Kubernetes TLS Secrets in your cluster are nearing expiration. Kubernetes does not automatically renew TLS Secrets. The rule is NON_COMPLIANT if your TLS Secrets are about to expire.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.5.1.3: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.5.1.3.2",
       "Description": "Checks if Kubernetes Certificate Authority (CA) has a root CA that is disabled. The rule is NON_COMPLIANT for root CAs with status that is not DISABLED.",
-      "Name": "Kubernetes",
+      "Name": "CONTROLLERMANAGER",
       "Checks": [
         "controllermanager_root_ca_file_set"
       ],
       "Attributes": [
         {
           "Section": "3.5.1.3: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "CONTROLLERMANAGER"
         }
       ]
     },
     {
       "Id": "3.5.1.3.3",
       "Description": "Checks if a Kubernetes Ingress resource uses TLS. The rule is NON_COMPLIANT if the Ingress does not have an associated TLS certificate.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.5.1.3: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Ingress"
-        }
-      ]
-    },
-    {
-      "Id": "3.5.1.3.4",
-      "Description": "Checks if a Kubernetes PersistentVolume (PV) has a ResourceQuota in place that restricts deletions of PersistentVolumeClaims (PVCs) associated with it. The rule is NON_COMPLIANT if the PersistentVolume does not have an associated ResourceQuota or has a ResourceQuota that does not suitably deny 'DELETE' actions on PVCs.",
-      "Name": "Kubernetes",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "3.5.1.3: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.5.1.3.5",
       "Description": "Checks if the TLS certificate associated with a Kubernetes Ingress resource is the default certificate. The rule is NON_COMPLIANT if the Ingress resource uses the default TLS certificate.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "3.5.1.3: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.5.1.3.6",
       "Description": "Checks if Kubernetes Pods are exposed to the public. The rule is NON_COMPLIANT if the Service type is set to 'LoadBalancer' or 'NodePort' without appropriate network policies.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_admission_hostport_containers"
       ],
       "Attributes": [
         {
           "Section": "3.5.1.3: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.5.1.3.7",
       "Description": "Checks if Kubernetes persistent volume claims (PVCs) are publicly accessible. The rule is NON_COMPLIANT if any Kubernetes PVCs are accessible from outside the cluster.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "3.5.1.3: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "3.5.1.3.8",
       "Description": "Checks if Kubernetes Persistent Volume Claims (PVC) are not configured to allow public access. The rule is NON_COMPLIANT if any PVC has an access mode that allows public or excessive permissions, potentially exposing sensitive data.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "3.5.1.3: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "3.5.1.3.9",
       "Description": "Checks if Kubernetes Pods only have read-only access to their root filesystems. The rule is NON_COMPLIANT if the readOnlyRootFilesystem parameter in the pod's SecurityContext is set to 'false'.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_root_containers_admission"
       ],
       "Attributes": [
         {
           "Section": "3.5.1.3: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.5.1.3.10",
       "Description": "Checks if Kubernetes Persistent Volumes (PVs) are configured to use a specific mount path other than the default root directory. The rule is NON_COMPLIANT if the specified mount path is '/' (default root directory of the volume).",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "3.5.1.3: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "3.5.1.3.11",
       "Description": "Checks if Kubernetes Persistent Volume (PV) access modes enforce a user identity. The rule is NON_COMPLIANT if 'spec.accessModes' is not defined to restrict access, or if specific user identities are not matched with the corresponding Access Control List (ACL) settings.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "3.5.1.3: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "3.5.1.3.12",
       "Description": "Checks if Kubernetes Ingress resources are configured to use TLS certificates from a valid certificate issuer, such as cert-manager, ensuring that all Ingress resources have appropriate TLS settings. This rule is NON_COMPLIANT if at least one Ingress resource has at least one path that is configured without TLS or with a certificate not managed by the specified issuer.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "3.5.1.3: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.5.1.3.13",
       "Description": "Checks if the Ingress resources in Kubernetes use TLS certificates provided by Kubernetes Secrets. To use this rule, ensure that your Ingress controller is configured with an SSL or HTTPS listener. This rule is only applicable to Ingress resources managing traffic for services in Kubernetes. This rule does not check other types of services like LoadBalancer or NodePort services.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "3.5.1.3: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.5.1.3.14",
       "Description": "Checks if a Kubernetes cluster has network policies in place to block public access settings. The rule is NON_COMPLIANT if NetworkPolicy is not applied to deny all ingress traffic, or if a NetworkPolicy allows traffic from external sources on ports other than Port 22.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_admission_hostport_containers"
       ],
       "Attributes": [
         {
           "Section": "3.5.1.3: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.5.1.3.15",
       "Description": "Checks if the Kubernetes Role or ClusterRole policies do not allow blocked actions on Kubernetes resources. The rule is NON_COMPLIANT if any blocked action is allowed on Kubernetes resources by the managed Role or ClusterRole policy.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.5.1.3: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.5.1.3.16",
       "Description": "Checks if the role-based access control (RBAC) permissions attached to your Kubernetes Service Accounts, Roles, and RoleBindings do not allow unauthorized actions on all Kubernetes resources. The rule is NON_COMPLIANT if any unauthorized action is allowed on all Kubernetes resources in the access control policies.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "3.5.1.3: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.5.1.3.17",
       "Description": "Checks if Kubernetes Secrets are not marked for deletion. The rule is NON_COMPLIANT if any Secrets are scheduled for deletion.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.5.1.3: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.5.1.3.18",
       "Description": "Checks if the Kubernetes Deployment configuration allows public access to its services through LoadBalancer type services or NodePort. If the Deployment configuration allows public access, it is NON_COMPLIANT.",
-      "Name": "Kubernetes Deployment",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.5.1.3: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes Deployment"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.5.1.3.19",
       "Description": "Checks if a Kubernetes PersistentVolume (PV) is public. The rule is NON_COMPLIANT if any existing and new PersistentVolume is accessible from outside the cluster.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "3.5.1.3: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "3.5.1.3.20",
       "Description": "Checks if the Kubernetes Pods are not exposed to the public. The rule is NON_COMPLIANT if the Pod's service type is LoadBalancer or NodePort, allowing external access.",
-      "Name": "Kubernetes Pods",
+      "Name": "Core",
       "Checks": [
         "core_minimize_admission_hostport_containers"
       ],
       "Attributes": [
         {
           "Section": "3.5.1.3: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes Pods"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.5.1.3.21",
       "Description": "Checks if Kubernetes PersistentVolume (PV) claims are publicly accessible. The rule is NON_COMPLIANT if any existing and new PersistentVolume claims have public access configurations.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "3.5.1.3: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "3.5.1.3.22",
       "Description": "Checks if Kubernetes clusters have public access enabled. The rule is NON_COMPLIANT if the service is exposed to the internet without proper configuration.",
-      "Name": "Kubernetes Cluster",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "3.5.1.3: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes Cluster"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.5.1.3.23",
       "Description": "Checks if Kubernetes services have network policies applied that restrict public access. The rule is NON_COMPLIANT if network policies are not in place for the services.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_admission_hostport_containers"
       ],
       "Attributes": [
         {
           "Section": "3.5.1.3: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.5.1.3.24",
       "Description": "Checks if the required network policies for public access are configured at the namespace level. The rule is only NON_COMPLIANT when the network policies do not match the corresponding configurations for public ingress/egress settings.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.5.1.3: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.5.1.3.25",
       "Description": "Checks if the required Kubernetes Network Policies are configured at the namespace level. The rule is NON_COMPLIANT if the configuration item does not match one or more settings from parameters (or default).",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "3.5.1.3: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.5.1.3.26",
       "Description": "Checks if Kubernetes services are publicly accessible. The rule is NON_COMPLIANT if a Kubernetes service is not listed in the excludedPublicServices parameter and the service type is LoadBalancer or NodePort.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "3.5.1.3: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "3.5.1.3.27",
-      "Description": "Checks if Object Versioning is enabled in a Kubernetes PersistentVolumeClaim; the rule is NON_COMPLIANT if versioning is not enabled.",
-      "Name": "Kubernetes PersistentVolumeClaim",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "3.5.1.3: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes PersistentVolumeClaim"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.5.1.3.28",
       "Description": "Checks if your Kubernetes persistent volumes do not allow public access. The rule checks the Persistent Volume settings, the StorageClass policies, and the Role-Based Access Control (RBAC) settings.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "3.5.1.3: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "3.5.1.3.29",
       "Description": "Checks if your Kubernetes Persistent Volumes do not allow public write access. The rule verifies the Persistent Volume Claims (PVC), the StorageClass settings, and the access modes of the Persistent Volumes (PV).",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "3.5.1.3: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "3.5.1.3.30",
       "Description": "Checks if direct internet access is disabled for a Kubernetes Pod. The rule is NON_COMPLIANT if the Pod is allowed to access the internet.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.5.1.3: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.5.1.3.31",
       "Description": "Checks if Kubernetes ConfigMaps owned by the namespace are publicly accessible. The rule is NON_COMPLIANT if ConfigMaps with the owner 'Self' are accessible to unauthorized users.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.5.1.3: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.5.1.1",
       "Description": "Checks if all methods in Kubernetes Ingress resources have caching enabled and are using TLS. The rule is NON_COMPLIANT if any method in a Kubernetes Ingress resource is not configured to use caching or is not served over TLS.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.5.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes Ingress"
-        }
-      ]
-    },
-    {
-      "Id": "3.5.1.2",
-      "Description": "Checks if a Kubernetes StatefulSet has persistent volume claims (PVCs) with encryption at rest enabled. The rule is NON_COMPLIANT if the persistent volumes used by the StatefulSet do not have encryption at rest enabled.",
-      "Name": "Kubernetes",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "3.5.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
@@ -11603,196 +10877,146 @@
     {
       "Id": "3.5.1.5",
       "Description": "Checks if Kubernetes Secrets are configured to use encryption at rest. The rule is COMPLIANT if the encryption provider configuration is defined in the Kubernetes API server configuration.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_encryption_provider_config_set"
       ],
       "Attributes": [
         {
           "Section": "3.5.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.5.1.6",
       "Description": "Checks if a Kubernetes Job has encryption enabled for all of its secrets. The rule is NON_COMPLIANT if 'encryptionEnabled' is set to 'false' for any secrets used in the Job's specifications.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.5.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "3.5.1.7",
-      "Description": "Checks if the Kubernetes project (namespace/pod) contains environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY. The rule is NON_COMPLIANT when the environment variables contain plaintext credentials.",
-      "Name": "Kubernetes",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "3.5.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.5.1.8",
       "Description": "Checks if a Kubernetes Pod's logs configured with a persistent volume have encryption enabled for its logs. The rule is NON_COMPLIANT if 'encryptionEnabled' is set to 'false' in the volume configuration of a Pod.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.5.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.5.1.9",
       "Description": "Checks if Kubernetes etcd clusters are encrypted at rest. The rule is NON_COMPLIANT if an etcd cluster is not encrypted.",
-      "Name": "etcd",
+      "Name": "ETCD",
       "Checks": [
         "etcd_tls_encryption"
       ],
       "Attributes": [
         {
           "Section": "3.5.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "etcd"
+          "Service": "ETCD"
         }
       ]
     },
     {
       "Id": "3.5.1.10",
       "Description": "Checks if storage encryption is enabled for your Kubernetes Persistent Volume Claims (PVCs). The rule is NON_COMPLIANT if storage encryption is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "3.5.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "3.5.1.11",
-      "Description": "Checks if a Kubernetes PersistentVolumeClaim (PVC) is using encryption. The rule is NON_COMPLIANT if the PVC is not using an encrypted PersistentVolume, or if the specified encryption key is not present in the annotations for the PVC.",
-      "Name": "Kubernetes",
-      "Checks": [
-        "rbac_minimize_pv_creation_access"
-      ],
-      "Attributes": [
-        {
-          "Section": "3.5.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "3.5.1.12",
       "Description": "Checks if the Kubernetes etcd database is encrypted and checks its status. The rule is COMPLIANT if the status is enabled or enabling.",
-      "Name": "Kubernetes",
+      "Name": "ETCD",
       "Checks": [
         "etcd_tls_encryption"
       ],
       "Attributes": [
         {
           "Section": "3.5.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "ETCD"
         }
       ]
     },
     {
       "Id": "3.5.1.13",
       "Description": "Checks if Kubernetes Persistent Volume (PV) encryption at rest is enabled by default. The rule is NON_COMPLIANT if the encryption is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.5.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.5.1.14",
       "Description": "Checks if Kubernetes Secrets are exposed as environment variables in Pods. The rule is NON_COMPLIANT if one or more environment variable key matches a key listed in the 'secretKeys' parameter, excluding environment variables sourced from other locations such as ConfigMaps.",
-      "Name": "Kubernetes Pods",
+      "Name": "Core",
       "Checks": [
         "core_no_secrets_envs"
       ],
       "Attributes": [
         {
           "Section": "3.5.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes Pods"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.5.1.15",
       "Description": "Checks if Kubernetes Persistent Volume (PV) is configured to encrypt the data using Kubernetes Secrets for key management. The rule is NON_COMPLIANT if the encryption is not enabled in the Persistent Volume configuration or if the specified encryption key does not match the expected key.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.5.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.5.1.16",
       "Description": "Checks if Kubernetes clusters are configured to have secrets encrypted. The rule is NON_COMPLIANT if a Kubernetes cluster does not have EncryptionConfiguration set, or if EncryptionConfiguration does not include 'secrets' as a resource.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_no_secrets_envs"
       ],
       "Attributes": [
         {
           "Section": "3.5.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "3.5.1.17",
-      "Description": "Verifies whether Kubernetes clusters in the Amazon Elastic Kubernetes Service (EKS) are set up to ensure that Kubernetes secrets are encrypted using AWS Key Management Service (KMS) keys.",
-      "Name": "Amazon Elastic Kubernetes Service (EKS)",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "3.5.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Amazon Elastic Kubernetes Service (EKS)"
-        }
-      ]
-    },
-    {
-      "Id": "3.5.1.18",
-      "Description": "Checks if a Kubernetes StatefulSet has encryption-at-rest enabled for its persistent volume claims. The rule is NON_COMPLIANT if 'encryption' is disabled or if the storage class does not match the approvedStorageClasses parameter.",
-      "Name": "Kubernetes StatefulSet",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "3.5.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes StatefulSet"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.5.1.19",
       "Description": "Checks if Kubernetes clusters have encryption at rest configuration enabled for secrets. The rule is NON_COMPLIANT if the encryption configuration for secrets in the Kubernetes API server is not set.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_encryption_provider_config_set"
       ],
       "Attributes": [
         {
           "Section": "3.5.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
@@ -11811,1470 +11035,1434 @@
     {
       "Id": "3.5.1.21",
       "Description": "Checks if Kubernetes persistent volumes are encrypted at rest with server-side encryption. The rule is NON_COMPLIANT for a persistent volume if 'encryption' is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_encryption_provider_config_set"
       ],
       "Attributes": [
         {
           "Section": "3.5.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.5.1.22",
       "Description": "Checks if storage encryption is enabled for your Kubernetes Persistent Volumes (PVs). The rule is NON_COMPLIANT if storage encryption is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.5.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.5.1.23",
       "Description": "Checks if a Kubernetes cluster has encrypted etcd storage. The rule is NON_COMPLIANT if the etcd storage used by the Kubernetes cluster is not encrypted.",
-      "Name": "Kubernetes",
+      "Name": "ETCD",
       "Checks": [
         "etcd_tls_encryption"
       ],
       "Attributes": [
         {
           "Section": "3.5.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "ETCD"
         }
       ]
     },
     {
       "Id": "3.5.1.24",
       "Description": "Checks if Kubernetes clusters have encryption at rest configuration enabled for secrets. The rule is NON_COMPLIANT if the encryption of secrets at rest is not configured properly.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_encryption_provider_config_set"
       ],
       "Attributes": [
         {
           "Section": "3.5.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "3.5.1.25",
-      "Description": "Checks if a Kubernetes database (e.g., PostgreSQL, MySQL) deployed using a StatefulSet or Deployment has encryption at rest enabled. The rule is NON_COMPLIANT if the database storage (PersistentVolume) is not using encryption provided by the underlying storage class or cloud provider.",
-      "Name": "Kubernetes",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "3.5.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.5.1.26",
       "Description": "Checks if Kubernetes Persistent Volumes (PVs) are using encryption at rest. The rule is NON_COMPLIANT if the Kubernetes Persistent Volumes do not have encryption enabled.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "3.5.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "3.5.1.27",
       "Description": "Checks if encryption is enabled for Kubernetes Persistent Volumes (PVs). The rule is NON_COMPLIANT if storage encryption is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.5.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.5.1.28",
       "Description": "Checks if Kubernetes clusters have the specified settings. The rule is NON_COMPLIANT if the Kubernetes cluster is not configured for RBAC (Role-Based Access Control), or if the cluster does not have audit logging enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "3.5.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.5.1.29",
       "Description": "Checks if Kubernetes clusters are using a specified secret for encryption. The rule is COMPLIANT if encryption is enabled and the cluster uses the secret specified for encryption. The rule is NON_COMPLIANT if the cluster is not encrypted or encrypted with another secret.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.5.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.5.1.30",
       "Description": "Checks if your Kubernetes Persistent Volume (PV) is configured with encryption enabled at rest, or if the Persistent Volume claim (PVC) policy explicitly denies access to volumes that are not encrypted. The rule is NON_COMPLIANT if your Persistent Volume is not encrypted by default.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "3.5.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "3.5.1.31",
       "Description": "Checks if the Kubernetes Secrets are encrypted at rest. The rule is NON_COMPLIANT if the Secrets are not encrypted with a defined encryption provider.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_no_secrets_envs"
       ],
       "Attributes": [
         {
           "Section": "3.5.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.5.1.32",
       "Description": "Checks if a Kubernetes Secret containing encryption keys is configured for a specific Deployment. The rule is NON_COMPLIANT if 'encryptionKey' is not specified in the Deployment's environment variables.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_no_secrets_envs"
       ],
       "Attributes": [
         {
           "Section": "3.5.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.5.1.33",
       "Description": "Checks if a Kubernetes Secret is configured for a pod. The rule is NON_COMPLIANT if the pod does not specify a 'secret' volumne or environment variable referencing a Kubernetes Secret.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_no_secrets_envs"
       ],
       "Attributes": [
         {
           "Section": "3.5.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.5.1.34",
       "Description": "Checks if all Kubernetes Secrets are encrypted using a customer-managed key configured for the Kubernetes cluster or are not using the default encryption settings. The rule is COMPLIANT if a secret is encrypted using a customer-managed key; otherwise, it is NON_COMPLIANT if it uses the default encryption settings.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_no_secrets_envs"
       ],
       "Attributes": [
         {
           "Section": "3.5.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.5.1.35",
       "Description": "Checks if Kubernetes Secrets are encrypted using the configured encryption providers. The rule is NON_COMPLIANT if a Secret is not encrypted. Optionally, specify the encryption provider configuration for the rule to check.",
-      "Name": "Kubernetes Secrets",
+      "Name": "API Server",
       "Checks": [
         "apiserver_encryption_provider_config_set"
       ],
       "Attributes": [
         {
           "Section": "3.5.1: Primary account number (PAN) is secured wherever it is stored.",
-          "Service": "Kubernetes Secrets"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.6.1.2.1",
       "Description": "Checks if Kubernetes TLS secrets are due for renewal within the specified number of days. TLS secrets in Kubernetes may need to be manually renewed if they are not automatically managed. The rule is NON_COMPLIANT if your TLS secrets are about to expire.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.6.1.2: Cryptographic keys used to protect stored account data are secured.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.6.1.2.2",
       "Description": "Checks if Kubernetes Cluster has a Certificate Authority (CA) that is disabled. The rule is NON_COMPLIANT for root CAs with status that is not DISABLED.",
-      "Name": "Kubernetes",
+      "Name": "CONTROLLERMANAGER",
       "Checks": [
         "controllermanager_root_ca_file_set"
       ],
       "Attributes": [
         {
           "Section": "3.6.1.2: Cryptographic keys used to protect stored account data are secured.",
-          "Service": "Kubernetes"
+          "Service": "CONTROLLERMANAGER"
         }
       ]
     },
     {
       "Id": "3.6.1.2.3",
       "Description": "Checks if an Ingress resource in Kubernetes uses a TLS certificate. The rule is NON_COMPLIANT if the Ingress resource does not have an associated TLS secret.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "3.6.1.2: Cryptographic keys used to protect stored account data are secured.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.6.1.2.4",
       "Description": "Checks if the certificate associated with a Kubernetes Ingress resource is the default SSL certificate. The rule is NON_COMPLIANT if an Ingress resource uses the default SSL certificate.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.6.1.2: Cryptographic keys used to protect stored account data are secured.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.6.1.2.5",
       "Description": "Checks if Kubernetes Ingress resources are configured to use TLS certificates from a trusted certificate provider. This rule is NON_COMPLIANT if at least 1 Ingress resource has at least 1 rule configured without a TLS certificate or is configured with a certificate not from a trusted provider.",
-      "Name": "Ingress Controller",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "3.6.1.2: Cryptographic keys used to protect stored account data are secured.",
-          "Service": "Ingress Controller"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.6.1.2.6",
       "Description": "Checks if Ingress resources in Kubernetes use TLS certificates provided by a secret in Kubernetes. To use this rule, an Ingress resource should be configured with a TLS section that references the secret containing the TLS certificate. This rule is only applicable to Ingress configurations and does not apply to other services like NodePort or LoadBalancer services.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "3.6.1.2: Cryptographic keys used to protect stored account data are secured.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.6.1.2.7",
       "Description": "Checks if the Kubernetes Role-Based Access Control (RBAC) policies that you create do not allow blocked actions on Kubernetes Secrets. The rule is NON_COMPLIANT if any blocked action is allowed on Kubernetes Secrets by the managed RBAC policy.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_secret_access"
       ],
       "Attributes": [
         {
           "Section": "3.6.1.2: Cryptographic keys used to protect stored account data are secured.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "3.6.1.2.8",
       "Description": "Checks if the Role-based Access Control (RBAC) policies applied to Kubernetes users, roles, and role bindings do not allow access to restricted actions on all Kubernetes resources. The rule is NON_COMPLIANT if any restricted action is permitted on all Kubernetes resources in a role or role binding.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "3.6.1.2: Cryptographic keys used to protect stored account data are secured.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.6.1.2.9",
       "Description": "Checks if Kubernetes Secrets are not marked for deletion in the Kubernetes cluster. The rule is NON_COMPLIANT if Secrets are scheduled for deletion.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.6.1.2: Cryptographic keys used to protect stored account data are secured.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.6.1.3.1",
       "Description": "Checks if Kubernetes Secrets containing TLS certificates are about to expire within a specified number of days. Certificates can be automatically renewed if managed by cert-manager; however, manually imported certificates may not be renewed automatically. If the TLS certificates in Secrets are nearing expiration, the state is marked as NON_COMPLIANT.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.6.1.3: Cryptographic keys used to protect stored account data are secured.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.6.1.3.2",
       "Description": "Checks if Kubernetes Certificate Authority has a root CA that is disabled. The rule is NON_COMPLIANT for root CAs with a status that is not DISABLED.",
-      "Name": "Kubernetes Certificate Authority",
+      "Name": "CONTROLLERMANAGER",
       "Checks": [
         "controllermanager_root_ca_file_set"
       ],
       "Attributes": [
         {
           "Section": "3.6.1.3: Cryptographic keys used to protect stored account data are secured.",
-          "Service": "Kubernetes Certificate Authority"
+          "Service": "CONTROLLERMANAGER"
         }
       ]
     },
     {
       "Id": "3.6.1.3.3",
       "Description": "Checks if a Kubernetes Ingress resource is configured with TLS settings. The rule is NON_COMPLIANT if the Ingress resource does not have an associated TLS certificate.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "3.6.1.3: Cryptographic keys used to protect stored account data are secured.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.6.1.3.4",
       "Description": "Checks if the certificate associated with a Kubernetes Ingress resource is the default SSL certificate. The rule is NON_COMPLIANT if an Ingress resource uses the default SSL certificate.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.6.1.3: Cryptographic keys used to protect stored account data are secured.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.6.1.3.5",
       "Description": "Checks if Kubernetes Ingress resources are configured to use certificates from a certificate management service (e.g., cert-manager) for TLS termination. This rule is NON_COMPLIANT if at least 1 Ingress resource has at least 1 rule that is configured without a TLS certificate or is configured with a non-approved certificate.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "3.6.1.3: Cryptographic keys used to protect stored account data are secured.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.6.1.3.6",
       "Description": "Checks if the Kubernetes Ingress resource uses SSL certificates provided by a Certificate Manager, such as cert-manager. To use this rule, an HTTPS or TLS-enabled Ingress must be configured. This rule is only applicable to Ingress resources and does not check services directly or other types of load balancers.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.6.1.3: Cryptographic keys used to protect stored account data are secured.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.6.1.3.7",
       "Description": "Checks if the Kubernetes Role-Based Access Control (RBAC) policies that you create do not allow blocked actions on Kubernetes secrets. The rule is NON_COMPLIANT if any blocked action is allowed on Kubernetes secrets by the RBAC policy.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_secret_access"
       ],
       "Attributes": [
         {
           "Section": "3.6.1.3: Cryptographic keys used to protect stored account data are secured.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "3.6.1.3.8",
       "Description": "Checks if the role or service accounts in Kubernetes have permissions that allow actions on Kubernetes resources that should be restricted. The rule is NON_COMPLIANT if any disallowed action is permitted through a Role or ClusterRole in Kubernetes RBAC settings.",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "3.6.1.3: Cryptographic keys used to protect stored account data are secured.",
-          "Service": "Kubernetes RBAC"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "3.6.1.3.9",
       "Description": "Checks if Kubernetes Secrets are not marked for deletion. The rule is NON_COMPLIANT if Secrets are scheduled for deletion.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.6.1.3: Cryptographic keys used to protect stored account data are secured.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.6.1.4.1",
       "Description": "Checks if Kubernetes Secrets containing TLS certificates are due for renewal within the specified number of days. Certificates managed by external certificate issuers, such as Cert-Manager, may automatically renew, while manually created secrets may require manual intervention. The status is NON_COMPLIANT if secrets with certificates are about to expire.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.6.1.4: Cryptographic keys used to protect stored account data are secured.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.6.1.4.2",
       "Description": "Checks if Kubernetes CertificateSigningRequests (CSRs) have a root CA that is not in a valid state. The rule is NON_COMPLIANT for root CAs with status that is not 'Approved' or 'Pending'.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_csr_approval_access"
       ],
       "Attributes": [
         {
           "Section": "3.6.1.4: Cryptographic keys used to protect stored account data are secured.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "3.6.1.4.3",
       "Description": "Checks if a Kubernetes Ingress resource is configured with TLS. The rule is NON_COMPLIANT if the Ingress resource does not have an associated TLS secret.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "3.6.1.4: Cryptographic keys used to protect stored account data are secured.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.6.1.4.4",
       "Description": "Checks if the TLS certificate associated with a Kubernetes Ingress resource is the default SSL certificate. The rule is NON_COMPLIANT if an Ingress resource uses the default SSL certificate.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.6.1.4: Cryptographic keys used to protect stored account data are secured.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.6.1.4.5",
       "Description": "Checks if Kubernetes Ingress resources have TLS configurations that use certificates from a trusted certificate management solution, such as cert-manager. This rule is NON_COMPLIANT if at least 1 Ingress resource has at least 1 TLS configuration that is either missing a certificate or is configured with a certificate that is not managed by cert-manager.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "3.6.1.4: Cryptographic keys used to protect stored account data are secured.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.6.1.4.6",
       "Description": "Checks if Ingress resources in Kubernetes use SSL certificates provided by Kubernetes Secrets. To use this rule, ensure an Ingress resource is configured with an SSL or HTTPS backend. This rule is only applicable to Ingress configurations targeting HTTP routes and does not apply to ClusterIP or NodePort services.",
-      "Name": "Ingress Controller",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.6.1.4: Cryptographic keys used to protect stored account data are secured.",
-          "Service": "Ingress Controller"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.6.1.4.7",
       "Description": "Checks if the Kubernetes Role-Based Access Control (RBAC) policies that you create do not allow actions that are blocked on Kubernetes resources. The rule is NON_COMPLIANT if any blocked action is allowed on Kubernetes resources by the configured RBAC policies.",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pod_creation_access"
       ],
       "Attributes": [
         {
           "Section": "3.6.1.4: Cryptographic keys used to protect stored account data are secured.",
-          "Service": "Kubernetes RBAC"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "3.6.1.4.8",
       "Description": "Checks if the role-based access control (RBAC) policies attached to your Kubernetes service accounts, roles, and role bindings do not allow blocked actions on all Kubernetes resources. The rule is NON_COMPLIANT if any blocked action is allowed on all Kubernetes resources in a RBAC policy.",
-      "Name": "Kubernetes RBAC",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "3.6.1.4: Cryptographic keys used to protect stored account data are secured.",
-          "Service": "Kubernetes RBAC"
-        }
-      ]
-    },
-    {
-      "Id": "3.6.1.4.9",
-      "Description": "Checks if Kubernetes secrets that are used for encryption (similar to AWS KMS keys) are not marked for deletion. The rule is NON_COMPLIANT if any Kubernetes secrets are marked for deletion.",
-      "Name": "Kubernetes Secrets",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "3.6.1.4: Cryptographic keys used to protect stored account data are secured.",
-          "Service": "Kubernetes Secrets"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.6.1.1",
       "Description": "Checks if Kubernetes Secrets containing TLS certificates are nearing expiration based on a specified time frame. Secrets can be renewed, but those manually created or managed may not have automatic renewal, leading to a NON_COMPLIANT status if they are about to expire.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.6.1: Cryptographic keys used to protect stored account data are secured.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.6.1.2",
       "Description": "Checks if Kubernetes CertificateSigningRequests (CSR) have a root CA that is disabled. The rule is NON_COMPLIANT for CSRs with a status that is not DISABLED.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_csr_approval_access"
       ],
       "Attributes": [
         {
           "Section": "3.6.1: Cryptographic keys used to protect stored account data are secured.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "3.6.1.3",
       "Description": "Checks if a Kubernetes ingress resource is configured with an SSL certificate. The rule is NON_COMPLIANT if the ingress does not have an associated TLS secret for HTTPS endpoints.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "3.6.1: Cryptographic keys used to protect stored account data are secured.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.6.1.4",
       "Description": "Checks if the certificate associated with a Kubernetes Ingress resource is a default certificate. The rule is NON_COMPLIANT if an Ingress resource uses a default SSL certificate provided by the cloud provider.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.6.1: Cryptographic keys used to protect stored account data are secured.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.6.1.5",
       "Description": "Checks if Kubernetes Ingress resources have TLS configurations that use certificates from a trusted certificate authority, ensuring that at least one certificate from a valid source is associated with each Ingress. This rule is NON_COMPLIANT if at least one Ingress resource has a TLS configuration without a valid certificate or is configured with a certificate that is not from a trusted certificate authority.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "3.6.1: Cryptographic keys used to protect stored account data are secured.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.6.1.6",
       "Description": "Checks if Ingress resources in Kubernetes use SSL certificates provided by Kubernetes Secrets. To use this rule, an Ingress resource must be configured with an HTTPS backend. This rule is only applicable to Ingress resources and does not check Services of type LoadBalancer, ClusterIP, or NodePort.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.6.1: Cryptographic keys used to protect stored account data are secured.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.6.1.7",
       "Description": "Checks if the Kubernetes Role or ClusterRole do not allow blocked actions on Kubernetes resources. The rule is NON_COMPLIANT if any blocked action is allowed by the Role or ClusterRole.",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC (Role-Based Access Control)",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.6.1: Cryptographic keys used to protect stored account data are secured.",
-          "Service": "Kubernetes RBAC"
+          "Service": "RBAC (Role-Based Access Control)"
         }
       ]
     },
     {
       "Id": "3.6.1.8",
       "Description": "Checks if the Role-based Access Control (RBAC) policies applied to your Kubernetes users, roles, and service accounts do not allow prohibited actions on all Kubernetes resources. The rule is NON_COMPLIANT if any prohibited action is allowed on any Kubernetes resource in an RBAC policy.",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pod_creation_access"
       ],
       "Attributes": [
         {
           "Section": "3.6.1: Cryptographic keys used to protect stored account data are secured.",
-          "Service": "Kubernetes RBAC"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "3.6.1.9",
       "Description": "Checks if Kubernetes Secrets are not marked for deletion in Kubernetes. The rule is NON_COMPLIANT if any Secrets are scheduled for deletion.",
-      "Name": "Kubernetes Secrets",
+      "Name": "RBAC (Role-Based Access Control)",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.6.1: Cryptographic keys used to protect stored account data are secured.",
-          "Service": "Kubernetes Secrets"
+          "Service": "RBAC (Role-Based Access Control)"
         }
       ]
     },
     {
       "Id": "3.7.1.1",
       "Description": "Checks if Kubernetes Secrets or Ingress resources containing TLS certificates are about to expire within the specified number of days. Certificates issued by external cert management tools (like CertManager) can be automatically renewed, but manually managed certificates require manual renewal. The rule is NON_COMPLIANT if any of your certificates are nearing expiration.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.7.1: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.7.1.2",
       "Description": "Checks if RSA certificates managed by Kubernetes have a key length of at least '2048' bits. The rule is NON_COMPLIANT if the minimum key length is less than 2048 bits.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.7.1: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.7.1.3",
       "Description": "Checks if Kubernetes has a Certificate Authority (CA) that is disabled. The rule is NON_COMPLIANT for root CAs with a status that is not DISABLED.",
-      "Name": "Kubernetes",
+      "Name": "CONTROLLERMANAGER",
       "Checks": [
         "controllermanager_root_ca_file_set"
       ],
       "Attributes": [
         {
           "Section": "3.7.1: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes"
+          "Service": "CONTROLLERMANAGER"
         }
       ]
     },
     {
       "Id": "3.7.1.4",
       "Description": "Checks if a Kubernetes Ingress resource has an associated TLS secret for SSL termination. The rule is NON_COMPLIANT if the Ingress resource does not reference a TLS secret.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.7.1: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.7.1.5",
       "Description": "Checks if the TLS certificate associated with a Kubernetes Ingress resource is the default certificate. The rule is NON_COMPLIANT if an Ingress uses the default TLS certificate.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "3.7.1: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.7.1.6",
       "Description": "Checks if Kubernetes Ingress resources have TLS configurations that are using certificates from a certificate management solution, like Cert-Manager. This rule is NON_COMPLIANT if at least 1 Ingress resource has at least 1 TLS configuration that is not using a certificate from the managed solution or is configured with a certificate that is not managed.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "3.7.1: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.7.1.7",
       "Description": "Checks if Kubernetes Ingress resources use SSL certificates provided by a Certificate Authority (e.g., Let's Encrypt) or Kubernetes secrets. To use this rule, configure a TLS section in your Ingress resource. This rule is only applicable to Ingress resources using SSL termination. This rule does not check other service types like NodePort or LoadBalancer services.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "3.7.1: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.7.1.8",
       "Description": "Checks if the managed Kubernetes Role-Based Access Control (RBAC) policies that you create do not allow forbidden actions on Kubernetes resources. The rule is NON_COMPLIANT if any forbidden action is allowed on Kubernetes resources by the managed RBAC policy.",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pod_creation_access"
       ],
       "Attributes": [
         {
           "Section": "3.7.1: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes RBAC"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "3.7.1.9",
       "Description": "Checks if the Role-based Access Control (RBAC) policies attached to your Kubernetes users, roles, and role bindings do not allow blocked actions on all Kubernetes resources. The rule is NON_COMPLIANT if any blocked action is allowed on all Kubernetes resources in a RBAC policy.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "3.7.1: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.7.1.10",
       "Description": "Checks if Kubernetes Secrets are not marked for deletion in Kubernetes. The rule is NON_COMPLIANT if Secrets are scheduled for deletion.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.7.1: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.7.2.1",
       "Description": "Checks if Kubernetes Secrets containing TLS certificates are nearing expiration based on a specified threshold of days. Kubernetes does not automatically renew certificates unless managed by an external controller like cert-manager. The status is NON_COMPLIANT if any managed certificates are about to expire.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.7.2: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.7.2.2",
       "Description": "Checks if Kubernetes CertificateSigningRequest (CSR) has a root certificate that is not marked as revoked. The rule is NON_COMPLIANT for CSRs with a status that is not REVOKED.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_csr_approval_access"
       ],
       "Attributes": [
         {
           "Section": "3.7.2: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "3.7.2.3",
       "Description": "Checks if a Kubernetes Ingress resource is configured with TLS and an associated SSL certificate. The rule is NON_COMPLIANT if the Ingress resource does not have TLS configured or lacks a valid SSL certificate.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "3.7.2: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.7.2.4",
       "Description": "Checks if the TLS certificate associated with a Kubernetes Ingress resource is a default SSL certificate. The rule is NON_COMPLIANT if an Ingress uses the default TLS certificate.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "3.7.2: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.7.2.5",
       "Description": "Checks if Kubernetes Services of type LoadBalancer have TLS configured with Secrets that contain certificates from Kubernetes Secret Management. This rule is NON_COMPLIANT if at least 1 LoadBalancer service has at least 1 listener that is configured without a TLS Secret or is configured with a TLS Secret that does not contain a valid certificate.",
-      "Name": "Kubernetes LoadBalancer Services",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "3.7.2: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes LoadBalancer Services"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.7.2.6",
       "Description": "Checks if Ingress controllers use SSL certificates provided by Kubernetes Secrets. To use this rule, ensure that Ingress resources are configured with TLS settings. This rule is only applicable to Ingress controllers. This rule does not check Services or other types of load balancing like NodePort.",
-      "Name": "Ingress Controller",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.7.2: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Ingress Controller"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.7.2.7",
       "Description": "Checks if the Kubernetes Role-Based Access Control (RBAC) policies that you create do not allow forbidden actions on Kubernetes resources. The rule is NON_COMPLIANT if any forbidden action is permitted on Kubernetes resources by the managed RBAC policy.",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pod_creation_access"
       ],
       "Attributes": [
         {
           "Section": "3.7.2: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes RBAC"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "3.7.2.8",
       "Description": "Checks if the Role-based Access Control (RBAC) policies attached to your Kubernetes users, roles, and clusters do not allow blocked actions on all Kubernetes resources. The rule is NON_COMPLIANT if any blocked action is allowed on all Kubernetes resources in a policy.",
-      "Name": "Kubernetes RBAC",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "3.7.2: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes RBAC"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.7.2.9",
       "Description": "Checks if Kubernetes Secrets are not set for deletion. The rule is NON_COMPLIANT if Secrets are marked for deletion.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_no_secrets_envs"
       ],
       "Attributes": [
         {
           "Section": "3.7.2: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.7.4.1",
       "Description": "Checks if Kubernetes TLS Secrets in your namespace are marked for expiration within the specified number of days. TLS Certificates managed within Kubernetes can be set for automatic renewal using tools like cert-manager. The rule is NON_COMPLIANT if your TLS secrets are about to expire.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "3.7.4: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.7.4.2",
       "Description": "Checks if Kubernetes has a Certificate Signing Request (CSR) approved that is not in a terminal state. The rule is NON_COMPLIANT for CSRs that are not approved or rejected.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.7.4: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.7.4.3",
       "Description": "Checks if a Kubernetes Ingress resource has TLS configured. The rule is NON_COMPLIANT if the Ingress does not have an associated TLS secret for SSL termination.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.7.4: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.7.4.4",
       "Description": "Checks if the TLS certificate associated with an Ingress resource in Kubernetes is a default or autogenerated certificate. The rule is NON_COMPLIANT if an Ingress resource is using a default or autogenerated TLS certificate instead of a managed or custom TLS certificate.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "3.7.4: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.7.4.5",
       "Description": "Checks if automatic key rotation is enabled for each key and matches to the key ID of the customer created Kubernetes Secret. The rule is NON_COMPLIANT if the Kubernetes ServiceAccount role for a resource does not have the ability to get and describe Secrets.",
-      "Name": "Kubernetes",
+      "Name": "CONTROLLERMANAGER",
       "Checks": [
         "controllermanager_service_account_private_key_file"
       ],
       "Attributes": [
         {
           "Section": "3.7.4: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes"
+          "Service": "CONTROLLERMANAGER"
         }
       ]
     },
     {
       "Id": "3.7.4.6",
       "Description": "Checks if Kubernetes Services of type LoadBalancer have TLS settings configured with certificates from a specified secret. This rule is NON_COMPLIANT if at least 1 LoadBalancer service has at least 1 listener that is configured without a valid TLS secret or is configured with a certificate different from the specified one.",
-      "Name": "LoadBalancer Service",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "3.7.4: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "LoadBalancer Service"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.7.4.7",
       "Description": "Checks if the Ingress resources in Kubernetes use TLS certificates provided by Kubernetes Secrets. To use this rule, configure an Ingress resource with TLS settings using the appropriate Secret. This rule is only applicable to Ingress resources and does not apply to Services or other types of Load Balancers.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "3.7.4: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.7.4.8",
       "Description": "Checks if the managed Kubernetes Role-Based Access Control (RBAC) policies that you create do not allow blocked actions on Kubernetes resources. The rule is NON_COMPLIANT if any blocked action is allowed on Kubernetes resources by the managed RBAC policy.",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pod_creation_access"
       ],
       "Attributes": [
         {
           "Section": "3.7.4: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes RBAC"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "3.7.4.9",
       "Description": "Checks if the Role policies attached to your Kubernetes service accounts do not allow actions that are restricted on all cluster resources. The rule is considered NON_COMPLIANT if any restricted action is allowed in the Role binding policies.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "3.7.4: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "3.7.4.10",
       "Description": "Checks if Kubernetes Secrets are not marked for deletion. The rule is NON_COMPLIANT if Secrets are scheduled for deletion.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.7.4: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.7.5.1",
       "Description": "Checks if Kubernetes TLS Secrets in your cluster are marked for expiration within the specified number of days. TLS Secrets in Kubernetes must be manually renewed; Kubernetes does not automatically renew them. The rule is NON_COMPLIANT if your TLS Secrets are about to expire.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.7.5: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.7.5.2",
       "Description": "Verifies if automatic key rotation is enabled for each key and matches to the key ID of the customer created Kubernetes Secret. The rule is NON_COMPLIANT if the Service Account for a resource does not have the required permissions to manage Secrets.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.7.5: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.7.6.1",
       "Description": "Checks if Kubernetes Secrets containing TLS certificates are nearing expiration based on specified threshold. Kubernetes does not automatically renew imported certificates unless managed through an appropriate controller. The rule is NON_COMPLIANT if any certificates are about to expire.",
-      "Name": "Kubernetes",
+      "Name": "KUBELET",
       "Checks": [
         "kubelet_rotate_certificates"
       ],
       "Attributes": [
         {
           "Section": "3.7.6: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes"
+          "Service": "KUBELET"
         }
       ]
     },
     {
       "Id": "3.7.6.2",
       "Description": "Checks if Kubernetes has a CertificateSigningRequest (CSR) that is approved. The rule is NON_COMPLIANT for CSRs that are not approved.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_csr_approval_access"
       ],
       "Attributes": [
         {
           "Section": "3.7.6: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "3.7.6.3",
       "Description": "Checks if a Kubernetes Ingress resource uses TLS for secure connections. The rule is NON_COMPLIANT if the Ingress resource does not have an associated TLS secret.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.7.6: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.7.6.4",
       "Description": "Checks if the certificate associated with a Kubernetes Ingress resource is using the default SSL certificate. The rule is NON_COMPLIANT if an Ingress resource uses the default SSL certificate.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.7.6: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.7.6.5",
       "Description": "Checks if Kubernetes Services of type LoadBalancer have configured TLS termination using certificates from a trusted certificate management solution (e.g. cert-manager). This rule is NON_COMPLIANT if at least 1 LoadBalancer service has at least 1 listener that is configured without a TLS certificate or is configured with a certificate that is not from a trusted source.",
-      "Name": "Kubernetes LoadBalancer Service",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "3.7.6: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes LoadBalancer Service"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.7.6.6",
       "Description": "Checks if Kubernetes Ingress resources utilize TLS secrets for SSL termination. To use this rule, ensure that Ingress is configured with TLS settings. This rule is only applicable to Ingress resources and does not check services that do not involve SSL termination.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.7.6: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.7.6.7",
       "Description": "Verifies that the Kubernetes Role-Based Access Control (RBAC) policies do not permit actions that are disallowed by the cluster's security context. The rule is NON_COMPLIANT if any disallowed actions are permitted by the Kubernetes RBAC policy.",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pod_creation_access"
       ],
       "Attributes": [
         {
           "Section": "3.7.6: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes RBAC"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "3.7.6.8",
       "Description": "Checks if the Role-based Access Control (RBAC) policies attached to your Kubernetes users, roles, and role bindings do not allow blocked actions on all Kubernetes secrets. The rule is NON_COMPLIANT if any blocked action is allowed on all Kubernetes secrets in an RBAC policy.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_secret_access"
       ],
       "Attributes": [
         {
           "Section": "3.7.6: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "3.7.6.9",
       "Description": "Checks if Kubernetes Secrets are not marked for deletion. The rule is NON_COMPLIANT if Secrets are scheduled for deletion.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.7.6: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "3.7.7.1",
       "Description": "Checks if Kubernetes Secrets containing TLS certificates in your cluster are about to expire within the specified number of days. Certificates issued by Kubernetes can be automatically renewed with appropriate configurations, but manually imported certificates may require manual renewal. The rule is NON_COMPLIANT if your secrets (certificates) are approaching expiration.",
-      "Name": "Kubernetes Secrets",
+      "Name": "RBAC (Role-Based Access Control)",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.7.7: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes Secrets"
+          "Service": "RBAC (Role-Based Access Control)"
         }
       ]
     },
     {
       "Id": "3.7.7.2",
       "Description": "Checks if Kubernetes CA (Certificate Authority) has a root CA that is disabled. The rule is NON_COMPLIANT for root CAs with status that is not DISABLED.",
-      "Name": "Kubernetes",
+      "Name": "CONTROLLERMANAGER",
       "Checks": [
         "controllermanager_root_ca_file_set"
       ],
       "Attributes": [
         {
           "Section": "3.7.7: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes"
+          "Service": "CONTROLLERMANAGER"
         }
       ]
     },
     {
       "Id": "3.7.7.3",
       "Description": "Checks if a Kubernetes Ingress resource is configured with TLS. The rule is NON_COMPLIANT if the Ingress does not have a TLS secret associated with it for secure connections.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "3.7.7: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.7.7.4",
       "Description": "Checks if the certificate associated with a Kubernetes Ingress resource is the default SSL certificate. The rule is NON_COMPLIANT if an Ingress resource uses the default SSL certificate.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.7.7: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.7.7.5",
       "Description": "Checks if Kubernetes Services of type LoadBalancer have annotations that specify certificates from a certificate manager (like Cert-Manager). This rule is NON_COMPLIANT if at least 1 Service of type LoadBalancer has an annotation configured without a valid certificate reference or is configured with a certificate different from a managed certificate.",
-      "Name": "Kubernetes Services",
+      "Name": "CONTROLLERMANAGER",
       "Checks": [
         "controllermanager_rotate_kubelet_server_cert"
       ],
       "Attributes": [
         {
           "Section": "3.7.7: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes Services"
+          "Service": "CONTROLLERMANAGER"
         }
       ]
     },
     {
       "Id": "3.7.7.6",
       "Description": "Checks if Ingress resources in Kubernetes are using TLS/SSL certificates managed by Kubernetes secrets. To use this rule, an Ingress must be configured with TLS settings. This rule is only applicable to Ingress resources and does not check LoadBalancer services or NodePort services.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "3.7.7: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.7.7.7",
       "Description": "Checks if the Kubernetes RBAC (Role-Based Access Control) policies that you create do not allow blocked actions on Kubernetes objects. The rule is NON_COMPLIANT if any blocked action is allowed on Kubernetes objects by the defined RBAC policies.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pod_creation_access"
       ],
       "Attributes": [
         {
           "Section": "3.7.7: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "3.7.7.8",
       "Description": "Checks if the Role-Based Access Control (RBAC) policies attached to your Kubernetes users, service accounts, and roles do not allow blocked actions on all Kubernetes resources. The rule is NON_COMPLIANT if any blocked action is allowed on all Kubernetes resources in a role or cluster role.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "3.7.7: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "3.7.7.9",
       "Description": "Checks if Kubernetes Secrets are not marked for deletion. The rule is NON_COMPLIANT if Secrets are scheduled for deletion.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "3.7.7: Where cryptography is used to protect stored account data, key management processes and procedures covering all aspects of the key lifecycle are defined and implemented.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "4.2.1.1.1",
       "Description": "Checks if Kubernetes Secrets containing TLS certificates are marked for expiration within the specified number of days. Auto-generated certificates by a CertificateIssuer or a CertificateManagement controller are usually auto-renewed. User-managed certificates need manual renewal. The rule is NON_COMPLIANT if your secrets are about to expire.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "4.2.1.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "4.2.1.1.2",
       "Description": "Checks if a Kubernetes Cluster has a Root Certificate Authority (CA) that is disabled. The rule is NON_COMPLIANT for Root CAs with a status that is not DISABLED.",
-      "Name": "Kubernetes",
+      "Name": "CONTROLLERMANAGER",
       "Checks": [
         "controllermanager_root_ca_file_set"
       ],
       "Attributes": [
         {
           "Section": "4.2.1.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Kubernetes"
+          "Service": "CONTROLLERMANAGER"
         }
       ]
     },
     {
       "Id": "4.2.1.1.3",
       "Description": "Checks if HTTP to HTTPS redirection is configured on all Ingress resources in Kubernetes. The rule is NON_COMPLIANT if one or more Ingress resources do not have a redirect from HTTP to HTTPS configured. The rule is also NON_COMPLIANT if one or more Ingress resources are forwarding traffic to an HTTP service instead of redirecting to HTTPS.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "4.2.1.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "4.2.1.1.4",
       "Description": "Checks if a Kubernetes Ingress resource is configured with an SSL certificate. The rule is NON_COMPLIANT if the Ingress resource does not have an associated TLS secret for SSL termination.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "4.2.1.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "4.2.1.1.5",
       "Description": "Checks if the TLS certificate associated with a Kubernetes Ingress resource is the default SSL certificate. The rule is NON_COMPLIANT if an Ingress resource uses the default SSL certificate.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "4.2.1.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "4.2.1.1.6",
       "Description": "Checks if Kubernetes Ingress is using deprecated SSL protocols for HTTPS communication between Ingress controllers and backend services. This rule is NON_COMPLIANT for an Ingress resource if any 'tls' specifications include 'SSLv3'.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "4.2.1.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "4.2.1.1.7",
       "Description": "Checks if Kubernetes Ingress resources are encrypting traffic to backend services. The rule is NON_COMPLIANT if 'backend.servicePort' is configured for non-SSL (HTTP) traffic or if 'backend.servicePort' is configured for SSL traffic and 'spec.tls' is not properly set up for secure communication with the backend services.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "4.2.1.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "4.2.1.1.8",
       "Description": "Checks if your Kubernetes Ingress resources enforce HTTPS by verifying that the nginx.ingress.kubernetes.io/ssl-redirect annotation is set to 'true'. The rule is NON_COMPLIANT if this annotation is not present or set to 'false'.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "4.2.1.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "4.2.1.1.9",
       "Description": "Checks if your Kubernetes cluster has network policies applied to ensure that traffic between pods is encrypted using TLS. The rule is NON_COMPLIANT if a pod communication does not enforce TLS encryption.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "4.2.1.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "4.2.1.1.10",
       "Description": "Checks if Kubernetes database connections are configured with SSL. The rule is NON_COMPLIANT if the database does not have SSL enabled for connections.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "4.2.1.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "4.2.1.1.11",
-      "Description": "Checks if Kubernetes StatefulSets for Redis data stores are configured to use TLS/SSL for secure communication between Pods. The rule is NON_COMPLIANT if TLS/SSL encryption is not enabled.",
-      "Name": "Kubernetes",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "4.2.1.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "4.2.1.1.12",
       "Description": "Checks if Kubernetes Redis pods have encryption-in-transit enabled. The rule is NON_COMPLIANT for a Redis pod if 'encryption-in-transit' is not configured or set to 'false'.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "4.2.1.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
@@ -13293,132 +12481,132 @@
     {
       "Id": "4.2.1.1.14",
       "Description": "Checks if Kubernetes Services of type LoadBalancer have HTTPS configured with trusted TLS certificates, ensuring that at least 1 Service does not have a valid certificate issued by a trusted Certificate Authority or is misconfigured with a certificate that is not trusted.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "4.2.1.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "4.2.1.1.15",
       "Description": "Checks if the Ingress resources in Kubernetes use TLS certificates provided by a Certificate Management solution (like cert-manager). To apply this rule, use an Ingress resource configured with TLS settings. This rule is not applicable to Services without Ingress or other types of Load Balancers (like NodePort or ClusterIP).",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "4.2.1.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "4.2.1.1.16",
       "Description": "Checks whether your Kubernetes Ingress resources are using a custom TLS configuration. The rule is only applicable if there are TLS-enabled Ingress resources.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "4.2.1.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "4.2.1.1.17",
       "Description": "Checks if your Kubernetes Ingress resources have SSL/TLS configurations that use a predefined policy. The rule is NON_COMPLIANT if the Ingress TLS settings do not match the specified 'predefinedPolicyName'.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "4.2.1.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "4.2.1.1.18",
       "Description": "Checks if your Kubernetes Service is configured with TLS termination or HTTPS endpoints. The rule is NON_COMPLIANT if a Service does not have TLS settings configured.",
-      "Name": "Kubernetes Service",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "4.2.1.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Kubernetes Service"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "4.2.1.1.19",
       "Description": "Checks if Kubernetes clusters have NetworkPolicies implemented. The rule is NON_COMPLIANT if there are no NetworkPolicies applied to the namespace or the existing NetworkPolicies do not satisfy the specified rule parameters.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "4.2.1.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "4.2.1.1.20",
       "Description": "Checks if the Kubernetes Role or ClusterRole permissions do not allow blocked actions on Secrets. The rule is NON_COMPLIANT if any blocked action is allowed on Secrets by the Kubernetes Role or ClusterRole.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_secret_access"
       ],
       "Attributes": [
         {
           "Section": "4.2.1.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "4.2.1.1.21",
       "Description": "Checks if the Role-based Access Control (RBAC) policies attached to your Kubernetes users, service accounts, and roles do not allow blocked actions on all Kubernetes resources. The rule is NON_COMPLIANT if any blocked action is allowed on all resources in an RBAC policy.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "4.2.1.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "4.2.1.1.22",
       "Description": "Checks if Kubernetes Secrets are not marked for deletion and are actively usable. The rule is NON_COMPLIANT if any Secrets are marked for deletion.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_no_secrets_envs"
       ],
       "Attributes": [
         {
           "Section": "4.2.1.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "4.2.1.1.23",
       "Description": "Checks if a Kubernetes cluster enforces encryption in transit for communication between services using TLS. The rule is NON_COMPLIANT if plain text communication is enabled for service-to-service connections in the cluster.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "4.2.1.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
@@ -13437,14 +12625,14 @@
     {
       "Id": "4.2.1.1.25",
       "Description": "Check if Kubernetes cluster nodes have encryption enabled for communication between them. The rule is NON_COMPLIANT if the encryption for communication between nodes is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "KUBELET",
       "Checks": [
         "kubelet_strong_ciphers_only"
       ],
       "Attributes": [
         {
           "Section": "4.2.1.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Kubernetes"
+          "Service": "KUBELET"
         }
       ]
     },
@@ -13463,110 +12651,98 @@
     {
       "Id": "4.2.1.1.27",
       "Description": "Checks if Kubernetes services have policies that require requests to use HTTPS. The rule is NON_COMPLIANT if any service is configured to allow HTTP requests.",
-      "Name": "Kubernetes Service",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "4.2.1.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Kubernetes Service"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "4.2.1.1",
       "Description": "Checks if all Ingress resources have configured HTTP to HTTPS redirection. The rule is NON_COMPLIANT if one or more Ingress resources do not have HTTP to HTTPS redirection in place or if any Ingress resources forward traffic to an HTTP service instead of redirecting it.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "4.2.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "4.2.1.2",
       "Description": "Checks if Kubernetes Ingress resources are using deprecated SSL protocols for HTTPS communication between Ingress controllers and backend services. This rule is NON_COMPLIANT for an Ingress resource if any 'sslProtocols' includes 'SSLv3'.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "4.2.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "4.2.1.3",
       "Description": "Checks if Kubernetes Ingress resources are enforcing secure communication; the rule is NON_COMPLIANT if the Ingress resource allows 'HTTP' traffic or if it has 'RedirectToHttps' disabled for HTTP routes.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "4.2.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "4.2.1.4",
       "Description": "Checks if your Kubernetes Ingress resources enforce HTTPS. The rule is NON_COMPLIANT if the Ingress resource allows HTTP traffic without a redirect to HTTPS.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "4.2.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "4.2.1.5",
       "Description": "Checks if your Kubernetes cluster has network policies applied to ensure that traffic between pods is encrypted using TLS. The rule is NON_COMPLIANT if a pod does not have TLS encryption for network communication.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "4.2.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "4.2.1.6",
       "Description": "Checks if Kubernetes database connection settings are configured with SSL. The rule is NON_COMPLIANT if the database connection does not have SSL configured.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "4.2.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "4.2.1.7",
       "Description": "Checks if Kubernetes Secrets for Redis data stores are encrypted at rest. The rule is NON_COMPLIANT if encryption is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "4.2.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "4.2.1.8",
-      "Description": "Checks if Kubernetes StatefulSets have encryption in transit enabled. The rule is NON_COMPLIANT for a StatefulSet if 'spec.template.spec.containers.ports[].protocol' is not set to 'TLS'.",
-      "Name": "StatefulSet",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "4.2.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "StatefulSet"
+          "Service": "Core"
         }
       ]
     },
@@ -13585,76 +12761,76 @@
     {
       "Id": "4.2.1.10",
       "Description": "Checks if the Ingress resources use SSL certificates provided by Kubernetes Secrets or external cert-manager. To use this rule, ensure that an SSL or HTTPS listener is configured in the Ingress resource. This rule is only applicable to Ingress controllers like NGINX Ingress Controller and Traefik. This rule does not check other types of services or load balancers.",
-      "Name": "Ingress Controller",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "4.2.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Ingress Controller"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "4.2.1.11",
       "Description": "Checks whether your Kubernetes Ingress resources with TLS configurations are using a custom TLS policy. The rule is only applicable if there are Ingress resources configured with TLS.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "4.2.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "4.2.1.12",
       "Description": "Checks if your Kubernetes Ingress resources use a predefined TLS configuration. The rule is NON_COMPLIANT if the Ingress TLS configuration does not equal the value of the parameter 'predefinedTLSConfig'.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "4.2.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "4.2.1.13",
       "Description": "Checks if your Kubernetes Service is configured with HTTPS or TLS termination. The rule is NON_COMPLIANT if a Service does not have HTTPS or TLS configured.",
-      "Name": "Kubernetes Service",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "4.2.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Kubernetes Service"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "4.2.1.14",
       "Description": "Checks if Kubernetes clusters have Network Policies enabled. The rule is NON_COMPLIANT if a Network Policy is not applied to the namespace or the Network Policy does not satisfy the specified rule parameters.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "4.2.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "4.2.1.15",
       "Description": "Checks if a Kubernetes cluster enforces encryption in transit for communications between pods using TLS. The rule is NON_COMPLIANT if plain text communication is enabled for in-cluster pod-to-pod connections.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "4.2.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
@@ -13673,470 +12849,446 @@
     {
       "Id": "4.2.1.17",
       "Description": "Check if Kubernetes pods have encrypted communication between them. The rule is NON_COMPLIANT if the network policies that enforce pod-to-pod encryption are not implemented.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "4.2.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "4.2.1.18",
       "Description": "Checks if Kubernetes clusters require TLS/SSL encryption for communication with SQL clients. The rule is NON_COMPLIANT if any Kubernetes SQL client connection does not have TLS/SSL enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "4.2.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "4.2.1.19",
       "Description": "Checks if Kubernetes Ingress resources have annotations enforcing HTTPS and preventing HTTP traffic. The rule is NON_COMPLIANT if any Ingress resource allows HTTP traffic without redirection to HTTPS.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "4.2.1: PAN is protected with strong cryptography during transmission.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "5.3.4.1",
       "Description": "Checks if Kubernetes Ingress resources have access logging enabled. The rule is NON_COMPLIANT if 'accessLog' annotations are not present in the Ingress configuration.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "5.3.4: Anti-malware mechanisms and processes are active, maintained, and monitored.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "5.3.4.2",
       "Description": "Checks if all methods in Kubernetes Ingress resources have access logging enabled by validating the configuration of the Ingress controller. The rule is NON_COMPLIANT if access logging is not enabled, or if the log level is neither ERROR nor INFO.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "5.3.4: Anti-malware mechanisms and processes are active, maintained, and monitored.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "5.3.4.3",
       "Description": "Checks if OpenTelemetry tracing is enabled on Kubernetes Ingress controllers. The rule is COMPLIANT if OpenTelemetry tracing is enabled and NON_COMPLIANT otherwise.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "5.3.4: Anti-malware mechanisms and processes are active, maintained, and monitored.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "5.3.4.4",
       "Description": "Checks if a Kubernetes API (such as an Agones or custom resource-based API) has logging enabled. The rule is NON_COMPLIANT if logging is not enabled, or 'logLevel' is neither ERROR nor ALL.",
-      "Name": "Kubernetes API",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "5.3.4: Anti-malware mechanisms and processes are active, maintained, and monitored.",
-          "Service": "Kubernetes API"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "5.3.4.5",
       "Description": "Checks if Services of type LoadBalancer in Kubernetes are configured with user-defined health check settings. The rule is NON_COMPLIANT if the health check settings do not match the user-defined configurations.",
-      "Name": "Kubernetes LoadBalancer Service",
+      "Name": "Scheduler",
       "Checks": [],
       "Attributes": [
         {
           "Section": "5.3.4: Anti-malware mechanisms and processes are active, maintained, and monitored.",
-          "Service": "Kubernetes LoadBalancer Service"
+          "Service": "Scheduler"
         }
       ]
     },
     {
       "Id": "5.3.4.6",
       "Description": "Checks if Kubernetes Ingress resources are configured to log access to a specified logging service. The rule is NON_COMPLIANT if an Ingress resource does not have logging configured.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "5.3.4: Anti-malware mechanisms and processes are active, maintained, and monitored.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "5.3.4.7",
       "Description": "Checks if at least one Kubernetes audit policy is logging requests to all namespaces. The rule is NON_COMPLIANT if there are no audit policies or if audit policies do not log S3-like storage access events.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "5.3.4: Anti-malware mechanisms and processes are active, maintained, and monitored.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "5.3.4.8",
       "Description": "Checks that there is at least one Kubernetes audit policy defined that follows security best practices. This rule is COMPLIANT if there is at least one audit policy that meets all of the following criteria specified for security configurations.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "5.3.4: Anti-malware mechanisms and processes are active, maintained, and monitored.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "5.3.4.9",
-      "Description": "The rule identifier is CLOUD_TRAIL_ENABLED, and the rule name is cloudtrail-enabled, which indicates that there is a difference between the identifier used for internal processing and the user-friendly name displayed.",
-      "Name": "AWS CloudTrail",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "5.3.4: Anti-malware mechanisms and processes are active, maintained, and monitored.",
-          "Service": "AWS CloudTrail"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "5.3.4.10",
       "Description": "Checks if a Kubernetes Pod has at least one logging mechanism enabled. The rule is NON_COMPLIANT if all logging configurations for the Pod are set to 'DISABLED'.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "5.3.4: Anti-malware mechanisms and processes are active, maintained, and monitored.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "5.3.4.11",
       "Description": "Checks if a Kubernetes logging configuration (e.g., Fluentd, Elasticsearch) has a log retention policy set to retain logs for more than 365 days or a specified retention period. The rule is NON_COMPLIANT if the retention period is less than MinRetentionTime, if specified, or else 365 days.",
-      "Name": "Kubernetes Logging",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_maxage_set"
       ],
       "Attributes": [
         {
           "Section": "5.3.4: Anti-malware mechanisms and processes are active, maintained, and monitored.",
-          "Service": "Kubernetes Logging"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "5.3.4.12",
       "Description": "Checks if logging is enabled with a valid severity level for Kubernetes Pod events. The rule is NON_COMPLIANT if logging is not enabled or Pod logging of a Kubernetes cluster has a severity level that is not valid.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "5.3.4: Anti-malware mechanisms and processes are active, maintained, and monitored.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "5.3.4.13",
       "Description": "Checks if a Kubernetes cluster has audit logging enabled. The rule is NON_COMPLIANT if a Kubernetes cluster does not have audit logging enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "5.3.4: Anti-malware mechanisms and processes are active, maintained, and monitored.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "5.3.4.14",
       "Description": "Checks if the Kubernetes cluster has logging enabled for client connections to the API server. The rule is NON_COMPLIANT if 'apiserver-logging.enabled' is set to false.",
-      "Name": "Kubernetes API Server",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "5.3.4: Anti-malware mechanisms and processes are active, maintained, and monitored.",
-          "Service": "Kubernetes API Server"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "5.3.4.15",
       "Description": "Checks if logging configuration is set on active Kubernetes Pod specifications. This rule is NON_COMPLIANT if an active Pod does not have a log configuration defined or if the logging configuration is set to null in at least one container definition.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "5.3.4: Anti-malware mechanisms and processes are active, maintained, and monitored.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "5.3.4.16",
       "Description": "Checks if a Kubernetes cluster is configured with logging enabled. The rule is NON_COMPLIANT if logging for the Kubernetes clusters is not enabled for all log types, such as audit logs, controller logs, and application logs.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "5.3.4: Anti-malware mechanisms and processes are active, maintained, and monitored.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "5.3.4.17",
       "Description": "Checks if Kubernetes clusters are configured to send logs to a centralized logging system like Elasticsearch or a logging stack such as EFK (Elasticsearch, Fluentd, Kibana). The rule is COMPLIANT if logging is enabled and set up for the pods in the Kubernetes cluster. This rule is NON_COMPLIANT if logging is not configured properly.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "5.3.4: Anti-malware mechanisms and processes are active, maintained, and monitored.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "5.3.4.18",
       "Description": "Checks if Kubernetes pods are configured to send logs to a specified logging solution (e.g., Fluentd, Elasticsearch). The rule is NON_COMPLIANT if pod logging is not enabled or misconfigured.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "5.3.4: Anti-malware mechanisms and processes are active, maintained, and monitored.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "5.3.4.19",
       "Description": "Checks if the Kubernetes Ingress resource has access logging enabled by examining if the specified logging annotation is set to true. The rule is NON_COMPLIANT if the access logs are not enabled or the logging destination does not match the defined S3 bucket.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "5.3.4: Anti-malware mechanisms and processes are active, maintained, and monitored.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "5.3.4.20",
       "Description": "Checks if Kubernetes clusters have audit logging enabled. The rule is NON_COMPLIANT if audit logging is not enabled for the cluster.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "5.3.4: Anti-malware mechanisms and processes are active, maintained, and monitored.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "5.3.4.21",
       "Description": "Checks if a Kubernetes cluster has audit logging enabled. The rule is NON_COMPLIANT if the cluster does not have audit logging enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "5.3.4: Anti-malware mechanisms and processes are active, maintained, and monitored.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "5.3.4.22",
-      "Description": "In Kubernetes, a similar rule could be represented by a custom resource definition (CRD) for enforcing multi-region logging, which ensures that logs from multiple regions are collected in a centralized manner. The rule identifier (MULTI_REGION_LOGGING_ENABLED) and rule name (multi-region-logging-enabled) would be analogous, where the identifier varies from the name.",
-      "Name": "Logging",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "5.3.4: Anti-malware mechanisms and processes are active, maintained, and monitored.",
-          "Service": "Logging"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "5.3.4.23",
       "Description": "Checks if a Kubernetes cluster has logging enabled for auditing. The rule is NON_COMPLIANT if the Kubernetes cluster does not have audit logging enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "5.3.4: Anti-malware mechanisms and processes are active, maintained, and monitored.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "5.3.4.24",
       "Description": "Checks if Kubernetes Network Policies have logging enabled. The rule is NON_COMPLIANT if a logging type is not configured. You can specify which logging type you want the rule to check.",
-      "Name": "Kubernetes Networking",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "5.3.4: Anti-malware mechanisms and processes are active, maintained, and monitored.",
-          "Service": "Kubernetes Networking"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "5.3.4.25",
       "Description": "Checks if Kubernetes clusters have audit logging enabled. The rule is NON_COMPLIANT if a Kubernetes cluster does not have audit logging enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "5.3.4: Anti-malware mechanisms and processes are active, maintained, and monitored.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "5.3.4.26",
       "Description": "Checks if Kubernetes clusters are configured to send logs to a logging system (e.g., Elasticsearch, Fluentd, or a similar logging service). The rule is NON_COMPLIANT if logging is not configured.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "5.3.4: Anti-malware mechanisms and processes are active, maintained, and monitored.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "5.3.4.27",
       "Description": "Checks if Kubernetes clusters are configured to publish logs to a centralized logging system (e.g., Elasticsearch or Fluentd). The rule is NON_COMPLIANT if clusters do not have logging configured to publish logs appropriately.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "5.3.4: Anti-malware mechanisms and processes are active, maintained, and monitored.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "5.3.4.28",
       "Description": "Checks if the logging for Kubernetes pods is enabled. The rule is NON_COMPLIANT if any pod logs are not being captured.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "5.3.4: Anti-malware mechanisms and processes are active, maintained, and monitored.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "5.3.4.29",
       "Description": "Checks if Kubernetes clusters are logging audits to a specific location. The rule is NON_COMPLIANT if audit logging is not enabled for a Kubernetes cluster or if the 'logDestination' parameter is provided but the audit logging destination does not match.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "5.3.4: Anti-malware mechanisms and processes are active, maintained, and monitored.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "5.3.4.30",
       "Description": "Checks if Kubernetes clusters have the specified settings. The rule is NON_COMPLIANT if the Kubernetes cluster is not encrypted or encrypted with another key, or if the cluster does not have audit logging enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "5.3.4: Anti-malware mechanisms and processes are active, maintained, and monitored.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "5.3.4.31",
       "Description": "Checks if DNS query logging is enabled for your Kubernetes cluster's CoreDNS configuration. The rule is NON_COMPLIANT if DNS query logging is not enabled for CoreDNS.",
-      "Name": "CoreDNS",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "5.3.4: Anti-malware mechanisms and processes are active, maintained, and monitored.",
-          "Service": "CoreDNS"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "5.3.4.32",
       "Description": "Checks if logging is enabled for your Kubernetes Pods. The rule is NON_COMPLIANT if logging is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "5.3.4: Anti-malware mechanisms and processes are active, maintained, and monitored.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "5.3.4.33",
       "Description": "Checks if a Kubernetes Pod has logging enabled. The rule is NON_COMPLIANT if a Pod does not have logging enabled or the logging configuration is not at the minimum level provided.",
-      "Name": "Kubernetes Pod",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "5.3.4: Anti-malware mechanisms and processes are active, maintained, and monitored.",
-          "Service": "Kubernetes Pod"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "5.3.4.34",
       "Description": "Checks if Kubernetes Network Policies are implemented and enforce traffic control between pods. The rule is NON_COMPLIANT if Network Policies are not applied to at least one namespace.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "5.3.4: Anti-malware mechanisms and processes are active, maintained, and monitored.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
@@ -14155,72 +13307,72 @@
     {
       "Id": "5.3.4.36",
       "Description": "Checks if logging is enabled on Kubernetes Ingress resources. The rule is NON_COMPLIANT for an Ingress resource, if it does not have logging enabled.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "5.3.4: Anti-malware mechanisms and processes are active, maintained, and monitored.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "6.3.3.1",
       "Description": "Validates the installation of specified applications on a Kubernetes pod, with optional minimum version requirements and platform constraints.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "6.3.3: Security vulnerabilities are identified and addressed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "6.3.3.2",
       "Description": "Checks if the compliance status of the Kubernetes cluster's node patch compliance is up-to-date or not after applying patches. The rule is compliant if the field status is 'COMPLIANT'.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "6.3.3: Security vulnerabilities are identified and addressed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "6.3.3.3",
       "Description": "Checks if Kubernetes Pods are using the latest container image version. The rule is NON_COMPLIANT if the image tag in the Pod specification is not set to 'latest', or if no specific image version is provided in the deployment manifest.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "6.3.3: Security vulnerabilities are identified and addressed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "6.3.3.4",
       "Description": "Checks if a Kubernetes cluster is running the oldest supported version. The rule is NON_COMPLIANT if the Kubernetes cluster is running the oldest supported version (equal to the parameter 'oldestVersionSupported').",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "6.3.3: Security vulnerabilities are identified and addressed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "6.3.3.5",
       "Description": "Checks if a Kubernetes cluster is running a supported version. This rule is NON_COMPLIANT if the cluster is running an unsupported version (less than the parameter 'oldestVersionSupported').",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "6.3.3: Security vulnerabilities are identified and addressed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
@@ -14251,422 +13403,410 @@
     {
       "Id": "6.3.3.8",
       "Description": "Checks if the Kubernetes Pod specifications for image, service account, restart policy, and resource limits match the expected values. The rule ignores Pods with the 'initContainers' field defined and Pods with a restart policy set to 'Never'. The rule is NON_COMPLIANT if the Pod specifications do not match the expected values.",
-      "Name": "Kubernetes Pods",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pod_creation_access"
       ],
       "Attributes": [
         {
           "Section": "6.3.3: Security vulnerabilities are identified and addressed.",
-          "Service": "Kubernetes Pods"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "6.3.3.9",
       "Description": "Checks if Kubernetes cluster version updates are available but not installed. The rule is NON_COMPLIANT for a Kubernetes cluster if the latest software updates are not installed.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "6.3.3: Security vulnerabilities are identified and addressed.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "6.3.3.10",
-      "Description": "Checks if Kubernetes pods using the PersistentVolumeClaim (PVC) are configured for automatic updates. The rule is NON_COMPLIANT if the value of 'automaticUpdates' is false.",
-      "Name": "Kubernetes",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "6.3.3: Security vulnerabilities are identified and addressed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "6.3.3.11",
       "Description": "Checks if Kubernetes clusters have the specified maintenance settings. The rule is NON_COMPLIANT if automatic upgrades to new Kubernetes versions are disabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "6.3.3: Security vulnerabilities are identified and addressed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "6.4.1.1",
       "Description": "Checks if Kubernetes Ingress has security policies enforced. The rule is NON_COMPLIANT if key: ingress.policy.enabled is set to false.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "6.4.1: Public-facing web applications are protected against attacks.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "6.4.1.2",
       "Description": "Checks if a Kubernetes Ingress resource is using a specified NGINX Ingress Controller with appropriate annotations for web access control. The rule is NON_COMPLIANT if no NGINX Ingress Controller is specified or if the annotations do not match the predefined rules.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "6.4.1: Public-facing web applications are protected against attacks.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "6.4.1.3",
       "Description": "Checks if Kubernetes APIs are associated with Network Policies. The rule is NON_COMPLIANT for a Kubernetes API if it is not associated with a Network Policy.",
-      "Name": "Kubernetes API",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "6.4.1: Public-facing web applications are protected against attacks.",
-          "Service": "Kubernetes API"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "6.4.1.4",
       "Description": "Checks if Kubernetes Ingress resources are associated with Network Policies for traffic control. The rule is NON_COMPLIANT if an Ingress resource is not associated with a Network Policy.",
-      "Name": "Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "6.4.1: Public-facing web applications are protected against attacks.",
-          "Service": "Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "6.4.1.5",
       "Description": "Checks if the Network Policy is associated with an Ingress resource managing traffic to services or an Ingress Controller service. When a management tool creates this rule, the policy owner specifies the NetworkPolicy in the resource definition and can optionally enable remediation actions.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "6.4.1: Public-facing web applications are protected against attacks.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "6.4.1.6",
       "Description": "Verifies that the Network Policies are associated with the Ingress Controller in the correct order of priority. The priority is determined by the rank of the Network Policies in the policy parameter. When a Kubernetes Networking policy is created, its priority is assigned based on its order in the list, starting from the highest priority. The cluster administrator specifies the Network Policies rank and can optionally enable custom actions.",
-      "Name": "Kubernetes Networking",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "6.4.1: Public-facing web applications are protected against attacks.",
-          "Service": "Kubernetes Networking"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "6.4.1.7",
       "Description": "Checks if Kubernetes Network Policies contain ingress or egress rules. The policy is NON_COMPLIANT if there are no rules defined in a Network Policy.",
-      "Name": "Kubernetes Network Policies",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "6.4.1: Public-facing web applications are protected against attacks.",
-          "Service": "Kubernetes Network Policies"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "6.4.1.8",
       "Description": "Checks if a Kubernetes Network Policy contains any ingress or egress rules. This rule is NON_COMPLIANT if a Network Policy does not contain any ingress or egress rules.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "6.4.1: Public-facing web applications are protected against attacks.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "6.4.1.9",
       "Description": "Checks if a Kubernetes NetworkPolicy contains any ingress or egress rules. The policy is NON_COMPLIANT if there are no rules present within the NetworkPolicy.",
-      "Name": "Kubernetes NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "6.4.1: Public-facing web applications are protected against attacks.",
-          "Service": "Kubernetes NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "6.4.1.10",
       "Description": "Checks if a Kubernetes NetworkPolicy contains any ingress or egress rules. The policy is NON_COMPLIANT if no rules are defined within the NetworkPolicy.",
-      "Name": "Kubernetes NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "6.4.1: Public-facing web applications are protected against attacks.",
-          "Service": "Kubernetes NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "6.4.1.11",
       "Description": "Checks whether a Kubernetes NetworkPolicy contains any ingress or egress rules. This rule is NON_COMPLIANT if a NetworkPolicy does not contain any rules.",
-      "Name": "Kubernetes NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "6.4.1: Public-facing web applications are protected against attacks.",
-          "Service": "Kubernetes NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "6.4.1.12",
       "Description": "Checks if a Kubernetes NetworkPolicy contains any ingress or egress rules. The policy is NON_COMPLIANT if there are no rules present within the NetworkPolicy.",
-      "Name": "NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "6.4.1: Public-facing web applications are protected against attacks.",
-          "Service": "NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "6.4.1.13",
       "Description": "Checks whether a Kubernetes NetworkPolicy contains at least one ingress or egress rule. This policy is COMPLIANT if it contains at least one rule and NON_COMPLIANT otherwise.",
-      "Name": "Kubernetes NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "6.4.1: Public-facing web applications are protected against attacks.",
-          "Service": "Kubernetes NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "6.4.1.14",
       "Description": "Checks if a Kubernetes NetworkPolicy contains any ingress or egress rules. The policy is NON_COMPLIANT if there are no ingress or egress rules present within the NetworkPolicy.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "6.4.1: Public-facing web applications are protected against attacks.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "6.4.2.1",
       "Description": "Checks if Kubernetes Network Policies are enabled on Ingress Controllers. The rule is NON_COMPLIANT if the key: networkPolicies.enabled is set to false.",
-      "Name": "Ingress Controller",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "6.4.2: Public-facing web applications are protected against attacks.",
-          "Service": "Ingress Controller"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "6.4.2.2",
       "Description": "Checks if a Kubernetes Ingress resource is using a valid NetworkPolicy or an Ingress controller with proper security configurations. The rule is NON_COMPLIANT if a NetworkPolicy is not used or if the used NetworkPolicy does not match what is recommended in the policy specifications.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "6.4.2: Public-facing web applications are protected against attacks.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "6.4.2.3",
       "Description": "Checks if Kubernetes APIs are associated with Network Policies. The rule is NON_COMPLIANT for a Kubernetes API if it is not associated with a Network Policy.",
-      "Name": "Kubernetes API",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "6.4.2: Public-facing web applications are protected against attacks.",
-          "Service": "Kubernetes API"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "6.4.2.4",
       "Description": "Checks if Kubernetes Ingress resources are associated with any Network Policies to ensure security. The rule is NON_COMPLIANT if an Ingress resource is not associated with any Network Policy.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "6.4.2: Public-facing web applications are protected against attacks.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "6.4.2.5",
       "Description": "Checks if the NetworkPolicy is associated with a Service or Ingress resource in Kubernetes. When a NetworkPolicy is created, the policy owner specifies the namespace and selectors that determine which pods are affected by the policy and can optionally enable actions for traffic management.",
-      "Name": "NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "6.4.2: Public-facing web applications are protected against attacks.",
-          "Service": "NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "6.4.2.6",
       "Description": "Verifies that the NetworkPolicy objects associated with a Kubernetes Ingress resource have the correct priority, based on the rank specified in the NetworkPolicy. The Kubernetes system assigns priorities in increasing order, starting from the highest priority (0) and continuing with 1, 2, and so on. The cluster administrator defines the rank in the NetworkPolicy and can optionally enable remediation actions.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "6.4.2: Public-facing web applications are protected against attacks.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "6.4.2.7",
       "Description": "Checks if Kubernetes Network Policies contain rules. The policy is NON_COMPLIANT if there are no rules in a Kubernetes Network Policy.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "6.4.2: Public-facing web applications are protected against attacks.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "6.4.2.8",
       "Description": "Checks if a Kubernetes Network Policy contains any ingress or egress rules. This rule is NON_COMPLIANT if a Network Policy does not contain any ingress or egress rules.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "6.4.2: Public-facing web applications are protected against attacks.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "6.4.2.9",
       "Description": "Checks if a Kubernetes NetworkPolicy contains any ingress or egress rules. The NetworkPolicy is NON_COMPLIANT if there are no rules present within the policy.",
-      "Name": "Kubernetes NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "6.4.2: Public-facing web applications are protected against attacks.",
-          "Service": "Kubernetes NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "6.4.2.10",
       "Description": "Checks if a Kubernetes NetworkPolicy contains any rules. The NetworkPolicy is NON_COMPLIANT if no rules are present within the NetworkPolicy.",
-      "Name": "Kubernetes NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "6.4.2: Public-facing web applications are protected against attacks.",
-          "Service": "Kubernetes NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "6.4.2.11",
       "Description": "Checks whether a Kubernetes NetworkPolicy contains any ingress or egress rules. This policy is NON_COMPLIANT if a NetworkPolicy does not contain any ingress or egress rules.",
-      "Name": "Kubernetes NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "6.4.2: Public-facing web applications are protected against attacks.",
-          "Service": "Kubernetes NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "6.4.2.12",
       "Description": "Checks if Kubernetes NetworkPolicies contain any rules. The policy is NON_COMPLIANT if there are no rules present within a Kubernetes NetworkPolicy.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "6.4.2: Public-facing web applications are protected against attacks.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "6.4.2.13",
       "Description": "Checks whether a Kubernetes Network Policy contains at least one ingress or egress rule. This policy is COMPLIANT if it contains at least one rule and NON_COMPLIANT otherwise.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "6.4.2: Public-facing web applications are protected against attacks.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "6.4.2.14",
       "Description": "Checks if a Kubernetes Network Policy contains any rules. The policy is NON_COMPLIANT if there are no rules defined within the Network Policy.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "6.4.2: Public-facing web applications are protected against attacks.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "6.5.5.1",
       "Description": "Checks if the Kubernetes Deployment for a specific application is not using the default update strategy. The rule is NON_COMPLIANT if the Deployment is using the rolling update strategy with maxUnavailable set to 0.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "6.5.5: Changes to all system components are managed securely.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "6.5.5.2",
       "Description": "Checks if the first deployment stage of Kubernetes performs more than one deployment. Optionally checks if each of the subsequent remaining stages deploy to more than the specified number of deployments (deploymentLimit).",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "6.5.5: Changes to all system components are managed securely.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "6.5.6.1",
       "Description": "Checks if the Kubernetes Deployment is not using the default rollout strategy. The rule is NON_COMPLIANT if the deployment strategy is set to 'Recreate'.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "6.5.6: Changes to all system components are managed securely.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
@@ -14685,228 +13825,228 @@
     {
       "Id": "7.2.1.1",
       "Description": "Checks if a Kubernetes cluster node is part of a specific Kubernetes Namespace. The rule is NON_COMPLIANT if the node is not part of the specified Namespace or if the Namespace does not match rule parameter NamespaceName.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.2.1: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.2.1.2",
       "Description": "Checks if a Kubernetes namespace has an attached Role or ClusterRole that prevents deletion of Pods. The rule is NON_COMPLIANT if the namespace does not have a Role/ClusterRole or has Roles/ClusterRoles without a suitable 'Deny' statement (like 'delete' permission for 'pods').",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.2.1: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.2.1.3",
       "Description": "Checks if a Kubernetes Pod security context has privileged mode enabled. The rule is NON_COMPLIANT for a Pod if 'privileged' is set to 'true'.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_privileged_containers"
       ],
       "Attributes": [
         {
           "Section": "7.2.1: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.2.1.4",
       "Description": "Checks if custom Kubernetes CustomResourceDefinitions (CRDs) have a role-based access control (RBAC) policy attached. The rule is NON_COMPLIANT for custom CRDs without an RBAC policy attached.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pod_creation_access"
       ],
       "Attributes": [
         {
           "Section": "7.2.1: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.2.1.5",
       "Description": "Checks if a Kubernetes pod has a Service Account attached to it. The rule is NON_COMPLIANT if no Service Account is attached to the pod.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_service_account_plugin"
       ],
       "Attributes": [
         {
           "Section": "7.2.1: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.2.1.6",
       "Description": "Checks if the securityContext.privileged field in the Pod specification is set to 'true'. The rule is NON_COMPLIANT if the privileged field is 'true'.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_privileged_containers"
       ],
       "Attributes": [
         {
           "Section": "7.2.1: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.2.1.7",
       "Description": "Checks if Kubernetes Pods only have read-only access to their root filesystems. The rule is NON_COMPLIANT if the readOnlyRootFilesystem field in the Pod's securityContext is set to 'false'.",
-      "Name": "Kubernetes Pods",
+      "Name": "Core",
       "Checks": [
         "core_minimize_root_containers_admission"
       ],
       "Attributes": [
         {
           "Section": "7.2.1: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes Pods"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.2.1.8",
       "Description": "Checks if Kubernetes Pod specifications specify a user to run containers. The rule is NON_COMPLIANT if the 'securityContext.runAsUser' parameter is not present or set to '0'.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_security_context_deny_plugin"
       ],
       "Attributes": [
         {
           "Section": "7.2.1: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.2.1.9",
       "Description": "Verifies that the Kubernetes Role and ClusterRole policies do not authorize actions that are restricted on Kubernetes Secrets. The rule is NON_COMPLIANT if any restricted action is permitted on Kubernetes Secrets by the defined Role or ClusterRole.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_secret_access"
       ],
       "Attributes": [
         {
           "Section": "7.2.1: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.2.1.10",
       "Description": "Checks if the Role-based Access Control (RBAC) policies attached to your Kubernetes users, roles, and groups do not allow blocked actions on all Kubernetes resources. The rule is NON_COMPLIANT if any blocked action is permitted on all Kubernetes resources in the RBAC policy.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "7.2.1: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.2.1.11",
       "Description": "Checks if the Kubernetes Role or ClusterRole resources do not have any permissions granted through inline policies. The rule is NON_COMPLIANT if a Kubernetes user, service account, or group has any permissions granted through inline Roles or ClusterRoles.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.2.1: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.2.1.12",
       "Description": "Checks in each Kubernetes Role or ClusterRole resource if a RoleBinding or ClusterRoleBinding is associated with the specified Role or ClusterRole. The rule is NON_COMPLIANT if the RoleBinding or ClusterRoleBinding references the Role or ClusterRole.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "7.2.1: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.2.1.13",
       "Description": "Checks whether a Kubernetes Role or ClusterRole is bound to a ServiceAccount, or a RoleBinding or ClusterRoleBinding is associated with a User or Group that has one or more members.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.2.1: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.2.1.14",
       "Description": "Checks if Kubernetes Role or ClusterRole resources grant permissions that allow all actions on all resources. The rule is NON_COMPLIANT if any Role or ClusterRole definition includes rules with 'verbs' that list '*' for all actions over 'resourceNames' that include '*'.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "7.2.1: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.2.1.15",
       "Description": "Checks if Kubernetes Role-based Access Control (RBAC) rules that you create grant permissions to all actions on individual Kubernetes resources. The rule is NON_COMPLIANT if any custom Role or ClusterRole allows full access to at least 1 Kubernetes resource or namespace.",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "7.2.1: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes RBAC"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.2.1.16",
       "Description": "Checks if all required Kubernetes Roles or ClusterRoles specified in the list are attached to the ServiceAccount. The rule is NON_COMPLIANT if any required Role or ClusterRole is not attached to the ServiceAccount.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_service_account_plugin"
       ],
       "Attributes": [
         {
           "Section": "7.2.1: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.2.1.17",
       "Description": "Checks if the Kubernetes root user (or equivalent admin user) has any access keys available. The result is COMPLIANT if no access keys are found. Otherwise, it is NON_COMPLIANT.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.2.1: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
@@ -14925,312 +14065,312 @@
     {
       "Id": "7.2.1.19",
       "Description": "Checks if none of your Kubernetes ServiceAccounts have RoleBindings or ClusterRoleBindings directly attached. ServiceAccounts must inherit permissions from Roles or ClusterRoles. The rule is NON_COMPLIANT if there is at least one RoleBinding or ClusterRoleBinding directly attached to the ServiceAccount.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_service_account_plugin"
       ],
       "Attributes": [
         {
           "Section": "7.2.1: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.2.1.20",
       "Description": "Checks if a Kubernetes cluster has Role-Based Access Control (RBAC) enabled. The rule is NON_COMPLIANT if a Kubernetes cluster does not have RBAC enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "7.2.1: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.2.1.21",
       "Description": "Checks if Kubernetes namespaces have Role-Based Access Control (RBAC) policies enabled. The rule is NON_COMPLIANT if RoleBindings are not present for the specified Kubernetes namespace.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "7.2.1: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.2.1.22",
       "Description": "Checks if a Kubernetes cluster has Role-Based Access Control (RBAC) enabled. The rule is NON_COMPLIANT if a Kubernetes cluster does not have RBAC enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "7.2.1: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.2.1.23",
       "Description": "Checks if a Kubernetes database instance, such as a PostgreSQL or MySQL deployment, has Role-Based Access Control (RBAC) authentication enabled. The rule is NON_COMPLIANT if the database instance does not have RBAC authentication enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "7.2.1: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.2.1.24",
       "Description": "Checks if Kubernetes Persistent Volumes (PVs) allow user permissions through access control lists (ACLs). The rule is NON_COMPLIANT if ACLs are configured for user access in Kubernetes Persistent Volumes.",
-      "Name": "Kubernetes Persistent Volumes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "7.2.1: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes Persistent Volumes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.2.1.25",
       "Description": "Checks if a Kubernetes Role or ClusterRole does not allow blocklisted permissions on resources in a namespace for principals from other Kubernetes namespaces. For example, the rule checks that the Role or ClusterRole does not allow any permissions related to 'pod'. The rule is NON_COMPLIANT if any blocklisted actions are allowed by the Role or ClusterRole.",
-      "Name": "Kubernetes Roles and RoleBindings",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pod_creation_access"
       ],
       "Attributes": [
         {
           "Section": "7.2.1: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes Roles and RoleBindings"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.2.1.26",
       "Description": "Checks that the access granted by the Kubernetes pod is restricted by any of the Kubernetes principals, service accounts, network policies, or namespaces that you provide. The rule is COMPLIANT if a network policy is not present.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.2.1: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.2.1.27",
       "Description": "Verifies that Kubernetes PersistentVolumeClaim permissions do not allow inter-namespace access beyond the specified controls in the PersistentVolume definition.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "7.2.1: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.2.1.28",
       "Description": "Checks if the Pod Security Policy in a Kubernetes cluster allows privileged operations. The rule is NON_COMPLIANT if privileged operations are permitted for any pod.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_privileged_containers"
       ],
       "Attributes": [
         {
           "Section": "7.2.1: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.2.1.29",
       "Description": "Checks if the Security Incident Response (SIR) team can access your Kubernetes cluster. The rule is NON_COMPLIANT if Kubernetes security measures are enabled but the role for SIR access is not configured.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.2.1: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.2.2.1",
       "Description": "Checks if a Kubernetes cluster is part of a specific organization (e.g., using labels or annotations). The rule is NON_COMPLIANT if a Kubernetes cluster does not have the required organization label or if the organization label value does not match the expected organization ID.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.2.2: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.2.2.2",
       "Description": "Checks if a Kubernetes PersistentVolumeClaim (PVC) has an associated ResourceQuota that prevents deletion or modification of related PersistentVolumes (PVs). The rule is NON_COMPLIANT if the PVC does not have an associated ResourceQuota or has quotas without proper limits on 'delete' and 'update' operations related to the storage resources.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "7.2.2: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.2.2.3",
       "Description": "Checks if a Kubernetes Pod has privileged security context enabled. The rule is NON_COMPLIANT for a Pod if 'privileged' is set to 'true'.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_privileged_containers"
       ],
       "Attributes": [
         {
           "Section": "7.2.2: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.2.2.4",
       "Description": "Checks if custom Kubernetes CustomResourceDefinitions (CRDs) have an associated RBAC policy. The rule is NON_COMPLIANT for CRDs without an associated RBAC policy attached.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pod_creation_access"
       ],
       "Attributes": [
         {
           "Section": "7.2.2: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.2.2.5",
       "Description": "Checks if a Kubernetes Pod has a ServiceAccount associated with it. The rule is NON_COMPLIANT if no ServiceAccount is attached to the Pod.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_service_account_plugin"
       ],
       "Attributes": [
         {
           "Section": "7.2.2: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.2.2.6",
       "Description": "Checks if the securityContext in Pod definitions has privileged set to 'true'. The rule is NON_COMPLIANT if privileged is 'true'.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_privileged_containers"
       ],
       "Attributes": [
         {
           "Section": "7.2.2: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.2.2.7",
       "Description": "Checks if Kubernetes Pods only have read-only access to their root filesystems. The rule is NON_COMPLIANT if the readOnlyRootFilesystem field in the securityContext of the Pod specification is set to 'false'.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_root_containers_admission"
       ],
       "Attributes": [
         {
           "Section": "7.2.2: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.2.2.8",
       "Description": "Checks if Kubernetes Pods specify a user for containers to run with. The rule is NON_COMPLIANT if the 'runAsUser' field is not present or set to '0' (root).",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.2.2: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.2.2.9",
       "Description": "Checks if the Kubernetes Role or ClusterRole permissions do not allow actions that are denied by network policies. The rule is NON_COMPLIANT if any blocked action is allowed by the Kubernetes Role or ClusterRole.",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC (Role-Based Access Control)",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.2.2: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes RBAC"
+          "Service": "RBAC (Role-Based Access Control)"
         }
       ]
     },
     {
       "Id": "7.2.2.10",
       "Description": "Checks if the RoleBindings and ClusterRoleBindings in Kubernetes do not allow unauthorized actions on all Secrets. The rule is NON_COMPLIANT if any unauthorized action is allowed on all Secrets by any RoleBinding or ClusterRoleBinding.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_secret_access"
       ],
       "Attributes": [
         {
           "Section": "7.2.2: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.2.2.11",
       "Description": "Checks if the RBAC (Role-Based Access Control) feature is properly configured. The rule is NON_COMPLIANT if a Kubernetes ServiceAccount has any RoleBindings that associate it with inline roles, as the best practice is to use ClusterRoles or pre-defined roles instead.",
-      "Name": "Kubernetes RBAC",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "7.2.2: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes RBAC"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.2.2.12",
       "Description": "Checks in each Kubernetes Role or ClusterRole resource, if a RoleBinding or ClusterRoleBinding containing a specific Role or ClusterRole is attached to the resource. The rule is NON_COMPLIANT if the RoleBinding or ClusterRoleBinding is attached to the resource.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "7.2.2: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
@@ -15249,314 +14389,314 @@
     {
       "Id": "7.2.2.14",
       "Description": "Checks if Kubernetes Role or ClusterRole policies that you create have rules that grant permissions to all verbs on all resources. The rule is NON_COMPLIANT if any custom Role or ClusterRole definition includes 'verbs': ['*'] over 'resources': ['*'].",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "7.2.2: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.2.2.15",
       "Description": "Checks if Kubernetes Role-Based Access Control (RBAC) policies that you create grant permissions to all actions on individual Kubernetes resources. The rule is NON_COMPLIANT if any custom Role or ClusterRole allows full access to at least 1 Kubernetes resource or group of resources.",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "7.2.2: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes RBAC"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.2.2.16",
       "Description": "Checks if all specified Kubernetes RoleBindings are applied to the given Service Account. The rule is NON_COMPLIANT if a RoleBinding is missing for the Service Account.",
-      "Name": "Kubernetes Role-Based Access Control (RBAC)",
+      "Name": "API Server",
       "Checks": [
         "apiserver_service_account_plugin"
       ],
       "Attributes": [
         {
           "Section": "7.2.2: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes Role-Based Access Control (RBAC)"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.2.2.17",
       "Description": "Checks if the Kubernetes root user (superuser) access is enabled. The rule is COMPLIANT if the root user has no access permissions (no tokens or credentials exist for the root user). Otherwise, NON_COMPLIANT.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_root_containers_admission"
       ],
       "Attributes": [
         {
           "Section": "7.2.2: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.2.2.18",
       "Description": "Checks whether Kubernetes users are members of at least one RoleBinding or ClusterRoleBinding.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.2.2: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.2.2.19",
       "Description": "Checks if none of your Kubernetes users or service accounts have direct role bindings. Users and service accounts should inherit permissions from roles or cluster roles through role bindings. The rule is NON_COMPLIANT if there is at least one role binding directly attached to the user or service account.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "7.2.2: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.2.2.20",
       "Description": "Checks if a Kubernetes cluster has Role-Based Access Control (RBAC) enabled. The rule is NON_COMPLIANT if the Kubernetes cluster does not have RBAC enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "7.2.2: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.2.2.21",
       "Description": "Checks if Kubernetes clusters have Role-Based Access Control (RBAC) enabled. The rule is NON_COMPLIANT if RBAC is not configured for the Kubernetes cluster.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "7.2.2: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.2.2.22",
       "Description": "Checks if a Kubernetes cluster's database (e.g., PostgreSQL, MySQL) has Role-based Access Control (RBAC) enabled for authentication. The rule is NON_COMPLIANT if the database does not have RBAC authentication enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "7.2.2: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.2.2.23",
       "Description": "Checks if a Kubernetes cluster has Role-Based Access Control (RBAC) enabled. The rule is NON_COMPLIANT if a Kubernetes cluster does not have RBAC enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "7.2.2: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.2.2.24",
       "Description": "Checks if Kubernetes Persistent Volumes allow user permissions through access control lists (ACLs). The rule is NON_COMPLIANT if ACLs are configured for user access in Kubernetes Persistent Volumes.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "7.2.2: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.2.2.25",
       "Description": "Checks if a Kubernetes Role or ClusterRole does not allow blocklisted permissions on resources for users from other namespaces or clusters. For example, the rule checks that the Role or ClusterRole does not allow any 'get', 'delete' actions on Pod resources. The rule is NON_COMPLIANT if any blocklisted actions are allowed by the Role or ClusterRole.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.2.2: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.2.2.26",
       "Description": "Checks that the access granted by the Kubernetes service is restricted to specified namespaces, service accounts, or network policies that you provide. The rule is COMPLIANT if a NetworkPolicy is not present.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "7.2.2: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.2.2.27",
       "Description": "Checks if your Kubernetes PersistentVolumeClaims (PVC) permissions do not allow other inter-namespace access except for the control namespace policy that you provide.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "7.2.2: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.2.2.28",
       "Description": "Checks if the Kubernetes Pod Security Policy (PSP) allows privileged access for Pods. The rule is NON_COMPLIANT if a Pod is allowed to run with elevated privileges.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_privileged_containers"
       ],
       "Attributes": [
         {
           "Section": "7.2.2: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.2.2.29",
       "Description": "Checks if the Kubernetes Security Response Team (KSRT) can access your Kubernetes cluster. The rule is NON_COMPLIANT if the Role-Based Access Control (RBAC) is enabled but the role for KSRT access is not configured.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.2.2: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.2.3.1",
       "Description": "Checks if a Kubernetes Pod has privileged mode enabled. The rule is NON_COMPLIANT for a Pod if 'privileged' is set to 'true' in the security context.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_privileged_containers"
       ],
       "Attributes": [
         {
           "Section": "7.2.3: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.2.3.2",
       "Description": "Checks if custom Kubernetes Custom Resource Definitions (CRDs) have an admission policy attached. The rule is NON_COMPLIANT for CRDs without an admission policy attached.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.2.3: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.2.3.3",
       "Description": "Checks if the security context in the pod definition of a Kubernetes Deployment has 'privileged' set to 'true'. The rule is NON_COMPLIANT if 'privileged' is 'true'.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_privileged_containers"
       ],
       "Attributes": [
         {
           "Section": "7.2.3: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.2.3.4",
       "Description": "Checks if Kubernetes Pods specify a user for containers to run as. The rule is NON_COMPLIANT if the 'securityContext.runAsUser' parameter is not present or set to '0'.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_security_context_deny_plugin"
       ],
       "Attributes": [
         {
           "Section": "7.2.3: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.2.3.5",
       "Description": "Checks if the Kubernetes Role or ClusterRole policies that you create do not allow ineligible actions on Kubernetes Secrets. The rule is NON_COMPLIANT if any ineligible action is allowed on Kubernetes Secrets by the managed Role or ClusterRole.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_secret_access"
       ],
       "Attributes": [
         {
           "Section": "7.2.3: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.2.3.6",
       "Description": "Checks if the Role-based Access Control (RBAC) policies attached to your Kubernetes users, roles, and role bindings do not allow blocked actions on all specified Kubernetes resources. The rule is NON_COMPLIANT if any blocked action is allowed on any Kubernetes resource in a role binding.",
-      "Name": "Kubernetes RBAC",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "7.2.3: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes RBAC"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.2.3.7",
       "Description": "Checks if Kubernetes Role or ClusterRole policies allow unrestricted access by having rules that permit all verbs on all resources. The rule is NON_COMPLIANT if any user-defined Role or ClusterRole includes rules with 'verbs': ['*'] over all 'resources': ['*'].",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_wildcard_use_roles"
       ],
       "Attributes": [
         {
           "Section": "7.2.3: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes RBAC"
+          "Service": "RBAC"
         }
       ]
     },
@@ -15575,196 +14715,196 @@
     {
       "Id": "7.2.3.9",
       "Description": "Checks if the Kubernetes Pod Security Policy allows privileged access for containers. The rule is NON_COMPLIANT if a Pod is running with elevated privileges.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_privileged_containers"
       ],
       "Attributes": [
         {
           "Section": "7.2.3: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.2.4.1",
       "Description": "Checks whether Kubernetes Roles or RoleBindings have at least one associated ServiceAccount.",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC (Role-Based Access Control)",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.2.4: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes RBAC"
+          "Service": "RBAC (Role-Based Access Control)"
         }
       ]
     },
     {
       "Id": "7.2.4.2",
       "Description": "Checks if your Kubernetes Service Accounts have tokens that have not been used within the specified number of days you provided. The rule is NON_COMPLIANT if there are inactive accounts that have not recently used their tokens.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.2.4: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.2.4.3",
       "Description": "Checks if Kubernetes Secrets have been accessed within a specified number of days. The rule is NON_COMPLIANT if a secret has not been accessed in 'unusedForDays' number of days. The default value is 90 days.",
-      "Name": "Kubernetes Secrets",
+      "Name": "RBAC (Role-Based Access Control)",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.2.4: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes Secrets"
+          "Service": "RBAC (Role-Based Access Control)"
         }
       ]
     },
     {
       "Id": "7.2.5.1.1",
       "Description": "Checks whether IAM groups have at least one Kubernetes user (Service Account).",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.2.5.1: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.2.5.1.2",
       "Description": "Checks if your Kubernetes users (ServiceAccounts) have tokens that have not been used within the specified number of days you provided. The rule is NON_COMPLIANT if there are ServiceAccounts that have inactive tokens not recently used.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.2.5.1: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.2.5.1.3",
       "Description": "Checks if Kubernetes Secrets have been accessed within a specified number of days. The rule is NON_COMPLIANT if a Secret has not been accessed in 'unusedForDays' number of days. The default value is 90 days.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.2.5.1: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.2.5.1",
       "Description": "Checks if a Kubernetes cluster is part of a specific organization. The rule is NON_COMPLIANT if a Kubernetes cluster is not part of the desired organization or the specified organization ID does not match the rule parameter OrganizationId.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.2.5: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.2.5.2",
       "Description": "Checks if a Kubernetes namespace has an associated network policy that restricts ingress and egress traffic, preventing unauthorized access. The rule is NON_COMPLIANT if the namespace does not have network policies or has policies without appropriate rules that deny specific traffic (e.g., HTTP, HTTPS) to sensitive services.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "7.2.5: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.2.5.3",
       "Description": "Checks if a Kubernetes pod has a ServiceAccount associated with it. The rule is NON_COMPLIANT if no ServiceAccount is attached to the pod.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_service_account_plugin"
       ],
       "Attributes": [
         {
           "Section": "7.2.5: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.2.5.4",
       "Description": "Checks if Kubernetes Pods only have read-only access to their root filesystems. The rule is NON_COMPLIANT if the readOnlyRootFilesystem field in the Pod Security Context is set to 'false'.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_root_containers_admission"
       ],
       "Attributes": [
         {
           "Section": "7.2.5: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.2.5.5",
       "Description": "Checks if the Kubernetes Role-based Access Control (RBAC) policies that you create do not allow access to Kubernetes Secrets that are restricted. The rule is NON_COMPLIANT if any restricted access is allowed to Kubernetes Secrets by the RBAC policy.",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_secret_access"
       ],
       "Attributes": [
         {
           "Section": "7.2.5: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes RBAC"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.2.5.6",
       "Description": "Checks if the Role-Based Access Control (RBAC) policies attached to your Kubernetes service accounts and roles do not allow prohibited actions on all Kubernetes resources. The rule is NON_COMPLIANT if any prohibited action is allowed on all Kubernetes resources in an RBAC policy.",
-      "Name": "Kubernetes RBAC",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "7.2.5: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes RBAC"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.2.5.7",
       "Description": "Ensure that no Kubernetes ServiceAccounts have any associated inline policies, as inline policies can introduce security vulnerabilities. This rule is NON_COMPLIANT if a ServiceAccount has any role bindings that grant specific permissions directly to that account.",
-      "Name": "Kubernetes ServiceAccounts",
+      "Name": "CONTROLLERMANAGER",
       "Checks": [
         "controllermanager_service_account_credentials"
       ],
       "Attributes": [
         {
           "Section": "7.2.5: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes ServiceAccounts"
+          "Service": "CONTROLLERMANAGER"
         }
       ]
     },
     {
       "Id": "7.2.5.8",
       "Description": "Checks in each Kubernetes Role or ClusterRole resource, if a RoleBinding or ClusterRoleBinding with the specified Role or ClusterRole is associated with the resource. The rule is NON_COMPLIANT if the RoleBinding or ClusterRoleBinding is linked to the Role or ClusterRole.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "7.2.5: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
@@ -15783,946 +14923,946 @@
     {
       "Id": "7.2.5.10",
       "Description": "Checks if Kubernetes Role or ClusterRole configurations that you create have rules that grant permissions to all verbs on all resources. The rule is NON_COMPLIANT if any custom Role or ClusterRole includes rules with 'verbs': ['*'] over 'resources': ['*'].",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "7.2.5: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.2.5.11",
       "Description": "Checks if Kubernetes Role-Based Access Control (RBAC) policies that you create grant permissions to all actions on individual Kubernetes resources. The rule is NON_COMPLIANT if any custom RBAC Role or ClusterRole allows full access to at least 1 Kubernetes resource.",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "7.2.5: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes RBAC"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.2.5.12",
       "Description": "Checks if all specified Kubernetes RoleBindings are correctly linked to the associated Kubernetes Role. The rule is NON_COMPLIANT if a RoleBinding does not reference the correct Role.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "7.2.5: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.2.5.13",
       "Description": "Checks if none of your Kubernetes Service Accounts have direct RoleBindings or ClusterRoleBindings attached. Service Accounts must inherit permissions from Roles or ClusterRoles, and the rule is NON_COMPLIANT if there is at least one RoleBinding or ClusterRoleBinding attached to the Service Account.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_service_account_lookup_true"
       ],
       "Attributes": [
         {
           "Section": "7.2.5: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.2.5.14",
       "Description": "Checks if a Kubernetes Pod has Role-Based Access Control (RBAC) enabled. The rule is NON_COMPLIANT if a Kubernetes Pod does not have RBAC enabled.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pod_creation_access"
       ],
       "Attributes": [
         {
           "Section": "7.2.5: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.2.5.15",
       "Description": "Checks if Kubernetes clusters have Role-Based Access Control (RBAC) enabled. The rule is NON_COMPLIANT if RBAC is not enabled for the Kubernetes cluster.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "7.2.5: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.2.5.16",
       "Description": "Checks if a Kubernetes database deployment (like PostgreSQL or MySQL) has Role-Based Access Control (RBAC) authentication enabled. The rule is NON_COMPLIANT if the database deployment does not have RBAC authentication enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "7.2.5: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.2.5.17",
       "Description": "Checks if a Kubernetes Cluster has Role-based Access Control (RBAC) enabled. The rule is NON_COMPLIANT if the Kubernetes Cluster does not have RBAC enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "7.2.5: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.2.5.18",
       "Description": "Checks if Kubernetes Persistent Volume Claims (PVCs) allow user permissions through access control lists (RBAC). The rule is NON_COMPLIANT if RBAC is configured to allow unauthorized user access to Persistent Volume Claims.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "7.2.5: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.2.5.19",
       "Description": "Checks if a Kubernetes Role or ClusterRole does not allow blocklisted permissions related to resource actions on namespaces for subjects from other namespaces. For example, the rule checks that the Role or ClusterRole does not allow subjects from other namespaces to perform any actions like get, list, or delete on specific resources. The rule is NON_COMPLIANT if any blocklisted actions are allowed by the Role or ClusterRole.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.2.5: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.2.5.20",
       "Description": "Checks that the access granted by the Kubernetes ClusterRoleBinding is restricted by any of the Kubernetes principals, service accounts, namespaces, or IPs that you provide. The rule is COMPLIANT if a ClusterRoleBinding policy is not present.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "7.2.5: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.2.5.21",
       "Description": "Verifies that the Kubernetes Secrets do not allow unauthorized access to other namespaces and ensure that the permissions are controlled by the specified Role-Based Access Control (RBAC) policies.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_secret_access"
       ],
       "Attributes": [
         {
           "Section": "7.2.5: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.2.5.22",
       "Description": "Checks if the Incident Response Team can access your Kubernetes cluster. The rule is NON_COMPLIANT if the required role for the Incident Response Team is not configured, even though security features are enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.2.5: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.2.6.1",
       "Description": "Checks if Kubernetes Pods only have read-only access to their root filesystems. The rule is NON_COMPLIANT if the readOnlyRootFilesystem parameter in the pod's securityContext is set to 'false'.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_root_containers_admission"
       ],
       "Attributes": [
         {
           "Section": "7.2.6: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.2.6.2",
       "Description": "Verifies if Kubernetes users are part of at least one RoleBinding or ClusterRoleBinding.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.2.6: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.2.6.3",
       "Description": "Checks if Kubernetes ClusterRoleBinding has appropriate permissions for access control. The rule is NON_COMPLIANT if ClusterRoleBinding does not restrict access to sensitive resources.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "7.2.6: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.2.6.4",
       "Description": "Checks if a Kubernetes Role or ClusterRole does not allow blocklisted permissions for principals from other namespaces or clusters, such as certain actions on Pods, Services, or ConfigMaps. For example, the rule checks that the Role or ClusterRole does not allow any 'get', 'delete' actions on Pods by users from different namespaces. The rule is NON_COMPLIANT if any blocklisted actions are allowed by the Role or ClusterRole.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pod_creation_access"
       ],
       "Attributes": [
         {
           "Section": "7.2.6: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.2.6.5",
       "Description": "Checks if your Kubernetes Persistent Volume claims do not allow access from other namespaces besides the control namespace that you provide.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "7.2.6: Access to system components and data is appropriately defined and assigned.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.3.1.1",
       "Description": "Checks if a Kubernetes cluster is part of a defined namespace. The rule is NON_COMPLIANT if a Kubernetes pod is not part of the specified namespace or if the namespace does not match the rule parameter Namespace.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.3.1: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.3.1.2",
       "Description": "Checks if a Kubernetes PersistentVolume has an attached role-based access control (RBAC) policy that prevents deletion of PersistentVolumeClaims. The rule is NON_COMPLIANT if the PersistentVolume does not have specific RBAC policies or has policies that do not include a suitable 'Deny' rule (with permissions such as delete on PersistentVolumeClaim).",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "7.3.1: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.3.1.3",
       "Description": "Checks if a Kubernetes Pod has a Service Account attached to it. The rule is NON_COMPLIANT if no Service Account is associated with the Pod.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_service_account_plugin"
       ],
       "Attributes": [
         {
           "Section": "7.3.1: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.3.1.4",
       "Description": "Checks if Kubernetes containers only have read-only access to their root filesystems. The rule is NON_COMPLIANT if the readOnlyRootFilesystem parameter in the pod specification is set to 'false'.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_root_containers_admission"
       ],
       "Attributes": [
         {
           "Section": "7.3.1: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.3.1.5",
       "Description": "Checks if the Kubernetes Role-Based Access Control (RBAC) policies that you create do not allow blocked actions on Kubernetes Secrets. The rule is NON_COMPLIANT if any blocked action is allowed on Kubernetes Secrets by the managed RBAC policy.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_secret_access"
       ],
       "Attributes": [
         {
           "Section": "7.3.1: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.3.1.6",
       "Description": "Checks if the RBAC roles or ClusterRoles attached to your Kubernetes users do not allow unauthorized actions on all Kubernetes resources. The rule is NON_COMPLIANT if any unauthorized action is allowed on all Kubernetes resources in a Role or ClusterRole.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "7.3.1: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.3.1.7",
       "Description": "Checks if the usage of PodSecurityPolicies is not in place. The rule is NON_COMPLIANT if a Kubernetes user or service account has any PodSecurityPolicy defined inline.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_security_context_deny_plugin"
       ],
       "Attributes": [
         {
           "Section": "7.3.1: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.3.1.8",
       "Description": "Checks in each Kubernetes Role or ClusterRole resource, if a role binding to the specified Role or ClusterRole is present for the input user or service account. The rule is NON_COMPLIANT if the role binding exists linking the user or service account to the Role or ClusterRole.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "7.3.1: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.3.1.9",
       "Description": "Checks whether the Kubernetes Role or ClusterRole is bound to a ServiceAccount, a User, or a Group, and if it grants necessary permissions to access specific resources.",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC (Role-Based Access Control)",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.3.1: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes RBAC"
+          "Service": "RBAC (Role-Based Access Control)"
         }
       ]
     },
     {
       "Id": "7.3.1.10",
       "Description": "Checks if Kubernetes Role or ClusterRole resources grant permissions to all verbs on all resources. The rule is NON_COMPLIANT if any customer-managed Role or ClusterRole includes rules with verbs set to '*' and resources set to '*'.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "7.3.1: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.3.1.11",
       "Description": "Checks if Kubernetes Role or ClusterRole permissions that you create grant access to all actions on individual Kubernetes resources. The rule is NON_COMPLIANT if any custom Role or ClusterRole allows full access to at least 1 Kubernetes resource.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "7.3.1: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.3.1.12",
       "Description": "Checks if all required Kubernetes RoleBindings or ClusterRoleBindings are associated with the specified Kubernetes ServiceAccount. The rule is NON_COMPLIANT if any required binding is not associated with the ServiceAccount.",
-      "Name": "Kubernetes RBAC",
+      "Name": "API Server",
       "Checks": [
         "apiserver_service_account_lookup_true"
       ],
       "Attributes": [
         {
           "Section": "7.3.1: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes RBAC"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.3.1.13",
       "Description": "Checks if none of your Kubernetes Service Accounts have roles or role bindings directly attached. Service Accounts must inherit permissions from ClusterRoles or RoleBindings. The rule is NON_COMPLIANT if there is at least one Role or RoleBinding directly attached to the Service Account.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_service_account_plugin"
       ],
       "Attributes": [
         {
           "Section": "7.3.1: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.3.1.14",
       "Description": "Checks if a Kubernetes cluster has Role-Based Access Control (RBAC) enabled. The rule is NON_COMPLIANT if the Kubernetes cluster does not have RBAC enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "7.3.1: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.3.1.15",
       "Description": "Checks if Kubernetes clusters have Role-Based Access Control (RBAC) enabled. The rule is NON_COMPLIANT if RBAC features are not configured for the Kubernetes cluster.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "7.3.1: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.3.1.16",
       "Description": "Checks if a Kubernetes cluster has Role-Based Access Control (RBAC) enabled for managing permissions. The rule is NON_COMPLIANT if RBAC is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "7.3.1: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.3.1.17",
       "Description": "Checks if a Kubernetes database pod has role-based access control (RBAC) authentication enabled. The rule is NON_COMPLIANT if the Kubernetes database pod does not have RBAC authentication enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "7.3.1: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.3.1.18",
       "Description": "Checks if Kubernetes Persistent Volume Claims (PVCs) allow user permissions through access control lists (ACLs). The rule is NON_COMPLIANT if ACLs are configured for user access in Kubernetes Persistent Volume Claims.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "7.3.1: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.3.1.19",
       "Description": "Checks if a Kubernetes Role or ClusterRole does not allow blocklisted permissions on resources within a namespace or cluster for subjects from other namespaces or clusters. For example, the rule checks that the Role or ClusterRole does not allow another namespace to perform any get, delete, or list actions on any resource within the namespace. The rule is NON_COMPLIANT if any blocklisted actions are allowed by the Role or ClusterRole.",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC (Role-Based Access Control)",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.3.1: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes RBAC"
+          "Service": "RBAC (Role-Based Access Control)"
         }
       ]
     },
     {
       "Id": "7.3.1.20",
       "Description": "Verifies that the access control policies for a Kubernetes cluster's resources are correctly configured to restrict access based on specific Kubernetes users, service accounts, or roles. The rule is COMPLIANT if there are no RoleBindings or ClusterRoleBindings present that grant access.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "7.3.1: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.3.1.21",
       "Description": "Checks if your Kubernetes PersistentVolumeClaim policies do not allow inter-namespace permissions other than the control PersistentVolumeClaim policy that you provide.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "7.3.1: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.3.1.22",
       "Description": "Checks if the Kubernetes Security Response Team (KST) can access your Kubernetes cluster. The rule is NON_COMPLIANT if Kubernetes Network Policy is enabled but the role for KST access is not configured.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.3.1: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.3.2.1",
       "Description": "Checks if a Kubernetes namespace is part of a specific label set. The rule is NON_COMPLIANT if the namespace does not have the expected label or if the master namespace label does not match the specified MasterLabel.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.3.2: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.3.2.2",
       "Description": "Checks if a KubernetesNamespace has an attached Role or ClusterRole that includes a policy preventing the deletion of specific resources. The rule is NON_COMPLIANT if the KubernetesNamespace does not have roles or role bindings that include a suitable 'deny' permission (e.g., delete actions on resources such as Pods, PersistentVolumeClaims, etc.).",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.3.2: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.3.2.3",
       "Description": "Checks if a Kubernetes Pod has a RoleBinding or ClusterRoleBinding attached to it. The rule is NON_COMPLIANT if no RoleBinding or ClusterRoleBinding is attached to the Pod.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.3.2: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.3.2.4",
       "Description": "Checks if Kubernetes containers only have read-only access to their root filesystems. The rule is NON_COMPLIANT if the securityContext.readOnlyRootFilesystem parameter in the Pod specification is set to 'false'.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_root_containers_admission"
       ],
       "Attributes": [
         {
           "Section": "7.3.2: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.3.2.5",
       "Description": "Checks if the Kubernetes Role or ClusterRole you create does not allow blocked actions on Kubernetes resources. The rule is NON_COMPLIANT if any blocked action is allowed on Kubernetes resources by the Role or ClusterRole.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.3.2: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.3.2.6",
       "Description": "Checks if the Role-Based Access Control (RBAC) policies attached to your Kubernetes users, roles, and clusters do not allow blocked actions on all Kubernetes resources. The rule is NON_COMPLIANT if any blocked action is allowed on all Kubernetes resources in an RBAC policy.",
-      "Name": "Kubernetes RBAC",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "7.3.2: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes RBAC"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.3.2.7",
       "Description": "Checks if the use of inline policy equivalent in Kubernetes, which would be RoleBindings and ClusterRoleBindings, is not in use. The rule is NON_COMPLIANT if a Kubernetes ServiceAccount, Role, or ClusterRole has any RoleBindings with inline policies.",
-      "Name": "Kubernetes Role-Based Access Control (RBAC)",
+      "Name": "Role-Based Access Control (RBAC)",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.3.2: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes Role-Based Access Control (RBAC)"
+          "Service": "Role-Based Access Control (RBAC)"
         }
       ]
     },
     {
       "Id": "7.3.2.8",
       "Description": "Checks in each Kubernetes Role or ClusterRole resource, if a RoleBinding or ClusterRoleBinding that references a specific Role or ClusterRole is attached to the resource. The rule is NON_COMPLIANT if the RoleBinding or ClusterRoleBinding that references the Role or ClusterRole is found.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "7.3.2: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.3.2.9",
       "Description": "Checks whether the Role ARN is associated with a Service Account, or a Role Binding that includes one or more Users/Groups, or a Cluster Role Binding with one or more Service Accounts.",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC (Role-Based Access Control)",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.3.2: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes RBAC"
+          "Service": "RBAC (Role-Based Access Control)"
         }
       ]
     },
     {
       "Id": "7.3.2.10",
       "Description": "Checks if Kubernetes Role and ClusterRole definitions have rules that allow permissions to all verbs on all resources. The rule is NON_COMPLIANT if any Role or ClusterRole includes a rule with verbs set to '*' and resources set to '*'.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "7.3.2: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.3.2.11",
       "Description": "Checks if Kubernetes Role-Based Access Control (RBAC) policies that you create grant permissions to all actions on individual Kubernetes resources. The rule is NON_COMPLIANT if any custom role allows full access to at least 1 Kubernetes resource type.",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "7.3.2: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes RBAC"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.3.2.12",
       "Description": "Checks if all specified ConfigMaps are attached to the Kubernetes Deployment. The rule is NON_COMPLIANT if a ConfigMap is not attached to the Deployment.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.3.2: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.3.2.13",
       "Description": "Checks if none of your Kubernetes Service Accounts have roles or role bindings directly attached. Service Accounts must inherit permissions from Cluster Roles or Role Bindings. The status is NON_COMPLIANT if there is at least one Role or Role Binding that is attached directly to the Service Account.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_service_account_lookup_true"
       ],
       "Attributes": [
         {
           "Section": "7.3.2: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.3.2.14",
       "Description": "Checks if a Kubernetes cluster has Role-Based Access Control (RBAC) enabled. The rule is NON_COMPLIANT if the Kubernetes cluster does not have RBAC enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "7.3.2: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.3.2.15",
       "Description": "Checks if Kubernetes clusters have Role-Based Access Control (RBAC) enabled. The rule is NON_COMPLIANT if RBAC is not enabled for the Kubernetes cluster.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "7.3.2: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.3.2.16",
       "Description": "Checks if a Kubernetes cluster has Role-Based Access Control (RBAC) enabled. The rule is NON_COMPLIANT if Kubernetes RBAC is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "7.3.2: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.3.2.17",
       "Description": "Checks if a Kubernetes Pod has RBAC (Role-Based Access Control) enabled for its ServiceAccount. The rule is NON_COMPLIANT if the Pod's ServiceAccount does not have RBAC enabled.",
-      "Name": "Kubernetes Pod",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pod_creation_access"
       ],
       "Attributes": [
         {
           "Section": "7.3.2: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes Pod"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.3.2.18",
       "Description": "Checks if Kubernetes PersistentVolumeClaims (PVCs) allow user permissions through Role-Based Access Control (RBAC) settings. The rule is NON_COMPLIANT if RBAC is configured to allow unauthorized user access to PVCs.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "7.3.2: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.3.2.19",
       "Description": "Checks if a Kubernetes Role or ClusterRole does not allow blocklisted verbs (like get, delete) on resources for principals from other namespaces or external users. For example, the rule checks that a Role or ClusterRole does not allow a user to perform any verbs like get or delete on any resource in a namespace. The rule is NON_COMPLIANT if any blocklisted actions are allowed by the Role or ClusterRole.",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC (Role-Based Access Control)",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.3.2: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes RBAC"
+          "Service": "RBAC (Role-Based Access Control)"
         }
       ]
     },
     {
       "Id": "7.3.2.20",
       "Description": "Ensures that Kubernetes access control policies treat permissions as restricted, validating that no access is granted to the Kubernetes resources by any unauthorized users, service accounts, or IP ranges that are not explicitly defined. The rule is COMPLIANT if a Role or ClusterRole with no permissions is not present.",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pod_creation_access"
       ],
       "Attributes": [
         {
           "Section": "7.3.2: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes RBAC"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.3.2.21",
       "Description": "Checks if your Kubernetes Persistent Volume Claims (PVC) policies do not allow other inter-namespace permissions than the control Persistent Volume (PV) policy that you provide.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "7.3.2: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.3.2.22",
       "Description": "Checks if the Kubernetes Security Team (KST) can access your Kubernetes cluster. The rule is NON_COMPLIANT if network policies are enabled but the role for KST access is not configured.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.3.2: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.3.3.1",
       "Description": "Checks if a Kubernetes cluster is part of a specified namespace. The rule is NON_COMPLIANT if a pod is not running in the designated namespace or if the namespace does not match the specified parameter Namespace.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.3.3: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.3.3.2",
       "Description": "Checks if a Kubernetes namespace has an associated RoleBindings or ClusterRoleBindings that prevent deletion of PersistentVolumeClaims (PVCs). The rule is NON_COMPLIANT if the namespace does not have RoleBindings/ClusterRoleBindings or those bindings do not include a suitable 'Deny' statement (statements that restrict the delete actions on PersistentVolumeClaims).",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "7.3.3: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.3.3.3",
       "Description": "Checks if a Kubernetes Pod has a Service Account attached to it. The rule is NON_COMPLIANT if no Service Account is attached to the Pod.",
-      "Name": "Kubernetes Pod",
+      "Name": "API Server",
       "Checks": [
         "apiserver_service_account_plugin"
       ],
       "Attributes": [
         {
           "Section": "7.3.3: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes Pod"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.3.3.4",
       "Description": "Checks if Kubernetes Pods have read-only file system access to their root filesystems. The rule is NON_COMPLIANT if the readOnlyRootFilesystem field in the Pod's securityContext is set to 'false'.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_root_containers_admission"
       ],
       "Attributes": [
         {
           "Section": "7.3.3: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.3.3.5",
       "Description": "Checks if the Kubernetes Role or ClusterRole policies that you create do not allow blocked actions on Kubernetes Secrets. The rule is NON_COMPLIANT if any blocked action is allowed on Kubernetes Secrets by the managed Role or ClusterRole policies.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_secret_access"
       ],
       "Attributes": [
         {
           "Section": "7.3.3: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.3.3.6",
       "Description": "Checks if the RBAC (Role-Based Access Control) policies attached to your Kubernetes users, service accounts, and roles do not allow blocked actions on all Kubernetes resources. The rule is NON_COMPLIANT if any blocked action is permitted on all Kubernetes resources in an RBAC policy.",
-      "Name": "Kubernetes RBAC",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "7.3.3: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes RBAC"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.3.3.7",
       "Description": "Checks if the Kubernetes Roles or ClusterRoles feature is not in use as inline policies. The rule is NON_COMPLIANT if a Kubernetes user or service account has any Roles or ClusterRoles defined inline that grant permissions directly without using a predefined RoleBinding or ClusterRoleBinding.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "7.3.3: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.3.3.8",
       "Description": "Checks in each Kubernetes Role or ClusterRole, if a specific RoleBinding or ClusterRoleBinding that grants permissions is associated with the Role or ClusterRole. The rule is NON_COMPLIANT if the RoleBinding or ClusterRoleBinding is linked to the Role or ClusterRole.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "7.3.3: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
@@ -16741,306 +15881,294 @@
     {
       "Id": "7.3.3.10",
       "Description": "Checks if Kubernetes Role or ClusterRole definitions include permissions that grant access to all actions on all resources. The rule is NON_COMPLIANT if any Role or ClusterRole includes rules with 'verbs': ['*'] for 'apiGroups': ['*'] and 'resources': ['*'].",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "7.3.3: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.3.3.11",
       "Description": "Checks if Kubernetes Role or ClusterRole policies that you create grant permissions to all actions on individual Kubernetes resources. The rule is NON_COMPLIANT if any custom Role or ClusterRole allows full access to at least 1 Kubernetes resource.",
-      "Name": "Kubernetes Role-based Access Control (RBAC)",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "7.3.3: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes Role-based Access Control (RBAC)"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.3.3.12",
       "Description": "Checks if all specified Kubernetes Roles or ClusterRoles are granted to the ServiceAccount. The rule is NON_COMPLIANT if a Role or ClusterRole is not bound to the ServiceAccount.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_service_account_plugin"
       ],
       "Attributes": [
         {
           "Section": "7.3.3: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.3.3.13",
       "Description": "Checks if none of your Kubernetes Service Accounts have policies (RoleBindings or ClusterRoleBindings) attached directly. Service Accounts must inherit permissions from Roles or ClusterRoles. The rule is NON_COMPLIANT if there is at least one RoleBinding or ClusterRoleBinding that is directly attached to the Service Account.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_service_account_lookup_true"
       ],
       "Attributes": [
         {
           "Section": "7.3.3: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.3.3.14",
       "Description": "Checks if a Kubernetes cluster has Role-Based Access Control (RBAC) enabled. The rule is NON_COMPLIANT if a Kubernetes cluster does not have RBAC enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "7.3.3: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.3.3.15",
       "Description": "Checks if Kubernetes clusters have Role-Based Access Control (RBAC) enabled. The rule is NON_COMPLIANT if RBAC is not configured for the Kubernetes cluster.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "7.3.3: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.3.3.16",
       "Description": "Checks if a Kubernetes deployment has Role-Based Access Control (RBAC) enabled for authentication. The rule is NON_COMPLIANT if the Kubernetes deployment does not have RBAC enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "7.3.3: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.3.3.17",
       "Description": "Checks if a Kubernetes cluster has Role-Based Access Control (RBAC) enabled. The rule is NON_COMPLIANT if RBAC is not enabled for the Kubernetes cluster.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "7.3.3: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "7.3.3.18",
       "Description": "Checks if Kubernetes Persistent Volume Claims (PVCs) allow user permissions through access control settings in their underlying storage classes. The rule is NON_COMPLIANT if access control lists (ACLs) are configured for user access in Persistent Volume Claims.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "7.3.3: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.3.3.19",
       "Description": "Checks if a Kubernetes Role or ClusterRole does not allow blocklisted permissions on resources within the namespace for subjects from other Kubernetes namespaces. For example, the rule checks that the Role or ClusterRole does not allow any 'get' or 'delete' actions on specific resources (like Pods, Secrets, etc.) from other namespaces. The rule is NON_COMPLIANT if any blocklisted actions are allowed by the Role or ClusterRole.",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC (Role-Based Access Control)",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.3.3: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes RBAC"
+          "Service": "RBAC (Role-Based Access Control)"
         }
       ]
     },
     {
       "Id": "7.3.3.20",
       "Description": "Checks that the access granted by the Kubernetes cluster is restricted by any of the Kubernetes subjects, such as users, service accounts, groups, or network policies that you provide. The rule is COMPLIANT if a Role or ClusterRole binding is not present.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.3.3: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "7.3.3.21",
       "Description": "Verifies that the Kubernetes cluster role bindings do not permit users from other namespaces to access the resources defined in the specified role, ensuring that only authorized roles have the necessary permissions.",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "7.3.3: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes RBAC"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "7.3.3.22",
       "Description": "Checks if the Security Response Team (SRT) can access your Kubernetes cluster. The rule is NON_COMPLIANT if the necessary permissions for SRT access are not configured in the RoleBindings for the Security context in Kubernetes.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "7.3.3: Access to system components and data is managed via an access control system(s).",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.2.1.1",
       "Description": "Checks if running Kubernetes pods are deployed using secrets for sensitive information. The rule is NON_COMPLIANT if a running pod is using hardcoded secrets in environment variables instead of Kubernetes Secrets.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_no_secrets_envs"
       ],
       "Attributes": [
         {
           "Section": "8.2.1: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.2.1.2",
       "Description": "Checks whether Kubernetes namespaces have at least one associated pod.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.2.1: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.2.1.3",
       "Description": "Checks whether the Role or ClusterRole is bound to a specific User, Group, or ServiceAccount in Kubernetes.",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC (Role-Based Access Control)",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.2.1: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes RBAC"
+          "Service": "RBAC (Role-Based Access Control)"
         }
       ]
     },
     {
       "Id": "8.2.1.4",
       "Description": "Checks if root user credentials are configured in Kubernetes. The rule is COMPLIANT if the root user credentials do not exist. Otherwise, NON_COMPLIANT.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_root_containers_admission"
       ],
       "Attributes": [
         {
           "Section": "8.2.1: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.2.1.5",
       "Description": "Checks whether Kubernetes service accounts are members of at least one Kubernetes role or role binding.",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC (Role-Based Access Control)",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.2.1: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes RBAC"
-        }
-      ]
-    },
-    {
-      "Id": "8.2.2.1",
-      "Description": "Checks if the Kubernetes Pod specification contains environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY as plain text in the spec. The rule is NON_COMPLIANT when these environment variables are present in plaintext credentials within a Pod definition.",
-      "Name": "Kubernetes",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "8.2.2: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "RBAC (Role-Based Access Control)"
         }
       ]
     },
     {
       "Id": "8.2.2.2",
       "Description": "Checks if running Kubernetes pods are deployed using service accounts. The rule is NON_COMPLIANT if a running pod is deployed without an associated service account.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_service_account_plugin"
       ],
       "Attributes": [
         {
           "Section": "8.2.2: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.2.2.3",
       "Description": "Checks if Kubernetes Secrets are exposed as environment variables in a Pod definition. The rule is NON_COMPLIANT if one or more environment variable names correspond to keys in the 'secretKeys' list, while ignoring environment variables sourced from other systems like Amazon S3.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_no_secrets_envs"
       ],
       "Attributes": [
         {
           "Section": "8.2.2: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.2.2.4",
       "Description": "Verifies if Kubernetes RBAC (Role-Based Access Control) groups have at least one associated user or service account.",
-      "Name": "Kubernetes RBAC",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "8.2.2: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes RBAC"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.2.2.5",
       "Description": "Checks whether a Kubernetes Role or ClusterRole is bound to a ServiceAccount, or to a User or Group of Users, enabling access to specific resources within a namespace or cluster.",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC (Role-Based Access Control)",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.2.2: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes RBAC"
+          "Service": "RBAC (Role-Based Access Control)"
         }
       ]
     },
@@ -17059,74 +16187,74 @@
     {
       "Id": "8.2.2.7",
       "Description": "Verifies if Kubernetes users or service accounts are associated with at least one RoleBinding or ClusterRoleBinding.",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC (Role-Based Access Control)",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.2.2: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes RBAC"
+          "Service": "RBAC (Role-Based Access Control)"
         }
       ]
     },
     {
       "Id": "8.2.2.8",
       "Description": "Checks if Kubernetes Secrets have a defined lifecycle policy for automatic rotation. If a maximum rotation frequency is specified, it compares the current rotation schedule against this maximum allowed frequency. The rule is NON_COMPLIANT if the secret does not have a rotation strategy defined, or if the rotation frequency exceeds the specified maximum.",
-      "Name": "Kubernetes Secrets",
+      "Name": "RBAC (Role-Based Access Control)",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.2.2: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes Secrets"
+          "Service": "RBAC (Role-Based Access Control)"
         }
       ]
     },
     {
       "Id": "8.2.2.9",
       "Description": "Checks if Kubernetes Secrets are updated successfully according to the defined rotation schedule. The system monitors the timestamp of the last update and flags the secret as NON_COMPLIANT if the scheduled rotation time passes without an update.",
-      "Name": "Kubernetes Secrets",
+      "Name": "RBAC (Role-Based Access Control)",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.2.2: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes Secrets"
+          "Service": "RBAC (Role-Based Access Control)"
         }
       ]
     },
     {
       "Id": "8.2.2.10",
       "Description": "Checks if Kubernetes Secrets have been updated (rotated) in the past specified number of days. The rule is NON_COMPLIANT if a secret has not been updated for more than maxDaysSinceUpdate number of days. The default value is 90 days.",
-      "Name": "Kubernetes Secrets",
+      "Name": "RBAC (Role-Based Access Control)",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.2.2: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes Secrets"
+          "Service": "RBAC (Role-Based Access Control)"
         }
       ]
     },
     {
       "Id": "8.2.2.11",
       "Description": "Checks if Kubernetes secrets have been accessed within a specified number of days. The rule is NON_COMPLIANT if a secret has not been accessed in 'unusedForDays' number of days. The default value is 90 days.",
-      "Name": "Kubernetes Secrets",
+      "Name": "RBAC (Role-Based Access Control)",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.2.2: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes Secrets"
+          "Service": "RBAC (Role-Based Access Control)"
         }
       ]
     },
     {
       "Id": "8.2.4.1",
       "Description": "Checks if running Kubernetes pods are launched using service accounts. The rule is NON_COMPLIANT if a running pod is launched without a service account.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_service_account_plugin"
       ],
       "Attributes": [
         {
           "Section": "8.2.4: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
@@ -17145,24 +16273,24 @@
     {
       "Id": "8.2.4.3",
       "Description": "Checks whether a Role in Kubernetes is attached to a User, a Group of Users, or a Service Account with one or more trusted entities.",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC (Role-Based Access Control)",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.2.4: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes RBAC"
+          "Service": "RBAC (Role-Based Access Control)"
         }
       ]
     },
     {
       "Id": "8.2.4.4",
       "Description": "Checks if the Kubernetes admin user access token is available. The rule is COMPLIANT if the user access token does not exist. Otherwise, NON_COMPLIANT.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.2.4: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
@@ -17181,404 +16309,404 @@
     {
       "Id": "8.2.5.1",
       "Description": "Checks if running Kubernetes Pods are launched using secrets for sensitive information such as SSH keys. The rule is NON_COMPLIANT if a running Pod is launched with sensitive information directly in the specification instead of using Kubernetes secrets.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_no_secrets_envs"
       ],
       "Attributes": [
         {
           "Section": "8.2.5: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.2.5.2",
       "Description": "Verifies that at least one Kubernetes user is associated with each role or group in Kubernetes RBAC (Role-Based Access Control).",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "8.2.5: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes RBAC"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "8.2.5.3",
       "Description": "Checks whether the Kubernetes Role or ClusterRole is bound to a ServiceAccount, or a group of users (via RoleBinding or ClusterRoleBinding) with one or more ServiceAccounts, or a PodSecurityPolicy with one or more trusted entities.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.2.5: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.2.5.4",
       "Description": "Checks if the Kubernetes root user (cluster-admin) has any access keys. The rule is COMPLIANT if no service accounts or users with cluster-admin privileges exist that possess access keys. Otherwise, NON_COMPLIANT.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_root_containers_admission"
       ],
       "Attributes": [
         {
           "Section": "8.2.5: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.2.5.5",
       "Description": "Checks whether Kubernetes users are members of at least one RoleBinding or ClusterRoleBinding.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.2.5: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.2.6.1",
       "Description": "Checks whether Kubernetes RBAC roles have at least one user or service account associated with them.",
-      "Name": "Kubernetes RBAC",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "8.2.6: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes RBAC"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.2.6.2",
       "Description": "Checks if your Kubernetes service accounts have tokens that have not been used within the specified number of days you provided. The rule is NON_COMPLIANT if there are inactive service accounts not recently used.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.2.6: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.2.6.3",
       "Description": "Checks if Kubernetes Secrets have been accessed within a specified number of days. The rule is NON_COMPLIANT if a secret has not been accessed in 'unusedForDays' number of days. The default value is 90 days.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.2.6: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.2.7.1",
       "Description": "Checks if a Kubernetes namespace is associated with a specific organization. The rule is NON_COMPLIANT if a namespace is not part of the defined organization or the organization master namespace does not match the specified MasterNamespaceId.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.2.7: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.2.7.2",
       "Description": "Checks if a Kubernetes namespace has a resource-based policy (such as NetworkPolicy or PodSecurityPolicy) that prevents deletion of critical Pods. The rule is NON_COMPLIANT if the namespace does not have resource-based policies or has policies without a suitable 'Deny' statement (statements that include delete actions on Pods, Services, or related resources).",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.2.7: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.2.7.3",
       "Description": "Checks if a Kubernetes pod has an associated Kubernetes Service Account. The rule is NON_COMPLIANT if no Service Account is attached to the pod.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_service_account_plugin"
       ],
       "Attributes": [
         {
           "Section": "8.2.7: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.2.7.4",
       "Description": "Checks if Kubernetes containers have read-only access to their root filesystems. The rule is NON_COMPLIANT if the readOnlyRootFilesystem parameter in the container specification of a Pod or Deployment is set to 'false'.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_root_containers_admission"
       ],
       "Attributes": [
         {
           "Section": "8.2.7: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.2.7.5",
       "Description": "Checks if the Kubernetes Role or ClusterRole policies that you create do not allow blocked actions on specific resources. The rule is NON_COMPLIANT if any blocked action is allowed on the specified resources by the Role or ClusterRole policies.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.2.7: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.2.7.6",
       "Description": "Checks if the role policies attached to your Kubernetes service accounts do not allow blocked actions on all Kubernetes resources. The rule is NON_COMPLIANT if any blocked action is allowed on all Kubernetes resources in a role policy.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.2.7: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.2.7.7",
       "Description": "Checks if the Role-based access control (RBAC) feature in Kubernetes is not in use. The rule is NON_COMPLIANT if any Kubernetes user or service account has any Role or ClusterRole associated with it directly.",
-      "Name": "Kubernetes RBAC",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "8.2.7: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes RBAC"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.2.7.8",
       "Description": "Checks in each Kubernetes Role or ClusterRole resource, if a RoleBinding or ClusterRoleBinding in the input parameter is associated with the Role or ClusterRole resource. The rule is NON_COMPLIANT if the RoleBinding or ClusterRoleBinding is associated with the Role or ClusterRole resource.",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "8.2.7: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes RBAC"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "8.2.7.9",
       "Description": "Checks whether the Role ARN is attached to a Kubernetes ServiceAccount, or a Role/ClusterRole with one or more associated ServiceAccounts, or a Pod with a service account identity.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.2.7: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.2.7.10",
       "Description": "Checks if Kubernetes Role or ClusterRole policies grant permissions to all actions on all resources. The rule is NON_COMPLIANT if any customer managed Role or ClusterRole includes rules with 'verbs': ['*'] on the 'resources': ['*'].",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "8.2.7: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes RBAC"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "8.2.7.11",
       "Description": "Checks if Kubernetes Role-Based Access Control (RBAC) policies that you create grant permissions to all actions on individual Kubernetes resources. The rule is NON_COMPLIANT if any Kubernetes Role or ClusterRole allows full access to at least 1 Kubernetes resource.",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "8.2.7: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes RBAC"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "8.2.7.12",
       "Description": "Checks if all specified Kubernetes RoleBindings are attached to the ServiceAccount. The rule is NON_COMPLIANT if a RoleBinding is not attached to the ServiceAccount.",
-      "Name": "Kubernetes Role-Based Access Control (RBAC)",
+      "Name": "Role-Based Access Control (RBAC)",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.2.7: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes Role-Based Access Control (RBAC)"
+          "Service": "Role-Based Access Control (RBAC)"
         }
       ]
     },
     {
       "Id": "8.2.7.13",
       "Description": "Checks if none of your Kubernetes users have roles or role bindings directly attached. Kubernetes users must inherit permissions from groups or cluster roles. The rule is NON_COMPLIANT if there is at least one role or role binding that is attached directly to the Kubernetes user.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.2.7: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.2.7.14",
       "Description": "Checks if a Kubernetes cluster has Role-Based Access Control (RBAC) enabled. The rule is NON_COMPLIANT if the Kubernetes cluster does not have RBAC enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "8.2.7: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.2.7.15",
       "Description": "Checks if Kubernetes clusters have Role-Based Access Control (RBAC) enabled. The rule is NON_COMPLIANT if the RBAC is not configured for the Kubernetes cluster.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "8.2.7: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.2.7.16",
       "Description": "Checks if a Kubernetes cluster has Role-Based Access Control (RBAC) enabled for authentication. The rule is NON_COMPLIANT if the Kubernetes cluster does not have RBAC enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "8.2.7: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.2.7.17",
       "Description": "Checks if a Kubernetes Pod has role-based access control (RBAC) enabled. The rule is NON_COMPLIANT if a Kubernetes Pod does not have RBAC enabled.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pod_creation_access"
       ],
       "Attributes": [
         {
           "Section": "8.2.7: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "8.2.7.18",
       "Description": "Checks if Kubernetes Persistent Volumes (PVs) allow user permissions through access control policies. The rule is NON_COMPLIANT if access control policies are configured for user access in Kubernetes Persistent Volumes.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "8.2.7: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "8.2.7.19",
       "Description": "Checks if a Kubernetes Role or ClusterRole does not allow blocklisted permissions for principals from other namespaces or external entities on resources within the namespace. For example, the rule checks that the Role or ClusterRole does not allow any actions like 'get', 'delete', or 'list' on resources when accessed by external users. The rule is NON_COMPLIANT if any blocklisted actions are allowed by the Role or ClusterRole.",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC (Role-Based Access Control)",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.2.7: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes RBAC"
+          "Service": "RBAC (Role-Based Access Control)"
         }
       ]
     },
     {
       "Id": "8.2.7.20",
       "Description": "Checks that the access granted by the Kubernetes namespace is restricted by any of the Kubernetes roles, role bindings, service accounts, users, or network policies that you provide. The rule is COMPLIANT if a network policy is not present.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.2.7: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.2.7.21",
       "Description": "Checks if your Kubernetes PersistentVolumes policies do not allow other inter-account permissions than the control PersistentVolume policy that you provide.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "8.2.7: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "8.2.7.22",
       "Description": "Checks if the Kubernetes Security Team (KST) can access your Kubernetes cluster. The rule is NON_COMPLIANT if Kubernetes RBAC is enabled but the role for KST access is not configured.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.2.7: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.2.8.1",
       "Description": "Checks if a Kubernetes cluster is part of a specific namespace or if the namespace matches the defined MasterNamespaceId. The rule is NON_COMPLIANT if a Kubernetes cluster is not part of the specified namespace or if the namespace master ID does not match the rule parameter MasterNamespaceId.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.2.8: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
@@ -17597,106 +16725,106 @@
     {
       "Id": "8.2.8.3",
       "Description": "Checks if a Kubernetes PersistentVolumeClaim (PVC) has annotations or policies that prevent deletion of associated PersistentVolume (PV) resources. The rule is NON_COMPLIANT if the PVC does not have deletion policies or has policies without suitable 'Deny' annotations (annotations that prevent 'delete' operations on the PV).",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.2.8: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.2.8.4",
       "Description": "Checks if your Kubernetes Pod is configured with the Pod Security Standards requiring the use of the 'RunAsNonRoot' security context. The rule is NON_COMPLIANT if the security context does not enforce this setting.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_security_context_deny_plugin"
       ],
       "Attributes": [
         {
           "Section": "8.2.8: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.2.8.5",
       "Description": "Checks if a Kubernetes Pod has a ServiceAccount attached to it. The rule is NON_COMPLIANT if no ServiceAccount is attached to the Pod.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_service_account_plugin"
       ],
       "Attributes": [
         {
           "Section": "8.2.8: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.2.8.6",
       "Description": "Checks if Kubernetes Pods have a read-only root filesystem by verifying that the 'readOnlyRootFilesystem' parameter in the container spec is set to 'true'. The rule is NON_COMPLIANT if this parameter is set to 'false'.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_root_containers_admission"
       ],
       "Attributes": [
         {
           "Section": "8.2.8: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.2.8.7",
       "Description": "Checks if the Kubernetes Role or ClusterRole created does not allow blocked actions on Kubernetes resources. The rule is NON_COMPLIANT if any blocked action is allowed by the Role or ClusterRole.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.2.8: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.2.8.8",
       "Description": "Checks if the RoleBindings attached to your Kubernetes ServiceAccounts do not allow access to blocked resources in all Kubernetes namespaces. The rule is NON_COMPLIANT if any blocked resource access is allowed in a RoleBinding.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "8.2.8: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "8.2.8.9",
       "Description": "Checks if the Pod Security Policy (PSP) feature is not in use. The rule is NON_COMPLIANT if a Kubernetes Pod has any pod specifications that allow the use of inline security policies.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.2.8: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.2.8.10",
       "Description": "Checks in each Kubernetes Role or ClusterRole resource if a RoleBinding or ClusterRoleBinding with the specified role is attached to it. The rule is NON_COMPLIANT if the RoleBinding or ClusterRoleBinding is associated with the Role or ClusterRole.",
-      "Name": "Kubernetes RBAC (Role-Based Access Control)",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "8.2.8: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes RBAC (Role-Based Access Control)"
+          "Service": "RBAC"
         }
       ]
     },
@@ -17715,200 +16843,200 @@
     {
       "Id": "8.2.8.12",
       "Description": "Checks if Kubernetes Role or ClusterRole objects grant permissions to all verbs on all resources. The rule is NON_COMPLIANT if any custom Role or ClusterRole has rules that include 'verbs': ['*'] over 'resources': ['*'].",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "8.2.8: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "8.2.8.13",
       "Description": "Checks if Kubernetes Role and ClusterRole bindings grant permissions that allow full access to all actions on individual Kubernetes resources. The rule is NON_COMPLIANT if any Role or ClusterRole allows full access to at least 1 Kubernetes resource.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "8.2.8: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "8.2.8.14",
       "Description": "Checks if all required Kubernetes Roles or ClusterRoles specified in the list are bound to the service account in the Kubernetes cluster. The rule is NON_COMPLIANT if a required Role or ClusterRole is not bound to the service account.",
-      "Name": "Kubernetes Role-Based Access Control (RBAC)",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "8.2.8: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes Role-Based Access Control (RBAC)"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "8.2.8.15",
       "Description": "Checks if none of your Kubernetes Service Accounts have default RoleBindings or ClusterRoleBindings attached. Service Accounts must inherit permissions from Roles or ClusterRoles. The rule is NON_COMPLIANT if there is at least one RoleBinding or ClusterRoleBinding that is directly attached to the Service Account.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_service_account_plugin"
       ],
       "Attributes": [
         {
           "Section": "8.2.8: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.2.8.16",
       "Description": "Checks if a Kubernetes cluster has Role-Based Access Control (RBAC) enabled. The rule is NON_COMPLIANT if the Kubernetes cluster does not have RBAC enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "8.2.8: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.2.8.17",
       "Description": "Checks if Kubernetes clusters have Role-Based Access Control (RBAC) enabled. The rule is NON_COMPLIANT if RBAC is not enabled for the Kubernetes cluster.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "8.2.8: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.2.8.18",
       "Description": "Checks if a Kubernetes cluster has Role-Based Access Control (RBAC) enabled. The rule is NON_COMPLIANT if the Kubernetes cluster does not have RBAC enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "8.2.8: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.2.8.19",
       "Description": "Checks if a Kubernetes cluster has Role-Based Access Control (RBAC) enabled. The rule is NON_COMPLIANT if the Kubernetes cluster does not have RBAC enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "8.2.8: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.2.8.20",
       "Description": "Checks if Kubernetes Persistent Volume Claims (PVCs) allow user access through access policies. The rule is NON_COMPLIANT if user access policies are configured for PVCs.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "8.2.8: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "8.2.8.21",
       "Description": "Checks if a Kubernetes Role or ClusterRole does not allow blocklisted permissions on resources for users from other namespaces or service accounts. For example, the rule checks that the Role/ClusterRole does not allow any 'get', 'list', or 'delete' permissions on pods for accounts that are not in the specified namespace. The rule is NON_COMPLIANT if any blocklisted actions are allowed by the Role/ClusterRole.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.2.8: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.2.8.22",
       "Description": "Checks that the access granted by the Kubernetes Role or ClusterRole is restricted by any specific users, service accounts, or network policies that you provide. The rule is COMPLIANT if a Role/ClusterRole is not present.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.2.8: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.2.8.23",
       "Description": "Checks if your Kubernetes PersistentVolumeClaims (PVC) are not allowing other inter-namespace permissions other than the control PersistentVolume (PV) policies that you provide.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "8.2.8: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "8.2.8.24",
       "Description": "Verifies if the Shield Response Team (SRT) has the necessary permissions to access the Kubernetes cluster. The status is NON_COMPLIANT if the Kubernetes cluster has enabled the equivalent of Shield Advanced but the role for SRT access is not configured properly.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.2.8: User identification and related accounts for users and administrators are strictly managed throughout an accounts lifecycle.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.3.10.1.1",
       "Description": "Checks if Kubernetes secrets used for access tokens are rotated (changed) within the number of days specified in maxTokenAge. The rule is NON_COMPLIANT if access tokens are not rotated within the specified time period. The default value is 90 days.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.10.1: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.3.10.1.2",
       "Description": "Checks if a Kubernetes Secret has a defined expiration time or automated rotation mechanism. The rule also checks an optional maxAllowedRotationFrequency parameter. If specified, the rotation frequency of the Secret is compared with this maximum allowed frequency. The rule is NON_COMPLIANT if the Secret does not have any rotation scheduled or if the frequency exceeds the specified maximum allowed value.",
-      "Name": "Kubernetes Secrets",
+      "Name": "RBAC (Role-Based Access Control)",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.10.1: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes Secrets"
+          "Service": "RBAC (Role-Based Access Control)"
         }
       ]
     },
@@ -17927,116 +17055,116 @@
     {
       "Id": "8.3.10.1.4",
       "Description": "Checks if Kubernetes Secrets have been updated (rotated) in the past specified number of days. The rule is NON_COMPLIANT if a secret has not been updated for more than maxDaysSinceUpdate number of days. The default value is 90 days.",
-      "Name": "Kubernetes Secrets",
+      "Name": "RBAC (Role-Based Access Control)",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.10.1: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes Secrets"
+          "Service": "RBAC (Role-Based Access Control)"
         }
       ]
     },
     {
       "Id": "8.3.11.1",
       "Description": "Checks if running Kubernetes Pods are launched using Secrets for sensitive data. The rule is NON_COMPLIANT if a running Pod is launched with sensitive data hardcoded in the Pod specifications instead of being stored in Kubernetes Secrets.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_no_secrets_envs"
       ],
       "Attributes": [
         {
           "Section": "8.3.11: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.3.11.2",
       "Description": "Checks whether Kubernetes groups have at least one user associated with them.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.11: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.3.11.3",
       "Description": "Checks whether the Role ARN is attached to a Kubernetes ServiceAccount, or a RoleBinding with one or more ServiceAccounts, or a ClusterRole with one or more trusted entities.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.11: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.3.11.4",
       "Description": "Checks if the Kubernetes cluster has a Role or ClusterRoleBinding that grants 'root' access. The rule is COMPLIANT if no such Role or ClusterRoleBinding exists. Otherwise, NON_COMPLIANT.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_root_containers_admission"
       ],
       "Attributes": [
         {
           "Section": "8.3.11: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.3.11.5",
       "Description": "Verifies if Kubernetes users have access to at least one RoleBinding or ClusterRoleBinding.",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "8.3.11: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes RBAC"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "8.3.2.1",
       "Description": "Checks if all HTTP services in Kubernetes are configured to redirect HTTP traffic to HTTPS. The rule is NON_COMPLIANT if one or more HTTP services do not have HTTP to HTTPS redirection configured or if any HTTP service forwards traffic to another HTTP service instead of redirecting.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.3.2.2",
       "Description": "Checks if all HTTP methods in the Kubernetes Ingress resources have caching enabled and caching is encrypted. The rule is NON_COMPLIANT if any method in a Kubernetes Ingress does not have caching enabled or the caching is not encrypted.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.3.2.3",
       "Description": "Checks if a Kubernetes Secret is encrypted at rest. The rule is NON_COMPLIANT if encryption of Secrets at rest is not enabled in the Kubernetes cluster.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_encryption_provider_config_set"
       ],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
@@ -18055,124 +17183,112 @@
     {
       "Id": "8.3.2.5",
       "Description": "Checks if Kubernetes Ingress resources are configured to use deprecated SSL protocols for HTTPS communication between Ingress controllers and backend services. This rule is NON_COMPLIANT for an Ingress resource if any 'tls' configuration includes 'SSLv3'.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.3.2.6",
       "Description": "Checks if Kubernetes Ingress resources are enforcing HTTPS for backend services. The rule is NON_COMPLIANT if 'backend.service.port' is configured with a non-secure port (e.g., 80) or if 'ingress.spec.tls' is not specified while using 'path' with a non-secure backend service.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.3.2.7",
       "Description": "Checks if your Kubernetes Ingress resources enforce HTTPS for traffic. The rule is NON_COMPLIANT if the value of the 'nginx.ingress.kubernetes.io/force-ssl-redirect' annotation is set to 'false'.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.3.2.8",
       "Description": "Checks if Kubernetes Logging (e.g., Fluentd) is configured to encrypt logs at rest using a specified encryption key or mechanism. The rule is NON_COMPLIANT if logging is not encrypted or is using an encryption method not specified in the rule parameter.",
-      "Name": "Kubernetes Logging",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes Logging"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.3.2.9",
       "Description": "Checks if Kubernetes Secrets are configured to use encryption at rest. The rule is COMPLIANT if the encryption provider is defined in the kube-apiserver configuration.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_encryption_provider_config_set"
       ],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.3.2.10",
       "Description": "Checks if a Kubernetes pod specification has encryption enabled for all of its secrets. The rule is NON_COMPLIANT if 'encryptionEnabled' is set to 'false' for any of the secret configurations used within the pod.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "8.3.2.11",
-      "Description": "Checks if the Kubernetes namespace contains environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY in any pod. The rule is NON_COMPLIANT when any pod in the namespace has plaintext credentials in environment variables.",
-      "Name": "Kubernetes",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.3.2.12",
       "Description": "Checks if a Kubernetes Pod configured with Persistent Volumes has encryption enabled for its storage. The rule is NON_COMPLIANT if 'encryptionDisabled' is set to 'true' in the PersistentVolumeClaim specifications.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.3.2.13",
       "Description": "Checks if Kubernetes etcd clusters are encrypted. The rule is NON_COMPLIANT if an etcd cluster is not encrypted.",
-      "Name": "etcd",
+      "Name": "ETCD",
       "Checks": [
         "etcd_tls_encryption"
       ],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "etcd"
+          "Service": "ETCD"
         }
       ]
     },
     {
       "Id": "8.3.2.14",
       "Description": "Checks if your Kubernetes Service has the 'spec.type' set to 'LoadBalancer'. The rule is NON_COMPLIANT if a Service does not use LoadBalancer type, which is necessary for exposing the service securely over the network.",
-      "Name": "Kubernetes Service",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes Service"
+          "Service": "Core"
         }
       ]
     },
@@ -18191,76 +17307,76 @@
     {
       "Id": "8.3.2.16",
       "Description": "Checks if Kubernetes Secrets used for Redis data stores are configured to require TLS/SSL encryption for data in transit between Redis instances and clients. The rule is NON_COMPLIANT if TLS/SSL encryption is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.3.2.17",
       "Description": "Checks if storage encryption is enabled for your Kubernetes persistent volumes. The rule is NON_COMPLIANT if storage encryption is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.3.2.18",
       "Description": "Checks if a Kubernetes PersistentVolume is encrypted. The rule is NON_COMPLIANT if the PersistentVolume is not encrypted, or if the specified encryption key is not present in the encryption key parameters.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.3.2.19",
       "Description": "Checks if the Kubernetes Secrets are encrypted at rest and checks their status. The rule is COMPLIANT if encryption is enabled or enabling.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_no_secrets_envs"
       ],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.3.2.20",
       "Description": "Checks if Kubernetes Persistent Volumes (PV) have encryption enabled by default. The rule is NON_COMPLIANT if encryption is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.3.2.21",
       "Description": "Checks if Kubernetes secrets are passed as container environment variables. The rule is NON_COMPLIANT if 1 or more environment variable keys match a key listed in the 'secretKeys' parameter (excluding environment variables from other locations such as ConfigMaps or Persistent Volumes).",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_no_secrets_envs"
       ],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
@@ -18279,66 +17395,42 @@
     {
       "Id": "8.3.2.23",
       "Description": "Checks if Kubernetes clusters are configured to have secrets encrypted using a specified encryption provider. The rule is NON_COMPLIANT if a Kubernetes cluster does not have an encryption configuration defined or if the encryption configuration does not include secrets as a resource.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_encryption_provider_config_set"
       ],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "8.3.2.24",
-      "Description": "Checks if Kubernetes clusters on Amazon Elastic Kubernetes Service have secrets encrypted using AWS Key Management Service (KMS) keys.",
-      "Name": "Amazon Elastic Kubernetes Service (EKS)",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Amazon Elastic Kubernetes Service (EKS)"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.3.2.25",
       "Description": "Checks if Kubernetes secrets have encryption enabled at rest. The rule is NON_COMPLIANT for a Kubernetes secret if 'encryptionProvider' is disabled or if the KMS key ARN does not match the defined KMS configuration.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_encryption_provider_config_set"
       ],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "8.3.2.26",
-      "Description": "Checks if Kubernetes StatefulSets have encryption-in-transit enabled. The rule is NON_COMPLIANT for a StatefulSet if the TLS encryption for communication between pods is not configured.",
-      "Name": "Kubernetes",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.3.2.27",
       "Description": "Checks if Kubernetes clusters have encryption at rest configuration enabled in etcd. The rule is NON_COMPLIANT if the encryption at rest configuration for etcd is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "ETCD",
       "Checks": [
         "etcd_tls_encryption"
       ],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "ETCD"
         }
       ]
     },
@@ -18357,142 +17449,142 @@
     {
       "Id": "8.3.2.29",
       "Description": "Checks if Kubernetes Ingress resources are configured to use TLS certificates provided by a certificate manager. To use this rule, ensure that the Ingress resource has TLS settings defined. This rule only applies to Ingress resources and does not apply to other service types like NodePort or LoadBalancer services.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.3.2.30",
       "Description": "Checks whether your Kubernetes Ingress resources are using a custom TLS secret for SSL termination. The rule is only applicable if there are Ingress resources configured with SSL/TLS termination.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.3.2.31",
       "Description": "Checks if the Kubernetes Ingress controller is using a predefined TLS configuration. The rule is NON_COMPLIANT if the Ingress resource's TLS configuration does not match the specified 'predefinedPolicyName'.",
-      "Name": "Ingress Controller",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Ingress Controller"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.3.2.32",
       "Description": "Checks if the Kubernetes Service is configured with HTTPS or TLS for secure communication. The rule is NON_COMPLIANT if a service is not configured with TLS or HTTPS.",
-      "Name": "Kubernetes Service",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes Service"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.3.2.33",
       "Description": "Checks if Kubernetes clusters have RBAC (Role-Based Access Control) configured. The rule is NON_COMPLIANT if the cluster does not have RBAC enabled or if the configured roles do not satisfy the specified access control parameters.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.3.2.34",
       "Description": "Checks if attached Kubernetes Persistent Volumes (PVs) are encrypted and optionally are encrypted with a specified KMS key. The rule is NON_COMPLIANT if attached PVs are unencrypted or are encrypted with a KMS key not in the supplied parameters.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.3.2.35",
       "Description": "Checks if Kubernetes secrets used in a Kinesis-like streaming application are encrypted at rest. The rule is NON_COMPLIANT for a Kubernetes secret if 'encryption' is not configured.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.3.2.36",
       "Description": "Checks if a Kubernetes cluster's communication between pods is encrypted using TLS. The rule is NON_COMPLIANT if plain text communication is enabled for network traffic between pod-to-pod connections.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.3.2.37",
       "Description": "Checks if storage encryption is enabled for your Kubernetes Persistent Volumes. The rule is NON_COMPLIANT if storage encryption is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.3.2.38",
       "Description": "Checks if a Kubernetes cluster has Persistent Volume Claims (PVCs) that are encrypted. The rule is NON_COMPLIANT if any PVC in the cluster does not have encryption enabled.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "8.3.2.39",
       "Description": "Checks if Kubernetes clusters have encryption at rest enabled for etcd. The rule is NON_COMPLIANT if the etcd encryption is not configured properly.",
-      "Name": "Kubernetes",
+      "Name": "ETCD",
       "Checks": [
         "etcd_tls_encryption"
       ],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "ETCD"
         }
       ]
     },
@@ -18511,516 +17603,516 @@
     {
       "Id": "8.3.2.41",
       "Description": "Check if Kubernetes Cluster nodes are encrypted end to end. The rule is NON_COMPLIANT if the etcd encryption is not enabled on the cluster.",
-      "Name": "Kubernetes",
+      "Name": "ETCD",
       "Checks": [
         "etcd_tls_encryption"
       ],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "ETCD"
         }
       ]
     },
     {
       "Id": "8.3.2.42",
       "Description": "Checks if a Kubernetes Persistent Volume (PV) is encrypted at rest. The rule is NON_COMPLIANT if a Persistent Volume is not encrypted at rest.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "8.3.2.43",
       "Description": "Checks if Kubernetes Persistent Volume Claims (PVCs) are using encrypted Persistent Volumes (PVs). The rule is NON_COMPLIANT if the Persistent Volumes are not encrypted.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "8.3.2.44",
       "Description": "Checks if storage encryption is enabled for your Kubernetes Persistent Volume Claims (PVCs). The rule is NON_COMPLIANT if storage encryption is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "8.3.2.45",
       "Description": "Checks if Kubernetes clusters have the specified security settings. The rule is NON_COMPLIANT if the Kubernetes cluster is not encrypted or encrypted with another key, or if a cluster does not have audit logging enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.3.2.46",
       "Description": "Checks if Kubernetes clusters are using a specified encryption provider for secrets. The rule is COMPLIANT if encryption is enabled and the cluster is using the specified encryption provider key. The rule is NON_COMPLIANT if the cluster is not using encryption or using a different key.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_encryption_provider_config_set"
       ],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.3.2.47",
       "Description": "Checks if Kubernetes clusters require TLS/SSL encryption for API server connections. The rule is NON_COMPLIANT if the API server's TLS configuration is not enabled or improperly configured.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.3.2.48",
       "Description": "Checks if your Kubernetes persistent volume (PV) is bound to a persistent volume claim (PVC) that ensures encryption at rest is enabled or if there are specific policies that deny access to unencrypted volumes. The rule is NON_COMPLIANT if your persistent volume does not have encryption enabled by default.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "8.3.2.49",
       "Description": "Checks if Kubernetes services have network policies that enforce TLS for communication. The rule is NON_COMPLIANT if any service allows unencrypted HTTP traffic.",
-      "Name": "Kubernetes Services",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes Services"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.3.2.50",
       "Description": "Checks if the persistent volumes (PVs) in Kubernetes are encrypted using a specific encryption provider. The rule is NON_COMPLIANT if the persistent volume is not encrypted.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "8.3.2.51",
       "Description": "Checks if Kubernetes Secrets are used to store sensitive information for a specific deployment. The rule is NON_COMPLIANT if a Secret for storing sensitive data (e.g., passwords, API keys) is not specified in the deployment configuration.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_no_secrets_envs"
       ],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.3.2.52",
       "Description": "Checks if a Kubernetes secret is configured for a pod. The rule is NON_COMPLIANT if 'imagePullSecrets' is not specified for the pod.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_no_secrets_envs"
       ],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.3.2.53",
       "Description": "Checks if all Kubernetes secrets are encrypted using an encryption provider for Kubernetes, either a customer-managed key or the default key provided by Kubernetes. The rule is COMPLIANT if a secret is encrypted using a customer-managed key. This rule is NON_COMPLIANT if a secret is encrypted using the default key.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_no_secrets_envs"
       ],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.3.2.54",
       "Description": "Checks if Kubernetes Secrets are encrypted in transit and at rest. The rule is NON_COMPLIANT if a Secret is not encrypted. Optionally, specify the encryption configuration used for the Secrets.",
-      "Name": "Kubernetes Secrets",
+      "Name": "Core",
       "Checks": [
         "core_no_secrets_envs"
       ],
       "Attributes": [
         {
           "Section": "8.3.2: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes Secrets"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.3.4.1",
       "Description": "Checks if a Kubernetes cluster is part of a specific organization when using a multi-tenant structure. The rule is NON_COMPLIANT if a namespace (representing an account) is not part of the defined organization or if the organization master namespace ID does not match the rule parameter MasterNamespaceId.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.4: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.3.4.2",
       "Description": "Checks if a Kubernetes cluster has Role-Based Access Control (RBAC) policies that prevent the deletion of persistent volume claims. The rule is NON_COMPLIANT if the cluster does not have appropriate Role or ClusterRole bindings that include 'deny' rules for the 'delete' action on PersistentVolumeClaims.",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "8.3.4: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes RBAC"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "8.3.4.3",
       "Description": "Checks if a Kubernetes Pod has a Service Account attached to it. The rule is NON_COMPLIANT if no Service Account is associated with the Pod.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_service_account_plugin"
       ],
       "Attributes": [
         {
           "Section": "8.3.4: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.3.4.4",
       "Description": "Checks if Kubernetes Pods have read-only access to their root filesystems. The rule is NON_COMPLIANT if the readOnlyRootFilesystem parameter in the Pod's securityContext is set to 'false'.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_root_containers_admission"
       ],
       "Attributes": [
         {
           "Section": "8.3.4: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.3.4.5",
       "Description": "Checks if the Kubernetes Role-Based Access Control (RBAC) policies that you create do not allow unauthorized actions on Kubernetes secrets. The rule is NON_COMPLIANT if any unauthorized action is permitted on Kubernetes secrets by the managed RBAC policy.",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_secret_access"
       ],
       "Attributes": [
         {
           "Section": "8.3.4: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes RBAC"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "8.3.4.6",
       "Description": "Checks if the RBAC (Role-Based Access Control) policies attached to your Kubernetes users, service accounts, and roles do not allow blocked actions on all Kubernetes resources. The rule is NON_COMPLIANT if any blocked action is allowed on all Kubernetes resources in an RBAC policy.",
-      "Name": "Kubernetes RBAC",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "8.3.4: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes RBAC"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.3.4.7",
       "Description": "Checks if the Pod Security Policies feature is not in use. The rule is NON_COMPLIANT if a Kubernetes user, role, or group has any inline Pod Security Policies defined.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_security_context_deny_plugin"
       ],
       "Attributes": [
         {
           "Section": "8.3.4: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.3.4.8",
       "Description": "Checks in each Kubernetes Role or ClusterRole resource, if a RoleBinding or ClusterRoleBinding in the input parameter is applied to the Role or ClusterRole resource. The rule is NON_COMPLIANT if the RoleBinding or ClusterRoleBinding is applied to the Role or ClusterRole resource.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "8.3.4: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "8.3.4.9",
       "Description": "Checks whether the Role ARN is attached to a Kubernetes ServiceAccount, or a RoleBinding or ClusterRoleBinding with one or more ServiceAccounts, or a Pod that assumes that ServiceAccount.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.4: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.3.4.10",
       "Description": "Checks if Kubernetes Role or ClusterRole resources have rules that grant permissions to all verbs on all resources. The rule is NON_COMPLIANT if any Role or ClusterRole has a rule with 'verbs': ['*'] over 'resources': ['*'].",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "8.3.4: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "8.3.4.11",
       "Description": "Checks if Kubernetes Role or ClusterRole policies that you create grant permissions to all actions on individual Kubernetes resources. The rule is NON_COMPLIANT if any customer managed Role or ClusterRole allows full access to at least 1 Kubernetes resource.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_cluster_admin_usage"
       ],
       "Attributes": [
         {
           "Section": "8.3.4: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "8.3.4.12",
       "Description": "Checks if all specified Kubernetes RoleBindings are attached to the Kubernetes ServiceAccount. The rule is NON_COMPLIANT if a RoleBinding is not attached to the ServiceAccount.",
-      "Name": "Kubernetes Role-Based Access Control (RBAC)",
+      "Name": "Role-Based Access Control (RBAC)",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.4: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes Role-Based Access Control (RBAC)"
+          "Service": "Role-Based Access Control (RBAC)"
         }
       ]
     },
     {
       "Id": "8.3.4.13",
       "Description": "Checks if none of your Kubernetes ServiceAccounts have direct RoleBindings or ClusterRoleBindings attached. ServiceAccounts must inherit permissions from Roles or ClusterRoles. The rule is NON_COMPLIANT if there is at least one RoleBinding or ClusterRoleBinding that is directly attached to the ServiceAccount.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_service_account_plugin"
       ],
       "Attributes": [
         {
           "Section": "8.3.4: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.3.4.14",
       "Description": "Checks if a Kubernetes cluster has Role-Based Access Control (RBAC) enabled. The rule is NON_COMPLIANT if a Kubernetes cluster does not have RBAC enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "8.3.4: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.3.4.15",
       "Description": "Checks if Kubernetes clusters have Role-Based Access Control (RBAC) enabled. The rule is NON_COMPLIANT if RBAC is not enabled for the Kubernetes cluster.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "8.3.4: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.3.4.16",
       "Description": "Checks if a Kubernetes pod has Role-Based Access Control (RBAC) enabled. The rule is NON_COMPLIANT if a Kubernetes pod does not have RBAC enabled.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pod_creation_access"
       ],
       "Attributes": [
         {
           "Section": "8.3.4: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "8.3.4.17",
       "Description": "Checks if a Kubernetes Pod has Role-Based Access Control (RBAC) enabled for authentication and authorization. The rule is NON_COMPLIANT if a Pod does not have RBAC enabled.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pod_creation_access"
       ],
       "Attributes": [
         {
           "Section": "8.3.4: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "8.3.4.18",
       "Description": "Checks if Kubernetes Persistent Volumes (PVs) allow user permissions through access control policies. The rule is NON_COMPLIANT if access control is configured for user access in Kubernetes Persistent Volumes.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "8.3.4: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "8.3.4.19",
       "Description": "Checks if a Kubernetes Role or ClusterRole does not allow blocklisted permissions on resources for subjects from other namespaces. For example, the rule checks that the Role or ClusterRole does not allow another namespace to perform any 'get', 'list', or 'delete' actions on any pod resources. The rule is NON_COMPLIANT if any blocklisted actions are allowed by the Kubernetes Role or ClusterRole.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.4: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.3.4.20",
       "Description": "Verifies that access to the Kubernetes PersistentVolume (PV) is restricted by any of the Kubernetes principals, service accounts, namespaces, or network policies that you define. The rule is COMPLIANT if a role or cluster role binding is not present that grants access to the PersistentVolume.",
-      "Name": "Kubernetes PersistentVolume",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "8.3.4: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes PersistentVolume"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "8.3.4.21",
       "Description": "Checks if your Kubernetes PersistentVolumePolicies do not allow other inter-namespace permissions than the control PersistentVolumePolicy that you provide.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "8.3.4: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "8.3.4.22",
       "Description": "Checks if the Security Response Team (SRT) can access your Kubernetes cluster. The rule is NON_COMPLIANT if Kubernetes RBAC is enabled but the role for SRT access is not configured.",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC (Role-Based Access Control)",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.4: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes RBAC"
+          "Service": "RBAC (Role-Based Access Control)"
         }
       ]
     },
     {
       "Id": "8.3.5.1",
       "Description": "Checks if Kubernetes service account tokens are rotated within a specified time period. The rule is NON_COMPLIANT if tokens are not rotated within the specified time period. The default value is 90 days.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.5: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.3.5.2",
       "Description": "Checks if Kubernetes secrets have automatic rotation enabled for their associated secrets. If a max rotation frequency is specified, it compares the configuration of the secret's rotation against this value. The rule is NON_COMPLIANT if the secret is not set to rotate automatically or if the defined rotation frequency exceeds the specified maximum.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.5: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
@@ -19039,74 +18131,74 @@
     {
       "Id": "8.3.5.4",
       "Description": "Checks if Kubernetes Secrets have been updated in the past specified number of days. The rule is NON_COMPLIANT if a secret has not been updated for more than maxDaysSinceUpdate number of days. The default value is 90 days.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.5: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.3.6.1",
       "Description": "Checks if the Kubernetes secrets for user authentication meet the specified requirements indicated in the parameters. The rule is NON_COMPLIANT if the secrets do not meet the specified requirements.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_secret_access"
       ],
       "Attributes": [
         {
           "Section": "8.3.6: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "8.3.7.1",
       "Description": "Checks if active Kubernetes secrets storing sensitive access credentials are refreshed or created within a specified retention period. The rule is NON_COMPLIANT if secrets are not rotated within the specified time period. The default value is 90 days.",
-      "Name": "Kubernetes Secrets",
+      "Name": "RBAC (Role-Based Access Control)",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.7: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes Secrets"
+          "Service": "RBAC (Role-Based Access Control)"
         }
       ]
     },
     {
       "Id": "8.3.7.2",
       "Description": "Checks if Kubernetes Secrets have automated rotation policies applied. The rule assesses whether secrets are configured for rotation and verifies if the rotation frequency aligns with an optional maximumAllowedRotationFrequency parameter. The rule is NON_COMPLIANT if a secret is not scheduled for rotation or if its rotation frequency exceeds the specified maximumAllowedRotationFrequency.",
-      "Name": "Kubernetes Secrets",
+      "Name": "RBAC (Role-Based Access Control)",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.7: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes Secrets"
+          "Service": "RBAC (Role-Based Access Control)"
         }
       ]
     },
     {
       "Id": "8.3.7.3",
       "Description": "Checks if Kubernetes Secrets are updated successfully according to the defined update schedule. Kubernetes calculates the date the update should happen. The rule is NON_COMPLIANT if the date passes and the secret isn't updated.",
-      "Name": "Kubernetes Secrets",
+      "Name": "RBAC (Role-Based Access Control)",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.7: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes Secrets"
+          "Service": "RBAC (Role-Based Access Control)"
         }
       ]
     },
     {
       "Id": "8.3.7.4",
       "Description": "Checks if Kubernetes Secrets have been updated in the past specified number of days. The rule is NON_COMPLIANT if a Secret has not been updated for more than maxDaysSinceUpdate number of days. The default value is 90 days.",
-      "Name": "Kubernetes Secrets",
+      "Name": "RBAC (Role-Based Access Control)",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.7: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes Secrets"
+          "Service": "RBAC (Role-Based Access Control)"
         }
       ]
     },
@@ -19125,220 +18217,208 @@
     {
       "Id": "8.3.9.2",
       "Description": "Checks if Kubernetes Secret has a rotation policy enabled. The rule also checks an optional maxRotationFrequency parameter. If the parameter is specified, the rotation frequency of the secret is compared with the maximum allowed frequency. The rule is NON_COMPLIANT if the secret is not scheduled for rotation. The rule is also NON_COMPLIANT if the rotation frequency is higher than the specified maxRotationFrequency parameter.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.9: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.3.9.3",
       "Description": "Checks if Kubernetes Secrets have been updated successfully according to a defined update schedule. The system calculates the date the update should happen. The rule is NON_COMPLIANT if the date passes and the secret isn't updated.",
-      "Name": "Kubernetes Secrets",
+      "Name": "RBAC (Role-Based Access Control)",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.9: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes Secrets"
+          "Service": "RBAC (Role-Based Access Control)"
         }
       ]
     },
     {
       "Id": "8.3.9.4",
       "Description": "Checks if Kubernetes Secrets have been updated (rotated) in the past specified number of days. The rule is NON_COMPLIANT if a secret has not been updated for more than maxDaysSinceRotation number of days. The default value is 90 days.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.3.9: Strong authentication for users and administrators is established and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.4.1.1",
       "Description": "Checks if Kubernetes users (specifically those with RBAC roles) have multi-factor authentication (MFA) enabled. The rule is NON_COMPLIANT if MFA is not enabled for at least one user with access to the Kubernetes cluster.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.4.1: Multi-factor authentication (MFA) is implemented to secure access into the CDE.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.4.1.2",
       "Description": "Checks if Kubernetes RBAC (Role-Based Access Control) is configured to ensure that all users accessing the Kubernetes cluster via the dashboard or CLI have multi-factor authentication (MFA) enabled for their sessions. The rule is COMPLIANT if MFA is enforced for all users.",
-      "Name": "Kubernetes RBAC",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "8.4.1: Multi-factor authentication (MFA) is implemented to secure access into the CDE.",
-          "Service": "Kubernetes RBAC"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.4.1.3",
       "Description": "Checks if your Kubernetes cluster has multi-factor authentication (MFA) enabled for securing access to the Kubernetes API server. The rule is NON_COMPLIANT if any users can access the API server without MFA.",
-      "Name": "Kubernetes API Server",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_not_always_allow"
       ],
       "Attributes": [
         {
           "Section": "8.4.1: Multi-factor authentication (MFA) is implemented to secure access into the CDE.",
-          "Service": "Kubernetes API Server"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.4.1.4",
       "Description": "Checks if the Kubernetes cluster's admin user requires multi-factor authentication for access. The rule is NON_COMPLIANT if the Kubernetes admin user does not have multi-factor authentication (MFA) enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.4.1: Multi-factor authentication (MFA) is implemented to secure access into the CDE.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.4.1.5",
       "Description": "Checks if the equivalent of MFA Delete is enabled in the Kubernetes Persistent Volume configurations. The rule is NON_COMPLIANT if persistent volume protection mechanisms, such as Retain Reclaim Policy or Backup strategies, are not in place.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "8.4.1: Multi-factor authentication (MFA) is implemented to secure access into the CDE.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "8.4.2.1",
       "Description": "Checks if Kubernetes users have multi-factor authentication (MFA) enabled through API server configuration and RBAC policies. The rule is NON_COMPLIANT if MFA is not enabled for any user accessing the Kubernetes cluster.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "8.4.2: Multi-factor authentication (MFA) is implemented to secure access into the CDE.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.4.2.2",
       "Description": "Checks if Kubernetes Role-Based Access Control (RBAC) is enforced for all users accessing the Kubernetes API server. The rule is COMPLIANT if RBAC is enabled and properly configured.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "8.4.2: Multi-factor authentication (MFA) is implemented to secure access into the CDE.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.4.2.3",
       "Description": "Checks if your Kubernetes cluster is configured to require multi-factor authentication (MFA) for users accessing the cluster with cluster-admin role. The rule is NON_COMPLIANT if any roles are allowed to access the cluster without MFA.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.4.2: Multi-factor authentication (MFA) is implemented to secure access into the CDE.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.4.2.4",
       "Description": "Checks if the Kubernetes cluster's service account that has admin privileges requires multi-factor authentication for access. The rule is NON_COMPLIANT if the service account does not have multifactor authentication (MFA) configured.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_service_account_lookup_true"
       ],
       "Attributes": [
         {
           "Section": "8.4.2: Multi-factor authentication (MFA) is implemented to secure access into the CDE.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "8.4.2.5",
-      "Description": "Checks if Object Lock is enabled in the Kubernetes bucket versioning configuration using a StatefulSet. The rule is NON_COMPLIANT if Object Lock is not enabled.",
-      "Name": "Kubernetes",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "8.4.2: Multi-factor authentication (MFA) is implemented to secure access into the CDE.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.4.3.1",
       "Description": "Checks if Kubernetes users have multi-factor authentication (MFA) enabled. The rule is NON_COMPLIANT if MFA is not enabled for at least one Kubernetes user.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.4.3: Multi-factor authentication (MFA) is implemented to secure access into the CDE.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.4.3.2",
       "Description": "Checks if Kubernetes Role-Based Access Control (RBAC) is enabled for all Kubernetes users that access the cluster through a service account. The rule is COMPLIANT if RBAC is enabled.",
-      "Name": "Kubernetes RBAC",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "8.4.3: Multi-factor authentication (MFA) is implemented to secure access into the CDE.",
-          "Service": "Kubernetes RBAC"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.4.3.3",
       "Description": "Checks if your Kubernetes cluster is configured to enforce role-based access control (RBAC) for sensitive operations. The rule is NON_COMPLIANT if any user or service account can perform actions with elevated privileges without proper RBAC policies in place.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_auth_mode_include_rbac"
       ],
       "Attributes": [
         {
           "Section": "8.4.3: Multi-factor authentication (MFA) is implemented to secure access into the CDE.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "8.4.3.4",
       "Description": "Checks if the Kubernetes cluster administrator requires multi-factor authentication (MFA) for console access. The rule is NON_COMPLIANT if the Kubernetes admin user does not have multi-factor authentication enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.4.3: Multi-factor authentication (MFA) is implemented to secure access into the CDE.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
@@ -19357,26 +18437,26 @@
     {
       "Id": "8.6.3.1",
       "Description": "Checks if Kubernetes Service Accounts have their associated tokens rotated (changed) within the number of days specified in maxTokenAge. The rule is NON_COMPLIANT if tokens are not rotated within the specified time period. The default value is 90 days.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.6.3: Use of application and system accounts and associated authentication factors is strictly managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "8.6.3.2",
       "Description": "Checks if the Kubernetes secrets used for storing sensitive data, such as passwords, meet the specified security requirements indicated in the parameters. The rule is NON_COMPLIANT if the secrets do not meet the specified security standards.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_secret_access"
       ],
       "Attributes": [
         {
           "Section": "8.6.3: Use of application and system accounts and associated authentication factors is strictly managed.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
@@ -19395,24 +18475,24 @@
     {
       "Id": "8.6.3.4",
       "Description": "Checks if Kubernetes secrets are updated successfully according to the rotation schedule. If the scheduled update date passes and the secret isn't updated, the rule is considered NON_COMPLIANT.",
-      "Name": "Kubernetes Secrets",
+      "Name": "RBAC (Role-Based Access Control)",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.6.3: Use of application and system accounts and associated authentication factors is strictly managed.",
-          "Service": "Kubernetes Secrets"
+          "Service": "RBAC (Role-Based Access Control)"
         }
       ]
     },
     {
       "Id": "8.6.3.5",
       "Description": "Checks if Kubernetes Secrets have been updated (rotated) in the past specified number of days. The rule is NON_COMPLIANT if a secret has not been updated for more than maxDaysSinceUpdate number of days. The default value is 90 days.",
-      "Name": "Kubernetes Secrets",
+      "Name": "RBAC (Role-Based Access Control)",
       "Checks": [],
       "Attributes": [
         {
           "Section": "8.6.3: Use of application and system accounts and associated authentication factors is strictly managed.",
-          "Service": "Kubernetes Secrets"
+          "Service": "RBAC (Role-Based Access Control)"
         }
       ]
     },
@@ -19431,264 +18511,252 @@
     {
       "Id": "A1.1.2.2",
       "Description": "Checks if Kubernetes nodes are publicly accessible. The rule is NON_COMPLIANT if the node's external IP is set and reachable from the internet.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.1.2: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.1.2.3",
       "Description": "Checks if Kubernetes persistent volume snapshots are public. The rule is NON_COMPLIANT if any Kubernetes persistent volume snapshots are public.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.1.2: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.1.2.4",
       "Description": "Checks if Kubernetes Persistent Volumes (PVs) are not publicly accessible. The rule is NON_COMPLIANT if one or more Persistent Volumes have their access modes set to ReadWriteMany with a public IP, indicating they are accessible from outside the cluster.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "A1.1.2: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "A1.1.2.5",
       "Description": "Checks if Kubernetes containers only have read-only access to their root filesystems. The rule is NON_COMPLIANT if the readOnlyRootFilesystem field in the container specification is set to 'false'.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_root_containers_admission"
       ],
       "Attributes": [
         {
           "Section": "A1.1.2: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.1.2.6",
       "Description": "Checks if Kubernetes Persistent Volume (PV) is configured to enforce a specific mount path and not the root directory. The rule is NON_COMPLIANT if the mount path is set to '/' (default root directory of the volume).",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "A1.1.2: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "A1.1.2.7",
       "Description": "Checks if Kubernetes Persistent Volumes (PVs) and Persistent Volume Claims (PVCs) are configured with appropriate access modes and security contexts to enforce user identity. The rule is NON_COMPLIANT if 'securityContext.runAsUser' is not defined or if the access mode does not match the expected user identity configuration.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "A1.1.2: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "A1.1.2.8",
       "Description": "Checks if a Kubernetes Service has public access settings enabled. The rule is NON_COMPLIANT if its type is not ClusterIP, or if it's of type LoadBalancer or NodePort, and exposes ports other than Port 22.",
-      "Name": "Kubernetes Service",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "A1.1.2: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes Service"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.1.2.9",
       "Description": "Checks if the Kubernetes Pod Security Policy or Network Policy attached to the Pod resource prohibits public access. If the Pod security policy allows public access, it is NON_COMPLIANT.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.1.2: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.1.2.10",
       "Description": "Checks if a Kubernetes cluster snapshot (using a backup tool) is public. The rule is NON_COMPLIANT if any existing and new Kubernetes cluster snapshots is public.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.1.2: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "A1.1.2.11",
-      "Description": "Checks if the Kubernetes database instances (like those managed by a StatefulSet or Deployment) are configured to be accessible only within the cluster and not publicly exposed via a Service with type 'LoadBalancer' or 'NodePort'. The rule is NON_COMPLIANT if the external access is enabled.",
-      "Name": "Kubernetes",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "A1.1.2: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.1.2.12",
       "Description": "Checks if Kubernetes Persistent Volume snapshots are public. The rule is NON_COMPLIANT if any existing and new Kubernetes Persistent Volume snapshots are public.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "A1.1.2: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "A1.1.2.13",
       "Description": "Checks if Kubernetes clusters are not publicly accessible. The rule is NON_COMPLIANT if the service is exposed on a public IP or if the `externalTrafficPolicy` is set to 'Cluster' without proper Network Policy configurations.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "A1.1.2: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.1.2.14",
       "Description": "Checks if Kubernetes Network Policies are in place to restrict unauthorized access to Pods. The rule is NON_COMPLIANT if Network Policies are not defined to limit network access to Pods in the cluster.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "A1.1.2: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.1.2.15",
       "Description": "Checks if the required NetworkPolicies are configured to restrict public access for the specified Kubernetes namespaces. The rule is only NON_COMPLIANT when the defined NetworkPolicies do not match the expected configurations for controlling ingress and egress traffic.",
-      "Name": "Kubernetes Networking",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "A1.1.2: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes Networking"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.1.2.16",
       "Description": "Checks if the required network policies for public access are configured at the namespace level. The rule is NON_COMPLIANT if the configuration does not match one or more settings from the specified parameters (or default).",
-      "Name": "Kubernetes Network Policies",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.1.2: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes Network Policies"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.1.2.17",
       "Description": "Checks if Kubernetes Services are publicly accessible. The rule is NON_COMPLIANT if a Service of type LoadBalancer or NodePort is not listed in the excludedPublicServices parameter and has access settings that allow external traffic.",
-      "Name": "Kubernetes Service",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "A1.1.2: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes Service"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.1.2.18",
       "Description": "Checks if the Kubernetes cluster has MFA Delete equivalent enabled for resource deletion policies. The rule is NON_COMPLIANT if resource deletion policies that require enhanced authentication are not enforced.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.1.2: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.1.2.19",
       "Description": "Checks if your Kubernetes Secrets do not allow unauthenticated access. The rule checks the Role-Based Access Control (RBAC) permissions, the secrets configuration, and any network policies that might expose the secrets.",
-      "Name": "Kubernetes Secrets",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_secret_access"
       ],
       "Attributes": [
         {
           "Section": "A1.1.2: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes Secrets"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "A1.1.2.20",
       "Description": "Checks if your Kubernetes Persistent Volume Claims (PVCs) do not allow public write access. The rule checks the StorageClass settings, the PVC configurations, and the associated Access Modes.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "A1.1.2: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "A1.1.2.21",
       "Description": "Checks if direct internet access is disabled for a Kubernetes Pod. The rule is NON_COMPLIANT if the Pod is configured to use an External IP for internet access.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.1.2: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
@@ -19707,338 +18775,338 @@
     {
       "Id": "A1.1.3.1",
       "Description": "Checks if Kubernetes Services are of the type specified in the rule parameter serviceType. The rule returns NON_COMPLIANT if the Service does not match the endpoint type configured in the rule parameter.",
-      "Name": "Kubernetes Services",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes Services"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.1.3.2",
       "Description": "Checks if a Kubernetes Ingress resource is configured to use HTTPS with an SSL certificate. The rule is NON_COMPLIANT if the Ingress does not have an associated TLS configuration with a valid certificate.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.1.3.3",
       "Description": "Checks if Kubernetes APIs (such as those provided by the API server) are protected by Network Policies. The rule is NON_COMPLIANT for a Kubernetes API if it is not associated with a Network Policy.",
-      "Name": "Kubernetes API Server",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes API Server"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.1.3.4",
       "Description": "Checks if Kubernetes Ingress resources have a valid annotation for a Web Application Firewall (WAF) or a specific WAF ACL. The rule is NON_COMPLIANT if an Ingress resource is not associated with a WAF configuration.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.1.3.5",
       "Description": "Checks if the certificate associated with an Ingress resource in Kubernetes is the default SSL certificate. The rule is NON_COMPLIANT if an Ingress resource uses the default SSL certificate.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.1.3.6",
       "Description": "Checks if the Bitbucket source repository URL contains sign-in credentials; marked as NON_COMPLIANT if the URL contains any sign-in information and COMPLIANT if it doesn't.",
-      "Name": "Bitbucket",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Bitbucket"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.1.3.7",
       "Description": "Checks if Kubernetes pods have public network access. The rule is NON_COMPLIANT if the 'hostNetwork' field is set to true in the pod specification.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.1.3.8",
       "Description": "Checks if Kubernetes stateful sets have public access. The rule is NON_COMPLIANT if any Kubernetes stateful sets have public network policies, exposing them to the internet.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.1.3.9",
       "Description": "Checks if the Kubernetes NetworkPolicy allows access for all pods. The rule is NON_COMPLIANT if 'allow all' is present and set to true.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.1.3.10",
       "Description": "Checks if the status of the Kubernetes Deployment rollout is successful or failed after the deployment update on the pod. The deployment is compliant if the status indicates success. For more information about deployments, see What is a deployment?",
-      "Name": "Kubernetes Deployment",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes Deployment"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.1.3.11",
       "Description": "Checks if Kubernetes Network Policies have 'ingress' rules defined to allow traffic. The rule is NON_COMPLIANT for a Network Policy if 'ingress' rules are not configured.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.1.3.12",
       "Description": "Checks if the Kubernetes cluster endpoint is not publicly accessible. The rule is NON_COMPLIANT if the endpoint is publicly accessible.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.1.3.13",
       "Description": "Checks if Kubernetes clusters have their services configured with private access only. The rule is NON_COMPLIANT if a service exposed is of type LoadBalancer and is accessible from outside the cluster.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.1.3.14",
       "Description": "Checks if Ingress resources in Kubernetes are configured with certificates from a Certificate Manager. This rule is NON_COMPLIANT if at least 1 Ingress resource has at least 1 TLS configuration that is not using a certificate from the designated Certificate Manager or is configured with a certificate different from the designated Certificate Manager's certificate.",
-      "Name": "Ingress Controller",
+      "Name": "API Server",
       "Checks": [
         "apiserver_kubelet_cert_auth"
       ],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Ingress Controller"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.1.3.15",
       "Description": "Checks if the Kubernetes Services use TLS certificates provided by a specified certificate management solution (e.g., cert-manager). To use this rule, ensure that the Service is configured with a TLS or HTTPS endpoint. This rule is only applicable to Kubernetes Services configured for TLS. This rule does not check Ingress resources or any other types of Services.",
-      "Name": "Kubernetes Service",
+      "Name": "API Server",
       "Checks": [
         "apiserver_tls_config"
       ],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes Service"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.1.3.16",
       "Description": "Checks if a Kubernetes cluster has network policies that restrict public access. The rule is NON_COMPLIANT if NetworkPolicy is not applied, or if applied, ports other than Port 22 are open in the allowed ingress or egress rules.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.1.3.17",
       "Description": "The rule INCOMING_SSH_DISABLED named restricted-ssh restricts incoming SSH connections to enhance security in Kubernetes.",
-      "Name": "networkpolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "networkpolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.1.3.18",
       "Description": "Checks if Load Balancers are associated with an authorized Kubernetes cluster. The rule is NON_COMPLIANT if Load Balancers are associated with an unauthorized cluster.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.1.3.19",
       "Description": "Checks if the Kubernetes Service policy attached to the Service resource prohibits public access. If the Service policy allows public access, it is NON_COMPLIANT.",
-      "Name": "Kubernetes Service",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes Service"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.1.3.20",
       "Description": "Checks if a Kubernetes Pod is allowed access to a virtual private cloud (VPC) through the presence of network policies. The rule is NON_COMPLIANT if the Pod is not configured with the correct network policies for VPC access.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.1.3.21",
       "Description": "Checks if Kubernetes Network Policies allow unrestricted ingress traffic on default ports for SSH (22) or RDP (3389). The rule is NON_COMPLIANT if a Network Policy permits ingress traffic from any source IP to these ports.",
-      "Name": "Kubernetes Network Policies",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes Network Policies"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.1.3.22",
       "Description": "Checks if a Kubernetes Network Policy is configured with a user-defined default action for fragmented packets. The rule is NON_COMPLIANT if the default action for fragmented packets does not match with the user-defined default action.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.1.3.23",
       "Description": "Check if the Kubernetes NetworkPolicy is associated with ingress or egress rules. This policy is NON_COMPLIANT if no ingress or egress rules are defined in the NetworkPolicy, otherwise COMPLIANT if at least one rule exists.",
-      "Name": "Kubernetes NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.1.3.24",
       "Description": "Checks if a Kubernetes NetworkPolicy contains ingress or egress rules. The policy is NON_COMPLIANT if there are no rules defined in the NetworkPolicy.",
-      "Name": "Kubernetes NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.1.3.25",
       "Description": "Checks if there are public routes in the Kubernetes NetworkPolicy to an external service. The rule is NON_COMPLIANT if a NetworkPolicy allows traffic to a specific service from any source without restrictions.",
-      "Name": "NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.1.3.26",
       "Description": "Checks if Kubernetes clusters are within a Virtual Private Cloud (VPC). The rule is NON_COMPLIANT if a Kubernetes service is exposed with type 'LoadBalancer' or 'NodePort' without proper network policies restricting access.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_admission_hostport_containers"
       ],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.1.3.27",
       "Description": "Checks if there are any Kubernetes Network Policies that do not conform to the default network policy. The rule is NON_COMPLIANT if there are any network policies that are not the default network policy.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
@@ -20057,252 +19125,252 @@
     {
       "Id": "A1.1.3.29",
       "Description": "Checks if Kubernetes clusters are not publicly accessible. The rule is NON_COMPLIANT if the publicly accessible fields in the cluster configuration (e.g., `--advertise-address`, `--enable-aggregator-routing`, security group settings) are set to allow public access.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.1.3.30",
       "Description": "Checks if Kubernetes services have network policies that deny public access. The rule is NON_COMPLIANT if network policies do not restrict public access to the services.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.1.3.31",
       "Description": "Verifies that the public access settings for Kubernetes resources (such as Pods or Services) are correctly configured at the cluster level. The rule is considered NON_COMPLIANT if the specified settings for public access do not align with the designated configuration specifications.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.1.3.32",
       "Description": "Checks if the required network policies are configured to restrict public access at the namespace level. The rule is NON_COMPLIANT if the network policy does not match one or more settings from parameters or defaults.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.1.3.33",
       "Description": "Checks if Kubernetes Services are publicly accessible. The rule is NON_COMPLIANT if a Service is of type 'LoadBalancer' or 'NodePort' and is not listed in the excludedPublicServices parameter, and the service level settings are public.",
-      "Name": "Kubernetes Services",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes Services"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.1.3.34",
       "Description": "Checks if your Kubernetes persistent volume claims do not allow public access. The rule checks the access modes and any associated Network Policies or Role-Based Access Control (RBAC) settings.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "A1.1.3.35",
       "Description": "Checks if your Kubernetes Persistent Volumes do not allow public write access. The rule checks the Persistent Volume Claims and their associated access modes, ensuring that only authorized users can write to the volumes.",
-      "Name": "Kubernetes Persistent Volumes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes Persistent Volumes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "A1.1.3.36",
       "Description": "Checks if a Kubernetes Pod is deployed within a specific namespace or within a list of approved namespaces. The rule is NON_COMPLIANT if a Pod is not deployed within a specified namespace or if its namespace is not included in the parameter list.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.1.3.37",
       "Description": "Checks if direct internet access is disabled for a Kubernetes Pod. The rule is NON_COMPLIANT if a Pod is configured to use an external IP or has access to the internet through its network settings.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.1.3.38",
       "Description": "Checks if a Kubernetes Service has Endpoints created for each corresponding Deployment or Pod in the specified namespace. The rule is NON_COMPLIANT if any Deployment or Pod does not have the corresponding Endpoints for the Service.",
-      "Name": "Kubernetes Service",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes Service"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.1.3.39",
       "Description": "Checks if there are unused Network Policies. The rule is COMPLIANT if each Network Policy is associated with a Pod. The rule is NON_COMPLIANT if a Network Policy is not associated with a Pod.",
-      "Name": "NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.1.3.40",
       "Description": "In Kubernetes, equivalent configuration checks would involve validating Network Policies to ensure that only specified pods can accept incoming traffic on certain ports. The check is NON_COMPLIANT if there are Network Policies allowing unrestricted traffic on all ports without specifying authorized ports.",
-      "Name": "Kubernetes Networking",
+      "Name": "Core",
       "Checks": [
         "core_minimize_admission_hostport_containers"
       ],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes Networking"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.1.3.41",
       "Description": "Checks if a Kubernetes NetworkPolicy contains any ingress or egress rules. The NetworkPolicy is NON_COMPLIANT if there are no rules specified within it.",
-      "Name": "Kubernetes NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.1.3.42",
       "Description": "Checks if a Kubernetes NetworkPolicy contains any ingress or egress rules. The policy is NON_COMPLIANT if no rules are present within the NetworkPolicy.",
-      "Name": "Kubernetes NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.1.3.43",
       "Description": "Checks whether a Kubernetes NetworkPolicy exists in a namespace. This rule is NON_COMPLIANT if a NetworkPolicy does not exist, as it is recommended to enforce network segmentation.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.1.3.44",
       "Description": "Checks if Kubernetes Network Policies contain any ingress or egress rules. The policy is NON_COMPLIANT if there are no rules present within a Kubernetes Network Policy.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.1.3.45",
       "Description": "Checks whether a Kubernetes NetworkPolicy contains ingress or egress rules. This NetworkPolicy is COMPLIANT if it includes at least one rule and NON_COMPLIANT otherwise.",
-      "Name": "Kubernetes NetworkPolicy",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes NetworkPolicy"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.1.3.46",
       "Description": "Checks if a Kubernetes NetworkPolicy contains any ingress or egress rules. The policy is NON_COMPLIANT if there are no rules present within the NetworkPolicy.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.1.3: Multi-tenant service providers protect and separate all customer environments and data.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.2.1.1",
       "Description": "Checks if Kubernetes Ingress resources have access logging enabled. The rule is NON_COMPLIANT if an access log configuration is not defined for the Ingress resource.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.2.1: Multi-tenant service providers facilitate logging and incident response for all customers.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.2.1.2",
       "Description": "Checks if all methods in Kubernetes Ingress resources have logging enabled. The rule is NON_COMPLIANT if logging is not enabled or if the logging level is neither ERROR nor INFO.",
-      "Name": "Ingress Controller",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.2.1: Multi-tenant service providers facilitate logging and incident response for all customers.",
-          "Service": "Ingress Controller"
+          "Service": "API Server"
         }
       ]
     },
@@ -20321,212 +19389,198 @@
     {
       "Id": "A1.2.1.4",
       "Description": "Checks if a Kubernetes API server has audit logging enabled. The rule is NON_COMPLIANT if audit logging is not enabled, or 'audit-log-path' is set to a path that does not exist or is not configured correctly.",
-      "Name": "Kubernetes API Server",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "A1.2.1: Multi-tenant service providers facilitate logging and incident response for all customers.",
-          "Service": "Kubernetes API Server"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.2.1.5",
       "Description": "Checks if Kubernetes Services are configured with a user-defined session affinity. The rule is NON_COMPLIANT if the session affinity setting does not match the user-defined session affinity mode.",
-      "Name": "Kubernetes Services",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.2.1: Multi-tenant service providers facilitate logging and incident response for all customers.",
-          "Service": "Kubernetes Services"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.2.1.6",
       "Description": "Checks if Kubernetes Ingress resources are configured to log requests to a designated logging service. The rule is NON_COMPLIANT if an Ingress resource does not have logging enabled.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.2.1: Multi-tenant service providers facilitate logging and incident response for all customers.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.2.1.7",
       "Description": "Checks if at least one Kubernetes audit policy is logging data events for all resources in the cluster. The rule is NON_COMPLIANT if there are no policies in place that record data events.",
-      "Name": "Kubernetes Audit Logging",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "A1.2.1: Multi-tenant service providers facilitate logging and incident response for all customers.",
-          "Service": "Kubernetes Audit Logging"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.2.1.8",
       "Description": "Checks that there is at least one Kubernetes audit policy defined with security best practices. This rule is COMPLIANT if there is at least one audit policy that meets all of the following: proper event retention, appropriate level of information logged, and compliance with organizational security requirements.",
-      "Name": "Kubernetes Audit",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "A1.2.1: Multi-tenant service providers facilitate logging and incident response for all customers.",
-          "Service": "Kubernetes Audit"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.2.1.9",
       "Description": "Checks if Kubernetes Secrets are encrypted at rest with a specified encryption configuration. The rule is NON_COMPLIANT if a Secret is not encrypted or is encrypted with a key not specified in the encryption configuration.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_no_secrets_envs"
       ],
       "Attributes": [
         {
           "Section": "A1.2.1: Multi-tenant service providers facilitate logging and incident response for all customers.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "A1.2.1.10",
-      "Description": "In Kubernetes, the equivalent concept would be to ensure that audit logs are enabled for the cluster, similar to how AWS CloudTrail enables logging for account activity. This involves configuring the audit logging feature in Kubernetes to track and log requests to the API server.",
-      "Name": "Kubernetes",
-      "Checks": [
-        "apiserver_audit_log_path_set"
-      ],
-      "Attributes": [
-        {
-          "Section": "A1.2.1: Multi-tenant service providers facilitate logging and incident response for all customers.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.2.1.11",
       "Description": "Checks if the Kubernetes cluster has encryption enabled for secrets, using the specific encryption provider. The rule is COMPLIANT if the encryption provider is configured in the Kubernetes API server with an encryption config file.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_encryption_provider_config_set"
       ],
       "Attributes": [
         {
           "Section": "A1.2.1: Multi-tenant service providers facilitate logging and incident response for all customers.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.2.1.12",
       "Description": "Checks if Kubernetes audit logging is enabled and if the logs are being stored securely. It's recommended that audit logging is configured to capture all events for compliance and security purposes. The rule is NON_COMPLIANT if audit logging is not enabled or misconfigured.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "A1.2.1: Multi-tenant service providers facilitate logging and incident response for all customers.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.2.1.13",
       "Description": "Checks if a Kubernetes Pod has at least one logging option enabled. The rule is NON_COMPLIANT if the status of all present logging configurations is set to 'DISABLED'.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.2.1: Multi-tenant service providers facilitate logging and incident response for all customers.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.2.1.14",
       "Description": "Checks if logging is enabled with a valid severity level for Kubernetes pod events. The rule is NON_COMPLIANT if logging is not enabled or pod logging does not have a severity level that is not valid.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.2.1: Multi-tenant service providers facilitate logging and incident response for all customers.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.2.1.15",
       "Description": "Verifies whether a Kubernetes cluster has audit logging enabled. The rule is NON_COMPLIANT if the Kubernetes cluster does not have audit logging configured.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "A1.2.1: Multi-tenant service providers facilitate logging and incident response for all customers.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.2.1.16",
       "Description": "Checks if a Kubernetes cluster has logging enabled for its API server. The rule is NON_COMPLIANT if 'apiServer.logging.enabled' is set to false.",
-      "Name": "Kubernetes API Server",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "A1.2.1: Multi-tenant service providers facilitate logging and incident response for all customers.",
-          "Service": "Kubernetes API Server"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.2.1.17",
       "Description": "Checks if the logging configuration is set on active Kubernetes Pod specifications. This rule is NON_COMPLIANT if an active Pod does not have the logging configuration resource defined or the value for logging configuration is null in at least one container specification.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.2.1: Multi-tenant service providers facilitate logging and incident response for all customers.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.2.1.18",
       "Description": "Checks if a Kubernetes cluster is configured with logging enabled. The rule is NON_COMPLIANT if logging for Kubernetes clusters is not enabled for all log types, including application logs, audit logs, and container logs.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "A1.2.1: Multi-tenant service providers facilitate logging and incident response for all customers.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.2.1.19",
       "Description": "Checks if Kubernetes clusters are configured to send logs to a logging solution such as Fluentd or Fluent Bit. The rule is NON_COMPLIANT if logging is not properly set up or if log forwarding is disabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.2.1: Multi-tenant service providers facilitate logging and incident response for all customers.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
@@ -20545,256 +19599,244 @@
     {
       "Id": "A1.2.1.21",
       "Description": "Checks if Kubernetes pods have logging enabled for monitoring purposes. The rule is NON_COMPLIANT if a pod does not have appropriate logging configuration enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.2.1: Multi-tenant service providers facilitate logging and incident response for all customers.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.2.1.22",
       "Description": "Checks if a Kubernetes cluster has audit logging enabled. The rule is NON_COMPLIANT if audit logging is not enabled for the cluster.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "A1.2.1: Multi-tenant service providers facilitate logging and incident response for all customers.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "A1.2.1.23",
-      "Description": "The rule identifier MULTI_REGION_CLOUD_TRAIL_ENABLED corresponds to the rule name multi-region-cloudtrail-enabled, indicating that a multi-region CloudTrail is enabled for tracking events across different regions.",
-      "Name": "AWS CloudTrail",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "A1.2.1: Multi-tenant service providers facilitate logging and incident response for all customers.",
-          "Service": "AWS CloudTrail"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.2.1.24",
       "Description": "Checks if a Kubernetes cluster has logging enabled for audit logs. The rule is NON_COMPLIANT if the Kubernetes cluster does not have audit logging enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "A1.2.1: Multi-tenant service providers facilitate logging and incident response for all customers.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.2.1.25",
       "Description": "Checks if Kubernetes Network Policies have logging enabled. The rule is NON_COMPLIANT if a logging type is not configured. You can specify which logging type you want the rule to check.",
-      "Name": "Kubernetes Network Policies",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.2.1: Multi-tenant service providers facilitate logging and incident response for all customers.",
-          "Service": "Kubernetes Network Policies"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.2.1.26",
       "Description": "Checks if Kubernetes clusters have logging configured to capture audit logs and are publishing them to a logging service such as Elasticsearch or a monitoring tool like Prometheus. The rule is NON_COMPLIANT if Kubernetes clusters do not have audit log publishing configured.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "A1.2.1: Multi-tenant service providers facilitate logging and incident response for all customers.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.2.1.27",
       "Description": "Checks if the respective logs of Kubernetes pods are enabled. The rule is NON_COMPLIANT if any logs are not enabled for the pods.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.2.1: Multi-tenant service providers facilitate logging and incident response for all customers.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.2.1.28",
       "Description": "Checks if Kubernetes clusters are logging audit events to a specific location. The rule is NON_COMPLIANT if audit logging is not enabled for a Kubernetes cluster or if the 'auditLogPath' parameter is provided but the logging destination does not match.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "A1.2.1: Multi-tenant service providers facilitate logging and incident response for all customers.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.2.1.29",
       "Description": "Checks if Kubernetes clusters have the specified settings. The rule is NON_COMPLIANT if the Kubernetes cluster is not encrypted or encrypted with another key, or if a cluster does not have audit logging enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.2.1: Multi-tenant service providers facilitate logging and incident response for all customers.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.2.1.30",
       "Description": "Checks if DNS query logging is enabled for your Kubernetes cluster's CoreDNS configuration. The rule is NON_COMPLIANT if DNS query logging is not enabled.",
-      "Name": "CoreDNS",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.2.1: Multi-tenant service providers facilitate logging and incident response for all customers.",
-          "Service": "CoreDNS"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.2.1.31",
       "Description": "Checks if Kubernetes services are publicly accessible. The rule is NON_COMPLIANT if a Kubernetes service is not listed in the excludedPublicServices parameter and the service type is LoadBalancer or NodePort.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "A1.2.1: Multi-tenant service providers facilitate logging and incident response for all customers.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.2.1.32",
       "Description": "Checks if logging is enabled for your Kubernetes cluster's persistent volumes. The rule is NON_COMPLIANT if logging is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.2.1: Multi-tenant service providers facilitate logging and incident response for all customers.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.2.1.33",
       "Description": "Checks if Kubernetes Pods have logging enabled. The rule is NON_COMPLIANT if a Pod does not have logging enabled or the logging configuration is not at the minimum level required.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.2.1: Multi-tenant service providers facilitate logging and incident response for all customers.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.2.1.34",
       "Description": "Checks if Kubernetes Network Policies are defined and enforced for all namespaces. The rule is NON_COMPLIANT if network policies are not defined for at least one namespace.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "A1.2.1: Multi-tenant service providers facilitate logging and incident response for all customers.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A1.2.1.35",
       "Description": "Checks if logging is enabled on Kubernetes network policies. The rule is NON_COMPLIANT if the logging is enabled but the logging destination does not match the expected value for the network policies.",
-      "Name": "Kubernetes Network Policies",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.2.1: Multi-tenant service providers facilitate logging and incident response for all customers.",
-          "Service": "Kubernetes Network Policies"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.2.1.36",
       "Description": "Checks if logging is enabled on Kubernetes Ingress resources. The rule is NON_COMPLIANT for an Ingress resource if it does not have logging enabled.",
-      "Name": "Kubernetes Ingress",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.2.1: Multi-tenant service providers facilitate logging and incident response for all customers.",
-          "Service": "Kubernetes Ingress"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A1.2.3.1",
       "Description": "Checks if security contact information is provided for Kubernetes cluster administrators. The rule is NON_COMPLIANT if security contact information for cluster administrators is not configured.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A1.2.3: Multi-tenant service providers facilitate logging and incident response for all customers.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A3.2.5.1.1",
       "Description": "Checks if automated sensitive data discovery is enabled in Kubernetes. The rule is NON_COMPLIANT if automated sensitive data discovery is disabled. The rule is APPLICABLE for cluster administrator roles and NOT_APPLICABLE for regular user roles.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A3.2.5.1: PCI DSS scope is documented and validated.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A3.2.5.1.2",
       "Description": "Checks if a specific Kubernetes PodSecurityPolicy is enabled in your cluster. The rule is NON_COMPLIANT if the 'privileged' attribute is set to 'true'.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_security_context_deny_plugin"
       ],
       "Attributes": [
         {
           "Section": "A3.2.5.1: PCI DSS scope is documented and validated.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A3.2.5.1.3",
       "Description": "Checks if automated sensitive data discovery is enabled for Kubernetes Secrets Management. The rule is NON_COMPLIANT if automated sensitive data discovery for secrets is disabled. The rule is APPLICABLE for administrator accounts and NOT_APPLICABLE for regular user accounts.",
-      "Name": "Kubernetes Secrets Management",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_secret_access"
       ],
       "Attributes": [
         {
           "Section": "A3.2.5.2: PCI DSS scope is documented and validated.",
-          "Service": "Kubernetes Secrets Management"
+          "Service": "RBAC"
         }
       ]
     },
@@ -20813,110 +19855,74 @@
     {
       "Id": "A3.3.1.1",
       "Description": "Checks if OpenTelemetry tracing is enabled on Kubernetes Services. The rule is COMPLIANT if OpenTelemetry tracing is enabled for the Service and NON_COMPLIANT otherwise.",
-      "Name": "Kubernetes Services",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A3.3.1: PCI DSS is incorporated into business-as-usual (BAU) activities.",
-          "Service": "Kubernetes Services"
-        }
-      ]
-    },
-    {
-      "Id": "A3.3.1.2",
-      "Description": "Checks if your Kubernetes resources (like Deployments or StatefulSets) have proper event notifications configured to send alerts to a specified messaging system (e.g., Slack, Email). Optionally checks if specified notification channels are used. The rule is NON_COMPLIANT if Kubernetes resources do not send notifications.",
-      "Name": "Kubernetes",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "A3.3.1: PCI DSS is incorporated into business-as-usual (BAU) activities.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A3.3.1.3",
       "Description": "Checks if Kubernetes alerts (e.g., from Prometheus or other monitoring tools) have an action configured in response to specific alert states (e.g., firing, pending, resolved). Optionally checks if any actions match a specified named resource. The rule is NON_COMPLIANT if no action is specified for the alert or the optional parameter.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A3.3.1: PCI DSS is incorporated into business-as-usual (BAU) activities.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "A3.3.1.4",
-      "Description": "Checks if a Kubernetes resource type has a Prometheus alert for the named metric. For resource type, you can specify Pods, Deployments, Services, or StatefulSets. The rule is COMPLIANT if the named metric has a resource ID and Prometheus alert.",
-      "Name": "Prometheus",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "A3.3.1: PCI DSS is incorporated into business-as-usual (BAU) activities.",
-          "Service": "Prometheus"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A3.3.1.5",
       "Description": "Checks whether Kubernetes events with the given metric name have the specified settings.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A3.3.1: PCI DSS is incorporated into business-as-usual (BAU) activities.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A3.3.1.6",
       "Description": "Checks if Kubernetes audit logging is configured to send logs to a designated logging service (like Elasticsearch, Fluentd, or a specified log aggregation service). The audit configuration is NON_COMPLIANT if the log output destination is not set or is empty.",
-      "Name": "Kubernetes Audit Logging",
+      "Name": "API Server",
       "Checks": [
         "apiserver_audit_log_path_set"
       ],
       "Attributes": [
         {
           "Section": "A3.3.1: PCI DSS is incorporated into business-as-usual (BAU) activities.",
-          "Service": "Kubernetes Audit Logging"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A3.3.1.7",
       "Description": "Checks if detailed monitoring (similar to Kubernetes 'prometheus') is enabled for Pods. The rule is NON_COMPLIANT if detailed monitoring is not enabled (i.e., the Prometheus metrics are not collected).",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A3.3.1: PCI DSS is incorporated into business-as-usual (BAU) activities.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A3.3.1.8",
       "Description": "Checks if Kubernetes Event Notifications are enabled for a specified resource (like a Pod). The rule is NON_COMPLIANT if Event Notifications are not set on the resource, or if the event type or destination do not match the expected criteria.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A3.3.1: PCI DSS is incorporated into business-as-usual (BAU) activities.",
-          "Service": "Kubernetes"
-        }
-      ]
-    },
-    {
-      "Id": "A3.3.1.9",
-      "Description": "Checks if AWS Security Hub is enabled for an AWS Account. The rule is NON_COMPLIANT if AWS Security Hub is not enabled.",
-      "Name": "AWS Security Hub",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "A3.3.1: PCI DSS is incorporated into business-as-usual (BAU) activities.",
-          "Service": "AWS Security Hub"
+          "Service": "Core"
         }
       ]
     },
@@ -20935,174 +19941,174 @@
     {
       "Id": "A3.3.1.11",
       "Description": "Checks if the monitoring metrics collection is enabled for a Kubernetes network policy. The policy is NON_COMPLIANT if the 'metrics.enabled' field is set to false.",
-      "Name": "Kubernetes Network Policy",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A3.3.1: PCI DSS is incorporated into business-as-usual (BAU) activities.",
-          "Service": "Kubernetes Network Policy"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A3.4.1.1",
       "Description": "Checks if a Kubernetes Namespace has an attached resource-based policy (in this case, RoleBindings or ClusterRoleBindings) that prevents deletion of resources. The rule is NON_COMPLIANT if the Namespace does not have resource-based policies or has policies without a suitable 'deny' rule for deletion actions (such as delete pods, delete deployments, etc.).",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A3.4.1: Logical access to the cardholder data environment is controlled and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A3.4.1.2",
       "Description": "Checks if Kubernetes pods have public IPs. The rule is NON_COMPLIANT if the pod spec contains a host network configuration with hostNetwork set to true, allowing the pod to use the node's network namespace.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_hostNetwork_containers"
       ],
       "Attributes": [
         {
           "Section": "A3.4.1: Logical access to the cardholder data environment is controlled and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A3.4.1.3",
       "Description": "Checks if Kubernetes Persistent Volume backups are public. The rule is NON_COMPLIANT if any Kubernetes Persistent Volume backups are public.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "A3.4.1: Logical access to the cardholder data environment is controlled and managed.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "A3.4.1.4",
       "Description": "Checks if Kubernetes Persistent Volume (PV) snapshots are not publicly accessible. The rule is NON_COMPLIANT if one or more Persistent Volumes are configured to allow access from all users or unauthorized entities, meaning the snapshots are public.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "A3.4.1: Logical access to the cardholder data environment is controlled and managed.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "A3.4.1.5",
       "Description": "Checks if Kubernetes Pods only have read-only access to their root filesystems. The rule is NON_COMPLIANT if the readOnlyRootFilesystem parameter in the securityContext of a PodSpec is set to 'false'.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_root_containers_admission"
       ],
       "Attributes": [
         {
           "Section": "A3.4.1: Logical access to the cardholder data environment is controlled and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A3.4.1.6",
       "Description": "Checks if Kubernetes Persistent Volume Claims (PVCs) use a defined access mode to enforce a specific root directory for storage. The rule is NON_COMPLIANT if the access mode allows unrestricted access to the entire file system.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "A3.4.1: Logical access to the cardholder data environment is controlled and managed.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "A3.4.1.7",
       "Description": "Checks if Kubernetes Persistent Volume Claims (PVCs) are configured to enforce a specific user identity through security contexts. The rule is NON_COMPLIANT if 'runAsUser' is not defined in the security context or if parameters are provided and there is no match in the corresponding security parameters.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "A3.4.1: Logical access to the cardholder data environment is controlled and managed.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "A3.4.1.8",
       "Description": "Checks if a Kubernetes cluster has network policies that restrict public access. The rule is NON_COMPLIANT if there are network policies allowing traffic from public IPs to any ports other than those specified in the allowed list (e.g., port 22 for SSH).",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_admission_hostport_containers"
       ],
       "Attributes": [
         {
           "Section": "A3.4.1: Logical access to the cardholder data environment is controlled and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A3.4.1.9",
       "Description": "Checks whether Kubernetes namespaces have at least one service account.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_service_account_lookup_true"
       ],
       "Attributes": [
         {
           "Section": "A3.4.1: Logical access to the cardholder data environment is controlled and managed.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A3.4.1.10",
       "Description": "Checks if your Kubernetes service accounts have tokens or access credentials that have not been used within the specified number of days you provided. The rule is NON_COMPLIANT if there are inactive accounts not recently used.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A3.4.1: Logical access to the cardholder data environment is controlled and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A3.4.1.11",
       "Description": "Checks if the Kubernetes Role-Based Access Control (RBAC) permissions for the Service Account attached to the Pod prohibit public access. If the Service Account permissions allow public access, it is NON_COMPLIANT.",
-      "Name": "Kubernetes RBAC",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pod_creation_access"
       ],
       "Attributes": [
         {
           "Section": "A3.4.1: Logical access to the cardholder data environment is controlled and managed.",
-          "Service": "Kubernetes RBAC"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "A3.4.1.12",
       "Description": "Checks if a Kubernetes database (like PostgreSQL or MySQL) snapshot is public. The rule is NON_COMPLIANT if any existing and new database snapshot is public.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A3.4.1: Logical access to the cardholder data environment is controlled and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
@@ -21121,160 +20127,160 @@
     {
       "Id": "A3.4.1.14",
       "Description": "Checks if any Kubernetes Persistent Volume (PV) claims are publicly accessible. The rule is NON_COMPLIANT if any existing and new Kubernetes Persistent Volumes are exposed to the public.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "A3.4.1: Logical access to the cardholder data environment is controlled and managed.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "A3.4.1.15",
       "Description": "Checks if Kubernetes clusters are not publicly accessible. The rule is NON_COMPLIANT if the service is exposed with a LoadBalancer type service in the service configuration.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "A3.4.1: Logical access to the cardholder data environment is controlled and managed.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A3.4.1.16",
       "Description": "Checks if Kubernetes Secrets have confidential data protection settings enabled. The rule is NON_COMPLIANT if confidential data protection settings are not enabled for Kubernetes Secrets.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_no_secrets_envs"
       ],
       "Attributes": [
         {
           "Section": "A3.4.1: Logical access to the cardholder data environment is controlled and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A3.4.1.17",
       "Description": "Checks if the required network policies are configured to restrict public access at the cluster level. The rule is only NON_COMPLIANT when the network policies set below do not match the corresponding rules in the configuration item.",
-      "Name": "Kubernetes Network Policies",
+      "Name": "API Server",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A3.4.1: Logical access to the cardholder data environment is controlled and managed.",
-          "Service": "Kubernetes Network Policies"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A3.4.1.18",
       "Description": "Checks if the necessary network policies and ingress settings are configured for the Kubernetes cluster to ensure proper access management and security. The rule is NON_COMPLIANT if the configuration does not match one or more required settings.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [
         "core_minimize_admission_hostport_containers"
       ],
       "Attributes": [
         {
           "Section": "A3.4.1: Logical access to the cardholder data environment is controlled and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A3.4.1.19",
       "Description": "Checks if Kubernetes services are publicly accessible. The rule is NON_COMPLIANT if a Kubernetes service is not listed in the excludedPublicServices parameter and service type is LoadBalancer or NodePort.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_deny_service_external_ips"
       ],
       "Attributes": [
         {
           "Section": "A3.4.1: Logical access to the cardholder data environment is controlled and managed.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A3.4.1.20",
       "Description": "Checks if the Kubernetes Cluster has MFA Delete equivalent configurations for enhanced security measures on persistent storage. The rule is NON_COMPLIANT if there are no similar restrictions or security policies enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A3.4.1: Logical access to the cardholder data environment is controlled and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A3.4.1.21",
       "Description": "Checks if your Kubernetes Persistent Volumes do not allow public read access. The rule checks the Persistent Volume policies, the access modes, and the role-based access control (RBAC) settings.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "A3.4.1: Logical access to the cardholder data environment is controlled and managed.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "A3.4.1.22",
       "Description": "Checks if your Kubernetes Persistent Volumes (PVs) do not allow public write access. The rule verifies the access modes, resource quotas, and network policies associated with the persistent storage in the cluster.",
-      "Name": "Kubernetes",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_pv_creation_access"
       ],
       "Attributes": [
         {
           "Section": "A3.4.1: Logical access to the cardholder data environment is controlled and managed.",
-          "Service": "Kubernetes"
+          "Service": "RBAC"
         }
       ]
     },
     {
       "Id": "A3.4.1.23",
       "Description": "Checks if direct internet access is disabled for a Kubernetes pod. The rule is NON_COMPLIANT if a pod has access to the internet through an external network policy or if it is deployed in a way that allows external traffic (e.g., using LoadBalancer service type).",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A3.4.1: Logical access to the cardholder data environment is controlled and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A3.4.1.24",
       "Description": "Checks if Kubernetes Secrets have been accessed within a specified number of days. The rule is NON_COMPLIANT if a secret has not been accessed in 'unusedForDays' number of days. The default value is 90 days.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A3.4.1: Logical access to the cardholder data environment is controlled and managed.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A3.4.1.25",
       "Description": "Checks if Kubernetes ConfigMaps created by the namespace are publicly accessible. The rule is NON_COMPLIANT if ConfigMaps with owner 'kube-system' are accessible without proper role-based access control (RBAC) settings.",
-      "Name": "Kubernetes ConfigMap",
+      "Name": "RBAC",
       "Checks": [
         "rbac_minimize_secret_access"
       ],
       "Attributes": [
         {
           "Section": "A3.4.1: Logical access to the cardholder data environment is controlled and managed.",
-          "Service": "Kubernetes ConfigMap"
+          "Service": "RBAC"
         }
       ]
     },
@@ -21293,122 +20299,110 @@
     {
       "Id": "A3.5.1.2",
       "Description": "Checks if your Kubernetes deployments send event notifications to a specified monitoring service like Prometheus or an external alert manager. Optionally checks if specified notification channels (like Slack or email) are configured for alerts. The rule is NON_COMPLIANT if Kubernetes deployments do not send notifications.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A3.5.1: Suspicious events are identified and responded to.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A3.5.1.3",
       "Description": "Checks if Kubernetes alerts (such as Prometheus Alertmanager alerts) have an action configured for firing, pending, or resolved states. Optionally checks if any actions match a named identifier. The rule is NON_COMPLIANT if there is no action specified for the alert or optional parameter.",
-      "Name": "Prometheus",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A3.5.1: Suspicious events are identified and responded to.",
-          "Service": "Prometheus"
-        }
-      ]
-    },
-    {
-      "Id": "A3.5.1.4",
-      "Description": "Checks if a Kubernetes resource type (such as Pods, Deployments, StatefulSets, or PersistentVolumes) has a Prometheus alert for a specified metric. The rule is COMPLIANT if the named metric has a corresponding resource identifier and Prometheus alert.",
-      "Name": "Prometheus",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "A3.5.1: Suspicious events are identified and responded to.",
-          "Service": "Prometheus"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A3.5.1.5",
       "Description": "Checks whether Kubernetes alerts configured via Prometheus have the specified settings for the given metric name.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A3.5.1: Suspicious events are identified and responded to.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A3.5.1.6",
       "Description": "Checks if Kubernetes logging is configured to send logs to a centralized logging system (e.g., Elasticsearch, Fluentd, etc.). The logging is CONCERNED if the logging configuration of the pod does not specify a destination for the logs.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A3.5.1: Suspicious events are identified and responded to.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A3.5.1.7",
       "Description": "Checks if detailed monitoring is enabled for Kubernetes pods. The rule is NON_COMPLIANT if detailed monitoring is not enabled for the pods.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A3.5.1: Suspicious events are identified and responded to.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A3.5.1.8",
       "Description": "Checks if Kubernetes Event Notifications are enabled for a specific resource (e.g., Pod, Deployment). The rule is NON_COMPLIANT if Event Notifications (via a specific service like Kubernetes Events or another notification system) are not set for a resource, or if the type of event or destination does not match the specified event types and destination parameters.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A3.5.1: Suspicious events are identified and responded to.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A3.5.1.9",
       "Description": "Checks if a specific Kubernetes security feature (like Pod Security Policies or Network Policies) is enabled in a Kubernetes cluster. The rule is NON_COMPLIANT if the feature is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "API Server",
       "Checks": [
         "apiserver_security_context_deny_plugin"
       ],
       "Attributes": [
         {
           "Section": "A3.5.1: Suspicious events are identified and responded to.",
-          "Service": "Kubernetes"
+          "Service": "API Server"
         }
       ]
     },
     {
       "Id": "A3.5.1.10",
       "Description": "Checks if Kubernetes Event Logging is enabled for the delivery status of notification messages sent to a specific service for the endpoints. The rule is NON_COMPLIANT if the delivery status notification for messages is not enabled.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A3.5.1: Suspicious events are identified and responded to.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     },
     {
       "Id": "A3.5.1.11",
       "Description": "Checks if the Prometheus monitoring is enabled for Kubernetes deployments. The deployment is NON_COMPLIANT if the 'spec.template.spec.containers[].resources.limits.cpu' or 'spec.template.spec.containers[].resources.limits.memory' fields are not set, indicating that resource limits are not monitored.",
-      "Name": "Kubernetes",
+      "Name": "Core",
       "Checks": [],
       "Attributes": [
         {
           "Section": "A3.5.1: Suspicious events are identified and responded to.",
-          "Service": "Kubernetes"
+          "Service": "Core"
         }
       ]
     }
diff --git a/prowler/providers/microsoft365/lib/mutelist/__init__.py b/prowler/compliance/m365/__init__.py
similarity index 100%
rename from prowler/providers/microsoft365/lib/mutelist/__init__.py
rename to prowler/compliance/m365/__init__.py
diff --git a/prowler/compliance/m365/cis_4.0_m365.json b/prowler/compliance/m365/cis_4.0_m365.json
new file mode 100644
index 0000000000..3a6e11b0bb
--- /dev/null
+++ b/prowler/compliance/m365/cis_4.0_m365.json
@@ -0,0 +1,2792 @@
+{
+  "Framework": "CIS",
+  "Version": "4.0",
+  "Provider": "M365",
+  "Description": "The CIS Microsoft 365 Foundations Benchmark provides prescriptive guidance for establishing a secure configuration posture for Microsoft 365 Cloud offerings running on any OS.",
+  "Requirements": [
+    {
+      "Id": "1.1.1",
+      "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",
+          "SubSection": "1.1 Users",
+          "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 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": "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",
+          "SubSection": "1.1 Users",
+          "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 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": "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",
+          "SubSection": "1.1 Users",
+          "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.",
+          "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": "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": "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",
+          "SubSection": "1.1 Users",
+          "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. 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": "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",
+          "SubSection": "1.2 Teams & groups",
+          "Profile": "E3 Level 2",
+          "AssessmentStatus": "Automated",
+          "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": "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",
+          "SubSection": "1.2 Teams & groups",
+          "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 Microsoft 365 admin center",
+          "SubSection": "1.3 Settings",
+          "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 Microsoft 365 admin center",
+          "SubSection": "1.3 Settings",
+          "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": [
+        "admincenter_external_calendar_sharing_disabled"
+      ],
+      "Attributes": [
+        {
+          "Section": "1 Microsoft 365 admin center",
+          "SubSection": "1.3 Settings",
+          "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 Microsoft 365 admin center",
+          "SubSection": "1.3 Settings",
+          "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 Microsoft 365 admin center",
+          "SubSection": "1.3 Settings",
+          "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": [
+        "admincenter_organization_customer_lockbox_enabled"
+      ],
+      "Attributes": [
+        {
+          "Section": "1 Microsoft 365 admin center",
+          "SubSection": "1.3 Settings",
+          "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 Microsoft 365 admin center",
+          "SubSection": "1.3 Settings",
+          "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 Microsoft 365 admin center",
+          "SubSection": "1.3 Settings",
+          "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 Microsoft 365 Defender",
+          "SubSection": "2.1 Email & collaboration",
+          "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 Microsoft 365 Defender",
+          "SubSection": "2.1 Email & collaboration",
+          "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 Microsoft 365 Defender",
+          "SubSection": "2.1 Email & collaboration",
+          "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 Microsoft 365 Defender",
+          "SubSection": "2.1 Email & collaboration",
+          "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 Microsoft 365 Defender",
+          "SubSection": "2.1 Email & collaboration",
+          "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 Microsoft 365 Defender",
+          "SubSection": "2.1 Email & collaboration",
+          "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 Microsoft 365 Defender",
+          "SubSection": "2.1 Email & collaboration",
+          "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 Microsoft 365 Defender",
+          "SubSection": "2.1 Email & collaboration",
+          "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 Microsoft 365 Defender",
+          "SubSection": "2.1 Email & collaboration",
+          "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 Microsoft 365 Defender",
+          "SubSection": "2.1 Email & collaboration",
+          "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 Microsoft 365 Defender",
+          "SubSection": "2.1 Email & collaboration",
+          "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 Microsoft 365 Defender",
+          "SubSection": "2.1 Email & collaboration",
+          "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 Microsoft 365 Defender",
+          "SubSection": "2.1 Email & collaboration",
+          "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 Microsoft 365 Defender",
+          "SubSection": "2.1 Email & collaboration",
+          "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 Microsoft 365 Defender",
+          "SubSection": "2.4 System",
+          "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 Microsoft 365 Defender",
+          "SubSection": "2.4 System",
+          "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 Microsoft 365 Defender",
+          "SubSection": "2.4 System",
+          "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 Microsoft 365 Defender",
+          "SubSection": "2.4 System",
+          "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 Microsoft Purview",
+          "SubSection": "3.1 Audit",
+          "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 Microsoft Purview",
+          "SubSection": "3.1 Audit",
+          "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 Microsoft Purview",
+          "SubSection": "3.1 Audit",
+          "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 Microsoft Purview",
+          "SubSection": "3.3 Information protection",
+          "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 Microsoft Entra admin center",
+          "SubSection": "5.1 Identity",
+          "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 Microsoft Entra admin center",
+          "SubSection": "5.1 Identity",
+          "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 Microsoft Entra admin center",
+          "SubSection": "5.1 Identity",
+          "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 Microsoft Entra admin center",
+          "SubSection": "5.1 Identity",
+          "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 Microsoft Entra admin center",
+          "SubSection": "5.1 Identity",
+          "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 Microsoft Entra admin center",
+          "SubSection": "5.1 Identity",
+          "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 Microsoft Entra admin center",
+          "SubSection": "5.1 Identity",
+          "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 Microsoft Entra admin center",
+          "SubSection": "5.1 Identity",
+          "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 Microsoft Entra admin center",
+          "SubSection": "5.1 Identity",
+          "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 Microsoft Entra admin center",
+          "SubSection": "5.1 Identity",
+          "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 Microsoft Entra admin center",
+          "SubSection": "5.1 Identity",
+          "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 Microsoft Entra admin center",
+          "SubSection": "5.1 Identity",
+          "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 Microsoft Entra admin center",
+          "SubSection": "5.1 Identity",
+          "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 Microsoft Entra admin center",
+          "SubSection": "5.1 Identity",
+          "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 Microsoft Entra admin center",
+          "SubSection": "5.2 Protection",
+          "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 Microsoft Entra admin center",
+          "SubSection": "5.2 Protection",
+          "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 Microsoft Entra admin center",
+          "SubSection": "5.2 Protection",
+          "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 Microsoft Entra admin center",
+          "SubSection": "5.2 Protection",
+          "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 Microsoft Entra admin center",
+          "SubSection": "5.2 Protection",
+          "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 Microsoft Entra admin center",
+          "SubSection": "5.2 Protection",
+          "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 Microsoft Entra admin center",
+          "SubSection": "5.2 Protection",
+          "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 Microsoft Entra admin center",
+          "SubSection": "5.2 Protection",
+          "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 Microsoft Entra admin center",
+          "SubSection": "5.2 Protection",
+          "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 Microsoft Entra admin center",
+          "SubSection": "5.2 Protection",
+          "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 Microsoft Entra admin center",
+          "SubSection": "5.2 Protection",
+          "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 Microsoft Entra admin center",
+          "SubSection": "5.2 Protection",
+          "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 Microsoft Entra admin center",
+          "SubSection": "5.2 Protection",
+          "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 Microsoft Entra admin center",
+          "SubSection": "5.2 Protection",
+          "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": [
+        "entra_users_mfa_capable"
+      ],
+      "Attributes": [
+        {
+          "Section": "5 Microsoft Entra admin center",
+          "SubSection": "5.2 Protection",
+          "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 Microsoft Entra admin center",
+          "SubSection": "5.2 Protection",
+          "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 Microsoft Entra admin center",
+          "SubSection": "5.2 Protection",
+          "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 Microsoft Entra admin center",
+          "SubSection": "5.3 Identity Governance",
+          "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 Microsoft Entra admin center",
+          "SubSection": "5.3 Identity Governance",
+          "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 Microsoft Entra admin center",
+          "SubSection": "5.3 Identity Governance",
+          "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 Microsoft Entra admin center",
+          "SubSection": "5.3 Identity Governance",
+          "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 Exchange admin center",
+          "SubSection": "6.1 Audit",
+          "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 Exchange admin center",
+          "SubSection": "6.1 Audit",
+          "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 Exchange admin center",
+          "SubSection": "6.1 Audit",
+          "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 Exchange admin center",
+          "SubSection": "6.1 Audit",
+          "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 Exchange admin center",
+          "SubSection": "6.2 Mail Flow",
+          "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 Exchange admin center",
+          "SubSection": "6.2 Mail Flow",
+          "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 Exchange admin center",
+          "SubSection": "6.2 Mail Flow",
+          "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 Exchange admin center",
+          "SubSection": "6.3 Roles",
+          "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 Exchange admin center",
+          "SubSection": "6.5 Settings",
+          "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 Exchange admin center",
+          "SubSection": "6.5 Settings",
+          "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 Exchange admin center",
+          "SubSection": "6.5 Settings",
+          "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 Exchange admin center",
+          "SubSection": "6.5 Settings",
+          "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 SharePoint admin center",
+          "SubSection": "7.2 Policies",
+          "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 SharePoint admin center",
+          "SubSection": "7.2 Policies",
+          "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 SharePoint admin center",
+          "SubSection": "7.2 Policies",
+          "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 SharePoint admin center",
+          "SubSection": "7.2 Policies",
+          "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 SharePoint admin center",
+          "SubSection": "7.2 Policies",
+          "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 SharePoint admin center",
+          "SubSection": "7.2 Policies",
+          "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 SharePoint admin center",
+          "SubSection": "7.2 Policies",
+          "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 SharePoint admin center",
+          "SubSection": "7.2 Policies",
+          "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 SharePoint admin center",
+          "SubSection": "7.2 Policies",
+          "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 SharePoint admin center",
+          "SubSection": "7.2 Policies",
+          "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 SharePoint admin center",
+          "SubSection": "7.2 Policies",
+          "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 SharePoint admin center",
+          "SubSection": "7.3 Settings",
+          "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 SharePoint admin center",
+          "SubSection": "7.3 Settings",
+          "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 SharePoint admin center",
+          "SubSection": "7.3 Settings",
+          "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 SharePoint admin center",
+          "SubSection": "7.3 Settings",
+          "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 Microsoft Teams admin center",
+          "SubSection": "8.1 Teams",
+          "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 Microsoft Teams admin center",
+          "SubSection": "8.1 Teams",
+          "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 Microsoft Teams admin center",
+          "SubSection": "8.2 Users",
+          "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 Microsoft Teams admin center",
+          "SubSection": "8.2 Users",
+          "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 Microsoft Teams admin center",
+          "SubSection": "8.2 Users",
+          "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 Microsoft Teams admin center",
+          "SubSection": "8.2 Users",
+          "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 Microsoft Teams admin center",
+          "SubSection": "8.4 Teams apps",
+          "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 Microsoft Teams admin center",
+          "SubSection": "8.5 Meetings",
+          "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 Microsoft Teams admin center",
+          "SubSection": "8.5 Meetings",
+          "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 Microsoft Teams admin center",
+          "SubSection": "8.5 Meetings",
+          "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 Microsoft Teams admin center",
+          "SubSection": "8.5 Meetings",
+          "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 Microsoft Teams admin center",
+          "SubSection": "8.5 Meetings",
+          "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 Microsoft Teams admin center",
+          "SubSection": "8.5 Meetings",
+          "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 Microsoft Teams admin center",
+          "SubSection": "8.5 Meetings",
+          "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 Microsoft Teams admin center",
+          "SubSection": "8.5 Meetings",
+          "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 Microsoft Teams admin center",
+          "SubSection": "8.5 Meetings",
+          "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 Microsoft Teams admin center",
+          "SubSection": "8.6 Messaging",
+          "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 Microsoft Fabric",
+          "SubSection": "9.1 Teams settings",
+          "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 Microsoft Fabric",
+          "SubSection": "9.1 Teams settings",
+          "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 Microsoft Fabric",
+          "SubSection": "9.1 Teams settings",
+          "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 Microsoft Fabric",
+          "SubSection": "9.1 Teams settings",
+          "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 Microsoft Fabric",
+          "SubSection": "9.1 Teams settings",
+          "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 Microsoft Fabric",
+          "SubSection": "9.1 Teams settings",
+          "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 Microsoft Fabric",
+          "SubSection": "9.1 Teams settings",
+          "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 Microsoft Fabric",
+          "SubSection": "9.1 Teams settings",
+          "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 Microsoft Fabric",
+          "SubSection": "9.1 Teams settings",
+          "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 Microsoft Fabric",
+          "SubSection": "9.1 Teams settings",
+          "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 Microsoft Fabric",
+          "SubSection": "9.1 Teams settings",
+          "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/compliance/microsoft365/cis_4.0_microsoft365.json b/prowler/compliance/microsoft365/cis_4.0_microsoft365.json
deleted file mode 100644
index ca26b4a467..0000000000
--- a/prowler/compliance/microsoft365/cis_4.0_microsoft365.json
+++ /dev/null
@@ -1,134 +0,0 @@
-{
-  "Framework": "CIS",
-  "Version": "4.0",
-  "Provider": "Microsoft365",
-  "Description": "The CIS Microsoft 365 Foundations Benchmark provides prescriptive guidance for establishing a secure configuration posture for Microsoft 365 Cloud offerings running on any OS.",
-  "Requirements": [
-    {
-      "Id": "1.1.1",
-      "Description": "Ensure Administrative accounts are cloud-only",
-      "Checks": [],
-      "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.",
-          "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"
-        }
-      ]
-    },
-    {
-      "Id": "1.1.2",
-      "Description": "Ensure two emergency access accounts have been defined",
-      "Checks": [],
-      "Attributes": [
-        {
-          "Section": "1.Microsoft 365 admin center",
-          "Profile": "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."
-        }
-      ]
-    },
-    {
-      "Id": "1.1.3",
-      "Description": "Ensure that between two and four global admins are designated",
-      "Checks": [
-        "admincenter_users_between_two_and_four_global_admins"
-      ],
-      "Attributes": [
-        {
-          "Section": "1.Microsoft 365 admin center",
-          "Profile": "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.",
-          "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"
-        }
-      ]
-    },
-    {
-      "Id": "1.1.4",
-      "Description": "Ensure administrative accounts use licenses with a reduced application footprint",
-      "Checks": [
-        "admincenter_users_admins_reduced_license_footprint"
-      ],
-      "Attributes": [
-        {
-          "Section": "1.Microsoft 365 admin center",
-          "Profile": "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."
-        }
-      ]
-    },
-    {
-      "Id": "1.2.1",
-      "Description": "Ensure that only organizationally managed/approved public groups exist",
-      "Checks": [
-        "admincenter_groups_not_public_visibility"
-      ],
-      "Attributes": [
-        {
-          "Section": "1.Microsoft 365 admin center",
-          "Profile": "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."
-        }
-      ]
-    },
-    {
-      "Id": "1.2.2",
-      "Description": "Ensure sign-in to shared mailboxes is blocked",
-      "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."
-        }
-      ]
-    }
-  ]
-}
diff --git a/prowler/providers/microsoft365/lib/regions/__init__.py b/prowler/compliance/nhn/__init__.py
similarity index 100%
rename from prowler/providers/microsoft365/lib/regions/__init__.py
rename to prowler/compliance/nhn/__init__.py
diff --git a/prowler/compliance/nhn/iso27001_2022_nhn.json b/prowler/compliance/nhn/iso27001_2022_nhn.json
new file mode 100644
index 0000000000..d825981469
--- /dev/null
+++ b/prowler/compliance/nhn/iso27001_2022_nhn.json
@@ -0,0 +1,1313 @@
+{
+  "Framework": "ISO27001",
+  "Version": "2022",
+  "Provider": "NHN",
+  "Description": "ISO (the International Organization for Standardization) and IEC (the International Electrotechnical Commission) form the specialized system for worldwide standardization. National bodies that are members of ISO or IEC participate in the development of International Standards through technical committees established by the respective organization to deal with particular fields of technical activity. ISO and IEC technical committees collaborate in fields of mutual interest. Other international organizations, governmental and non-governmental, in liaison with ISO and IEC, also take part in the work.",
+  "Requirements": [
+    {
+      "Id": "A.5.1",
+      "Description": "Information security policy and topic-specific policies should be defined, approved by management, published, communicated to and acknowledged by relevant personnel and relevant interested parties, and reviewed at planned intervals and if significant changes occur.",
+      "Name": "Policies for information security",
+      "Attributes": [
+        {
+          "Category": "A.5 Organizational controls",
+          "Objetive_ID": "A.5.1",
+          "Objetive_Name": "Policies for information security",
+          "Check_Summary": "Information security policy and topic-specific policies should be defined, approved by management, published, communicated to and acknowledged by relevant personnel and relevant interested parties, and reviewed at planned intervals and if significant changes occur."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.5.2",
+      "Description": "Information security roles and responsibilities should be defined and allocated according to the organisation needs.",
+      "Name": "Roles and Responsibilities",
+      "Attributes": [
+        {
+          "Category": "A.5 Organizational controls",
+          "Objetive_ID": "A.5.2",
+          "Objetive_Name": "Roles and Responsibilities",
+          "Check_Summary": "Information security roles and responsibilities should be defined and allocated according to the organisation needs."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.5.3",
+      "Description": "Conflicting duties and conflicting areas of responsibility should be segregated.",
+      "Name": "Segregation of Duties",
+      "Attributes": [
+        {
+          "Category": "A.5 Organizational controls",
+          "Objetive_ID": "A.5.3",
+          "Objetive_Name": "Segregation of Duties",
+          "Check_Summary": "Conflicting duties and conflicting areas of responsibility should be segregated."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.5.4",
+      "Description": "Management should require all personnel to apply information security in accordance with the established information security policy, topic-specific policies and procedures of the organization.",
+      "Name": "Management Responsibilities",
+      "Attributes": [
+        {
+          "Category": "A.5 Organizational controls",
+          "Objetive_ID": "A.5.4",
+          "Objetive_Name": "Management Responsibilities",
+          "Check_Summary": "Management should require all personnel to apply information security in accordance with the established information security policy, topic-specific policies and procedures of the organization."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.5.5",
+      "Description": "The organisation should establish and maintain contact with relevant authorities.",
+      "Name": "Contact With Authorities",
+      "Attributes": [
+        {
+          "Category": "A.5 Organizational controls",
+          "Objetive_ID": "A.5.5",
+          "Objetive_Name": "Contact With Authorities",
+          "Check_Summary": "The organisation should establish and maintain contact with relevant authorities."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.5.6",
+      "Description": "The organisation should establish and maintain contact with special interest groups or other specialist security forums and professional associations.",
+      "Name": "Contact With Special Interest Groups",
+      "Attributes": [
+        {
+          "Category": "A.5 Organizational controls",
+          "Objetive_ID": "A.5.6",
+          "Objetive_Name": "Contact With Special Interest Groups",
+          "Check_Summary": "The organisation should establish and maintain contact with special interest groups or other specialist security forums and professional associations."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.5.7",
+      "Description": "Information relating to information security threats should be collected and analysed to produce threat intelligence.",
+      "Name": "Threat Intelligence",
+      "Attributes": [
+        {
+          "Category": "A.5 Organizational controls",
+          "Objetive_ID": "A.5.7",
+          "Objetive_Name": "Threat Intelligence",
+          "Check_Summary": "Information relating to information security threats should be collected and analysed to produce threat intelligence."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.5.8",
+      "Description": "Information security should be integrated into project management.",
+      "Name": "Information Security In Project Management",
+      "Attributes": [
+        {
+          "Category": "A.5 Organizational controls",
+          "Objetive_ID": "A.5.8",
+          "Objetive_Name": "Information Security In Project Management",
+          "Check_Summary": "Information security should be integrated into project management."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.5.9",
+      "Description": "An inventory of information and other associated assets, including owners, should be developed and maintained.",
+      "Name": "Inventory Of Information And Other Associated Assets",
+      "Attributes": [
+        {
+          "Category": "A.5 Organizational controls",
+          "Objetive_ID": "A.5.9",
+          "Objetive_Name": "Inventory Of Information And Other Associated Assets",
+          "Check_Summary": "An inventory of information and other associated assets, including owners, should be developed and maintained."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.5.10",
+      "Description": "Rules for the acceptable use and procedures for handling information and other associated assets should be identified, documented and implemented.",
+      "Name": "Acceptable Use Of Information And Other Associated Assets",
+      "Attributes": [
+        {
+          "Category": "A.5 Organizational controls",
+          "Objetive_ID": "A.5.10",
+          "Objetive_Name": "Acceptable Use Of Information And Other Associated Assets",
+          "Check_Summary": "Rules for the acceptable use and procedures for handling information and other associated assets should be identified, documented and implemented."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.5.11",
+      "Description": "Personnel and other interested parties as appropriate should return all the organisationโ€™s assets in their possession upon change or termination of their employment, contract or agreement.",
+      "Name": "Return Of Assets",
+      "Attributes": [
+        {
+          "Category": "A.5 Organizational controls",
+          "Objetive_ID": "A.5.11",
+          "Objetive_Name": "Return Of Assets",
+          "Check_Summary": "Personnel and other interested parties as appropriate should return all the organisationโ€™s assets in their possession upon change or termination of their employment, contract or agreement."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.5.12",
+      "Description": "Information should be classified according to the information security needs of the organisation based on confidentiality, integrity, availability and relevant interested party requirements.",
+      "Name": "Classification Of Information",
+      "Attributes": [
+        {
+          "Category": "A.5 Organizational controls",
+          "Objetive_ID": "A.5.12",
+          "Objetive_Name": "Classification Of Information",
+          "Check_Summary": "Information should be classified according to the information security needs of the organisation based on confidentiality, integrity, availability and relevant interested party requirements."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.5.13",
+      "Description": "An appropriate set of procedures for information labelling should be developed and implemented in accordance with the information classification scheme adopted by the organisation.",
+      "Name": "Labelling Of Information",
+      "Attributes": [
+        {
+          "Category": "A.5 Organizational controls",
+          "Objetive_ID": "A.5.13",
+          "Objetive_Name": "Labelling Of Information",
+          "Check_Summary": "An appropriate set of procedures for information labelling should be developed and implemented in accordance with the information classification scheme adopted by the organisation."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.5.14",
+      "Description": "Information transfer rules, procedures, or agreements should be in place for all types of transfer facilities within the organisation and between the organisation and other parties.",
+      "Name": "Information Transfer",
+      "Attributes": [
+        {
+          "Category": "A.5 Organizational controls",
+          "Objetive_ID": "A.5.14",
+          "Objetive_Name": "Information Transfer",
+          "Check_Summary": "Information transfer rules, procedures, or agreements should be in place for all types of transfer facilities within the organisation and between the organisation and other parties."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.5.15",
+      "Description": "Rules to control physical and logical access to information and other associated assets should be established",
+      "Name": "Access Control",
+      "Attributes": [
+        {
+          "Category": "A.5 Organizational controls",
+          "Objetive_ID": "A.5.15",
+          "Objetive_Name": "Access Control",
+          "Check_Summary": "Rules to control physical and logical access to information and other associated assets should be established"
+        }
+      ],
+      "Checks": [
+        "compute_instance_login_user"
+      ]
+    },
+    {
+      "Id": "A.5.16",
+      "Description": "The full lifecycle of identities should be managed.",
+      "Name": "Identity Management",
+      "Attributes": [
+        {
+          "Category": "A.5 Organizational controls",
+          "Objetive_ID": "A.5.16",
+          "Objetive_Name": "Identity Management",
+          "Check_Summary": "The full lifecycle of identities should be managed."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.5.17",
+      "Description": "Allocation and management of authentication information should be controlled by a management process, including advising personnel on the appropriate handling of authentication information.",
+      "Name": "Authentication Information",
+      "Attributes": [
+        {
+          "Category": "A.5 Organizational controls",
+          "Objetive_ID": "A.5.17",
+          "Objetive_Name": "Authentication Information",
+          "Check_Summary": "Allocation and management of authentication information should be controlled by a management process, including advising personnel on the appropriate handling of authentication information."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.5.18",
+      "Description": "Access rights to information and other associated assets should be provisioned, reviewed, modified and removed in accordance with the organisationโ€™s topic-specific policy on and rules for access control.",
+      "Name": "Access Rights",
+      "Attributes": [
+        {
+          "Category": "A.5 Organizational controls",
+          "Objetive_ID": "A.5.18",
+          "Objetive_Name": "Access Rights",
+          "Check_Summary": "Access rights to information and other associated assets should be provisioned, reviewed, modified and removed in accordance with the organisationโ€™s topic-specific policy on and rules for access control."
+        }
+      ],
+      "Checks": [
+        "compute_instance_login_user"
+      ]
+    },
+    {
+      "Id": "A.5.19",
+      "Description": "Processes and procedures should be defined and implemented to manage the information security risks associated with the use of supplierโ€™s products or services.",
+      "Name": "Information Security In Supplier Relationships",
+      "Attributes": [
+        {
+          "Category": "A.5 Organizational controls",
+          "Objetive_ID": "A.5.19",
+          "Objetive_Name": "Information Security In Supplier Relationships",
+          "Check_Summary": "Processes and procedures should be defined and implemented to manage the information security risks associated with the use of supplierโ€™s products or services."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.5.20",
+      "Description": "Relevant information security requirements should be established and agreed with each supplier based on the type of supplier relationship.",
+      "Name": "Addressing Information Security Within Supplier Agreements",
+      "Attributes": [
+        {
+          "Category": "A.5 Organizational controls",
+          "Objetive_ID": "A.5.20",
+          "Objetive_Name": "Addressing Information Security Within Supplier Agreements",
+          "Check_Summary": "Relevant information security requirements should be established and agreed with each supplier based on the type of supplier relationship."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.5.21",
+      "Description": "Processes and procedures should be defined and implemented to manage the information security risks associated with the ICT products and services supply chain.",
+      "Name": "Managing Information Security In The ICT Supply Chain",
+      "Attributes": [
+        {
+          "Category": "A.5 Organizational controls",
+          "Objetive_ID": "A.5.21",
+          "Objetive_Name": "Managing Information Security In The ICT Supply Chain",
+          "Check_Summary": "Processes and procedures should be defined and implemented to manage the information security risks associated with the ICT products and services supply chain."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.5.22",
+      "Description": "The organisation should regularly monitor, review, evaluate and manage change in supplier information security practices and service delivery.",
+      "Name": "Monitor, Review And Change Management Of Supplier Services",
+      "Attributes": [
+        {
+          "Category": "A.5 Organizational controls",
+          "Objetive_ID": "A.5.22",
+          "Objetive_Name": "Monitor, Review And Change Management Of Supplier Services",
+          "Check_Summary": "The organisation should regularly monitor, review, evaluate and manage change in supplier information security practices and service delivery."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.5.23",
+      "Description": "Processes for acquisition, use, management and exit from cloud services should be established in accordance with the organisationโ€™s information security requirements.",
+      "Name": "Information Security For Use Of Cloud Services",
+      "Attributes": [
+        {
+          "Category": "A.5 Organizational controls",
+          "Objetive_ID": "A.5.23",
+          "Objetive_Name": "Information Security For Use Of Cloud Services",
+          "Check_Summary": "Processes for acquisition, use, management and exit from cloud services should be established in accordance with the organisationโ€™s information security requirements."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.5.24",
+      "Description": "The organization should plan and prepare for managing information security incidents by defining, establishing and communicating information security incident management processes, roles and responsibilities.",
+      "Name": "Information Security Incident Management Planning and Preparation",
+      "Attributes": [
+        {
+          "Category": "A.5 Organizational controls",
+          "Objetive_ID": "A.5.24",
+          "Objetive_Name": "Information Security Incident Management Planning and Preparation",
+          "Check_Summary": "The organization should plan and prepare for managing information security incidents by defining, establishing and communicating information security incident management processes, roles and responsibilities."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.5.25",
+      "Description": "The organisation should assess information security events and decide if they are to be categorised as information security incidents.",
+      "Name": "Assessment And Decision On Information Security Events",
+      "Attributes": [
+        {
+          "Category": "A.5 Organizational controls",
+          "Objetive_ID": "A.5.25",
+          "Objetive_Name": "Assessment And Decision On Information Security Events",
+          "Check_Summary": "The organisation should assess information security events and decide if they are to be categorised as information security incidents."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.5.26",
+      "Description": "Information security incidents should be responded to in accordance with the documented procedures.",
+      "Name": "Response To Information Security Incidents",
+      "Attributes": [
+        {
+          "Category": "A.5 Organizational controls",
+          "Objetive_ID": "A.5.26",
+          "Objetive_Name": "Response To Information Security Incidents",
+          "Check_Summary": "Information security incidents should be responded to in accordance with the documented procedures."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.5.27",
+      "Description": "Knowledge gained from information security incidents should be used to strengthen and improve the information security controls.",
+      "Name": "Learning From Information Security Incidents",
+      "Attributes": [
+        {
+          "Category": "A.5 Organizational controls",
+          "Objetive_ID": "A.5.27",
+          "Objetive_Name": "Learning From Information Security Incidents",
+          "Check_Summary": "Knowledge gained from information security incidents should be used to strengthen and improve the information security controls."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.5.28",
+      "Description": "The organisation should establish and implement procedures for the identification, collection, acquisition and preservation of evidence related to information security events.",
+      "Name": "Collection Of Evidence",
+      "Attributes": [
+        {
+          "Category": "A.5 Organizational controls",
+          "Objetive_ID": "A.5.28",
+          "Objetive_Name": "Collection Of Evidence",
+          "Check_Summary": "The organisation should establish and implement procedures for the identification, collection, acquisition and preservation of evidence related to information security events."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.5.29",
+      "Description": "The organisation should plan how to maintain information security at an appropriate level during disruption.",
+      "Name": "Information Security During Disruption",
+      "Attributes": [
+        {
+          "Category": "A.5 Organizational controls",
+          "Objetive_ID": "A.5.29",
+          "Objetive_Name": "Information Security During Disruption",
+          "Check_Summary": "The organisation should plan how to maintain information security at an appropriate level during disruption."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.5.30",
+      "Description": "ICT readiness should be planned, implemented, maintained and tested based on business continuity objectives and ICT continuity requirements. ",
+      "Name": "Readiness For Business Continuity",
+      "Attributes": [
+        {
+          "Category": "A.5 Organizational controls",
+          "Objetive_ID": "A.5.30",
+          "Objetive_Name": "Readiness For Business Continuity",
+          "Check_Summary": "ICT readiness should be planned, implemented, maintained and tested based on business continuity objectives and ICT continuity requirements. "
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.5.31",
+      "Description": "Legal, statutory, regulatory and contractual requirements relevant to information security and the organisations approach to meet these requirements should be identified, documented and kept up to date. ",
+      "Name": "Legal, statutory, regulatory and contractual requirements",
+      "Attributes": [
+        {
+          "Category": "A.5 Organizational controls",
+          "Objetive_ID": "A.5.31",
+          "Objetive_Name": "Legal, statutory, regulatory and contractual requirements",
+          "Check_Summary": "Legal, statutory, regulatory and contractual requirements relevant to information security and the organisations approach to meet these requirements should be identified, documented and kept up to date. "
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.5.32",
+      "Description": "The organisation should implement appropriate procedures to protect intellectual property rights.  ",
+      "Name": "Intellectual Property Rights",
+      "Attributes": [
+        {
+          "Category": "A.5 Organizational controls",
+          "Objetive_ID": "A.5.32",
+          "Objetive_Name": "Intellectual Property Rights",
+          "Check_Summary": "The organisation should implement appropriate procedures to protect intellectual property rights.  "
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.5.33",
+      "Description": "Records should be protected from loss, destruction, falsification, unauthorised access and unauthorised release.",
+      "Name": "Protection Of Records",
+      "Attributes": [
+        {
+          "Category": "A.5 Organizational controls",
+          "Objetive_ID": "A.5.33",
+          "Objetive_Name": "Protection Of Records",
+          "Check_Summary": "Records should be protected from loss, destruction, falsification, unauthorised access and unauthorised release."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.5.34",
+      "Description": "The organisation should identify and meet the requirements regarding the preservation of privacy and protection of PII according to applicable laws and regulations and contractual requirements.",
+      "Name": "Privacy And Protection Of PII",
+      "Attributes": [
+        {
+          "Category": "A.5 Organizational controls",
+          "Objetive_ID": "A.5.34",
+          "Objetive_Name": "Privacy And Protection Of PII",
+          "Check_Summary": "The organisation should identify and meet the requirements regarding the preservation of privacy and protection of PII according to applicable laws and regulations and contractual requirements."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.5.35",
+      "Description": "The organisations approach to managing information security and its implementation including people, processes and technologies should be reviewed independently at planned intervals, or when significant changes occur. ",
+      "Name": "Independent Review Of Information Security",
+      "Attributes": [
+        {
+          "Category": "A.5 Organizational controls",
+          "Objetive_ID": "A.5.35",
+          "Objetive_Name": "Independent Review Of Information Security",
+          "Check_Summary": "The organisations approach to managing information security and its implementation including people, processes and technologies should be reviewed independently at planned intervals, or when significant changes occur. "
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.5.36",
+      "Description": "Compliance with the organisations information security policy, topic-specific policies, rules and standards should be regularly reviewed. ",
+      "Name": "Compliance With Policies, Rules And Standards For Information Security",
+      "Attributes": [
+        {
+          "Category": "A.5 Organizational controls",
+          "Objetive_ID": "A.5.36",
+          "Objetive_Name": "Compliance With Policies, Rules And Standards For Information Security",
+          "Check_Summary": "Compliance with the organisations information security policy, topic-specific policies, rules and standards should be regularly reviewed. "
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.5.37",
+      "Description": "Operating procedures for information processing facilities should be documented and made available to personnel who need them. ",
+      "Name": "Documented Operating Procedures",
+      "Attributes": [
+        {
+          "Category": "A.5 Organizational controls",
+          "Objetive_ID": "A.5.37",
+          "Objetive_Name": "Documented Operating Procedures",
+          "Check_Summary": "Operating procedures for information processing facilities should be documented and made available to personnel who need them. "
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.6.1",
+      "Description": "Background verification checks on all candidates to become personnel should be carried out prior to joining the organisation and on an ongoing basis taking into consideration applicable laws, regulations and ethics and be proportional to the business requirements, the classification of the information to be accessed and the perceived risks. ",
+      "Name": "Screening",
+      "Attributes": [
+        {
+          "Category": "A.6 People controls",
+          "Objetive_ID": "A.6.1",
+          "Objetive_Name": "Screening",
+          "Check_Summary": "Background verification checks on all candidates to become personnel should be carried out prior to joining the organisation and on an ongoing basis taking into consideration applicable laws, regulations and ethics and be proportional to the business requirements, the classification of the information to be accessed and the perceived risks. "
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.6.2",
+      "Description": "The employment contractual agreements should state the personnelโ€™s and the organisations responsibilities for information security. ",
+      "Name": "Terms and Conditions Of Employment",
+      "Attributes": [
+        {
+          "Category": "A.6 People controls",
+          "Objetive_ID": "A.6.2",
+          "Objetive_Name": "Terms and Conditions Of Employment",
+          "Check_Summary": "The employment contractual agreements should state the personnelโ€™s and the organisations responsibilities for information security. "
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.6.3",
+      "Description": "Personnel of the organisation and relevant interested parties should receive appropriate information security awareness, education and training and regular updates of the organisations information security policy, topic-specific policies and procedures, as relevant for their job function.",
+      "Name": "Information Security Awareness, Education And Training",
+      "Attributes": [
+        {
+          "Category": "A.6 People controls",
+          "Objetive_ID": "A.6.3",
+          "Objetive_Name": "Information Security Awareness, Education And Training",
+          "Check_Summary": "Personnel of the organisation and relevant interested parties should receive appropriate information security awareness, education and training and regular updates of the organisations information security policy, topic-specific policies and procedures, as relevant for their job function."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.6.4",
+      "Description": "A disciplinary process should be formalised and communicated to take actions against personnel and other relevant interested parties who have committed an information security policy violation.",
+      "Name": "Disciplinary Process",
+      "Attributes": [
+        {
+          "Category": "A.6 People controls",
+          "Objetive_ID": "A.6.4",
+          "Objetive_Name": "Disciplinary Process",
+          "Check_Summary": "A disciplinary process should be formalised and communicated to take actions against personnel and other relevant interested parties who have committed an information security policy violation."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.6.5",
+      "Description": "Information security responsibilities and duties that remain valid after termination or change of employment should be defined, enforced and communicated to relevant personnel and other interested parties.",
+      "Name": "Responsibilities After Termination Or Change Of Employment",
+      "Attributes": [
+        {
+          "Category": "A.6 People controls",
+          "Objetive_ID": "A.6.5",
+          "Objetive_Name": "Responsibilities After Termination Or Change Of Employment",
+          "Check_Summary": "Information security responsibilities and duties that remain valid after termination or change of employment should be defined, enforced and communicated to relevant personnel and other interested parties."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.6.6",
+      "Description": "Confidentiality or non-disclosure agreements reflecting the organisationโ€™s needs for the protection of information should be identified, documented, regularly reviewed and signed by personnel and other relevant interested parties.",
+      "Name": "Confidentiality Or Non-Disclosure Agreements",
+      "Attributes": [
+        {
+          "Category": "A.6 People controls",
+          "Objetive_ID": "A.6.6",
+          "Objetive_Name": "Confidentiality Or Non-Disclosure Agreements",
+          "Check_Summary": "Confidentiality or non-disclosure agreements reflecting the organisationโ€™s needs for the protection of information should be identified, documented, regularly reviewed and signed by personnel and other relevant interested parties."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.6.7",
+      "Description": "Security measures should be implemented when personnel are working remotely to protect information accessed, processed or stored outside the organisationโ€™s premises.",
+      "Name": "Remote Working",
+      "Attributes": [
+        {
+          "Category": "A.6 People controls",
+          "Objetive_ID": "A.6.7",
+          "Objetive_Name": "Remote Working",
+          "Check_Summary": "Security measures should be implemented when personnel are working remotely to protect information accessed, processed or stored outside the organisationโ€™s premises."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.6.8",
+      "Description": "The organisation should provide a mechanism for personnel to report observed or suspected information security events through appropriate channels in a timely manner.",
+      "Name": "Information Security Event Reporting",
+      "Attributes": [
+        {
+          "Category": "A.6 People controls",
+          "Objetive_ID": "A.6.8",
+          "Objetive_Name": "Information Security Event Reporting",
+          "Check_Summary": "The organisation should provide a mechanism for personnel to report observed or suspected information security events through appropriate channels in a timely manner."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.7.1",
+      "Description": "To prevent unauthorised physical access, damage and interference to the organisations information and other associated assets.",
+      "Name": "Physical Security Perimeters",
+      "Attributes": [
+        {
+          "Category": "A.7 Physical controls",
+          "Objetive_ID": "A.7.1",
+          "Objetive_Name": "Physical Security Perimeters",
+          "Check_Summary": "To prevent unauthorised physical access, damage and interference to the organisations information and other associated assets."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.7.2",
+      "Description": "Secure areas should be protected by appropriate entry controls and access points.",
+      "Name": "Physical Entry",
+      "Attributes": [
+        {
+          "Category": "A.7 Physical controls",
+          "Objetive_ID": "A.7.2",
+          "Objetive_Name": "Physical Entry",
+          "Check_Summary": "Secure areas should be protected by appropriate entry controls and access points."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.7.3",
+      "Description": "Physical security for offices, rooms and facilities should be designed and implemented.",
+      "Name": "Securing Offices, Rooms And Facilities",
+      "Attributes": [
+        {
+          "Category": "A.7 Physical controls",
+          "Objetive_ID": "A.7.3",
+          "Objetive_Name": "Securing Offices, Rooms And Facilities",
+          "Check_Summary": "Physical security for offices, rooms and facilities should be designed and implemented."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.7.4",
+      "Description": "Premises should be continuously monitored for unauthorised physical access.",
+      "Name": "Physical Security Monitoring",
+      "Attributes": [
+        {
+          "Category": "A.7 Physical controls",
+          "Objetive_ID": "A.7.4",
+          "Objetive_Name": "Physical Security Monitoring",
+          "Check_Summary": "Premises should be continuously monitored for unauthorised physical access."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.7.5",
+      "Description": "Protection against physical and environmental threats, such as natural disasters and other intentional or unintentional physical threats to infrastructure should be designed and implemented.",
+      "Name": "Protecting Against Physical and Environmental Threats",
+      "Attributes": [
+        {
+          "Category": "A.7 Physical controls",
+          "Objetive_ID": "A.7.5",
+          "Objetive_Name": "Protecting Against Physical and Environmental Threats",
+          "Check_Summary": "Protection against physical and environmental threats, such as natural disasters and other intentional or unintentional physical threats to infrastructure should be designed and implemented."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.7.6",
+      "Description": "Security measures for working in secure areas should be designed and implemented.",
+      "Name": "Working In Secure Areas",
+      "Attributes": [
+        {
+          "Category": "A.7 Physical controls",
+          "Objetive_ID": "A.7.6",
+          "Objetive_Name": "Working In Secure Areas",
+          "Check_Summary": "Security measures for working in secure areas should be designed and implemented."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.7.7",
+      "Description": "Clear desk rules for papers and removable storage media and clear screen rules for information processing facilities should be defined and appropriately enforced.",
+      "Name": "Clear Desk And Clear Screen",
+      "Attributes": [
+        {
+          "Category": "A.7 Physical controls",
+          "Objetive_ID": "A.7.7",
+          "Objetive_Name": "Clear Desk And Clear Screen",
+          "Check_Summary": "Clear desk rules for papers and removable storage media and clear screen rules for information processing facilities should be defined and appropriately enforced."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.7.8",
+      "Description": "Equipment should be sited securely and protected.",
+      "Name": "Equipment Siting And Protection",
+      "Attributes": [
+        {
+          "Category": "A.7 Physical controls",
+          "Objetive_ID": "A.7.8",
+          "Objetive_Name": "Equipment Siting And Protection",
+          "Check_Summary": "Equipment should be sited securely and protected."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.7.9",
+      "Description": "Off-site assets should be protected.",
+      "Name": "Security Of Assets Off-Premises",
+      "Attributes": [
+        {
+          "Category": "A.7 Physical controls",
+          "Objetive_ID": "A.7.9",
+          "Objetive_Name": "Security Of Assets Off-Premises",
+          "Check_Summary": "Off-site assets should be protected."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.7.10",
+      "Description": "Storage media should be managed through their life cycle of acquisition, use, transportation and disposal in accordance with the organisations classification scheme and handling requirements.",
+      "Name": "Storage Media",
+      "Attributes": [
+        {
+          "Category": "A.7 Physical controls",
+          "Objetive_ID": "A.7.10",
+          "Objetive_Name": "Storage Media",
+          "Check_Summary": "Storage media should be managed through their life cycle of acquisition, use, transportation and disposal in accordance with the organisations classification scheme and handling requirements."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.7.11",
+      "Description": "Information processing facilities should be protected from power failures and other disruptions caused by failures in supporting utilities.",
+      "Name": "Supporting Utilities",
+      "Attributes": [
+        {
+          "Category": "A.7 Physical controls",
+          "Objetive_ID": "A.7.11",
+          "Objetive_Name": "Supporting Utilities",
+          "Check_Summary": "Information processing facilities should be protected from power failures and other disruptions caused by failures in supporting utilities."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.7.12",
+      "Description": "Cables carrying power, data or supporting information services should be protected from interception",
+      "Name": "Cabling Security",
+      "Attributes": [
+        {
+          "Category": "A.7 Physical controls",
+          "Objetive_ID": "A.7.12",
+          "Objetive_Name": "Cabling Security",
+          "Check_Summary": "Cables carrying power, data or supporting information services should be protected from interception"
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.7.13",
+      "Description": "Equipment should be maintained correctly to ensure availability, integrity and confidentiality of information.",
+      "Name": "Equipment Maintenance",
+      "Attributes": [
+        {
+          "Category": "A.7 Physical controls",
+          "Objetive_ID": "A.7.13",
+          "Objetive_Name": "Equipment Maintenance",
+          "Check_Summary": "Equipment should be maintained correctly to ensure availability, integrity and confidentiality of information."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.7.14",
+      "Description": "Items of equipment containing storage media should be verified to ensure that any sensitive data and licensed software has been removed or securely overwritten prior to disposal or re-use.",
+      "Name": "Secure Disposal Or Re-Use Of Equipment",
+      "Attributes": [
+        {
+          "Category": "A.7 Physical controls",
+          "Objetive_ID": "A.7.14",
+          "Objetive_Name": "Secure Disposal Or Re-Use Of Equipment",
+          "Check_Summary": "Items of equipment containing storage media should be verified to ensure that any sensitive data and licensed software has been removed or securely overwritten prior to disposal or re-use."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.8.1",
+      "Description": "Information stored on, processed by or accessible via user endpoint devices should be protected.",
+      "Name": "User Endpoint Devices",
+      "Attributes": [
+        {
+          "Category": "A.8 Technological controls",
+          "Objetive_ID": "A.8.1",
+          "Objetive_Name": "User Endpoint Devices",
+          "Check_Summary": "Information stored on, processed by or accessible via user endpoint devices should be protected."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.8.2",
+      "Description": "The allocation and use of privileged access rights should be restricted and managed.",
+      "Name": "Privileged Access Rights",
+      "Attributes": [
+        {
+          "Category": "A.8 Technological controls",
+          "Objetive_ID": "A.8.2",
+          "Objetive_Name": "Privileged Access Rights",
+          "Check_Summary": "The allocation and use of privileged access rights should be restricted and managed."
+        }
+      ],
+      "Checks": [
+        "compute_instance_login_user"
+      ]
+    },
+    {
+      "Id": "A.8.3",
+      "Description": "Access to information and other associated assets should be restricted in accordance with the established topic-specific policy on access control.",
+      "Name": "Information Access Restriction",
+      "Attributes": [
+        {
+          "Category": "A.8 Technological controls",
+          "Objetive_ID": "A.8.3",
+          "Objetive_Name": "Information Access Restriction",
+          "Check_Summary": "Access to information and other associated assets should be restricted in accordance with the established topic-specific policy on access control."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.8.4",
+      "Description": "Read and write access to source code, development tools and software libraries should be appropriately managed.",
+      "Name": "Access To Source Code",
+      "Attributes": [
+        {
+          "Category": "A.8 Technological controls",
+          "Objetive_ID": "A.8.4",
+          "Objetive_Name": "Access To Source Code",
+          "Check_Summary": "Read and write access to source code, development tools and software libraries should be appropriately managed."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.8.5",
+      "Description": "Secure authentication technologies and procedures should be implemented based on information access restrictions and the topic-specific policy on access control.",
+      "Name": "Secure Authentication",
+      "Attributes": [
+        {
+          "Category": "A.8 Technological controls",
+          "Objetive_ID": "A.8.5",
+          "Objetive_Name": "Secure Authentication",
+          "Check_Summary": "Secure authentication technologies and procedures should be implemented based on information access restrictions and the topic-specific policy on access control."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.8.6",
+      "Description": "The use of resources should be monitored and adjusted in line with current and expected capacity requirements.",
+      "Name": "Capacity Management",
+      "Attributes": [
+        {
+          "Category": "A.8 Technological controls",
+          "Objetive_ID": "A.8.6",
+          "Objetive_Name": "Capacity Management",
+          "Check_Summary": "The use of resources should be monitored and adjusted in line with current and expected capacity requirements."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.8.7",
+      "Description": "Protection against malware should be implemented and supported by appropriate user awareness.",
+      "Name": "Protection Against Malware",
+      "Attributes": [
+        {
+          "Category": "A.8 Technological controls",
+          "Objetive_ID": "A.8.7",
+          "Objetive_Name": "Protection Against Malware",
+          "Check_Summary": "Protection against malware should be implemented and supported by appropriate user awareness."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.8.8",
+      "Description": "Information about technical vulnerabilities of information systems in use should be obtained, the organisations exposure to such vulnerabilities should be evaluated and appropriate measures should be taken.",
+      "Name": "Management of Technical Vulnerabilities",
+      "Attributes": [
+        {
+          "Category": "A.8 Technological controls",
+          "Objetive_ID": "A.8.8",
+          "Objetive_Name": "Management of Technical Vulnerabilities",
+          "Check_Summary": "Information about technical vulnerabilities of information systems in use should be obtained, the organisations exposure to such vulnerabilities should be evaluated and appropriate measures should be taken."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.8.9",
+      "Description": "Configurations, including security configurations, of hardware, software, services and networks should be established, documented, implemented, monitored and reviewed.",
+      "Name": "Configuration Management",
+      "Attributes": [
+        {
+          "Category": "A.8 Technological controls",
+          "Objetive_ID": "A.8.9",
+          "Objetive_Name": "Configuration Management",
+          "Check_Summary": "Configurations, including security configurations, of hardware, software, services and networks should be established, documented, implemented, monitored and reviewed."
+        }
+      ],
+      "Checks": [
+        "compute_instance_security_groups",
+        "network_vpc_subnet_enable_dhcp"
+      ]
+    },
+    {
+      "Id": "A.8.10",
+      "Description": "Information stored in information systems, devices or in any other storage media should be deleted when no longer required.",
+      "Name": "Information Deletion",
+      "Attributes": [
+        {
+          "Category": "A.8 Technological controls",
+          "Objetive_ID": "A.8.10",
+          "Objetive_Name": "Information Deletion",
+          "Check_Summary": "Information stored in information systems, devices or in any other storage media should be deleted when no longer required."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.8.11",
+      "Description": "Data masking should be used in accordance with the organisationโ€™s topic-specific policy on access control and other related topic-specific policies, and business requirements, taking applicable legislation into consideration.",
+      "Name": "Data Masking",
+      "Attributes": [
+        {
+          "Category": "A.8 Technological controls",
+          "Objetive_ID": "A.8.11",
+          "Objetive_Name": "Data Masking",
+          "Check_Summary": "Data masking should be used in accordance with the organisationโ€™s topic-specific policy on access control and other related topic-specific policies, and business requirements, taking applicable legislation into consideration."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.8.12",
+      "Description": "Data leakage prevention measures should be applied to systems, networks and any other devices that process, store or transmit sensitive information.",
+      "Name": "Data Leakage Prevention",
+      "Attributes": [
+        {
+          "Category": "A.8 Technological controls",
+          "Objetive_ID": "A.8.12",
+          "Objetive_Name": "Data Leakage Prevention",
+          "Check_Summary": "Data leakage prevention measures should be applied to systems, networks and any other devices that process, store or transmit sensitive information."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.8.13",
+      "Description": "Backup copies of information, software and systems should be maintained and regularly tested in accordance with the agreed topic-specific policy on backup.",
+      "Name": "Information Backup",
+      "Attributes": [
+        {
+          "Category": "A.8 Technological controls",
+          "Objetive_ID": "A.8.13",
+          "Objetive_Name": "Information Backup",
+          "Check_Summary": "Backup copies of information, software and systems should be maintained and regularly tested in accordance with the agreed topic-specific policy on backup."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.8.14",
+      "Description": "Information processing facilities should be implemented with redundancy sufficient to meet availability",
+      "Name": "Redundancy of information processing facilities",
+      "Attributes": [
+        {
+          "Category": "A.8 Technological controls",
+          "Objetive_ID": "A.8.14",
+          "Objetive_Name": "Redundancy of information processing facilities",
+          "Check_Summary": "Information processing facilities should be implemented with redundancy sufficient to meet availability"
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.8.15",
+      "Description": "Logs that record activities, exceptions, faults and other relevant events should be produced, stored, protected and analysed.",
+      "Name": "Logging",
+      "Attributes": [
+        {
+          "Category": "A.8 Technological controls",
+          "Objetive_ID": "A.8.15",
+          "Objetive_Name": "Logging",
+          "Check_Summary": "Logs that record activities, exceptions, faults and other relevant events should be produced, stored, protected and analysed."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.8.16",
+      "Description": "Networks, systems and applications should be monitored for anomalous behaviour and appropriate actions taken to evaluate potential information security incidents.",
+      "Name": "Monitoring Activities",
+      "Attributes": [
+        {
+          "Category": "A.8 Technological controls",
+          "Objetive_ID": "A.8.16",
+          "Objetive_Name": "Monitoring Activities",
+          "Check_Summary": "Networks, systems and applications should be monitored for anomalous behaviour and appropriate actions taken to evaluate potential information security incidents."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.8.17",
+      "Description": "The clocks of information processing systems used by the organisation should be synchronised to approved time sources.",
+      "Name": "Clock Synchronisation",
+      "Attributes": [
+        {
+          "Category": "A.8 Technological controls",
+          "Objetive_ID": "A.8.17",
+          "Objetive_Name": "Clock Synchronisation",
+          "Check_Summary": "The clocks of information processing systems used by the organisation should be synchronised to approved time sources."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.8.18",
+      "Description": "The use of utility programs that can be capable of overriding system and application controls should be restricted and tightly controlled",
+      "Name": "Use of Privileged Utility Programs",
+      "Attributes": [
+        {
+          "Category": "A.8 Technological controls",
+          "Objetive_ID": "A.8.18",
+          "Objetive_Name": "Use of Privileged Utility Programs",
+          "Check_Summary": "The use of utility programs that can be capable of overriding system and application controls should be restricted and tightly controlled"
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.8.19",
+      "Description": "Procedures and measures should be implemented to securely manage software installation on operational systems.",
+      "Name": "Installation of Software on Operational Systems",
+      "Attributes": [
+        {
+          "Category": "A.8 Technological controls",
+          "Objetive_ID": "A.8.19",
+          "Objetive_Name": "Installation of Software on Operational Systems",
+          "Check_Summary": "Procedures and measures should be implemented to securely manage software installation on operational systems."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.8.20",
+      "Description": "Networks and network devices should be secured, managed and controlled to protect information in systems and applications.",
+      "Name": "Network Security",
+      "Attributes": [
+        {
+          "Category": "A.8 Technological controls",
+          "Objetive_ID": "A.8.20",
+          "Objetive_Name": "Network Security",
+          "Check_Summary": "Networks and network devices should be secured, managed and controlled to protect information in systems and applications."
+        }
+      ],
+      "Checks": [
+        "compute_instance_public_ip",
+        "compute_instance_security_groups",
+        "network_vpc_has_empty_routingtables",
+        "network_vpc_subnet_has_external_router"
+      ]
+    },
+    {
+      "Id": "A.8.21",
+      "Description": "Security mechanisms, service levels and service requirements of network services should be identified, implemented and monitored.",
+      "Name": "Security of Network Services",
+      "Attributes": [
+        {
+          "Category": "A.8 Technological controls",
+          "Objetive_ID": "A.8.21",
+          "Objetive_Name": "Security of Network Services",
+          "Check_Summary": "Security mechanisms, service levels and service requirements of network services should be identified, implemented and monitored."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.8.22",
+      "Description": "Security mechanisms, service levels and service requirements of network services should be identified, implemented and monitored.",
+      "Name": "Segregation of Networks",
+      "Attributes": [
+        {
+          "Category": "A.8 Technological controls",
+          "Objetive_ID": "A.8.22",
+          "Objetive_Name": "Segregation of Networks",
+          "Check_Summary": "Security mechanisms, service levels and service requirements of network services should be identified, implemented and monitored."
+        }
+      ],
+      "Checks": [
+        "compute_instance_public_ip",
+        "network_vpc_subnet_has_external_router"
+      ]
+    },
+    {
+      "Id": "A.8.23",
+      "Description": "Access to external websites should be managed to reduce exposure to malicious content.",
+      "Name": "Web Filtering",
+      "Attributes": [
+        {
+          "Category": "A.8 Technological controls",
+          "Objetive_ID": "A.8.23",
+          "Objetive_Name": "Web Filtering",
+          "Check_Summary": "Access to external websites should be managed to reduce exposure to malicious content."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.8.24",
+      "Description": "Rules for the effective use of cryptography, including cryptographic key management, should be defined and implemented.",
+      "Name": "Use of Cryptography",
+      "Attributes": [
+        {
+          "Category": "A.8 Technological controls",
+          "Objetive_ID": "A.8.24",
+          "Objetive_Name": "Use of Cryptography",
+          "Check_Summary": "Rules for the effective use of cryptography, including cryptographic key management, should be defined and implemented."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.8.25",
+      "Description": "Rules for the secure development of software and systems should be established and applied.",
+      "Name": "Secure Development Life Cycle",
+      "Attributes": [
+        {
+          "Category": "A.8 Technological controls",
+          "Objetive_ID": "A.8.25",
+          "Objetive_Name": "Secure Development Life Cycle",
+          "Check_Summary": "Rules for the secure development of software and systems should be established and applied."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.8.26",
+      "Description": "Information security requirements should be identified, specified and approved when developing or acquiring applications.",
+      "Name": "Application Security Requirements",
+      "Attributes": [
+        {
+          "Category": "A.8 Technological controls",
+          "Objetive_ID": "A.8.26",
+          "Objetive_Name": "Application Security Requirements",
+          "Check_Summary": "Information security requirements should be identified, specified and approved when developing or acquiring applications."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.8.27",
+      "Description": "Principles for engineering secure systems should be established, documented, maintained and applied to any information system development activities.",
+      "Name": "Secure Systems Architecture and Engineering Principles",
+      "Attributes": [
+        {
+          "Category": "A.8 Technological controls",
+          "Objetive_ID": "A.8.27",
+          "Objetive_Name": "Secure Systems Architecture and Engineering Principles",
+          "Check_Summary": "Principles for engineering secure systems should be established, documented, maintained and applied to any information system development activities."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.8.29",
+      "Description": "Security testing processes should be defined and implemented in the development life cycle.",
+      "Name": "Security Testing in Development and Acceptance",
+      "Attributes": [
+        {
+          "Category": "A.8 Technological controls",
+          "Objetive_ID": "A.8.29",
+          "Objetive_Name": "Security Testing in Development and Acceptance",
+          "Check_Summary": "Security testing processes should be defined and implemented in the development life cycle."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.8.30",
+      "Description": "The organisation should direct, monitor and review the activities related to outsourced system development.",
+      "Name": "Outsourced Development",
+      "Attributes": [
+        {
+          "Category": "A.8 Technological controls",
+          "Objetive_ID": "A.8.30",
+          "Objetive_Name": "Outsourced Development",
+          "Check_Summary": "The organisation should direct, monitor and review the activities related to outsourced system development."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.8.31",
+      "Description": "Development, testing and production environments should be separated and secured.",
+      "Name": "Separation of Development, Test and Production Environments",
+      "Attributes": [
+        {
+          "Category": "A.8 Technological controls",
+          "Objetive_ID": "A.8.31",
+          "Objetive_Name": "Separation of Development, Test and Production Environments",
+          "Check_Summary": "Development, testing and production environments should be separated and secured."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.8.32",
+      "Description": "Changes to information processing facilities and information systems should be subject to change management procedures.",
+      "Name": "Change Management",
+      "Attributes": [
+        {
+          "Category": "A.8 Technological controls",
+          "Objetive_ID": "A.8.32",
+          "Objetive_Name": "Change Management",
+          "Check_Summary": "Changes to information processing facilities and information systems should be subject to change management procedures."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.8.33",
+      "Description": "Test information should be appropriately selected, protected and managed.",
+      "Name": "Test Information",
+      "Attributes": [
+        {
+          "Category": "A.8 Technological controls",
+          "Objetive_ID": "A.8.33",
+          "Objetive_Name": "Test Information",
+          "Check_Summary": "Test information should be appropriately selected, protected and managed."
+        }
+      ],
+      "Checks": []
+    },
+    {
+      "Id": "A.8.34",
+      "Description": "Audit tests and other assurance activities involving assessment of operational systems should be planned and agreed between the tester and appropriate management.",
+      "Name": "Protection of Information Systems During Audit Testing",
+      "Attributes": [
+        {
+          "Category": "A.8 Technological controls",
+          "Objetive_ID": "A.8.34",
+          "Objetive_Name": "Protection of Information Systems During Audit Testing",
+          "Check_Summary": "Audit tests and other assurance activities involving assessment of operational systems should be planned and agreed between the tester and appropriate management."
+        }
+      ],
+      "Checks": []
+    }
+  ]
+}
diff --git a/prowler/config/config.py b/prowler/config/config.py
index 9c5a4021a6..de54add886 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.5.0"
+prowler_version = "5.8.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"
@@ -28,7 +28,9 @@ class Provider(str, Enum):
     GCP = "gcp"
     AZURE = "azure"
     KUBERNETES = "kubernetes"
-    MICROSOFT365 = "microsoft365"
+    M365 = "m365"
+    GITHUB = "github"
+    NHN = "nhn"
 
 
 # Compliance
@@ -125,13 +127,13 @@ def load_and_validate_config_file(provider: str, config_file_path: str) -> dict:
             # and a new format with a key for each provider to include their configuration values within.
             if any(
                 key in config_file
-                for key in ["aws", "gcp", "azure", "kubernetes", "microsoft365"]
+                for key in ["aws", "gcp", "azure", "kubernetes", "m365"]
             ):
                 config = config_file.get(provider, {})
             else:
                 config = config_file if config_file else {}
                 # Not to break Azure, K8s and GCP does not support or use the old config format
-                if provider in ["azure", "gcp", "kubernetes"]:
+                if provider in ["azure", "gcp", "kubernetes", "m365"]:
                     config = {}
 
             return config
diff --git a/prowler/config/config.yaml b/prowler/config/config.yaml
index 2f3f63478d..c4bcd40b8e 100644
--- a/prowler/config/config.yaml
+++ b/prowler/config/config.yaml
@@ -95,6 +95,7 @@ aws:
       "python3.6",
       "python2.7",
       "python3.7",
+      "python3.8",
       "nodejs4.3",
       "nodejs4.3-edge",
       "nodejs6.10",
@@ -105,6 +106,7 @@ aws:
       "nodejs14.x",
       "nodejs16.x",
       "dotnet5.0",
+      "dotnet6",
       "dotnet7",
       "dotnetcore1.0",
       "dotnetcore2.0",
@@ -325,7 +327,6 @@ aws:
     [
       "RSA-1024",
       "P-192",
-      "SHA-1",
     ]
 
   # AWS EKS Configuration
@@ -445,6 +446,10 @@ gcp:
   # GCP Compute Configuration
   # gcp.compute_public_address_shodan
   shodan_api_key: null
+  # GCP Service Account and user-managed keys unused configuration
+  # gcp.iam_service_account_unused
+  #ย gcp.iam_sa_user_managed_key_unused
+  max_unused_account_days: 180
 
 # Kubernetes Configuration
 kubernetes:
@@ -477,8 +482,36 @@ kubernetes:
     ]
 
 
-# Microsoft365 Configuration
-microsoft365:
-  # Conditional Access Policy
-  # policy.session_controls.sign_in_frequency.frequency in hours
-  sign_in_frequency: 4
+# M365 Configuration
+m365:
+  # Entra
+  # m365.entra_admin_users_sign_in_frequency_enabled
+  sign_in_frequency: 4 # 4 hours
+  # Teams
+  # m365.teams_external_file_sharing_restricted
+  allowed_cloud_storage_services:
+    [
+      #"allow_box",
+      #"allow_drop_box",
+      #"allow_egnyte",
+      #"allow_google_drive",
+      #"allow_share_file",
+    ]
+  # 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/config/microsoft365_mutelist_example.yaml b/prowler/config/m365_mutelist_example.yaml
similarity index 96%
rename from prowler/config/microsoft365_mutelist_example.yaml
rename to prowler/config/m365_mutelist_example.yaml
index c33b442c04..34fda956e0 100644
--- a/prowler/config/microsoft365_mutelist_example.yaml
+++ b/prowler/config/m365_mutelist_example.yaml
@@ -1,5 +1,5 @@
 ### Account, Check and/or Region can be * to apply for all the cases.
-### Account == Microsoft365 Tenant and Region == Microsoft365 Location
+### Account == M365 Tenant and Region == M365 Location
 ### 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.
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/compliance_models.py b/prowler/lib/check/compliance_models.py
index fff0d6c38e..92bfaec168 100644
--- a/prowler/lib/check/compliance_models.py
+++ b/prowler/lib/check/compliance_models.py
@@ -183,6 +183,18 @@ class KISA_ISMSP_Requirement_Attribute(BaseModel):
     NonComplianceCases: Optional[list[str]]
 
 
+# Prowler ThreatScore Requirement Attribute
+class Prowler_ThreatScore_Requirement_Attribute(BaseModel):
+    """Prowler ThreatScore Requirement Attribute"""
+
+    Title: str
+    Section: str
+    SubSection: str
+    AttributeDescription: str
+    AdditionalInformation: str
+    LevelOfRisk: int
+
+
 # Base Compliance Model
 # TODO: move this to compliance folder
 class Compliance_Requirement(BaseModel):
@@ -198,6 +210,7 @@ class Compliance_Requirement(BaseModel):
             ISO27001_2013_Requirement_Attribute,
             AWS_Well_Architected_Requirement_Attribute,
             KISA_ISMSP_Requirement_Attribute,
+            Prowler_ThreatScore_Requirement_Attribute,
             # Generic_Compliance_Requirement_Attribute must be the last one since it is the fallback for generic compliance framework
             Generic_Compliance_Requirement_Attribute,
         ]
diff --git a/prowler/lib/check/models.py b/prowler/lib/check/models.py
index 7dba878217..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
 
@@ -543,8 +543,39 @@ class Check_Report_Kubernetes(Check_Report):
 
 
 @dataclass
-class CheckReportMicrosoft365(Check_Report):
-    """Contains the Microsoft365 Check's finding information."""
+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."""
 
     resource_name: str
     resource_id: str
@@ -558,7 +589,7 @@ class CheckReportMicrosoft365(Check_Report):
         resource_id: str,
         resource_location: str = "global",
     ) -> None:
-        """Initialize the Microsoft365 Check's finding information.
+        """Initialize the M365 Check's finding information.
 
         Args:
             metadata: The metadata of the check.
@@ -573,6 +604,29 @@ class CheckReportMicrosoft365(Check_Report):
         self.location = resource_location
 
 
+@dataclass
+class CheckReportNHN(Check_Report):
+    """Contains the NHN Check's finding information."""
+
+    resource_name: str
+    resource_id: str
+    location: str
+
+    def __init__(self, metadata: Dict, resource: Any) -> None:
+        """Initialize the NHN Check's finding information.
+
+        Args:
+            metadata: The metadata of the check.
+            resource: Basic information about the resource. Defaults to None.
+        """
+        super().__init__(metadata, resource)
+        self.resource_name = getattr(
+            resource, "name", getattr(resource, "resource_name", "")
+        )
+        self.resource_id = getattr(resource, "id", getattr(resource, "resource_id", ""))
+        self.location = getattr(resource, "location", "kr1")
+
+
 # Testing Pending
 def load_check_metadata(metadata_file: str) -> CheckMetadata:
     """
diff --git a/prowler/lib/cli/parser.py b/prowler/lib/cli/parser.py
index cff8940134..1990c7f90a 100644
--- a/prowler/lib/cli/parser.py
+++ b/prowler/lib/cli/parser.py
@@ -26,15 +26,17 @@ class ProwlerArgumentParser:
         self.parser = argparse.ArgumentParser(
             prog="prowler",
             formatter_class=RawTextHelpFormatter,
-            usage="prowler [-h] [--version] {aws,azure,gcp,kubernetes,microsoft365,dashboard} ...",
+            usage="prowler [-h] [--version] {aws,azure,gcp,kubernetes,m365,nhn,dashboard} ...",
             epilog="""
 Available Cloud Providers:
-  {aws,azure,gcp,kubernetes}
+  {aws,azure,gcp,kubernetes,m365,nhn}
     aws                 AWS Provider
     azure               Azure Provider
     gcp                 GCP Provider
     kubernetes          Kubernetes Provider
-    microsoft365        Microsoft 365 Provider
+    github              GitHub Provider
+    m365                Microsoft 365 Provider
+    nhn                 NHN Provider (Unofficial)
 
 Available components:
     dashboard           Local dashboard
@@ -103,6 +105,11 @@ Detailed documentation at https://docs.prowler.com
             if "-" in sys.argv[1]:
                 sys.argv = self.__set_default_provider__(sys.argv)
 
+            # Provider aliases mapping
+            # Microsoft 365
+            elif sys.argv[1] == "microsoft365":
+                sys.argv[1] = "m365"
+
         # Parse arguments
         args = self.parser.parse_args()
 
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/cis_microsoft365.py b/prowler/lib/outputs/compliance/cis/cis_m365.py
similarity index 93%
rename from prowler/lib/outputs/compliance/cis/cis_microsoft365.py
rename to prowler/lib/outputs/compliance/cis/cis_m365.py
index 8cf4722ba7..addc78a104 100644
--- a/prowler/lib/outputs/compliance/cis/cis_microsoft365.py
+++ b/prowler/lib/outputs/compliance/cis/cis_m365.py
@@ -1,10 +1,10 @@
 from prowler.lib.check.compliance_models import Compliance
-from prowler.lib.outputs.compliance.cis.models import Microsoft365CISModel
+from prowler.lib.outputs.compliance.cis.models import M365CISModel
 from prowler.lib.outputs.compliance.compliance_output import ComplianceOutput
 from prowler.lib.outputs.finding import Finding
 
 
-class Microsoft365CIS(ComplianceOutput):
+class M365CIS(ComplianceOutput):
     """
     This class represents the Azure CIS compliance output.
 
@@ -39,7 +39,7 @@ class Microsoft365CIS(ComplianceOutput):
             for requirement in compliance.Requirements:
                 if requirement.Id in finding_requirements:
                     for attribute in requirement.Attributes:
-                        compliance_row = Microsoft365CISModel(
+                        compliance_row = M365CISModel(
                             Provider=finding.provider,
                             Description=compliance.Description,
                             TenantId=finding.account_uid,
@@ -48,6 +48,7 @@ class Microsoft365CIS(ComplianceOutput):
                             Requirements_Id=requirement.Id,
                             Requirements_Description=requirement.Description,
                             Requirements_Attributes_Section=attribute.Section,
+                            Requirements_Attributes_SubSection=attribute.SubSection,
                             Requirements_Attributes_Profile=attribute.Profile,
                             Requirements_Attributes_AssessmentStatus=attribute.AssessmentStatus,
                             Requirements_Attributes_Description=attribute.Description,
@@ -70,7 +71,7 @@ class Microsoft365CIS(ComplianceOutput):
         for requirement in compliance.Requirements:
             if not requirement.Checks:
                 for attribute in requirement.Attributes:
-                    compliance_row = Microsoft365CISModel(
+                    compliance_row = M365CISModel(
                         Provider=compliance.Provider.lower(),
                         Description=compliance.Description,
                         TenantId=finding.account_uid,
@@ -79,6 +80,7 @@ class Microsoft365CIS(ComplianceOutput):
                         Requirements_Id=requirement.Id,
                         Requirements_Description=requirement.Description,
                         Requirements_Attributes_Section=attribute.Section,
+                        Requirements_Attributes_SubSection=attribute.SubSection,
                         Requirements_Attributes_Profile=attribute.Profile,
                         Requirements_Attributes_AssessmentStatus=attribute.AssessmentStatus,
                         Requirements_Attributes_Description=attribute.Description,
diff --git a/prowler/lib/outputs/compliance/cis/models.py b/prowler/lib/outputs/compliance/cis/models.py
index 1f6e661655..1a4764c294 100644
--- a/prowler/lib/outputs/compliance/cis/models.py
+++ b/prowler/lib/outputs/compliance/cis/models.py
@@ -69,9 +69,9 @@ class AzureCISModel(BaseModel):
     Muted: bool
 
 
-class Microsoft365CISModel(BaseModel):
+class M365CISModel(BaseModel):
     """
-    Microsoft365CISModel generates a finding's output in Microsoft365 CIS Compliance format.
+    M365CISModel generates a finding's output in Microsoft 365 CIS Compliance format.
     """
 
     Provider: str
@@ -82,6 +82,7 @@ class Microsoft365CISModel(BaseModel):
     Requirements_Id: str
     Requirements_Description: str
     Requirements_Attributes_Section: str
+    Requirements_Attributes_SubSection: Optional[str]
     Requirements_Attributes_Profile: str
     Requirements_Attributes_AssessmentStatus: str
     Requirements_Attributes_Description: str
@@ -163,6 +164,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.py b/prowler/lib/outputs/compliance/compliance.py
index b74eafa97f..e0c686dd84 100644
--- a/prowler/lib/outputs/compliance/compliance.py
+++ b/prowler/lib/outputs/compliance/compliance.py
@@ -11,6 +11,9 @@ from prowler.lib.outputs.compliance.kisa_ismsp.kisa_ismsp import get_kisa_ismsp_
 from prowler.lib.outputs.compliance.mitre_attack.mitre_attack import (
     get_mitre_attack_table,
 )
+from prowler.lib.outputs.compliance.prowler_threatscore.prowler_threatscore import (
+    get_prowler_threatscore_table,
+)
 
 
 def display_compliance_table(
@@ -72,6 +75,15 @@ def display_compliance_table(
                 output_directory,
                 compliance_overview,
             )
+        elif "threatscore_" in compliance_framework:
+            get_prowler_threatscore_table(
+                findings,
+                bulk_checks_metadata,
+                compliance_framework,
+                output_filename,
+                output_directory,
+                compliance_overview,
+            )
         else:
             get_generic_compliance_table(
                 findings,
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/iso27001/iso27001_nhn.py b/prowler/lib/outputs/compliance/iso27001/iso27001_nhn.py
new file mode 100644
index 0000000000..03bbfa7195
--- /dev/null
+++ b/prowler/lib/outputs/compliance/iso27001/iso27001_nhn.py
@@ -0,0 +1,87 @@
+from prowler.lib.check.compliance_models import Compliance
+from prowler.lib.outputs.compliance.compliance_output import ComplianceOutput
+from prowler.lib.outputs.compliance.iso27001.models import NHNISO27001Model
+from prowler.lib.outputs.finding import Finding
+
+
+class NHNISO27001(ComplianceOutput):
+    """
+    This class represents the NHN ISO 27001 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 NHN ISO 27001 compliance format.
+    """
+
+    def transform(
+        self,
+        findings: list[Finding],
+        compliance: Compliance,
+        compliance_name: str,
+    ) -> None:
+        """
+        Transforms a list of findings into NHN ISO 27001 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:
+            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 = NHNISO27001Model(
+                            Provider=finding.provider,
+                            Description=compliance.Description,
+                            AccountId=finding.account_uid,
+                            Region=finding.region,
+                            AssessmentDate=str(finding.timestamp),
+                            Requirements_Id=requirement.Id,
+                            Requirements_Description=requirement.Description,
+                            Requirements_Name=requirement.Name,
+                            Requirements_Attributes_Category=attribute.Category,
+                            Requirements_Attributes_Objetive_ID=attribute.Objetive_ID,
+                            Requirements_Attributes_Objetive_Name=attribute.Objetive_Name,
+                            Requirements_Attributes_Check_Summary=attribute.Check_Summary,
+                            Status=finding.status,
+                            StatusExtended=finding.status_extended,
+                            ResourceId=finding.resource_uid,
+                            CheckId=finding.check_id,
+                            Muted=finding.muted,
+                            ResourceName=finding.resource_name,
+                        )
+                        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 = NHNISO27001Model(
+                        Provider=compliance.Provider.lower(),
+                        Description=compliance.Description,
+                        AccountId="",
+                        Region="",
+                        AssessmentDate=str(finding.timestamp),
+                        Requirements_Id=requirement.Id,
+                        Requirements_Description=requirement.Description,
+                        Requirements_Name=requirement.Name,
+                        Requirements_Attributes_Category=attribute.Category,
+                        Requirements_Attributes_Objetive_ID=attribute.Objetive_ID,
+                        Requirements_Attributes_Objetive_Name=attribute.Objetive_Name,
+                        Requirements_Attributes_Check_Summary=attribute.Check_Summary,
+                        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/iso27001/models.py b/prowler/lib/outputs/compliance/iso27001/models.py
index 1d84b5c892..16e97a178d 100644
--- a/prowler/lib/outputs/compliance/iso27001/models.py
+++ b/prowler/lib/outputs/compliance/iso27001/models.py
@@ -99,3 +99,28 @@ class KubernetesISO27001Model(BaseModel):
     CheckId: str
     Muted: bool
     ResourceName: str
+
+
+class NHNISO27001Model(BaseModel):
+    """
+    NHNISO27001Model generates a finding's output in CSV NHN ISO27001 format.
+    """
+
+    Provider: str
+    Description: str
+    AccountId: str
+    Region: str
+    AssessmentDate: str
+    Requirements_Id: str
+    Requirements_Name: str
+    Requirements_Description: str
+    Requirements_Attributes_Category: str
+    Requirements_Attributes_Objetive_ID: str
+    Requirements_Attributes_Objetive_Name: str
+    Requirements_Attributes_Check_Summary: str
+    Status: str
+    StatusExtended: str
+    ResourceId: str
+    CheckId: str
+    Muted: bool
+    ResourceName: str
diff --git a/prowler/providers/microsoft365/lib/service/__init__.py b/prowler/lib/outputs/compliance/prowler_threatscore/__init__.py
similarity index 100%
rename from prowler/providers/microsoft365/lib/service/__init__.py
rename to prowler/lib/outputs/compliance/prowler_threatscore/__init__.py
diff --git a/prowler/lib/outputs/compliance/prowler_threatscore/models.py b/prowler/lib/outputs/compliance/prowler_threatscore/models.py
new file mode 100644
index 0000000000..f1908b8de3
--- /dev/null
+++ b/prowler/lib/outputs/compliance/prowler_threatscore/models.py
@@ -0,0 +1,107 @@
+from typing import Optional
+
+from pydantic import BaseModel
+
+
+class ProwlerThreatScoreAWSModel(BaseModel):
+    """
+    ProwlerThreatScoreAWSModel generates a finding's output in AWS Prowler ThreatScore Compliance format.
+    """
+
+    Provider: str
+    Description: str
+    AccountId: str
+    Region: 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
+
+
+class ProwlerThreatScoreAzureModel(BaseModel):
+    """
+    ProwlerThreatScoreAzureModel generates a finding's output in Azure Prowler ThreatScore Compliance format.
+    """
+
+    Provider: str
+    Description: str
+    SubscriptionId: 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
+
+
+class ProwlerThreatScoreGCPModel(BaseModel):
+    """
+    ProwlerThreatScoreGCPModel generates a finding's output in GCP Prowler ThreatScore Compliance format.
+    """
+
+    Provider: str
+    Description: str
+    ProjectId: 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
+
+
+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.py b/prowler/lib/outputs/compliance/prowler_threatscore/prowler_threatscore.py
new file mode 100644
index 0000000000..e041e3e7f3
--- /dev/null
+++ b/prowler/lib/outputs/compliance/prowler_threatscore/prowler_threatscore.py
@@ -0,0 +1,121 @@
+from colorama import Fore, Style
+from tabulate import tabulate
+
+from prowler.config.config import orange_color
+
+
+def get_prowler_threatscore_table(
+    findings: list,
+    bulk_checks_metadata: dict,
+    compliance_framework: str,
+    output_filename: str,
+    output_directory: str,
+    compliance_overview: bool,
+):
+    pillar_table = {
+        "Provider": [],
+        "Pillar": [],
+        "Status": [],
+        "Score": [],
+        "Muted": [],
+    }
+    pass_count = []
+    fail_count = []
+    muted_count = []
+    pillars = {}
+    score_per_pillar = {}
+    number_findings_per_pillar = {}
+    for index, finding in enumerate(findings):
+        check = bulk_checks_metadata[finding.check_metadata.CheckID]
+        check_compliances = check.Compliance
+        for compliance in check_compliances:
+            if compliance.Framework == "ProwlerThreatScore":
+                for requirement in compliance.Requirements:
+                    for attribute in requirement.Attributes:
+                        pillar = attribute.Section
+
+                        if pillar not in score_per_pillar.keys():
+                            score_per_pillar[pillar] = 0
+                            number_findings_per_pillar[pillar] = 0
+                        if finding.status == "FAIL" and not finding.muted:
+                            score_per_pillar[pillar] += attribute.LevelOfRisk
+                            number_findings_per_pillar[pillar] += 1
+
+                        if pillar not in pillars:
+                            pillars[pillar] = {"FAIL": 0, "PASS": 0, "Muted": 0}
+
+                        if finding.muted:
+                            if index not in muted_count:
+                                muted_count.append(index)
+                                pillars[pillar]["Muted"] += 1
+                        else:
+                            if finding.status == "FAIL" and index not in fail_count:
+                                fail_count.append(index)
+                                pillars[pillar]["FAIL"] += 1
+                            elif finding.status == "PASS" and index not in pass_count:
+                                pass_count.append(index)
+                                pillars[pillar]["PASS"] += 1
+
+    pillars = dict(sorted(pillars.items()))
+    for pillar in pillars:
+        pillar_table["Provider"].append(compliance.Provider)
+        pillar_table["Pillar"].append(pillar)
+        if number_findings_per_pillar[pillar] == 0:
+            pillar_table["Score"].append(
+                f"{Style.BRIGHT}{Fore.GREEN}0{Style.RESET_ALL}"
+            )
+        else:
+            pillar_table["Score"].append(
+                f"{Style.BRIGHT}{Fore.RED}{score_per_pillar[pillar] / number_findings_per_pillar[pillar]:.2f}/5{Style.RESET_ALL}"
+            )
+        if pillars[pillar]["FAIL"] > 0:
+            pillar_table["Status"].append(
+                f"{Fore.RED}FAIL({pillars[pillar]['FAIL']}){Style.RESET_ALL}"
+            )
+        else:
+            pillar_table["Status"].append(
+                f"{Fore.GREEN}PASS({pillars[pillar]['PASS']}){Style.RESET_ALL}"
+            )
+        pillar_table["Muted"].append(
+            f"{orange_color}{pillars[pillar]['Muted']}{Style.RESET_ALL}"
+        )
+
+    if (
+        len(fail_count) + len(pass_count) + len(muted_count) > 1
+    ):  # If there are no resources, don't print the compliance table
+        print(
+            f"\nCompliance Status of {Fore.YELLOW}{compliance_framework.upper()}{Style.RESET_ALL} Framework:"
+        )
+        total_findings_count = len(fail_count) + len(pass_count) + len(muted_count)
+        overview_table = [
+            [
+                f"{Fore.RED}{round(len(fail_count) / total_findings_count * 100, 2)}% ({len(fail_count)}) FAIL{Style.RESET_ALL}",
+                f"{Fore.GREEN}{round(len(pass_count) / total_findings_count * 100, 2)}% ({len(pass_count)}) PASS{Style.RESET_ALL}",
+                f"{orange_color}{round(len(muted_count) / total_findings_count * 100, 2)}% ({len(muted_count)}) MUTED{Style.RESET_ALL}",
+            ]
+        ]
+        print(tabulate(overview_table, tablefmt="rounded_grid"))
+        if not compliance_overview:
+            if len(fail_count) > 0 and len(pillar_table["Pillar"]) > 0:
+                print(
+                    f"\nFramework {Fore.YELLOW}{compliance_framework.upper()}{Style.RESET_ALL} Results:"
+                )
+
+                print(
+                    tabulate(
+                        pillar_table,
+                        tablefmt="rounded_grid",
+                        headers="keys",
+                    )
+                )
+
+                print(
+                    f"{Style.BRIGHT}\n=== Risk Score Guide ===\nScore ranges from 1 (lowest risk) to 5 (highest risk), indicating the severity of the potential impact.{Style.RESET_ALL}"
+                )
+                print(
+                    f"{Style.BRIGHT}(Only sections containing results appear, the score is calculated as the sum of the level of risk of the failed findings divided by the number of failed findings){Style.RESET_ALL}"
+                )
+                print(f"\nDetailed results of {compliance_framework.upper()} are in:")
+                print(
+                    f" - CSV: {output_directory}/compliance/{output_filename}_{compliance_framework}.csv\n"
+                )
diff --git a/prowler/lib/outputs/compliance/prowler_threatscore/prowler_threatscore_aws.py b/prowler/lib/outputs/compliance/prowler_threatscore/prowler_threatscore_aws.py
new file mode 100644
index 0000000000..2d876b402f
--- /dev/null
+++ b/prowler/lib/outputs/compliance/prowler_threatscore/prowler_threatscore_aws.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 (
+    ProwlerThreatScoreAWSModel,
+)
+from prowler.lib.outputs.finding import Finding
+
+
+class ProwlerThreatScoreAWS(ComplianceOutput):
+    """
+    This class represents the AWS 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 AWS Prowler ThreatScore compliance format.
+    """
+
+    def transform(
+        self,
+        findings: list[Finding],
+        compliance: Compliance,
+        compliance_name: str,
+    ) -> None:
+        """
+        Transforms a list of findings into AWS 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 = ProwlerThreatScoreAWSModel(
+                            Provider=finding.provider,
+                            Description=compliance.Description,
+                            AccountId=finding.account_uid,
+                            Region=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 = ProwlerThreatScoreAWSModel(
+                        Provider=compliance.Provider.lower(),
+                        Description=compliance.Description,
+                        AccountId="",
+                        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="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/prowler_threatscore/prowler_threatscore_azure.py b/prowler/lib/outputs/compliance/prowler_threatscore/prowler_threatscore_azure.py
new file mode 100644
index 0000000000..01786e2d08
--- /dev/null
+++ b/prowler/lib/outputs/compliance/prowler_threatscore/prowler_threatscore_azure.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 (
+    ProwlerThreatScoreAzureModel,
+)
+from prowler.lib.outputs.finding import Finding
+
+
+class ProwlerThreatScoreAzure(ComplianceOutput):
+    """
+    This class represents the Azure 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 Azure Prowler ThreatScore compliance format.
+    """
+
+    def transform(
+        self,
+        findings: list[Finding],
+        compliance: Compliance,
+        compliance_name: str,
+    ) -> None:
+        """
+        Transforms a list of findings into Azure 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 = ProwlerThreatScoreAzureModel(
+                            Provider=finding.provider,
+                            Description=compliance.Description,
+                            SubscriptionId=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 = ProwlerThreatScoreAzureModel(
+                        Provider=compliance.Provider.lower(),
+                        Description=compliance.Description,
+                        SubscriptionId="",
+                        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/compliance/prowler_threatscore/prowler_threatscore_gcp.py b/prowler/lib/outputs/compliance/prowler_threatscore/prowler_threatscore_gcp.py
new file mode 100644
index 0000000000..9bf577255f
--- /dev/null
+++ b/prowler/lib/outputs/compliance/prowler_threatscore/prowler_threatscore_gcp.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 (
+    ProwlerThreatScoreGCPModel,
+)
+from prowler.lib.outputs.finding import Finding
+
+
+class ProwlerThreatScoreGCP(ComplianceOutput):
+    """
+    This class represents the GCP 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 GCP Prowler ThreatScore compliance format.
+    """
+
+    def transform(
+        self,
+        findings: list[Finding],
+        compliance: Compliance,
+        compliance_name: str,
+    ) -> None:
+        """
+        Transforms a list of findings into GCP 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 = ProwlerThreatScoreGCPModel(
+                            Provider=finding.provider,
+                            Description=compliance.Description,
+                            ProjectId=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 = ProwlerThreatScoreGCPModel(
+                        Provider=compliance.Provider.lower(),
+                        Description=compliance.Description,
+                        ProjectId="",
+                        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/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 f41ed6d935..b7547da815 100644
--- a/prowler/lib/outputs/finding.py
+++ b/prowler/lib/outputs/finding.py
@@ -1,3 +1,4 @@
+import json
 from datetime import datetime
 from types import SimpleNamespace
 from typing import Optional, Union
@@ -94,7 +95,6 @@ class Finding(BaseModel):
         Returns:
             dict: A dictionary containing the metadata with keys converted to lowercase.
         """
-
         return dict_to_lowercase(self.metadata.dict())
 
     @classmethod
@@ -120,13 +120,16 @@ class Finding(BaseModel):
         output_data = {}
         output_data.update(common_finding_data)
 
-        bulk_checks_metadata = {}
-        if hasattr(output_options, "bulk_checks_metadata"):
-            bulk_checks_metadata = output_options.bulk_checks_metadata
+        try:
+            output_data["compliance"] = check_output.compliance
+        except AttributeError:
+            bulk_checks_metadata = {}
+            if hasattr(output_options, "bulk_checks_metadata"):
+                bulk_checks_metadata = output_options.bulk_checks_metadata
 
-        output_data["compliance"] = get_check_compliance(
-            check_output, provider.type, bulk_checks_metadata
-        )
+            output_data["compliance"] = get_check_compliance(
+                check_output, provider.type, bulk_checks_metadata
+            )
         try:
             output_data["provider"] = provider.type
             output_data["resource_metadata"] = check_output.resource
@@ -242,7 +245,15 @@ class Finding(BaseModel):
                 )
                 output_data["region"] = f"namespace: {check_output.namespace}"
 
-            elif provider.type == "microsoft365":
+            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}"
                 )
@@ -256,14 +267,38 @@ class Finding(BaseModel):
                 output_data["resource_uid"] = check_output.resource_id
                 output_data["region"] = check_output.location
 
+            elif provider.type == "nhn":
+                output_data["auth_method"] = (
+                    f"passwordCredentials: username={get_nested_attribute(provider, '_identity.username')}, "
+                    f"tenantId={get_nested_attribute(provider, '_identity.tenant_id')}"
+                )
+                output_data["account_uid"] = get_nested_attribute(
+                    provider, "identity.tenant_id"
+                )
+                output_data["account_name"] = get_nested_attribute(
+                    provider, "identity.tenant_domain"
+                )
+                output_data["resource_name"] = check_output.resource_name
+                output_data["resource_uid"] = check_output.resource_id
+                output_data["region"] = check_output.location
+
             # check_output Unique ID
             # TODO: move this to a function
-            # TODO: in Azure, GCP and K8s there are fidings without resource_name
+            # TODO: in Azure, GCP and K8s there are findings without resource_name
             output_data["uid"] = (
                 f"prowler-{provider.type}-{check_output.check_metadata.CheckID}-{output_data['account_uid']}-"
                 f"{output_data['region']}-{output_data['resource_name']}"
             )
 
+            if not output_data["resource_uid"]:
+                logger.error(
+                    f"Check {check_output.check_metadata.CheckID} has no resource_uid."
+                )
+            if not output_data["resource_name"]:
+                logger.error(
+                    f"Check {check_output.check_metadata.CheckID} has no resource_name."
+                )
+
             return cls(**output_data)
         except ValidationError as validation_error:
             logger.error(
@@ -296,14 +331,11 @@ class Finding(BaseModel):
             Finding: A new Finding instance populated with data from the provided model.
         """
         # Missing Finding's API values
-        finding.muted = False
-        finding.resource_details = ""
         resource = finding.resources.first()
         finding.resource_arn = resource.uid
         finding.resource_name = resource.name
-
-        # TODO: Change this when the API has all the values
-        finding.resource = {}
+        finding.resource = json.loads(resource.metadata)
+        finding.resource_details = resource.details
 
         finding.resource_id = resource.name if provider.type == "aws" else resource.uid
 
@@ -358,6 +390,7 @@ class Finding(BaseModel):
         finding.resource_tags = unroll_tags(
             [{"key": tag.key, "value": tag.value} for tag in resource.tags.all()]
         )
+
         return cls.generate_output(provider, finding, SimpleNamespace())
 
     def _transform_findings_stats(scan_summaries: list[dict]) -> dict:
diff --git a/prowler/lib/outputs/html/html.py b/prowler/lib/outputs/html/html.py
index de99168326..f775a00d3d 100644
--- a/prowler/lib/outputs/html/html.py
+++ b/prowler/lib/outputs/html/html.py
@@ -106,8 +106,7 @@ class HTML(Output):
         """
         try:
             file_descriptor.write(
-                f"""
-
+                f"""
     
     
     
@@ -546,9 +545,9 @@ class HTML(Output):
             return ""
 
     @staticmethod
-    def get_microsoft365_assessment_summary(provider: Provider) -> str:
+    def get_github_assessment_summary(provider: Provider) -> str:
         """
-        get_microsoft365_assessment_summary gets the HTML assessment summary for the provider
+        get_github_assessment_summary gets the HTML assessment summary for the provider
 
         Args:
             provider (Provider): the provider object
@@ -561,11 +560,57 @@ class HTML(Output):
                 
- Microsoft365 Assessment Summary + GitHub Assessment Summary +
+
    +
  • + GitHub account: {provider.identity.account_name} +
  • +
+
+
+
+
+
+ GitHub Credentials +
+
    +
  • + GitHub authentication method: {provider.auth_method} +
  • +
+
+
""" + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}] -- {error}" + ) + return "" + + @staticmethod + def get_m365_assessment_summary(provider: Provider) -> str: + """ + get_m365_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""" +
+
+
+ M365 Assessment Summary
  • - Microsoft365 Tenant Domain: {provider.identity.tenant_domain} + M365 Tenant Domain: { + provider.identity.tenant_domain + }
@@ -573,14 +618,67 @@ class HTML(Output):
- Microsoft365 Credentials + M365 Credentials
  • - Microsoft365 Identity Type: {provider.identity.identity_type} + M365 Identity Type: {provider.identity.identity_type}
  • - Microsoft365 Identity ID: {provider.identity.identity_id} + M365 Identity ID: {provider.identity.identity_id} +
  • + { + f'''
  • + M365 User: {provider.identity.user} +
  • ''' + if hasattr(provider.identity, "user") + and provider.identity.user is not None + else "" + } +
+
+
""" + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}] -- {error}" + ) + return "" + + def get_nhn_assessment_summary(provider: Provider) -> str: + """ + get_nhn_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""" +
+
+
+ NHN Assessment Summary +
+
    +
  • + NHN Tenant Domain: {provider.identity.tenant_domain} +
  • +
+
+
+
+
+
+ NHN Credentials +
+
    +
  • + NHN Identity Type: {provider.identity.identity_type} +
  • +
  • + NHN Identity ID: {provider.identity.identity_id}
@@ -607,6 +705,7 @@ class HTML(Output): # It is not pretty but useful # AWS_provider --> aws # GCP_provider --> gcp + # GitHub_provider --> github # Azure_provider --> azure # Kubernetes_provider --> kubernetes diff --git a/prowler/lib/outputs/jira/exceptions/exceptions.py b/prowler/lib/outputs/jira/exceptions/exceptions.py index a8267ffba6..ed138a73a4 100644 --- a/prowler/lib/outputs/jira/exceptions/exceptions.py +++ b/prowler/lib/outputs/jira/exceptions/exceptions.py @@ -82,6 +82,14 @@ class JiraBaseException(ProwlerException): "message": "The project key is invalid.", "remediation": "Please check the project key and try again.", }, + (9019, "JiraBasicAuthError"): { + "message": "Failed to authenticate with Jira using basic authentication.", + "remediation": "Please check the user mail and API token and try again.", + }, + (9020, "JiraInvalidParameterError"): { + "message": "Missing parameters on Jira Init function.", + "remediation": "Please check the parameters and try again.", + }, } def __init__(self, code, file=None, original_exception=None, message=None): @@ -229,3 +237,17 @@ class JiraInvalidProjectKeyError(JiraBaseException): super().__init__( 9018, file=file, original_exception=original_exception, message=message ) + + +class JiraBasicAuthError(JiraBaseException): + def __init__(self, file=None, original_exception=None, message=None): + super().__init__( + 9019, file=file, original_exception=original_exception, message=message + ) + + +class JiraInvalidParameterError(JiraBaseException): + def __init__(self, file=None, original_exception=None, message=None): + super().__init__( + 9020, file=file, original_exception=original_exception, message=message + ) diff --git a/prowler/lib/outputs/jira/jira.py b/prowler/lib/outputs/jira/jira.py index 34629b7e42..616f97b820 100644 --- a/prowler/lib/outputs/jira/jira.py +++ b/prowler/lib/outputs/jira/jira.py @@ -10,6 +10,7 @@ from prowler.lib.logger import logger from prowler.lib.outputs.finding import Finding from prowler.lib.outputs.jira.exceptions.exceptions import ( JiraAuthenticationError, + JiraBasicAuthError, JiraCreateIssueError, JiraGetAccessTokenError, JiraGetAuthResponseError, @@ -21,6 +22,7 @@ from prowler.lib.outputs.jira.exceptions.exceptions import ( JiraGetProjectsError, JiraGetProjectsResponseError, JiraInvalidIssueTypeError, + JiraInvalidParameterError, JiraInvalidProjectKeyError, JiraNoProjectsError, JiraNoTokenError, @@ -84,6 +86,8 @@ class Jira: - JiraCreateIssueError: Failed to create an issue in Jira - JiraSendFindingsResponseError: Failed to send the findings to Jira - JiraTestConnectionError: Failed to test the connection + - JiraBasicAuthError: Failed to authenticate using basic auth + - JiraInvalidParameterError: The provided parameters in Init are invalid Usage: jira = Jira( @@ -98,6 +102,10 @@ class Jira: _client_id: str = None _client_secret: str = None _access_token: str = None + _user_mail: str = None + _api_token: str = None + _domain: str = None + _using_basic_auth: bool = False _refresh_token: str = None _expiration_date: int = None _cloud_id: str = None @@ -120,14 +128,31 @@ class Jira: redirect_uri: str = None, client_id: str = None, client_secret: str = None, + user_mail: str = None, + api_token: str = None, + domain: str = None, ): self._redirect_uri = redirect_uri self._client_id = client_id self._client_secret = client_secret + self._user_mail = user_mail + self._api_token = api_token + self._domain = domain self._scopes = ["read:jira-user", "read:jira-work", "write:jira-work"] - auth_url = self.auth_code_url() - authorization_code = self.input_authorization_code(auth_url) - self.get_auth(authorization_code) + # If the client mail, API token and site name are present, use basic auth + if user_mail and api_token and domain: + self._using_basic_auth = True + self.get_basic_auth() + # If the redirect URI, client ID and client secret are present, use auth code flow + elif redirect_uri and client_id and client_secret: + auth_url = self.auth_code_url() + authorization_code = self.input_authorization_code(auth_url) + self.get_auth(authorization_code) + else: + init_error = "Failed to initialize Jira object, missing parameters." + raise JiraInvalidParameterError( + message=init_error, file=os.path.basename(__file__) + ) @property def redirect_uri(self): @@ -157,6 +182,10 @@ class Jira: def scopes(self): return self._scopes + @property + def using_basic_auth(self): + return self._using_basic_auth + def get_params(self, state_encoded): return { **self.PARAMS_TEMPLATE, @@ -209,6 +238,29 @@ class Jira: """ return (datetime.now() + timedelta(seconds=seconds)).isoformat() + def get_basic_auth(self) -> None: + """Get the access token using the mail and API token. + + Returns: + - None + + Raises: + - JiraBasicAuthError: Failed to authenticate using basic auth + """ + try: + user_string = f"{self._user_mail}:{self._api_token}" + self._access_token = base64.b64encode(user_string.encode("utf-8")).decode( + "utf-8" + ) + self._cloud_id = self.get_cloud_id(self._access_token, domain=self._domain) + except Exception as e: + message_error = f"Failed to get auth using basic auth: {e}" + logger.error(message_error) + raise JiraBasicAuthError( + message=message_error, + file=os.path.basename(__file__), + ) + def get_auth(self, auth_code: str = None) -> None: """Get the access token and refresh token @@ -269,11 +321,12 @@ class Jira: file=os.path.basename(__file__), ) - def get_cloud_id(self, access_token: str = None) -> str: + def get_cloud_id(self, access_token: str = None, domain: str = None) -> str: """Get the cloud ID from Jira Args: - access_token: The access token from Jira + - domain: The site name from Jira Returns: - str: The cloud ID @@ -284,8 +337,17 @@ class Jira: - JiraGetCloudIDError: Failed to get the cloud ID from Jira """ try: - headers = {"Authorization": f"Bearer {access_token}"} - response = requests.get(self.API_TOKEN_URL, headers=headers) + if self._using_basic_auth: + headers = {"Authorization": f"Basic {access_token}"} + response = requests.get( + f"https://{domain}.atlassian.net/_edge/tenant_info", + headers=headers, + ) + response = response.json() + return response.get("cloudId") + else: + headers = {"Authorization": f"Bearer {access_token}"} + response = requests.get(self.API_TOKEN_URL, headers=headers) if response.status_code == 200: resources = response.json() @@ -326,6 +388,10 @@ class Jira: - JiraGetAccessTokenError: Failed to get the access token """ try: + # If using basic auth, return the access token + if self._using_basic_auth: + return self._access_token + if self.auth_expiration and datetime.now() < datetime.fromisoformat( self.auth_expiration ): @@ -392,6 +458,9 @@ class Jira: redirect_uri: str = None, client_id: str = None, client_secret: str = None, + user_mail: str = None, + api_token: str = None, + domain: str = None, raise_on_exception: bool = True, ) -> Connection: """Test the connection to Jira @@ -400,6 +469,9 @@ class Jira: - redirect_uri: The redirect URI - client_id: The client ID - client_secret: The client secret + - user_mail: The client mail + - api_token: The API token + - domain: The site name - raise_on_exception: Whether to raise an exception or not Returns: @@ -417,13 +489,20 @@ class Jira: redirect_uri=redirect_uri, client_id=client_id, client_secret=client_secret, + user_mail=user_mail, + api_token=api_token, + domain=domain, ) access_token = jira.get_access_token() if not access_token: return ValueError("Failed to get access token") - headers = {"Authorization": f"Bearer {access_token}"} + if jira.using_basic_auth: + headers = {"Authorization": f"Basic {access_token}"} + else: + headers = {"Authorization": f"Bearer {access_token}"} + response = requests.get( f"https://api.atlassian.com/ex/jira/{jira.cloud_id}/rest/api/3/myself", headers=headers, @@ -461,6 +540,13 @@ class Jira: if raise_on_exception: raise auth_error return Connection(error=auth_error) + except JiraBasicAuthError as basic_auth_error: + logger.error( + f"{basic_auth_error.__class__.__name__}[{basic_auth_error.__traceback__.tb_lineno}]: {basic_auth_error}" + ) + if raise_on_exception: + raise basic_auth_error + return Connection(error=basic_auth_error) except Exception as error: logger.error(f"Failed to test connection: {error}") if raise_on_exception: @@ -489,7 +575,11 @@ class Jira: if not access_token: return ValueError("Failed to get access token") - headers = {"Authorization": f"Bearer {access_token}"} + if self._using_basic_auth: + headers = {"Authorization": f"Basic {access_token}"} + else: + headers = {"Authorization": f"Bearer {access_token}"} + response = requests.get( f"https://api.atlassian.com/ex/jira/{self.cloud_id}/rest/api/3/project", headers=headers, @@ -500,7 +590,7 @@ class Jira: projects = { project["key"]: project["name"] for project in response.json() } - if len(projects) == 0: + if projects == {}: # If no projects are found logger.error("No projects found") raise JiraNoProjectsError( message="No projects found in Jira", @@ -555,7 +645,11 @@ class Jira: file=os.path.basename(__file__), ) - headers = {"Authorization": f"Bearer {access_token}"} + if self._using_basic_auth: + headers = {"Authorization": f"Basic {access_token}"} + else: + headers = {"Authorization": f"Bearer {access_token}"} + response = requests.get( f"https://api.atlassian.com/ex/jira/{self.cloud_id}/rest/api/3/issue/createmeta?projectKeys={project_key}&expand=projects.issuetypes.fields", headers=headers, @@ -1109,10 +1203,17 @@ class Jira: raise JiraInvalidIssueTypeError( message="The issue type is invalid", file=os.path.basename(__file__) ) - headers = { - "Authorization": f"Bearer {access_token}", - "Content-Type": "application/json", - } + + if self._using_basic_auth: + headers = { + "Authorization": f"Basic {access_token}", + "Content-Type": "application/json", + } + else: + headers = { + "Authorization": f"Bearer {access_token}", + "Content-Type": "application/json", + } for finding in findings: status_color = self.get_color_from_status(finding.status.value) diff --git a/prowler/lib/outputs/outputs.py b/prowler/lib/outputs/outputs.py index dfd37429dd..adada2f513 100644 --- a/prowler/lib/outputs/outputs.py +++ b/prowler/lib/outputs/outputs.py @@ -16,7 +16,11 @@ def stdout_report(finding, color, verbose, status, fix): details = finding.location.lower() if finding.check_metadata.Provider == "kubernetes": details = finding.namespace.lower() - if finding.check_metadata.Provider == "microsoft365": + if finding.check_metadata.Provider == "github": + details = finding.repository + if finding.check_metadata.Provider == "m365": + details = finding.location + if finding.check_metadata.Provider == "nhn": details = finding.location if (verbose or fix) and (not status or finding.status in status): diff --git a/prowler/lib/outputs/slack/slack.py b/prowler/lib/outputs/slack/slack.py index 24fcc646ae..1b1773dc92 100644 --- a/prowler/lib/outputs/slack/slack.py +++ b/prowler/lib/outputs/slack/slack.py @@ -71,7 +71,7 @@ class Slack: - logo (str): The logo URL associated with the provider type. """ - # TODO: support kubernetes + # TODO: support kubernetes, m365, github try: identity = "" logo = aws_logo @@ -125,7 +125,7 @@ class Slack: "type": "section", "text": { "type": "mrkdwn", - "text": f"\n:white_check_mark: *{stats['total_pass']} Passed findings* ({round(stats['total_pass'] / stats['findings_count'] * 100 , 2)}%)\n", + "text": f"\n:white_check_mark: *{stats['total_pass']} Passed findings* ({round(stats['total_pass'] / stats['findings_count'] * 100, 2)}%)\n", }, }, { @@ -145,7 +145,7 @@ class Slack: "type": "section", "text": { "type": "mrkdwn", - "text": f"\n:x: *{stats['total_fail']} Failed findings* ({round(stats['total_fail'] / stats['findings_count'] * 100 , 2)}%)\n ", + "text": f"\n:x: *{stats['total_fail']} Failed findings* ({round(stats['total_fail'] / stats['findings_count'] * 100, 2)}%)\n ", }, }, { diff --git a/prowler/lib/outputs/summary_table.py b/prowler/lib/outputs/summary_table.py index 63d4480f80..b1d9c7b8c1 100644 --- a/prowler/lib/outputs/summary_table.py +++ b/prowler/lib/outputs/summary_table.py @@ -11,6 +11,7 @@ from prowler.config.config import ( orange_color, ) from prowler.lib.logger import logger +from prowler.providers.github.models import GithubAppIdentityInfo, GithubIdentityInfo def display_summary_table( @@ -40,7 +41,17 @@ def display_summary_table( elif provider.type == "kubernetes": entity_type = "Context" audited_entities = provider.identity.context - elif provider.type == "microsoft365": + elif provider.type == "github": + if isinstance(provider.identity, GithubIdentityInfo): + entity_type = "User Name" + audited_entities = provider.identity.account_name + elif isinstance(provider.identity, GithubAppIdentityInfo): + entity_type = "App ID" + audited_entities = provider.identity.app_id + elif provider.type == "m365": + entity_type = "Tenant Domain" + audited_entities = provider.identity.tenant_domain + elif provider.type == "nhn": entity_type = "Tenant Domain" audited_entities = provider.identity.tenant_domain diff --git a/prowler/providers/microsoft365/services/admincenter/__init__.py b/prowler/lib/powershell/__init__.py similarity index 100% rename from prowler/providers/microsoft365/services/admincenter/__init__.py rename to prowler/lib/powershell/__init__.py diff --git a/prowler/lib/powershell/powershell.py b/prowler/lib/powershell/powershell.py new file mode 100644 index 0000000000..034d28fa16 --- /dev/null +++ b/prowler/lib/powershell/powershell.py @@ -0,0 +1,269 @@ +import json +import queue +import re +import subprocess +import threading +from typing import Union + +from prowler.lib.logger import logger + + +class PowerShellSession: + """ + Base class for managing PowerShell sessions. + + This class provides the core functionality for interacting with PowerShell, + including command execution, output handling, and session management. + It serves as a foundation for more specific PowerShell implementations. + + Features: + - Maintains a persistent PowerShell session + - Handles command execution and output parsing + - Provides secure input sanitization + - Manages ANSI escape sequence removal + - Supports JSON output parsing + - Implements timeout handling for long-running commands + + Attributes: + END (str): Marker string used to signal the end of PowerShell command output. + process (subprocess.Popen): The underlying PowerShell subprocess with open stdin, stdout, and stderr streams. + + Note: + This is an abstract base class that should be extended by specific implementations + for different PowerShell use cases. + """ + + END = "" + + def __init__(self): + """ + Initialize a persistent PowerShell session. + + Creates a subprocess running PowerShell with pipes for stdin, stdout, and stderr. + The session is configured to run in interactive mode with no exit. + + Note: + This is a base implementation that should be extended by subclasses + to add specific initialization logic (e.g., credential setup). + """ + powershell_cmd = "pwsh" + self.process = subprocess.Popen( + [powershell_cmd, "-NoExit", "-Command", "-"], + stdin=subprocess.PIPE, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + text=True, + bufsize=1, + ) + + def sanitize(self, credential: str) -> str: + """ + Sanitize input to prevent command injection. + + Filters the input string to allow only letters, numbers, @, periods, underscores, + plus signs, and hyphens. This is a security measure to prevent command injection + attacks through credential input. + + Args: + credential (str): The string to sanitize. + + Returns: + str: The sanitized string containing only allowed characters. + + Example: + >>> sanitize("user@domain.com!@#$") + "user@domain.com" + """ + return re.sub(r"[^a-zA-Z0-9@._+\-]", "", credential) + + def remove_ansi(self, text: str) -> str: + """ + Remove ANSI color codes and other escape sequences from PowerShell output. + + PowerShell often includes ANSI escape sequences in its output for terminal + coloring and formatting. This method strips these sequences to produce clean, + parseable text that can be processed programmatically. + + Args: + text (str): Raw text containing ANSI escape sequences from PowerShell output. + + Returns: + str: Clean text with all ANSI escape sequences removed, suitable for parsing. + + Example: + >>> remove_ansi("\x1b[32mSuccess\x1b[0m") + "Success" + """ + ansi_escape = re.compile(r"\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])") + return ansi_escape.sub("", text) + + def execute( + self, command: str, json_parse: bool = False, timeout: int = 10 + ) -> Union[str, dict]: + """ + Send a command to PowerShell and retrieve its output. + + Executes the given command in the PowerShell session, adds an END marker, + and parses the output as JSON if possible. The command is executed + asynchronously with a timeout mechanism. + + Args: + command (str): PowerShell command to execute. + + Returns: + dict: JSON-parsed output if available, otherwise an empty dictionary. + + Example: + >>> execute("Get-Process | ConvertTo-Json") + {"Name": "process1", "Id": 1234} + """ + self.process.stdin.write(f"{command}\n") + self.process.stdin.write(f"Write-Output '{self.END}'\n") + self.process.stdin.write(f"Write-Error '{self.END}'\n") + return ( + self.json_parse_output(self.read_output(timeout=timeout)) + if json_parse + else self.read_output(timeout=timeout) + ) + + def read_output(self, timeout: int = 10, default: str = "") -> str: + """ + Read output from a process with timeout functionality. + + This method reads lines from process stdout and stderr in separate threads until it encounters + the END marker for each stream. If reading stdout takes longer than the timeout period, + the method returns a default value while allowing the reading to continue in the background. + + Any errors from stderr are logged but do not affect the return value. + + Args: + timeout (int, optional): Maximum time in seconds to wait for stdout output. + Defaults to 10. + default (str, optional): Value to return if stdout timeout occurs. + Defaults to empty string. + + Returns: + str: The stdout output if available, otherwise the default value. + Errors from stderr are logged but not returned. + + Note: + This method uses daemon threads to read stdout and stderr asynchronously, + ensuring that the main thread is not blocked. + """ + output_lines = [] + result_queue = queue.Queue() + error_lines = [] + error_queue = queue.Queue() + + def reader_thread(): + try: + while True: + line = self.remove_ansi(self.process.stdout.readline().strip()) + if line == self.END: + break + output_lines.append(line) + result_queue.put("\n".join(output_lines)) + except Exception as error: + result_queue.put(str(error)) + + def error_reader_thread(): + try: + while True: + line = self.remove_ansi(self.process.stderr.readline().strip()) + if line == f"Write-Error: {self.END}": + break + error_lines.append(line) + error_queue.put("\n".join(error_lines)) + except Exception as error: + error_queue.put(str(error)) + + thread = threading.Thread(target=reader_thread) + thread.daemon = True + thread.start() + + error_thread = threading.Thread(target=error_reader_thread) + error_thread.daemon = True + error_thread.start() + + error_result = None + try: + result = result_queue.get(timeout=timeout) or default + error_result = error_queue.get(timeout=1) + except queue.Empty: + result = default + + if error_result: + logger.error(f"PowerShell error output: {error_result}") + + return result + + def json_parse_output(self, output: str) -> dict: + """ + Parse command execution output to JSON format. + + Searches for a JSON object in the output string and parses it. + The method looks for both object and array JSON structures. + + Args: + output (str): The string output from a PowerShell command. + + Returns: + dict: Parsed JSON object if found, otherwise an empty dictionary. + + Raises: + JSONDecodeError: If the JSON parsing fails. + + Example: + >>> json_parse_output('Some text {"key": "value"} more text') + {"key": "value"} + """ + if output == "": + return {} + + json_match = re.search(r"(\[.*\]|\{.*\})", output, re.DOTALL) + if not json_match: + logger.error( + f"Unexpected PowerShell output: {output}\n", + ) + else: + try: + return json.loads(json_match.group(1)) + except json.JSONDecodeError as error: + logger.error( + f"Error parsing PowerShell output as JSON: {str(error)}\n", + ) + + return {} + + def close(self) -> None: + """ + Terminate the PowerShell session. + + Sends an exit command to PowerShell and terminates the subprocess. + This method should be called when the session is no longer needed + to ensure proper cleanup of resources. + + Note: + It's important to call this method when done with the session + to prevent resource leaks. + """ + if self.process: + try: + # Send exit command + self.process.stdin.write("exit\n") + self.process.stdin.flush() + + # Terminate the process + self.process.terminate() + + # Wait for the process to finish + self.process.wait(timeout=5) + except Exception: + # If process is still running, force kill it + self.process.kill() + finally: + # Close all pipes + self.process.stdin.close() + self.process.stdout.close() + self.process.stderr.close() + self.process = None diff --git a/prowler/lib/scan/scan.py b/prowler/lib/scan/scan.py index b5b621f28e..00d063725d 100644 --- a/prowler/lib/scan/scan.py +++ b/prowler/lib/scan/scan.py @@ -1,4 +1,5 @@ import datetime +from types import SimpleNamespace from typing import Generator from prowler.lib.check.check import ( @@ -22,7 +23,7 @@ from prowler.lib.scan.exceptions.exceptions import ( ScanInvalidSeverityError, ScanInvalidStatusError, ) -from prowler.providers.common.models import Audit_Metadata +from prowler.providers.common.models import Audit_Metadata, ProviderOutputOptions from prowler.providers.common.provider import Provider @@ -38,6 +39,8 @@ class Scan: _progress: float = 0.0 _duration: int = 0 _status: list[str] = None + _bulk_checks_metadata: dict[str, CheckMetadata] + _bulk_compliance_frameworks: dict def __init__( self, @@ -88,18 +91,18 @@ class Scan: raise ScanInvalidStatusError(f"Invalid status provided: {s}.") # Load bulk compliance frameworks - bulk_compliance_frameworks = Compliance.get_bulk(provider.type) + self._bulk_compliance_frameworks = Compliance.get_bulk(provider.type) # Get bulk checks metadata for the provider - bulk_checks_metadata = CheckMetadata.get_bulk(provider.type) + self._bulk_checks_metadata = CheckMetadata.get_bulk(provider.type) # Complete checks metadata with the compliance framework specification - bulk_checks_metadata = update_checks_metadata_with_compliance( - bulk_compliance_frameworks, bulk_checks_metadata + self._bulk_checks_metadata = update_checks_metadata_with_compliance( + self._bulk_compliance_frameworks, self._bulk_checks_metadata ) # Create a list of valid categories valid_categories = set() - for check, metadata in bulk_checks_metadata.items(): + for check, metadata in self._bulk_checks_metadata.items(): for category in metadata.Categories: if category not in valid_categories: valid_categories.add(category) @@ -107,7 +110,7 @@ class Scan: # Validate checks if checks: for check in checks: - if check not in bulk_checks_metadata.keys(): + if check not in self._bulk_checks_metadata.keys(): raise ScanInvalidCheckError(f"Invalid check provided: {check}.") # Validate services @@ -121,7 +124,7 @@ class Scan: # Validate compliances if compliances: for compliance in compliances: - if compliance not in bulk_compliance_frameworks.keys(): + if compliance not in self._bulk_compliance_frameworks.keys(): raise ScanInvalidComplianceFrameworkError( f"Invalid compliance provided: {compliance}." ) @@ -147,8 +150,8 @@ class Scan: # Load checks to execute self._checks_to_execute = sorted( load_checks_to_execute( - bulk_checks_metadata=bulk_checks_metadata, - bulk_compliance_frameworks=bulk_compliance_frameworks, + bulk_checks_metadata=self._bulk_checks_metadata, + bulk_compliance_frameworks=self._bulk_compliance_frameworks, check_list=checks, service_list=services, compliance_frameworks=compliances, @@ -215,9 +218,17 @@ class Scan: def duration(self) -> int: return self._duration + @property + def bulk_checks_metadata(self) -> dict[str, CheckMetadata]: + return self._bulk_checks_metadata + + @property + def bulk_compliance_frameworks(self) -> dict[str, CheckMetadata]: + return self._bulk_compliance_frameworks + def scan( self, - custom_checks_metadata: dict = {}, + custom_checks_metadata: dict = None, ) -> Generator[tuple[float, list[Finding]], None, None]: """ Executes the scan by iterating over the checks to execute and executing each check. @@ -234,6 +245,14 @@ class Scan: Exception: If any other error occurs during the execution of a check. """ try: + # Using SimpleNamespace to create a mocked object + arguments = SimpleNamespace() + + output_options = ProviderOutputOptions( + arguments=arguments, + bulk_checks_metadata=self.bulk_checks_metadata, + ) + checks_to_execute = self.checks_to_execute # Initialize the Audit Metadata # TODO: this should be done in the provider class @@ -301,7 +320,9 @@ class Scan: try: findings.append( Finding.generate_output( - self._provider, finding, output_options=None + self.provider, + finding, + output_options=output_options, ) ) except Exception: diff --git a/prowler/providers/aws/aws_provider.py b/prowler/providers/aws/aws_provider.py index 5552af9b43..bdfc4b27d7 100644 --- a/prowler/providers/aws/aws_provider.py +++ b/prowler/providers/aws/aws_provider.py @@ -105,10 +105,10 @@ class AwsProvider(Provider): self, retries_max_attempts: int = 3, role_arn: str = None, - session_duration: int = None, + session_duration: int = 3600, external_id: str = None, role_session_name: str = None, - mfa: bool = None, + mfa: bool = False, profile: str = None, regions: set = set(), organizations_role_arn: str = None, @@ -193,6 +193,7 @@ class AwsProvider(Provider): ######## AWS Session logger.info("Generating original session ...") + # TODO: Use AwsSetUpSession ????? # Configure the initial AWS Session using the local credentials: profile or environment variables aws_session = self.setup_session( mfa=mfa, @@ -238,7 +239,6 @@ class AwsProvider(Provider): profile_region=profile_region, ) ######## - ######## AWS Session with Assume Role (if needed) if role_arn: # Validate the input role diff --git a/prowler/providers/aws/aws_regions_by_service.json b/prowler/providers/aws/aws_regions_by_service.json index ba6e72a832..43b4bb7b47 100644 --- a/prowler/providers/aws/aws_regions_by_service.json +++ b/prowler/providers/aws/aws_regions_by_service.json @@ -431,6 +431,7 @@ "ap-southeast-2", "ap-southeast-3", "ap-southeast-4", + "ap-southeast-5", "ca-central-1", "ca-west-1", "eu-central-1", @@ -749,6 +750,7 @@ "eu-central-1", "eu-west-1", "eu-west-2", + "eu-west-3", "sa-east-1", "us-east-1", "us-east-2", @@ -820,6 +822,7 @@ "ap-south-1", "ap-southeast-1", "ap-southeast-2", + "ca-central-1", "eu-central-1", "eu-north-1", "eu-west-1", @@ -938,6 +941,7 @@ "ap-southeast-3", "ap-southeast-4", "ap-southeast-5", + "ap-southeast-7", "ca-central-1", "ca-west-1", "eu-central-1", @@ -951,6 +955,7 @@ "il-central-1", "me-central-1", "me-south-1", + "mx-central-1", "sa-east-1", "us-east-1", "us-east-2", @@ -1323,6 +1328,8 @@ "eu-central-1", "eu-central-2", "eu-north-1", + "eu-south-1", + "eu-south-2", "eu-west-1", "eu-west-2", "eu-west-3", @@ -1352,6 +1359,8 @@ "eu-central-1", "eu-central-2", "eu-north-1", + "eu-south-1", + "eu-south-2", "eu-west-1", "eu-west-2", "eu-west-3", @@ -1391,6 +1400,8 @@ "eu-central-1", "eu-central-2", "eu-north-1", + "eu-south-1", + "eu-south-2", "eu-west-1", "eu-west-2", "eu-west-3", @@ -1979,10 +1990,13 @@ "ap-northeast-2", "ap-northeast-3", "ap-south-1", + "ap-south-2", "ap-southeast-1", "ap-southeast-2", "ap-southeast-3", + "ap-southeast-4", "ca-central-1", + "ca-west-1", "eu-central-1", "eu-north-1", "eu-south-1", @@ -1990,6 +2004,7 @@ "eu-west-1", "eu-west-2", "eu-west-3", + "il-central-1", "me-central-1", "me-south-1", "sa-east-1", @@ -2325,6 +2340,7 @@ "ap-southeast-2", "ap-southeast-3", "ap-southeast-4", + "ap-southeast-5", "ca-central-1", "eu-central-1", "eu-central-2", @@ -2791,6 +2807,7 @@ "ap-southeast-3", "ap-southeast-4", "ap-southeast-5", + "ap-southeast-7", "ca-central-1", "ca-west-1", "eu-central-1", @@ -2804,6 +2821,7 @@ "il-central-1", "me-central-1", "me-south-1", + "mx-central-1", "sa-east-1", "us-east-1", "us-east-2", @@ -2832,6 +2850,7 @@ "ap-southeast-3", "ap-southeast-4", "ap-southeast-5", + "ap-southeast-7", "ca-central-1", "ca-west-1", "eu-central-1", @@ -2845,6 +2864,7 @@ "il-central-1", "me-central-1", "me-south-1", + "mx-central-1", "sa-east-1", "us-east-1", "us-east-2", @@ -2880,9 +2900,7 @@ }, "cur": { "regions": { - "aws": [ - "us-east-1" - ], + "aws": [], "aws-cn": [ "cn-northwest-1" ], @@ -3022,6 +3040,7 @@ "aws": [ "ap-northeast-1", "ap-northeast-2", + "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ca-central-1", @@ -3029,6 +3048,7 @@ "eu-north-1", "eu-west-1", "eu-west-2", + "eu-west-3", "sa-east-1", "us-east-1", "us-east-2", @@ -3329,6 +3349,7 @@ "ap-southeast-2", "ca-central-1", "eu-central-1", + "eu-north-1", "eu-south-1", "eu-south-2", "eu-west-1", @@ -3404,6 +3425,7 @@ "ap-southeast-3", "ap-southeast-4", "ap-southeast-5", + "ap-southeast-7", "ca-central-1", "ca-west-1", "eu-central-1", @@ -3417,6 +3439,7 @@ "il-central-1", "me-central-1", "me-south-1", + "mx-central-1", "sa-east-1", "us-east-1", "us-east-2", @@ -3433,6 +3456,17 @@ ] } }, + "dsql": { + "regions": { + "aws": [ + "us-east-1", + "us-east-2", + "us-west-2" + ], + "aws-cn": [], + "aws-us-gov": [] + } + }, "dynamodb": { "regions": { "aws": [ @@ -4145,6 +4179,7 @@ "ap-southeast-2", "ap-southeast-3", "ca-central-1", + "ca-west-1", "eu-central-1", "eu-north-1", "eu-south-1", @@ -4173,10 +4208,12 @@ "entityresolution": { "regions": { "aws": [ + "af-south-1", "ap-northeast-1", "ap-northeast-2", "ap-southeast-1", "ap-southeast-2", + "ca-central-1", "eu-central-1", "eu-west-1", "eu-west-2", @@ -4656,6 +4693,7 @@ "ap-southeast-3", "ap-southeast-4", "ap-southeast-5", + "ap-southeast-7", "ca-central-1", "ca-west-1", "eu-central-1", @@ -4669,6 +4707,7 @@ "il-central-1", "me-central-1", "me-south-1", + "mx-central-1", "sa-east-1", "us-east-1", "us-east-2", @@ -4700,6 +4739,7 @@ "ap-southeast-3", "ap-southeast-4", "ap-southeast-5", + "ap-southeast-7", "ca-central-1", "ca-west-1", "eu-central-1", @@ -4713,6 +4753,7 @@ "il-central-1", "me-central-1", "me-south-1", + "mx-central-1", "sa-east-1", "us-east-1", "us-east-2", @@ -4744,6 +4785,7 @@ "ap-southeast-3", "ap-southeast-4", "ap-southeast-5", + "ap-southeast-7", "ca-central-1", "ca-west-1", "eu-central-1", @@ -4757,6 +4799,7 @@ "il-central-1", "me-central-1", "me-south-1", + "mx-central-1", "sa-east-1", "us-east-1", "us-east-2", @@ -4787,6 +4830,7 @@ "ap-southeast-2", "ap-southeast-3", "ap-southeast-5", + "ap-southeast-7", "ca-central-1", "ca-west-1", "eu-central-1", @@ -4800,6 +4844,7 @@ "il-central-1", "me-central-1", "me-south-1", + "mx-central-1", "sa-east-1", "us-east-1", "us-east-2", @@ -4831,6 +4876,7 @@ "ap-southeast-3", "ap-southeast-4", "ap-southeast-5", + "ap-southeast-7", "ca-central-1", "ca-west-1", "eu-central-1", @@ -4844,6 +4890,7 @@ "il-central-1", "me-central-1", "me-south-1", + "mx-central-1", "sa-east-1", "us-east-1", "us-east-2", @@ -5089,6 +5136,7 @@ "ap-southeast-3", "ap-southeast-4", "ap-southeast-5", + "ap-southeast-7", "ca-central-1", "ca-west-1", "eu-central-1", @@ -5102,6 +5150,7 @@ "il-central-1", "me-central-1", "me-south-1", + "mx-central-1", "sa-east-1", "us-east-1", "us-east-2", @@ -5193,6 +5242,7 @@ "ap-southeast-2", "ap-southeast-3", "ap-southeast-4", + "ap-southeast-5", "ca-central-1", "ca-west-1", "eu-central-1", @@ -5237,6 +5287,7 @@ "ap-southeast-3", "ap-southeast-4", "ap-southeast-5", + "ap-southeast-7", "ca-central-1", "ca-west-1", "eu-central-1", @@ -5841,6 +5892,7 @@ "ap-southeast-3", "ap-southeast-4", "ap-southeast-5", + "ap-southeast-7", "ca-central-1", "ca-west-1", "eu-central-1", @@ -5854,6 +5906,7 @@ "il-central-1", "me-central-1", "me-south-1", + "mx-central-1", "sa-east-1", "us-east-1", "us-east-2", @@ -5890,7 +5943,10 @@ "us-west-1", "us-west-2" ], - "aws-cn": [], + "aws-cn": [ + "cn-north-1", + "cn-northwest-1" + ], "aws-us-gov": [] } }, @@ -5992,6 +6048,7 @@ "ap-southeast-3", "ap-southeast-4", "ap-southeast-5", + "ap-southeast-7", "ca-central-1", "ca-west-1", "eu-central-1", @@ -6005,6 +6062,7 @@ "il-central-1", "me-central-1", "me-south-1", + "mx-central-1", "sa-east-1", "us-east-1", "us-east-2", @@ -6111,6 +6169,7 @@ "ap-southeast-3", "ap-southeast-4", "ap-southeast-5", + "ap-southeast-7", "ca-central-1", "ca-west-1", "eu-central-1", @@ -6124,6 +6183,7 @@ "il-central-1", "me-central-1", "me-south-1", + "mx-central-1", "sa-east-1", "us-east-1", "us-east-2", @@ -6346,6 +6406,7 @@ "ap-southeast-3", "ap-southeast-4", "ap-southeast-5", + "ap-southeast-7", "ca-central-1", "ca-west-1", "eu-central-1", @@ -6359,6 +6420,7 @@ "il-central-1", "me-central-1", "me-south-1", + "mx-central-1", "sa-east-1", "us-east-1", "us-east-2", @@ -6390,6 +6452,7 @@ "ap-southeast-3", "ap-southeast-4", "ap-southeast-5", + "ap-southeast-7", "ca-central-1", "ca-west-1", "eu-central-1", @@ -6403,6 +6466,7 @@ "il-central-1", "me-central-1", "me-south-1", + "mx-central-1", "sa-east-1", "us-east-1", "us-east-2", @@ -6434,6 +6498,7 @@ "ap-southeast-3", "ap-southeast-4", "ap-southeast-5", + "ap-southeast-7", "ca-central-1", "ca-west-1", "eu-central-1", @@ -6447,6 +6512,7 @@ "il-central-1", "me-central-1", "me-south-1", + "mx-central-1", "sa-east-1", "us-east-1", "us-east-2", @@ -6741,6 +6807,7 @@ "eu-west-1", "eu-west-2", "eu-west-3", + "me-central-1", "me-south-1", "sa-east-1", "us-east-1", @@ -7172,7 +7239,9 @@ "us-west-1", "us-west-2" ], - "aws-cn": [], + "aws-cn": [ + "cn-northwest-1" + ], "aws-us-gov": [ "us-gov-east-1", "us-gov-west-1" @@ -7314,6 +7383,7 @@ "ap-southeast-3", "ap-southeast-4", "ap-southeast-5", + "ap-southeast-7", "ca-central-1", "ca-west-1", "eu-central-1", @@ -7327,6 +7397,7 @@ "il-central-1", "me-central-1", "me-south-1", + "mx-central-1", "sa-east-1", "us-east-1", "us-east-2", @@ -7462,6 +7533,7 @@ "ap-southeast-3", "ap-southeast-4", "ap-southeast-5", + "ap-southeast-7", "ca-central-1", "ca-west-1", "eu-central-1", @@ -7475,6 +7547,7 @@ "il-central-1", "me-central-1", "me-south-1", + "mx-central-1", "sa-east-1", "us-east-1", "us-east-2", @@ -7528,6 +7601,7 @@ "ap-southeast-1", "ap-southeast-2", "ap-southeast-3", + "ap-southeast-5", "ca-central-1", "eu-central-1", "eu-north-1", @@ -7752,6 +7826,7 @@ "ap-east-1", "ap-northeast-1", "ap-northeast-2", + "ap-northeast-3", "ap-south-1", "ap-southeast-1", "ap-southeast-2", @@ -7806,17 +7881,6 @@ "aws-us-gov": [] } }, - "opsworkscm": { - "regions": { - "aws": [ - "ap-southeast-2", - "eu-west-1", - "us-east-1" - ], - "aws-cn": [], - "aws-us-gov": [] - } - }, "opsworkspuppetenterprise": { "regions": { "aws": [ @@ -7891,6 +7955,7 @@ "ca-central-1", "eu-central-1", "eu-north-1", + "eu-south-2", "eu-west-1", "eu-west-2", "sa-east-1", @@ -7991,6 +8056,45 @@ "ap-southeast-2", "ap-southeast-3", "ap-southeast-4", + "ap-southeast-5", + "ca-central-1", + "ca-west-1", + "eu-central-1", + "eu-central-2", + "eu-north-1", + "eu-south-1", + "eu-south-2", + "eu-west-1", + "eu-west-2", + "eu-west-3", + "il-central-1", + "me-central-1", + "me-south-1", + "sa-east-1", + "us-east-1", + "us-east-2", + "us-west-1", + "us-west-2" + ], + "aws-cn": [], + "aws-us-gov": [] + } + }, + "pca-connector-scep": { + "regions": { + "aws": [ + "af-south-1", + "ap-east-1", + "ap-northeast-1", + "ap-northeast-2", + "ap-northeast-3", + "ap-south-1", + "ap-south-2", + "ap-southeast-1", + "ap-southeast-2", + "ap-southeast-3", + "ap-southeast-4", + "ap-southeast-5", "ca-central-1", "ca-west-1", "eu-central-1", @@ -8174,6 +8278,7 @@ "il-central-1", "me-central-1", "me-south-1", + "mx-central-1", "sa-east-1", "us-east-1", "us-east-2", @@ -8235,6 +8340,7 @@ "ap-south-1", "ap-southeast-1", "ap-southeast-2", + "ap-southeast-5", "ca-central-1", "eu-central-1", "eu-north-1", @@ -8316,17 +8422,6 @@ ] } }, - "privatenetworks": { - "regions": { - "aws": [ - "us-east-1", - "us-east-2", - "us-west-2" - ], - "aws-cn": [], - "aws-us-gov": [] - } - }, "proton": { "regions": { "aws": [ @@ -8359,6 +8454,8 @@ "qbusiness": { "regions": { "aws": [ + "ap-southeast-2", + "eu-west-1", "us-east-1", "us-west-2" ], @@ -8369,6 +8466,7 @@ "qdeveloper": { "regions": { "aws": [ + "eu-central-1", "us-east-1" ], "aws-cn": [], @@ -8714,9 +8812,11 @@ "ap-northeast-1", "ap-northeast-2", "ap-south-1", + "ap-south-2", "ap-southeast-1", "ap-southeast-2", "ap-southeast-3", + "ap-southeast-7", "ca-central-1", "eu-central-1", "eu-central-2", @@ -8727,6 +8827,7 @@ "eu-west-3", "il-central-1", "me-central-1", + "mx-central-1", "sa-east-1", "us-east-1", "us-east-2", @@ -8828,6 +8929,8 @@ "ap-southeast-2", "ap-southeast-3", "ap-southeast-4", + "ap-southeast-5", + "ap-southeast-7", "ca-central-1", "ca-west-1", "eu-central-1", @@ -8841,6 +8944,7 @@ "il-central-1", "me-central-1", "me-south-1", + "mx-central-1", "sa-east-1", "us-east-1", "us-east-2", @@ -9084,7 +9188,10 @@ "cn-north-1", "cn-northwest-1" ], - "aws-us-gov": [] + "aws-us-gov": [ + "us-gov-east-1", + "us-gov-west-1" + ] } }, "route53-application-recovery-controller": { @@ -9217,7 +9324,10 @@ "us-west-1", "us-west-2" ], - "aws-cn": [], + "aws-cn": [ + "cn-north-1", + "cn-northwest-1" + ], "aws-us-gov": [ "us-gov-east-1", "us-gov-west-1" @@ -9274,6 +9384,7 @@ "regions": { "aws": [ "af-south-1", + "ap-east-1", "ap-northeast-1", "ap-northeast-2", "ap-northeast-3", @@ -9292,6 +9403,7 @@ "eu-west-1", "eu-west-2", "eu-west-3", + "il-central-1", "me-central-1", "me-south-1", "sa-east-1", @@ -9442,6 +9554,7 @@ "ap-southeast-3", "ap-southeast-4", "ap-southeast-5", + "ap-southeast-7", "ca-central-1", "ca-west-1", "eu-central-1", @@ -9455,6 +9568,7 @@ "il-central-1", "me-central-1", "me-south-1", + "mx-central-1", "sa-east-1", "us-east-1", "us-east-2", @@ -9567,6 +9681,8 @@ "ap-southeast-2", "ap-southeast-3", "ap-southeast-4", + "ap-southeast-5", + "ap-southeast-7", "ca-central-1", "ca-west-1", "eu-central-1", @@ -9580,6 +9696,7 @@ "il-central-1", "me-central-1", "me-south-1", + "mx-central-1", "sa-east-1", "us-east-1", "us-east-2", @@ -9664,6 +9781,7 @@ "eu-west-1", "eu-west-2", "eu-west-3", + "il-central-1", "me-central-1", "me-south-1", "sa-east-1", @@ -9782,6 +9900,7 @@ "aws": [ "ap-northeast-1", "ap-northeast-2", + "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ca-central-1", @@ -9789,6 +9908,8 @@ "eu-north-1", "eu-west-1", "eu-west-2", + "eu-west-3", + "sa-east-1", "us-east-1", "us-east-2", "us-west-2" @@ -10158,6 +10279,7 @@ "ap-southeast-3", "ap-southeast-4", "ap-southeast-5", + "ap-southeast-7", "ca-central-1", "ca-west-1", "eu-central-1", @@ -10171,6 +10293,7 @@ "il-central-1", "me-central-1", "me-south-1", + "mx-central-1", "sa-east-1", "us-east-1", "us-east-2", @@ -10392,11 +10515,19 @@ "socialmessaging": { "regions": { "aws": [ + "af-south-1", + "ap-northeast-1", + "ap-northeast-2", "ap-south-1", + "ap-south-2", "ap-southeast-1", + "ap-southeast-2", + "ca-central-1", "eu-central-1", + "eu-south-2", "eu-west-1", "eu-west-2", + "sa-east-1", "us-east-1", "us-east-2", "us-west-2" @@ -10619,6 +10750,7 @@ "ap-southeast-2", "ap-southeast-3", "ap-southeast-4", + "ap-southeast-5", "ca-central-1", "ca-west-1", "eu-central-1", @@ -10709,6 +10841,7 @@ "ap-southeast-3", "ap-southeast-4", "ap-southeast-5", + "ap-southeast-7", "ca-central-1", "ca-west-1", "eu-central-1", @@ -11029,6 +11162,24 @@ "aws-us-gov": [] } }, + "timestream-query": { + "regions": { + "aws": [ + "ap-northeast-1", + "ap-south-1", + "ap-southeast-2", + "eu-central-1", + "eu-west-1", + "us-east-1", + "us-east-2", + "us-west-2" + ], + "aws-cn": [], + "aws-us-gov": [ + "us-gov-west-1" + ] + } + }, "timestream-write": { "regions": { "aws": [ @@ -11126,6 +11277,7 @@ "il-central-1", "me-central-1", "me-south-1", + "mx-central-1", "sa-east-1", "us-east-1", "us-east-2", @@ -11783,6 +11935,7 @@ "eu-central-1", "eu-west-1", "eu-west-2", + "eu-west-3", "il-central-1", "sa-east-1", "us-east-1", diff --git a/prowler/providers/aws/lib/arguments/arguments.py b/prowler/providers/aws/lib/arguments/arguments.py index 7f0f7872f5..ff5a9ddf77 100644 --- a/prowler/providers/aws/lib/arguments/arguments.py +++ b/prowler/providers/aws/lib/arguments/arguments.py @@ -224,7 +224,10 @@ def validate_arguments(arguments: Namespace) -> tuple[bool, str]: def validate_bucket(bucket_name: str) -> str: """validate_bucket validates that the input bucket_name is valid""" - if search("(?!(^xn--|.+-s3alias$))^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$", bucket_name): + if search( + "^(?!^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$)(?!.*\.{2})(?!.*\.-)(?!.*-\.)(?!^xn--)(?!^sthree-)(?!^amzn-s3-demo-)(?!.*--table-s3$)[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$", + bucket_name, + ): return bucket_name else: raise ArgumentTypeError( diff --git a/prowler/providers/aws/lib/s3/s3.py b/prowler/providers/aws/lib/s3/s3.py index f399171c98..83347566bb 100644 --- a/prowler/providers/aws/lib/s3/s3.py +++ b/prowler/providers/aws/lib/s3/s3.py @@ -1,8 +1,8 @@ import tempfile from os import path from tempfile import NamedTemporaryFile +from typing import Optional -from boto3 import Session from botocore import exceptions from prowler.lib.logger import logger @@ -14,6 +14,8 @@ from prowler.providers.aws.lib.s3.exceptions.exceptions import ( S3InvalidBucketNameError, S3TestConnectionError, ) +from prowler.providers.aws.lib.session.aws_set_up_session import AwsSetUpSession +from prowler.providers.aws.models import AWSIdentityInfo, AWSSession from prowler.providers.common.models import Connection @@ -33,22 +35,68 @@ class S3: - send_to_bucket: Sends the provided outputs to the S3 bucket. """ - _session: Session + _session: AWSSession + _identity: AWSIdentityInfo _bucket_name: str _output_directory: str def __init__( - self, session: Session, bucket_name: str, output_directory: str + self, + bucket_name: str, + output_directory: str, + session: AWSSession = None, + role_arn: str = None, + session_duration: int = None, + external_id: str = None, + role_session_name: str = None, + mfa: bool = None, + profile: str = None, + aws_access_key_id: str = None, + aws_secret_access_key: str = None, + aws_session_token: Optional[str] = None, + retries_max_attempts: int = 3, + regions: set = set(), ) -> None: """ Initializes a new instance of the `S3` class. - Parameters: - - session: An instance of the `Session` class representing the AWS session. + Args: + - session: An instance of the `AWSSession` class representing the AWS session. - bucket_name: A string representing the name of the S3 bucket. - output_directory: A string representing the output directory path. + - role_arn: The ARN of the IAM role to assume. + - session_duration: The duration of the session in seconds, between 900 and 43200. + - external_id: The external ID to use when assuming the IAM role. + - role_session_name: The name of the session when assuming the IAM role. + - mfa: A boolean indicating whether MFA is enabled. + - profile: The name of the AWS CLI profile to use. + - aws_access_key_id: The AWS access key ID. + - aws_secret_access_key: The AWS secret access key. + - aws_session_token: The AWS session token, optional. + - retries_max_attempts: The maximum number of retries for the AWS client. + - regions: A set of regions to audit. + + Returns: + - None """ - self._session = session.client(__class__.__name__.lower()) + if session: + self._session = session.client(__class__.__name__.lower()) + else: + aws_setup_session = AwsSetUpSession( + role_arn=role_arn, + session_duration=session_duration, + external_id=external_id, + role_session_name=role_session_name, + mfa=mfa, + profile=profile, + aws_access_key_id=aws_access_key_id, + aws_secret_access_key=aws_secret_access_key, + aws_session_token=aws_session_token, + retries_max_attempts=retries_max_attempts, + regions=regions, + ) + self._session = aws_setup_session._session + self._bucket_name = bucket_name self._output_directory = output_directory @@ -105,6 +153,12 @@ class S3: """ try: uploaded_objects = {"success": {}, "failure": {}} + extension_to_content_type = { + ".html": "text/html", + ".csv": "text/csv", + ".ocsf.json": "application/json", + ".asff.json": "application/json", + } # Keys are regular and/or compliance for key, output_list in outputs.items(): for output in output_list: @@ -115,6 +169,7 @@ class S3: bucket_directory = self.get_object_path(self._output_directory) basename = path.basename(output.file_descriptor.name) + file_extension = output.file_extension if key == "compliance": object_name = f"{bucket_directory}/{key}/{basename}" @@ -128,7 +183,12 @@ class S3: # into the local filesystem because S3 upload file is the recommended way. # https://aws.amazon.com/blogs/developer/uploading-files-to-amazon-s3/ self._session.upload_file( - output.file_descriptor.name, self._bucket_name, object_name + Filename=output.file_descriptor.name, + Bucket=self._bucket_name, + Key=object_name, + ExtraArgs={ + "ContentType": extension_to_content_type[file_extension] + }, ) if output.file_extension in uploaded_objects["success"]: diff --git a/prowler/providers/aws/lib/security_hub/security_hub.py b/prowler/providers/aws/lib/security_hub/security_hub.py index 655487952e..00a1d1c044 100644 --- a/prowler/providers/aws/lib/security_hub/security_hub.py +++ b/prowler/providers/aws/lib/security_hub/security_hub.py @@ -1,4 +1,5 @@ from dataclasses import dataclass +from typing import Optional from boto3 import Session from botocore.client import ClientError @@ -11,6 +12,7 @@ from prowler.providers.aws.lib.security_hub.exceptions.exceptions import ( SecurityHubInvalidRegionError, SecurityHubNoEnabledRegionsError, ) +from prowler.providers.aws.lib.session.aws_set_up_session import AwsSetUpSession from prowler.providers.common.models import Connection SECURITY_HUB_INTEGRATION_NAME = "prowler/prowler" @@ -58,14 +60,63 @@ class SecurityHub: def __init__( self, - aws_session: Session, aws_account_id: str, aws_partition: str, + aws_session: Session = None, findings: list[AWSSecurityFindingFormat] = [], aws_security_hub_available_regions: list[str] = [], send_only_fails: bool = False, + role_arn: str = None, + session_duration: int = None, + external_id: str = None, + role_session_name: str = None, + mfa: bool = None, + profile: str = None, + aws_access_key_id: str = None, + aws_secret_access_key: str = None, + aws_session_token: Optional[str] = None, + retries_max_attempts: int = 3, + regions: set = set(), ) -> "SecurityHub": - self._session = aws_session + """ + Initializes the SecurityHub object with the necessary attributes. + + Args: + - aws_session (Session): AWS session object for authentication and communication with AWS services. + - aws_account_id (str): AWS account ID associated with the SecurityHub instance. + - aws_partition (str): AWS partition (e.g., aws, aws-cn, aws-us-gov) where SecurityHub is deployed. + - findings (list[AWSSecurityFindingFormat]): List of findings to filter and send to Security Hub. + - aws_security_hub_available_regions (list[str]): List of regions where Security Hub is available. + - send_only_fails (bool): Flag indicating whether to send only findings with status 'FAILED'. + - role_arn: The ARN of the IAM role to assume. + - session_duration: The duration of the session in seconds, between 900 and 43200. + - external_id: The external ID to use when assuming the IAM role. + - role_session_name: The name of the session when assuming the IAM role. + - mfa: A boolean indicating whether MFA is enabled. + - profile: The name of the AWS CLI profile to use. + - aws_access_key_id: The AWS access key ID. + - aws_secret_access_key: The AWS secret access key. + - aws_session_token: The AWS session token, optional. + - retries_max_attempts: The maximum number of retries for the AWS client. + - regions: A set of regions to audit. + """ + if aws_session: + self._session = aws_session + else: + aws_setup_session = AwsSetUpSession( + role_arn=role_arn, + session_duration=session_duration, + external_id=external_id, + role_session_name=role_session_name, + mfa=mfa, + profile=profile, + aws_access_key_id=aws_access_key_id, + aws_secret_access_key=aws_secret_access_key, + aws_session_token=aws_session_token, + retries_max_attempts=retries_max_attempts, + regions=regions, + ) + self._session = aws_setup_session._session self._aws_account_id = aws_account_id self._aws_partition = aws_partition diff --git a/prowler/providers/microsoft365/services/admincenter/admincenter_groups_not_public_visibility/__init__.py b/prowler/providers/aws/lib/session/__init__.py similarity index 100% rename from prowler/providers/microsoft365/services/admincenter/admincenter_groups_not_public_visibility/__init__.py rename to prowler/providers/aws/lib/session/__init__.py diff --git a/prowler/providers/aws/lib/session/aws_set_up_session.py b/prowler/providers/aws/lib/session/aws_set_up_session.py new file mode 100644 index 0000000000..12d8a875f9 --- /dev/null +++ b/prowler/providers/aws/lib/session/aws_set_up_session.py @@ -0,0 +1,201 @@ +from typing import Optional + +from prowler.lib.logger import logger +from prowler.providers.aws.aws_provider import ( + AwsProvider, + get_aws_region_for_sts, + parse_iam_credentials_arn, +) +from prowler.providers.aws.models import ( + AWSAssumeRoleConfiguration, + AWSAssumeRoleInfo, + AWSIdentityInfo, + AWSSession, +) + + +class AwsSetUpSession: + """ + A class to set up the AWS session. + + Attributes: + - _session: An instance of the AWSSession class. + + Methods: + - __init__: The constructor for the AwsSetUpSession class. + """ + + _session: AWSSession + _identity: AWSIdentityInfo + + def __init__( + self, + role_arn: str = None, + session_duration: int = None, + external_id: str = None, + role_session_name: str = None, + mfa: bool = None, + profile: str = None, + aws_access_key_id: str = None, + aws_secret_access_key: str = None, + aws_session_token: Optional[str] = None, + retries_max_attempts: int = 3, + regions: set = set(), + ) -> None: + """ + The constructor for the AwsSetUpSession class. + + Parameters: + - role_arn: The ARN of the IAM role to assume. + - session_duration: The duration of the session in seconds, between 900 and 43200. + - external_id: The external ID to use when assuming the IAM role. + - role_session_name: The name of the session when assuming the IAM role. + - mfa: A boolean indicating whether MFA is enabled. + - profile: The name of the AWS CLI profile to use. + - aws_access_key_id: The AWS access key ID. + - aws_secret_access_key: The AWS secret access key. + - aws_session_token: The AWS session token, optional. + - retries_max_attempts: The maximum number of retries for the AWS client. + - regions: A set of regions to audit. + + Returns: + + An instance of the AwsSetUpSession class. + """ + + validate_arguments( + role_arn=role_arn, + session_duration=session_duration, + external_id=external_id, + role_session_name=role_session_name, + profile=profile, + aws_access_key_id=aws_access_key_id, + aws_secret_access_key=aws_secret_access_key, + ) + # Setup the AWS session + aws_session = AwsProvider.setup_session( + mfa=mfa, + profile=profile, + aws_access_key_id=aws_access_key_id, + aws_secret_access_key=aws_secret_access_key, + aws_session_token=aws_session_token, + ) + session_config = AwsProvider.set_session_config(retries_max_attempts) + self._session = AWSSession( + current_session=aws_session, + session_config=session_config, + original_session=aws_session, + ) + + ######## Validate AWS credentials + # After the session is created, validate it + logger.info("Validating credentials ...") + sts_region = get_aws_region_for_sts( + self._session.current_session.region_name, regions + ) + + # Validate the credentials + caller_identity = AwsProvider.validate_credentials( + session=self._session.current_session, + aws_region=sts_region, + ) + + logger.info("Credentials validated") + ######## + + ######## AWS Provider Identity + # Get profile region + profile_region = AwsProvider.get_profile_region(self._session.current_session) + + # Set identity + self._identity = AwsProvider.set_identity( + caller_identity=caller_identity, + profile=profile, + regions=regions, + profile_region=profile_region, + ) + ######## + + ######## AWS Session with Assume Role (if needed) + if role_arn: + # Validate the input role + valid_role_arn = parse_iam_credentials_arn(role_arn) + # Set assume IAM Role information + assumed_role_information = AWSAssumeRoleInfo( + role_arn=valid_role_arn, + session_duration=session_duration, + external_id=external_id, + mfa_enabled=mfa, + role_session_name=role_session_name, + sts_region=sts_region, + ) + # Assume the IAM Role + logger.info(f"Assuming role: {assumed_role_information.role_arn.arn}") + assumed_role_credentials = self.assume_role( + self._session.current_session, + assumed_role_information, + ) + logger.info(f"IAM Role assumed: {assumed_role_information.role_arn.arn}") + + assumed_role_configuration = AWSAssumeRoleConfiguration( + info=assumed_role_information, credentials=assumed_role_credentials + ) + # Store the assumed role configuration since it'll be needed to refresh the credentials + self._assumed_role_configuration = assumed_role_configuration + + # Store a new current session using the assumed IAM Role + self._session.current_session = self.setup_assumed_session( + assumed_role_configuration.credentials + ) + logger.info("Audit session is the new session created assuming an IAM Role") + + # Modify identity for the IAM Role assumed since this will be the identity to audit with + logger.info("Setting new identity for the AWS IAM Role assumed") + self._identity.account = assumed_role_configuration.info.role_arn.account_id + self._identity.partition = ( + assumed_role_configuration.info.role_arn.partition + ) + self._identity.account_arn = f"arn:{assumed_role_configuration.info.role_arn.partition}:iam::{assumed_role_configuration.info.role_arn.account_id}:root" + ######## + + +def validate_arguments( + role_arn: str = None, + session_duration: int = None, + external_id: str = None, + role_session_name: str = None, + profile: str = None, + aws_access_key_id: str = None, + aws_secret_access_key: str = None, +) -> None: + """ + Validate the arguments provided to the S3 class." + + Parameters: + - role_arn: The ARN of the IAM role to assume. + - session_duration: The duration of the session in seconds, between 900 and 43200. + - external_id: The external ID to use when assuming the IAM role. + - role_session_name: The name of the session when assuming the IAM role. + - mfa: A boolean indicating whether MFA is enabled. + - profile: The name of the AWS CLI profile to use. + - aws_access_key_id: The AWS access key ID. + - aws_secret_access_key: The AWS secret access key. + - aws_session_token: The AWS session token, optional. + - retries_max_attempts: The maximum number of retries for the AWS client. + - regions: A set of regions to audit. + """ + + if role_arn: + if not session_duration or not external_id or not role_session_name: + raise ValueError( + "If a role ARN is provided, a session duration, an external ID, and a role session name are required." + ) + else: + if session_duration or external_id or role_session_name: + raise ValueError( + "If a session duration, an external ID, or a role session name is provided, a role ARN is required." + ) + if not profile and not aws_access_key_id and not aws_secret_access_key: + raise ValueError( + "If no role ARN is provided, a profile, an AWS access key ID, or an AWS secret access key is required." + ) diff --git a/prowler/providers/aws/services/acm/acm_certificates_with_secure_key_algorithms/acm_certificates_with_secure_key_algorithms.py b/prowler/providers/aws/services/acm/acm_certificates_with_secure_key_algorithms/acm_certificates_with_secure_key_algorithms.py index f2135cf77a..2ac5dd9199 100644 --- a/prowler/providers/aws/services/acm/acm_certificates_with_secure_key_algorithms/acm_certificates_with_secure_key_algorithms.py +++ b/prowler/providers/aws/services/acm/acm_certificates_with_secure_key_algorithms/acm_certificates_with_secure_key_algorithms.py @@ -14,7 +14,7 @@ class acm_certificates_with_secure_key_algorithms(Check): report.status = "PASS" report.status_extended = f"ACM Certificate {certificate.id} for {certificate.name} uses a secure key algorithm ({certificate.key_algorithm})." if certificate.key_algorithm in acm_client.audit_config.get( - "insecure_key_algorithms", ["RSA-1024", "P-192", "SHA-1"] + "insecure_key_algorithms", ["RSA-1024", "P-192"] ): report.status = "FAIL" report.status_extended = f"ACM Certificate {certificate.id} for {certificate.name} does not use a secure key algorithm ({certificate.key_algorithm})." diff --git a/prowler/providers/aws/services/awslambda/awslambda_function_invoke_api_operations_cloudtrail_logging_enabled/awslambda_function_invoke_api_operations_cloudtrail_logging_enabled.py b/prowler/providers/aws/services/awslambda/awslambda_function_invoke_api_operations_cloudtrail_logging_enabled/awslambda_function_invoke_api_operations_cloudtrail_logging_enabled.py index ae828fd1b2..971e7000df 100644 --- a/prowler/providers/aws/services/awslambda/awslambda_function_invoke_api_operations_cloudtrail_logging_enabled/awslambda_function_invoke_api_operations_cloudtrail_logging_enabled.py +++ b/prowler/providers/aws/services/awslambda/awslambda_function_invoke_api_operations_cloudtrail_logging_enabled/awslambda_function_invoke_api_operations_cloudtrail_logging_enabled.py @@ -16,35 +16,39 @@ class awslambda_function_invoke_api_operations_cloudtrail_logging_enabled(Check) f"Lambda function {function.name} is not recorded by CloudTrail." ) lambda_recorded_cloudtrail = False - for trail in cloudtrail_client.trails.values(): - for data_event in trail.data_events: - # classic event selectors - if not data_event.is_advanced: - if "DataResources" in data_event.event_selector: - for resource in data_event.event_selector["DataResources"]: - if resource["Type"] == "AWS::Lambda::Function" and ( - function.arn in resource["Values"] - or f"arn:{awslambda_client.audited_partition}:lambda" - in resource["Values"] + if cloudtrail_client.trails: + for trail in cloudtrail_client.trails.values(): + for data_event in trail.data_events: + # classic event selectors + if not data_event.is_advanced: + if "DataResources" in data_event.event_selector: + for resource in data_event.event_selector[ + "DataResources" + ]: + if resource["Type"] == "AWS::Lambda::Function" and ( + function.arn in resource["Values"] + or f"arn:{awslambda_client.audited_partition}:lambda" + in resource["Values"] + ): + lambda_recorded_cloudtrail = True + break + elif data_event.is_advanced: + for field_selector in data_event.event_selector[ + "FieldSelectors" + ]: + if ( + field_selector["Field"] == "resources.type" + and "AWS::Lambda::Function" + in field_selector["Equals"] ): lambda_recorded_cloudtrail = True break - elif data_event.is_advanced: - for field_selector in data_event.event_selector[ - "FieldSelectors" - ]: - if ( - field_selector["Field"] == "resources.type" - and "AWS::Lambda::Function" in field_selector["Equals"] - ): - lambda_recorded_cloudtrail = True - break + if lambda_recorded_cloudtrail: + break if lambda_recorded_cloudtrail: + report.status = "PASS" + report.status_extended = f"Lambda function {function.name} is recorded by CloudTrail trail {trail.name}." break - if lambda_recorded_cloudtrail: - report.status = "PASS" - report.status_extended = f"Lambda function {function.name} is recorded by CloudTrail trail {trail.name}." - break findings.append(report) return findings diff --git a/prowler/providers/aws/services/awslambda/awslambda_function_using_supported_runtimes/awslambda_function_using_supported_runtimes.py b/prowler/providers/aws/services/awslambda/awslambda_function_using_supported_runtimes/awslambda_function_using_supported_runtimes.py index 8845f1e54d..8fc74ea50a 100644 --- a/prowler/providers/aws/services/awslambda/awslambda_function_using_supported_runtimes/awslambda_function_using_supported_runtimes.py +++ b/prowler/providers/aws/services/awslambda/awslambda_function_using_supported_runtimes/awslambda_function_using_supported_runtimes.py @@ -8,6 +8,7 @@ default_obsolete_lambda_runtimes = [ "python3.6", "python2.7", "python3.7", + "python3.8", "nodejs4.3", "nodejs4.3-edge", "nodejs6.10", @@ -18,6 +19,7 @@ default_obsolete_lambda_runtimes = [ "nodejs14.x", "nodejs16.x", "dotnet5.0", + "dotnet6", "dotnet7", "dotnetcore1.0", "dotnetcore2.0", diff --git a/prowler/providers/aws/services/cloudformation/cloudformation_stack_cdktoolkit_bootstrap_version/cloudformation_stack_cdktoolkit_bootstrap_version.py b/prowler/providers/aws/services/cloudformation/cloudformation_stack_cdktoolkit_bootstrap_version/cloudformation_stack_cdktoolkit_bootstrap_version.py index 13a185255b..562947f074 100644 --- a/prowler/providers/aws/services/cloudformation/cloudformation_stack_cdktoolkit_bootstrap_version/cloudformation_stack_cdktoolkit_bootstrap_version.py +++ b/prowler/providers/aws/services/cloudformation/cloudformation_stack_cdktoolkit_bootstrap_version/cloudformation_stack_cdktoolkit_bootstrap_version.py @@ -30,6 +30,6 @@ class cloudformation_stack_cdktoolkit_bootstrap_version(Check): report.status = "FAIL" report.status_extended = f"CloudFormation Stack CDKToolkit has a Bootstrap version {bootstrap_version}, which is less than the recommended version {recommended_cdk_bootstrap_version}." - findings.append(report) + findings.append(report) return findings diff --git a/prowler/providers/aws/services/cloudtrail/cloudtrail_multi_region_enabled/cloudtrail_multi_region_enabled.py b/prowler/providers/aws/services/cloudtrail/cloudtrail_multi_region_enabled/cloudtrail_multi_region_enabled.py index 0c8ca0439f..16bb264e28 100644 --- a/prowler/providers/aws/services/cloudtrail/cloudtrail_multi_region_enabled/cloudtrail_multi_region_enabled.py +++ b/prowler/providers/aws/services/cloudtrail/cloudtrail_multi_region_enabled/cloudtrail_multi_region_enabled.py @@ -9,6 +9,7 @@ class cloudtrail_multi_region_enabled(Check): findings = [] if cloudtrail_client.trails is not None: for region in cloudtrail_client.regional_clients.keys(): + trail_is_logging = False for trail in cloudtrail_client.trails.values(): if trail.region == region or trail.is_multiregion: report = Check_Report_AWS( @@ -16,6 +17,7 @@ class cloudtrail_multi_region_enabled(Check): ) report.region = region if trail.is_logging: + trail_is_logging = True report.status = "PASS" if trail.is_multiregion: report.status_extended = f"Trail {trail.name} is multiregion and it is logging." @@ -25,16 +27,20 @@ class cloudtrail_multi_region_enabled(Check): # Store the finding and exit the loop findings.append(report) break - else: - report.status = "FAIL" - report.status_extended = ( - "No CloudTrail trails enabled with logging were found." - ) - report.resource_arn = ( - cloudtrail_client._get_trail_arn_template(region) - ) - report.resource_id = cloudtrail_client.audited_account # If there are no trails logging it is needed to store the FAIL once all the trails have been checked - if report.status == "FAIL": + if not trail_is_logging: + report = Check_Report_AWS( + metadata=self.metadata(), + resource={}, + ) + report.status = "FAIL" + report.status_extended = ( + "No CloudTrail trails enabled with logging were found." + ) + report.region = region + report.resource_arn = cloudtrail_client._get_trail_arn_template( + region + ) + report.resource_id = cloudtrail_client.audited_account findings.append(report) return findings diff --git a/prowler/providers/aws/services/codebuild/codebuild_project_logging_enabled/codebuild_project_logging_enabled.py b/prowler/providers/aws/services/codebuild/codebuild_project_logging_enabled/codebuild_project_logging_enabled.py index 2bd22e09ee..22892886f2 100644 --- a/prowler/providers/aws/services/codebuild/codebuild_project_logging_enabled/codebuild_project_logging_enabled.py +++ b/prowler/providers/aws/services/codebuild/codebuild_project_logging_enabled/codebuild_project_logging_enabled.py @@ -9,11 +9,16 @@ class codebuild_project_logging_enabled(Check): report = Check_Report_AWS(metadata=self.metadata(), resource=project) report.status = "PASS" - if project.cloudwatch_logs.enabled and project.s3_logs.enabled: - report.status_extended = f"CodeBuild project {project.name} has enabled CloudWartch logs in log group {project.cloudwatch_logs.group_name} and S3 logs in bucket {project.s3_logs.bucket_location}." - elif project.cloudwatch_logs.enabled: + cw_logs_enabled = ( + project.cloudwatch_logs and project.cloudwatch_logs.enabled + ) + s3_logs_enabled = project.s3_logs and project.s3_logs.enabled + + if cw_logs_enabled and s3_logs_enabled: + report.status_extended = f"CodeBuild project {project.name} has enabled CloudWatch logs in log group {project.cloudwatch_logs.group_name} and S3 logs in bucket {project.s3_logs.bucket_location}." + elif cw_logs_enabled: report.status_extended = f"CodeBuild project {project.name} has CloudWatch logging enabled in log group {project.cloudwatch_logs.group_name}." - elif project.s3_logs.enabled: + elif s3_logs_enabled: report.status_extended = f"CodeBuild project {project.name} has S3 logging enabled in bucket {project.s3_logs.bucket_location}." else: report.status = "FAIL" diff --git a/prowler/providers/aws/services/codebuild/codebuild_project_s3_logs_encrypted/codebuild_project_s3_logs_encrypted.py b/prowler/providers/aws/services/codebuild/codebuild_project_s3_logs_encrypted/codebuild_project_s3_logs_encrypted.py index 8fe97ebd9a..7bbd128686 100644 --- a/prowler/providers/aws/services/codebuild/codebuild_project_s3_logs_encrypted/codebuild_project_s3_logs_encrypted.py +++ b/prowler/providers/aws/services/codebuild/codebuild_project_s3_logs_encrypted/codebuild_project_s3_logs_encrypted.py @@ -6,7 +6,7 @@ class codebuild_project_s3_logs_encrypted(Check): def execute(self): findings = [] for project in codebuild_client.projects.values(): - if project.s3_logs.enabled: + if project.s3_logs and project.s3_logs.enabled: report = Check_Report_AWS(metadata=self.metadata(), resource=project) report.status = "PASS" report.status_extended = f"CodeBuild project {project.name} has encrypted S3 logs stored in {project.s3_logs.bucket_location}." diff --git a/prowler/providers/aws/services/cognito/cognito_user_pool_blocks_compromised_credentials_sign_in_attempts/cognito_user_pool_blocks_compromised_credentials_sign_in_attempts.py b/prowler/providers/aws/services/cognito/cognito_user_pool_blocks_compromised_credentials_sign_in_attempts/cognito_user_pool_blocks_compromised_credentials_sign_in_attempts.py index 0552c01c57..b0eee2b4b3 100644 --- a/prowler/providers/aws/services/cognito/cognito_user_pool_blocks_compromised_credentials_sign_in_attempts/cognito_user_pool_blocks_compromised_credentials_sign_in_attempts.py +++ b/prowler/providers/aws/services/cognito/cognito_user_pool_blocks_compromised_credentials_sign_in_attempts/cognito_user_pool_blocks_compromised_credentials_sign_in_attempts.py @@ -9,6 +9,7 @@ class cognito_user_pool_blocks_compromised_credentials_sign_in_attempts(Check): report = Check_Report_AWS(metadata=self.metadata(), resource=pool) if ( pool.advanced_security_mode == "ENFORCED" + and pool.risk_configuration and "SIGN_IN" in pool.risk_configuration.compromised_credentials_risk_configuration.event_filter and pool.risk_configuration.compromised_credentials_risk_configuration.actions diff --git a/prowler/providers/aws/services/cognito/cognito_user_pool_blocks_potential_malicious_sign_in_attempts/cognito_user_pool_blocks_potential_malicious_sign_in_attempts.py b/prowler/providers/aws/services/cognito/cognito_user_pool_blocks_potential_malicious_sign_in_attempts/cognito_user_pool_blocks_potential_malicious_sign_in_attempts.py index 6d0baeded4..6ed3f34d75 100644 --- a/prowler/providers/aws/services/cognito/cognito_user_pool_blocks_potential_malicious_sign_in_attempts/cognito_user_pool_blocks_potential_malicious_sign_in_attempts.py +++ b/prowler/providers/aws/services/cognito/cognito_user_pool_blocks_potential_malicious_sign_in_attempts/cognito_user_pool_blocks_potential_malicious_sign_in_attempts.py @@ -7,18 +7,22 @@ class cognito_user_pool_blocks_potential_malicious_sign_in_attempts(Check): findings = [] for pool in cognito_idp_client.user_pools.values(): report = Check_Report_AWS(metadata=self.metadata(), resource=pool) - if pool.advanced_security_mode == "ENFORCED" and all( - [ - pool.risk_configuration.account_takeover_risk_configuration.low_action - and pool.risk_configuration.account_takeover_risk_configuration.low_action - == "BLOCK", - pool.risk_configuration.account_takeover_risk_configuration.medium_action - and pool.risk_configuration.account_takeover_risk_configuration.medium_action - == "BLOCK", - pool.risk_configuration.account_takeover_risk_configuration.high_action - and pool.risk_configuration.account_takeover_risk_configuration.high_action - == "BLOCK", - ] + if ( + pool.advanced_security_mode == "ENFORCED" + and pool.risk_configuration + and all( + [ + pool.risk_configuration.account_takeover_risk_configuration.low_action + and pool.risk_configuration.account_takeover_risk_configuration.low_action + == "BLOCK", + pool.risk_configuration.account_takeover_risk_configuration.medium_action + and pool.risk_configuration.account_takeover_risk_configuration.medium_action + == "BLOCK", + pool.risk_configuration.account_takeover_risk_configuration.high_action + and pool.risk_configuration.account_takeover_risk_configuration.high_action + == "BLOCK", + ] + ) ): report.status = "PASS" report.status_extended = f"User pool {pool.name} blocks all potential malicious sign-in attempts." diff --git a/prowler/providers/aws/services/ec2/ec2_instance_port_cifs_exposed_to_internet/ec2_instance_port_cifs_exposed_to_internet.metadata.json b/prowler/providers/aws/services/ec2/ec2_instance_port_cifs_exposed_to_internet/ec2_instance_port_cifs_exposed_to_internet.metadata.json index bc34ca0804..c37e3752c3 100644 --- a/prowler/providers/aws/services/ec2/ec2_instance_port_cifs_exposed_to_internet/ec2_instance_port_cifs_exposed_to_internet.metadata.json +++ b/prowler/providers/aws/services/ec2/ec2_instance_port_cifs_exposed_to_internet/ec2_instance_port_cifs_exposed_to_internet.metadata.json @@ -21,7 +21,7 @@ "Terraform": "" }, "Recommendation": { - "Text": "Modify the security group to remove the rule that allows ingress from the internet to TCP port 389 or 636 (LDAP).", + "Text": "Modify the security group to remove the rule that allows ingress from the internet to TCP port 139 or 445 (CIFS).", "Url": "https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html" } }, diff --git a/prowler/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_all_ports/ec2_securitygroup_allow_ingress_from_internet_to_all_ports.metadata.json b/prowler/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_all_ports/ec2_securitygroup_allow_ingress_from_internet_to_all_ports.metadata.json index c0dfb55761..6b295afc6d 100644 --- a/prowler/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_all_ports/ec2_securitygroup_allow_ingress_from_internet_to_all_ports.metadata.json +++ b/prowler/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_all_ports/ec2_securitygroup_allow_ingress_from_internet_to_all_ports.metadata.json @@ -8,7 +8,7 @@ "ServiceName": "ec2", "SubServiceName": "securitygroup", "ResourceIdTemplate": "arn:partition:service:region:account-id:resource-id", - "Severity": "high", + "Severity": "critical", "ResourceType": "AwsEc2SecurityGroup", "Description": "Ensure no security groups allow ingress from 0.0.0.0/0 or ::/0 to all ports.", "Risk": "If Security groups are not properly configured the attack surface is increased. An attacker could exploit this misconfiguration to gain unauthorized access to resources.", diff --git a/prowler/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_all_ports/ec2_securitygroup_allow_ingress_from_internet_to_all_ports.py b/prowler/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_all_ports/ec2_securitygroup_allow_ingress_from_internet_to_all_ports.py index 943cc9b9d0..e9e7d47609 100644 --- a/prowler/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_all_ports/ec2_securitygroup_allow_ingress_from_internet_to_all_ports.py +++ b/prowler/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_all_ports/ec2_securitygroup_allow_ingress_from_internet_to_all_ports.py @@ -1,4 +1,4 @@ -from prowler.lib.check.models import Check, Check_Report_AWS +from prowler.lib.check.models import Check, Check_Report_AWS, Severity from prowler.providers.aws.services.ec2.ec2_client import ec2_client from prowler.providers.aws.services.ec2.lib.security_groups import check_security_group from prowler.providers.aws.services.vpc.vpc_client import vpc_client @@ -9,14 +9,17 @@ class ec2_securitygroup_allow_ingress_from_internet_to_all_ports(Check): findings = [] for security_group_arn, security_group in ec2_client.security_groups.items(): # Check if ignoring flag is set and if the VPC and the SG is in use - if ec2_client.provider.scan_unused_services or ( + sg_in_use = ( security_group.vpc_id in vpc_client.vpcs and vpc_client.vpcs[security_group.vpc_id].in_use and len(security_group.network_interfaces) > 0 - ): + ) + if ec2_client.provider.scan_unused_services or sg_in_use: report = Check_Report_AWS( metadata=self.metadata(), resource=security_group ) + if not sg_in_use: + report.check_metadata.Severity = Severity.high report.resource_details = security_group.name report.status = "PASS" report.status_extended = f"Security group {security_group.name} ({security_group.id}) does not have all ports open to the Internet." diff --git a/prowler/providers/aws/services/ec2/ec2_service.py b/prowler/providers/aws/services/ec2/ec2_service.py index 48d1f39660..2336f43478 100644 --- a/prowler/providers/aws/services/ec2/ec2_service.py +++ b/prowler/providers/aws/services/ec2/ec2_service.py @@ -102,6 +102,7 @@ class EC2(AWSService): security_groups=[ sg["GroupId"] for sg in instance.get("SecurityGroups", []) + if isinstance(sg, dict) and "GroupId" in sg ], subnet_id=instance.get("SubnetId", ""), network_interfaces=enis, @@ -627,6 +628,7 @@ class EC2(AWSService): self.transit_gateways[transit_gateway["TransitGatewayArn"]] = ( TransitGateway( id=transit_gateway["TransitGatewayId"], + arn=transit_gateway["TransitGatewayArn"], auto_accept_shared_attachments=( transit_gateway["Options"][ "AutoAcceptSharedAttachments" @@ -798,6 +800,7 @@ class VpnEndpoint(BaseModel): class TransitGateway(BaseModel): id: str + arn: str auto_accept_shared_attachments: bool region: str tags: Optional[list] = [] diff --git a/prowler/providers/aws/services/ec2/lib/instance.py b/prowler/providers/aws/services/ec2/lib/instance.py index bef05ad7c5..90c092e58f 100644 --- a/prowler/providers/aws/services/ec2/lib/instance.py +++ b/prowler/providers/aws/services/ec2/lib/instance.py @@ -21,7 +21,9 @@ def get_instance_public_status( if instance.public_ip: status = f"Instance {instance.id} has {service} exposed to 0.0.0.0/0 on public IP address {instance.public_ip} but it is placed in a private subnet {instance.subnet_id}." severity = Severity.high - if vpc_subnets[instance.subnet_id].public: + if instance.subnet_id not in vpc_subnets: + status = f"Instance {instance.id} has {service} exposed to 0.0.0.0/0 on public IP address {instance.public_ip} and it is placed in an unknown subnet {instance.subnet_id}." + elif vpc_subnets[instance.subnet_id].public: status = f"Instance {instance.id} has {service} exposed to 0.0.0.0/0 on public IP address {instance.public_ip} in public subnet {instance.subnet_id}." severity = Severity.critical diff --git a/prowler/providers/microsoft365/services/admincenter/admincenter_settings_password_never_expire/__init__.py b/prowler/providers/aws/services/efs/efs_multi_az_enabled/__init__.py similarity index 100% rename from prowler/providers/microsoft365/services/admincenter/admincenter_settings_password_never_expire/__init__.py rename to prowler/providers/aws/services/efs/efs_multi_az_enabled/__init__.py diff --git a/prowler/providers/aws/services/fms/fms_policy_compliant/fms_policy_compliant.py b/prowler/providers/aws/services/fms/fms_policy_compliant/fms_policy_compliant.py index a36cd9f8e0..ebe1660aff 100644 --- a/prowler/providers/aws/services/fms/fms_policy_compliant/fms_policy_compliant.py +++ b/prowler/providers/aws/services/fms/fms_policy_compliant/fms_policy_compliant.py @@ -6,9 +6,7 @@ class fms_policy_compliant(Check): def execute(self): findings = [] if fms_client.fms_admin_account: - report = Check_Report_AWS( - metadata=self.metadata(), resource=fms_client.fms_policies - ) + report = Check_Report_AWS(metadata=self.metadata(), resource={}) report.region = fms_client.region report.resource_arn = fms_client.policy_arn_template report.resource_id = fms_client.audited_account diff --git a/prowler/providers/aws/services/iam/iam_check_saml_providers_sts/iam_check_saml_providers_sts.py b/prowler/providers/aws/services/iam/iam_check_saml_providers_sts/iam_check_saml_providers_sts.py index 7d9cc26a90..3cf2e70a6c 100644 --- a/prowler/providers/aws/services/iam/iam_check_saml_providers_sts/iam_check_saml_providers_sts.py +++ b/prowler/providers/aws/services/iam/iam_check_saml_providers_sts/iam_check_saml_providers_sts.py @@ -5,22 +5,28 @@ from prowler.providers.aws.services.iam.iam_client import iam_client class iam_check_saml_providers_sts(Check): def execute(self) -> Check_Report_AWS: findings = [] - if not iam_client.saml_providers and iam_client.saml_providers is not None: - report = Check_Report_AWS( - metadata=self.metadata(), resource=iam_client.saml_providers - ) - report.resource_id = iam_client.audited_account - report.resource_arn = iam_client.audited_account_arn - report.region = iam_client.region - report.status = "FAIL" - report.status_extended = "No SAML Providers found." - findings.append(report) + if iam_client.saml_providers is not None: + if not iam_client.saml_providers: + report = Check_Report_AWS( + metadata=self.metadata(), resource=iam_client.saml_providers + ) + report.resource_id = iam_client.audited_account + report.resource_arn = iam_client.audited_account_arn + report.region = iam_client.region + report.status = "FAIL" + report.status_extended = "No SAML Providers found." + findings.append(report) - for provider in iam_client.saml_providers.values(): - report = Check_Report_AWS(metadata=self.metadata(), resource=provider) - report.region = iam_client.region - report.status = "PASS" - report.status_extended = f"SAML Provider {provider.name} has been found." - findings.append(report) + else: + for provider in iam_client.saml_providers.values(): + report = Check_Report_AWS( + metadata=self.metadata(), resource=provider + ) + report.region = iam_client.region + report.status = "PASS" + report.status_extended = ( + f"SAML Provider {provider.name} has been found." + ) + findings.append(report) return findings diff --git a/prowler/providers/aws/services/iam/iam_service.py b/prowler/providers/aws/services/iam/iam_service.py index dc3ddd7bc8..dafd86017c 100644 --- a/prowler/providers/aws/services/iam/iam_service.py +++ b/prowler/providers/aws/services/iam/iam_service.py @@ -286,7 +286,7 @@ class IAM(AWSService): return stored_password_policy def _get_users(self): - logger.info("IAM - List Users...") + logger.info("IAM - Get Users...") try: get_users_paginator = self.client.get_paginator("list_users") users = [] @@ -469,7 +469,7 @@ class IAM(AWSService): ) def _list_attached_role_policies(self): - logger.info("IAM - List Attached User Policies...") + logger.info("IAM - List Attached Role Policies...") try: if self.roles: for role in self.roles: @@ -712,7 +712,7 @@ class IAM(AWSService): return roles def _list_entities_for_policy(self, policy_arn): - logger.info("IAM - List Entities Role For Policy...") + logger.info("IAM - List Entities For Policy...") try: entities = { "Users": [], @@ -880,9 +880,14 @@ class IAM(AWSService): SAMLProviderArn=resource.arn ).get("Tags", []) except Exception as error: - logger.error( - f"{self.region} -- {error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" - ) + if error.response["Error"]["Code"] == "NoSuchEntityException": + logger.warning( + f"{self.region} -- {error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + else: + logger.error( + f"{self.region} -- {error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) def _get_last_accessed_services(self): logger.info("IAM - Getting Last Accessed Services ...") diff --git a/prowler/providers/aws/services/iam/lib/policy.py b/prowler/providers/aws/services/iam/lib/policy.py index b45dd1bd30..e023b137b5 100644 --- a/prowler/providers/aws/services/iam/lib/policy.py +++ b/prowler/providers/aws/services/iam/lib/policy.py @@ -1,4 +1,5 @@ from ipaddress import ip_address, ip_network +import re from prowler.lib.logger import logger from prowler.providers.aws.aws_provider import read_aws_regions_file @@ -415,6 +416,55 @@ def is_condition_block_restrictive_organization( return is_condition_valid +def is_condition_block_restrictive_sns_endpoint( + condition_statement: dict, +): + """ + is_condition_block_restrictive_sns_endpoint parses the IAM Condition policy block and returns True if the condition_statement is restrictive for an endpoint, False if not. + + @param condition_statement: dict with an IAM Condition block, e.g.: + { + "StringLike": { + "SNS:Endpoint": "https://events.pagerduty.com/integration//enqueue" + } + } + + """ + is_condition_valid = False + + # The conditions must be defined in lowercase since the context key names are not case-sensitive. + # For example, including the aws:PrincipalOrgID context key is equivalent to testing for AWS:PrincipalOrgID + # https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html + valid_condition_options = { + "StringEquals": [ + "sns:endpoint", + ], + "StringLike": [ + "sns:endpoint", + ], + } + + for condition_operator, condition_operator_key in valid_condition_options.items(): + if condition_operator in condition_statement: + # https://docs.aws.amazon.com/sns/latest/dg/sns-using-identity-based-policies.html#sns-policy-keys + # sns:endpoint - The URL, email address, or ARN from a Subscribe request or a previously confirmed subscription. + pattern = re.compile(r".+@[^*]+|^https:\/\/[^*]+|^arn:aws:sns:[^*]+") + for value in condition_operator_key: + # We need to transform the condition_statement into lowercase + condition_statement[condition_operator] = { + k.lower(): v + for k, v in condition_statement[condition_operator].items() + } + + if value in condition_statement[condition_operator]: + if pattern.fullmatch( + condition_statement[condition_operator][value] + ): + is_condition_valid = True + + return is_condition_valid + + def process_actions(effect, actions, target_set): """ process_actions processes the actions in the policy. diff --git a/prowler/providers/aws/services/inspector2/inspector2_active_findings_exist/inspector2_active_findings_exist.py b/prowler/providers/aws/services/inspector2/inspector2_active_findings_exist/inspector2_active_findings_exist.py index 808fee8d78..1e49967899 100644 --- a/prowler/providers/aws/services/inspector2/inspector2_active_findings_exist/inspector2_active_findings_exist.py +++ b/prowler/providers/aws/services/inspector2/inspector2_active_findings_exist/inspector2_active_findings_exist.py @@ -8,7 +8,7 @@ class inspector2_active_findings_exist(Check): def execute(self): findings = [] for inspector in inspector2_client.inspectors: - if inspector.status == "ENABLED": + if inspector.status == "ENABLED" and inspector.active_findings is not None: report = Check_Report_AWS(metadata=self.metadata(), resource=inspector) report.status = "PASS" report.status_extended = ( diff --git a/prowler/providers/aws/services/inspector2/inspector2_service.py b/prowler/providers/aws/services/inspector2/inspector2_service.py index 5bebe96fcd..52a84fa9d5 100644 --- a/prowler/providers/aws/services/inspector2/inspector2_service.py +++ b/prowler/providers/aws/services/inspector2/inspector2_service.py @@ -69,4 +69,4 @@ class Inspector(BaseModel): ecr_status: str lambda_status: str lambda_code_status: str - active_findings: bool = False + active_findings: bool = None diff --git a/prowler/providers/microsoft365/services/admincenter/admincenter_users_admins_reduced_license_footprint/__init__.py b/prowler/providers/aws/services/opensearch/opensearch_service_domains_access_control_enabled/__init__.py similarity index 100% rename from prowler/providers/microsoft365/services/admincenter/admincenter_users_admins_reduced_license_footprint/__init__.py rename to prowler/providers/aws/services/opensearch/opensearch_service_domains_access_control_enabled/__init__.py diff --git a/prowler/providers/aws/services/rds/rds_cluster_critical_event_subscription/rds_cluster_critical_event_subscription.py b/prowler/providers/aws/services/rds/rds_cluster_critical_event_subscription/rds_cluster_critical_event_subscription.py index 336d2f3d80..4caff14289 100644 --- a/prowler/providers/aws/services/rds/rds_cluster_critical_event_subscription/rds_cluster_critical_event_subscription.py +++ b/prowler/providers/aws/services/rds/rds_cluster_critical_event_subscription/rds_cluster_critical_event_subscription.py @@ -13,23 +13,29 @@ class rds_cluster_critical_event_subscription(Check): report.resource_id = rds_client.audited_account report.resource_arn = rds_client._get_rds_arn_template(db_event.region) if db_event.source_type == "db-cluster" and db_event.enabled: - report = Check_Report_AWS( - metadata=self.metadata(), resource=db_event - ) if db_event.event_list == [] or set(db_event.event_list) == { "maintenance", "failure", }: + report = Check_Report_AWS( + metadata=self.metadata(), resource=db_event + ) report.status = "PASS" report.status_extended = "RDS cluster events are subscribed." elif db_event.event_list == ["maintenance"]: + report = Check_Report_AWS( + metadata=self.metadata(), resource=db_event + ) report.status = "FAIL" report.status_extended = ( "RDS cluster event category of failure is not subscribed." ) elif db_event.event_list == ["failure"]: + report = Check_Report_AWS( + metadata=self.metadata(), resource=db_event + ) report.status = "FAIL" report.status_extended = "RDS cluster event category of maintenance is not subscribed." diff --git a/prowler/providers/aws/services/rds/rds_service.py b/prowler/providers/aws/services/rds/rds_service.py index 320b997bba..9e2a921bdd 100644 --- a/prowler/providers/aws/services/rds/rds_service.py +++ b/prowler/providers/aws/services/rds/rds_service.py @@ -149,24 +149,34 @@ class RDS(AWSService): "describe_certificates" ) if instance.ca_cert: - for page in describe_db_certificates_paginator.paginate( - CertificateIdentifier=instance.ca_cert - ): - for certificate in page["Certificates"]: - instance.cert.append( - Certificate( - id=certificate["CertificateIdentifier"], - arn=certificate["CertificateArn"], - type=certificate["CertificateType"], - valid_from=certificate["ValidFrom"], - valid_till=certificate["ValidTill"], - customer_override=certificate[ - "CustomerOverride" - ], - customer_override_valid_till=certificate.get( - "CustomerOverrideValidTill" - ), + try: + for page in describe_db_certificates_paginator.paginate( + CertificateIdentifier=instance.ca_cert + ): + for certificate in page["Certificates"]: + instance.cert.append( + Certificate( + id=certificate["CertificateIdentifier"], + arn=certificate["CertificateArn"], + type=certificate["CertificateType"], + valid_from=certificate["ValidFrom"], + valid_till=certificate["ValidTill"], + customer_override=certificate[ + "CustomerOverride" + ], + customer_override_valid_till=certificate.get( + "CustomerOverrideValidTill" + ), + ) ) + except ClientError as error: + if error.response["Error"]["Code"] == "CertificateNotFound": + logger.warning( + f"{regional_client.region} -- {error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + else: + logger.error( + f"{regional_client.region} -- {error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" ) except Exception as error: diff --git a/prowler/providers/aws/services/redshift/redshift_cluster_multi_az_enabled/redshift_cluster_multi_az_enabled.py b/prowler/providers/aws/services/redshift/redshift_cluster_multi_az_enabled/redshift_cluster_multi_az_enabled.py index 63500e0360..ef06babdf9 100644 --- a/prowler/providers/aws/services/redshift/redshift_cluster_multi_az_enabled/redshift_cluster_multi_az_enabled.py +++ b/prowler/providers/aws/services/redshift/redshift_cluster_multi_az_enabled/redshift_cluster_multi_az_enabled.py @@ -11,7 +11,7 @@ class redshift_cluster_multi_az_enabled(Check): report.status_extended = ( f"Redshift Cluster {cluster.id} does not have Multi-AZ enabled." ) - if cluster.multi_az: + if cluster.multi_az == "Enabled": report.status = "PASS" report.status_extended = ( f"Redshift Cluster {cluster.id} has Multi-AZ enabled." diff --git a/prowler/providers/aws/services/redshift/redshift_cluster_public_access/redshift_cluster_public_access.py b/prowler/providers/aws/services/redshift/redshift_cluster_public_access/redshift_cluster_public_access.py index 2b4e00c8d3..275d36da26 100644 --- a/prowler/providers/aws/services/redshift/redshift_cluster_public_access/redshift_cluster_public_access.py +++ b/prowler/providers/aws/services/redshift/redshift_cluster_public_access/redshift_cluster_public_access.py @@ -19,7 +19,8 @@ class redshift_cluster_public_access(Check): report.status_extended = f"Redshift Cluster {cluster.id} has the endpoint {cluster.endpoint_address} set as publicly accessible but is not publicly exposed." # 2. Check if Redshift Cluster is in a public subnet if any( - subnet in vpc_client.subnets and vpc_client.subnets[subnet].public + subnet in vpc_client.vpc_subnets + and vpc_client.vpc_subnets[subnet].public for subnet in cluster.subnets ): report.status_extended = f"Redshift Cluster {cluster.id} has the endpoint {cluster.endpoint_address} set as publicly accessible in a public subnet but is not publicly exposed." diff --git a/prowler/providers/aws/services/redshift/redshift_service.py b/prowler/providers/aws/services/redshift/redshift_service.py index 03a6b92439..b0f4a06421 100644 --- a/prowler/providers/aws/services/redshift/redshift_service.py +++ b/prowler/providers/aws/services/redshift/redshift_service.py @@ -45,7 +45,7 @@ class Redshift(AWSService): "AllowVersionUpgrade", False ), encrypted=cluster.get("Encrypted", False), - multi_az=cluster.get("MultiAZ", False), + multi_az=cluster.get("MultiAZ", ""), region=regional_client.region, tags=cluster.get("Tags"), master_username=cluster.get("MasterUsername", ""), @@ -124,7 +124,7 @@ class Redshift(AWSService): try: regional_client = self.regional_clients[cluster.region] cluster_parameter_groups = regional_client.describe_cluster_parameters( - ClusterParameterGroupName=cluster.parameter_group_name + ParameterGroupName=cluster.parameter_group_name ) for parameter_group in cluster_parameter_groups["Parameters"]: if parameter_group["ParameterName"].lower() == "require_ssl": @@ -145,7 +145,7 @@ class Cluster(BaseModel): vpc_security_groups: list = [] public_access: bool = False encrypted: bool = False - multi_az: bool = False + multi_az: str = None master_username: str = None database_name: str = None endpoint_address: str = None diff --git a/prowler/providers/aws/services/route53/route53_service.py b/prowler/providers/aws/services/route53/route53_service.py index 2c6a2cd786..4cc744c985 100644 --- a/prowler/providers/aws/services/route53/route53_service.py +++ b/prowler/providers/aws/services/route53/route53_service.py @@ -86,13 +86,14 @@ class Route53(AWSService): ) for page in list_query_logging_configs_paginator.paginate(): for logging_config in page["QueryLoggingConfigs"]: - self.hosted_zones[hosted_zone.id].logging_config = ( - LoggingConfig( - cloudwatch_log_group_arn=logging_config[ - "CloudWatchLogsLogGroupArn" - ] + if logging_config["HostedZoneId"] == hosted_zone.id: + self.hosted_zones[hosted_zone.id].logging_config = ( + LoggingConfig( + cloudwatch_log_group_arn=logging_config[ + "CloudWatchLogsLogGroupArn" + ] + ) ) - ) except Exception as error: logger.error( diff --git a/prowler/providers/aws/services/s3/s3_account_level_public_access_blocks/s3_account_level_public_access_blocks.py b/prowler/providers/aws/services/s3/s3_account_level_public_access_blocks/s3_account_level_public_access_blocks.py index 5e027c1510..bbb123fdfb 100644 --- a/prowler/providers/aws/services/s3/s3_account_level_public_access_blocks/s3_account_level_public_access_blocks.py +++ b/prowler/providers/aws/services/s3/s3_account_level_public_access_blocks/s3_account_level_public_access_blocks.py @@ -6,27 +6,28 @@ from prowler.providers.aws.services.s3.s3control_client import s3control_client class s3_account_level_public_access_blocks(Check): def execute(self): findings = [] - report = Check_Report_AWS( - metadata=self.metadata(), - resource=s3control_client.account_public_access_block, - ) - if ( - s3control_client.account_public_access_block - and s3control_client.account_public_access_block.ignore_public_acls - and s3control_client.account_public_access_block.restrict_public_buckets - ): - report.status = "PASS" - report.status_extended = f"Block Public Access is configured for the account {s3control_client.audited_account}." - report.region = s3control_client.region - report.resource_id = s3control_client.audited_account - report.resource_arn = s3_client.account_arn_template - findings.append(report) - elif s3_client.buckets or s3_client.provider.scan_unused_services: - report.status = "FAIL" - report.status_extended = f"Block Public Access is not configured for the account {s3control_client.audited_account}." - report.region = s3control_client.region - report.resource_id = s3control_client.audited_account - report.resource_arn = s3_client.account_arn_template - findings.append(report) + if s3control_client.account_public_access_block is not None: + report = Check_Report_AWS( + metadata=self.metadata(), + resource=s3control_client.account_public_access_block, + ) + if ( + s3control_client.account_public_access_block + and s3control_client.account_public_access_block.ignore_public_acls + and s3control_client.account_public_access_block.restrict_public_buckets + ): + report.status = "PASS" + report.status_extended = f"Block Public Access is configured for the account {s3control_client.audited_account}." + report.region = s3control_client.region + report.resource_id = s3control_client.audited_account + report.resource_arn = s3_client.account_arn_template + findings.append(report) + elif s3_client.buckets or s3_client.provider.scan_unused_services: + report.status = "FAIL" + report.status_extended = f"Block Public Access is not configured for the account {s3control_client.audited_account}." + report.region = s3control_client.region + report.resource_id = s3control_client.audited_account + report.resource_arn = s3_client.account_arn_template + findings.append(report) return findings diff --git a/prowler/providers/aws/services/s3/s3_service.py b/prowler/providers/aws/services/s3/s3_service.py index 3894e1001d..4ff091052c 100644 --- a/prowler/providers/aws/services/s3/s3_service.py +++ b/prowler/providers/aws/services/s3/s3_service.py @@ -511,9 +511,10 @@ class S3Control(AWSService): def __init__(self, provider): # Call AWSService's __init__ super().__init__(__class__.__name__, provider) - self.account_public_access_block = self._get_public_access_block() + self.account_public_access_block = None self.access_points = {} self.multi_region_access_points = {} + self._get_public_access_block() self.__threading_call__(self._list_access_points) self.__threading_call__(self._get_access_point, self.access_points.values()) if self.audited_partition == "aws": @@ -525,7 +526,7 @@ class S3Control(AWSService): public_access_block = self.client.get_public_access_block( AccountId=self.audited_account )["PublicAccessBlockConfiguration"] - return PublicAccessBlock( + self.account_public_access_block = PublicAccessBlock( block_public_acls=public_access_block["BlockPublicAcls"], ignore_public_acls=public_access_block["IgnorePublicAcls"], block_public_policy=public_access_block["BlockPublicPolicy"], @@ -534,15 +535,19 @@ class S3Control(AWSService): except Exception as error: if "NoSuchPublicAccessBlockConfiguration" in str(error): # Set all block as False - return PublicAccessBlock( + self.account_public_access_block = PublicAccessBlock( block_public_acls=False, ignore_public_acls=False, block_public_policy=False, restrict_public_buckets=False, ) - logger.error( - f"{self.region} -- {error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" - ) + logger.warning( + f"{self.region} -- {error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + else: + logger.error( + f"{self.region} -- {error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) def _list_access_points(self, regional_client): logger.info("S3 - Listing account access points...") diff --git a/prowler/providers/aws/services/sagemaker/sagemaker_service.py b/prowler/providers/aws/services/sagemaker/sagemaker_service.py index 0ca95f8a2a..8001b742cd 100644 --- a/prowler/providers/aws/services/sagemaker/sagemaker_service.py +++ b/prowler/providers/aws/services/sagemaker/sagemaker_service.py @@ -263,9 +263,9 @@ class SageMaker(AWSService): production_variants.append( ProductionVariant( name=production_variant["VariantName"], - initial_instance_count=production_variant[ - "InitialInstanceCount" - ], + initial_instance_count=production_variant.get( + "InitialInstanceCount", 0 + ), ) ) endpoint_config.production_variants = production_variants diff --git a/prowler/providers/aws/services/sns/sns_topics_not_publicly_accessible/sns_topics_not_publicly_accessible.py b/prowler/providers/aws/services/sns/sns_topics_not_publicly_accessible/sns_topics_not_publicly_accessible.py index 536bf4f800..1dc0776b64 100644 --- a/prowler/providers/aws/services/sns/sns_topics_not_publicly_accessible/sns_topics_not_publicly_accessible.py +++ b/prowler/providers/aws/services/sns/sns_topics_not_publicly_accessible/sns_topics_not_publicly_accessible.py @@ -2,6 +2,7 @@ from prowler.lib.check.models import Check, Check_Report_AWS from prowler.providers.aws.services.iam.lib.policy import ( is_condition_block_restrictive, is_condition_block_restrictive_organization, + is_condition_block_restrictive_sns_endpoint, ) from prowler.providers.aws.services.sns.sns_client import sns_client @@ -32,6 +33,7 @@ class sns_topics_not_publicly_accessible(Check): ): condition_account = False condition_org = False + condition_endpoint = False if ( "Condition" in statement and is_condition_block_restrictive( @@ -47,6 +49,13 @@ class sns_topics_not_publicly_accessible(Check): ) ): condition_org = True + if ( + "Condition" in statement + and is_condition_block_restrictive_sns_endpoint( + statement["Condition"], + ) + ): + condition_endpoint = True if condition_account and condition_org: report.status_extended = f"SNS topic {topic.name} is not public because its policy only allows access from the account {sns_client.audited_account} and an organization." @@ -54,6 +63,8 @@ class sns_topics_not_publicly_accessible(Check): report.status_extended = f"SNS topic {topic.name} is not public because its policy only allows access from the account {sns_client.audited_account}." elif condition_org: report.status_extended = f"SNS topic {topic.name} is not public because its policy only allows access from an organization." + elif condition_endpoint: + report.status_extended = f"SNS topic {topic.name} is not public because its policy only allows access from an endpoint." else: report.status = "FAIL" report.status_extended = f"SNS topic {topic.name} is public because its policy allows public access." diff --git a/prowler/providers/aws/services/stepfunctions/stepfunctions_statemachine_logging_enabled/stepfunctions_statemachine_logging_enabled.py b/prowler/providers/aws/services/stepfunctions/stepfunctions_statemachine_logging_enabled/stepfunctions_statemachine_logging_enabled.py index f5dc00e121..328896c8e6 100644 --- a/prowler/providers/aws/services/stepfunctions/stepfunctions_statemachine_logging_enabled/stepfunctions_statemachine_logging_enabled.py +++ b/prowler/providers/aws/services/stepfunctions/stepfunctions_statemachine_logging_enabled/stepfunctions_statemachine_logging_enabled.py @@ -33,7 +33,10 @@ class stepfunctions_statemachine_logging_enabled(Check): report.status = "PASS" report.status_extended = f"Step Functions state machine {state_machine.name} has logging enabled." - if state_machine.logging_configuration.level == LoggingLevel.OFF: + if ( + not state_machine.logging_configuration + or state_machine.logging_configuration.level == LoggingLevel.OFF + ): report.status = "FAIL" report.status_extended = f"Step Functions state machine {state_machine.name} does not have logging enabled." findings.append(report) diff --git a/prowler/providers/aws/services/storagegateway/storagegateway_service.py b/prowler/providers/aws/services/storagegateway/storagegateway_service.py index b375b87282..b55c5c7f4d 100644 --- a/prowler/providers/aws/services/storagegateway/storagegateway_service.py +++ b/prowler/providers/aws/services/storagegateway/storagegateway_service.py @@ -51,7 +51,10 @@ class StorageGateway(AWSService): logger.info("StorageGateway - Describe NFS FileShares...") try: for fileshare in self.fileshares: - if fileshare.fs_type == "NFS": + if ( + fileshare.region == regional_client.region + and fileshare.fs_type == "NFS" + ): response = regional_client.describe_nfs_file_shares( FileShareARNList=[fileshare.arn] ) @@ -70,7 +73,10 @@ class StorageGateway(AWSService): logger.info("StorageGateway - Describe SMB FileShares...") try: for fileshare in self.fileshares: - if fileshare.fs_type == "SMB": + if ( + fileshare.region == regional_client.region + and fileshare.fs_type == "SMB" + ): response = regional_client.describe_smb_file_shares( FileShareARNList=[fileshare.arn] ) diff --git a/prowler/providers/azure/services/containerregistry/containerregistry_service.py b/prowler/providers/azure/services/containerregistry/containerregistry_service.py index 287d18203f..e0004429f0 100644 --- a/prowler/providers/azure/services/containerregistry/containerregistry_service.py +++ b/prowler/providers/azure/services/containerregistry/containerregistry_service.py @@ -46,9 +46,6 @@ class ContainerRegistry(AzureService): admin_user_enabled=getattr( registry, "admin_user_enabled", False ), - network_rule_set=getattr( - registry, "network_rule_set", None - ), monitor_diagnostic_settings=self._get_registry_monitor_settings( registry.name, resource_group, subscription ), diff --git a/prowler/providers/microsoft365/services/admincenter/admincenter_users_between_two_and_four_global_admins/__init__.py b/prowler/providers/azure/services/cosmosdb/cosmosdb_account_use_aad_and_rbac/__init__.py similarity index 100% rename from prowler/providers/microsoft365/services/admincenter/admincenter_users_between_two_and_four_global_admins/__init__.py rename to prowler/providers/azure/services/cosmosdb/cosmosdb_account_use_aad_and_rbac/__init__.py diff --git a/prowler/providers/azure/services/defender/defender_container_images_scan_enabled/defender_container_images_scan_enabled.py b/prowler/providers/azure/services/defender/defender_container_images_scan_enabled/defender_container_images_scan_enabled.py index 9aa966e608..06b067d1a4 100644 --- a/prowler/providers/azure/services/defender/defender_container_images_scan_enabled/defender_container_images_scan_enabled.py +++ b/prowler/providers/azure/services/defender/defender_container_images_scan_enabled/defender_container_images_scan_enabled.py @@ -11,7 +11,6 @@ class defender_container_images_scan_enabled(Check): metadata=self.metadata(), resource=pricings["Containers"] ) report.subscription = subscription - report.resource_name = "Dender plan for Containers" report.status = "PASS" report.status_extended = ( f"Container image scan is enabled in subscription {subscription}." diff --git a/prowler/providers/azure/services/defender/defender_ensure_defender_for_azure_sql_databases_is_on/defender_ensure_defender_for_azure_sql_databases_is_on.py b/prowler/providers/azure/services/defender/defender_ensure_defender_for_azure_sql_databases_is_on/defender_ensure_defender_for_azure_sql_databases_is_on.py index 5dc3220cf1..3b05ddd415 100644 --- a/prowler/providers/azure/services/defender/defender_ensure_defender_for_azure_sql_databases_is_on/defender_ensure_defender_for_azure_sql_databases_is_on.py +++ b/prowler/providers/azure/services/defender/defender_ensure_defender_for_azure_sql_databases_is_on/defender_ensure_defender_for_azure_sql_databases_is_on.py @@ -11,7 +11,6 @@ class defender_ensure_defender_for_azure_sql_databases_is_on(Check): metadata=self.metadata(), resource=pricings["SqlServers"] ) report.subscription = subscription - report.resource_name = "Defender plan Azure SQL DB Servers" report.status = "PASS" report.status_extended = f"Defender plan Defender for Azure SQL DB Servers from subscription {subscription} is set to ON (pricing tier standard)." if pricings["SqlServers"].pricing_tier != "Standard": diff --git a/prowler/providers/azure/services/defender/defender_ensure_defender_for_containers_is_on/defender_ensure_defender_for_containers_is_on.py b/prowler/providers/azure/services/defender/defender_ensure_defender_for_containers_is_on/defender_ensure_defender_for_containers_is_on.py index 3771b0ecfd..56a5ff32e3 100644 --- a/prowler/providers/azure/services/defender/defender_ensure_defender_for_containers_is_on/defender_ensure_defender_for_containers_is_on.py +++ b/prowler/providers/azure/services/defender/defender_ensure_defender_for_containers_is_on/defender_ensure_defender_for_containers_is_on.py @@ -11,7 +11,6 @@ class defender_ensure_defender_for_containers_is_on(Check): metadata=self.metadata(), resource=pricings["Containers"] ) report.subscription = subscription - report.resource_name = "Defender plan Container Registries" report.status = "PASS" report.status_extended = f"Defender plan Defender for Containers from subscription {subscription} is set to ON (pricing tier standard)." if pricings["Containers"].pricing_tier != "Standard": diff --git a/prowler/providers/azure/services/defender/defender_ensure_defender_for_databases_is_on/defender_ensure_defender_for_databases_is_on.py b/prowler/providers/azure/services/defender/defender_ensure_defender_for_databases_is_on/defender_ensure_defender_for_databases_is_on.py index 7ae6fa9a9b..21f43a7e13 100644 --- a/prowler/providers/azure/services/defender/defender_ensure_defender_for_databases_is_on/defender_ensure_defender_for_databases_is_on.py +++ b/prowler/providers/azure/services/defender/defender_ensure_defender_for_databases_is_on/defender_ensure_defender_for_databases_is_on.py @@ -16,7 +16,6 @@ class defender_ensure_defender_for_databases_is_on(Check): metadata=self.metadata(), resource=pricings["SqlServers"] ) report.subscription = subscription - report.resource_name = "Defender plan Databases" report.status = "PASS" report.status_extended = f"Defender plan Defender for Databases from subscription {subscription} is set to ON (pricing tier standard)." if ( diff --git a/prowler/providers/azure/services/defender/defender_service.py b/prowler/providers/azure/services/defender/defender_service.py index ef90ed7e70..6b66eaa1c8 100644 --- a/prowler/providers/azure/services/defender/defender_service.py +++ b/prowler/providers/azure/services/defender/defender_service.py @@ -39,6 +39,7 @@ class Defender(AzureService): { pricing.name: Pricing( resource_id=pricing.id, + resource_name=pricing.name, pricing_tier=getattr(pricing, "pricing_tier", None), free_trial_remaining_time=pricing.free_trial_remaining_time, extensions=dict( @@ -160,7 +161,7 @@ class Defender(AzureService): { security_contact_default.name: SecurityContacts( resource_id=security_contact_default.id, - name=security_contact_default.name, + name=getattr(security_contact_default, "name", "default"), emails=security_contact_default.emails, phone=security_contact_default.phone, alert_notifications_minimal_severity=security_contact_default.alert_notifications.minimal_severity, @@ -176,7 +177,7 @@ class Defender(AzureService): { "default": SecurityContacts( resource_id=f"/subscriptions/{self.subscriptions[subscription_name]}/providers/Microsoft.Security/securityContacts/default", - name="", + name="default", emails="", phone="", alert_notifications_minimal_severity="", @@ -224,6 +225,7 @@ class Defender(AzureService): class Pricing(BaseModel): resource_id: str + resource_name: str pricing_tier: str free_trial_remaining_time: timedelta extensions: Dict[str, bool] = {} diff --git a/prowler/providers/azure/services/iam/iam_custom_role_has_permissions_to_administer_resource_locks/iam_custom_role_has_permissions_to_administer_resource_locks.py b/prowler/providers/azure/services/iam/iam_custom_role_has_permissions_to_administer_resource_locks/iam_custom_role_has_permissions_to_administer_resource_locks.py index d3df749b20..2abbf40510 100644 --- a/prowler/providers/azure/services/iam/iam_custom_role_has_permissions_to_administer_resource_locks/iam_custom_role_has_permissions_to_administer_resource_locks.py +++ b/prowler/providers/azure/services/iam/iam_custom_role_has_permissions_to_administer_resource_locks/iam_custom_role_has_permissions_to_administer_resource_locks.py @@ -29,5 +29,5 @@ class iam_custom_role_has_permissions_to_administer_resource_locks(Check): report.status_extended = f"Role {custom_role.name} from subscription {subscription} has permission to administer resource locks." exits_role_with_permission_over_locks = True break - findings.append(report) + findings.append(report) return findings diff --git a/prowler/providers/microsoft365/services/entra/__init__.py b/prowler/providers/azure/services/keyvault/keyvault_key_rotation_enabled/__init__.py similarity index 100% rename from prowler/providers/microsoft365/services/entra/__init__.py rename to prowler/providers/azure/services/keyvault/keyvault_key_rotation_enabled/__init__.py diff --git a/prowler/providers/azure/services/keyvault/keyvault_service.py b/prowler/providers/azure/services/keyvault/keyvault_service.py index 3a2cc1bf69..ccee275282 100644 --- a/prowler/providers/azure/services/keyvault/keyvault_service.py +++ b/prowler/providers/azure/services/keyvault/keyvault_service.py @@ -53,10 +53,13 @@ class KeyVault(AzureService): ), private_endpoint_connections=[ PrivateEndpointConnection(id=conn.id) - for conn in getattr( - keyvault_properties, - "private_endpoint_connections", - [], + for conn in ( + getattr( + keyvault_properties, + "private_endpoint_connections", + [], + ) + or [] ) ], enable_soft_delete=getattr( diff --git a/prowler/providers/azure/services/monitor/monitor_service.py b/prowler/providers/azure/services/monitor/monitor_service.py index c0239e467b..7f5b9c8232 100644 --- a/prowler/providers/azure/services/monitor/monitor_service.py +++ b/prowler/providers/azure/services/monitor/monitor_service.py @@ -53,7 +53,7 @@ class Monitor(AzureService): category_group=log_settings.category_group, enabled=log_settings.enabled, ) - for log_settings in getattr(setting, "logs", []) + for log_settings in (getattr(setting, "logs", []) or []) ], storage_account_id=setting.storage_account_id, ) diff --git a/prowler/providers/azure/services/network/network_http_internet_access_restricted/network_http_internet_access_restricted.py b/prowler/providers/azure/services/network/network_http_internet_access_restricted/network_http_internet_access_restricted.py index 5fd8d053f4..61f018bae4 100644 --- a/prowler/providers/azure/services/network/network_http_internet_access_restricted/network_http_internet_access_restricted.py +++ b/prowler/providers/azure/services/network/network_http_internet_access_restricted/network_http_internet_access_restricted.py @@ -17,7 +17,10 @@ class network_http_internet_access_restricted(Check): ( rule.destination_port_range == "80" or ( - "-" in rule.destination_port_range + ( + rule.destination_port_range + and "-" in rule.destination_port_range + ) and int(rule.destination_port_range.split("-")[0]) <= 80 and int(rule.destination_port_range.split("-")[1]) >= 80 ) diff --git a/prowler/providers/azure/services/network/network_rdp_internet_access_restricted/network_rdp_internet_access_restricted.py b/prowler/providers/azure/services/network/network_rdp_internet_access_restricted/network_rdp_internet_access_restricted.py index 8c3d804ccd..7d08678d27 100644 --- a/prowler/providers/azure/services/network/network_rdp_internet_access_restricted/network_rdp_internet_access_restricted.py +++ b/prowler/providers/azure/services/network/network_rdp_internet_access_restricted/network_rdp_internet_access_restricted.py @@ -17,7 +17,10 @@ class network_rdp_internet_access_restricted(Check): ( rule.destination_port_range == "3389" or ( - "-" in rule.destination_port_range + ( + rule.destination_port_range + and "-" in rule.destination_port_range + ) and int(rule.destination_port_range.split("-")[0]) <= 3389 and int(rule.destination_port_range.split("-")[1]) >= 3389 ) diff --git a/prowler/providers/azure/services/network/network_service.py b/prowler/providers/azure/services/network/network_service.py index 6842926014..75c4f3a971 100644 --- a/prowler/providers/azure/services/network/network_service.py +++ b/prowler/providers/azure/services/network/network_service.py @@ -1,6 +1,8 @@ +import re from dataclasses import dataclass -from typing import List +from typing import List, Optional +from azure.core.exceptions import ResourceNotFoundError from azure.mgmt.network import NetworkManagementClient from prowler.lib.logger import logger @@ -64,14 +66,33 @@ class Network(AzureService): network_watchers.update({subscription: []}) network_watchers_list = client.network_watchers.list_all() for network_watcher in network_watchers_list: - flow_logs = self._get_flow_logs(subscription, network_watcher.name) + flow_logs = self._get_flow_logs( + subscription, network_watcher.name, network_watcher.id + ) network_watchers[subscription].append( NetworkWatcher( id=network_watcher.id, name=network_watcher.name, location=network_watcher.location, flow_logs=[ - FlowLog(id=flow_log.id) for flow_log in flow_logs + FlowLog( + id=flow_log.id, + name=flow_log.name, + enabled=flow_log.enabled, + retention_policy=RetentionPolicy( + enabled=( + flow_log.retention_policy.enabled + if flow_log.retention_policy + else False + ), + days=( + flow_log.retention_policy.days + if flow_log.retention_policy + else 0 + ), + ), + ) + for flow_log in flow_logs ], ) ) @@ -82,12 +103,29 @@ class Network(AzureService): ) return network_watchers - def _get_flow_logs(self, subscription, network_watcher_name): + def _get_flow_logs(self, subscription, network_watcher_name, network_watcher_id): logger.info("Network - Getting Flow Logs...") client = self.clients[subscription] - resource_group = "NetworkWatcherRG" - flow_logs = client.flow_logs.list(resource_group, network_watcher_name) - return flow_logs + match = re.search(r"/resourceGroups/(?P[^/]+)/", network_watcher_id) + if not match: + logger.error( + f"Could not extract resource group from ID: {network_watcher_id}" + ) + return [] + resource_group = match.group("rg") + try: + flow_logs = client.flow_logs.list(resource_group, network_watcher_name) + return flow_logs + except ResourceNotFoundError as error: + logger.warning( + f"Subscription name: {subscription} -- {error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + return [] + except Exception as error: + logger.error( + f"Subscription name: {subscription} -- {error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + return [] def _get_bastion_hosts(self): logger.info("Network - Getting Bastion Hosts...") @@ -168,11 +206,11 @@ class NetworkWatcher: class SecurityRule: id: str name: str - destination_port_range: str - protocol: str - source_address_prefix: str - access: str - direction: str + destination_port_range: Optional[str] + protocol: Optional[str] + source_address_prefix: Optional[str] + access: Optional[str] + direction: Optional[str] @dataclass diff --git a/prowler/providers/azure/services/network/network_ssh_internet_access_restricted/network_ssh_internet_access_restricted.py b/prowler/providers/azure/services/network/network_ssh_internet_access_restricted/network_ssh_internet_access_restricted.py index a24cd10da3..e4207194e1 100644 --- a/prowler/providers/azure/services/network/network_ssh_internet_access_restricted/network_ssh_internet_access_restricted.py +++ b/prowler/providers/azure/services/network/network_ssh_internet_access_restricted/network_ssh_internet_access_restricted.py @@ -17,7 +17,10 @@ class network_ssh_internet_access_restricted(Check): ( rule.destination_port_range == "22" or ( - "-" in rule.destination_port_range + ( + rule.destination_port_range + and "-" in rule.destination_port_range + ) and int(rule.destination_port_range.split("-")[0]) <= 22 and int(rule.destination_port_range.split("-")[1]) >= 22 ) diff --git a/prowler/providers/azure/services/network/network_udp_internet_access_restricted/network_udp_internet_access_restricted.py b/prowler/providers/azure/services/network/network_udp_internet_access_restricted/network_udp_internet_access_restricted.py index c465c891f2..ebd5fc7d50 100644 --- a/prowler/providers/azure/services/network/network_udp_internet_access_restricted/network_udp_internet_access_restricted.py +++ b/prowler/providers/azure/services/network/network_udp_internet_access_restricted/network_udp_internet_access_restricted.py @@ -14,10 +14,16 @@ class network_udp_internet_access_restricted(Check): report.status = "PASS" report.status_extended = f"Security Group {security_group.name} from subscription {subscription} has UDP internet access restricted." rule_fail_condition = any( - rule.protocol in ["UDP", "Udp"] - and rule.source_address_prefix in ["Internet", "*", "0.0.0.0/0"] - and rule.access == "Allow" - and rule.direction == "Inbound" + ( + rule.protocol in ["UDP", "Udp"] + and ( + rule.source_address_prefix + and rule.source_address_prefix + in ["Internet", "*", "0.0.0.0/0"] + ) + and rule.access == "Allow" + and rule.direction == "Inbound" + ) for rule in security_group.security_rules ) if rule_fail_condition: diff --git a/prowler/providers/azure/services/vm/vm_service.py b/prowler/providers/azure/services/vm/vm_service.py index 4700f81eca..d5d0dde5c7 100644 --- a/prowler/providers/azure/services/vm/vm_service.py +++ b/prowler/providers/azure/services/vm/vm_service.py @@ -24,6 +24,33 @@ class VirtualMachines(AzureService): virtual_machines.update({subscription_name: {}}) for vm in virtual_machines_list: + storage_profile = getattr(vm, "storage_profile", None) + os_disk = ( + getattr(storage_profile, "os_disk", None) + if storage_profile + else None + ) + + data_disks = [] + if storage_profile and getattr(storage_profile, "data_disks", []): + data_disks = [ + DataDisk( + lun=data_disk.lun, + name=data_disk.name, + managed_disk=data_disk.managed_disk, + ) + for data_disk in getattr(storage_profile, "data_disks", []) + if data_disk + ] + + extensions = [] + if getattr(vm, "resources", []): + extensions = [ + VirtualMachineExtension(id=extension.id) + for extension in getattr(vm, "resources", []) + if extension + ] + virtual_machines[subscription_name].update( { vm.id: VirtualMachine( @@ -32,29 +59,19 @@ class VirtualMachines(AzureService): storage_profile=( StorageProfile( os_disk=OSDisk( - name=vm.storage_profile.os_disk.name, - managed_disk=vm.storage_profile.os_disk.managed_disk, + name=getattr(os_disk, "name", None), + managed_disk=getattr( + os_disk, "managed_disk", None + ), ), - data_disks=[ - DataDisk( - lun=data_disk.lun, - name=data_disk.name, - managed_disk=data_disk.managed_disk, - ) - for data_disk in getattr( - vm.storage_profile, "data_disks", [] - ) - ], + data_disks=data_disks, ) - if getattr(vm, "storage_profile", None) + if storage_profile else None ), location=vm.location, - security_profile=vm.security_profile, - extensions=[ - VirtualMachineExtension(id=extension.id) - for extension in getattr(vm, "resources", []) - ], + security_profile=getattr(vm, "security_profile", None), + extensions=extensions, ) } ) @@ -110,13 +127,13 @@ class UefiSettings: @dataclass class SecurityProfile: security_type: str - uefi_settings: UefiSettings + uefi_settings: Optional[UefiSettings] @dataclass class OSDisk: - name: str - managed_disk: bool + name: Optional[str] + managed_disk: Optional[bool] @dataclass @@ -128,7 +145,7 @@ class DataDisk: @dataclass class StorageProfile: - os_disk: OSDisk + os_disk: Optional[OSDisk] data_disks: List[DataDisk] @@ -142,7 +159,7 @@ class VirtualMachine: resource_id: str resource_name: str location: str - security_profile: SecurityProfile + security_profile: Optional[SecurityProfile] extensions: list[VirtualMachineExtension] storage_profile: Optional[StorageProfile] = None diff --git a/prowler/providers/azure/services/vm/vm_trusted_launch_enabled/vm_trusted_launch_enabled.py b/prowler/providers/azure/services/vm/vm_trusted_launch_enabled/vm_trusted_launch_enabled.py index e4a4d9d082..d4896b70ec 100644 --- a/prowler/providers/azure/services/vm/vm_trusted_launch_enabled/vm_trusted_launch_enabled.py +++ b/prowler/providers/azure/services/vm/vm_trusted_launch_enabled/vm_trusted_launch_enabled.py @@ -14,7 +14,8 @@ class vm_trusted_launch_enabled(Check): report.status_extended = f"VM {vm.resource_name} has trusted launch disabled in subscription {subscription_name}" if ( - vm.security_profile.security_type == "TrustedLaunch" + vm.security_profile + and vm.security_profile.security_type == "TrustedLaunch" and vm.security_profile.uefi_settings.secure_boot_enabled and vm.security_profile.uefi_settings.v_tpm_enabled ): diff --git a/prowler/providers/common/models.py b/prowler/providers/common/models.py index ebe2ae16fb..47c9ebd2fe 100644 --- a/prowler/providers/common/models.py +++ b/prowler/providers/common/models.py @@ -28,34 +28,34 @@ class ProviderOutputOptions: unix_timestamp: bool def __init__(self, arguments, bulk_checks_metadata): - self.status = arguments.status - self.output_modes = arguments.output_formats - self.output_directory = arguments.output_directory - self.verbose = arguments.verbose + self.status = getattr(arguments, "status", None) + self.output_modes = getattr(arguments, "output_formats", None) + self.output_directory = getattr(arguments, "output_directory", None) + self.verbose = getattr(arguments, "verbose", None) self.bulk_checks_metadata = bulk_checks_metadata - self.only_logs = arguments.only_logs - self.unix_timestamp = arguments.unix_timestamp - self.shodan_api_key = arguments.shodan + self.only_logs = getattr(arguments, "only_logs", None) + self.unix_timestamp = getattr(arguments, "unix_timestamp", None) + self.shodan_api_key = getattr(arguments, "shodan", None) self.fixer = getattr(arguments, "fixer", None) # Shodan API Key - if arguments.shodan: + if self.shodan_api_key: # TODO: revisit this logic provider = Provider.get_global_provider() updated_audit_config = Provider.update_provider_config( - provider.audit_config, "shodan_api_key", arguments.shodan + provider.audit_config, "shodan_api_key", self.shodan_api_key ) if updated_audit_config: provider._audit_config = updated_audit_config # Check output directory, if it is not created -> create it - if arguments.output_directory and not self.fixer: - if not isdir(arguments.output_directory): - if arguments.output_formats: - makedirs(arguments.output_directory, exist_ok=True) - if not isdir(arguments.output_directory + "/compliance"): - if arguments.output_formats: - makedirs(arguments.output_directory + "/compliance", exist_ok=True) + if self.output_directory and not self.fixer: + if not isdir(self.output_directory): + if self.output_modes: + makedirs(self.output_directory, exist_ok=True) + if not isdir(self.output_directory + "/compliance"): + if self.output_modes: + makedirs(self.output_directory + "/compliance", exist_ok=True) @dataclass diff --git a/prowler/providers/common/provider.py b/prowler/providers/common/provider.py index ec9c5de0db..9c97d63fbc 100644 --- a/prowler/providers/common/provider.py +++ b/prowler/providers/common/provider.py @@ -207,21 +207,42 @@ class Provider(ABC): kubeconfig_file=arguments.kubeconfig_file, context=arguments.context, namespace=arguments.namespace, + cluster_name=arguments.cluster_name, config_path=arguments.config_file, mutelist_path=arguments.mutelist_file, fixer_config=fixer_config, ) - elif "microsoft365" in provider_class_name.lower(): + elif "m365" in provider_class_name.lower(): provider_class( region=arguments.region, config_path=arguments.config_file, mutelist_path=arguments.mutelist_file, sp_env_auth=arguments.sp_env_auth, + env_auth=arguments.env_auth, az_cli_auth=arguments.az_cli_auth, browser_auth=arguments.browser_auth, tenant_id=arguments.tenant_id, + init_modules=arguments.init_modules, fixer_config=fixer_config, ) + elif "nhn" in provider_class_name.lower(): + provider_class( + username=arguments.nhn_username, + password=arguments.nhn_password, + tenant_id=arguments.nhn_tenant_id, + config_path=arguments.config_file, + mutelist_path=arguments.mutelist_file, + fixer_config=fixer_config, + ) + elif "github" in provider_class_name.lower(): + provider_class( + personal_access_token=arguments.personal_access_token, + oauth_app_token=arguments.oauth_app_token, + github_app_key=arguments.github_app_key, + github_app_id=arguments.github_app_id, + mutelist_path=arguments.mutelist_file, + config_path=arguments.config_file, + ) except TypeError as error: logger.critical( diff --git a/prowler/providers/gcp/gcp_provider.py b/prowler/providers/gcp/gcp_provider.py index ee3a1ad4d3..789c434bb4 100644 --- a/prowler/providers/gcp/gcp_provider.py +++ b/prowler/providers/gcp/gcp_provider.py @@ -2,7 +2,6 @@ import json import os import re import sys -from typing import Optional from colorama import Fore, Style from google.auth import default, impersonated_credentials, load_credentials_from_dict @@ -397,14 +396,19 @@ class GcpProvider(Provider): client_secrets_path = os.path.abspath(credentials_file) os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = client_secrets_path + access_token = os.getenv("CLOUDSDK_AUTH_ACCESS_TOKEN") + if access_token: + logger.info("Using access token from CLOUDSDK_AUTH_ACCESS_TOKEN") + credentials = Credentials(token=access_token, scopes=scopes) + default_project_id = os.getenv("GOOGLE_CLOUD_PROJECT", "") + return credentials, default_project_id + # Get default credentials credentials, default_project_id = default(scopes=scopes) # Refresh the credentials to ensure they are valid credentials.refresh(Request()) - logger.info(f"Initial credentials: {credentials}") - if service_account: # Create the impersonated credentials credentials = impersonated_credentials.Credentials( @@ -412,7 +416,7 @@ class GcpProvider(Provider): target_principal=service_account, target_scopes=scopes, ) - logger.info(f"Impersonated credentials: {credentials}") + logger.info(f"Impersonating service account: {service_account}") return credentials, default_project_id except Exception as error: @@ -426,7 +430,7 @@ class GcpProvider(Provider): credentials_file: str = None, service_account: str = None, raise_on_exception: bool = True, - provider_id: Optional[str] = None, + provider_id: str = None, client_id: str = None, client_secret: str = None, refresh_token: str = None, @@ -483,6 +487,11 @@ class GcpProvider(Provider): ... ) """ try: + if not provider_id: + logger.error("Provider ID is required.") + raise GCPInvalidProviderIdError( + file=__file__, message="Provider ID is required." + ) # Set the GCP credentials using the provided client_id, client_secret and refresh_token from ADC gcp_credentials = None if any([client_id, client_secret, refresh_token]): @@ -495,6 +504,10 @@ class GcpProvider(Provider): gcp_credentials=gcp_credentials, service_account_key=service_account_key, ) + + if not project_id: + project_id = provider_id + if provider_id and project_id != provider_id: # Logic to check if the provider ID matches the project ID GcpProvider.validate_project_id( @@ -620,11 +633,21 @@ class GcpProvider(Provider): .get("labels", {}) .items() } - project_id = asset["resource"]["data"]["projectId"] + project_number = asset["resource"]["data"]["projectNumber"] + project_id = ( + asset["resource"]["data"].get("projectId") + if asset["resource"]["data"].get("projectId") + else project_number + ) + project_name = ( + asset["resource"]["data"].get("name") + if asset["resource"]["data"].get("name") + else project_id + ) gcp_project = GCPProject( - number=asset["resource"]["data"]["projectNumber"], + number=project_number, id=project_id, - name=asset["resource"]["data"].get("name", project_id), + name=project_name, lifecycle_state=asset["resource"]["data"].get( "lifecycleState" ), @@ -665,11 +688,22 @@ class GcpProvider(Provider): labels = { k: v for k, v in project.get("labels", {}).items() } + project_number = project["projectNumber"] + project_id = ( + project.get("projectId") + if project.get("projectId") + else project_number + ) + project_name = ( + project.get("name") + if project.get("name") + else project_id + ) project_id = project["projectId"] gcp_project = GCPProject( - number=project["projectNumber"], + number=project_number, id=project_id, - name=project.get("name", project_id), + name=project_name, lifecycle_state=project["lifecycleState"], labels=labels, ) diff --git a/prowler/providers/gcp/services/cloudsql/cloudsql_service.py b/prowler/providers/gcp/services/cloudsql/cloudsql_service.py index 539671173b..d0dbe5137d 100644 --- a/prowler/providers/gcp/services/cloudsql/cloudsql_service.py +++ b/prowler/providers/gcp/services/cloudsql/cloudsql_service.py @@ -30,18 +30,18 @@ class CloudSQL(GCPService): region=instance["region"], ip_addresses=instance.get("ipAddresses", []), public_ip=public_ip, - require_ssl=instance["settings"]["ipConfiguration"].get( - "requireSsl", False - ), - ssl_mode=instance["settings"]["ipConfiguration"].get( - "sslMode", "ALLOW_UNENCRYPTED_AND_ENCRYPTED" - ), + require_ssl=instance["settings"] + .get("ipConfiguration", {}) + .get("requireSsl", False), + ssl_mode=instance["settings"] + .get("ipConfiguration", {}) + .get("sslMode", "ALLOW_UNENCRYPTED_AND_ENCRYPTED"), automated_backups=instance["settings"][ "backupConfiguration" ]["enabled"], - authorized_networks=instance["settings"][ - "ipConfiguration" - ]["authorizedNetworks"], + authorized_networks=instance["settings"] + .get("ipConfiguration", {}) + .get("authorizedNetworks", []), flags=instance["settings"].get("databaseFlags", []), project_id=project_id, ) diff --git a/prowler/providers/gcp/services/cloudstorage/cloudstorage_bucket_log_retention_policy_lock/cloudstorage_bucket_log_retention_policy_lock.py b/prowler/providers/gcp/services/cloudstorage/cloudstorage_bucket_log_retention_policy_lock/cloudstorage_bucket_log_retention_policy_lock.py index c712ac0e0a..180dc6462f 100644 --- a/prowler/providers/gcp/services/cloudstorage/cloudstorage_bucket_log_retention_policy_lock/cloudstorage_bucket_log_retention_policy_lock.py +++ b/prowler/providers/gcp/services/cloudstorage/cloudstorage_bucket_log_retention_policy_lock/cloudstorage_bucket_log_retention_policy_lock.py @@ -23,7 +23,7 @@ class cloudstorage_bucket_log_retention_policy_lock(Check): if bucket.retention_policy: report.status = "FAIL" report.status_extended = f"Log Sink Bucket {bucket.name} has no Retention Policy but without Bucket Lock." - if bucket.retention_policy["isLocked"]: + if bucket.retention_policy.get("isLocked", False): report.status = "PASS" report.status_extended = f"Log Sink Bucket {bucket.name} has a Retention Policy with Bucket Lock." findings.append(report) diff --git a/prowler/providers/gcp/services/compute/compute_loadbalancer_logging_enabled/compute_loadbalancer_logging_enabled.py b/prowler/providers/gcp/services/compute/compute_loadbalancer_logging_enabled/compute_loadbalancer_logging_enabled.py index c77ef48140..1a84e5f10b 100644 --- a/prowler/providers/gcp/services/compute/compute_loadbalancer_logging_enabled/compute_loadbalancer_logging_enabled.py +++ b/prowler/providers/gcp/services/compute/compute_loadbalancer_logging_enabled/compute_loadbalancer_logging_enabled.py @@ -6,18 +6,20 @@ class compute_loadbalancer_logging_enabled(Check): def execute(self) -> Check_Report_GCP: findings = [] for lb in compute_client.load_balancers: - report = Check_Report_GCP( - metadata=self.metadata(), - resource=lb, - location=compute_client.region, - ) - report.status = "PASS" - report.status_extended = f"LoadBalancer {lb.name} has logging enabled." - if not lb.logging: - report.status = "FAIL" - report.status_extended = ( - f"LoadBalancer {lb.name} does not have logging enabled." + # Only load balancers with backend service can have logging enabled + if lb.service: + report = Check_Report_GCP( + metadata=self.metadata(), + resource=lb, + location=compute_client.region, ) - findings.append(report) + report.status = "PASS" + report.status_extended = f"LoadBalancer {lb.name} has logging enabled." + if not lb.logging: + report.status = "FAIL" + report.status_extended = ( + f"LoadBalancer {lb.name} does not have logging enabled." + ) + findings.append(report) return findings diff --git a/prowler/providers/gcp/services/compute/compute_project_os_login_enabled/compute_project_os_login_enabled.py b/prowler/providers/gcp/services/compute/compute_project_os_login_enabled/compute_project_os_login_enabled.py index 436fef35d8..4ed96e036e 100644 --- a/prowler/providers/gcp/services/compute/compute_project_os_login_enabled/compute_project_os_login_enabled.py +++ b/prowler/providers/gcp/services/compute/compute_project_os_login_enabled/compute_project_os_login_enabled.py @@ -8,7 +8,7 @@ class compute_project_os_login_enabled(Check): for project in compute_client.compute_projects: report = Check_Report_GCP( metadata=self.metadata(), - resource=project, + resource=compute_client.projects[project.id], project_id=project.id, location=compute_client.region, ) diff --git a/prowler/providers/gcp/services/compute/compute_service.py b/prowler/providers/gcp/services/compute/compute_service.py index 01fdc2acd7..e3e571ab0f 100644 --- a/prowler/providers/gcp/services/compute/compute_service.py +++ b/prowler/providers/gcp/services/compute/compute_service.py @@ -17,10 +17,10 @@ class Compute(GCPService): self.firewalls = [] self.compute_projects = [] self.load_balancers = [] - self._get_url_maps() - self._describe_backend_service() self._get_regions() self._get_projects() + self._get_url_maps() + self._describe_backend_service() self._get_zones() self.__threading_call__(self._get_instances, self.zones) self._get_networks() @@ -260,6 +260,7 @@ class Compute(GCPService): def _get_url_maps(self): for project_id in self.project_ids: try: + # Global URL maps request = self.client.urlMaps().list(project=project_id) while request is not None: response = request.execute() @@ -280,19 +281,59 @@ class Compute(GCPService): logger.error( f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" ) + try: + # Regional URL maps + for region in self.regions: + request = self.client.regionUrlMaps().list( + project=project_id, region=region + ) + while request is not None: + response = request.execute() + for urlmap in response.get("items", []): + self.load_balancers.append( + LoadBalancer( + name=urlmap["name"], + id=urlmap["id"], + service=urlmap.get("defaultService", ""), + project_id=project_id, + ) + ) + + request = self.client.regionUrlMaps().list_next( + previous_request=request, previous_response=response + ) + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) def _describe_backend_service(self): for balancer in self.load_balancers: if balancer.service: try: - response = ( - self.client.backendServices() - .get( - project=balancer.project_id, - backendService=balancer.service.split("/")[-1], + backend_service_name = balancer.service.split("/")[-1] + is_regional = "/regions/" in balancer.service + if is_regional: + region = balancer.service.split("/regions/")[1].split("/")[0] + response = ( + self.client.regionBackendServices() + .get( + project=balancer.project_id, + region=region, + backendService=backend_service_name, + ) + .execute() ) - .execute() - ) + else: + response = ( + self.client.backendServices() + .get( + project=balancer.project_id, + backendService=backend_service_name, + ) + .execute() + ) + balancer.logging = response.get("logConfig", {}).get( "enable", False ) diff --git a/prowler/providers/gcp/services/iam/iam_audit_logs_enabled/iam_audit_logs_enabled.py b/prowler/providers/gcp/services/iam/iam_audit_logs_enabled/iam_audit_logs_enabled.py index e6451181ec..bec0cb851f 100644 --- a/prowler/providers/gcp/services/iam/iam_audit_logs_enabled/iam_audit_logs_enabled.py +++ b/prowler/providers/gcp/services/iam/iam_audit_logs_enabled/iam_audit_logs_enabled.py @@ -10,7 +10,7 @@ class iam_audit_logs_enabled(Check): for project in cloudresourcemanager_client.cloud_resource_manager_projects: report = Check_Report_GCP( metadata=self.metadata(), - resource=project, + resource=cloudresourcemanager_client.projects[project.id], project_id=project.id, location=cloudresourcemanager_client.region, ) diff --git a/prowler/providers/microsoft365/services/entra/entra_admin_consent_workflow_enabled/__init__.py b/prowler/providers/gcp/services/iam/iam_sa_user_managed_key_unused/__init__.py similarity index 100% rename from prowler/providers/microsoft365/services/entra/entra_admin_consent_workflow_enabled/__init__.py rename to prowler/providers/gcp/services/iam/iam_sa_user_managed_key_unused/__init__.py diff --git a/prowler/providers/gcp/services/iam/iam_sa_user_managed_key_unused/iam_sa_user_managed_key_unused.metadata.json b/prowler/providers/gcp/services/iam/iam_sa_user_managed_key_unused/iam_sa_user_managed_key_unused.metadata.json new file mode 100644 index 0000000000..bdc2b7684a --- /dev/null +++ b/prowler/providers/gcp/services/iam/iam_sa_user_managed_key_unused/iam_sa_user_managed_key_unused.metadata.json @@ -0,0 +1,30 @@ +{ + "Provider": "gcp", + "CheckID": "iam_sa_user_managed_key_unused", + "CheckTitle": "Ensure That There Are No Unused Service Account Keys for Each Service Account", + "CheckType": [], + "ServiceName": "iam", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "medium", + "ResourceType": "ServiceAccountKey", + "Description": "Ensure That There Are No Unused Service Account Keys for Each Service Account.", + "Risk": "Anyone who has access to the keys will be able to access resources through the service account. GCP-managed keys are used by Cloud Platform services such as App Engine and Compute Engine. These keys cannot be downloaded. Google will keep the keys and automatically rotate them on an approximately weekly basis. User-managed keys are created, downloadable, and managed by users.", + "RelatedUrl": "https://cloud.google.com/iam/docs/service-account-overview#identify-unused", + "Remediation": { + "Code": { + "CLI": "", + "NativeIaC": "", + "Other": "", + "Terraform": "" + }, + "Recommendation": { + "Text": "It is recommended to prevent user-managed service account keys.", + "Url": "https://cloud.google.com/iam/docs/creating-managing-service-account-keys" + } + }, + "Categories": [], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/gcp/services/iam/iam_sa_user_managed_key_unused/iam_sa_user_managed_key_unused.py b/prowler/providers/gcp/services/iam/iam_sa_user_managed_key_unused/iam_sa_user_managed_key_unused.py new file mode 100644 index 0000000000..3c1f88fd1b --- /dev/null +++ b/prowler/providers/gcp/services/iam/iam_sa_user_managed_key_unused/iam_sa_user_managed_key_unused.py @@ -0,0 +1,33 @@ +from prowler.lib.check.models import Check, Check_Report_GCP +from prowler.providers.gcp.services.iam.iam_client import iam_client +from prowler.providers.gcp.services.monitoring.monitoring_client import ( + monitoring_client, +) + + +class iam_sa_user_managed_key_unused(Check): + def execute(self) -> Check_Report_GCP: + findings = [] + max_unused_days = monitoring_client.audit_config.get( + "max_unused_account_days", 180 + ) + keys_used = monitoring_client.sa_keys_metrics + for account in iam_client.service_accounts: + for key in account.keys: + if key.type == "USER_MANAGED": + report = Check_Report_GCP( + metadata=self.metadata(), + resource=account, + resource_id=key.name, + resource_name=account.email, + location=iam_client.region, + ) + if key.name in keys_used: + report.status = "PASS" + report.status_extended = f"User-managed key {key.name} for Service Account {account.email} was used over the last {max_unused_days} days." + else: + report.status = "FAIL" + report.status_extended = f"User-managed key {key.name} for Service Account {account.email} was not used over the last {max_unused_days} days." + findings.append(report) + + return findings diff --git a/prowler/providers/gcp/services/iam/iam_service.py b/prowler/providers/gcp/services/iam/iam_service.py index d6f696d6aa..08e1ee4c3a 100644 --- a/prowler/providers/gcp/services/iam/iam_service.py +++ b/prowler/providers/gcp/services/iam/iam_service.py @@ -35,6 +35,7 @@ class IAM(GCPService): email=account["email"], display_name=account.get("displayName", ""), project_id=project_id, + uniqueId=account.get("uniqueId", ""), ) ) @@ -99,6 +100,7 @@ class ServiceAccount(BaseModel): display_name: str keys: list[Key] = [] project_id: str + uniqueId: str class AccessApproval(GCPService): diff --git a/prowler/providers/microsoft365/services/entra/entra_admin_mfa_enabled_for_administrative_roles/__init__.py b/prowler/providers/gcp/services/iam/iam_service_account_unused/__init__.py similarity index 100% rename from prowler/providers/microsoft365/services/entra/entra_admin_mfa_enabled_for_administrative_roles/__init__.py rename to prowler/providers/gcp/services/iam/iam_service_account_unused/__init__.py diff --git a/prowler/providers/gcp/services/iam/iam_service_account_unused/iam_service_account_unused.metadata.json b/prowler/providers/gcp/services/iam/iam_service_account_unused/iam_service_account_unused.metadata.json new file mode 100644 index 0000000000..6d4d889f78 --- /dev/null +++ b/prowler/providers/gcp/services/iam/iam_service_account_unused/iam_service_account_unused.metadata.json @@ -0,0 +1,30 @@ +{ + "Provider": "gcp", + "CheckID": "iam_service_account_unused", + "CheckTitle": "Ensure That There Are No Unused Service Accounts", + "CheckType": [], + "ServiceName": "iam", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "medium", + "ResourceType": "ServiceAccount", + "Description": "Ensure That There Are No Unused Service Accounts.", + "Risk": "A malicious actor could make use of privilege escalation or impersonation to access an unused Service Account that is over-privileged.", + "RelatedUrl": "https://cloud.google.com/iam/docs/service-account-overview#identify-unused", + "Remediation": { + "Code": { + "CLI": "", + "NativeIaC": "", + "Other": "", + "Terraform": "" + }, + "Recommendation": { + "Text": "It is recommended to disable or remove unused Service Accounts.", + "Url": "https://cloud.google.com/iam/docs/service-account-overview#identify-unused" + } + }, + "Categories": [], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/gcp/services/iam/iam_service_account_unused/iam_service_account_unused.py b/prowler/providers/gcp/services/iam/iam_service_account_unused/iam_service_account_unused.py new file mode 100644 index 0000000000..12440aff25 --- /dev/null +++ b/prowler/providers/gcp/services/iam/iam_service_account_unused/iam_service_account_unused.py @@ -0,0 +1,30 @@ +from prowler.lib.check.models import Check, Check_Report_GCP +from prowler.providers.gcp.services.iam.iam_client import iam_client +from prowler.providers.gcp.services.monitoring.monitoring_client import ( + monitoring_client, +) + + +class iam_service_account_unused(Check): + def execute(self) -> Check_Report_GCP: + findings = [] + max_unused_days = monitoring_client.audit_config.get( + "max_unused_account_days", 180 + ) + sa_ids_used = monitoring_client.sa_api_metrics + for account in iam_client.service_accounts: + report = Check_Report_GCP( + metadata=self.metadata(), + resource=account, + resource_id=account.email, + location=iam_client.region, + ) + if account.uniqueId in sa_ids_used: + report.status = "PASS" + report.status_extended = f"Service Account {account.email} was used over the last {max_unused_days} days." + else: + report.status = "FAIL" + report.status_extended = f"Service Account {account.email} was not used over the last {max_unused_days} days." + findings.append(report) + + return findings diff --git a/prowler/providers/gcp/services/logging/logging_sink_created/logging_sink_created.py b/prowler/providers/gcp/services/logging/logging_sink_created/logging_sink_created.py index 3905332e96..d180a211ca 100644 --- a/prowler/providers/gcp/services/logging/logging_sink_created/logging_sink_created.py +++ b/prowler/providers/gcp/services/logging/logging_sink_created/logging_sink_created.py @@ -5,23 +5,13 @@ from prowler.providers.gcp.services.logging.logging_client import logging_client class logging_sink_created(Check): def execute(self) -> Check_Report_GCP: findings = [] - projects_with_sink = set() + projects_with_logging_sink = {} for sink in logging_client.sinks: - report = Check_Report_GCP( - metadata=self.metadata(), - resource=sink, - location=logging_client.region, - ) - projects_with_sink.add(sink.project_id) - report.status = "FAIL" - report.status_extended = f"Sink {sink.name} is enabled but not exporting copies of all the log entries in project {sink.project_id}." if sink.filter == "all": - report.status = "PASS" - report.status_extended = f"Sink {sink.name} is enabled exporting copies of all the log entries in project {sink.project_id}." - findings.append(report) + projects_with_logging_sink[sink.project_id] = sink for project in logging_client.project_ids: - if project not in projects_with_sink: + if project not in projects_with_logging_sink.keys(): report = Check_Report_GCP( metadata=self.metadata(), resource=logging_client.projects[project], @@ -31,5 +21,13 @@ class logging_sink_created(Check): report.status = "FAIL" report.status_extended = f"There are no logging sinks to export copies of all the log entries in project {project}." findings.append(report) - + else: + report = Check_Report_GCP( + metadata=self.metadata(), + resource=projects_with_logging_sink[project], + location=logging_client.region, + ) + report.status = "PASS" + report.status_extended = f"Sink {projects_with_logging_sink[project].name} is enabled exporting copies of all the log entries in project {project}." + findings.append(report) return findings diff --git a/prowler/providers/gcp/services/monitoring/monitoring_service.py b/prowler/providers/gcp/services/monitoring/monitoring_service.py index 89ae2d1ea2..575434a441 100644 --- a/prowler/providers/gcp/services/monitoring/monitoring_service.py +++ b/prowler/providers/gcp/services/monitoring/monitoring_service.py @@ -1,3 +1,5 @@ +import datetime + from pydantic import BaseModel from prowler.lib.logger import logger @@ -9,7 +11,13 @@ class Monitoring(GCPService): def __init__(self, provider: GcpProvider): super().__init__(__class__.__name__, provider, api_version="v3") self.alert_policies = [] + self.sa_keys_metrics = set() + self.sa_api_metrics = set() self._get_alert_policies() + self._get_sa_keys_metrics( + "iam.googleapis.com/service_account/key/authn_events_count" + ) + self._get_sa_api_metrics("serviceruntime.googleapis.com/api/request_count") def _get_alert_policies(self): for project_id in self.project_ids: @@ -46,6 +54,98 @@ class Monitoring(GCPService): f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" ) + def _get_sa_keys_metrics(self, metric_type): + try: + max_unused_days = int(self.audit_config.get("max_unused_account_days", 180)) + end_time = ( + datetime.datetime.now(datetime.timezone.utc) + .replace(microsecond=0) + .isoformat() + ) + start_time = ( + ( + datetime.datetime.now(datetime.timezone.utc) + - datetime.timedelta(days=max_unused_days) + ) + .replace(microsecond=0) + .isoformat() + ) + for project_id in self.project_ids: + try: + request = ( + self.client.projects() + .timeSeries() + .list( + name=f"projects/{project_id}", + filter=f'metric.type = "{metric_type}"', + interval_startTime=start_time, + interval_endTime=end_time, + view="HEADERS", + ) + ) + response = request.execute() + + for metric in response.get("timeSeries", []): + key_id = metric["metric"]["labels"].get("key_id") + if key_id: + self.sa_keys_metrics.add(key_id) + + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + + def _get_sa_api_metrics(self, metric_type): + try: + max_unused_days = int(self.audit_config.get("max_unused_account_days", 180)) + end_time = ( + datetime.datetime.now(datetime.timezone.utc) + .replace(microsecond=0) + .isoformat() + ) + start_time = ( + ( + datetime.datetime.now(datetime.timezone.utc) + - datetime.timedelta(days=max_unused_days) + ) + .replace(microsecond=0) + .isoformat() + ) + for project_id in self.project_ids: + try: + request = ( + self.client.projects() + .timeSeries() + .list( + name=f"projects/{project_id}", + filter=f'metric.type = "{metric_type}"', + interval_startTime=start_time, + interval_endTime=end_time, + view="HEADERS", + ) + ) + response = request.execute() + + for metric in response.get("timeSeries", []): + sa_id = metric["resource"]["labels"].get("credential_id") + if sa_id and "serviceaccount:" in sa_id: + self.sa_api_metrics.add( + sa_id.replace("serviceaccount:", "") + ) + + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + class AlertPolicy(BaseModel): name: str diff --git a/prowler/providers/microsoft365/services/entra/entra_admin_portals_role_limited_access/__init__.py b/prowler/providers/github/__init__.py similarity index 100% rename from prowler/providers/microsoft365/services/entra/entra_admin_portals_role_limited_access/__init__.py rename to prowler/providers/github/__init__.py diff --git a/prowler/providers/microsoft365/services/entra/entra_admin_users_sign_in_frequency_enabled/__init__.py b/prowler/providers/github/exceptions/__init__.py similarity index 100% rename from prowler/providers/microsoft365/services/entra/entra_admin_users_sign_in_frequency_enabled/__init__.py rename to prowler/providers/github/exceptions/__init__.py diff --git a/prowler/providers/github/exceptions/exceptions.py b/prowler/providers/github/exceptions/exceptions.py new file mode 100644 index 0000000000..f7058d96ea --- /dev/null +++ b/prowler/providers/github/exceptions/exceptions.py @@ -0,0 +1,95 @@ +from prowler.exceptions.exceptions import ProwlerException + + +# Exceptions codes from 5000 to 5999 are reserved for Github exceptions +class GithubBaseException(ProwlerException): + """Base class for Github Errors.""" + + GITHUB_ERROR_CODES = { + (5000, "GithubEnvironmentVariableError"): { + "message": "Github environment variable error", + "remediation": "Check the Github environment variables and ensure they are properly set.", + }, + (5001, "GithubNonExistentTokenError"): { + "message": "A Github token is required to authenticate against Github", + "remediation": "Check the Github token and ensure it is properly set up.", + }, + (5002, "GithubInvalidTokenError"): { + "message": "Github token provided is not valid", + "remediation": "Check the Github token and ensure it is valid.", + }, + (5003, "GithubSetUpSessionError"): { + "message": "Error setting up session", + "remediation": "Check the session setup and ensure it is properly set up.", + }, + (5004, "GithubSetUpIdentityError"): { + "message": "Github identity setup error due to bad credentials", + "remediation": "Check credentials and ensure they are properly set up for Github and the identity provider.", + }, + (5005, "GithubInvalidCredentialsError"): { + "message": "Github invalid App Key or App ID for GitHub APP login", + "remediation": "Check user and password and ensure they are properly set up as in your Github account.", + }, + } + + def __init__(self, code, file=None, original_exception=None, message=None): + provider = "Github" + error_info = self.GITHUB_ERROR_CODES.get((code, self.__class__.__name__)) + if message: + error_info["message"] = message + super().__init__( + code=code, + source=provider, + file=file, + original_exception=original_exception, + error_info=error_info, + ) + + +class GithubCredentialsError(GithubBaseException): + """Base class for Github credentials errors.""" + + def __init__(self, code, file=None, original_exception=None, message=None): + super().__init__(code, file, original_exception, message) + + +class GithubEnvironmentVariableError(GithubCredentialsError): + def __init__(self, file=None, original_exception=None, message=None): + super().__init__( + 5000, file=file, original_exception=original_exception, message=message + ) + + +class GithubNonExistentTokenError(GithubCredentialsError): + def __init__(self, file=None, original_exception=None, message=None): + super().__init__( + 5001, file=file, original_exception=original_exception, message=message + ) + + +class GithubInvalidTokenError(GithubCredentialsError): + def __init__(self, file=None, original_exception=None, message=None): + super().__init__( + 5002, file=file, original_exception=original_exception, message=message + ) + + +class GithubSetUpSessionError(GithubCredentialsError): + def __init__(self, file=None, original_exception=None, message=None): + super().__init__( + 5003, file=file, original_exception=original_exception, message=message + ) + + +class GithubSetUpIdentityError(GithubCredentialsError): + def __init__(self, file=None, original_exception=None, message=None): + super().__init__( + 5004, file=file, original_exception=original_exception, message=message + ) + + +class GithubInvalidCredentialsError(GithubCredentialsError): + def __init__(self, file=None, original_exception=None, message=None): + super().__init__( + 5005, file=file, original_exception=original_exception, message=message + ) diff --git a/prowler/providers/github/github_provider.py b/prowler/providers/github/github_provider.py new file mode 100644 index 0000000000..d34b2b3e66 --- /dev/null +++ b/prowler/providers/github/github_provider.py @@ -0,0 +1,360 @@ +import os +from os import environ +from typing import Union + +from colorama import Fore, Style +from github import Auth, Github, GithubIntegration + +from prowler.config.config import ( + default_config_file_path, + get_default_mute_file_path, + load_and_validate_config_file, +) +from prowler.lib.logger import logger +from prowler.lib.mutelist.mutelist import Mutelist +from prowler.lib.utils.utils import print_boxes +from prowler.providers.common.models import Audit_Metadata +from prowler.providers.common.provider import Provider +from prowler.providers.github.exceptions.exceptions import ( + GithubEnvironmentVariableError, + GithubInvalidCredentialsError, + GithubInvalidTokenError, + GithubSetUpIdentityError, + GithubSetUpSessionError, +) +from prowler.providers.github.lib.mutelist.mutelist import GithubMutelist +from prowler.providers.github.models import ( + GithubAppIdentityInfo, + GithubIdentityInfo, + GithubSession, +) + + +def format_rsa_key(key: str) -> str: + """ + Format an RSA private key by adding line breaks to the key body. + This function takes an RSA private key in PEM format as input and formats it by inserting line breaks every 64 characters in the key body. This formatting is necessary for the GitHub SDK Parser to correctly process the key. + Args: + key (str): The RSA private key in PEM format as a string. The key should start with "-----BEGIN RSA PRIVATE KEY-----" and end with "-----END RSA PRIVATE KEY-----". + Returns: + str: The formatted RSA private key with line breaks added to the key body. If the input key does not have the correct headers, it is returned unchanged. + Example: + >>> key = "-----BEGIN RSA PRIVATE KEY-----XXXXXXXXXXXXX...-----END RSA PRIVATE KEY-----" + >>> formatted_key = format_rsa_key(key) + >>> print(formatted_key) + -----BEGIN RSA PRIVATE KEY----- + XXXXXXXXXXXXX... + -----END RSA PRIVATE KEY----- + + """ + if ( + key.startswith("-----BEGIN RSA PRIVATE KEY-----") + and key.endswith("-----END RSA PRIVATE KEY-----") + and "\n" not in key + ): + # Extract the key body (excluding the headers) + key_body = key[ + len("-----BEGIN RSA PRIVATE KEY-----") : len(key) + - len("-----END RSA PRIVATE KEY-----") + ].strip() + # Add line breaks to the body + formatted_key_body = "\n".join( + [key_body[i : i + 64] for i in range(0, len(key_body), 64)] + ) + # Reconstruct the key with headers and formatted body + return f"-----BEGIN RSA PRIVATE KEY-----\n{formatted_key_body}\n-----END RSA PRIVATE KEY-----" + return key + + +class GithubProvider(Provider): + """ + GitHub Provider class + + This class is responsible for setting up the GitHub provider, including the session, identity, audit configuration, fixer configuration, and mutelist. + + Attributes: + _type (str): The type of the provider. + _auth_method (str): The authentication method used by the provider. + _session (GithubSession): The session object for the provider. + _identity (GithubIdentityInfo): The identity information for the provider. + _audit_config (dict): The audit configuration for the provider. + _fixer_config (dict): The fixer configuration for the provider. + _mutelist (Mutelist): The mutelist for the provider. + audit_metadata (Audit_Metadata): The audit metadata for the provider. + """ + + _type: str = "github" + _auth_method: str = None + _session: GithubSession + _identity: GithubIdentityInfo + _audit_config: dict + _mutelist: Mutelist + audit_metadata: Audit_Metadata + + def __init__( + self, + # Authentication credentials + personal_access_token: str = "", + oauth_app_token: str = "", + github_app_key: str = "", + github_app_id: int = 0, + # Provider configuration + config_path: str = None, + config_content: dict = None, + fixer_config: dict = {}, + mutelist_path: str = None, + mutelist_content: dict = None, + ): + """ + GitHub Provider constructor + + Args: + personal_access_token (str): GitHub personal access token. + oauth_app_token (str): GitHub OAuth App token. + github_app_key (str): GitHub App key. + github_app_id (int): GitHub App ID. + config_path (str): Path to the audit configuration file. + config_content (dict): Audit configuration content. + fixer_config (dict): Fixer configuration content. + mutelist_path (str): Path to the mutelist file. + mutelist_content (dict): Mutelist content. + """ + logger.info("Instantiating GitHub Provider...") + + self._session = self.setup_session( + personal_access_token, + oauth_app_token, + github_app_id, + github_app_key, + ) + + self._identity = self.setup_identity() + + # Audit Config + if config_content: + self._audit_config = config_content + else: + if not config_path: + config_path = default_config_file_path + self._audit_config = load_and_validate_config_file(self._type, config_path) + + # Fixer Config + self._fixer_config = fixer_config + + # Mutelist + if mutelist_content: + self._mutelist = GithubMutelist( + mutelist_content=mutelist_content, + ) + else: + if not mutelist_path: + mutelist_path = get_default_mute_file_path(self.type) + self._mutelist = GithubMutelist( + mutelist_path=mutelist_path, + ) + Provider.set_global_provider(self) + + @property + def auth_method(self): + """Returns the authentication method for the GitHub provider.""" + return self._auth_method + + @property + def pat(self): + """Returns the personal access token for the GitHub provider.""" + return self._pat + + @property + def session(self): + """Returns the session object for the GitHub provider.""" + return self._session + + @property + def identity(self): + """Returns the identity information for the GitHub provider.""" + return self._identity + + @property + def type(self): + """Returns the type of the GitHub provider.""" + return self._type + + @property + def audit_config(self): + return self._audit_config + + @property + def fixer_config(self): + return self._fixer_config + + @property + def mutelist(self) -> GithubMutelist: + """ + mutelist method returns the provider's mutelist. + """ + return self._mutelist + + def setup_session( + self, + personal_access_token: str = None, + oauth_app_token: str = None, + github_app_id: int = 0, + github_app_key: str = None, + ) -> GithubSession: + """ + Returns the GitHub headers responsible authenticating API calls. + + Args: + personal_access_token (str): GitHub personal access token. + oauth_app_token (str): GitHub OAuth App token. + github_app_id (int): GitHub App ID. + github_app_key (str): GitHub App key. + + Returns: + GithubSession: Authenticated session token for API requests. + """ + + session_token = "" + app_key = "" + app_id = 0 + + try: + # Ensure that at least one authentication method is selected. Default to environment variable for PAT if none is provided. + if personal_access_token: + session_token = personal_access_token + self._auth_method = "Personal Access Token" + + elif oauth_app_token: + session_token = oauth_app_token + self._auth_method = "OAuth App Token" + + elif github_app_id and github_app_key: + app_id = github_app_id + with open(github_app_key, "r") as rsa_key: + app_key = rsa_key.read() + + self._auth_method = "GitHub App Token" + + else: + # PAT + logger.info( + "Looking for GITHUB_PERSONAL_ACCESS_TOKEN environment variable as user has not provided any token...." + ) + session_token = environ.get("GITHUB_PERSONAL_ACCESS_TOKEN", "") + if session_token: + self._auth_method = "Environment Variable for Personal Access Token" + + if not session_token: + # OAUTH + logger.info( + "Looking for GITHUB_OAUTH_APP_TOKEN environment variable as user has not provided any token...." + ) + session_token = environ.get("GITHUB_OAUTH_APP_TOKEN", "") + if session_token: + self._auth_method = "Environment Variable for OAuth App Token" + + if not session_token: + # APP + logger.info( + "Looking for GITHUB_APP_ID and GITHUB_APP_KEY environment variables as user has not provided any token...." + ) + app_id = environ.get("GITHUB_APP_ID", "") + app_key = format_rsa_key(environ.get(r"GITHUB_APP_KEY", "")) + + if app_id and app_key: + self._auth_method = ( + "Environment Variables for GitHub App Key and ID" + ) + + if not self._auth_method: + raise GithubEnvironmentVariableError( + file=os.path.basename(__file__), + message="No authentication method selected and not environment variables were found.", + ) + + credentials = GithubSession( + token=session_token, + key=app_key, + id=app_id, + ) + + return credentials + + except Exception as error: + logger.critical( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}] -- {error}" + ) + raise GithubSetUpSessionError( + original_exception=error, + ) + + def setup_identity( + self, + ) -> Union[GithubIdentityInfo, GithubAppIdentityInfo]: + """ + Returns the GitHub identity information + + Returns: + GithubIdentityInfo | GithubAppIdentityInfo: An instance of GithubIdentityInfo or GithubAppIdentityInfo containing the identity information. + """ + credentials = self.session + + try: + if credentials.token: + auth = Auth.Token(credentials.token) + g = Github(auth=auth) + try: + identity = GithubIdentityInfo( + account_id=g.get_user().id, + account_name=g.get_user().login, + account_url=g.get_user().url, + ) + return identity + + except Exception as error: + raise GithubInvalidTokenError( + original_exception=error, + ) + + elif credentials.id != 0 and credentials.key: + auth = Auth.AppAuth(credentials.id, credentials.key) + gi = GithubIntegration(auth=auth) + try: + identity = GithubAppIdentityInfo(app_id=gi.get_app().id) + return identity + + except Exception as error: + raise GithubInvalidCredentialsError( + original_exception=error, + ) + + except Exception as error: + logger.critical( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}] -- {error}" + ) + raise GithubSetUpIdentityError( + original_exception=error, + ) + + def print_credentials(self): + """ + Prints the GitHub credentials. + + Usage: + >>> self.print_credentials() + """ + if isinstance(self.identity, GithubIdentityInfo): + report_lines = [ + f"GitHub Account: {Fore.YELLOW}{self.identity.account_name}{Style.RESET_ALL}", + f"GitHub Account ID: {Fore.YELLOW}{self.identity.account_id}{Style.RESET_ALL}", + f"Authentication Method: {Fore.YELLOW}{self.auth_method}{Style.RESET_ALL}", + ] + elif isinstance(self.identity, GithubAppIdentityInfo): + report_lines = [ + f"GitHub App ID: {Fore.YELLOW}{self.identity.app_id}{Style.RESET_ALL}", + f"Authentication Method: {Fore.YELLOW}{self.auth_method}{Style.RESET_ALL}", + ] + report_title = ( + f"{Style.BRIGHT}Using the GitHub credentials below:{Style.RESET_ALL}" + ) + print_boxes(report_lines, report_title) diff --git a/prowler/providers/microsoft365/services/entra/entra_dynamic_group_for_guests_created/__init__.py b/prowler/providers/github/lib/arguments/__init__.py similarity index 100% rename from prowler/providers/microsoft365/services/entra/entra_dynamic_group_for_guests_created/__init__.py rename to prowler/providers/github/lib/arguments/__init__.py diff --git a/prowler/providers/github/lib/arguments/arguments.py b/prowler/providers/github/lib/arguments/arguments.py new file mode 100644 index 0000000000..6e7598c8d7 --- /dev/null +++ b/prowler/providers/github/lib/arguments/arguments.py @@ -0,0 +1,34 @@ +def init_parser(self): + """Init the Github Provider CLI parser""" + github_parser = self.subparsers.add_parser( + "github", parents=[self.common_providers_parser], help="GitHub Provider" + ) + github_auth_subparser = github_parser.add_argument_group("Authentication Modes") + # Authentication Modes + github_auth_subparser.add_argument( + "--personal-access-token", + nargs="?", + help="Personal Access Token to log in against GitHub", + default=None, + ) + + github_auth_subparser.add_argument( + "--oauth-app-token", + nargs="?", + help="OAuth App Token to log in against GitHub", + default=None, + ) + + # GitHub App Authentication + github_auth_subparser.add_argument( + "--github-app-id", + nargs="?", + help="GitHub App ID to log in against GitHub", + default=None, + ) + github_auth_subparser.add_argument( + "--github-app-key", + nargs="?", + help="GitHub App Key Path to log in against GitHub", + default=None, + ) diff --git a/prowler/providers/microsoft365/services/entra/entra_identity_protection_sign_in_risk_enabled/__init__.py b/prowler/providers/github/lib/mutelist/__init__.py similarity index 100% rename from prowler/providers/microsoft365/services/entra/entra_identity_protection_sign_in_risk_enabled/__init__.py rename to prowler/providers/github/lib/mutelist/__init__.py diff --git a/prowler/providers/github/lib/mutelist/mutelist.py b/prowler/providers/github/lib/mutelist/mutelist.py new file mode 100644 index 0000000000..207b54a52a --- /dev/null +++ b/prowler/providers/github/lib/mutelist/mutelist.py @@ -0,0 +1,18 @@ +from prowler.lib.check.models import CheckReportGithub +from prowler.lib.mutelist.mutelist import Mutelist +from prowler.lib.outputs.utils import unroll_dict, unroll_tags + + +class GithubMutelist(Mutelist): + def is_finding_muted( + self, + finding: CheckReportGithub, + account_name: str, + ) -> bool: + return self.is_muted( + account_name, + finding.check_metadata.CheckID, + "*", # TODO: Study regions in GitHub + finding.resource_name, + unroll_dict(unroll_tags(finding.resource_tags)), + ) diff --git a/prowler/providers/microsoft365/services/entra/entra_identity_protection_user_risk_enabled/__init__.py b/prowler/providers/github/lib/service/__init__.py similarity index 100% rename from prowler/providers/microsoft365/services/entra/entra_identity_protection_user_risk_enabled/__init__.py rename to prowler/providers/github/lib/service/__init__.py diff --git a/prowler/providers/github/lib/service/service.py b/prowler/providers/github/lib/service/service.py new file mode 100644 index 0000000000..b9e4bf2974 --- /dev/null +++ b/prowler/providers/github/lib/service/service.py @@ -0,0 +1,41 @@ +from github import Auth, Github, GithubIntegration + +from prowler.lib.logger import logger +from prowler.providers.github.github_provider import GithubProvider + + +class GithubService: + def __init__( + self, + service: str, + provider: GithubProvider, + ): + self.clients = self.__set_clients__( + provider.session, + ) + + self.audit_config = provider.audit_config + self.fixer_config = provider.fixer_config + + def __set_clients__(self, session): + clients = [] + try: + if session.token: + auth = Auth.Token(session.token) + clients = [Github(auth=auth)] + + elif session.key and session.id: + auth = Auth.AppAuth( + session.id, + session.key, + ) + gi = GithubIntegration(auth=auth) + + for installation in gi.get_installations(): + clients.append(installation.get_github_for_installation()) + + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + return clients diff --git a/prowler/providers/github/models.py b/prowler/providers/github/models.py new file mode 100644 index 0000000000..a4fb2fdc36 --- /dev/null +++ b/prowler/providers/github/models.py @@ -0,0 +1,42 @@ +from pydantic import BaseModel + +from prowler.config.config import output_file_timestamp +from prowler.providers.common.models import ProviderOutputOptions + + +class GithubSession(BaseModel): + token: str + key: str + id: str + + +class GithubIdentityInfo(BaseModel): + account_id: str + account_name: str + account_url: str + + +class GithubAppIdentityInfo(BaseModel): + app_id: str + + +class GithubOutputOptions(ProviderOutputOptions): + def __init__(self, arguments, bulk_checks_metadata, identity): + # First call ProviderOutputOptions init + super().__init__(arguments, bulk_checks_metadata) + # TODO move the below if to ProviderOutputOptions + # Check if custom output filename was input, if not, set the default + if ( + not hasattr(arguments, "output_filename") + or arguments.output_filename is None + ): + if isinstance(identity, GithubIdentityInfo): + self.output_filename = ( + f"prowler-output-{identity.account_name}-{output_file_timestamp}" + ) + elif isinstance(identity, GithubAppIdentityInfo): + self.output_filename = ( + f"prowler-output-{identity.app_id}-{output_file_timestamp}" + ) + else: + self.output_filename = arguments.output_filename diff --git a/prowler/providers/microsoft365/services/entra/entra_managed_device_required_for_authentication/__init__.py b/prowler/providers/github/services/organization/__init__.py similarity index 100% rename from prowler/providers/microsoft365/services/entra/entra_managed_device_required_for_authentication/__init__.py rename to prowler/providers/github/services/organization/__init__.py diff --git a/prowler/providers/github/services/organization/organization_client.py b/prowler/providers/github/services/organization/organization_client.py new file mode 100644 index 0000000000..8c05c87178 --- /dev/null +++ b/prowler/providers/github/services/organization/organization_client.py @@ -0,0 +1,6 @@ +from prowler.providers.common.provider import Provider +from prowler.providers.github.services.organization.organization_service import ( + Organization, +) + +organization_client = Organization(Provider.get_global_provider()) diff --git a/prowler/providers/microsoft365/services/entra/entra_password_hash_sync_enabled/__init__.py b/prowler/providers/github/services/organization/organization_members_mfa_required/__init__.py similarity index 100% rename from prowler/providers/microsoft365/services/entra/entra_password_hash_sync_enabled/__init__.py rename to prowler/providers/github/services/organization/organization_members_mfa_required/__init__.py diff --git a/prowler/providers/github/services/organization/organization_members_mfa_required/organization_members_mfa_required.metadata.json b/prowler/providers/github/services/organization/organization_members_mfa_required/organization_members_mfa_required.metadata.json new file mode 100644 index 0000000000..cb1d67e96e --- /dev/null +++ b/prowler/providers/github/services/organization/organization_members_mfa_required/organization_members_mfa_required.metadata.json @@ -0,0 +1,30 @@ +{ + "Provider": "github", + "CheckID": "organization_members_mfa_required", + "CheckTitle": "Check if organization members are required to have MFA enabled.", + "CheckType": [], + "ServiceName": "organization", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "critical", + "ResourceType": "GitHubOrganization", + "Description": "Ensure that all organization members are required to have multi-factor authentication (MFA) enabled. Enforcing MFA for all organization members helps protect the organization's resources and data from unauthorized access and security breaches.", + "Risk": "Without Multi-Factor Authentication (MFA), user accounts are vulnerable to unauthorized access if their passwords are compromised. This can lead to unauthorized actions such as data theft, malicious code commits, and repository manipulation, potentially compromising the organization's source code and intellectual property.", + "RelatedUrl": "https://docs.github.com/en/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/requiring-two-factor-authentication-in-your-organization", + "Remediation": { + "Code": { + "CLI": "", + "NativeIaC": "", + "Other": "", + "Terraform": "" + }, + "Recommendation": { + "Text": "Mandate the use of MFA for all organization members. This significantly enhances account security by adding an additional layer of protection beyond a username and password. MFA ensures that even if a password is compromised, unauthorized access to user accounts and repositories is prevented, safeguarding sensitive data and critical assets.", + "Url": "https://docs.github.com/en/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/preparing-to-require-two-factor-authentication-in-your-organization" + } + }, + "Categories": [], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/github/services/organization/organization_members_mfa_required/organization_members_mfa_required.py b/prowler/providers/github/services/organization/organization_members_mfa_required/organization_members_mfa_required.py new file mode 100644 index 0000000000..e18c127c0d --- /dev/null +++ b/prowler/providers/github/services/organization/organization_members_mfa_required/organization_members_mfa_required.py @@ -0,0 +1,36 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportGithub +from prowler.providers.github.services.organization.organization_client import ( + organization_client, +) + + +class organization_members_mfa_required(Check): + """Check if organization members are required to have two-factor authentication enabled. + + This class verifies whether each organization requires its members to have two-factor authentication enabled. + """ + + def execute(self) -> List[CheckReportGithub]: + """Execute the Github Organization Members MFA Required check. + + Iterates over all organizations and checks if members are required to have two-factor authentication enabled. + + Returns: + List[CheckReportGithub]: A list of reports for each repository + """ + findings = [] + for org in organization_client.organizations.values(): + if org.mfa_required is not None: + report = CheckReportGithub(metadata=self.metadata(), resource=org) + report.status = "FAIL" + report.status_extended = f"Organization {org.name} does not require members to have two-factor authentication enabled." + + if org.mfa_required: + report.status = "PASS" + report.status_extended = f"Organization {org.name} does require members to have two-factor authentication enabled." + + findings.append(report) + + return findings diff --git a/prowler/providers/github/services/organization/organization_service.py b/prowler/providers/github/services/organization/organization_service.py new file mode 100644 index 0000000000..3f8f8dca95 --- /dev/null +++ b/prowler/providers/github/services/organization/organization_service.py @@ -0,0 +1,44 @@ +from typing import Optional + +from pydantic import BaseModel + +from prowler.lib.logger import logger +from prowler.providers.github.lib.service.service import GithubService + + +class Organization(GithubService): + def __init__(self, provider): + super().__init__(__class__.__name__, provider) + self.organizations = self._list_organizations() + + def _list_organizations(self): + logger.info("Organization - Listing Organizations...") + organizations = {} + try: + for client in self.clients: + for org in client.get_user().get_orgs(): + try: + require_mfa = org.two_factor_requirement_enabled + except Exception as error: + require_mfa = None + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + organizations[org.id] = Org( + id=org.id, + name=org.login, + mfa_required=require_mfa, + ) + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + return organizations + + +class Org(BaseModel): + """Model for Github Organization""" + + id: int + name: str + mfa_required: Optional[bool] = False diff --git a/prowler/providers/microsoft365/services/entra/entra_policy_ensure_default_user_cannot_create_tenants/__init__.py b/prowler/providers/github/services/repository/__init__.py similarity index 100% rename from prowler/providers/microsoft365/services/entra/entra_policy_ensure_default_user_cannot_create_tenants/__init__.py rename to prowler/providers/github/services/repository/__init__.py diff --git a/prowler/providers/microsoft365/services/entra/entra_thirdparty_integrated_apps_not_allowed/__init__.py b/prowler/providers/github/services/repository/repository_branch_delete_on_merge_enabled/__init__.py similarity index 100% rename from prowler/providers/microsoft365/services/entra/entra_thirdparty_integrated_apps_not_allowed/__init__.py rename to prowler/providers/github/services/repository/repository_branch_delete_on_merge_enabled/__init__.py diff --git a/prowler/providers/github/services/repository/repository_branch_delete_on_merge_enabled/repository_branch_delete_on_merge_enabled.metadata.json b/prowler/providers/github/services/repository/repository_branch_delete_on_merge_enabled/repository_branch_delete_on_merge_enabled.metadata.json new file mode 100644 index 0000000000..d5cff9a106 --- /dev/null +++ b/prowler/providers/github/services/repository/repository_branch_delete_on_merge_enabled/repository_branch_delete_on_merge_enabled.metadata.json @@ -0,0 +1,30 @@ +{ + "Provider": "github", + "CheckID": "repository_branch_delete_on_merge_enabled", + "CheckTitle": "Check if a repository deletes the branch after merging", + "CheckType": [], + "ServiceName": "repository", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "medium", + "ResourceType": "GitHubRepository", + "Description": "Ensure that the repository deletes the branch after merging.", + "Risk": "Inactive branches pose a security risk as they can accumulate outdated code, dependencies, and potential vulnerabilities over time. Malicious actors may exploit these branches, and they can clutter the repository, making it harder to manage and track the active code. Additionally, stale branches may unintentionally be accessed or used inappropriately, leading to potential security breaches.", + "RelatedUrl": "https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches", + "Remediation": { + "Code": { + "CLI": "", + "NativeIaC": "", + "Other": "", + "Terraform": "" + }, + "Recommendation": { + "Text": "Regularly review and remove inactive branches from your repositories. This helps reduce the risk of malicious code injection, sensitive data leaks, and unnecessary clutter in the repository. By keeping branches active and up to date, you ensure that your codebase remains secure and manageable.", + "Url": "https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-the-automatic-deletion-of-branches" + } + }, + "Categories": [], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/github/services/repository/repository_branch_delete_on_merge_enabled/repository_branch_delete_on_merge_enabled.py b/prowler/providers/github/services/repository/repository_branch_delete_on_merge_enabled/repository_branch_delete_on_merge_enabled.py new file mode 100644 index 0000000000..5b561927c3 --- /dev/null +++ b/prowler/providers/github/services/repository/repository_branch_delete_on_merge_enabled/repository_branch_delete_on_merge_enabled.py @@ -0,0 +1,41 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportGithub +from prowler.providers.github.services.repository.repository_client import ( + repository_client, +) + + +class repository_branch_delete_on_merge_enabled(Check): + """Check if a repository deletes branches on merge + + This class verifies whether each repository deletes branches on merge. + """ + + def execute(self) -> List[CheckReportGithub]: + """Execute the Github Repository Deletes Branch On Merge check + + Iterates over all repositories and checks if they delete branches on merge. + + Returns: + List[CheckReportGithub]: A list of reports for each repository + """ + findings = [] + for repo in repository_client.repositories.values(): + report = CheckReportGithub( + metadata=self.metadata(), resource=repo, repository=repo.name + ) + report.status = "FAIL" + report.status_extended = ( + f"Repository {repo.name} does not delete branches on merge." + ) + + if repo.delete_branch_on_merge: + report.status = "PASS" + report.status_extended = ( + f"Repository {repo.name} does delete branches on merge." + ) + + findings.append(report) + + return findings diff --git a/prowler/providers/github/services/repository/repository_client.py b/prowler/providers/github/services/repository/repository_client.py new file mode 100644 index 0000000000..3ea47cb952 --- /dev/null +++ b/prowler/providers/github/services/repository/repository_client.py @@ -0,0 +1,4 @@ +from prowler.providers.common.provider import Provider +from prowler.providers.github.services.repository.repository_service import Repository + +repository_client = Repository(Provider.get_global_provider()) diff --git a/prowler/providers/microsoft365/services/sharepoint/__init__.py b/prowler/providers/github/services/repository/repository_default_branch_deletion_disabled/__init__.py similarity index 100% rename from prowler/providers/microsoft365/services/sharepoint/__init__.py rename to prowler/providers/github/services/repository/repository_default_branch_deletion_disabled/__init__.py diff --git a/prowler/providers/github/services/repository/repository_default_branch_deletion_disabled/repository_default_branch_deletion_disabled.metadata.json b/prowler/providers/github/services/repository/repository_default_branch_deletion_disabled/repository_default_branch_deletion_disabled.metadata.json new file mode 100644 index 0000000000..422ff6dbe4 --- /dev/null +++ b/prowler/providers/github/services/repository/repository_default_branch_deletion_disabled/repository_default_branch_deletion_disabled.metadata.json @@ -0,0 +1,30 @@ +{ + "Provider": "github", + "CheckID": "repository_default_branch_deletion_disabled", + "CheckTitle": "Check if a repository denies default branch deletion", + "CheckType": [], + "ServiceName": "repository", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "high", + "ResourceType": "GitHubRepository", + "Description": "Ensure that the repository denies default branch deletion.", + "Risk": "Allowing the deletion of protected branches by users with push access increases the risk of accidental or intentional branch removal, potentially resulting in significant data loss or disruption to the development process.", + "RelatedUrl": "https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches#allow-deletions", + "Remediation": { + "Code": { + "CLI": "", + "NativeIaC": "", + "Other": "", + "Terraform": "" + }, + "Recommendation": { + "Text": "Deny the ability to delete protected branches to ensure the preservation of critical branch data. This prevents accidental or malicious deletions and helps maintain the integrity and stability of the repository.", + "Url": "https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/managing-a-branch-protection-rule" + } + }, + "Categories": [], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/github/services/repository/repository_default_branch_deletion_disabled/repository_default_branch_deletion_disabled.py b/prowler/providers/github/services/repository/repository_default_branch_deletion_disabled/repository_default_branch_deletion_disabled.py new file mode 100644 index 0000000000..12d504a926 --- /dev/null +++ b/prowler/providers/github/services/repository/repository_default_branch_deletion_disabled/repository_default_branch_deletion_disabled.py @@ -0,0 +1,42 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportGithub +from prowler.providers.github.services.repository.repository_client import ( + repository_client, +) + + +class repository_default_branch_deletion_disabled(Check): + """Check if a repository denies branch deletion + + This class verifies whether each repository denies default branch deletion. + """ + + def execute(self) -> List[CheckReportGithub]: + """Execute the Github Repository Denies Default Branch Deletion check + + Iterates over all repositories and checks if they deny default branch deletion. + + Returns: + List[CheckReportGithub]: A list of reports for each repository + """ + findings = [] + for repo in repository_client.repositories.values(): + if repo.default_branch_deletion is not None: + report = CheckReportGithub( + metadata=self.metadata(), resource=repo, repository=repo.name + ) + report.status = "FAIL" + report.status_extended = ( + f"Repository {repo.name} does allow default branch deletion." + ) + + if not repo.default_branch_deletion: + report.status = "PASS" + report.status_extended = ( + f"Repository {repo.name} does deny default branch deletion." + ) + + findings.append(report) + + return findings diff --git a/prowler/providers/microsoft365/services/sharepoint/sharepoint_external_sharing_managed/__init__.py b/prowler/providers/github/services/repository/repository_default_branch_disallows_force_push/__init__.py similarity index 100% rename from prowler/providers/microsoft365/services/sharepoint/sharepoint_external_sharing_managed/__init__.py rename to prowler/providers/github/services/repository/repository_default_branch_disallows_force_push/__init__.py diff --git a/prowler/providers/github/services/repository/repository_default_branch_disallows_force_push/repository_default_branch_disallows_force_push.metadata.json b/prowler/providers/github/services/repository/repository_default_branch_disallows_force_push/repository_default_branch_disallows_force_push.metadata.json new file mode 100644 index 0000000000..5cff05ec13 --- /dev/null +++ b/prowler/providers/github/services/repository/repository_default_branch_disallows_force_push/repository_default_branch_disallows_force_push.metadata.json @@ -0,0 +1,30 @@ +{ + "Provider": "github", + "CheckID": "repository_default_branch_disallows_force_push", + "CheckTitle": "Check if repository denies force push", + "CheckType": [], + "ServiceName": "repository", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "high", + "ResourceType": "GithubRepository", + "Description": "Ensure that the repository denies force push to protected branches.", + "Risk": "Permitting force pushes to branches can lead to accidental or intentional overwrites of the commit history, resulting in potential data loss, code inconsistencies, or the introduction of malicious changes. This compromises the stability and security of the repository.", + "RelatedUrl": "https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches#allow-force-pushes", + "Remediation": { + "Code": { + "CLI": "", + "NativeIaC": "", + "Other": "", + "Terraform": "" + }, + "Recommendation": { + "Text": "Disable force pushes on protected branches to preserve the commit history and ensure the integrity of the repository. This measure helps prevent unintentional data loss and protects the repository from malicious changes.", + "Url": "https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/managing-a-branch-protection-rule" + } + }, + "Categories": [], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/github/services/repository/repository_default_branch_disallows_force_push/repository_default_branch_disallows_force_push.py b/prowler/providers/github/services/repository/repository_default_branch_disallows_force_push/repository_default_branch_disallows_force_push.py new file mode 100644 index 0000000000..2183b84a79 --- /dev/null +++ b/prowler/providers/github/services/repository/repository_default_branch_disallows_force_push/repository_default_branch_disallows_force_push.py @@ -0,0 +1,42 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportGithub +from prowler.providers.github.services.repository.repository_client import ( + repository_client, +) + + +class repository_default_branch_disallows_force_push(Check): + """Check if a repository denies force push + + This class verifies whether each repository denies force push. + """ + + def execute(self) -> List[CheckReportGithub]: + """Execute the Github Repository Denies Force Push check + + Iterates over all repositories and checks if they deny force push. + + Returns: + List[CheckReportGithub]: A list of reports for each repository + """ + findings = [] + for repo in repository_client.repositories.values(): + if repo.allow_force_pushes is not None: + report = CheckReportGithub( + metadata=self.metadata(), resource=repo, repository=repo.name + ) + report.status = "FAIL" + report.status_extended = ( + f"Repository {repo.name} does allow force push." + ) + + if not repo.allow_force_pushes: + report.status = "PASS" + report.status_extended = ( + f"Repository {repo.name} does deny force push." + ) + + findings.append(report) + + return findings diff --git a/prowler/providers/microsoft365/services/sharepoint/sharepoint_external_sharing_restricted/__init__.py b/prowler/providers/github/services/repository/repository_default_branch_protection_applies_to_admins/__init__.py similarity index 100% rename from prowler/providers/microsoft365/services/sharepoint/sharepoint_external_sharing_restricted/__init__.py rename to prowler/providers/github/services/repository/repository_default_branch_protection_applies_to_admins/__init__.py diff --git a/prowler/providers/github/services/repository/repository_default_branch_protection_applies_to_admins/repository_default_branch_protection_applies_to_admins.metadata.json b/prowler/providers/github/services/repository/repository_default_branch_protection_applies_to_admins/repository_default_branch_protection_applies_to_admins.metadata.json new file mode 100644 index 0000000000..a20ff5f930 --- /dev/null +++ b/prowler/providers/github/services/repository/repository_default_branch_protection_applies_to_admins/repository_default_branch_protection_applies_to_admins.metadata.json @@ -0,0 +1,30 @@ +{ + "Provider": "github", + "CheckID": "repository_default_branch_protection_applies_to_admins", + "CheckTitle": "Check if repository enforces admin branch protection", + "CheckType": [], + "ServiceName": "repository", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "high", + "ResourceType": "GithubRepository", + "Description": "Ensure that the repository enforces branch protection rules for administrators.", + "Risk": "Excluding administrators from branch protection rules introduces a significant risk of unauthorized or unreviewed changes being pushed to protected branches. This can lead to vulnerabilities, including the potential insertion of malicious code, especially if an administrator account is compromised.", + "RelatedUrl": "https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches#do-not-allow-bypassing-the-above-settings", + "Remediation": { + "Code": { + "CLI": "", + "NativeIaC": "", + "Other": "", + "Terraform": "" + }, + "Recommendation": { + "Text": "Enforce branch protection rules for administrators to ensure they adhere to the same security and quality standards as other users. This mitigates the risk of unreviewed or untrusted code being introduced, enhancing the overall integrity of the codebase.", + "Url": "https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/managing-a-branch-protection-rule" + } + }, + "Categories": [], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/github/services/repository/repository_default_branch_protection_applies_to_admins/repository_default_branch_protection_applies_to_admins.py b/prowler/providers/github/services/repository/repository_default_branch_protection_applies_to_admins/repository_default_branch_protection_applies_to_admins.py new file mode 100644 index 0000000000..916ddd35c5 --- /dev/null +++ b/prowler/providers/github/services/repository/repository_default_branch_protection_applies_to_admins/repository_default_branch_protection_applies_to_admins.py @@ -0,0 +1,38 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportGithub +from prowler.providers.github.services.repository.repository_client import ( + repository_client, +) + + +class repository_default_branch_protection_applies_to_admins(Check): + """Check if a repository enforces administrators to be subject to the same branch protection rules as other users + + This class verifies whether each repository enforces administrators to be subject to the same branch protection rules as other users. + """ + + def execute(self) -> List[CheckReportGithub]: + """Execute the Github Repository Enforces Admin Branch Protection check + + Iterates over all repositories and checks if they enforce administrators to be subject to the same branch protection rules as other users. + + Returns: + List[CheckReportGithub]: A list of reports for each repository. + """ + findings = [] + for repo in repository_client.repositories.values(): + if repo.enforce_admins is not None: + report = CheckReportGithub( + metadata=self.metadata(), resource=repo, repository=repo.name + ) + report.status = "FAIL" + report.status_extended = f"Repository {repo.name} does not enforce administrators to be subject to the same branch protection rules as other users." + + if repo.enforce_admins: + report.status = "PASS" + report.status_extended = f"Repository {repo.name} does enforce administrators to be subject to the same branch protection rules as other users." + + findings.append(report) + + return findings diff --git a/prowler/providers/microsoft365/services/sharepoint/sharepoint_guest_sharing_restricted/__init__.py b/prowler/providers/github/services/repository/repository_default_branch_protection_enabled/__init__.py similarity index 100% rename from prowler/providers/microsoft365/services/sharepoint/sharepoint_guest_sharing_restricted/__init__.py rename to prowler/providers/github/services/repository/repository_default_branch_protection_enabled/__init__.py diff --git a/prowler/providers/github/services/repository/repository_default_branch_protection_enabled/repository_default_branch_protection_enabled.metadata.json b/prowler/providers/github/services/repository/repository_default_branch_protection_enabled/repository_default_branch_protection_enabled.metadata.json new file mode 100644 index 0000000000..8ba7caa87a --- /dev/null +++ b/prowler/providers/github/services/repository/repository_default_branch_protection_enabled/repository_default_branch_protection_enabled.metadata.json @@ -0,0 +1,30 @@ +{ + "Provider": "github", + "CheckID": "repository_default_branch_protection_enabled", + "CheckTitle": "Check if branch protection is enforced on the default branch ", + "CheckType": [], + "ServiceName": "repository", + "SubServiceName": "", + "ResourceIdTemplate": "github:user-id:repository/repository-name", + "Severity": "critical", + "ResourceType": "GitHubRepository", + "Description": "Ensure branch protection is enforced on the default branch", + "Risk": "The absence of branch protection on the default branch increases the risk of unauthorized, unreviewed, or untested changes being merged. This can compromise the stability, security, and reliability of the codebase, which is especially critical for production deployments.", + "RelatedUrl": "https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches", + "Remediation": { + "Code": { + "CLI": "", + "NativeIaC": "", + "Other": "", + "Terraform": "" + }, + "Recommendation": { + "Text": "Apply branch protection rules to the default branch to ensure it is safeguarded against unauthorized or improper modifications. This helps maintain code quality, enforces proper review and testing procedures, and reduces the risk of accidental or malicious changes.", + "Url": "https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/managing-a-branch-protection-rule#creating-a-branch-protection-rule" + } + }, + "Categories": [], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/github/services/repository/repository_default_branch_protection_enabled/repository_default_branch_protection_enabled.py b/prowler/providers/github/services/repository/repository_default_branch_protection_enabled/repository_default_branch_protection_enabled.py new file mode 100644 index 0000000000..a6c9be5a37 --- /dev/null +++ b/prowler/providers/github/services/repository/repository_default_branch_protection_enabled/repository_default_branch_protection_enabled.py @@ -0,0 +1,38 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportGithub +from prowler.providers.github.services.repository.repository_client import ( + repository_client, +) + + +class repository_default_branch_protection_enabled(Check): + """Check if a repository enforces default branch protection + + This class verifies whether each repository enforces default branch protection. + """ + + def execute(self) -> List[CheckReportGithub]: + """Execute the Github Repository Enforces Default Branch Protection check + + Iterates over all repositories and checks if they enforce default branch protection. + + Returns: + List[CheckReportGithub]: A list of reports for each repository + """ + findings = [] + for repo in repository_client.repositories.values(): + if repo.default_branch_protection is not None: + report = CheckReportGithub( + metadata=self.metadata(), resource=repo, repository=repo.name + ) + report.status = "FAIL" + report.status_extended = f"Repository {repo.name} does not enforce branch protection on default branch ({repo.default_branch})." + + if repo.default_branch_protection: + report.status = "PASS" + report.status_extended = f"Repository {repo.name} does enforce branch protection on default branch ({repo.default_branch})." + + findings.append(report) + + return findings diff --git a/prowler/providers/microsoft365/services/sharepoint/sharepoint_modern_authentication_required/__init__.py b/prowler/providers/github/services/repository/repository_default_branch_requires_conversation_resolution/__init__.py similarity index 100% rename from prowler/providers/microsoft365/services/sharepoint/sharepoint_modern_authentication_required/__init__.py rename to prowler/providers/github/services/repository/repository_default_branch_requires_conversation_resolution/__init__.py diff --git a/prowler/providers/github/services/repository/repository_default_branch_requires_conversation_resolution/repository_default_branch_requires_conversation_resolution.metadata.json b/prowler/providers/github/services/repository/repository_default_branch_requires_conversation_resolution/repository_default_branch_requires_conversation_resolution.metadata.json new file mode 100644 index 0000000000..e240a6c0d1 --- /dev/null +++ b/prowler/providers/github/services/repository/repository_default_branch_requires_conversation_resolution/repository_default_branch_requires_conversation_resolution.metadata.json @@ -0,0 +1,30 @@ +{ + "Provider": "github", + "CheckID": "repository_default_branch_requires_conversation_resolution", + "CheckTitle": "Check if repository requires conversation resolution before merging", + "CheckType": [], + "ServiceName": "repository", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "medium", + "ResourceType": "GitHubRepository", + "Description": "Ensure that the repository requires conversation resolution before merging.", + "Risk": "Leaving comments unresolved before merging code can lead to overlooked issues, including potential bugs or security vulnerabilities, that might affect the quality and security of the codebase. Unaddressed concerns could result in a lower quality of code, increasing the risk of production failures or breaches.", + "RelatedUrl": "https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches#require-conversation-resolution-before-merging", + "Remediation": { + "Code": { + "CLI": "", + "NativeIaC": "", + "Other": "", + "Terraform": "" + }, + "Recommendation": { + "Text": "Ensure that all comments in a code change proposal are resolved before merging. This guarantees that every reviewerโ€™s concern is addressed, improving code quality and security by preventing issues from being ignored or overlooked.", + "Url": "https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/managing-a-branch-protection-rule" + } + }, + "Categories": [], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/github/services/repository/repository_default_branch_requires_conversation_resolution/repository_default_branch_requires_conversation_resolution.py b/prowler/providers/github/services/repository/repository_default_branch_requires_conversation_resolution/repository_default_branch_requires_conversation_resolution.py new file mode 100644 index 0000000000..1bee931478 --- /dev/null +++ b/prowler/providers/github/services/repository/repository_default_branch_requires_conversation_resolution/repository_default_branch_requires_conversation_resolution.py @@ -0,0 +1,42 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportGithub +from prowler.providers.github.services.repository.repository_client import ( + repository_client, +) + + +class repository_default_branch_requires_conversation_resolution(Check): + """Check if a repository requires conversation resolution + + This class verifies whether each repository requires conversation resolution. + """ + + def execute(self) -> List[CheckReportGithub]: + """Execute the Github Repository Merging Requires Conversation Resolution check + + Iterates over all repositories and checks if they require conversation resolution. + + Returns: + List[CheckReportGithub]: A list of reports for each repository + """ + findings = [] + for repo in repository_client.repositories.values(): + if repo.conversation_resolution is not None: + report = CheckReportGithub( + metadata=self.metadata(), resource=repo, repository=repo.name + ) + report.status = "FAIL" + report.status_extended = ( + f"Repository {repo.name} does not require conversation resolution." + ) + + if repo.conversation_resolution: + report.status = "PASS" + report.status_extended = ( + f"Repository {repo.name} does require conversation resolution." + ) + + findings.append(report) + + return findings diff --git a/prowler/providers/aws/services/efs/efs_multi_az_enabled/__int__.py b/prowler/providers/github/services/repository/repository_default_branch_requires_linear_history/__init__.py similarity index 100% rename from prowler/providers/aws/services/efs/efs_multi_az_enabled/__int__.py rename to prowler/providers/github/services/repository/repository_default_branch_requires_linear_history/__init__.py diff --git a/prowler/providers/github/services/repository/repository_default_branch_requires_linear_history/repository_default_branch_requires_linear_history.metadata.json b/prowler/providers/github/services/repository/repository_default_branch_requires_linear_history/repository_default_branch_requires_linear_history.metadata.json new file mode 100644 index 0000000000..b33d6de467 --- /dev/null +++ b/prowler/providers/github/services/repository/repository_default_branch_requires_linear_history/repository_default_branch_requires_linear_history.metadata.json @@ -0,0 +1,30 @@ +{ + "Provider": "github", + "CheckID": "repository_default_branch_requires_linear_history", + "CheckTitle": "Check if repository default branch requires linear history", + "CheckType": [], + "ServiceName": "repository", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "medium", + "ResourceType": "GithubRepository", + "Description": "Ensure that the repository default branch requires linear history.", + "Risk": "Allowing non-linear history can result in a cluttered and difficult-to-trace Git history, making it harder to identify specific changes, debug issues, and understand the sequence of development. This increases the risk of errors, inconsistencies, and bugs, especially in production environments.", + "RelatedUrl": "https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches#require-linear-history", + "Remediation": { + "Code": { + "CLI": "", + "NativeIaC": "", + "Other": "", + "Terraform": "" + }, + "Recommendation": { + "Text": "Enforce a linear history by requiring rebase or squash merges for pull requests. This will create a clean, chronological commit history, making it easier to track changes, revert modifications, and troubleshoot any issues that arise.", + "Url": "https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/managing-a-branch-protection-rule" + } + }, + "Categories": [], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/github/services/repository/repository_default_branch_requires_linear_history/repository_default_branch_requires_linear_history.py b/prowler/providers/github/services/repository/repository_default_branch_requires_linear_history/repository_default_branch_requires_linear_history.py new file mode 100644 index 0000000000..a06c8b4a3f --- /dev/null +++ b/prowler/providers/github/services/repository/repository_default_branch_requires_linear_history/repository_default_branch_requires_linear_history.py @@ -0,0 +1,38 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportGithub +from prowler.providers.github.services.repository.repository_client import ( + repository_client, +) + + +class repository_default_branch_requires_linear_history(Check): + """Check if a repository requires linear history on default branch + + This class verifies whether each repository requires linear history on the default branch. + """ + + def execute(self) -> List[CheckReportGithub]: + """Execute the Github Repository Merging Requires Linear History check + + Iterates over all repositories and checks if they require linear history on the default branch. + + Returns: + List[CheckReportGithub]: A list of reports for each repository + """ + findings = [] + for repo in repository_client.repositories.values(): + if repo.required_linear_history is not None: + report = CheckReportGithub( + metadata=self.metadata(), resource=repo, repository=repo.name + ) + report.status = "FAIL" + report.status_extended = f"Repository {repo.name} does not require linear history on default branch ({repo.default_branch})." + + if repo.required_linear_history: + report.status = "PASS" + report.status_extended = f"Repository {repo.name} does require linear history on default branch ({repo.default_branch})." + + findings.append(report) + + return findings diff --git a/prowler/providers/github/services/repository/repository_default_branch_requires_multiple_approvals/__init__.py b/prowler/providers/github/services/repository/repository_default_branch_requires_multiple_approvals/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/github/services/repository/repository_default_branch_requires_multiple_approvals/repository_default_branch_requires_multiple_approvals.metadata.json b/prowler/providers/github/services/repository/repository_default_branch_requires_multiple_approvals/repository_default_branch_requires_multiple_approvals.metadata.json new file mode 100644 index 0000000000..4de957cb40 --- /dev/null +++ b/prowler/providers/github/services/repository/repository_default_branch_requires_multiple_approvals/repository_default_branch_requires_multiple_approvals.metadata.json @@ -0,0 +1,30 @@ +{ + "Provider": "github", + "CheckID": "repository_default_branch_requires_multiple_approvals", + "CheckTitle": "Check if repositories require at least 2 code changes approvals", + "CheckType": [], + "ServiceName": "repository", + "SubServiceName": "", + "ResourceIdTemplate": "github:user-id:repository/repository-name", + "Severity": "high", + "ResourceType": "GitHubRepository", + "Description": "Ensure that repositories require at least 2 code changes approvals before merging a pull request.", + "Risk": "If repositories do not require at least 2 code changes approvals before merging a pull request, it is possible that code changes are not being reviewed by multiple people, which could lead to the introduction of bugs or security vulnerabilities.", + "RelatedUrl": "https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/approving-a-pull-request-with-required-reviews", + "Remediation": { + "Code": { + "CLI": "", + "NativeIaC": "", + "Other": "", + "Terraform": "" + }, + "Recommendation": { + "Text": "To require at least 2 code changes approvals before merging a pull request, navigate to the repository settings, click on 'Branches', and then 'Add rule'.", + "Url": "https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches#require-pull-request-reviews-before-merging" + } + }, + "Categories": [], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/github/services/repository/repository_default_branch_requires_multiple_approvals/repository_default_branch_requires_multiple_approvals.py b/prowler/providers/github/services/repository/repository_default_branch_requires_multiple_approvals/repository_default_branch_requires_multiple_approvals.py new file mode 100644 index 0000000000..ac75115010 --- /dev/null +++ b/prowler/providers/github/services/repository/repository_default_branch_requires_multiple_approvals/repository_default_branch_requires_multiple_approvals.py @@ -0,0 +1,38 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportGithub +from prowler.providers.github.services.repository.repository_client import ( + repository_client, +) + + +class repository_default_branch_requires_multiple_approvals(Check): + """Check if a repository enforces at least 2 approvals for code changes + + This class verifies whether each repository enforces at least 2 approvals for code changes. + """ + + def execute(self) -> List[CheckReportGithub]: + """Execute the Github Repository code changes enforce multi approval requirement check + + Iterates over each repository and checks if the repository enforces at least 2 approvals for code changes. + + Returns: + List[CheckReportGithub]: A list of reports for each repository + """ + findings = [] + for repo in repository_client.repositories.values(): + if repo.approval_count is not None: + report = CheckReportGithub( + metadata=self.metadata(), resource=repo, repository=repo.name + ) + report.status = "FAIL" + report.status_extended = f"Repository {repo.name} does not enforce at least 2 approvals for code changes." + + if repo.approval_count >= 2: + report.status = "PASS" + report.status_extended = f"Repository {repo.name} does enforce at least 2 approvals for code changes." + + findings.append(report) + + return findings diff --git a/prowler/providers/github/services/repository/repository_default_branch_status_checks_required/__init__.py b/prowler/providers/github/services/repository/repository_default_branch_status_checks_required/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/github/services/repository/repository_default_branch_status_checks_required/repository_default_branch_status_checks_required.metadata.json b/prowler/providers/github/services/repository/repository_default_branch_status_checks_required/repository_default_branch_status_checks_required.metadata.json new file mode 100644 index 0000000000..e9d846bc2f --- /dev/null +++ b/prowler/providers/github/services/repository/repository_default_branch_status_checks_required/repository_default_branch_status_checks_required.metadata.json @@ -0,0 +1,30 @@ +{ + "Provider": "github", + "CheckID": "repository_default_branch_status_checks_required", + "CheckTitle": "Check if repository enforces status checks to pass", + "CheckType": [], + "ServiceName": "repository", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "high", + "ResourceType": "GithubRepository", + "Description": "Ensure that the repository enforces status checks to pass before merging code into the main branch.", + "Risk": "Merging code without requiring all checks to pass increases the risk of introducing bugs, vulnerabilities, or unstable changes into the codebase. This can compromise the quality, security, and functionality of the application.", + "RelatedUrl": "https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches#require-status-checks-before-merging", + "Remediation": { + "Code": { + "CLI": "", + "NativeIaC": "", + "Other": "", + "Terraform": "" + }, + "Recommendation": { + "Text": "Require all predefined status checks to pass successfully before allowing code changes to be merged. This ensures that all quality, stability, and security conditions are met, reducing the likelihood of errors or vulnerabilities being introduced into the project.", + "Url": "https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/managing-a-branch-protection-rule" + } + }, + "Categories": [], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/github/services/repository/repository_default_branch_status_checks_required/repository_default_branch_status_checks_required.py b/prowler/providers/github/services/repository/repository_default_branch_status_checks_required/repository_default_branch_status_checks_required.py new file mode 100644 index 0000000000..21d6b173da --- /dev/null +++ b/prowler/providers/github/services/repository/repository_default_branch_status_checks_required/repository_default_branch_status_checks_required.py @@ -0,0 +1,42 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportGithub +from prowler.providers.github.services.repository.repository_client import ( + repository_client, +) + + +class repository_default_branch_status_checks_required(Check): + """Check if a repository enforces status checks. + + This class verifies whether each repository enforces status checks. + """ + + def execute(self) -> List[CheckReportGithub]: + """Execute the Github Repository + + Iterates over all repositories and checks if they enforce status checks. + + Returns: + List[CheckReportGithub]: A list of reports for each repository. + """ + findings = [] + for repo in repository_client.repositories.values(): + if repo.status_checks is not None: + report = CheckReportGithub( + self.metadata(), resource=repo, repository=repo.name + ) + report.status = "FAIL" + report.status_extended = ( + f"Repository {repo.name} does not enforce status checks." + ) + + if repo.status_checks: + report.status = "PASS" + report.status_extended = ( + f"Repository {repo.name} does enforce status checks." + ) + + findings.append(report) + + return findings diff --git a/prowler/providers/github/services/repository/repository_public_has_securitymd_file/__init__.py b/prowler/providers/github/services/repository/repository_public_has_securitymd_file/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/github/services/repository/repository_public_has_securitymd_file/repository_public_has_securitymd_file.metadata.json b/prowler/providers/github/services/repository/repository_public_has_securitymd_file/repository_public_has_securitymd_file.metadata.json new file mode 100644 index 0000000000..4b2cdf24f8 --- /dev/null +++ b/prowler/providers/github/services/repository/repository_public_has_securitymd_file/repository_public_has_securitymd_file.metadata.json @@ -0,0 +1,30 @@ +{ + "Provider": "github", + "CheckID": "repository_public_has_securitymd_file", + "CheckTitle": "Check if public repositories have a SECURITY.md file", + "CheckType": [], + "ServiceName": "repository", + "SubServiceName": "", + "ResourceIdTemplate": "github:user-id:repository/repository-name", + "Severity": "low", + "ResourceType": "GitHubRepository", + "Description": "Ensure that public repositories have a SECURITY.md file", + "Risk": "Not having a SECURITY.md file in a public repository may lead to security vulnerabilities being overlooked by users and contributors.", + "RelatedUrl": "https://docs.github.com/en/code-security/getting-started/adding-a-security-policy-to-your-repository", + "Remediation": { + "Code": { + "CLI": "", + "NativeIaC": "", + "Other": "", + "Terraform": "" + }, + "Recommendation": { + "Text": "Add a SECURITY.md file to the root of the repository. The file should contain information on how to report a security vulnerability, the security policy of the repository, and any other relevant information.", + "Url": "https://github.blog/changelog/2019-05-23-security-policy/" + } + }, + "Categories": [], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/github/services/repository/repository_public_has_securitymd_file/repository_public_has_securitymd_file.py b/prowler/providers/github/services/repository/repository_public_has_securitymd_file/repository_public_has_securitymd_file.py new file mode 100644 index 0000000000..c1ec7b51e4 --- /dev/null +++ b/prowler/providers/github/services/repository/repository_public_has_securitymd_file/repository_public_has_securitymd_file.py @@ -0,0 +1,42 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportGithub +from prowler.providers.github.services.repository.repository_client import ( + repository_client, +) + + +class repository_public_has_securitymd_file(Check): + """Check if a public repository has a SECURITY.md file + + This class verifies whether each public repository has a SECURITY.md file. + """ + + def execute(self) -> List[CheckReportGithub]: + """Execute the Github Repository Public Has SECURITY.md File check + + Iterates over all public repositories and checks if they have a SECURITY.md file. + + Returns: + List[CheckReportGithub]: A list of reports for each repository + """ + findings = [] + for repo in repository_client.repositories.values(): + if not repo.private and repo.securitymd is not None: + report = CheckReportGithub( + metadata=self.metadata(), resource=repo, repository=repo.name + ) + report.status = "PASS" + report.status_extended = ( + f"Repository {repo.name} does have a SECURITY.md file." + ) + + if not repo.securitymd: + report.status = "FAIL" + report.status_extended = ( + f"Repository {repo.name} does not have a SECURITY.md file." + ) + + findings.append(report) + + return findings diff --git a/prowler/providers/github/services/repository/repository_service.py b/prowler/providers/github/services/repository/repository_service.py new file mode 100644 index 0000000000..571dda3429 --- /dev/null +++ b/prowler/providers/github/services/repository/repository_service.py @@ -0,0 +1,138 @@ +from typing import Optional + +from pydantic import BaseModel + +from prowler.lib.logger import logger +from prowler.providers.github.lib.service.service import GithubService + + +class Repository(GithubService): + def __init__(self, provider): + super().__init__(__class__.__name__, provider) + self.repositories = self._list_repositories() + + def _list_repositories(self): + logger.info("Repository - Listing Repositories...") + repos = {} + try: + for client in self.clients: + for repo in client.get_user().get_repos(): + default_branch = repo.default_branch + delete_branch_on_merge = ( + repo.delete_branch_on_merge + if repo.delete_branch_on_merge is not None + else False + ) + securitymd_exists = False + try: + securitymd_exists = repo.get_contents("SECURITY.md") is not None + except Exception as error: + if "404" in str(error): + securitymd_exists = False + else: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + securitymd_exists = None + + require_pr = False + approval_cnt = 0 + branch_protection = False + required_linear_history = False + allow_force_pushes = True + branch_deletion = True + status_checks = False + enforce_admins = False + conversation_resolution = False + try: + branch = repo.get_branch(default_branch) + if branch.protected: + protection = branch.get_protection() + if protection: + require_pr = ( + protection.required_pull_request_reviews is not None + ) + approval_cnt = ( + protection.required_pull_request_reviews.required_approving_review_count + if require_pr + else 0 + ) + required_linear_history = ( + protection.required_linear_history + ) + allow_force_pushes = protection.allow_force_pushes + branch_deletion = protection.allow_deletions + status_checks = ( + protection.required_status_checks is not None + ) + enforce_admins = protection.enforce_admins + conversation_resolution = ( + protection.required_conversation_resolution + ) + branch_protection = True + except Exception as error: + # If the branch is not found, it is not protected + if "404" in str(error): + logger.warning( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + # Any other error, we cannot know if the branch is protected or not + else: + require_pr = None + approval_cnt = None + branch_protection = None + required_linear_history = None + allow_force_pushes = None + branch_deletion = None + status_checks = None + enforce_admins = None + conversation_resolution = None + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + + repos[repo.id] = Repo( + id=repo.id, + name=repo.name, + full_name=repo.full_name, + default_branch=repo.default_branch, + private=repo.private, + securitymd=securitymd_exists, + require_pull_request=require_pr, + approval_count=approval_cnt, + required_linear_history=required_linear_history, + allow_force_pushes=allow_force_pushes, + default_branch_deletion=branch_deletion, + status_checks=status_checks, + enforce_admins=enforce_admins, + conversation_resolution=conversation_resolution, + default_branch_protection=branch_protection, + delete_branch_on_merge=delete_branch_on_merge, + ) + + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + return repos + + +class Repo(BaseModel): + """Model for Github Repository""" + + id: int + name: str + full_name: str + default_branch_protection: Optional[bool] + default_branch: str + private: bool + securitymd: Optional[bool] + require_pull_request: Optional[bool] + required_linear_history: Optional[bool] + allow_force_pushes: Optional[bool] + default_branch_deletion: Optional[bool] + status_checks: Optional[bool] + enforce_admins: Optional[bool] + approval_count: Optional[int] + delete_branch_on_merge: Optional[bool] + conversation_resolution: Optional[bool] diff --git a/prowler/providers/kubernetes/kubernetes_provider.py b/prowler/providers/kubernetes/kubernetes_provider.py index 0f11a41fb0..20b019780a 100644 --- a/prowler/providers/kubernetes/kubernetes_provider.py +++ b/prowler/providers/kubernetes/kubernetes_provider.py @@ -2,6 +2,7 @@ import os from typing import Union from colorama import Fore, Style +from kubernetes.client import ApiClient, Configuration from kubernetes.client.exceptions import ApiException from kubernetes.config.config_exception import ConfigException from requests.exceptions import Timeout @@ -70,6 +71,7 @@ class KubernetesProvider(Provider): kubeconfig_file: str = None, context: str = None, namespace: list = None, + cluster_name: str = None, config_path: str = None, config_content: dict = {}, fixer_config: dict = {}, @@ -84,6 +86,7 @@ class KubernetesProvider(Provider): kubeconfig_file (str): Path to the kubeconfig file. kubeconfig_content (str or dict): Content of the kubeconfig file. context (str): Context name. + cluster_name (str): Cluster name. namespace (list): List of namespaces. config_content (dict): Audit configuration. config_path (str): Path to the configuration file. @@ -147,7 +150,9 @@ class KubernetesProvider(Provider): """ logger.info("Instantiating Kubernetes Provider ...") - self._session = self.setup_session(kubeconfig_file, kubeconfig_content, context) + self._session = self.setup_session( + kubeconfig_file, kubeconfig_content, context, cluster_name + ) if not namespace: logger.info("Retrieving all namespaces ...") self._namespaces = self.get_all_namespaces() @@ -227,6 +232,7 @@ class KubernetesProvider(Provider): kubeconfig_file: str = None, kubeconfig_content: Union[dict, str] = None, context: str = None, + cluster_name: str = None, ) -> KubernetesSession: """ Sets up the Kubernetes session. @@ -235,7 +241,7 @@ class KubernetesProvider(Provider): kubeconfig_file (str): Path to the kubeconfig file. kubeconfig_content (str or dict): Content of the kubeconfig file. context (str): Context name. - + cluster_name (str): Cluster name. Returns: Tuple: A tuple containing the API client and the context. @@ -270,16 +276,32 @@ class KubernetesProvider(Provider): # If the kubeconfig file is not found, try to use the in-cluster config logger.info("Using in-cluster config") config.load_incluster_config() + # Use CLI flag or env var to set cluster name + resolved_cluster_name = cluster_name or os.getenv( + "CLUSTER_NAME", "in-cluster" + ) context = { "name": "In-Cluster", "context": { - "cluster": "in-cluster", # Placeholder, as the real cluster name is not available - "user": "service-account-name", # Also a placeholder + "cluster": resolved_cluster_name, + "user": "service-account-name", }, } - return KubernetesSession( - api_client=client.ApiClient(), context=context + # Ensure proxy settings are respected + configuration = Configuration.get_default_copy() + proxy = os.environ.get("HTTPS_PROXY") or os.environ.get( + "https_proxy" ) + if proxy: + configuration.proxy = proxy + # Prevent SSL verification issues with internal proxies + if os.environ.get("K8S_SKIP_TLS_VERIFY", "false").lower() == "true": + configuration.verify_ssl = False + + return KubernetesSession( + api_client=ApiClient(configuration), context=context + ) + if context: contexts = config.list_kube_config_contexts( config_file=kubeconfig_file @@ -293,7 +315,19 @@ class KubernetesProvider(Provider): context = config.list_kube_config_contexts( config_file=kubeconfig_file )[1] - return KubernetesSession(api_client=client.ApiClient(), context=context) + # Ensure proxy settings are respected + configuration = Configuration.get_default_copy() + proxy = os.environ.get("HTTPS_PROXY") or os.environ.get("https_proxy") + if proxy: + configuration.proxy = proxy + + # Prevent SSL verification issues with internal proxies + if os.environ.get("K8S_SKIP_TLS_VERIFY", "false").lower() == "true": + configuration.verify_ssl = False + + return KubernetesSession( + api_client=ApiClient(configuration), context=context + ) except parser.ParserError as parser_error: logger.critical( diff --git a/prowler/providers/kubernetes/lib/arguments/arguments.py b/prowler/providers/kubernetes/lib/arguments/arguments.py index c6aeace363..a3eb4b55b1 100644 --- a/prowler/providers/kubernetes/lib/arguments/arguments.py +++ b/prowler/providers/kubernetes/lib/arguments/arguments.py @@ -27,3 +27,9 @@ def init_parser(self): metavar="NAMESPACES", help="The namespaces where to scan for the Kubernetes resources. By default, Prowler will scan all namespaces available.", ) + k8s_auth_subparser.add_argument( + "--cluster-name", + nargs="?", + metavar="CLUSTER_NAME", + help="Manually specify the cluster name in in-cluster mode, by default it will be 'in-cluster'", + ) diff --git a/prowler/providers/m365/__init__.py b/prowler/providers/m365/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/microsoft365/exceptions/exceptions.py b/prowler/providers/m365/exceptions/exceptions.py similarity index 52% rename from prowler/providers/microsoft365/exceptions/exceptions.py rename to prowler/providers/m365/exceptions/exceptions.py index b1da4f1fbc..7d599386f9 100644 --- a/prowler/providers/microsoft365/exceptions/exceptions.py +++ b/prowler/providers/m365/exceptions/exceptions.py @@ -1,103 +1,123 @@ from prowler.exceptions.exceptions import ProwlerException -# Exceptions codes from 5000 to 5999 are reserved for Microsoft365 exceptions -class Microsoft365BaseException(ProwlerException): - """Base class for Microsoft365 Errors.""" +# Exceptions codes from 5000 to 5999 are reserved for M365 exceptions +class M365BaseException(ProwlerException): + """Base class for M365 Errors.""" MICROSOFT365_ERROR_CODES = { - (6000, "Microsoft365EnvironmentVariableError"): { - "message": "Microsoft365 environment variable error", - "remediation": "Check the Microsoft365 environment variables and ensure they are properly set.", + (6000, "M365EnvironmentVariableError"): { + "message": "Microsoft 365 environment variable error", + "remediation": "Check the Microsoft 365 environment variables and ensure they are properly set.", }, - (6001, "Microsoft365ArgumentTypeValidationError"): { - "message": "Microsoft365 argument type validation error", - "remediation": "Check the provided argument types specific to Microsoft365 and ensure they meet the required format.", + (6001, "M365ArgumentTypeValidationError"): { + "message": "Microsoft 365 argument type validation error", + "remediation": "Check the provided argument types specific to Microsoft 365 and ensure they meet the required format.", }, - (6002, "Microsoft365SetUpRegionConfigError"): { - "message": "Microsoft365 region configuration setup error", - "remediation": "Check the Microsoft365 region configuration and ensure it is properly set up.", + (6002, "M365SetUpRegionConfigError"): { + "message": "Microsoft 365 region configuration setup error", + "remediation": "Check the Microsoft 365 region configuration and ensure it is properly set up.", }, - (6003, "Microsoft365HTTPResponseError"): { - "message": "Error in HTTP response from Microsoft365", + (6003, "M365HTTPResponseError"): { + "message": "Error in HTTP response from Microsoft 365", "remediation": "", }, - (6004, "Microsoft365CredentialsUnavailableError"): { - "message": "Error trying to configure Microsoft365 credentials because they are unavailable", - "remediation": "Check the dictionary and ensure it is properly set up for Microsoft365 credentials. TENANT_ID, CLIENT_ID and CLIENT_SECRET are required.", + (6004, "M365CredentialsUnavailableError"): { + "message": "Error trying to configure Microsoft 365 credentials because they are unavailable", + "remediation": "Check the dictionary and ensure it is properly set up for Microsoft 365 credentials. TENANT_ID, CLIENT_ID and CLIENT_SECRET are required.", }, - (6005, "Microsoft365GetTokenIdentityError"): { - "message": "Error trying to get token from Microsoft365 Identity", - "remediation": "Check the Microsoft365 Identity and ensure it is properly set up.", + (6005, "M365GetTokenIdentityError"): { + "message": "Error trying to get token from Microsoft 365 Identity", + "remediation": "Check the Microsoft 365 Identity and ensure it is properly set up.", }, - (6006, "Microsoft365ClientAuthenticationError"): { + (6006, "M365ClientAuthenticationError"): { "message": "Error in client authentication", "remediation": "Check the client authentication and ensure it is properly set up.", }, - (6007, "Microsoft365NotValidTenantIdError"): { + (6007, "M365NotValidTenantIdError"): { "message": "The provided tenant ID is not valid", "remediation": "Check the tenant ID and ensure it is a valid ID.", }, - (6008, "Microsoft365NotValidClientIdError"): { + (6008, "M365NotValidClientIdError"): { "message": "The provided client ID is not valid", "remediation": "Check the client ID and ensure it is a valid ID.", }, - (6009, "Microsoft365NotValidClientSecretError"): { + (6009, "M365NotValidClientSecretError"): { "message": "The provided client secret is not valid", "remediation": "Check the client secret and ensure it is a valid secret.", }, - (6010, "Microsoft365ConfigCredentialsError"): { - "message": "Error in configuration of Microsoft365 credentials", - "remediation": "Check the configuration of Microsoft365 credentials and ensure it is properly set up.", + (6010, "M365ConfigCredentialsError"): { + "message": "Error in configuration of Microsoft 365 credentials", + "remediation": "Check the configuration of Microsoft 365 credentials and ensure it is properly set up.", }, - (6011, "Microsoft365ClientIdAndClientSecretNotBelongingToTenantIdError"): { + (6011, "M365ClientIdAndClientSecretNotBelongingToTenantIdError"): { "message": "The provided client ID and client secret do not belong to the provided tenant ID", "remediation": "Check the client ID and client secret and ensure they belong to the provided tenant ID.", }, - (6012, "Microsoft365TenantIdAndClientSecretNotBelongingToClientIdError"): { + (6012, "M365TenantIdAndClientSecretNotBelongingToClientIdError"): { "message": "The provided tenant ID and client secret do not belong to the provided client ID", "remediation": "Check the tenant ID and client secret and ensure they belong to the provided client ID.", }, - (6013, "Microsoft365TenantIdAndClientIdNotBelongingToClientSecretError"): { + (6013, "M365TenantIdAndClientIdNotBelongingToClientSecretError"): { "message": "The provided tenant ID and client ID do not belong to the provided client secret", "remediation": "Check the tenant ID and client ID and ensure they belong to the provided client secret.", }, - (6014, "Microsoft365InvalidProviderIdError"): { + (6014, "M365InvalidProviderIdError"): { "message": "The provided provider_id does not match with the available subscriptions", "remediation": "Check the provider_id and ensure it is a valid subscription for the given credentials.", }, - (6015, "Microsoft365NoAuthenticationMethodError"): { - "message": "No Microsoft365 authentication method found", - "remediation": "Check that any authentication method is properly set up for Microsoft365.", + (6015, "M365NoAuthenticationMethodError"): { + "message": "No Microsoft 365 authentication method found", + "remediation": "Check that any authentication method is properly set up for Microsoft 365.", }, - (6016, "Microsoft365SetUpSessionError"): { + (6016, "M365SetUpSessionError"): { "message": "Error setting up session", "remediation": "Check the session setup and ensure it is properly set up.", }, - (6017, "Microsoft365DefaultAzureCredentialError"): { + (6017, "M365DefaultAzureCredentialError"): { "message": "Error with DefaultAzureCredential", "remediation": "Ensure DefaultAzureCredential is correctly configured.", }, - (6018, "Microsoft365InteractiveBrowserCredentialError"): { + (6018, "M365InteractiveBrowserCredentialError"): { "message": "Error with InteractiveBrowserCredential", "remediation": "Ensure InteractiveBrowserCredential is correctly configured.", }, - (6019, "Microsoft365BrowserAuthNoTenantIDError"): { - "message": "Microsoft365 Tenant ID (--tenant-id) is required for browser authentication mode", - "remediation": "Check the Microsoft365 Tenant ID and ensure it is properly set up.", + (6019, "M365BrowserAuthNoTenantIDError"): { + "message": "Microsoft 365 Tenant ID (--tenant-id) is required for browser authentication mode", + "remediation": "Check the Microsoft 365 Tenant ID and ensure it is properly set up.", }, - (6020, "Microsoft365BrowserAuthNoFlagError"): { - "message": "Microsoft365 tenant ID error: browser authentication flag (--browser-auth) not found", + (6020, "M365BrowserAuthNoFlagError"): { + "message": "Microsoft 365 tenant ID error: browser authentication flag (--browser-auth) not found", "remediation": "To use browser authentication, ensure the tenant ID is properly set.", }, - (6021, "Microsoft365NotTenantIdButClientIdAndClienSecretError"): { - "message": "Tenant Id is required for Microsoft365 static credentials. Make sure you are using the correct credentials.", - "remediation": "Check the Microsoft365 Tenant ID and ensure it is properly set up.", + (6021, "M365NotTenantIdButClientIdAndClientSecretError"): { + "message": "Tenant Id is required for Microsoft 365 static credentials. Make sure you are using the correct credentials.", + "remediation": "Check the Microsoft 365 Tenant ID and ensure it is properly set up.", + }, + (6022, "M365MissingEnvironmentCredentialsError"): { + "message": "User and Password environment variables are needed to use Credentials authentication method.", + "remediation": "Ensure your environment variables are properly set up.", + }, + (6023, "M365UserCredentialsError"): { + "message": "The provided User credentials are not valid.", + "remediation": "Check the User credentials and ensure they are valid.", + }, + (6024, "M365NotValidUserError"): { + "message": "The provided User is not valid.", + "remediation": "Check the User and ensure it is a valid user.", + }, + (6025, "M365NotValidEncryptedPasswordError"): { + "message": "The provided Encrypted Password is not valid.", + "remediation": "Check the Encrypted Password and ensure it is a valid password.", + }, + (6026, "M365UserNotBelongingToTenantError"): { + "message": "The provided User does not belong to the specified tenant.", + "remediation": "Check the User email domain and ensure it belongs to the specified tenant.", }, } def __init__(self, code, file=None, original_exception=None, message=None): - provider = "Microsoft365" + provider = "M365" error_info = self.MICROSOFT365_ERROR_CODES.get((code, self.__class__.__name__)) if message: error_info["message"] = message @@ -110,170 +130,197 @@ class Microsoft365BaseException(ProwlerException): ) -class Microsoft365CredentialsError(Microsoft365BaseException): - """Base class for Microsoft365 credentials errors.""" +class M365CredentialsError(M365BaseException): + """Base class for M365 credentials errors.""" def __init__(self, code, file=None, original_exception=None, message=None): super().__init__(code, file, original_exception, message) -class Microsoft365EnvironmentVariableError(Microsoft365CredentialsError): +class M365EnvironmentVariableError(M365CredentialsError): def __init__(self, file=None, original_exception=None, message=None): super().__init__( 6000, file=file, original_exception=original_exception, message=message ) -class Microsoft365ArgumentTypeValidationError(Microsoft365BaseException): +class M365ArgumentTypeValidationError(M365BaseException): def __init__(self, file=None, original_exception=None, message=None): super().__init__( 6001, file=file, original_exception=original_exception, message=message ) -class Microsoft365SetUpRegionConfigError(Microsoft365BaseException): +class M365SetUpRegionConfigError(M365BaseException): def __init__(self, file=None, original_exception=None, message=None): super().__init__( 6002, file=file, original_exception=original_exception, message=message ) -class Microsoft365HTTPResponseError(Microsoft365BaseException): +class M365HTTPResponseError(M365BaseException): def __init__(self, file=None, original_exception=None, message=None): super().__init__( 6003, file=file, original_exception=original_exception, message=message ) -class Microsoft365CredentialsUnavailableError(Microsoft365CredentialsError): +class M365CredentialsUnavailableError(M365CredentialsError): def __init__(self, file=None, original_exception=None, message=None): super().__init__( 6004, file=file, original_exception=original_exception, message=message ) -class Microsoft365GetTokenIdentityError(Microsoft365BaseException): +class M365GetTokenIdentityError(M365BaseException): def __init__(self, file=None, original_exception=None, message=None): super().__init__( 6005, file=file, original_exception=original_exception, message=message ) -class Microsoft365ClientAuthenticationError(Microsoft365CredentialsError): +class M365ClientAuthenticationError(M365CredentialsError): def __init__(self, file=None, original_exception=None, message=None): super().__init__( 6006, file=file, original_exception=original_exception, message=message ) -class Microsoft365NotValidTenantIdError(Microsoft365CredentialsError): +class M365NotValidTenantIdError(M365CredentialsError): def __init__(self, file=None, original_exception=None, message=None): super().__init__( 6007, file=file, original_exception=original_exception, message=message ) -class Microsoft365NotValidClientIdError(Microsoft365CredentialsError): +class M365NotValidClientIdError(M365CredentialsError): def __init__(self, file=None, original_exception=None, message=None): super().__init__( 6008, file=file, original_exception=original_exception, message=message ) -class Microsoft365NotValidClientSecretError(Microsoft365CredentialsError): +class M365NotValidClientSecretError(M365CredentialsError): def __init__(self, file=None, original_exception=None, message=None): super().__init__( 6009, file=file, original_exception=original_exception, message=message ) -class Microsoft365ConfigCredentialsError(Microsoft365CredentialsError): +class M365ConfigCredentialsError(M365CredentialsError): def __init__(self, file=None, original_exception=None, message=None): super().__init__( 6010, file=file, original_exception=original_exception, message=message ) -class Microsoft365ClientIdAndClientSecretNotBelongingToTenantIdError( - Microsoft365CredentialsError -): +class M365ClientIdAndClientSecretNotBelongingToTenantIdError(M365CredentialsError): def __init__(self, file=None, original_exception=None, message=None): super().__init__( 6011, file=file, original_exception=original_exception, message=message ) -class Microsoft365TenantIdAndClientSecretNotBelongingToClientIdError( - Microsoft365CredentialsError -): +class M365TenantIdAndClientSecretNotBelongingToClientIdError(M365CredentialsError): def __init__(self, file=None, original_exception=None, message=None): super().__init__( 6012, file=file, original_exception=original_exception, message=message ) -class Microsoft365TenantIdAndClientIdNotBelongingToClientSecretError( - Microsoft365CredentialsError -): +class M365TenantIdAndClientIdNotBelongingToClientSecretError(M365CredentialsError): def __init__(self, file=None, original_exception=None, message=None): super().__init__( 6013, file=file, original_exception=original_exception, message=message ) -class Microsoft365InvalidProviderIdError(Microsoft365BaseException): +class M365InvalidProviderIdError(M365BaseException): def __init__(self, file=None, original_exception=None, message=None): super().__init__( 6014, file=file, original_exception=original_exception, message=message ) -class Microsoft365NoAuthenticationMethodError(Microsoft365CredentialsError): +class M365NoAuthenticationMethodError(M365CredentialsError): def __init__(self, file=None, original_exception=None, message=None): super().__init__( 6015, file=file, original_exception=original_exception, message=message ) -class Microsoft365SetUpSessionError(Microsoft365CredentialsError): +class M365SetUpSessionError(M365CredentialsError): def __init__(self, file=None, original_exception=None, message=None): super().__init__( 6016, file=file, original_exception=original_exception, message=message ) -class Microsoft365DefaultAzureCredentialError(Microsoft365CredentialsError): +class M365DefaultAzureCredentialError(M365CredentialsError): def __init__(self, file=None, original_exception=None, message=None): super().__init__( 6017, file=file, original_exception=original_exception, message=message ) -class Microsoft365InteractiveBrowserCredentialError(Microsoft365CredentialsError): +class M365InteractiveBrowserCredentialError(M365CredentialsError): def __init__(self, file=None, original_exception=None, message=None): super().__init__( 6018, file=file, original_exception=original_exception, message=message ) -class Microsoft365BrowserAuthNoTenantIDError(Microsoft365CredentialsError): +class M365BrowserAuthNoTenantIDError(M365CredentialsError): def __init__(self, file=None, original_exception=None, message=None): super().__init__( 6019, file=file, original_exception=original_exception, message=message ) -class Microsoft365BrowserAuthNoFlagError(Microsoft365CredentialsError): +class M365BrowserAuthNoFlagError(M365CredentialsError): def __init__(self, file=None, original_exception=None, message=None): super().__init__( 6020, file=file, original_exception=original_exception, message=message ) -class Microsoft365NotTenantIdButClientIdAndClienSecretError( - Microsoft365CredentialsError -): +class M365NotTenantIdButClientIdAndClientSecretError(M365CredentialsError): def __init__(self, file=None, original_exception=None, message=None): super().__init__( 6021, file=file, original_exception=original_exception, message=message ) + + +class M365MissingEnvironmentCredentialsError(M365CredentialsError): + def __init__(self, file=None, original_exception=None, message=None): + super().__init__( + 6022, file=file, original_exception=original_exception, message=message + ) + + +class M365UserCredentialsError(M365CredentialsError): + def __init__(self, file=None, original_exception=None, message=None): + super().__init__( + 6023, file=file, original_exception=original_exception, message=message + ) + + +class M365NotValidUserError(M365CredentialsError): + def __init__(self, file=None, original_exception=None, message=None): + super().__init__( + 6024, file=file, original_exception=original_exception, message=message + ) + + +class M365NotValidEncryptedPasswordError(M365CredentialsError): + def __init__(self, file=None, original_exception=None, message=None): + super().__init__( + 6025, file=file, original_exception=original_exception, message=message + ) + + +class M365UserNotBelongingToTenantError(M365CredentialsError): + def __init__(self, file=None, original_exception=None, message=None): + super().__init__( + 6026, file=file, original_exception=original_exception, message=message + ) diff --git a/prowler/providers/m365/lib/__init__.py b/prowler/providers/m365/lib/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/lib/arguments/__init__.py b/prowler/providers/m365/lib/arguments/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/lib/arguments/arguments.py b/prowler/providers/m365/lib/arguments/arguments.py new file mode 100644 index 0000000000..e88ef7982b --- /dev/null +++ b/prowler/providers/m365/lib/arguments/arguments.py @@ -0,0 +1,54 @@ +def init_parser(self): + """Init the M365 Provider CLI parser""" + m365_parser = self.subparsers.add_parser( + "m365", + parents=[self.common_providers_parser], + help="M365 Provider", + ) + # Authentication Modes + m365_auth_subparser = m365_parser.add_argument_group("Authentication Modes") + m365_auth_modes_group = m365_auth_subparser.add_mutually_exclusive_group() + m365_auth_modes_group.add_argument( + "--az-cli-auth", + action="store_true", + help="Use Azure CLI authentication to log in against Microsoft 365", + ) + m365_auth_modes_group.add_argument( + "--env-auth", + action="store_true", + help="Use User and Password environment variables authentication to log in against Microsoft 365", + ) + m365_auth_modes_group.add_argument( + "--sp-env-auth", + action="store_true", + help="Use Azure Service Principal environment variables authentication to log in against Microsoft 365", + ) + m365_auth_modes_group.add_argument( + "--browser-auth", + action="store_true", + help="Use Azure interactive browser authentication to log in against Microsoft 365", + ) + m365_parser.add_argument( + "--tenant-id", + nargs="?", + default=None, + help="Microsoft 365 Tenant ID to be used with --browser-auth option", + ) + m365_parser.add_argument( + "--init-modules", + action="store_true", + help="Initialize Microsoft 365 PowerShell modules", + ) + # Regions + m365_regions_subparser = m365_parser.add_argument_group("Regions") + m365_regions_subparser.add_argument( + "--region", + nargs="?", + default="M365Global", + choices=[ + "M365Global", + "M365GlobalChina", + "M365USGovernment", + ], + help="Microsoft 365 region to be used, default is M365Global", + ) diff --git a/prowler/providers/m365/lib/mutelist/__init__.py b/prowler/providers/m365/lib/mutelist/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/microsoft365/lib/mutelist/mutelist.py b/prowler/providers/m365/lib/mutelist/mutelist.py similarity index 74% rename from prowler/providers/microsoft365/lib/mutelist/mutelist.py rename to prowler/providers/m365/lib/mutelist/mutelist.py index 21669d9d04..a7bf971f3e 100644 --- a/prowler/providers/microsoft365/lib/mutelist/mutelist.py +++ b/prowler/providers/m365/lib/mutelist/mutelist.py @@ -1,12 +1,12 @@ -from prowler.lib.check.models import CheckReportMicrosoft365 +from prowler.lib.check.models import CheckReportM365 from prowler.lib.mutelist.mutelist import Mutelist from prowler.lib.outputs.utils import unroll_dict, unroll_tags -class Microsoft365Mutelist(Mutelist): +class M365Mutelist(Mutelist): def is_finding_muted( self, - finding: CheckReportMicrosoft365, + finding: CheckReportM365, ) -> bool: return self.is_muted( finding.tenant_id, diff --git a/prowler/providers/m365/lib/powershell/m365_powershell.py b/prowler/providers/m365/lib/powershell/m365_powershell.py new file mode 100644 index 0000000000..a91e25d52d --- /dev/null +++ b/prowler/providers/m365/lib/powershell/m365_powershell.py @@ -0,0 +1,766 @@ +import os + +import msal + +from prowler.lib.logger import logger +from prowler.lib.powershell.powershell import PowerShellSession +from prowler.providers.m365.exceptions.exceptions import ( + M365UserNotBelongingToTenantError, +) +from prowler.providers.m365.models import M365Credentials, M365IdentityInfo + + +class M365PowerShell(PowerShellSession): + """ + Microsoft 365 specific PowerShell session management implementation. + + This class extends the base PowerShellSession to provide Microsoft 365 specific + functionality, including authentication, Teams management, and Exchange Online + operations. + + Features: + - Microsoft 365 credential management + - Teams client configuration + - Exchange Online connectivity + - Audit log configuration + - Secure credential handling + + Attributes: + credentials (M365Credentials): The Microsoft 365 credentials used for authentication. + required_modules (list): List of required PowerShell modules for M365 operations. + + Note: + This class requires the Microsoft Teams and Exchange Online PowerShell modules + to be installed and available in the PowerShell environment. + """ + + def __init__(self, credentials: M365Credentials, identity: M365IdentityInfo): + """ + Initialize a Microsoft 365 PowerShell session. + + Sets up the PowerShell session and initializes the provided credentials + for Microsoft 365 authentication. + + Args: + credentials (M365Credentials): The Microsoft 365 credentials to use + for authentication. + """ + super().__init__() + self.tenant_identity = identity + self.init_credential(credentials) + + def init_credential(self, credentials: M365Credentials) -> None: + """ + Initialize PowerShell credential object for Microsoft 365 authentication. + + Sanitizes the username and password, then creates a PSCredential object + in the PowerShell session for use with Microsoft 365 cmdlets. + + Args: + credentials (M365Credentials): The credentials object containing + username and password. + + Note: + The credentials are sanitized to prevent command injection and + stored securely in the PowerShell session. + """ + # Sanitize user and password + user = self.sanitize(credentials.user) + passwd = self.sanitize(credentials.passwd) + + # Securely convert encrypted password to SecureString + self.execute(f'$user = "{user}"') + self.execute(f'$secureString = "{passwd}" | ConvertTo-SecureString') + self.execute( + "$credential = New-Object System.Management.Automation.PSCredential ($user, $secureString)" + ) + + def test_credentials(self, credentials: M365Credentials) -> bool: + """ + Test Microsoft 365 credentials by attempting to authenticate against Entra ID. + + Args: + credentials (M365Credentials): The credentials object containing + username and password to test. + + Returns: + bool: True if credentials are valid and authentication succeeds, False otherwise. + """ + self.execute( + f'$securePassword = "{self.sanitize(credentials.passwd)}" | ConvertTo-SecureString' + ) + self.execute( + f'$credential = New-Object System.Management.Automation.PSCredential("{self.sanitize(credentials.user)}", $securePassword)' + ) + decrypted_password = self.execute( + 'Write-Output "$($credential.GetNetworkCredential().Password)"' + ) + + # Validate user belongs to tenant + user_domain = credentials.user.split("@")[1] + if not any( + user_domain.endswith(domain) + for domain in self.tenant_identity.tenant_domains + ): + raise M365UserNotBelongingToTenantError( + file=os.path.basename(__file__), + message=f"The user domain {user_domain} does not match any of the tenant domains: {', '.join(self.tenant_identity.tenant_domains)}", + ) + + app = msal.ConfidentialClientApplication( + client_id=credentials.client_id, + client_credential=credentials.client_secret, + authority=f"https://login.microsoftonline.com/{credentials.tenant_id}", + ) + + # Validate credentials + result = app.acquire_token_by_username_password( + username=credentials.user, + password=decrypted_password, # Needs to be in plain text + scopes=["https://graph.microsoft.com/.default"], + ) + + if result is None: + return False + + if "access_token" not in result: + return False + + return True + + def connect_microsoft_teams(self) -> dict: + """ + Connect to Microsoft Teams Module PowerShell Module. + + Establishes a connection to Microsoft Teams using the initialized credentials. + + Returns: + dict: Connection status information in JSON format. + + Note: + This method requires the Microsoft Teams PowerShell module to be installed. + """ + return self.execute("Connect-MicrosoftTeams -Credential $credential") + + def get_teams_settings(self) -> dict: + """ + Get Teams Client Settings. + + Retrieves the current Microsoft Teams client configuration settings. + + Returns: + dict: Teams client configuration settings in JSON format. + + Example: + >>> get_teams_settings() + { + "AllowBox": true, + "AllowDropBox": true, + "AllowGoogleDrive": true + } + """ + return self.execute( + "Get-CsTeamsClientConfiguration | ConvertTo-Json", json_parse=True + ) + + def get_global_meeting_policy(self) -> dict: + """ + Get Teams Global Meeting Policy. + + Retrieves the current Microsoft Teams global meeting policy settings. + + Returns: + dict: Teams global meeting policy settings in JSON format. + + Example: + >>> get_global_meeting_policy() + { + "AllowAnonymousUsersToJoinMeeting": true + } + """ + return self.execute( + "Get-CsTeamsMeetingPolicy -Identity Global | ConvertTo-Json", + json_parse=True, + ) + + def get_global_messaging_policy(self) -> dict: + """ + Get Teams Global Messaging Policy. + + Retrieves the current Microsoft Teams global messaging policy settings. + + Returns: + dict: Teams global messaging policy settings in JSON format. + + Example: + >>> get_global_meeting_policy() + { + "AllowAnonymousUsersToJoinMeeting": true + } + """ + return self.execute( + "Get-CsTeamsMessagingPolicy -Identity Global | ConvertTo-Json", + json_parse=True, + ) + + def get_user_settings(self) -> dict: + """ + Get Teams User Settings. + + Retrieves the current Microsoft Teams user settings. + + Returns: + dict: Teams user settings in JSON format. + + Example: + >>> get_user_settings() + { + "AllowExternalAccess": true + } + """ + return self.execute( + "Get-CsTenantFederationConfiguration | ConvertTo-Json", json_parse=True + ) + + def connect_exchange_online(self) -> dict: + """ + Connect to Exchange Online PowerShell Module. + + Establishes a connection to Exchange Online using the initialized credentials. + + Returns: + dict: Connection status information in JSON format. + + Note: + This method requires the Exchange Online PowerShell module to be installed. + """ + return self.execute("Connect-ExchangeOnline -Credential $credential") + + def get_audit_log_config(self) -> dict: + """ + Get Purview Admin Audit Log Settings. + + Retrieves the current audit log configuration settings for Microsoft Purview. + + Returns: + dict: Audit log configuration settings in JSON format. + + Example: + >>> get_audit_log_config() + { + "UnifiedAuditLogIngestionEnabled": true + } + """ + return self.execute( + "Get-AdminAuditLogConfig | Select-Object UnifiedAuditLogIngestionEnabled | ConvertTo-Json", + json_parse=True, + ) + + def get_malware_filter_policy(self) -> dict: + """ + Get Defender Malware Filter Policy. + + Retrieves the current Defender anti-malware filter policy settings. + + Returns: + dict: Malware filter policy settings in JSON format. + + Example: + >>> get_malware_filter_policy() + { + "EnableFileFilter": true, + "Identity": "Default" + } + """ + return self.execute("Get-MalwareFilterPolicy | ConvertTo-Json", json_parse=True) + + def get_malware_filter_rule(self) -> dict: + """ + Get Defender Malware Filter Rule. + + Retrieves the current Defender anti-malware filter rule settings. + + Returns: + dict: Malware filter rule settings in JSON format. + + Example: + >>> get_malware_filter_rule() + { + "Name": "Default", + "State": "Enabled" + } + """ + return self.execute("Get-MalwareFilterRule | ConvertTo-Json", json_parse=True) + + def get_outbound_spam_filter_policy(self) -> dict: + """ + Get Defender Outbound Spam Filter Policy. + + Retrieves the current Defender outbound spam filter policy settings. + + Returns: + dict: Outbound spam filter policy settings in JSON format. + + Example: + >>> get_outbound_spam_filter_policy() + { + "NotifyOutboundSpam": true, + "BccSuspiciousOutboundMail": true, + "BccSuspiciousOutboundAdditionalRecipients": [], + "NotifyOutboundSpamRecipients": [] + } + """ + return self.execute( + "Get-HostedOutboundSpamFilterPolicy | ConvertTo-Json", json_parse=True + ) + + def get_outbound_spam_filter_rule(self) -> dict: + """ + Get Defender Outbound Spam Filter Rule. + + Retrieves the current Defender outbound spam filter rule settings. + + Returns: + dict: Outbound spam filter rule settings in JSON format. + + Example: + >>> get_outbound_spam_filter_rule() + { + "State": "Enabled" + } + """ + return self.execute( + "Get-HostedOutboundSpamFilterRule | ConvertTo-Json", json_parse=True + ) + + def get_antiphishing_policy(self) -> dict: + """ + Get Defender Antiphishing Policy. + + Retrieves the current Defender anti-phishing policy settings. + + Returns: + dict: Antiphishing policy settings in JSON format. + + Example: + >>> get_antiphishing_policy() + { + "EnableSpoofIntelligence": true, + "AuthenticationFailAction": "Quarantine", + "DmarcRejectAction": "Quarantine", + "DmarcQuarantineAction": "Quarantine", + "EnableFirstContactSafetyTips": true, + "EnableUnauthenticatedSender": true, + "EnableViaTag": true, + "HonorDmarcPolicy": true, + "IsDefault": false + } + """ + return self.execute("Get-AntiPhishPolicy | ConvertTo-Json", json_parse=True) + + def get_antiphishing_rules(self) -> dict: + """ + Get Defender Antiphishing Rules. + + Retrieves the current Defender anti-phishing rules. + + Returns: + dict: Antiphishing rules in JSON format. + + Example: + >>> get_antiphishing_rules() + { + "Name": "Rule1", + "State": Enabled, + } + """ + return self.execute("Get-AntiPhishRule | ConvertTo-Json", json_parse=True) + + def get_organization_config(self) -> dict: + """ + Get Exchange Online Organization Configuration. + + Retrieves the current Exchange Online organization configuration settings. + + Returns: + dict: Organization configuration settings in JSON format. + + Example: + >>> get_organization_config() + { + "Name": "MyOrganization", + "Guid": "12345678-1234-1234-1234-123456789012" + "AuditDisabled": false + } + """ + return self.execute("Get-OrganizationConfig | ConvertTo-Json", json_parse=True) + + def get_mailbox_audit_config(self) -> dict: + """ + Get Exchange Online Mailbox Audit Configuration. + + Retrieves the current mailbox audit configuration settings for Exchange Online. + + Returns: + dict: Mailbox audit configuration settings in JSON format. + + Example: + >>> get_mailbox_audit_config() + { + "Name": "MyMailbox", + "Id": "12345678-1234-1234-1234-123456789012", + "AuditBypassEnabled": false + } + """ + return self.execute( + "Get-MailboxAuditBypassAssociation | ConvertTo-Json", json_parse=True + ) + + def get_mailbox_policy(self) -> dict: + """ + Get Mailbox Policy. + + Retrieves the current mailbox policy settings for Exchange Online. + + Returns: + dict: Mailbox policy settings in JSON format. + + Example: + >>> get_mailbox_policy() + { + "Id": "OwaMailboxPolicy-Default", + "AdditionalStorageProvidersAvailable": True + } + """ + return self.execute("Get-OwaMailboxPolicy | ConvertTo-Json", json_parse=True) + + def get_external_mail_config(self) -> dict: + """ + Get Exchange Online External Mail Configuration. + + Retrieves the current external mail configuration settings for Exchange Online. + + Returns: + dict: External mail configuration settings in JSON format. + + Example: + >>> get_external_mail_config() + { + "Identity": "MyExternalMail", + "ExternalMailTagEnabled": true + } + """ + return self.execute("Get-ExternalInOutlook | ConvertTo-Json", json_parse=True) + + def get_transport_rules(self) -> dict: + """ + Get Exchange Online Transport Rules. + + Retrieves the current transport rules configured in Exchange Online. + + Returns: + dict: Transport rules in JSON format. + + Example: + >>> get_transport_rules() + { + "Name": "Rule1", + "SetSCL": -1, + "SenderDomainIs": ["example.com"] + } + """ + return self.execute("Get-TransportRule | ConvertTo-Json", json_parse=True) + + def get_connection_filter_policy(self) -> dict: + """ + Get Exchange Online Connection Filter Policy. + + Retrieves the current connection filter policy settings for Exchange Online. + + Returns: + dict: Connection filter policy settings in JSON format. + + Example: + >>> get_connection_filter_policy() + { + "Identity": "Default", + "IPAllowList": []" + } + """ + return self.execute( + "Get-HostedConnectionFilterPolicy -Identity Default | ConvertTo-Json", + json_parse=True, + ) + + def get_dkim_config(self) -> dict: + """ + Get DKIM Signing Configuration. + + Retrieves the current DKIM signing configuration settings for Exchange Online. + + Returns: + dict: DKIM signing configuration settings in JSON format. + + Example: + >>> get_dkim_config() + { + "Id": "12345678-1234-1234-1234-123456789012", + "Enabled": true + } + """ + return self.execute("Get-DkimSigningConfig | ConvertTo-Json", json_parse=True) + + def get_inbound_spam_filter_policy(self) -> dict: + """ + Get Inbound Spam Filter Policy. + + Retrieves the current inbound spam filter policy settings for Exchange Online. + + Returns: + dict: Inbound spam filter policy settings in JSON format. + + Example: + >>> get_inbound_spam_filter_policy() + { + "Identity": "Default", + "AllowedSenderDomains": "[]" + } + """ + return self.execute( + "Get-HostedContentFilterPolicy | ConvertTo-Json", json_parse=True + ) + + def get_inbound_spam_filter_rule(self) -> dict: + """ + Get Inbound Spam Filter Rule. + + Retrieves the current inbound spam filter rule settings for Exchange Online. + + Returns: + dict: Inbound spam filter rule settings in JSON format. + + Example: + >>> get_inbound_spam_filter_rule() + { + "Name": "Rule1", + "State": "Enabled" + } + """ + return self.execute( + "Get-HostedContentFilterRule | ConvertTo-Json", json_parse=True + ) + + def get_report_submission_policy(self) -> dict: + """ + Get Exchange Online Report Submission Policy. + + Retrieves the current Exchange Online report submission policy settings. + + Returns: + dict: Report submission policy settings in JSON format. + + Example: + >>> get_report_submission_policy() + { + "Id": "DefaultReportSubmissionPolicy", + "Identity": "DefaultReportSubmissionPolicy", + "Name": "DefaultReportSubmissionPolicy", + "ReportChatMessageEnabled": true, + "ReportChatMessageToCustomizedAddressEnabled": true, + "ReportJunkAddresses": [], + "ReportJunkToCustomizedAddress": true, + "ReportNotJunkAddresses": [], + "ReportNotJunkToCustomizedAddress": true, + "ReportPhishAddresses": [], + "ReportPhishToCustomizedAddress": true, + "ThirdPartyReportAddresses": [], + ... + } + """ + return self.execute( + "Get-ReportSubmissionPolicy | ConvertTo-Json", json_parse=True + ) + + def get_role_assignment_policies(self) -> dict: + """ + Get Role Assignment Policies. + + Retrieves the current role assignment policies for Exchange Online. + + Returns: + dict: Role assignment policies in JSON format. + + Example: + >>> get_role_assignment_policies() + { + "Name": "Default Role Assignment Policy", + "Guid": "12345678-1234-1234-1234-123456789012", + "AssignedRoles": ["MyRole"] + } + """ + return self.execute( + "Get-RoleAssignmentPolicy | ConvertTo-Json", json_parse=True + ) + + def get_mailbox_audit_properties(self) -> dict: + """ + Get Mailbox Properties. + + Retrieves the properties of all mailboxes in the organization in Exchange Online. + + Args: + mailbox (str): The email address or identifier of the mailbox. + + Returns: + dict: Mailbox properties in JSON format. + + Example: + >>> get_mailbox_properties() + { + "UserPrincipalName": "User1", + "AuditEnabled": "false" + "AuditAdmin": [ + "Update", + "MoveToDeletedItems", + "SoftDelete", + "HardDelete", + "SendAs", + "SendOnBehalf", + "Create", + "UpdateFolderPermissions", + "UpdateInboxRules", + "UpdateCalendarDelegation", + "ApplyRecord", + "MailItemsAccessed", + "Send" + ], + "AuditDelegate": [ + "Update", + "MoveToDeletedItems", + "SoftDelete", + "HardDelete", + "SendAs", + "SendOnBehalf", + "Create", + "UpdateFolderPermissions", + "UpdateInboxRules", + "ApplyRecord", + "MailItemsAccessed" + ], + "AuditOwner": [ + "Update", + "MoveToDeletedItems", + "SoftDelete", + "HardDelete", + "UpdateFolderPermissions", + "UpdateInboxRules", + "UpdateCalendarDelegation", + "ApplyRecord", + "MailItemsAccessed", + "Send" + ], + "AuditLogAgeLimit": "90", + "Identity": "User1", + } + """ + return self.execute( + "Get-EXOMailbox -PropertySets Audit -ResultSize Unlimited | ConvertTo-Json", + json_parse=True, + ) + + def get_transport_config(self) -> dict: + """ + Get Exchange Online Transport Configuration. + + Retrieves the current transport configuration settings for Exchange Online. + + Returns: + dict: Transport configuration settings in JSON format. + + Example: + >>> get_transport_config() + { + "SmtpClientAuthenticationDisabled": True, + } + """ + return self.execute("Get-TransportConfig | ConvertTo-Json", json_parse=True) + + def get_sharing_policy(self) -> dict: + """ + Get Exchange Online Sharing Policy. + + Retrieves the current sharing policy settings for Exchange Online. + + Returns: + dict: Sharing policy settings in JSON format. + + Example: + >>> get_sharing_policy() + { + "Identity": "Default", + "Enabled": true + } + """ + return self.execute("Get-SharingPolicy | ConvertTo-Json", json_parse=True) + + +# This function is used to install the required M365 PowerShell modules in Docker containers +def initialize_m365_powershell_modules(): + """ + Initialize required PowerShell modules. + + Checks if the required PowerShell modules are installed and installs them if necessary. + This method ensures that all required modules for M365 operations are available. + + Returns: + bool: True if all modules were successfully initialized, False otherwise + """ + + REQUIRED_MODULES = [ + "ExchangeOnlineManagement", + "MicrosoftTeams", + ] + + pwsh = PowerShellSession() + try: + for module in REQUIRED_MODULES: + try: + # Check if module is already installed + result = pwsh.execute( + f"Get-Module -ListAvailable -Name {module}", timeout=5 + ) + + # Install module if not installed + if not result: + install_result = pwsh.execute( + f'Install-Module -Name "{module}" -Force -AllowClobber -Scope CurrentUser', + timeout=30, + ) + if install_result: + logger.warning( + f"Unexpected output while installing module {module}: {install_result}" + ) + else: + logger.info(f"Successfully installed module {module}") + + # Import module + pwsh.execute(f'Import-Module -Name "{module}" -Force', timeout=1) + + except Exception as error: + logger.error(f"Failed to initialize module {module}: {str(error)}") + return False + + return True + finally: + pwsh.close() + + +def main(): + if initialize_m365_powershell_modules(): + logger.info("M365 PowerShell modules initialized successfully") + else: + logger.error("Failed to initialize M365 PowerShell modules") + + +if __name__ == "__main__": + main() diff --git a/prowler/providers/m365/lib/regions/__init__.py b/prowler/providers/m365/lib/regions/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/microsoft365/lib/regions/regions.py b/prowler/providers/m365/lib/regions/regions.py similarity index 90% rename from prowler/providers/microsoft365/lib/regions/regions.py rename to prowler/providers/m365/lib/regions/regions.py index b9e6d1969a..1f3fd8cfbf 100644 --- a/prowler/providers/microsoft365/lib/regions/regions.py +++ b/prowler/providers/m365/lib/regions/regions.py @@ -8,17 +8,17 @@ MICROSOFT365_GENERIC_CLOUD = "https://graph.microsoft.com" def get_regions_config(region): allowed_regions = { - "Microsoft365Global": { + "M365Global": { "authority": None, "base_url": MICROSOFT365_GENERIC_CLOUD, "credential_scopes": [MICROSOFT365_GENERIC_CLOUD + "/.default"], }, - "Microsoft365China": { + "M365China": { "authority": AzureAuthorityHosts.AZURE_CHINA, "base_url": MICROSOFT365_CHINA_CLOUD, "credential_scopes": [MICROSOFT365_CHINA_CLOUD + "/.default"], }, - "Microsoft365USGovernment": { + "M365USGovernment": { "authority": AzureAuthorityHosts.AZURE_GOVERNMENT, "base_url": MICROSOFT365_US_GOV_CLOUD, "credential_scopes": [MICROSOFT365_US_GOV_CLOUD + "/.default"], diff --git a/prowler/providers/m365/lib/service/__init__.py b/prowler/providers/m365/lib/service/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/lib/service/service.py b/prowler/providers/m365/lib/service/service.py new file mode 100644 index 0000000000..8806c99728 --- /dev/null +++ b/prowler/providers/m365/lib/service/service.py @@ -0,0 +1,21 @@ +from msgraph import GraphServiceClient + +from prowler.providers.m365.lib.powershell.m365_powershell import M365PowerShell +from prowler.providers.m365.m365_provider import M365Provider + + +class M365Service: + def __init__( + self, + provider: M365Provider, + ): + self.client = GraphServiceClient(credentials=provider.session) + self.audit_config = provider.audit_config + self.fixer_config = provider.fixer_config + + # Initialize PowerShell client only if credentials are available + self.powershell = ( + M365PowerShell(provider.credentials, provider.identity) + if provider.credentials and provider.identity + else None + ) diff --git a/prowler/providers/m365/m365_provider.py b/prowler/providers/m365/m365_provider.py new file mode 100644 index 0000000000..a4135b0692 --- /dev/null +++ b/prowler/providers/m365/m365_provider.py @@ -0,0 +1,1134 @@ +import asyncio +import os +from argparse import ArgumentTypeError +from os import getenv +from uuid import UUID + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError +from azure.identity import ( + ClientSecretCredential, + CredentialUnavailableError, + DefaultAzureCredential, + InteractiveBrowserCredential, +) +from colorama import Fore, Style +from msal import ConfidentialClientApplication +from msgraph import GraphServiceClient + +from prowler.config.config import ( + default_config_file_path, + get_default_mute_file_path, + load_and_validate_config_file, +) +from prowler.lib.logger import logger +from prowler.lib.utils.utils import print_boxes +from prowler.providers.common.models import Audit_Metadata, Connection +from prowler.providers.common.provider import Provider +from prowler.providers.m365.exceptions.exceptions import ( + M365ArgumentTypeValidationError, + M365BrowserAuthNoFlagError, + M365BrowserAuthNoTenantIDError, + M365ClientAuthenticationError, + M365ClientIdAndClientSecretNotBelongingToTenantIdError, + M365ConfigCredentialsError, + M365CredentialsUnavailableError, + M365DefaultAzureCredentialError, + M365EnvironmentVariableError, + M365GetTokenIdentityError, + M365HTTPResponseError, + M365InteractiveBrowserCredentialError, + M365InvalidProviderIdError, + M365MissingEnvironmentCredentialsError, + M365NoAuthenticationMethodError, + M365NotTenantIdButClientIdAndClientSecretError, + M365NotValidClientIdError, + M365NotValidClientSecretError, + M365NotValidEncryptedPasswordError, + M365NotValidTenantIdError, + M365NotValidUserError, + M365SetUpRegionConfigError, + M365SetUpSessionError, + M365TenantIdAndClientIdNotBelongingToClientSecretError, + M365TenantIdAndClientSecretNotBelongingToClientIdError, + M365UserCredentialsError, +) +from prowler.providers.m365.lib.mutelist.mutelist import M365Mutelist +from prowler.providers.m365.lib.powershell.m365_powershell import ( + M365PowerShell, + initialize_m365_powershell_modules, +) +from prowler.providers.m365.lib.regions.regions import get_regions_config +from prowler.providers.m365.models import ( + M365Credentials, + M365IdentityInfo, + M365RegionConfig, +) + + +class M365Provider(Provider): + """ + Represents an M365 provider. + + This class provides functionality to interact with the M365 resources. + It handles authentication, region configuration, and provides access to various properties and methods + related to the M365 provider. + + Attributes: + _type (str): The type of the provider, which is set to "m365". + _session (DefaultM365Credential): The session object associated with the M365 provider. + _identity (M365IdentityInfo): The identity information for the M365 provider. + _audit_config (dict): The audit configuration for the M365 provider. + _region_config (M365RegionConfig): The region configuration for the M365 provider. + _mutelist (M365Mutelist): The mutelist object associated with the M365 provider. + audit_metadata (Audit_Metadata): The audit metadata for the M365 provider. + + Methods: + __init__ -> Initializes the M365 provider. + identity(self): Returns the identity of the M365 provider. + type(self): Returns the type of the M365 provider. + session(self): Returns the session object associated with the M365 provider. + region_config(self): Returns the region configuration for the M365 provider. + audit_config(self): Returns the audit configuration for the M365 provider. + fixer_config(self): Returns the fixer configuration. + output_options(self, options: tuple): Sets the output options for the M365 provider. + mutelist(self) -> M365Mutelist: Returns the mutelist object associated with the M365 provider. + setup_region_config(cls, region): Sets up the region configuration for the M365 provider. + print_credentials(self): Prints the M365 credentials information. + setup_session(cls, az_cli_auth, app_env_auth, browser_auth, managed_identity_auth, tenant_id, region_config): Set up the M365 session with the specified authentication method. + """ + + _type: str = "m365" + _session: DefaultAzureCredential # Must be used besides being named for Azure + _identity: M365IdentityInfo + _audit_config: dict + _region_config: M365RegionConfig + _mutelist: M365Mutelist + _credentials: M365Credentials = {} + # TODO: this is not optional, enforce for all providers + audit_metadata: Audit_Metadata + + def __init__( + self, + sp_env_auth: bool = False, + env_auth: bool = False, + az_cli_auth: bool = False, + browser_auth: bool = False, + tenant_id: str = None, + client_id: str = None, + client_secret: str = None, + user: str = None, + encrypted_password: str = None, + init_modules: bool = False, + region: str = "M365Global", + config_content: dict = None, + config_path: str = None, + mutelist_path: str = None, + mutelist_content: dict = None, + fixer_config: dict = {}, + ): + """ + Initializes the M365 provider. + + Args: + tenant_id (str): The M365 Active Directory tenant ID. + region (str): The M365 region. + client_id (str): The M365 client ID. + client_secret (str): The M365 client secret. + config_path (str): The path to the configuration file. + config_content (dict): The configuration content. + fixer_config (dict): The fixer configuration. + mutelist_path (str): The path to the mutelist file. + mutelist_content (dict): The mutelist content. + + Returns: + None + + Raises: + M365ArgumentTypeValidationError: If there is an error in the argument type validation. + M365SetUpRegionConfigError: If there is an error in setting up the region configuration. + M365ConfigCredentialsError: If there is an error in configuring the M365 credentials from a dictionary. + M365GetTokenIdentityError: If there is an error in getting the token from the M365 identity. + M365HTTPResponseError: If there is an HTTP response error. + """ + logger.info("Setting M365 provider ...") + + logger.info("Checking if any credentials mode is set ...") + + # Validate the authentication arguments + self.validate_arguments( + az_cli_auth, + sp_env_auth, + env_auth, + browser_auth, + tenant_id, + client_id, + client_secret, + user, + encrypted_password, + ) + + logger.info("Checking if region is different than default one") + self._region_config = self.setup_region_config(region) + + # Get the dict from the static credentials + m365_credentials = None + if tenant_id and client_id and client_secret and user and encrypted_password: + m365_credentials = self.validate_static_credentials( + tenant_id=tenant_id, + client_id=client_id, + client_secret=client_secret, + user=user, + encrypted_password=encrypted_password, + ) + + # Set up the M365 session + self._session = self.setup_session( + az_cli_auth, + sp_env_auth, + env_auth, + browser_auth, + tenant_id, + m365_credentials, + self._region_config, + ) + + # Set up the identity + self._identity = self.setup_identity( + sp_env_auth, + env_auth, + self._session, + ) + + # Set up PowerShell session credentials + self._credentials = self.setup_powershell( + env_auth=env_auth, + m365_credentials=m365_credentials, + identity=self.identity, + init_modules=init_modules, + ) + + # Audit Config + if config_content: + self._audit_config = config_content + else: + if not config_path: + config_path = default_config_file_path + self._audit_config = load_and_validate_config_file(self._type, config_path) + + # Fixer Config + self._fixer_config = fixer_config + + # Mutelist + if mutelist_content: + self._mutelist = M365Mutelist( + mutelist_content=mutelist_content, + ) + else: + if not mutelist_path: + mutelist_path = get_default_mute_file_path(self.type) + self._mutelist = M365Mutelist( + mutelist_path=mutelist_path, + ) + + Provider.set_global_provider(self) + + @property + def identity(self): + """Returns the identity of the M365 provider.""" + return self._identity + + @property + def type(self): + """Returns the type of the M365 provider.""" + return self._type + + @property + def session(self): + """Returns the session object associated with the M365 provider.""" + return self._session + + @property + def region_config(self): + """Returns the region configuration for the M365 provider.""" + return self._region_config + + @property + def audit_config(self): + """Returns the audit configuration for the M365 provider.""" + return self._audit_config + + @property + def fixer_config(self): + """Returns the fixer configuration.""" + return self._fixer_config + + @property + def mutelist(self) -> M365Mutelist: + """Mutelist object associated with this M365 provider.""" + return self._mutelist + + @property + def credentials(self) -> M365Credentials: + """Return powershell credentials""" + return self._credentials + + @staticmethod + def validate_arguments( + az_cli_auth: bool, + sp_env_auth: bool, + env_auth: bool, + browser_auth: bool, + tenant_id: str, + client_id: str, + client_secret: str, + user: str, + encrypted_password: str, + ): + """ + Validates the authentication arguments for the M365 provider. + + Args: + az_cli_auth (bool): Flag indicating whether Azure CLI authentication is enabled. + sp_env_auth (bool): Flag indicating whether application authentication with environment variables is enabled. + env_auth: (bool): Flag indicating whether to use application and PowerShell authentication with environment variables. + browser_auth (bool): Flag indicating whether browser authentication is enabled. + tenant_id (str): The M365 Tenant ID. + client_id (str): The M365 Client ID. + client_secret (str): The M365 Client Secret. + user (str): The M365 User Account. + encrpted_password (str): The M365 Encrypted Password. + + Raises: + M365BrowserAuthNoTenantIDError: If browser authentication is enabled but the tenant ID is not found. + """ + + if not client_id and not client_secret: + if not browser_auth and tenant_id and not env_auth: + raise M365BrowserAuthNoFlagError( + file=os.path.basename(__file__), + message="M365 tenant ID error: browser authentication flag (--browser-auth) not found", + ) + elif ( + not az_cli_auth + and not sp_env_auth + and not browser_auth + and not env_auth + ): + raise M365NoAuthenticationMethodError( + file=os.path.basename(__file__), + message="M365 provider requires at least one authentication method set: [--env-auth | --az-cli-auth | --sp-env-auth | --browser-auth]", + ) + elif browser_auth and not tenant_id: + raise M365BrowserAuthNoTenantIDError( + file=os.path.basename(__file__), + message="M365 Tenant ID (--tenant-id) is required for browser authentication mode", + ) + elif env_auth: + if not user or not encrypted_password or not tenant_id: + raise M365MissingEnvironmentCredentialsError( + file=os.path.basename(__file__), + message="M365 provider requires AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, AZURE_TENANT_ID, M365_USER and M365_ENCRYPTED_PASSWORD environment variables to be set when using --env-auth", + ) + else: + if not tenant_id: + raise M365NotTenantIdButClientIdAndClientSecretError( + file=os.path.basename(__file__), + message="Tenant Id is required for M365 static credentials. Make sure you are using the correct credentials.", + ) + + @staticmethod + def setup_region_config(region): + """ + Sets up the region configuration for the M365 provider. + + Args: + region (str): The name of the region. + + Returns: + M365RegionConfig: The region configuration object. + + """ + try: + config = get_regions_config(region) + + return M365RegionConfig( + name=region, + authority=config["authority"], + base_url=config["base_url"], + credential_scopes=config["credential_scopes"], + ) + except ArgumentTypeError as validation_error: + logger.error( + f"{validation_error.__class__.__name__}[{validation_error.__traceback__.tb_lineno}]: {validation_error}" + ) + raise M365ArgumentTypeValidationError( + file=os.path.basename(__file__), + original_exception=validation_error, + ) + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + raise M365SetUpRegionConfigError( + file=os.path.basename(__file__), + original_exception=error, + ) + + @staticmethod + def setup_powershell( + env_auth: bool = False, + m365_credentials: dict = {}, + identity: M365IdentityInfo = None, + init_modules: bool = False, + ) -> M365Credentials: + """Gets the M365 credentials. + + Args: + env_auth: (bool): Flag indicating whether to use application and PowerShell authentication with environment variables. + + Returns: + M365Credentials: Object containing the user credentials. + If env_auth is True, retrieves from environment variables. + If False, returns empty credentials. + """ + credentials = None + + if m365_credentials: + credentials = M365Credentials( + user=m365_credentials.get("user", ""), + passwd=m365_credentials.get("encrypted_password", ""), + client_id=m365_credentials.get("client_id", ""), + client_secret=m365_credentials.get("client_secret", ""), + tenant_id=m365_credentials.get("tenant_id", ""), + tenant_domains=identity.tenant_domains, + ) + elif env_auth: + m365_user = getenv("M365_USER") + m365_password = getenv("M365_ENCRYPTED_PASSWORD") + client_id = getenv("AZURE_CLIENT_ID") + client_secret = getenv("AZURE_CLIENT_SECRET") + tenant_id = getenv("AZURE_TENANT_ID") + + if not m365_user or not m365_password: + logger.critical( + "M365 provider: Missing M365_USER or M365_ENCRYPTED_PASSWORD environment variables needed for credentials authentication" + ) + raise M365MissingEnvironmentCredentialsError( + file=os.path.basename(__file__), + message="Missing M365_USER or M365_ENCRYPTED_PASSWORD environment variables required for credentials authentication.", + ) + credentials = M365Credentials( + client_id=client_id, + client_secret=client_secret, + tenant_id=tenant_id, + tenant_domains=identity.tenant_domains, + user=m365_user, + passwd=m365_password, + ) + + if credentials: + if identity: + identity.user = credentials.user + test_session = M365PowerShell(credentials, identity) + try: + if test_session.test_credentials(credentials): + if init_modules: + initialize_m365_powershell_modules() + return credentials + raise M365UserCredentialsError( + file=os.path.basename(__file__), + message="The provided User credentials are not valid.", + ) + finally: + test_session.close() + + def print_credentials(self): + """M365 credentials information. + + This method prints the M365 Tenant Domain, M365 Tenant ID, M365 Region, + M365 Subscriptions, M365 Identity Type, and M365 Identity ID. + + Args: + None + + Returns: + None + """ + report_lines = [ + f"M365 Region: {Fore.YELLOW}{self.region_config.name}{Style.RESET_ALL}", + f"M365 Tenant Domain: {Fore.YELLOW}{self._identity.tenant_domain}{Style.RESET_ALL} M365 Tenant ID: {Fore.YELLOW}{self._identity.tenant_id}{Style.RESET_ALL}", + f"M365 Identity Type: {Fore.YELLOW}{self._identity.identity_type}{Style.RESET_ALL} M365 Identity ID: {Fore.YELLOW}{self._identity.identity_id}{Style.RESET_ALL}", + ] + if self.credentials and self.credentials.user: + report_lines.append( + f"M365 User: {Fore.YELLOW}{self.credentials.user}{Style.RESET_ALL}" + ) + report_title = ( + f"{Style.BRIGHT}Using the M365 credentials below:{Style.RESET_ALL}" + ) + print_boxes(report_lines, report_title) + + # TODO: setup_session or setup_credentials? + # This should be setup_credentials, since it is setting up the credentials for the provider + @staticmethod + def setup_session( + az_cli_auth: bool, + sp_env_auth: bool, + env_auth: bool, + browser_auth: bool, + tenant_id: str, + m365_credentials: dict, + region_config: M365RegionConfig, + ): + """Returns the M365 credentials object. + + Set up the M365 session with the specified authentication method. + + Args: + az_cli_auth (bool): Flag indicating whether to use Azure CLI authentication. + sp_env_auth (bool): Flag indicating whether to use application authentication with environment variables. + browser_auth (bool): Flag indicating whether to use interactive browser authentication. + tenant_id (str): The M365 Active Directory tenant ID. + m365_credentials (dict): The M365 configuration object. It contains the following keys: + - tenant_id: The M365 Active Directory tenant ID. + - client_id: The M365 client ID. + - client_secret: The M365 client secret + - user: The M365 user email + - encrypted_password: The M365 encrypted password + - provider_id: The M365 provider ID (in this case the Tenant ID). + region_config (M365RegionConfig): The region configuration object. + + Returns: + credentials: The M365 credentials object. + + Raises: + Exception: If failed to retrieve M365 credentials. + + """ + if not browser_auth: + if sp_env_auth or env_auth: + try: + M365Provider.check_service_principal_creds_env_vars() + except M365EnvironmentVariableError as environment_credentials_error: + logger.critical( + f"{environment_credentials_error.__class__.__name__}[{environment_credentials_error.__traceback__.tb_lineno}] -- {environment_credentials_error}" + ) + raise environment_credentials_error + try: + if m365_credentials: + try: + credentials = ClientSecretCredential( + tenant_id=m365_credentials["tenant_id"], + client_id=m365_credentials["client_id"], + client_secret=m365_credentials["client_secret"], + ) + return credentials + except ClientAuthenticationError as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}] -- {error}" + ) + raise M365ClientAuthenticationError( + file=os.path.basename(__file__), original_exception=error + ) + except CredentialUnavailableError as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}] -- {error}" + ) + raise M365CredentialsUnavailableError( + file=os.path.basename(__file__), original_exception=error + ) + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}] -- {error}" + ) + raise M365ConfigCredentialsError( + file=os.path.basename(__file__), original_exception=error + ) + else: + # Since the authentication method to be used will come as True, we have to negate it since + # DefaultAzureCredential sets just one authentication method, excluding the others + try: + credentials = DefaultAzureCredential( + exclude_environment_credential=not ( + sp_env_auth or env_auth + ), + exclude_cli_credential=not az_cli_auth, + # M365 Auth using Managed Identity is not supported + exclude_managed_identity_credential=True, + # M365 Auth using Visual Studio is not supported + exclude_visual_studio_code_credential=True, + # M365 Auth using Shared Token Cache is not supported + exclude_shared_token_cache_credential=True, + # M365 Auth using PowerShell is not supported + exclude_powershell_credential=True, + # set Authority of a Microsoft Entra endpoint + authority=region_config.authority, + ) + except ClientAuthenticationError as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}] -- {error}" + ) + raise M365ClientAuthenticationError( + file=os.path.basename(__file__), original_exception=error + ) + except CredentialUnavailableError as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}] -- {error}" + ) + raise M365CredentialsUnavailableError( + file=os.path.basename(__file__), original_exception=error + ) + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}] -- {error}" + ) + raise M365DefaultAzureCredentialError( + file=os.path.basename(__file__), original_exception=error + ) + except Exception as error: + logger.critical("Failed to retrieve M365 credentials") + logger.critical( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}] -- {error}" + ) + raise M365SetUpSessionError( + file=os.path.basename(__file__), original_exception=error + ) + else: + try: + credentials = InteractiveBrowserCredential(tenant_id=tenant_id) + except Exception as error: + logger.critical( + "Failed to retrieve M365 credentials using browser authentication" + ) + logger.critical( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}] -- {error}" + ) + raise M365InteractiveBrowserCredentialError( + file=os.path.basename(__file__), original_exception=error + ) + + return credentials + + @staticmethod + def test_connection( + az_cli_auth: bool = False, + sp_env_auth: bool = False, + env_auth: bool = False, + browser_auth: bool = False, + tenant_id: str = None, + region: str = "M365Global", + raise_on_exception: bool = True, + client_id: str = None, + client_secret: str = None, + user: str = None, + encrypted_password: str = None, + provider_id: str = None, + ) -> Connection: + """Test connection to M365 tenant and PowerShell modules. + + Test the connection to an M365 tenant and PowerShell modules using the provided credentials. + + Args: + + az_cli_auth (bool): Flag indicating whether to use Azure CLI authentication. + sp_env_auth (bool): Flag indicating whether to use application authentication with environment variables. + env_auth: (bool): Flag indicating whether to use application and PowerShell authentication with environment variables. + browser_auth (bool): Flag indicating whether to use interactive browser authentication. + tenant_id (str): The M365 Active Directory tenant ID. + region (str): The M365 region. + raise_on_exception (bool): Flag indicating whether to raise an exception if the connection fails. + client_id (str): The M365 client ID. + client_secret (str): The M365 client secret. + user (str): The M365 user email. + encrypted_password (str): The M365 encrypted_password. + provider_id (str): The M365 provider ID (in this case the Tenant ID). + + + Returns: + bool: True if the connection is successful, False otherwise. + + Raises: + Exception: If failed to test the connection to M365 subscription. + M365ArgumentTypeValidationError: If there is an error in the argument type validation. + M365SetUpRegionConfigError: If there is an error in setting up the region configuration. + M365InteractiveBrowserCredentialError: If there is an error in retrieving the M365 credentials using browser authentication. + M365HTTPResponseError: If there is an HTTP response error. + M365ConfigCredentialsError: If there is an error in configuring the M365 credentials from a dictionary. + M365InvalidProviderIdError: If the provider ID does not match the application tenant domain. + + Examples: + >>> M365Provider.test_connection(az_cli_auth=True) + True + >>> M365Provider.test_connection(sp_env_auth=False, browser_auth=True, tenant_id=None) + False, ArgumentTypeError: M365 Tenant ID is required only for browser authentication mode + >>> M365Provider.test_connection(tenant_id="XXXXXXXXXX", client_id="XXXXXXXXXX", client_secret="XXXXXXXXXX") + True + """ + try: + M365Provider.validate_arguments( + az_cli_auth, + sp_env_auth, + env_auth, + browser_auth, + tenant_id, + client_id, + client_secret, + user, + encrypted_password, + ) + region_config = M365Provider.setup_region_config(region) + + # Get the dict from the static credentials + m365_credentials = None + if tenant_id and client_id and client_secret: + if not user and not encrypted_password: + m365_credentials = M365Provider.validate_static_credentials( + tenant_id=tenant_id, + client_id=client_id, + client_secret=client_secret, + user="user", + encrypted_password="encrypted_password", + ) + else: + m365_credentials = M365Provider.validate_static_credentials( + tenant_id=tenant_id, + client_id=client_id, + client_secret=client_secret, + user=user, + encrypted_password=encrypted_password, + ) + + # Set up the M365 session + session = M365Provider.setup_session( + az_cli_auth, + sp_env_auth, + env_auth, + browser_auth, + tenant_id, + m365_credentials, + region_config, + ) + + GraphServiceClient(credentials=session) + + logger.info("M365 provider: Connection to MSGraph successful") + + # Set up Identity + identity = M365Provider.setup_identity( + sp_env_auth, + env_auth, + session, + ) + + if not identity: + raise M365GetTokenIdentityError( + file=os.path.basename(__file__), + message="Failed to retrieve M365 identity", + ) + + if provider_id not in identity.tenant_domains: + raise M365InvalidProviderIdError( + file=os.path.basename(__file__), + message=f"The provider ID {provider_id} does not match any of the service principal tenant domains: {', '.join(identity.tenant_domains)}", + ) + + # Set up PowerShell credentials + if user and encrypted_password: + M365Provider.setup_powershell( + env_auth, + m365_credentials, + identity, + ) + else: + logger.info( + "M365 provider: Connection to PowerShell has not been requested" + ) + + logger.info("M365 provider: Connection to PowerShell successful") + + return Connection(is_connected=True) + + # Exceptions from setup_region_config + except M365ArgumentTypeValidationError as type_validation_error: + logger.error( + f"{type_validation_error.__class__.__name__}[{type_validation_error.__traceback__.tb_lineno}]: {type_validation_error}" + ) + if raise_on_exception: + raise type_validation_error + return Connection(error=type_validation_error) + except M365SetUpRegionConfigError as region_config_error: + logger.error( + f"{region_config_error.__class__.__name__}[{region_config_error.__traceback__.tb_lineno}]: {region_config_error}" + ) + if raise_on_exception: + raise region_config_error + return Connection(error=region_config_error) + # Exceptions from setup_session + except M365EnvironmentVariableError as environment_credentials_error: + logger.error( + f"{environment_credentials_error.__class__.__name__}[{environment_credentials_error.__traceback__.tb_lineno}]: {environment_credentials_error}" + ) + if raise_on_exception: + raise environment_credentials_error + return Connection(error=environment_credentials_error) + except M365ConfigCredentialsError as config_credentials_error: + logger.error( + f"{config_credentials_error.__class__.__name__}[{config_credentials_error.__traceback__.tb_lineno}]: {config_credentials_error}" + ) + if raise_on_exception: + raise config_credentials_error + return Connection(error=config_credentials_error) + except M365ClientAuthenticationError as client_auth_error: + logger.error( + f"{client_auth_error.__class__.__name__}[{client_auth_error.__traceback__.tb_lineno}]: {client_auth_error}" + ) + if raise_on_exception: + raise client_auth_error + return Connection(error=client_auth_error) + except M365CredentialsUnavailableError as credential_unavailable_error: + logger.error( + f"{credential_unavailable_error.__class__.__name__}[{credential_unavailable_error.__traceback__.tb_lineno}]: {credential_unavailable_error}" + ) + if raise_on_exception: + raise credential_unavailable_error + return Connection(error=credential_unavailable_error) + except ( + M365ClientIdAndClientSecretNotBelongingToTenantIdError + ) as tenant_id_error: + logger.error( + f"{tenant_id_error.__class__.__name__}[{tenant_id_error.__traceback__.tb_lineno}]: {tenant_id_error}" + ) + if raise_on_exception: + raise tenant_id_error + return Connection(error=tenant_id_error) + except ( + M365TenantIdAndClientSecretNotBelongingToClientIdError + ) as client_id_error: + logger.error( + f"{client_id_error.__class__.__name__}[{client_id_error.__traceback__.tb_lineno}]: {client_id_error}" + ) + if raise_on_exception: + raise client_id_error + return Connection(error=client_id_error) + except ( + M365TenantIdAndClientIdNotBelongingToClientSecretError + ) as client_secret_error: + logger.error( + f"{client_secret_error.__class__.__name__}[{client_secret_error.__traceback__.tb_lineno}]: {client_secret_error}" + ) + if raise_on_exception: + raise client_secret_error + return Connection(error=client_secret_error) + # Exceptions from provider_id validation + except M365InvalidProviderIdError as invalid_credentials_error: + logger.error( + f"{invalid_credentials_error.__class__.__name__}[{invalid_credentials_error.__traceback__.tb_lineno}]: {invalid_credentials_error}" + ) + if raise_on_exception: + raise invalid_credentials_error + return Connection(error=invalid_credentials_error) + # Exceptions from SubscriptionClient + except HttpResponseError as http_response_error: + logger.error( + f"{http_response_error.__class__.__name__}[{http_response_error.__traceback__.tb_lineno}]: {http_response_error}" + ) + if raise_on_exception: + raise M365HTTPResponseError( + file=os.path.basename(__file__), + original_exception=http_response_error, + ) + return Connection(error=http_response_error) + except Exception as error: + logger.critical( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + if raise_on_exception: + # Raise directly the exception + raise error + return Connection(error=error) + + @staticmethod + def check_service_principal_creds_env_vars(): + """ + Checks the presence of required environment variables for service principal authentication against Azure. + + This method checks for the presence of the following environment variables: + - AZURE_CLIENT_ID: Azure client ID + - AZURE_TENANT_ID: Azure tenant ID + - AZURE_CLIENT_SECRET: Azure client secret + + If any of the environment variables is missing, it logs a critical error and exits the program. + """ + logger.info( + "M365 provider: checking service principal environment variables ..." + ) + for env_var in ["AZURE_CLIENT_ID", "AZURE_TENANT_ID", "AZURE_CLIENT_SECRET"]: + if not getenv(env_var): + logger.critical( + f"M365 provider: Missing environment variable {env_var} needed to authenticate against M365." + ) + raise M365EnvironmentVariableError( + file=os.path.basename(__file__), + message=f"Missing environment variable {env_var} required to authenticate.", + ) + + @staticmethod + def setup_identity( + sp_env_auth, + env_auth, + session, + ): + """ + Sets up the identity for the M365 provider. + + Args: + az_cli_auth (bool): Flag indicating if Azure CLI authentication is used. + sp_env_auth (bool): Flag indicating if application authentication with environment variables is used. + env_auth: (bool): Flag indicating whether to use application and PowerShell authentication with environment variables. + browser_auth (bool): Flag indicating if interactive browser authentication is used. + client_id (str): The M365 client ID. + + Returns: + M365IdentityInfo: An instance of M365IdentityInfo containing the identity information. + """ + logger.info("M365 provider: Setting up identity ...") + # TODO: fill this object with real values not default and set to none + identity = M365IdentityInfo() + + # If credentials comes from service principal or browser, if the required permissions are assigned + # the identity can access AAD and retrieve the tenant domain name. + # With cli also should be possible but right now it does not work, m365 python package issue is coming + # At the time of writting this with az cli creds is not working, despite that is included + + async def get_m365_identity(identity): + # Trying to recover tenant domain info + try: + logger.info( + "Trying to retrieve tenant domain from AAD to populate identity structure ..." + ) + client = GraphServiceClient(credentials=session) + + domain_result = await client.domains.get() + if getattr(domain_result, "value"): + if getattr(domain_result.value[0], "id"): + identity.tenant_domain = domain_result.value[0].id + for domain in domain_result.value: + identity.tenant_domains.append(domain.id) + + except HttpResponseError as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}] -- {error}" + ) + raise M365HTTPResponseError( + file=os.path.basename(__file__), + original_exception=error, + ) + except ClientAuthenticationError as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}] -- {error}" + ) + raise M365GetTokenIdentityError( + file=os.path.basename(__file__), + original_exception=error, + ) + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}] -- {error}" + ) + # since that exception is not considered as critical, we keep filling another identity fields + identity.identity_id = ( + getenv("AZURE_CLIENT_ID") or "Unknown user id (Missing AAD permissions)" + ) + if sp_env_auth: + identity.identity_type = "Service Principal" + elif env_auth: + identity.identity_type = "Service Principal and User Credentials" + else: + identity.identity_type = "User" + try: + logger.info( + "Trying to retrieve user information from AAD to populate identity structure ..." + ) + client = GraphServiceClient(credentials=session) + + me = await client.me.get() + if me: + if getattr(me, "user_principal_name"): + identity.identity_id = me.user_principal_name + + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}] -- {error}" + ) + + # Retrieve tenant id from the client + client = GraphServiceClient(credentials=session) + organization_info = await client.organization.get() + identity.tenant_id = organization_info.value[0].id + + asyncio.get_event_loop().run_until_complete(get_m365_identity(identity)) + return identity + + @staticmethod + def validate_static_credentials( + tenant_id: str = None, + client_id: str = None, + client_secret: str = None, + user: str = None, + encrypted_password: str = None, + ) -> dict: + """ + Validates the static credentials for the M365 provider. + + Args: + tenant_id (str): The M365 Active Directory tenant ID. + client_id (str): The M365 client ID. + client_secret (str): The M365 client secret. + user (str): The M365 user email. + encrypted_password (str): The M365 encrypted password. + + Raises: + M365NotValidTenantIdError: If the provided M365 Tenant ID is not valid. + M365NotValidClientIdError: If the provided M365 Client ID is not valid. + M365NotValidClientSecretError: If the provided M365 Client Secret is not valid. + M365ClientIdAndClientSecretNotBelongingToTenantIdError: If the provided M365 Client ID and Client Secret do not belong to the specified Tenant ID. + M365TenantIdAndClientSecretNotBelongingToClientIdError: If the provided M365 Tenant ID and Client Secret do not belong to the specified Client ID. + M365TenantIdAndClientIdNotBelongingToClientSecretError: If the provided M365 Tenant ID and Client ID do not belong to the specified Client Secret. + + Returns: + dict: A dictionary containing the validated static credentials. + """ + # Validate the Tenant ID + try: + UUID(tenant_id) + except ValueError: + raise M365NotValidTenantIdError( + file=os.path.basename(__file__), + message="The provided Tenant ID is not valid.", + ) + + # Validate the Client ID + try: + UUID(client_id) + except ValueError: + raise M365NotValidClientIdError( + file=os.path.basename(__file__), + message="The provided Client ID is not valid.", + ) + + # Validate the Client Secret + if not client_secret: + raise M365NotValidClientSecretError( + file=os.path.basename(__file__), + message="The provided Client Secret is not valid.", + ) + + # Validate the User + if not user: + raise M365NotValidUserError( + file=os.path.basename(__file__), + message="The provided User is not valid.", + ) + + # Validate the Encrypted Password + if not encrypted_password: + raise M365NotValidEncryptedPasswordError( + file=os.path.basename(__file__), + message="The provided Encrypted Password is not valid.", + ) + + try: + M365Provider.verify_client(tenant_id, client_id, client_secret) + return { + "tenant_id": tenant_id, + "client_id": client_id, + "client_secret": client_secret, + "user": user, + "encrypted_password": encrypted_password, + } + except M365NotValidTenantIdError as tenant_id_error: + logger.error( + f"{tenant_id_error.__class__.__name__}[{tenant_id_error.__traceback__.tb_lineno}]: {tenant_id_error}" + ) + raise M365ClientIdAndClientSecretNotBelongingToTenantIdError( + file=os.path.basename(__file__), + message="The provided Client ID and Client Secret do not belong to the specified Tenant ID.", + ) + except M365NotValidClientIdError as client_id_error: + logger.error( + f"{client_id_error.__class__.__name__}[{client_id_error.__traceback__.tb_lineno}]: {client_id_error}" + ) + raise M365TenantIdAndClientSecretNotBelongingToClientIdError( + file=os.path.basename(__file__), + message="The provided Tenant ID and Client Secret do not belong to the specified Client ID.", + ) + except M365NotValidClientSecretError as client_secret_error: + logger.error( + f"{client_secret_error.__class__.__name__}[{client_secret_error.__traceback__.tb_lineno}]: {client_secret_error}" + ) + raise M365TenantIdAndClientIdNotBelongingToClientSecretError( + file=os.path.basename(__file__), + message="The provided Tenant ID and Client ID do not belong to the specified Client Secret.", + ) + + @staticmethod + def verify_client(tenant_id, client_id, client_secret) -> None: + """ + Verifies the M365 client credentials using the specified tenant ID, client ID, and client secret. + + Args: + tenant_id (str): The M365 Active Directory tenant ID. + client_id (str): The M365 client ID. + client_secret (str): The M365 client secret. + + Raises: + M365NotValidTenantIdError: If the provided M365 Tenant ID is not valid. + M365NotValidClientIdError: If the provided M365 Client ID is not valid. + M365NotValidClientSecretError: If the provided M365 Client Secret is not valid. + + Returns: + None + """ + authority = f"https://login.microsoftonline.com/{tenant_id}" + try: + # Create a ConfidentialClientApplication instance + app = ConfidentialClientApplication( + client_id=client_id, + client_credential=client_secret, + authority=authority, + ) + + # Attempt to acquire a token + result = app.acquire_token_for_client( + scopes=["https://graph.microsoft.com/.default"] + ) + + # Check if token acquisition was successful + if "access_token" not in result: + # Handle specific errors based on the MSAL response + error_description = result.get("error_description", "") + if f"Tenant '{tenant_id}'" in error_description: + raise M365NotValidTenantIdError( + file=os.path.basename(__file__), + message="The provided Tenant ID is not valid for the specified Client ID and Client Secret.", + ) + if f"Application with identifier '{client_id}'" in error_description: + raise M365NotValidClientIdError( + file=os.path.basename(__file__), + message="The provided Client ID is not valid for the specified Tenant ID and Client Secret.", + ) + if "Invalid client secret provided" in error_description: + raise M365NotValidClientSecretError( + file=os.path.basename(__file__), + message="The provided Client Secret is not valid for the specified Tenant ID and Client ID.", + ) + except ( + M365NotValidTenantIdError, + M365NotValidClientIdError, + M365NotValidClientSecretError, + ) as m365_error: + # M365 specific errors already raised + raise RuntimeError(f"{m365_error}") + except Exception as error: + # Generic exception handling for unexpected errors + raise RuntimeError(f"An unexpected error occurred: {str(error)}") diff --git a/prowler/providers/microsoft365/models.py b/prowler/providers/m365/models.py similarity index 74% rename from prowler/providers/microsoft365/models.py rename to prowler/providers/m365/models.py index c1e028e8d6..d0d73263b5 100644 --- a/prowler/providers/microsoft365/models.py +++ b/prowler/providers/m365/models.py @@ -4,22 +4,33 @@ from prowler.config.config import output_file_timestamp from prowler.providers.common.models import ProviderOutputOptions -class Microsoft365IdentityInfo(BaseModel): +class M365IdentityInfo(BaseModel): identity_id: str = "" identity_type: str = "" tenant_id: str = "" - tenant_domain: str = "Unknown tenant domain (missing AAD permissions)" + tenant_domain: str = "Unknown tenant domain (missing Entra permissions)" + tenant_domains: list[str] = [] location: str = "" + user: str = None -class Microsoft365RegionConfig(BaseModel): +class M365RegionConfig(BaseModel): name: str = "" authority: str = None base_url: str = "" credential_scopes: list = [] -class Microsoft365OutputOptions(ProviderOutputOptions): +class M365Credentials(BaseModel): + client_id: str = "" + client_secret: str = "" + tenant_id: str = "" + tenant_domains: list[str] = [] + user: str = "" + passwd: str = "" + + +class M365OutputOptions(ProviderOutputOptions): def __init__(self, arguments, bulk_checks_metadata, identity): # First call Provider_Output_Options init super().__init__(arguments, bulk_checks_metadata) diff --git a/prowler/providers/m365/services/admincenter/__init__.py b/prowler/providers/m365/services/admincenter/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/microsoft365/services/admincenter/admincenter_client.py b/prowler/providers/m365/services/admincenter/admincenter_client.py similarity index 53% rename from prowler/providers/microsoft365/services/admincenter/admincenter_client.py rename to prowler/providers/m365/services/admincenter/admincenter_client.py index 72facdeefd..a1e3341296 100644 --- a/prowler/providers/microsoft365/services/admincenter/admincenter_client.py +++ b/prowler/providers/m365/services/admincenter/admincenter_client.py @@ -1,6 +1,4 @@ from prowler.providers.common.provider import Provider -from prowler.providers.microsoft365.services.admincenter.admincenter_service import ( - AdminCenter, -) +from prowler.providers.m365.services.admincenter.admincenter_service import AdminCenter admincenter_client = AdminCenter(Provider.get_global_provider()) diff --git a/prowler/providers/m365/services/admincenter/admincenter_external_calendar_sharing_disabled/__init__.py b/prowler/providers/m365/services/admincenter/admincenter_external_calendar_sharing_disabled/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/admincenter/admincenter_external_calendar_sharing_disabled/admincenter_external_calendar_sharing_disabled.metadata.json b/prowler/providers/m365/services/admincenter/admincenter_external_calendar_sharing_disabled/admincenter_external_calendar_sharing_disabled.metadata.json new file mode 100644 index 0000000000..64f9d85c74 --- /dev/null +++ b/prowler/providers/m365/services/admincenter/admincenter_external_calendar_sharing_disabled/admincenter_external_calendar_sharing_disabled.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "admincenter_external_calendar_sharing_disabled", + "CheckTitle": "Ensure external sharing of calendars is disabled", + "CheckType": [], + "ServiceName": "admincenter", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "medium", + "ResourceType": "Sharing Policy", + "Description": "Restrict the ability for users to share their calendars externally in Microsoft 365. This prevents users from sending calendar sharing links to external recipients, reducing information exposure.", + "Risk": "Allowing calendar sharing outside the organization can help attackers build knowledge of personnel availability, relationships, and activity patterns, aiding social engineering or targeted attacks.", + "RelatedUrl": "https://learn.microsoft.com/en-us/microsoft-365/admin/manage/share-calendars-with-external-users?view=o365-worldwide", + "Remediation": { + "Code": { + "CLI": "Set-SharingPolicy -Identity \"Default Sharing Policy\" -Enabled $False", + "NativeIaC": "", + "Other": "1. Navigate to https://admin.microsoft.com. 2. Click Settings > Org settings. 3. Select Calendar in the Services section. 4. Uncheck 'Let your users share their calendars with people outside of your organization who have Office 365 or Exchange'. 5. Click Save.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Disable external calendar sharing by setting the Default Sharing Policy to disabled.", + "Url": "https://learn.microsoft.com/en-us/microsoft-365/admin/manage/share-calendars-with-external-users?view=o365-worldwide" + } + }, + "Categories": [ + "e5" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/admincenter/admincenter_external_calendar_sharing_disabled/admincenter_external_calendar_sharing_disabled.py b/prowler/providers/m365/services/admincenter/admincenter_external_calendar_sharing_disabled/admincenter_external_calendar_sharing_disabled.py new file mode 100644 index 0000000000..ff2af49aca --- /dev/null +++ b/prowler/providers/m365/services/admincenter/admincenter_external_calendar_sharing_disabled/admincenter_external_calendar_sharing_disabled.py @@ -0,0 +1,52 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.admincenter.admincenter_client import ( + admincenter_client, +) + + +class admincenter_external_calendar_sharing_disabled(Check): + """ + Ensure that external calendar sharing is disabled for the organization. + + Disabling external calendar sharing restricts the ability for users to share their + calendars externally in Microsoft 365. This prevents users from sending calendar + sharing links to external recipients, reducing information exposure. + + Attributes: + metadata: Metadata associated with the check (inherited from Check). + """ + + def execute(self) -> List[CheckReportM365]: + """ + Execute the check for external calendar sharing in Microsoft 365. + + This method checks if external calendar sharing is disabled in the organization configuration. + + Returns: + List[CheckReportM365]: A list of reports containing the result of the check. + """ + findings = [] + sharing_policy = admincenter_client.sharing_policy + if sharing_policy: + report = CheckReportM365( + metadata=self.metadata(), + resource=sharing_policy, + resource_name=sharing_policy.name, + resource_id=sharing_policy.guid, + ) + report.status = "FAIL" + report.status_extended = ( + "External calendar sharing is enabled at the organization level." + ) + + if not sharing_policy.enabled: + report.status = "PASS" + report.status_extended = ( + "External calendar sharing is disabled at the organization level." + ) + + findings.append(report) + + return findings diff --git a/prowler/providers/m365/services/admincenter/admincenter_groups_not_public_visibility/__init__.py b/prowler/providers/m365/services/admincenter/admincenter_groups_not_public_visibility/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/microsoft365/services/admincenter/admincenter_groups_not_public_visibility/admincenter_groups_not_public_visibility.metadata.json b/prowler/providers/m365/services/admincenter/admincenter_groups_not_public_visibility/admincenter_groups_not_public_visibility.metadata.json similarity index 96% rename from prowler/providers/microsoft365/services/admincenter/admincenter_groups_not_public_visibility/admincenter_groups_not_public_visibility.metadata.json rename to prowler/providers/m365/services/admincenter/admincenter_groups_not_public_visibility/admincenter_groups_not_public_visibility.metadata.json index 733298af55..fee531f596 100644 --- a/prowler/providers/microsoft365/services/admincenter/admincenter_groups_not_public_visibility/admincenter_groups_not_public_visibility.metadata.json +++ b/prowler/providers/m365/services/admincenter/admincenter_groups_not_public_visibility/admincenter_groups_not_public_visibility.metadata.json @@ -1,5 +1,5 @@ { - "Provider": "microsoft365", + "Provider": "m365", "CheckID": "admincenter_groups_not_public_visibility", "CheckTitle": "Ensure that only organizationally managed/approved public groups exist", "CheckType": [], @@ -23,7 +23,9 @@ "Url": "https://learn.microsoft.com/en-us/microsoft-365/security/office-365-security/microsoft-365-groups-governance" } }, - "Categories": [], + "Categories": [ + "e3" + ], "DependsOn": [], "RelatedTo": [], "Notes": "" diff --git a/prowler/providers/microsoft365/services/admincenter/admincenter_groups_not_public_visibility/admincenter_groups_not_public_visibility.py b/prowler/providers/m365/services/admincenter/admincenter_groups_not_public_visibility/admincenter_groups_not_public_visibility.py similarity index 79% rename from prowler/providers/microsoft365/services/admincenter/admincenter_groups_not_public_visibility/admincenter_groups_not_public_visibility.py rename to prowler/providers/m365/services/admincenter/admincenter_groups_not_public_visibility/admincenter_groups_not_public_visibility.py index 884d614612..d61fdec68d 100644 --- a/prowler/providers/microsoft365/services/admincenter/admincenter_groups_not_public_visibility/admincenter_groups_not_public_visibility.py +++ b/prowler/providers/m365/services/admincenter/admincenter_groups_not_public_visibility/admincenter_groups_not_public_visibility.py @@ -1,7 +1,7 @@ from typing import List -from prowler.lib.check.models import Check, CheckReportMicrosoft365 -from prowler.providers.microsoft365.services.admincenter.admincenter_client import ( +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.admincenter.admincenter_client import ( admincenter_client, ) @@ -16,18 +16,18 @@ class admincenter_groups_not_public_visibility(Check): metadata: Metadata associated with the check (inherited from Check). """ - def execute(self) -> List[CheckReportMicrosoft365]: + def execute(self) -> List[CheckReportM365]: """Execute the check for groups with public visibility. This method iterates through all groups in Microsoft Admin Center and checks if any group has 'Public' visibility. If so, the check fails for that group. Returns: - List[CheckReportMicrosoft365]: A list containing the results of the check for each group. + List[CheckReportM365]: A list containing the results of the check for each group. """ findings = [] for group in admincenter_client.groups.values(): - report = CheckReportMicrosoft365( + report = CheckReportM365( metadata=self.metadata(), resource=group, resource_name=group.name, diff --git a/prowler/providers/m365/services/admincenter/admincenter_organization_customer_lockbox_enabled/__init__.py b/prowler/providers/m365/services/admincenter/admincenter_organization_customer_lockbox_enabled/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/admincenter/admincenter_organization_customer_lockbox_enabled/admincenter_organization_customer_lockbox_enabled.metadata.json b/prowler/providers/m365/services/admincenter/admincenter_organization_customer_lockbox_enabled/admincenter_organization_customer_lockbox_enabled.metadata.json new file mode 100644 index 0000000000..2c0ba3ebac --- /dev/null +++ b/prowler/providers/m365/services/admincenter/admincenter_organization_customer_lockbox_enabled/admincenter_organization_customer_lockbox_enabled.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "admincenter_organization_customer_lockbox_enabled", + "CheckTitle": "Ensure that customer lockbox is enabled for the organization", + "CheckType": [], + "ServiceName": "admincenter", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "high", + "ResourceType": "Exchange Organization Configuration", + "Description": "Customer Lockbox ensures that Microsoft support engineers cannot access content in your tenant to perform a service operation without explicit approval. This feature provides an additional layer of control and transparency over data access requests.", + "Risk": "If Customer Lockbox is not enabled, Microsoft support personnel can access your organization's data for troubleshooting without explicit approval, potentially increasing the risk of unauthorized access or data exfiltration.", + "RelatedUrl": "https://learn.microsoft.com/en-us/azure/security/fundamentals/customer-lockbox-overview", + "Remediation": { + "Code": { + "CLI": "Set-OrganizationConfig -CustomerLockBoxEnabled $true", + "NativeIaC": "", + "Other": "1. Navigate to Microsoft 365 admin center https://admin.microsoft.com. 2. Click Settings > Org settings. 3. Select the Security & privacy tab. 4. Click Customer lockbox. 5. Check the box 'Require approval for all data access requests'. 6. Click Save.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Enable the Customer Lockbox feature to ensure explicit approval is required before Microsoft engineers can access your data during support operations.", + "Url": "https://learn.microsoft.com/en-us/azure/security/fundamentals/customer-lockbox-overview" + } + }, + "Categories": [ + "e5" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/admincenter/admincenter_organization_customer_lockbox_enabled/admincenter_organization_customer_lockbox_enabled.py b/prowler/providers/m365/services/admincenter/admincenter_organization_customer_lockbox_enabled/admincenter_organization_customer_lockbox_enabled.py new file mode 100644 index 0000000000..532b053b14 --- /dev/null +++ b/prowler/providers/m365/services/admincenter/admincenter_organization_customer_lockbox_enabled/admincenter_organization_customer_lockbox_enabled.py @@ -0,0 +1,52 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.admincenter.admincenter_client import ( + admincenter_client, +) + + +class admincenter_organization_customer_lockbox_enabled(Check): + """ + Ensure the customer lockbox feature is enabled. + + Customer Lockbox ensures that Microsoft support engineers cannot access content + in your tenant to perform a service operation without explicit approval. This feature + provides an additional layer of control and transparency over data access requests. + + Attributes: + metadata: Metadata associated with the check (inherited from Check). + """ + + def execute(self) -> List[CheckReportM365]: + """ + Execute the check for the Customer Lockbox feature in Microsoft 365. + + This method checks if the Customer Lockbox feature is enabled in the organization configuration. + + Returns: + List[CheckReportM365]: A list of reports containing the result of the check. + """ + findings = [] + organization_config = admincenter_client.organization_config + if organization_config: + report = CheckReportM365( + metadata=self.metadata(), + resource=organization_config, + resource_name=organization_config.name, + resource_id=organization_config.guid, + ) + report.status = "FAIL" + report.status_extended = ( + "Customer Lockbox is not enabled at organization level." + ) + + if organization_config.customer_lockbox_enabled: + report.status = "PASS" + report.status_extended = ( + "Customer Lockbox is enabled at organization level." + ) + + findings.append(report) + + return findings diff --git a/prowler/providers/microsoft365/services/admincenter/admincenter_service.py b/prowler/providers/m365/services/admincenter/admincenter_service.py similarity index 66% rename from prowler/providers/microsoft365/services/admincenter/admincenter_service.py rename to prowler/providers/m365/services/admincenter/admincenter_service.py index fed450ca82..bb1cad48ba 100644 --- a/prowler/providers/microsoft365/services/admincenter/admincenter_service.py +++ b/prowler/providers/m365/services/admincenter/admincenter_service.py @@ -1,17 +1,23 @@ from asyncio import gather, get_event_loop from typing import List, Optional -from msgraph.generated.models.o_data_errors.o_data_error import ODataError from pydantic import BaseModel from prowler.lib.logger import logger -from prowler.providers.microsoft365.lib.service.service import Microsoft365Service -from prowler.providers.microsoft365.microsoft365_provider import Microsoft365Provider +from prowler.providers.m365.lib.service.service import M365Service +from prowler.providers.m365.m365_provider import M365Provider -class AdminCenter(Microsoft365Service): - def __init__(self, provider: Microsoft365Provider): +class AdminCenter(M365Service): + def __init__(self, provider: M365Provider): super().__init__(provider) + self.organization_config = None + self.sharing_policy = None + if self.powershell: + self.powershell.connect_exchange_online() + self.organization_config = self._get_organization_config() + self.sharing_policy = self._get_sharing_policy() + self.powershell.close() loop = get_event_loop() @@ -30,8 +36,44 @@ class AdminCenter(Microsoft365Service): self.groups = attributes[1] self.domains = attributes[2] + def _get_organization_config(self): + logger.info("Microsoft365 - Getting Exchange Organization configuration...") + organization_config = None + try: + organization_configuration = self.powershell.get_organization_config() + if organization_configuration: + organization_config = Organization( + name=organization_configuration.get("Name", ""), + guid=organization_configuration.get("Guid", ""), + customer_lockbox_enabled=organization_configuration.get( + "CustomerLockboxEnabled", False + ), + ) + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + return organization_config + + def _get_sharing_policy(self): + logger.info("M365 - Getting sharing policy...") + sharing_policy = None + try: + sharing_policy_data = self.powershell.get_sharing_policy() + if sharing_policy_data: + sharing_policy = SharingPolicy( + name=sharing_policy_data.get("Name", ""), + guid=sharing_policy_data.get("Guid", ""), + enabled=sharing_policy_data.get("Enabled", False), + ) + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + return sharing_policy + async def _get_users(self): - logger.info("Microsoft365 - Getting users...") + logger.info("M365 - Getting users...") users = {} try: users_list = await self.client.users.get() @@ -40,20 +82,6 @@ class AdminCenter(Microsoft365Service): license_details = await self.client.users.by_user_id( user.id ).license_details.get() - try: - mailbox_settings = await self.client.users.by_user_id( - user.id - ).mailbox_settings.get() - mailbox_settings.user_purpose - except ODataError as error: - if error.error.code == "MailboxNotEnabledForRESTAPI": - logger.warning( - f"MailboxNotEnabledForRESTAPI for user {user.id}" - ) - else: - logger.error( - f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" - ) users.update( { user.id: User( @@ -75,7 +103,7 @@ class AdminCenter(Microsoft365Service): return users async def _get_directory_roles(self): - logger.info("Microsoft365 - Getting directory roles...") + logger.info("M365 - Getting directory roles...") directory_roles_with_members = {} try: directory_roles_with_members.update({}) @@ -110,7 +138,7 @@ class AdminCenter(Microsoft365Service): return directory_roles_with_members async def _get_groups(self): - logger.info("Microsoft365 - Getting groups...") + logger.info("M365 - Getting groups...") groups = {} try: groups_list = await self.client.groups.get() @@ -133,7 +161,7 @@ class AdminCenter(Microsoft365Service): return groups async def _get_domains(self): - logger.info("Microsoft365 - Getting domains...") + logger.info("M365 - Getting domains...") domains = {} try: domains_list = await self.client.domains.get() @@ -178,3 +206,15 @@ class Group(BaseModel): class Domain(BaseModel): id: str password_validity_period: int + + +class Organization(BaseModel): + name: str + guid: str + customer_lockbox_enabled: bool + + +class SharingPolicy(BaseModel): + name: str + guid: str + enabled: bool diff --git a/prowler/providers/m365/services/admincenter/admincenter_settings_password_never_expire/__init__.py b/prowler/providers/m365/services/admincenter/admincenter_settings_password_never_expire/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/microsoft365/services/admincenter/admincenter_settings_password_never_expire/admincenter_settings_password_never_expire.metadata.json b/prowler/providers/m365/services/admincenter/admincenter_settings_password_never_expire/admincenter_settings_password_never_expire.metadata.json similarity index 96% rename from prowler/providers/microsoft365/services/admincenter/admincenter_settings_password_never_expire/admincenter_settings_password_never_expire.metadata.json rename to prowler/providers/m365/services/admincenter/admincenter_settings_password_never_expire/admincenter_settings_password_never_expire.metadata.json index a79fc45e94..abd03d3e60 100644 --- a/prowler/providers/microsoft365/services/admincenter/admincenter_settings_password_never_expire/admincenter_settings_password_never_expire.metadata.json +++ b/prowler/providers/m365/services/admincenter/admincenter_settings_password_never_expire/admincenter_settings_password_never_expire.metadata.json @@ -1,5 +1,5 @@ { - "Provider": "microsoft365", + "Provider": "m365", "CheckID": "admincenter_settings_password_never_expire", "CheckTitle": "Ensure the 'Password expiration policy' is set to 'Set passwords to never expire (recommended)'", "CheckType": [], @@ -23,7 +23,9 @@ "Url": "https://learn.microsoft.com/en-us/microsoft-365/admin/misc/password-policy-recommendations?view=o365-worldwide" } }, - "Categories": [], + "Categories": [ + "e3" + ], "DependsOn": [], "RelatedTo": [], "Notes": "" diff --git a/prowler/providers/microsoft365/services/admincenter/admincenter_settings_password_never_expire/admincenter_settings_password_never_expire.py b/prowler/providers/m365/services/admincenter/admincenter_settings_password_never_expire/admincenter_settings_password_never_expire.py similarity index 81% rename from prowler/providers/microsoft365/services/admincenter/admincenter_settings_password_never_expire/admincenter_settings_password_never_expire.py rename to prowler/providers/m365/services/admincenter/admincenter_settings_password_never_expire/admincenter_settings_password_never_expire.py index fa1ff62265..4af24427ea 100644 --- a/prowler/providers/microsoft365/services/admincenter/admincenter_settings_password_never_expire/admincenter_settings_password_never_expire.py +++ b/prowler/providers/m365/services/admincenter/admincenter_settings_password_never_expire/admincenter_settings_password_never_expire.py @@ -1,7 +1,7 @@ from typing import List -from prowler.lib.check.models import Check, CheckReportMicrosoft365 -from prowler.providers.microsoft365.services.admincenter.admincenter_client import ( +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.admincenter.admincenter_client import ( admincenter_client, ) @@ -17,19 +17,19 @@ class admincenter_settings_password_never_expire(Check): metadata: Metadata associated with the check (inherited from Check). """ - def execute(self) -> List[CheckReportMicrosoft365]: + def execute(self) -> List[CheckReportM365]: """Execute the check for password never expires policy. This method iterates over all domains and checks if the password validity period is set to `2147483647`, indicating that passwords for users in the domain never expire. Returns: - List[CheckReportMicrosoft365]: A list of reports indicating whether the domain's password + List[CheckReportM365]: A list of reports indicating whether the domain's password policy is set to never expire. """ findings = [] for domain in admincenter_client.domains.values(): - report = CheckReportMicrosoft365( + report = CheckReportM365( self.metadata(), resource=domain, resource_name=domain.id, diff --git a/prowler/providers/m365/services/admincenter/admincenter_users_admins_reduced_license_footprint/__init__.py b/prowler/providers/m365/services/admincenter/admincenter_users_admins_reduced_license_footprint/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/microsoft365/services/admincenter/admincenter_users_admins_reduced_license_footprint/admincenter_users_admins_reduced_license_footprint.metadata.json b/prowler/providers/m365/services/admincenter/admincenter_users_admins_reduced_license_footprint/admincenter_users_admins_reduced_license_footprint.metadata.json similarity index 97% rename from prowler/providers/microsoft365/services/admincenter/admincenter_users_admins_reduced_license_footprint/admincenter_users_admins_reduced_license_footprint.metadata.json rename to prowler/providers/m365/services/admincenter/admincenter_users_admins_reduced_license_footprint/admincenter_users_admins_reduced_license_footprint.metadata.json index 563dd09157..673f726d16 100644 --- a/prowler/providers/microsoft365/services/admincenter/admincenter_users_admins_reduced_license_footprint/admincenter_users_admins_reduced_license_footprint.metadata.json +++ b/prowler/providers/m365/services/admincenter/admincenter_users_admins_reduced_license_footprint/admincenter_users_admins_reduced_license_footprint.metadata.json @@ -1,5 +1,5 @@ { - "Provider": "microsoft365", + "Provider": "m365", "CheckID": "admincenter_users_admins_reduced_license_footprint", "CheckTitle": "Ensure administrative accounts use licenses with a reduced application footprint", "CheckType": [], @@ -23,7 +23,9 @@ "Url": "https://learn.microsoft.com/en-us/microsoft-365/admin/add-users/add-users?view=o365-worldwide" } }, - "Categories": [], + "Categories": [ + "e3" + ], "DependsOn": [], "RelatedTo": [], "Notes": "" diff --git a/prowler/providers/microsoft365/services/admincenter/admincenter_users_admins_reduced_license_footprint/admincenter_users_admins_reduced_license_footprint.py b/prowler/providers/m365/services/admincenter/admincenter_users_admins_reduced_license_footprint/admincenter_users_admins_reduced_license_footprint.py similarity index 86% rename from prowler/providers/microsoft365/services/admincenter/admincenter_users_admins_reduced_license_footprint/admincenter_users_admins_reduced_license_footprint.py rename to prowler/providers/m365/services/admincenter/admincenter_users_admins_reduced_license_footprint/admincenter_users_admins_reduced_license_footprint.py index 9d57e3cbc2..7497feb305 100644 --- a/prowler/providers/microsoft365/services/admincenter/admincenter_users_admins_reduced_license_footprint/admincenter_users_admins_reduced_license_footprint.py +++ b/prowler/providers/m365/services/admincenter/admincenter_users_admins_reduced_license_footprint/admincenter_users_admins_reduced_license_footprint.py @@ -1,7 +1,7 @@ from typing import List -from prowler.lib.check.models import Check, CheckReportMicrosoft365 -from prowler.providers.microsoft365.services.admincenter.admincenter_client import ( +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.admincenter.admincenter_client import ( admincenter_client, ) @@ -17,7 +17,7 @@ class admincenter_users_admins_reduced_license_footprint(Check): metadata: Metadata associated with the check (inherited from Check). """ - def execute(self) -> List[CheckReportMicrosoft365]: + def execute(self) -> List[CheckReportM365]: """Execute the check for users with administrative roles and their licenses. This method iterates over all users and checks if those with administrative roles @@ -25,7 +25,7 @@ class admincenter_users_admins_reduced_license_footprint(Check): the check passes; otherwise, it fails. Returns: - List[CheckReportMicrosoft365]: A list containing the result of the check for each user. + List[CheckReportM365]: A list containing the result of the check for each user. """ findings = [] allowed_licenses = ["AAD_PREMIUM", "AAD_PREMIUM_P2"] @@ -39,7 +39,7 @@ class admincenter_users_admins_reduced_license_footprint(Check): ) if admin_roles: - report = CheckReportMicrosoft365( + report = CheckReportM365( metadata=self.metadata(), resource=user, resource_name=user.name, diff --git a/prowler/providers/m365/services/admincenter/admincenter_users_between_two_and_four_global_admins/__init__.py b/prowler/providers/m365/services/admincenter/admincenter_users_between_two_and_four_global_admins/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/microsoft365/services/admincenter/admincenter_users_between_two_and_four_global_admins/admincenter_users_between_two_and_four_global_admins.metadata.json b/prowler/providers/m365/services/admincenter/admincenter_users_between_two_and_four_global_admins/admincenter_users_between_two_and_four_global_admins.metadata.json similarity index 97% rename from prowler/providers/microsoft365/services/admincenter/admincenter_users_between_two_and_four_global_admins/admincenter_users_between_two_and_four_global_admins.metadata.json rename to prowler/providers/m365/services/admincenter/admincenter_users_between_two_and_four_global_admins/admincenter_users_between_two_and_four_global_admins.metadata.json index 2ffc185f91..52dd36ec83 100644 --- a/prowler/providers/microsoft365/services/admincenter/admincenter_users_between_two_and_four_global_admins/admincenter_users_between_two_and_four_global_admins.metadata.json +++ b/prowler/providers/m365/services/admincenter/admincenter_users_between_two_and_four_global_admins/admincenter_users_between_two_and_four_global_admins.metadata.json @@ -1,5 +1,5 @@ { - "Provider": "microsoft365", + "Provider": "m365", "CheckID": "admincenter_users_between_two_and_four_global_admins", "CheckTitle": "Ensure that between two and four global admins are designated", "CheckType": [], @@ -23,7 +23,9 @@ "Url": "https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/manage-roles-portal" } }, - "Categories": [], + "Categories": [ + "e3" + ], "DependsOn": [], "RelatedTo": [], "Notes": "" diff --git a/prowler/providers/microsoft365/services/admincenter/admincenter_users_between_two_and_four_global_admins/admincenter_users_between_two_and_four_global_admins.py b/prowler/providers/m365/services/admincenter/admincenter_users_between_two_and_four_global_admins/admincenter_users_between_two_and_four_global_admins.py similarity index 83% rename from prowler/providers/microsoft365/services/admincenter/admincenter_users_between_two_and_four_global_admins/admincenter_users_between_two_and_four_global_admins.py rename to prowler/providers/m365/services/admincenter/admincenter_users_between_two_and_four_global_admins/admincenter_users_between_two_and_four_global_admins.py index 0abebdce31..d584bc8a32 100644 --- a/prowler/providers/microsoft365/services/admincenter/admincenter_users_between_two_and_four_global_admins/admincenter_users_between_two_and_four_global_admins.py +++ b/prowler/providers/m365/services/admincenter/admincenter_users_between_two_and_four_global_admins/admincenter_users_between_two_and_four_global_admins.py @@ -1,7 +1,7 @@ from typing import List -from prowler.lib.check.models import Check, CheckReportMicrosoft365 -from prowler.providers.microsoft365.services.admincenter.admincenter_client import ( +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.admincenter.admincenter_client import ( admincenter_client, ) @@ -16,21 +16,21 @@ class admincenter_users_between_two_and_four_global_admins(Check): metadata: Metadata associated with the check (inherited from Check). """ - def execute(self) -> List[CheckReportMicrosoft365]: + def execute(self) -> List[CheckReportM365]: """Execute the check for the number of Global Administrators. This method checks if the number of users with the 'Global Administrator' role is between two and four. If the condition is met, the check passes; otherwise, it fails. Returns: - List[CheckReportMicrosoft365]: A list containing the result of the check for the Global Administrators. + List[CheckReportM365]: A list containing the result of the check for the Global Administrators. """ findings = [] directory_roles = admincenter_client.directory_roles global_admin_role = directory_roles.get("Global Administrator", {}) if global_admin_role: - report = CheckReportMicrosoft365( + report = CheckReportM365( metadata=self.metadata(), resource=global_admin_role, resource_name=global_admin_role.name, diff --git a/prowler/providers/m365/services/defender/__init__.py b/prowler/providers/m365/services/defender/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/defender/defender_antiphishing_policy_configured/__init__.py b/prowler/providers/m365/services/defender/defender_antiphishing_policy_configured/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/defender/defender_antiphishing_policy_configured/defender_antiphishing_policy_configured.metadata.json b/prowler/providers/m365/services/defender/defender_antiphishing_policy_configured/defender_antiphishing_policy_configured.metadata.json new file mode 100644 index 0000000000..9f36b64bd9 --- /dev/null +++ b/prowler/providers/m365/services/defender/defender_antiphishing_policy_configured/defender_antiphishing_policy_configured.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "defender_antiphishing_policy_configured", + "CheckTitle": "Ensure anti-phishing policies are properly configured and active.", + "CheckType": [], + "ServiceName": "defender", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "low", + "ResourceType": "Defender Anti-Phishing Policy", + "Description": "Ensure that anti-phishing policies are created and configured for specific users, groups, or domains, taking precedence over the default policy. This check verifies the existence of rules within policies and validates specific policy settings such as spoof intelligence, DMARC actions, safety tips, and unauthenticated sender actions.", + "Risk": "Without anti-phishing policies, organizations may rely solely on default settings, which might not adequately protect against phishing attacks targeted at specific users, groups, or domains. This increases the risk of successful phishing attempts and potential data breaches.", + "RelatedUrl": "https://learn.microsoft.com/en-us/microsoft-365/security/office-365-security/set-up-anti-phishing-policies?view=o365-worldwide", + "Remediation": { + "Code": { + "CLI": "$params = @{Name='';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; New-AntiPhishRule -Name $params.Name -AntiPhishPolicy $params.Name -RecipientDomainIs (Get-AcceptedDomain).Name -Priority 0", + "NativeIaC": "", + "Other": "1. Navigate to Microsoft 365 Defender https://security.microsoft.com. 2. Click to expand Email & collaboration and select Policies & rules. 3. On the Policies & rules page select Threat policies. 4. Under Policies, select Anti-phishing 5. Ensure policies have rules with the state set to 'on' and validate settings: spoof intelligence enabled, spoof intelligence action set to 'Quarantine', DMARC reject and quarantine actions, safety tips enabled, unauthenticated sender action enabled, show tag enabled, and honor DMARC policy enabled. If not, modify them to be as recommended.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Create and configure anti-phishing policies for specific users, groups, or domains to enhance protection against phishing attacks.", + "Url": "https://learn.microsoft.com/en-us/microsoft-365/security/office-365-security/set-up-anti-phishing-policies?view=o365-worldwide" + } + }, + "Categories": [ + "e5" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/defender/defender_antiphishing_policy_configured/defender_antiphishing_policy_configured.py b/prowler/providers/m365/services/defender/defender_antiphishing_policy_configured/defender_antiphishing_policy_configured.py new file mode 100644 index 0000000000..61727b9d3c --- /dev/null +++ b/prowler/providers/m365/services/defender/defender_antiphishing_policy_configured/defender_antiphishing_policy_configured.py @@ -0,0 +1,177 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.defender.defender_client import defender_client + + +class defender_antiphishing_policy_configured(Check): + """ + Check if an anti-phishing policy is established and properly configured in the Defender service. + + Attributes: + metadata: Metadata associated with the check (inherited from Check). + """ + + def execute(self) -> List[CheckReportM365]: + """ + Execute the check to verify if an anti-phishing policy is established and properly configured. + + This method checks the Defender anti-phishing policies to ensure they are configured + according to best practices. + + Returns: + List[CheckReportM365]: A list of reports containing the result of the check. + """ + findings = [] + + if defender_client.antiphishing_policies: + # Only Default Defender Anti-Phishing Policy exists since there are only anti phishing rules when there are custom policies + if not defender_client.antiphishing_rules: + # Get the only policy in the dictionary since there is only the default policy + policy = next(iter(defender_client.antiphishing_policies.values())) + + report = CheckReportM365( + metadata=self.metadata(), + resource=policy, + resource_name=policy.name, + resource_id=policy.name, + ) + + if self._is_policy_properly_configured(policy): + # Case 1: Default policy exists and is properly configured + report.status = "PASS" + report.status_extended = f"{policy.name} is the only policy and it's properly configured in the default Defender Anti-Phishing Policy." + else: + # Case 5: Default policy exists but is not properly configured + report.status = "FAIL" + report.status_extended = f"{policy.name} is the only policy and it's not properly configured in the default Defender Anti-Phishing Policy." + findings.append(report) + + # Multiple Defender Anti-Phishing Policies + else: + default_policy_well_configured = False + + for ( + policy_name, + policy, + ) in defender_client.antiphishing_policies.items(): + report = CheckReportM365( + metadata=self.metadata(), + resource=policy, + resource_name=policy_name, + resource_id=policy_name, + ) + if policy.default: + if not self._is_policy_properly_configured(policy): + # Case 4: Default policy is not properly configured and there are other policies + report.status = "FAIL" + report.status_extended = f"{policy_name} is not properly configured in the default Defender Anti-Phishing Policy, but could be overridden by another well-configured Custom Policy." + findings.append(report) + else: + # Case 2: Default policy is properly configured and there are other policies + report.status = "PASS" + report.status_extended = f"{policy_name} is properly configured in the default Defender Anti-Phishing Policy, but could be overridden by another bad-configured Custom Policy." + default_policy_well_configured = True + findings.append(report) + else: + if not self._is_policy_properly_configured(policy): + included_resources = [] + + if defender_client.antiphishing_rules[policy.name].users: + included_resources.append( + f"users: {', '.join(defender_client.antiphishing_rules[policy.name].users)}" + ) + if defender_client.antiphishing_rules[policy.name].groups: + included_resources.append( + f"groups: {', '.join(defender_client.antiphishing_rules[policy.name].groups)}" + ) + if defender_client.antiphishing_rules[policy.name].domains: + included_resources.append( + f"domains: {', '.join(defender_client.antiphishing_rules[policy.name].domains)}" + ) + + included_resources_str = "; ".join(included_resources) + + # Case 3: Default policy is properly configured but other custom policies are not + if default_policy_well_configured: + report.status = "FAIL" + report.status_extended = ( + f"Custom Anti-phishing policy {policy_name} is not properly configured and includes {included_resources_str}, " + f"with priority {defender_client.antiphishing_rules[policy.name].priority} (0 is the highest). " + "However, the default policy is properly configured, so entities not included by this custom policy could be correctly protected." + ) + findings.append(report) + # Case 5: Default policy is not properly configured and other custom policies are not + else: + report.status = "FAIL" + report.status_extended = ( + f"Custom Anti-phishing policy {policy_name} is not properly configured and includes {included_resources_str}, " + f"with priority {defender_client.antiphishing_rules[policy.name].priority} (0 is the highest). " + "Also, the default policy is not properly configured, so entities not included by this custom policy could not be correctly protected." + ) + findings.append(report) + else: + included_resources = [] + + if defender_client.antiphishing_rules[policy.name].users: + included_resources.append( + f"users: {', '.join(defender_client.antiphishing_rules[policy.name].users)}" + ) + if defender_client.antiphishing_rules[policy.name].groups: + included_resources.append( + f"groups: {', '.join(defender_client.antiphishing_rules[policy.name].groups)}" + ) + if defender_client.antiphishing_rules[policy.name].domains: + included_resources.append( + f"domains: {', '.join(defender_client.antiphishing_rules[policy.name].domains)}" + ) + + included_resources_str = "; ".join(included_resources) + + # Case 2: Default policy is properly configured and other custom policies are too + if default_policy_well_configured: + report.status = "PASS" + report.status_extended = ( + f"Custom Anti-phishing policy {policy_name} is properly configured and includes {included_resources_str}, " + f"with priority {defender_client.antiphishing_rules[policy.name].priority} (0 is the highest). " + "Also, the default policy is properly configured, so entities not included by this custom policy could still be correctly protected." + ) + findings.append(report) + + # Case 6: Default policy is not properly configured but other custom policies are + else: + report.status = "PASS" + report.status_extended = ( + f"Custom Anti-phishing policy {policy_name} is properly configured and includes {included_resources_str}, " + f"with priority {defender_client.antiphishing_rules[policy.name].priority} (0 is the highest). " + "However, the default policy is not properly configured, so entities not included by this custom policy could not be correctly protected." + ) + findings.append(report) + + return findings + + def _is_policy_properly_configured(self, policy) -> bool: + """ + Check if a policy is properly configured according to best practices. + + Args: + policy: The anti-phishing policy to check. + + Returns: + bool: True if the policy is properly configured, False otherwise. + """ + return ( + ( + policy.default + or defender_client.antiphishing_rules[policy.name].state.lower() + == "enabled" + ) + and policy.spoof_intelligence + and policy.spoof_intelligence_action.lower() == "quarantine" + and policy.dmarc_reject_action.lower() == "quarantine" + and policy.dmarc_quarantine_action.lower() == "quarantine" + and policy.safety_tips + and policy.unauthenticated_sender_action + and policy.show_tag + and policy.honor_dmarc_policy + ) diff --git a/prowler/providers/m365/services/defender/defender_antispam_connection_filter_policy_empty_ip_allowlist/__init__.py b/prowler/providers/m365/services/defender/defender_antispam_connection_filter_policy_empty_ip_allowlist/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/defender/defender_antispam_connection_filter_policy_empty_ip_allowlist/defender_antispam_connection_filter_policy_empty_ip_allowlist.metadata.json b/prowler/providers/m365/services/defender/defender_antispam_connection_filter_policy_empty_ip_allowlist/defender_antispam_connection_filter_policy_empty_ip_allowlist.metadata.json new file mode 100644 index 0000000000..21230498e1 --- /dev/null +++ b/prowler/providers/m365/services/defender/defender_antispam_connection_filter_policy_empty_ip_allowlist/defender_antispam_connection_filter_policy_empty_ip_allowlist.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "defender_antispam_connection_filter_policy_empty_ip_allowlist", + "CheckTitle": "Ensure the Anti-Spam Connection Filter Policy IP Allowlist is empty or undefined.", + "CheckType": [], + "ServiceName": "defender", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "medium", + "ResourceType": "Defender Anti-Spam Policy", + "Description": "This check focuses on Microsoft 365 organizations with Exchange Online mailboxes or standalone Exchange Online Protection (EOP) organizations. It ensures that the connection filter policy's IP Allowlist is empty or undefined to prevent bypassing spam filtering and sender authentication checks, which could lead to successful delivery of malicious emails.", + "Risk": "Using the IP Allowlist without additional verification like mail flow rules poses a risk, as emails from these sources skip essential security checks (SPF, DKIM, DMARC). This could allow attackers to deliver harmful emails directly to the Inbox.", + "RelatedUrl": "", + "Remediation": { + "Code": { + "CLI": "Set-HostedConnectionFilterPolicy -Identity Default -IPAllowList @{}", + "NativeIaC": "", + "Other": "1. Navigate to Microsoft 365 Defender https://security.microsoft.com. 2. Click to expand Email & collaboration and select Policies & rules. 3. On the Policies & rules page select Threat policies. 4. Under Policies, select Anti-spam and click on the Connection filter policy (Default). 5. Remove IP entries from the allow list. 6. Click Save.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Ensure that the IP Allowlist in your connection filter policy is empty or undefined to prevent bypassing essential security checks.", + "Url": "https://learn.microsoft.com/en-us/powershell/module/exchange/set-hostedconnectionfilterpolicy?view=exchange-ps" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/defender/defender_antispam_connection_filter_policy_empty_ip_allowlist/defender_antispam_connection_filter_policy_empty_ip_allowlist.py b/prowler/providers/m365/services/defender/defender_antispam_connection_filter_policy_empty_ip_allowlist/defender_antispam_connection_filter_policy_empty_ip_allowlist.py new file mode 100644 index 0000000000..00ace7b17a --- /dev/null +++ b/prowler/providers/m365/services/defender/defender_antispam_connection_filter_policy_empty_ip_allowlist/defender_antispam_connection_filter_policy_empty_ip_allowlist.py @@ -0,0 +1,43 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.defender.defender_client import defender_client + + +class defender_antispam_connection_filter_policy_empty_ip_allowlist(Check): + """ + Check if the IP Allowlist is not used in the Antispam Connection Filter Policy. + + Attributes: + metadata: Metadata associated with the check (inherited from Check). + """ + + def execute(self) -> List[CheckReportM365]: + """ + Execute the check to verify if the IP Allowlist is not used. + + This method checks the Antispam Connection Filter Policy to determine if the + IP Allowlist is empty or undefined. + + Returns: + List[CheckReportM365]: A list of reports containing the result of the check. + """ + findings = [] + policy = defender_client.connection_filter_policy + if policy: + report = CheckReportM365( + metadata=self.metadata(), + resource=policy, + resource_name="Defender Antispam Connection Filter Policy", + resource_id=policy.identity, + ) + report.status = "PASS" + report.status_extended = f"IP Allowlist is not used in the Antispam Connection Filter Policy {policy.identity}." + + if policy.ip_allow_list: + report.status = "FAIL" + report.status_extended = f"IP Allowlist is used in the Antispam Connection Filter Policy {policy.identity} with IPs: {policy.ip_allow_list}." + + findings.append(report) + + return findings diff --git a/prowler/providers/m365/services/defender/defender_antispam_connection_filter_policy_safe_list_off/__init__.py b/prowler/providers/m365/services/defender/defender_antispam_connection_filter_policy_safe_list_off/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/defender/defender_antispam_connection_filter_policy_safe_list_off/defender_antispam_connection_filter_policy_safe_list_off.metadata.json b/prowler/providers/m365/services/defender/defender_antispam_connection_filter_policy_safe_list_off/defender_antispam_connection_filter_policy_safe_list_off.metadata.json new file mode 100644 index 0000000000..75c3b20ddb --- /dev/null +++ b/prowler/providers/m365/services/defender/defender_antispam_connection_filter_policy_safe_list_off/defender_antispam_connection_filter_policy_safe_list_off.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "defender_antispam_connection_filter_policy_safe_list_off", + "CheckTitle": "Ensure the default connection filter policy has the SafeList setting disabled", + "CheckType": [], + "ServiceName": "defender", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "medium", + "ResourceType": "Defender Anti-Spam Policy", + "Description": "This check ensures that the EnableSafeList setting in the default connection filter policy is set to False. The safe list, managed dynamically by Microsoft, allows emails from listed IPs to bypass spam filtering and sender authentication checks, posing a security risk.", + "Risk": "If the safe list is enabled, emails from IPs on this list can bypass essential security checks (SPF, DKIM, DMARC), potentially allowing malicious emails to be delivered directly to users' inboxes.", + "RelatedUrl": "https://learn.microsoft.com/en-us/defender-office-365/connection-filter-policies-configure", + "Remediation": { + "Code": { + "CLI": "Set-HostedConnectionFilterPolicy -Identity Default -EnableSafeList $false", + "NativeIaC": "", + "Other": "1. Navigate to Microsoft 365 Defender https://security.microsoft.com. 2. Click to expand Email & collaboration and select Policies & rules. 3. On the Policies & rules page select Threat policies. 4. Under Policies, select Anti-spam and click on the Connection filter policy (Default). 5. Disable the safe list option. 6. Click Save.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Ensure that the EnableSafeList setting in your connection filter policy is set to False to prevent bypassing essential security checks.", + "Url": "https://learn.microsoft.com/en-us/defender-office-365/create-safe-sender-lists-in-office-365#use-the-ip-allow-list" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/defender/defender_antispam_connection_filter_policy_safe_list_off/defender_antispam_connection_filter_policy_safe_list_off.py b/prowler/providers/m365/services/defender/defender_antispam_connection_filter_policy_safe_list_off/defender_antispam_connection_filter_policy_safe_list_off.py new file mode 100644 index 0000000000..7989cefd8c --- /dev/null +++ b/prowler/providers/m365/services/defender/defender_antispam_connection_filter_policy_safe_list_off/defender_antispam_connection_filter_policy_safe_list_off.py @@ -0,0 +1,43 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.defender.defender_client import defender_client + + +class defender_antispam_connection_filter_policy_safe_list_off(Check): + """ + Check if the Safe List is off in the Antispam Connection Filter Policy. + + Attributes: + metadata: Metadata associated with the check (inherited from Check). + """ + + def execute(self) -> List[CheckReportM365]: + """ + Execute the check to verify if the Safe List is off. + + This method checks the Antispam Connection Filter Policy to determine if the + Safe List is disabled. + + Returns: + List[CheckReportM365]: A list of reports containing the result of the check. + """ + findings = [] + policy = defender_client.connection_filter_policy + if policy: + report = CheckReportM365( + metadata=self.metadata(), + resource=policy, + resource_name="Defender Antispam Connection Filter Policy", + resource_id=policy.identity, + ) + report.status = "PASS" + report.status_extended = f"Safe List is disabled in the Antispam Connection Filter Policy {policy.identity}." + + if policy.enable_safe_list: + report.status = "FAIL" + report.status_extended = f"Safe List is not disabled in the Antispam Connection Filter Policy {policy.identity}." + + findings.append(report) + + return findings diff --git a/prowler/providers/m365/services/defender/defender_antispam_outbound_policy_configured/__init__.py b/prowler/providers/m365/services/defender/defender_antispam_outbound_policy_configured/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/defender/defender_antispam_outbound_policy_configured/defender_antispam_outbound_policy_configured.metadata.json b/prowler/providers/m365/services/defender/defender_antispam_outbound_policy_configured/defender_antispam_outbound_policy_configured.metadata.json new file mode 100644 index 0000000000..ea80ba2681 --- /dev/null +++ b/prowler/providers/m365/services/defender/defender_antispam_outbound_policy_configured/defender_antispam_outbound_policy_configured.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "defender_antispam_outbound_policy_configured", + "CheckTitle": "Ensure Defender Outbound Spam Policies are set to notify administrators.", + "CheckType": [], + "ServiceName": "defender", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "low", + "ResourceType": "Defender Anti-Spam Outbound Policy", + "Description": "Ensure that outbound anti-spam policies are configured to notify administrators and copy suspicious outbound messages to designated recipients when a sender is blocked for sending spam emails.", + "Risk": "Without outbound spam notifications and message copies, compromised accounts may go undetected, increasing the risk of reputation damage or data leakage through unauthorized email activity.", + "RelatedUrl": "https://learn.microsoft.com/en-us/defender-office-365/outbound-spam-protection-about", + "Remediation": { + "Code": { + "CLI": "$BccEmailAddress = @(\"\")\n$NotifyEmailAddress = @(\"\")\nSet-HostedOutboundSpamFilterPolicy -Identity Default -BccSuspiciousOutboundAdditionalRecipients $BccEmailAddress -BccSuspiciousOutboundMail $true -NotifyOutboundSpam $true -NotifyOutboundSpamRecipients $NotifyEmailAddress", + "NativeIaC": "", + "Other": "1. Navigate to Microsoft 365 Defender https://security.microsoft.com. 2. Click to expand Email & collaboration and 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' and enter the email addresses. 7. Check 'Notify these users and groups if a sender is blocked due to sending outbound spam' and enter the desired email addresses. 8. Click Save.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Configure Defender outbound spam filter policies to notify administrators and copy suspicious outbound messages when users are blocked for sending spam.", + "Url": "https://learn.microsoft.com/en-us/defender-office-365/outbound-spam-protection-about" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "Ensure settings are applied to the highest priority policy if custom policies exist. Default values do not notify or copy outbound spam messages by default." +} diff --git a/prowler/providers/m365/services/defender/defender_antispam_outbound_policy_configured/defender_antispam_outbound_policy_configured.py b/prowler/providers/m365/services/defender/defender_antispam_outbound_policy_configured/defender_antispam_outbound_policy_configured.py new file mode 100644 index 0000000000..cd1eafdabf --- /dev/null +++ b/prowler/providers/m365/services/defender/defender_antispam_outbound_policy_configured/defender_antispam_outbound_policy_configured.py @@ -0,0 +1,172 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.defender.defender_client import defender_client + + +class defender_antispam_outbound_policy_configured(Check): + """ + Check if the outbound spam policy is established and properly configured in the Defender service. + + Attributes: + metadata: Metadata associated with the check (inherited from Check). + """ + + def execute(self) -> List[CheckReportM365]: + """ + Execute the check to verify if an outbound spam policy is established and properly configured. + + This method checks the Defender outbound spam policies to ensure they are configured + according to best practices. + + Returns: + List[CheckReportM365]: A list of reports containing the result of the check. + """ + findings = [] + + if defender_client.outbound_spam_policies: + # Only Default Defender Outbound Spam Policy + if not defender_client.outbound_spam_rules: + # Get the only policy in the dictionary + policy = next(iter(defender_client.outbound_spam_policies.values())) + + report = CheckReportM365( + metadata=self.metadata(), + resource=policy, + resource_name=policy.name, + resource_id=policy.name, + ) + + if self._is_policy_properly_configured(policy): + # Case 1: Default policy exists and is properly configured + report.status = "PASS" + report.status_extended = f"{policy.name} is the only policy and it's properly configured in the default Defender Outbound Spam Policy." + else: + # Case 5: Default policy exists but is not properly configured + report.status = "FAIL" + report.status_extended = f"{policy.name} is the only policy and it's not properly configured in the default Defender Outbound Spam Policy." + findings.append(report) + + # Multiple Defender Outbound Spam Policies + else: + default_policy_well_configured = False + + for ( + policy_name, + policy, + ) in defender_client.outbound_spam_policies.items(): + report = CheckReportM365( + metadata=self.metadata(), + resource=policy, + resource_name=policy_name, + resource_id=policy_name, + ) + if policy.default: + if not self._is_policy_properly_configured(policy): + # Case 4: Default policy is not properly configured and there are other policies + report.status = "FAIL" + report.status_extended = f"{policy_name} is not properly configured in the default Defender Outbound Spam Policy, but could be overridden by another well-configured Custom Policy." + findings.append(report) + else: + # Case 2: Default policy is properly configured and there are other policies + report.status = "PASS" + report.status_extended = f"{policy_name} is properly configured in the default Defender Outbound Spam Policy, but could be overridden by another bad-configured Custom Policy." + default_policy_well_configured = True + findings.append(report) + else: + if not self._is_policy_properly_configured(policy): + included_resources = [] + + if defender_client.outbound_spam_rules[policy.name].users: + included_resources.append( + f"users: {', '.join(defender_client.outbound_spam_rules[policy.name].users)}" + ) + if defender_client.outbound_spam_rules[policy.name].groups: + included_resources.append( + f"groups: {', '.join(defender_client.outbound_spam_rules[policy.name].groups)}" + ) + if defender_client.outbound_spam_rules[policy.name].domains: + included_resources.append( + f"domains: {', '.join(defender_client.outbound_spam_rules[policy.name].domains)}" + ) + + included_resources_str = "; ".join(included_resources) + + # Case 3: Default policy is properly configured but other custom policies are not + if default_policy_well_configured: + report.status = "FAIL" + report.status_extended = ( + f"Custom Outbound Spam policy {policy_name} is not properly configured and includes {included_resources_str}, " + f"with priority {defender_client.outbound_spam_rules[policy.name].priority} (0 is the highest). " + "However, the default policy is properly configured, so entities not included by this custom policy could be correctly protected." + ) + findings.append(report) + # Case 5: Default policy is not properly configured and other custom policies are not + else: + report.status = "FAIL" + report.status_extended = ( + f"Custom Outbound Spam policy {policy_name} is not properly configured and includes {included_resources_str}, " + f"with priority {defender_client.outbound_spam_rules[policy.name].priority} (0 is the highest). " + "Also, the default policy is not properly configured, so entities not included by this custom policy could not be correctly protected." + ) + findings.append(report) + else: + included_resources = [] + + if defender_client.outbound_spam_rules[policy.name].users: + included_resources.append( + f"users: {', '.join(defender_client.outbound_spam_rules[policy.name].users)}" + ) + if defender_client.outbound_spam_rules[policy.name].groups: + included_resources.append( + f"groups: {', '.join(defender_client.outbound_spam_rules[policy.name].groups)}" + ) + if defender_client.outbound_spam_rules[policy.name].domains: + included_resources.append( + f"domains: {', '.join(defender_client.outbound_spam_rules[policy.name].domains)}" + ) + + included_resources_str = "; ".join(included_resources) + + # Case 2: Default policy is properly configured and other custom policies are too + if default_policy_well_configured: + report.status = "PASS" + report.status_extended = ( + f"Custom Outbound Spam policy {policy_name} is properly configured and includes {included_resources_str}, " + f"with priority {defender_client.outbound_spam_rules[policy.name].priority} (0 is the highest). " + "Also, the default policy is properly configured, so entities not included by this custom policy could still be correctly protected." + ) + findings.append(report) + # Case 6: Default policy is not properly configured but other custom policies are + else: + report.status = "PASS" + report.status_extended = ( + f"Custom Outbound Spam policy {policy_name} is properly configured and includes {included_resources_str}, " + f"with priority {defender_client.outbound_spam_rules[policy.name].priority} (0 is the highest). " + "However, the default policy is not properly configured, so entities not included by this custom policy could not be correctly protected." + ) + findings.append(report) + + return findings + + def _is_policy_properly_configured(self, policy) -> bool: + """ + Check if a policy is properly configured according to best practices. + + Args: + policy: The outbound spam policy to check. + + Returns: + bool: True if the policy is properly configured, False otherwise. + """ + return ( + ( + policy.default + or defender_client.outbound_spam_rules[policy.name].state.lower() + == "enabled" + ) + and policy.notify_limit_exceeded + and policy.notify_sender_blocked + and policy.notify_limit_exceeded_addresses + and policy.notify_sender_blocked_addresses + ) diff --git a/prowler/providers/m365/services/defender/defender_antispam_outbound_policy_forwarding_disabled/__init__.py b/prowler/providers/m365/services/defender/defender_antispam_outbound_policy_forwarding_disabled/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/defender/defender_antispam_outbound_policy_forwarding_disabled/defender_antispam_outbound_policy_forwarding_disabled.metadata.json b/prowler/providers/m365/services/defender/defender_antispam_outbound_policy_forwarding_disabled/defender_antispam_outbound_policy_forwarding_disabled.metadata.json new file mode 100644 index 0000000000..db659cad71 --- /dev/null +++ b/prowler/providers/m365/services/defender/defender_antispam_outbound_policy_forwarding_disabled/defender_antispam_outbound_policy_forwarding_disabled.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "defender_antispam_outbound_policy_forwarding_disabled", + "CheckTitle": "Ensure Defender Outbound Spam Policies are set to disable mail forwarding.", + "CheckType": [], + "ServiceName": "defender", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "high", + "ResourceType": "Defender Anti-Spam Outbound Policy", + "Description": "Ensure Defender Outbound Spam Policies are set to disable mail forwarding.", + "Risk": "Enabling email auto-forwarding can be exploited by attackers or malicious insiders to exfiltrate sensitive data outside the organization, often without detection.", + "RelatedUrl": "https://learn.microsoft.com/en-us/defender-office-365/outbound-spam-protection-about", + "Remediation": { + "Code": { + "CLI": "Set-HostedOutboundSpamFilterPolicy -Identity {policyName} -AutoForwardingMode Off", + "NativeIaC": "", + "Other": "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.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Block all forms of mail forwarding using Anti-spam outbound policies in Exchange Online. Apply exclusions only where justified by organizational policy.", + "Url": "https://learn.microsoft.com/en-us/defender-office-365/outbound-spam-protection-about" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "Ensure settings are applied to the highest priority policy if custom policies exist." +} diff --git a/prowler/providers/m365/services/defender/defender_antispam_outbound_policy_forwarding_disabled/defender_antispam_outbound_policy_forwarding_disabled.py b/prowler/providers/m365/services/defender/defender_antispam_outbound_policy_forwarding_disabled/defender_antispam_outbound_policy_forwarding_disabled.py new file mode 100644 index 0000000000..04f81f62b3 --- /dev/null +++ b/prowler/providers/m365/services/defender/defender_antispam_outbound_policy_forwarding_disabled/defender_antispam_outbound_policy_forwarding_disabled.py @@ -0,0 +1,169 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.defender.defender_client import defender_client + + +class defender_antispam_outbound_policy_forwarding_disabled(Check): + """ + Check if the Defender Outbound Spam Policies are configured to disable mail forwarding. + + Attributes: + metadata: Metadata associated with the check (inherited from Check). + """ + + def execute(self) -> List[CheckReportM365]: + """ + Execute the check to verify if the Defender Outbound Spam Policies disable mail forwarding. + + Returns: + List[CheckReportM365]: A list of reports containing the result of the check. + """ + findings = [] + + if defender_client.outbound_spam_policies: + # Only Default Defender Outbound Spam Policy exists + if not defender_client.outbound_spam_rules: + policy = next(iter(defender_client.outbound_spam_policies.values())) + + report = CheckReportM365( + metadata=self.metadata(), + resource=policy, + resource_name=policy.name, + resource_id=policy.name, + ) + + if self._is_forwarding_disabled(policy): + # Case 1: Default policy exists and has forwarding disabled + report.status = "PASS" + report.status_extended = f"{policy.name} is the only policy and mail forwarding is disabled." + else: + # Case 5: Default policy exists but allows forwarding + report.status = "FAIL" + report.status_extended = f"{policy.name} is the only policy and mail forwarding is allowed." + findings.append(report) + + # Multiple Defender Outbound Spam Policies exist + else: + default_policy_well_configured = False + + for ( + policy_name, + policy, + ) in defender_client.outbound_spam_policies.items(): + report = CheckReportM365( + metadata=self.metadata(), + resource=policy, + resource_name=policy_name, + resource_id=policy_name, + ) + + if policy.default: + if not self._is_forwarding_disabled(policy): + # Case 4: Default policy allows forwarding and there are other policies + report.status = "FAIL" + report.status_extended = ( + f"{policy_name} is the default policy and mail forwarding is allowed, " + "but it could be overridden by another well-configured Custom Policy." + ) + findings.append(report) + else: + # Case 2: Default policy disables forwarding and there are other policies + report.status = "PASS" + report.status_extended = ( + f"{policy_name} is the default policy and mail forwarding is disabled, " + "but it could be overridden by another misconfigured Custom Policy." + ) + default_policy_well_configured = True + findings.append(report) + else: + if not self._is_forwarding_disabled(policy): + included_resources = [] + + if defender_client.outbound_spam_rules[policy.name].users: + included_resources.append( + f"users: {', '.join(defender_client.outbound_spam_rules[policy.name].users)}" + ) + if defender_client.outbound_spam_rules[policy.name].groups: + included_resources.append( + f"groups: {', '.join(defender_client.outbound_spam_rules[policy.name].groups)}" + ) + if defender_client.outbound_spam_rules[policy.name].domains: + included_resources.append( + f"domains: {', '.join(defender_client.outbound_spam_rules[policy.name].domains)}" + ) + + included_resources_str = "; ".join(included_resources) + + if default_policy_well_configured: + # Case 3: Default policy disables forwarding but custom one doesn't + report.status = "FAIL" + report.status_extended = ( + f"Custom Outbound Spam policy {policy_name} allows mail forwarding and includes {included_resources_str}, " + f"with priority {defender_client.outbound_spam_rules[policy.name].priority} (0 is the highest). " + "However, the default policy disables mail forwarding, so entities not included by this custom policy could be correctly protected." + ) + findings.append(report) + else: + # Case 5: Neither default nor custom policies disable forwarding + report.status = "FAIL" + report.status_extended = ( + f"Custom Outbound Spam policy {policy_name} allows mail forwarding and includes {included_resources_str}, " + f"with priority {defender_client.outbound_spam_rules[policy.name].priority} (0 is the highest). " + "Also, the default policy allows mail forwarding, so entities not included by this custom policy could not be correctly protected." + ) + findings.append(report) + else: + included_resources = [] + + if defender_client.outbound_spam_rules[policy.name].users: + included_resources.append( + f"users: {', '.join(defender_client.outbound_spam_rules[policy.name].users)}" + ) + if defender_client.outbound_spam_rules[policy.name].groups: + included_resources.append( + f"groups: {', '.join(defender_client.outbound_spam_rules[policy.name].groups)}" + ) + if defender_client.outbound_spam_rules[policy.name].domains: + included_resources.append( + f"domains: {', '.join(defender_client.outbound_spam_rules[policy.name].domains)}" + ) + + included_resources_str = "; ".join(included_resources) + + if default_policy_well_configured: + # Case 2: Both default and custom policies disable forwarding + report.status = "PASS" + report.status_extended = ( + f"Custom Outbound Spam policy {policy_name} disables mail forwarding and includes {included_resources_str}, " + f"with priority {defender_client.outbound_spam_rules[policy.name].priority} (0 is the highest). " + "Also, the default policy disables mail forwarding, so entities not included by this custom policy could still be correctly protected." + ) + findings.append(report) + else: + # Case 6: Default policy allows forwarding, custom policy disables it + report.status = "PASS" + report.status_extended = ( + f"Custom Outbound Spam policy {policy_name} disables mail forwarding and includes {included_resources_str}, " + f"with priority {defender_client.outbound_spam_rules[policy.name].priority} (0 is the highest). " + "However, the default policy allows mail forwarding, so entities not included by this custom policy could not be correctly protected." + ) + findings.append(report) + + return findings + + def _is_forwarding_disabled(self, policy) -> bool: + """ + Check if mail forwarding is disabled in the policy. + + Args: + policy: The outbound spam policy to check. + + Returns: + bool: True if mail forwarding is disabled, False otherwise. + """ + return ( + policy.default + or defender_client.outbound_spam_rules[policy.name].state.lower() + == "enabled" + ) and not policy.auto_forwarding_mode diff --git a/prowler/providers/m365/services/defender/defender_antispam_policy_inbound_no_allowed_domains/__init__.py b/prowler/providers/m365/services/defender/defender_antispam_policy_inbound_no_allowed_domains/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/defender/defender_antispam_policy_inbound_no_allowed_domains/defender_antispam_policy_inbound_no_allowed_domains.metadata.json b/prowler/providers/m365/services/defender/defender_antispam_policy_inbound_no_allowed_domains/defender_antispam_policy_inbound_no_allowed_domains.metadata.json new file mode 100644 index 0000000000..49d399cd01 --- /dev/null +++ b/prowler/providers/m365/services/defender/defender_antispam_policy_inbound_no_allowed_domains/defender_antispam_policy_inbound_no_allowed_domains.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "defender_antispam_policy_inbound_no_allowed_domains", + "CheckTitle": "Ensure inbound anti-spam policies do not contain allowed domains", + "CheckType": [], + "ServiceName": "defender", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "low", + "ResourceType": "Defender Anti-Spam Policy", + "Description": "Ensure that inbound anti-spam policies do not have any domains listed in the AllowedSenderDomains. Messages from these domains bypass most email protections, increasing the risk of successful phishing attacks.", + "Risk": "Having domains in the AllowedSenderDomains list allows emails from these domains to bypass essential security checks, increasing the risk of phishing attacks and other malicious activities.", + "RelatedUrl": "https://learn.microsoft.com/en-us/defender-office-365/anti-spam-protection-about#allow-and-block-lists-in-anti-spam-policies", + "Remediation": { + "Code": { + "CLI": "Set-HostedContentFilterPolicy -Identity -AllowedSenderDomains @{}", + "NativeIaC": "", + "Other": "1. Navigate to Microsoft 365 Defender (https://security.microsoft.com). 2. Click to expand Email & collaboration and 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.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Ensure that the AllowedSenderDomains list in your inbound anti-spam policies is empty to prevent bypassing essential security checks.", + "Url": "https://learn.microsoft.com/en-us/microsoft-365/security/office-365-security/configure-the-allowed-sender-domains?view=o365-worldwide" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/defender/defender_antispam_policy_inbound_no_allowed_domains/defender_antispam_policy_inbound_no_allowed_domains.py b/prowler/providers/m365/services/defender/defender_antispam_policy_inbound_no_allowed_domains/defender_antispam_policy_inbound_no_allowed_domains.py new file mode 100644 index 0000000000..67b6643e9e --- /dev/null +++ b/prowler/providers/m365/services/defender/defender_antispam_policy_inbound_no_allowed_domains/defender_antispam_policy_inbound_no_allowed_domains.py @@ -0,0 +1,185 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.defender.defender_client import defender_client + + +class defender_antispam_policy_inbound_no_allowed_domains(Check): + """ + Check if the inbound anti-spam policies do not contain allowed domains in Microsoft 365 Defender. + + Attributes: + metadata: Metadata associated with the check (inherited from Check). + """ + + def execute(self) -> List[CheckReportM365]: + """ + Execute the check to verify if inbound anti-spam policies do not contain allowed domains. + + This method checks each inbound anti-spam policy to determine if the AllowedSenderDomains + list is empty or undefined. + + Returns: + List[CheckReportM365]: A list of reports containing the result of the check. + """ + findings = [] + + if defender_client.inbound_spam_policies: + # Only Default Defender Inbound Spam Policy exists + if not defender_client.inbound_spam_rules: + policy = defender_client.inbound_spam_policies[0] + + report = CheckReportM365( + metadata=self.metadata(), + resource=policy, + resource_name=policy.identity, + resource_id=policy.identity, + ) + + if self._has_no_allowed_domains(policy): + # Case 1: Default policy exists and has no allowed domains + report.status = "PASS" + report.status_extended = f"{policy.identity} is the only policy and it does not contain allowed domains." + else: + # Case 5: Default policy exists but contains allowed domains + report.status = "FAIL" + report.status_extended = f"{policy.identity} is the only policy and it contains allowed domains: {', '.join(policy.allowed_sender_domains)}." + findings.append(report) + + # Multiple Defender Inbound Spam Policies exist + else: + default_policy_well_configured = False + + for policy in defender_client.inbound_spam_policies: + report = CheckReportM365( + metadata=self.metadata(), + resource=policy, + resource_name=policy.identity, + resource_id=policy.identity, + ) + + if policy.default: + if not self._has_no_allowed_domains(policy): + # Case 4: Default policy contains allowed domains + report.status = "FAIL" + report.status_extended = ( + f"{policy.identity} is the default policy and it contains allowed domains: {', '.join(policy.allowed_sender_domains)}, " + "but it could be overridden by another well-configured Custom Policy." + ) + findings.append(report) + else: + # Case 2: Default policy has no allowed domains and there are other policies + report.status = "PASS" + report.status_extended = ( + f"{policy.identity} is the default policy and it does not contain allowed domains, " + "but it could be overridden by another misconfigured Custom Policy." + ) + default_policy_well_configured = True + findings.append(report) + else: + if not self._has_no_allowed_domains(policy): + included_resources = [] + + if defender_client.inbound_spam_rules[ + policy.identity + ].users: + included_resources.append( + f"users: {', '.join(defender_client.inbound_spam_rules[policy.identity].users)}" + ) + if defender_client.inbound_spam_rules[ + policy.identity + ].groups: + included_resources.append( + f"groups: {', '.join(defender_client.inbound_spam_rules[policy.identity].groups)}" + ) + if defender_client.inbound_spam_rules[ + policy.identity + ].domains: + included_resources.append( + f"domains: {', '.join(defender_client.inbound_spam_rules[policy.identity].domains)}" + ) + + included_resources_str = "; ".join(included_resources) + priority = defender_client.inbound_spam_rules[ + policy.identity + ].priority + + if default_policy_well_configured: + # Case 3: Default policy has no allowed domains but custom one does + report.status = "FAIL" + report.status_extended = ( + f"Custom Inbound Spam policy {policy.identity} contains allowed domains and includes {included_resources_str}, " + f"with priority {priority} (0 is the highest). However, the default policy does not contain allowed domains, " + "so entities not included by this custom policy could be correctly protected." + ) + else: + # Case 5: Neither default nor custom policies are correctly configured + report.status = "FAIL" + report.status_extended = ( + f"Custom Inbound Spam policy {policy.identity} contains allowed domains and includes {included_resources_str}, " + f"with priority {priority} (0 is the highest). Also, the default policy contains allowed domains, " + "so entities not included by this custom policy could not be correctly protected." + ) + findings.append(report) + else: + included_resources = [] + + if defender_client.inbound_spam_rules[ + policy.identity + ].users: + included_resources.append( + f"users: {', '.join(defender_client.inbound_spam_rules[policy.identity].users)}" + ) + if defender_client.inbound_spam_rules[ + policy.identity + ].groups: + included_resources.append( + f"groups: {', '.join(defender_client.inbound_spam_rules[policy.identity].groups)}" + ) + if defender_client.inbound_spam_rules[ + policy.identity + ].domains: + included_resources.append( + f"domains: {', '.join(defender_client.inbound_spam_rules[policy.identity].domains)}" + ) + + included_resources_str = "; ".join(included_resources) + priority = defender_client.inbound_spam_rules[ + policy.identity + ].priority + + if default_policy_well_configured: + # Case 2: Both default and custom policies do not contain allowed domains + report.status = "PASS" + report.status_extended = ( + f"Custom Inbound Spam policy {policy.identity} does not contain allowed domains and includes {included_resources_str}, " + f"with priority {priority} (0 is the highest). Also, the default policy does not contain allowed domains, " + "so entities not included by this custom policy could still be correctly protected." + ) + else: + # Case 6: Default policy contains allowed domains, custom policy does not + report.status = "PASS" + report.status_extended = ( + f"Custom Inbound Spam policy {policy.identity} does not contain allowed domains and includes {included_resources_str}, " + f"with priority {priority} (0 is the highest). However, the default policy contains allowed domains, " + "so entities not included by this custom policy could not be correctly protected." + ) + findings.append(report) + + return findings + + def _has_no_allowed_domains(self, policy) -> bool: + """ + Check if the policy has no allowed domains. + + Args: + policy: The inbound spam policy to check. + + Returns: + bool: True if the policy has no allowed domains, False otherwise. + """ + return ( + policy.default + or defender_client.inbound_spam_rules[policy.identity].state.lower() + == "enabled" + ) and not policy.allowed_sender_domains diff --git a/prowler/providers/m365/services/defender/defender_chat_report_policy_configured/__init__.py b/prowler/providers/m365/services/defender/defender_chat_report_policy_configured/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/defender/defender_chat_report_policy_configured/defender_chat_report_policy_configured.metadata.json b/prowler/providers/m365/services/defender/defender_chat_report_policy_configured/defender_chat_report_policy_configured.metadata.json new file mode 100644 index 0000000000..c350874861 --- /dev/null +++ b/prowler/providers/m365/services/defender/defender_chat_report_policy_configured/defender_chat_report_policy_configured.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "defender_chat_report_policy_configured", + "CheckTitle": "Ensure chat report submission policy is properly configured in Defender", + "CheckType": [], + "ServiceName": "defender", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "medium", + "ResourceType": "Defender Report Submission Policy", + "Description": "Ensure Defender report submission policy is properly configured to use customized addresses and enable chat message reporting to customized addresses, while disabling report chat message to Microsoft.", + "Risk": "If Defender report submission policy is not properly configured, reported messages from Teams may not be handled or routed correctly, reducing the organization's ability to respond to threats.", + "RelatedUrl": "https://learn.microsoft.com/en-us/defender-office-365/submissions-teams?view=o365-worldwide", + "Remediation": { + "Code": { + "CLI": "Set-ReportSubmissionPolicy -Identity DefaultReportSubmissionPolicy -EnableReportToMicrosoft $false -ReportChatMessageEnabled $false -ReportChatMessageToCustomizedAddressEnabled $true -ReportJunkToCustomizedAddress $true -ReportNotJunkToCustomizedAddress $true -ReportPhishToCustomizedAddress $true -ReportJunkAddresses $usersub -ReportNotJunkAddresses $usersub -ReportPhishAddresses $usersub", + "NativeIaC": "", + "Other": "1. Navigate to Microsoft 365 Defender (https://security.microsoft.com/). 2. Click on Settings > Email & collaboration > User reported settings. 3. Scroll to Microsoft Teams section. 4. Ensure Monitor reported messages in Microsoft Teams is checked. 5. Ensure Send reported messages to: is set to My reporting mailbox only with report email addresses defined for authorized staff.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Configure Defender report submission policy to use customized addresses and enable chat message reporting to customized addresses, while disabling report chat message to Microsoft.", + "Url": "https://learn.microsoft.com/en-us/defender-office-365/submissions-teams?view=o365-worldwide" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/defender/defender_chat_report_policy_configured/defender_chat_report_policy_configured.py b/prowler/providers/m365/services/defender/defender_chat_report_policy_configured/defender_chat_report_policy_configured.py new file mode 100644 index 0000000000..648070bf70 --- /dev/null +++ b/prowler/providers/m365/services/defender/defender_chat_report_policy_configured/defender_chat_report_policy_configured.py @@ -0,0 +1,53 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.defender.defender_client import defender_client + + +class defender_chat_report_policy_configured(Check): + """Check if Defender report submission policy is properly configured for Teams security reporting. + + Attributes: + metadata: Metadata associated with the check (inherited from Check). + """ + + def execute(self) -> List[CheckReportM365]: + """Execute the check for Defender report submission policy settings. + + This method checks if Defender report submission policy is properly configured for Teams security reporting. + + Returns: + List[CheckReportM365]: A list of reports containing the result of the check. + """ + findings = [] + report_submission_policy = defender_client.report_submission_policy + + if report_submission_policy: + report = CheckReportM365( + metadata=self.metadata(), + resource=report_submission_policy, + resource_name="Defender Security Reporting Policy", + resource_id="defenderSecurityReportingPolicy", + ) + + defender_settings_valid = ( + report_submission_policy.report_junk_to_customized_address + and report_submission_policy.report_not_junk_to_customized_address + and report_submission_policy.report_phish_to_customized_address + and report_submission_policy.report_junk_addresses + and report_submission_policy.report_not_junk_addresses + and report_submission_policy.report_phish_addresses + and not report_submission_policy.report_chat_message_enabled + and report_submission_policy.report_chat_message_to_customized_address_enabled + ) + + if defender_settings_valid: + report.status = "PASS" + report.status_extended = "Defender report submission policy is properly configured for Teams security reporting." + else: + report.status = "FAIL" + report.status_extended = "Defender report submission policy is not properly configured for Teams security reporting." + + findings.append(report) + + return findings diff --git a/prowler/providers/m365/services/defender/defender_client.py b/prowler/providers/m365/services/defender/defender_client.py new file mode 100644 index 0000000000..b9445c5aa7 --- /dev/null +++ b/prowler/providers/m365/services/defender/defender_client.py @@ -0,0 +1,4 @@ +from prowler.providers.common.provider import Provider +from prowler.providers.m365.services.defender.defender_service import Defender + +defender_client = Defender(Provider.get_global_provider()) diff --git a/prowler/providers/m365/services/defender/defender_domain_dkim_enabled/__init__.py b/prowler/providers/m365/services/defender/defender_domain_dkim_enabled/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/defender/defender_domain_dkim_enabled/defender_domain_dkim_enabled.metadata.json b/prowler/providers/m365/services/defender/defender_domain_dkim_enabled/defender_domain_dkim_enabled.metadata.json new file mode 100644 index 0000000000..160c950d78 --- /dev/null +++ b/prowler/providers/m365/services/defender/defender_domain_dkim_enabled/defender_domain_dkim_enabled.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "defender_domain_dkim_enabled", + "CheckTitle": "Ensure that DKIM is enabled for all Exchange Online Domains", + "CheckType": [], + "ServiceName": "defender", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "high", + "ResourceType": "Exchange Online Domain", + "Description": "This check ensures that DomainKeys Identified Mail (DKIM) is enabled for all Exchange Online domains. DKIM is a crucial authentication method that, along with SPF and DMARC, helps prevent attackers from sending spoofed emails that appear to originate from your domain. By adding a digital signature to outbound emails, DKIM allows receiving email systems to verify the legitimacy of incoming messages.", + "Risk": "If DKIM is not enabled, attackers may send spoofed emails that appear to originate from your domain, potentially leading to phishing attacks and damage to your domain's reputation.", + "RelatedUrl": "https://learn.microsoft.com/en-us/microsoft-365/security/office-365-security/use-dkim-to-validate-outbound-email?view=o365-worldwide", + "Remediation": { + "Code": { + "CLI": "Set-DkimSigningConfig -Identity -Enabled $True", + "NativeIaC": "", + "Other": "1. After DNS records are created, enable DKIM signing in Microsoft 365 Defender. 2. Navigate to Microsoft 365 Defender at https://security.microsoft.com/. 3. Go to Email & collaboration > Policies & rules > Threat policies. 4. Under Rules, select Email authentication settings. 5. Choose DKIM, click on each domain, and enable 'Sign messages for this domain with DKIM signature'.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Enable DKIM for all your Exchange Online domains to ensure emails are cryptographically signed and to protect against email spoofing.", + "Url": "https://learn.microsoft.com/en-us/powershell/module/exchange/set-dkimsigningconfig?view=exchange-ps" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/defender/defender_domain_dkim_enabled/defender_domain_dkim_enabled.py b/prowler/providers/m365/services/defender/defender_domain_dkim_enabled/defender_domain_dkim_enabled.py new file mode 100644 index 0000000000..f6258744d0 --- /dev/null +++ b/prowler/providers/m365/services/defender/defender_domain_dkim_enabled/defender_domain_dkim_enabled.py @@ -0,0 +1,45 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.defender.defender_client import defender_client + + +class defender_domain_dkim_enabled(Check): + """ + Check if DKIM is enabled for all Exchange Online domains. + + Attributes: + metadata: Metadata associated with the check (inherited from Check). + """ + + def execute(self) -> List[CheckReportM365]: + """ + Execute the check to verify if DKIM is enabled for all domains. + + This method checks the DKIM signing configuration for each domain to determine if DKIM is enabled. + + Returns: + List[CheckReportM365]: A list of reports containing the result of the check. + """ + findings = [] + for config in defender_client.dkim_configurations: + report = CheckReportM365( + metadata=self.metadata(), + resource=config, + resource_name="DKIM Configuration", + resource_id=config.id, + ) + report.status = "FAIL" + report.status_extended = ( + f"DKIM is not enabled for domain with ID {config.id}." + ) + + if config.dkim_signing_enabled: + report.status = "PASS" + report.status_extended = ( + f"DKIM is enabled for domain with ID {config.id}." + ) + + findings.append(report) + + return findings diff --git a/prowler/providers/m365/services/defender/defender_malware_policy_common_attachments_filter_enabled/__init__.py b/prowler/providers/m365/services/defender/defender_malware_policy_common_attachments_filter_enabled/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/defender/defender_malware_policy_common_attachments_filter_enabled/defender_malware_policy_common_attachments_filter_enabled.metadata.json b/prowler/providers/m365/services/defender/defender_malware_policy_common_attachments_filter_enabled/defender_malware_policy_common_attachments_filter_enabled.metadata.json new file mode 100644 index 0000000000..64ac779872 --- /dev/null +++ b/prowler/providers/m365/services/defender/defender_malware_policy_common_attachments_filter_enabled/defender_malware_policy_common_attachments_filter_enabled.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "defender_malware_policy_common_attachments_filter_enabled", + "CheckTitle": "Ensure the Common Attachment Types Filter is enabled.", + "CheckType": [], + "ServiceName": "defender", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "critical", + "ResourceType": "Defender Malware Policy", + "Description": "Ensure that the Common Attachment Types Filter is enabled in anti-malware policies to block known and custom malicious file types from being attached to emails.", + "Risk": "If this setting is not enabled, users may receive emails with malicious attachments that could contain malware, increasing the risk of endpoint infection or data compromise.", + "RelatedUrl": "https://learn.microsoft.com/en-us/defender-office-365/anti-malware-policies-configure?view=o365-worldwide", + "Remediation": { + "Code": { + "CLI": "Set-MalwareFilterPolicy -Identity Default -EnableFileFilter $true", + "NativeIaC": "", + "Other": "1. Navigate to Microsoft 365 Defender https://security.microsoft.com. 2. Click to expand Email & collaboration and 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, scroll to the bottom and click Edit protection settings. 6. Check the option Enable the common attachments filter. 7. Click Save.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Enable the common attachment types filter in your default or custom anti-malware policy to prevent the delivery of emails with potentially dangerous attachments.", + "Url": "https://learn.microsoft.com/en-us/powershell/module/exchange/set-malwarefilterpolicy?view=exchange-ps" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/defender/defender_malware_policy_common_attachments_filter_enabled/defender_malware_policy_common_attachments_filter_enabled.py b/prowler/providers/m365/services/defender/defender_malware_policy_common_attachments_filter_enabled/defender_malware_policy_common_attachments_filter_enabled.py new file mode 100644 index 0000000000..a0b817cda3 --- /dev/null +++ b/prowler/providers/m365/services/defender/defender_malware_policy_common_attachments_filter_enabled/defender_malware_policy_common_attachments_filter_enabled.py @@ -0,0 +1,153 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.defender.defender_client import defender_client + + +class defender_malware_policy_common_attachments_filter_enabled(Check): + """ + Check if the Common Attachment Types Filter is enabled in the Defender anti-malware policy. + + Attributes: + metadata: Metadata associated with the check (inherited from Check). + """ + + def execute(self) -> List[CheckReportM365]: + """ + Execute the check to verify if the Common Attachment Types Filter is enabled. + + This method checks the Defender anti-malware policies to determine if the + Common Attachment Types Filter is enabled. + + Returns: + List[CheckReportM365]: A list of reports containing the result of the check. + """ + findings = [] + + if defender_client.malware_policies: + # Only Default Defender Malware Policy exists + if not defender_client.malware_rules: + policy = defender_client.malware_policies[0] + + report = CheckReportM365( + metadata=self.metadata(), + resource=policy, + resource_name=policy.identity, + resource_id=policy.identity, + ) + + if policy.enable_file_filter: + # Case 1: Default policy exists and has the setting enabled + report.status = "PASS" + report.status_extended = f"{policy.identity} is the only policy and Common Attachment Types Filter is enabled." + else: + # Case 5: Default policy exists but doesn't have the setting enabled + report.status = "FAIL" + report.status_extended = f"{policy.identity} is the only policy and Common Attachment Types Filter is not enabled." + findings.append(report) + + # Multiple Defender Malware Policies exist + else: + default_policy_well_configured = False + + for policy in defender_client.malware_policies: + report = CheckReportM365( + metadata=self.metadata(), + resource=policy, + resource_name=policy.identity, + resource_id=policy.identity, + ) + + if policy.is_default: + if not policy.enable_file_filter: + # Case 4: Default policy doesn't have the setting enabled and there are other policies + report.status = "FAIL" + report.status_extended = ( + f"{policy.identity} is the default policy and Common Attachment Types Filter is not enabled, " + "but it could be overridden by another well-configured Custom Policy." + ) + findings.append(report) + else: + # Case 2: Default policy has the setting enabled and there are other policies + report.status = "PASS" + report.status_extended = ( + f"{policy.identity} is the default policy and Common Attachment Types Filter is enabled, " + "but it could be overridden by another misconfigured Custom Policy." + ) + default_policy_well_configured = True + findings.append(report) + else: + if not policy.enable_file_filter: + included_resources = [] + + if defender_client.malware_rules[policy.identity].users: + included_resources.append( + f"users: {', '.join(defender_client.malware_rules[policy.identity].users)}" + ) + if defender_client.malware_rules[policy.identity].groups: + included_resources.append( + f"groups: {', '.join(defender_client.malware_rules[policy.identity].groups)}" + ) + if defender_client.malware_rules[policy.identity].domains: + included_resources.append( + f"domains: {', '.join(defender_client.malware_rules[policy.identity].domains)}" + ) + + included_resources_str = "; ".join(included_resources) + + if default_policy_well_configured: + # Case 3: Default policy enables the setting but custom one doesn't + report.status = "FAIL" + report.status_extended = ( + f"Custom Malware policy {policy.identity} does not enable Common Attachment Types Filter and includes {included_resources_str}, " + f"with priority {defender_client.malware_rules[policy.identity].priority} (0 is the highest). " + "However, the default policy enables the filter, so entities not included by this custom policy could be correctly protected." + ) + findings.append(report) + else: + # Case 5: Neither default nor custom policies enable the setting + report.status = "FAIL" + report.status_extended = ( + f"Custom Malware policy {policy.identity} does not enable Common Attachment Types Filter and includes {included_resources_str}, " + f"with priority {defender_client.malware_rules[policy.identity].priority} (0 is the highest). " + "Also, the default policy does not enable the filter, so entities not included by this custom policy could not be correctly protected." + ) + findings.append(report) + else: + included_resources = [] + + if defender_client.malware_rules[policy.identity].users: + included_resources.append( + f"users: {', '.join(defender_client.malware_rules[policy.identity].users)}" + ) + if defender_client.malware_rules[policy.identity].groups: + included_resources.append( + f"groups: {', '.join(defender_client.malware_rules[policy.identity].groups)}" + ) + if defender_client.malware_rules[policy.identity].domains: + included_resources.append( + f"domains: {', '.join(defender_client.malware_rules[policy.identity].domains)}" + ) + + included_resources_str = "; ".join(included_resources) + + if default_policy_well_configured: + # Case 2: Both default and custom policies enable the setting + report.status = "PASS" + report.status_extended = ( + f"Custom Malware policy {policy.identity} enables Common Attachment Types Filter and includes {included_resources_str}, " + f"with priority {defender_client.malware_rules[policy.identity].priority} (0 is the highest). " + "Also, the default policy enables the filter, so entities not included by this custom policy could still be correctly protected." + ) + findings.append(report) + else: + # Case 6: Default policy doesn't enable the setting, but custom policy does + report.status = "PASS" + report.status_extended = ( + f"Custom Malware policy {policy.identity} enables Common Attachment Types Filter and includes {included_resources_str}, " + f"with priority {defender_client.malware_rules[policy.identity].priority} (0 is the highest). " + "However, the default policy does not enable the filter, so entities not included by this custom policy could not be correctly protected." + ) + findings.append(report) + + return findings diff --git a/prowler/providers/m365/services/defender/defender_malware_policy_comprehensive_attachments_filter_applied/__init__.py b/prowler/providers/m365/services/defender/defender_malware_policy_comprehensive_attachments_filter_applied/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/defender/defender_malware_policy_comprehensive_attachments_filter_applied/defender_malware_policy_comprehensive_attachments_filter_applied.metadata.json b/prowler/providers/m365/services/defender/defender_malware_policy_comprehensive_attachments_filter_applied/defender_malware_policy_comprehensive_attachments_filter_applied.metadata.json new file mode 100644 index 0000000000..f9433c414c --- /dev/null +++ b/prowler/providers/m365/services/defender/defender_malware_policy_comprehensive_attachments_filter_applied/defender_malware_policy_comprehensive_attachments_filter_applied.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "defender_malware_policy_comprehensive_attachments_filter_applied", + "CheckTitle": "Ensure the Common Attachment Types Filter is enabled and applied in a comprehensive way", + "CheckType": [], + "ServiceName": "defender", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "medium", + "ResourceType": "Defender Malware Policy", + "Description": "Ensure that the Common Attachment Types Filter is enabled in all enabled anti-malware policies in a Comprehensive way to block known and custom malicious file types from being attached to emails. This means that the file types that the filter blocks are checked by the organization, by default all the default file types from M365 defender should be blocked but you can change that with the config file.", + "Risk": "If this setting or the policy is not enabled, users may receive emails with malicious attachments that could contain malware, increasing the risk of endpoint infection or data compromise.", + "RelatedUrl": "https://learn.microsoft.com/en-us/defender-office-365/anti-malware-protection-about?view=o365-worldwide#common-attachments-filter-in-anti-malware-policies", + "Remediation": { + "Code": { + "CLI": "$Policy = @{Name = 'CIS L2 Attachment Policy'; EnableFileFilter = $true; }; $L2Extensions = @('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'); New-MalwareFilterPolicy @Policy -FileTypes $L2Extensions; $Rule = @{Name = $Policy.Name; Enabled = $false; MalwareFilterPolicy = $Policy.Name; Priority = 0}; New-MalwareFilterRule @Rule", + "NativeIaC": "", + "Other": "1. Navigate to Microsoft 365 Defender https://security.microsoft.com. 2. Click to expand Email & collaboration and 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, scroll to the bottom and click Edit protection settings. 6. Check the option Enable the common attachments filter. 7. Click on select file types and select the file types you want to block. 8. Click Save. 9. Ensure the status of the policy is On", + "Terraform": "" + }, + "Recommendation": { + "Text": "Enable the common attachment types filter in your default or custom anti-malware policy to prevent the delivery of emails with potentially dangerous attachments.", + "Url": "https://learn.microsoft.com/en-us/powershell/module/exchange/set-malwarefilterpolicy?view=exchange-ps" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/defender/defender_malware_policy_comprehensive_attachments_filter_applied/defender_malware_policy_comprehensive_attachments_filter_applied.py b/prowler/providers/m365/services/defender/defender_malware_policy_comprehensive_attachments_filter_applied/defender_malware_policy_comprehensive_attachments_filter_applied.py new file mode 100644 index 0000000000..87aa4ab50e --- /dev/null +++ b/prowler/providers/m365/services/defender/defender_malware_policy_comprehensive_attachments_filter_applied/defender_malware_policy_comprehensive_attachments_filter_applied.py @@ -0,0 +1,254 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.defender.defender_client import defender_client + + +class defender_malware_policy_comprehensive_attachments_filter_applied(Check): + """ + Verifies if the Common Attachment Types Filter is enabled in the Defender anti-malware policy in a comprehensive way. + + Attributes: + metadata: Metadata associated with the check (inherited from Check). + """ + + def execute(self) -> List[CheckReportM365]: + """ + Executes the check to determine if the Common Attachment Types Filter is properly configured. + + This method evaluates the Defender anti-malware policies to ensure the filter is enabled and applied + to all recommended file types. + + Returns: + List[CheckReportM365]: A list of reports with the results of the check. + """ + findings = [] + + 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", + ] + + recommended_extensions = defender_client.audit_config.get( + "recommended_blocked_file_types", default_recommended_extensions + ) + + if defender_client.malware_policies: + # Only Default Defender Malware Policy exists + if not defender_client.malware_rules: + policy = defender_client.malware_policies[0] + + report = CheckReportM365( + metadata=self.metadata(), + resource=policy, + resource_name=policy.identity, + resource_id=policy.identity, + ) + + if self._is_filter_properly_configured(policy, recommended_extensions): + # Case 1: Default policy exists and has filter properly configured + report.status = "PASS" + report.status_extended = f"{policy.identity} is the only policy and Common Attachment Types Filter is properly configured." + else: + # Case 5: Default policy exists but doesn't have filter properly configured + missing = self._get_missing_extensions( + policy, recommended_extensions + ) + report.status = "FAIL" + report.status_extended = f"{policy.identity} is the only policy and Common Attachment Types Filter is not properly configured. Missing recommended file types: {', '.join(missing)}." + findings.append(report) + + # Multiple Defender Malware Policies exist + else: + default_policy_well_configured = False + + for policy in defender_client.malware_policies: + report = CheckReportM365( + metadata=self.metadata(), + resource=policy, + resource_name=policy.identity, + resource_id=policy.identity, + ) + + if policy.is_default: + if not self._is_filter_properly_configured( + policy, recommended_extensions + ): + # Case 4: Default policy is not properly configured + missing = self._get_missing_extensions( + policy, recommended_extensions + ) + report.status = "FAIL" + report.status_extended = ( + f"{policy.identity} is the default policy and Common Attachment Types Filter is not properly configured, " + f"but it could be overridden by another well-configured Custom Policy. Missing recommended file types: {', '.join(missing)}." + ) + findings.append(report) + else: + # Case 2: Default policy is properly configured + report.status = "PASS" + report.status_extended = ( + f"{policy.identity} is the default policy and Common Attachment Types Filter is properly configured, " + "but it could be overridden by another misconfigured Custom Policy." + ) + default_policy_well_configured = True + findings.append(report) + else: + if not self._is_filter_properly_configured( + policy, recommended_extensions + ): + included_resources = [] + + if defender_client.malware_rules[policy.identity].users: + included_resources.append( + f"users: {', '.join(defender_client.malware_rules[policy.identity].users)}" + ) + if defender_client.malware_rules[policy.identity].groups: + included_resources.append( + f"groups: {', '.join(defender_client.malware_rules[policy.identity].groups)}" + ) + if defender_client.malware_rules[policy.identity].domains: + included_resources.append( + f"domains: {', '.join(defender_client.malware_rules[policy.identity].domains)}" + ) + + included_resources_str = "; ".join(included_resources) + missing = self._get_missing_extensions( + policy, recommended_extensions + ) + + if default_policy_well_configured: + # Case 3: Default policy is configured, custom one isn't + report.status = "FAIL" + report.status_extended = ( + f"Custom Malware policy {policy.identity} is not properly configured and includes {included_resources_str}, " + f"with priority {defender_client.malware_rules[policy.identity].priority} (0 is the highest). " + f"Missing recommended file types: {', '.join(missing)}. " + "However, the default policy is properly configured, so entities not included by this custom policy could be correctly protected." + ) + findings.append(report) + else: + # Case 5: Neither default nor custom policy is properly configured + report.status = "FAIL" + report.status_extended = ( + f"Custom Malware policy {policy.identity} is not properly configured and includes {included_resources_str}, " + f"with priority {defender_client.malware_rules[policy.identity].priority} (0 is the highest). " + f"Missing recommended file types: {', '.join(missing)}. " + "Also, the default policy is not properly configured, so entities not included by this custom policy could not be correctly protected." + ) + findings.append(report) + else: + included_resources = [] + + if defender_client.malware_rules[policy.identity].users: + included_resources.append( + f"users: {', '.join(defender_client.malware_rules[policy.identity].users)}" + ) + if defender_client.malware_rules[policy.identity].groups: + included_resources.append( + f"groups: {', '.join(defender_client.malware_rules[policy.identity].groups)}" + ) + if defender_client.malware_rules[policy.identity].domains: + included_resources.append( + f"domains: {', '.join(defender_client.malware_rules[policy.identity].domains)}" + ) + + included_resources_str = "; ".join(included_resources) + + if default_policy_well_configured: + # Case 2: Both default and custom policies are properly configured + report.status = "PASS" + report.status_extended = ( + f"Custom Malware policy {policy.identity} is properly configured and includes {included_resources_str}, " + f"with priority {defender_client.malware_rules[policy.identity].priority} (0 is the highest). " + "Also, the default policy is properly configured, so entities not included by this custom policy could still be correctly protected." + ) + findings.append(report) + else: + # Case 6: Default policy not configured, custom policy is + report.status = "PASS" + report.status_extended = ( + f"Custom Malware policy {policy.identity} is properly configured and includes {included_resources_str}, " + f"with priority {defender_client.malware_rules[policy.identity].priority} (0 is the highest). " + "However, the default policy is not properly configured, so entities not included by this custom policy could not be correctly protected." + ) + findings.append(report) + + return findings + + def _is_filter_properly_configured(self, policy, recommended_extensions) -> bool: + if not policy.enable_file_filter: + return False + + if ( + not policy.is_default + and policy.identity in defender_client.malware_rules + and defender_client.malware_rules[policy.identity].state.lower() + != "enabled" + ): + return False + + blocked_extensions = [ext.lower() for ext in policy.file_types] + return all(ext.lower() in blocked_extensions for ext in recommended_extensions) + + def _get_missing_extensions(self, policy, recommended_extensions) -> List[str]: + if not policy.enable_file_filter: + return recommended_extensions + + blocked_extensions = [ext.lower() for ext in policy.file_types] + return [ + ext + for ext in recommended_extensions + if ext.lower() not in blocked_extensions + ] diff --git a/prowler/providers/m365/services/defender/defender_malware_policy_notifications_internal_users_malware_enabled/__init__.py b/prowler/providers/m365/services/defender/defender_malware_policy_notifications_internal_users_malware_enabled/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/defender/defender_malware_policy_notifications_internal_users_malware_enabled/defender_malware_policy_notifications_internal_users_malware_enabled.metadata.json b/prowler/providers/m365/services/defender/defender_malware_policy_notifications_internal_users_malware_enabled/defender_malware_policy_notifications_internal_users_malware_enabled.metadata.json new file mode 100644 index 0000000000..92ff9a7439 --- /dev/null +++ b/prowler/providers/m365/services/defender/defender_malware_policy_notifications_internal_users_malware_enabled/defender_malware_policy_notifications_internal_users_malware_enabled.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "defender_malware_policy_notifications_internal_users_malware_enabled", + "CheckTitle": "Ensure notifications for internal users sending malware is Enabled", + "CheckType": [], + "ServiceName": "defender", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "high", + "ResourceType": "Defender Malware Policy", + "Description": "Verify that Exchange Online Protection (EOP) is configured to notify admins of malicious activity from internal users.", + "Risk": "If notifications for internal users sending malware are not enabled, administrators may not be aware of potential threats originating from within the organization, increasing the risk of undetected malicious activities.", + "RelatedUrl": "https://learn.microsoft.com/en-us/defender-office-365/anti-malware-protection-about", + "Remediation": { + "Code": { + "CLI": "Set-MalwareFilterPolicy -Identity Default -EnableInternalSenderAdminNotifications $true -InternalSenderAdminAddress 'admin@example.com'", + "NativeIaC": "", + "Other": "1. Connect to Exchange Online using Connect-ExchangeOnline. 2. Execute the command: Get-MalwareFilterPolicy | fl Identity, EnableInternalSenderAdminNotifications, InternalSenderAdminAddress. 3. Ensure 'Notify an admin about undelivered messages from internal senders' is set to On and that at least one email address is listed under Administrator email address.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Enable notifications for internal users sending malware in your Defender Malware Policy to ensure admins are alerted of potential threats.", + "Url": "https://learn.microsoft.com/en-us/powershell/module/exchange/set-malwarefilterpolicy?view=exchange-ps" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/defender/defender_malware_policy_notifications_internal_users_malware_enabled/defender_malware_policy_notifications_internal_users_malware_enabled.py b/prowler/providers/m365/services/defender/defender_malware_policy_notifications_internal_users_malware_enabled/defender_malware_policy_notifications_internal_users_malware_enabled.py new file mode 100644 index 0000000000..735cc6b9e9 --- /dev/null +++ b/prowler/providers/m365/services/defender/defender_malware_policy_notifications_internal_users_malware_enabled/defender_malware_policy_notifications_internal_users_malware_enabled.py @@ -0,0 +1,167 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.defender.defender_client import defender_client + + +class defender_malware_policy_notifications_internal_users_malware_enabled(Check): + """ + Check if notifications for internal users sending malware are enabled in the Defender anti-malware policy. + + Attributes: + metadata: Metadata associated with the check (inherited from Check). + """ + + def execute(self) -> List[CheckReportM365]: + """ + Execute the check to verify if notifications for internal users sending malware are enabled. + + This method evaluates the Defender anti-malware policies to ensure internal sender notifications + are properly configured. + + Returns: + List[CheckReportM365]: A list of reports with the results of the check. + """ + findings = [] + + if defender_client.malware_policies: + # Only Default Defender Malware Policy exists + if not defender_client.malware_rules: + policy = defender_client.malware_policies[0] + + report = CheckReportM365( + metadata=self.metadata(), + resource=policy, + resource_name=policy.identity, + resource_id=policy.identity, + ) + + if self._are_notifications_enabled(policy): + # Case 1: Default policy exists and has notifications enabled + report.status = "PASS" + report.status_extended = f"{policy.identity} is the only policy and notifications for internal users sending malware are enabled." + else: + # Case 5: Default policy exists but doesn't have notifications enabled + report.status = "FAIL" + report.status_extended = f"{policy.identity} is the only policy and notifications for internal users sending malware are not enabled." + findings.append(report) + + # Multiple Defender Malware Policies exist + else: + default_policy_well_configured = False + + for policy in defender_client.malware_policies: + report = CheckReportM365( + metadata=self.metadata(), + resource=policy, + resource_name=policy.identity, + resource_id=policy.identity, + ) + + if policy.is_default: + if not self._are_notifications_enabled(policy): + # Case 4: Default policy not configured + report.status = "FAIL" + report.status_extended = ( + f"{policy.identity} is the default policy and notifications for internal users sending malware are not enabled, " + "but it could be overridden by another well-configured Custom Policy." + ) + findings.append(report) + else: + # Case 2: Default policy is properly configured + report.status = "PASS" + report.status_extended = ( + f"{policy.identity} is the default policy and notifications for internal users sending malware are enabled, " + "but it could be overridden by another misconfigured Custom Policy." + ) + default_policy_well_configured = True + findings.append(report) + else: + if not self._are_notifications_enabled(policy): + included_resources = [] + + if defender_client.malware_rules[policy.identity].users: + included_resources.append( + f"users: {', '.join(defender_client.malware_rules[policy.identity].users)}" + ) + if defender_client.malware_rules[policy.identity].groups: + included_resources.append( + f"groups: {', '.join(defender_client.malware_rules[policy.identity].groups)}" + ) + if defender_client.malware_rules[policy.identity].domains: + included_resources.append( + f"domains: {', '.join(defender_client.malware_rules[policy.identity].domains)}" + ) + + included_resources_str = "; ".join(included_resources) + + if default_policy_well_configured: + # Case 3: Default policy is configured, custom one isn't + report.status = "FAIL" + report.status_extended = ( + f"Custom Malware policy {policy.identity} is not properly configured and includes {included_resources_str}, " + f"with priority {defender_client.malware_rules[policy.identity].priority} (0 is the highest). " + "However, the default policy is properly configured, so entities not included by this custom policy could be correctly protected." + ) + findings.append(report) + else: + # Case 5: Neither default nor custom policy is properly configured + report.status = "FAIL" + report.status_extended = ( + f"Custom Malware policy {policy.identity} is not properly configured and includes {included_resources_str}, " + f"with priority {defender_client.malware_rules[policy.identity].priority} (0 is the highest). " + "Also, the default policy is not properly configured, so entities not included by this custom policy could not be correctly protected." + ) + findings.append(report) + else: + included_resources = [] + + if defender_client.malware_rules[policy.identity].users: + included_resources.append( + f"users: {', '.join(defender_client.malware_rules[policy.identity].users)}" + ) + if defender_client.malware_rules[policy.identity].groups: + included_resources.append( + f"groups: {', '.join(defender_client.malware_rules[policy.identity].groups)}" + ) + if defender_client.malware_rules[policy.identity].domains: + included_resources.append( + f"domains: {', '.join(defender_client.malware_rules[policy.identity].domains)}" + ) + + included_resources_str = "; ".join(included_resources) + + if default_policy_well_configured: + # Case 2: Both default and custom policies are properly configured + report.status = "PASS" + report.status_extended = ( + f"Custom Malware policy {policy.identity} is properly configured and includes {included_resources_str}, " + f"with priority {defender_client.malware_rules[policy.identity].priority} (0 is the highest). " + "Also, the default policy is properly configured, so entities not included by this custom policy could still be correctly protected." + ) + findings.append(report) + else: + # Case 6: Default policy not configured, custom policy is + report.status = "PASS" + report.status_extended = ( + f"Custom Malware policy {policy.identity} is properly configured and includes {included_resources_str}, " + f"with priority {defender_client.malware_rules[policy.identity].priority} (0 is the highest). " + "However, the default policy is not properly configured, so entities not included by this custom policy could not be correctly protected." + ) + findings.append(report) + + return findings + + def _are_notifications_enabled(self, policy) -> bool: + if ( + not policy.is_default + and policy.identity in defender_client.malware_rules + and defender_client.malware_rules[policy.identity].state.lower() + != "enabled" + ): + return False + + return ( + policy.enable_internal_sender_admin_notifications + and policy.internal_sender_admin_address + ) diff --git a/prowler/providers/m365/services/defender/defender_service.py b/prowler/providers/m365/services/defender/defender_service.py new file mode 100644 index 0000000000..9ea4a64afd --- /dev/null +++ b/prowler/providers/m365/services/defender/defender_service.py @@ -0,0 +1,426 @@ +from typing import List, Optional + +from pydantic import BaseModel + +from prowler.lib.logger import logger +from prowler.providers.m365.lib.service.service import M365Service +from prowler.providers.m365.m365_provider import M365Provider + + +class Defender(M365Service): + def __init__(self, provider: M365Provider): + super().__init__(provider) + self.malware_policies = [] + self.outbound_spam_policies = {} + self.outbound_spam_rules = {} + self.antiphishing_policies = {} + self.antiphishing_rules = {} + self.connection_filter_policy = None + self.dkim_configurations = [] + self.inbound_spam_policies = [] + self.inbound_spam_rules = {} + self.report_submission_policy = None + if self.powershell: + self.powershell.connect_exchange_online() + self.malware_policies = self._get_malware_filter_policy() + self.malware_rules = self._get_malware_filter_rule() + self.outbound_spam_policies = self._get_outbound_spam_filter_policy() + self.outbound_spam_rules = self._get_outbound_spam_filter_rule() + self.antiphishing_policies = self._get_antiphishing_policy() + self.antiphishing_rules = self._get_antiphishing_rules() + self.connection_filter_policy = self._get_connection_filter_policy() + self.dkim_configurations = self._get_dkim_config() + self.inbound_spam_policies = self._get_inbound_spam_filter_policy() + self.inbound_spam_rules = self._get_inbound_spam_filter_rule() + self.report_submission_policy = self._get_report_submission_policy() + self.powershell.close() + + def _get_malware_filter_policy(self): + logger.info("M365 - Getting Defender malware filter policy...") + malware_policies = [] + try: + malware_policy = self.powershell.get_malware_filter_policy() + if isinstance(malware_policy, dict): + malware_policy = [malware_policy] + for policy in malware_policy: + if policy: + malware_policies.append( + MalwarePolicy( + enable_file_filter=policy.get("EnableFileFilter", False), + identity=policy.get("Identity", ""), + enable_internal_sender_admin_notifications=policy.get( + "EnableInternalSenderAdminNotifications", False + ), + internal_sender_admin_address=policy.get( + "InternalSenderAdminAddress", "" + ), + file_types=policy.get("FileTypes", []), + is_default=policy.get("IsDefault", False), + ) + ) + malware_policies.sort(key=lambda x: x.is_default, reverse=True) + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + return malware_policies + + def _get_malware_filter_rule(self): + logger.info("Microsoft365 - Getting Defender malware filter rule...") + malware_rules = {} + try: + malware_rule = self.powershell.get_malware_filter_rule() + if isinstance(malware_rule, dict): + malware_rule = [malware_rule] + for rule in malware_rule: + if rule: + malware_rules[rule.get("Name", "")] = MalwareRule( + state=rule.get("State", ""), + priority=rule.get("Priority", 0), + users=rule.get("SentTo", None), + groups=rule.get("SentToMemberOf", None), + domains=rule.get("RecipientDomainIs", None), + ) + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + return malware_rules + + def _get_antiphishing_policy(self): + logger.info("Microsoft365 - Getting Defender antiphishing policy...") + antiphishing_policies = {} + try: + antiphishing_policy = self.powershell.get_antiphishing_policy() + if isinstance(antiphishing_policy, dict): + antiphishing_policy = [antiphishing_policy] + for policy in antiphishing_policy: + if policy: + antiphishing_policies[policy.get("Name", "")] = AntiphishingPolicy( + name=policy.get("Name", ""), + spoof_intelligence=policy.get("EnableSpoofIntelligence", True), + spoof_intelligence_action=policy.get( + "AuthenticationFailAction", "" + ), + dmarc_reject_action=policy.get("DmarcRejectAction", ""), + dmarc_quarantine_action=policy.get("DmarcQuarantineAction", ""), + safety_tips=policy.get("EnableFirstContactSafetyTips", True), + unauthenticated_sender_action=policy.get( + "EnableUnauthenticatedSender", True + ), + show_tag=policy.get("EnableViaTag", True), + honor_dmarc_policy=policy.get("HonorDmarcPolicy", True), + default=policy.get("IsDefault", False), + ) + + antiphishing_policies = dict( + sorted( + antiphishing_policies.items(), + key=lambda item: item[1].default, + reverse=True, + ) + ) + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + return antiphishing_policies + + def _get_antiphishing_rules(self): + logger.info("Microsoft365 - Getting Defender antiphishing rules...") + antiphishing_rules = {} + try: + antiphishing_rule = self.powershell.get_antiphishing_rules() + if isinstance(antiphishing_rule, dict): + antiphishing_rule = [antiphishing_rule] + for rule in antiphishing_rule: + if rule: + antiphishing_rules[rule.get("Name", "")] = AntiphishingRule( + state=rule.get("State", ""), + priority=rule.get("Priority", 0), + users=rule.get("SentTo", None), + groups=rule.get("SentToMemberOf", None), + domains=rule.get("RecipientDomainIs", None), + ) + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + return antiphishing_rules + + def _get_connection_filter_policy(self): + logger.info("Microsoft365 - Getting connection filter policy...") + connection_filter_policy = None + try: + policy = self.powershell.get_connection_filter_policy() + if policy: + connection_filter_policy = ConnectionFilterPolicy( + ip_allow_list=policy.get("IPAllowList", []), + identity=policy.get("Identity", ""), + enable_safe_list=policy.get("EnableSafeList", False), + ) + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + return connection_filter_policy + + def _get_dkim_config(self): + logger.info("Microsoft365 - Getting DKIM settings...") + dkim_configs = [] + try: + dkim_config = self.powershell.get_dkim_config() + if isinstance(dkim_config, dict): + dkim_config = [dkim_config] + for config in dkim_config: + if config: + dkim_configs.append( + DkimConfig( + dkim_signing_enabled=config.get("Enabled", False), + id=config.get("Id", ""), + ) + ) + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + return dkim_configs + + def _get_outbound_spam_filter_policy(self): + logger.info("Microsoft365 - Getting Defender outbound spam filter policy...") + outbound_spam_policies = {} + try: + outbound_spam_policy = self.powershell.get_outbound_spam_filter_policy() + if isinstance(outbound_spam_policy, dict): + outbound_spam_policy = [outbound_spam_policy] + for policy in outbound_spam_policy: + if policy: + outbound_spam_policies[policy.get("Name", "")] = OutboundSpamPolicy( + name=policy.get("Name", ""), + notify_sender_blocked=policy.get("NotifyOutboundSpam", True), + notify_limit_exceeded=policy.get( + "BccSuspiciousOutboundMail", True + ), + notify_limit_exceeded_addresses=policy.get( + "BccSuspiciousOutboundAdditionalRecipients", [] + ), + notify_sender_blocked_addresses=policy.get( + "NotifyOutboundSpamRecipients", [] + ), + auto_forwarding_mode=policy.get("AutoForwardingMode", True), + default=policy.get("IsDefault", False), + ) + + outbound_spam_policies = dict( + sorted( + outbound_spam_policies.items(), + key=lambda item: item[1].default, + reverse=True, + ) + ) + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + return outbound_spam_policies + + def _get_outbound_spam_filter_rule(self): + logger.info("Microsoft365 - Getting Defender outbound spam filter rule...") + outbound_spam_rules = {} + try: + outbound_spam_rule = self.powershell.get_outbound_spam_filter_rule() + if isinstance(outbound_spam_rule, dict): + outbound_spam_rule = [outbound_spam_rule] + for rule in outbound_spam_rule: + if rule: + outbound_spam_rules[rule.get("Name", "")] = OutboundSpamRule( + state=rule.get("State", "Disabled"), + priority=rule.get("Priority", 0), + users=rule.get("From", None), + groups=rule.get("FromMemberOf", None), + domains=rule.get("SenderDomainIs", None), + ) + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + return outbound_spam_rules + + def _get_inbound_spam_filter_policy(self): + logger.info("Microsoft365 - Getting Defender inbound spam filter policy...") + inbound_spam_policies = [] + try: + inbound_spam_policy = self.powershell.get_inbound_spam_filter_policy() + if not inbound_spam_policy: + return inbound_spam_policies + if isinstance(inbound_spam_policy, dict): + inbound_spam_policy = [inbound_spam_policy] + for policy in inbound_spam_policy: + if policy: + inbound_spam_policies.append( + DefenderInboundSpamPolicy( + identity=policy.get("Identity", ""), + allowed_sender_domains=policy.get( + "AllowedSenderDomains", [] + ), + default=policy.get("IsDefault", False), + ) + ) + inbound_spam_policies.sort(key=lambda x: x.default, reverse=True) + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + return inbound_spam_policies + + def _get_inbound_spam_filter_rule(self): + logger.info("Microsoft365 - Getting Defender inbound spam filter rule...") + inbound_spam_rules = {} + try: + inbound_spam_rule = self.powershell.get_inbound_spam_filter_rule() + if isinstance(inbound_spam_rule, dict): + inbound_spam_rule = [inbound_spam_rule] + for rule in inbound_spam_rule: + if rule: + inbound_spam_rules[rule.get("Name", "")] = InboundSpamRule( + state=rule.get("State", "Disabled"), + priority=rule.get("Priority", 0), + users=rule.get("SentTo", None), + groups=rule.get("SentToMemberOf", None), + domains=rule.get("RecipientDomainIs", None), + ) + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + return inbound_spam_rules + + def _get_report_submission_policy(self): + logger.info("Microsoft365 - Getting Defender report submission policy...") + report_submission_policy = None + try: + report_submission_policy = self.powershell.get_report_submission_policy() + if report_submission_policy: + report_submission_policy = ReportSubmissionPolicy( + report_junk_to_customized_address=report_submission_policy.get( + "ReportJunkToCustomizedAddress", True + ), + report_not_junk_to_customized_address=report_submission_policy.get( + "ReportNotJunkToCustomizedAddress", True + ), + report_phish_to_customized_address=report_submission_policy.get( + "ReportPhishToCustomizedAddress", True + ), + report_junk_addresses=report_submission_policy.get( + "ReportJunkAddresses", [] + ), + report_not_junk_addresses=report_submission_policy.get( + "ReportNotJunkAddresses", [] + ), + report_phish_addresses=report_submission_policy.get( + "ReportPhishAddresses", [] + ), + report_chat_message_enabled=report_submission_policy.get( + "ReportChatMessageEnabled", True + ), + report_chat_message_to_customized_address_enabled=report_submission_policy.get( + "ReportChatMessageToCustomizedAddressEnabled", True + ), + ) + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + return report_submission_policy + + +class MalwarePolicy(BaseModel): + enable_file_filter: bool + identity: str + enable_internal_sender_admin_notifications: bool + internal_sender_admin_address: str + file_types: list[str] + is_default: bool + + +class MalwareRule(BaseModel): + state: str + priority: int + users: Optional[list[str]] + groups: Optional[list[str]] + domains: Optional[list[str]] + + +class AntiphishingPolicy(BaseModel): + name: str + spoof_intelligence: bool + spoof_intelligence_action: str + dmarc_reject_action: str + dmarc_quarantine_action: str + safety_tips: bool + unauthenticated_sender_action: bool + show_tag: bool + honor_dmarc_policy: bool + default: bool + + +class AntiphishingRule(BaseModel): + state: str + priority: int + users: Optional[list[str]] + groups: Optional[list[str]] + domains: Optional[list[str]] + + +class ConnectionFilterPolicy(BaseModel): + ip_allow_list: list + identity: str + enable_safe_list: bool + + +class DkimConfig(BaseModel): + dkim_signing_enabled: bool + id: str + + +class OutboundSpamPolicy(BaseModel): + name: str + notify_sender_blocked: bool + notify_limit_exceeded: bool + notify_limit_exceeded_addresses: List[str] + notify_sender_blocked_addresses: List[str] + auto_forwarding_mode: bool + default: bool + + +class OutboundSpamRule(BaseModel): + state: str + priority: int + users: Optional[list[str]] + groups: Optional[list[str]] + domains: Optional[list[str]] + + +class DefenderInboundSpamPolicy(BaseModel): + identity: str + allowed_sender_domains: list[str] = [] + default: bool + + +class InboundSpamRule(BaseModel): + state: str + priority: int + users: Optional[list[str]] + groups: Optional[list[str]] + domains: Optional[list[str]] + + +class ReportSubmissionPolicy(BaseModel): + report_junk_to_customized_address: bool + report_not_junk_to_customized_address: bool + report_phish_to_customized_address: bool + report_junk_addresses: list[str] + report_not_junk_addresses: list[str] + report_phish_addresses: list[str] + report_chat_message_enabled: bool + report_chat_message_to_customized_address_enabled: bool diff --git a/prowler/providers/m365/services/entra/__init__.py b/prowler/providers/m365/services/entra/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/entra/entra_admin_consent_workflow_enabled/__init__.py b/prowler/providers/m365/services/entra/entra_admin_consent_workflow_enabled/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/microsoft365/services/entra/entra_admin_consent_workflow_enabled/entra_admin_consent_workflow_enabled.metadata.json b/prowler/providers/m365/services/entra/entra_admin_consent_workflow_enabled/entra_admin_consent_workflow_enabled.metadata.json similarity index 96% rename from prowler/providers/microsoft365/services/entra/entra_admin_consent_workflow_enabled/entra_admin_consent_workflow_enabled.metadata.json rename to prowler/providers/m365/services/entra/entra_admin_consent_workflow_enabled/entra_admin_consent_workflow_enabled.metadata.json index a70b98501a..d66e31c1b6 100644 --- a/prowler/providers/microsoft365/services/entra/entra_admin_consent_workflow_enabled/entra_admin_consent_workflow_enabled.metadata.json +++ b/prowler/providers/m365/services/entra/entra_admin_consent_workflow_enabled/entra_admin_consent_workflow_enabled.metadata.json @@ -1,5 +1,5 @@ { - "Provider": "microsoft365", + "Provider": "m365", "CheckID": "entra_admin_consent_workflow_enabled", "CheckTitle": "Ensure the admin consent workflow is enabled.", "CheckType": [], @@ -23,7 +23,9 @@ "Url": "https://learn.microsoft.com/en-us/entra/identity/enterprise-apps/configure-admin-consent-workflow" } }, - "Categories": [], + "Categories": [ + "e3" + ], "DependsOn": [], "RelatedTo": [], "Notes": "" diff --git a/prowler/providers/microsoft365/services/entra/entra_admin_consent_workflow_enabled/entra_admin_consent_workflow_enabled.py b/prowler/providers/m365/services/entra/entra_admin_consent_workflow_enabled/entra_admin_consent_workflow_enabled.py similarity index 86% rename from prowler/providers/microsoft365/services/entra/entra_admin_consent_workflow_enabled/entra_admin_consent_workflow_enabled.py rename to prowler/providers/m365/services/entra/entra_admin_consent_workflow_enabled/entra_admin_consent_workflow_enabled.py index 24bcbe9c47..5a22c343ce 100644 --- a/prowler/providers/microsoft365/services/entra/entra_admin_consent_workflow_enabled/entra_admin_consent_workflow_enabled.py +++ b/prowler/providers/m365/services/entra/entra_admin_consent_workflow_enabled/entra_admin_consent_workflow_enabled.py @@ -1,7 +1,7 @@ from typing import List -from prowler.lib.check.models import Check, CheckReportMicrosoft365 -from prowler.providers.microsoft365.services.entra.entra_client import entra_client +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.entra.entra_client import entra_client class entra_admin_consent_workflow_enabled(Check): @@ -17,7 +17,7 @@ class entra_admin_consent_workflow_enabled(Check): from accessing critical applications or forced to use insecure workarounds. """ - def execute(self) -> List[CheckReportMicrosoft365]: + def execute(self) -> List[CheckReportM365]: """ Execute the admin consent workflow requirement check. @@ -25,12 +25,12 @@ class entra_admin_consent_workflow_enabled(Check): whether the admin consent workflow is enabled. Returns: - List[CheckReportMicrosoft365]: A list containing the report with the result of the check. + List[CheckReportM365]: A list containing the report with the result of the check. """ findings = [] admin_consent_policy = entra_client.admin_consent_policy if admin_consent_policy: - report = CheckReportMicrosoft365( + report = CheckReportM365( self.metadata(), resource=admin_consent_policy, resource_name="Admin Consent Policy", diff --git a/prowler/providers/m365/services/entra/entra_admin_portals_access_restriction/__init__.py b/prowler/providers/m365/services/entra/entra_admin_portals_access_restriction/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/microsoft365/services/entra/entra_admin_portals_role_limited_access/entra_admin_portals_role_limited_access.metadata.json b/prowler/providers/m365/services/entra/entra_admin_portals_access_restriction/entra_admin_portals_access_restriction.metadata.json similarity index 92% rename from prowler/providers/microsoft365/services/entra/entra_admin_portals_role_limited_access/entra_admin_portals_role_limited_access.metadata.json rename to prowler/providers/m365/services/entra/entra_admin_portals_access_restriction/entra_admin_portals_access_restriction.metadata.json index 87493e9bd0..01fee17d74 100644 --- a/prowler/providers/microsoft365/services/entra/entra_admin_portals_role_limited_access/entra_admin_portals_role_limited_access.metadata.json +++ b/prowler/providers/m365/services/entra/entra_admin_portals_access_restriction/entra_admin_portals_access_restriction.metadata.json @@ -1,7 +1,10 @@ { - "Provider": "microsoft365", - "CheckID": "entra_admin_portals_role_limited_access", + "Provider": "m365", + "CheckID": "entra_admin_portals_access_restriction", "CheckTitle": "Ensure that only administrative roles have access to Microsoft Admin Portals", + "CheckAliases": [ + "entra_admin_portals_role_limited_access" + ], "CheckType": [], "ServiceName": "entra", "SubServiceName": "", @@ -23,7 +26,9 @@ "Url": "https://learn.microsoft.com/en-us/entra/identity/conditional-access/overview" } }, - "Categories": [], + "Categories": [ + "e3" + ], "DependsOn": [], "RelatedTo": [], "Notes": "" diff --git a/prowler/providers/microsoft365/services/entra/entra_admin_portals_role_limited_access/entra_admin_portals_role_limited_access.py b/prowler/providers/m365/services/entra/entra_admin_portals_access_restriction/entra_admin_portals_access_restriction.py similarity index 83% rename from prowler/providers/microsoft365/services/entra/entra_admin_portals_role_limited_access/entra_admin_portals_role_limited_access.py rename to prowler/providers/m365/services/entra/entra_admin_portals_access_restriction/entra_admin_portals_access_restriction.py index 0b0b08aaac..23f6e3288a 100644 --- a/prowler/providers/microsoft365/services/entra/entra_admin_portals_role_limited_access/entra_admin_portals_role_limited_access.py +++ b/prowler/providers/m365/services/entra/entra_admin_portals_access_restriction/entra_admin_portals_access_restriction.py @@ -1,27 +1,27 @@ -from prowler.lib.check.models import Check, CheckReportMicrosoft365 -from prowler.providers.microsoft365.services.entra.entra_client import entra_client -from prowler.providers.microsoft365.services.entra.entra_service import ( +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.entra.entra_client import entra_client +from prowler.providers.m365.services.entra.entra_service import ( AdminRoles, ConditionalAccessGrantControl, ConditionalAccessPolicyState, ) -class entra_admin_portals_role_limited_access(Check): +class entra_admin_portals_access_restriction(Check): """Check if Conditional Access policies deny access to the Microsoft 365 admin center for users with limited access roles. This check ensures that Conditional Access policies are in place to deny access to the Microsoft 365 admin center for users with limited access roles. """ - def execute(self) -> list[CheckReportMicrosoft365]: + def execute(self) -> list[CheckReportM365]: """Execute the check to ensure that Conditional Access policies deny access to the Microsoft 365 admin center for users with limited access roles. Returns: - list[CheckReportMicrosoft365]: A list containing the results of the check. + list[CheckReportM365]: A list containing the results of the check. """ findings = [] - report = CheckReportMicrosoft365( + report = CheckReportM365( metadata=self.metadata(), resource={}, resource_name="Conditional Access Policies", @@ -52,7 +52,7 @@ class entra_admin_portals_role_limited_access(Check): ConditionalAccessGrantControl.BLOCK in policy.grant_controls.built_in_controls ): - report = CheckReportMicrosoft365( + report = CheckReportM365( metadata=self.metadata(), resource=policy, resource_name=policy.display_name, diff --git a/prowler/providers/m365/services/entra/entra_admin_users_cloud_only/__init__.py b/prowler/providers/m365/services/entra/entra_admin_users_cloud_only/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/entra/entra_admin_users_cloud_only/entra_admin_users_cloud_only.metadata.json b/prowler/providers/m365/services/entra/entra_admin_users_cloud_only/entra_admin_users_cloud_only.metadata.json new file mode 100644 index 0000000000..3e04a213dc --- /dev/null +++ b/prowler/providers/m365/services/entra/entra_admin_users_cloud_only/entra_admin_users_cloud_only.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "entra_admin_users_cloud_only", + "CheckTitle": "Ensure all Microsoft 365 administrative users are cloud-only", + "CheckType": [], + "ServiceName": "entra", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "high", + "ResourceType": "Administrative User", + "Description": "This check verifies that all Microsoft 365 administrative users are cloud-only, not synchronized from an on-premises directory, by querying administrative users and checking their synchronization status.", + "Risk": "On-premises synchronized administrative users increase the attack surface and compromise the security posture of the cloud environment. Compromise of on-premises systems could lead to unauthorized access to Microsoft 365 administrative functionalities.", + "RelatedUrl": "https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/best-practices#9-use-cloud-native-accounts-for-microsoft-entra-roles", + "Remediation": { + "Code": { + "CLI": "", + "NativeIaC": "", + "Other": "1. Identify on-premises synchronized administrative users using Microsoft Entra Connect or equivalent tools. 2. Create new cloud-only administrative user with appropriate permissions. 3. Migrate administrative tasks from on-premises synchronized users to the new cloud-only user. 4. Disable or remove the on-premises synchronized administrative users.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Ensure all Microsoft 365 administrative users are cloud-only to reduce the attack surface and improve security posture.", + "Url": "https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/best-practices#9-use-cloud-native-accounts-for-microsoft-entra-roles" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/entra/entra_admin_users_cloud_only/entra_admin_users_cloud_only.py b/prowler/providers/m365/services/entra/entra_admin_users_cloud_only/entra_admin_users_cloud_only.py new file mode 100644 index 0000000000..c41699337c --- /dev/null +++ b/prowler/providers/m365/services/entra/entra_admin_users_cloud_only/entra_admin_users_cloud_only.py @@ -0,0 +1,49 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.entra.entra_client import entra_client +from prowler.providers.m365.services.entra.entra_service import AdminRoles + + +class entra_admin_users_cloud_only(Check): + """ + Check to ensure that there are no admin accounts with non-cloud-only accounts in Microsoft 365. + This check verifies if any user with admin roles has an on-premises synchronized account. + If such users are found, the check will fail. + """ + + def execute(self) -> List[CheckReportM365]: + """ + Execute the check to identify admin accounts with non-cloud-only accounts. + Returns: + List[CheckReportM365]: A list containing the check report with the status and details. + """ + findings = [] + if entra_client.users: + non_cloud_admins = [] + for user_id, user in entra_client.users.items(): + for role in user.directory_roles_ids: + if ( + role in {admin_role.value for admin_role in AdminRoles} + and user.on_premises_sync_enabled + ): + non_cloud_admins.append(user_id) + + report = CheckReportM365( + metadata=self.metadata(), + resource={}, + resource_name="Cloud-only account", + resource_id="cloudOnlyAccount", + ) + report.status = "PASS" + report.status_extended = ( + "All the users with administrative roles are cloud-only accounts." + ) + + if non_cloud_admins: + report.status = "FAIL" + ids_str = ", ".join(non_cloud_admins) + report.status_extended = f"There are some users with administrative roles that are not cloud-only accounts: {ids_str}" + + findings.append(report) + return findings diff --git a/prowler/providers/m365/services/entra/entra_admin_users_mfa_enabled/__init__.py b/prowler/providers/m365/services/entra/entra_admin_users_mfa_enabled/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/microsoft365/services/entra/entra_admin_mfa_enabled_for_administrative_roles/entra_admin_mfa_enabled_for_administrative_roles.metadata.json b/prowler/providers/m365/services/entra/entra_admin_users_mfa_enabled/entra_admin_users_mfa_enabled.metadata.json similarity index 90% rename from prowler/providers/microsoft365/services/entra/entra_admin_mfa_enabled_for_administrative_roles/entra_admin_mfa_enabled_for_administrative_roles.metadata.json rename to prowler/providers/m365/services/entra/entra_admin_users_mfa_enabled/entra_admin_users_mfa_enabled.metadata.json index 942e1a3c97..2577857a99 100644 --- a/prowler/providers/microsoft365/services/entra/entra_admin_mfa_enabled_for_administrative_roles/entra_admin_mfa_enabled_for_administrative_roles.metadata.json +++ b/prowler/providers/m365/services/entra/entra_admin_users_mfa_enabled/entra_admin_users_mfa_enabled.metadata.json @@ -1,7 +1,10 @@ { - "Provider": "microsoft365", - "CheckID": "entra_admin_mfa_enabled_for_administrative_roles", + "Provider": "m365", + "CheckID": "entra_admin_users_mfa_enabled", "CheckTitle": "Ensure multifactor authentication is enabled for all users in administrative roles.", + "CheckAliases": [ + "entra_admin_mfa_enabled_for_administrative_roles" + ], "CheckType": [], "ServiceName": "entra", "SubServiceName": "", @@ -23,7 +26,9 @@ "Url": "https://learn.microsoft.com/en-us/entra/identity/conditional-access/howto-conditional-access-policy-admin-mfa" } }, - "Categories": [], + "Categories": [ + "e3" + ], "DependsOn": [], "RelatedTo": [], "Notes": "" diff --git a/prowler/providers/microsoft365/services/entra/entra_admin_mfa_enabled_for_administrative_roles/entra_admin_mfa_enabled_for_administrative_roles.py b/prowler/providers/m365/services/entra/entra_admin_users_mfa_enabled/entra_admin_users_mfa_enabled.py similarity index 78% rename from prowler/providers/microsoft365/services/entra/entra_admin_mfa_enabled_for_administrative_roles/entra_admin_mfa_enabled_for_administrative_roles.py rename to prowler/providers/m365/services/entra/entra_admin_users_mfa_enabled/entra_admin_users_mfa_enabled.py index d69276f135..dff536999b 100644 --- a/prowler/providers/microsoft365/services/entra/entra_admin_mfa_enabled_for_administrative_roles/entra_admin_mfa_enabled_for_administrative_roles.py +++ b/prowler/providers/m365/services/entra/entra_admin_users_mfa_enabled/entra_admin_users_mfa_enabled.py @@ -1,15 +1,15 @@ from typing import List -from prowler.lib.check.models import Check, CheckReportMicrosoft365 -from prowler.providers.microsoft365.services.entra.entra_client import entra_client -from prowler.providers.microsoft365.services.entra.entra_service import ( +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.entra.entra_client import entra_client +from prowler.providers.m365.services.entra.entra_service import ( AdminRoles, ConditionalAccessGrantControl, ConditionalAccessPolicyState, ) -class entra_admin_mfa_enabled_for_administrative_roles(Check): +class entra_admin_users_mfa_enabled(Check): """ Ensure multifactor authentication is enabled for all users in administrative roles. @@ -20,7 +20,7 @@ class entra_admin_mfa_enabled_for_administrative_roles(Check): The check fails if no enabled policy is found that requires MFA for any administrative role. """ - def execute(self) -> List[CheckReportMicrosoft365]: + def execute(self) -> List[CheckReportM365]: """ Execute the admin MFA requirement check for administrative roles. @@ -28,11 +28,11 @@ class entra_admin_mfa_enabled_for_administrative_roles(Check): indicating whether MFA is enforced for users in administrative roles. Returns: - List[CheckReportMicrosoft365]: A list containing a single report with the result of the check. + List[CheckReportM365]: A list containing a single report with the result of the check. """ findings = [] - report = CheckReportMicrosoft365( + report = CheckReportM365( metadata=self.metadata(), resource={}, resource_name="Conditional Access Policies", @@ -62,19 +62,19 @@ class entra_admin_mfa_enabled_for_administrative_roles(Check): ConditionalAccessGrantControl.MFA in policy.grant_controls.built_in_controls ): - report = CheckReportMicrosoft365( + report = CheckReportM365( metadata=self.metadata(), resource=entra_client.conditional_access_policies, resource_name=policy.display_name, resource_id=policy.id, ) - report.status = "PASS" - report.status_extended = f"Conditional Access Policy '{policy.display_name}' enforces MFA for administrative roles." - if policy.state == ConditionalAccessPolicyState.ENABLED_FOR_REPORTING: report.status = "FAIL" report.status_extended = f"Conditional Access Policy '{policy.display_name}' only reports MFA for administrative roles but does not enforce it." - break + else: + report.status = "PASS" + report.status_extended = f"Conditional Access Policy '{policy.display_name}' enforces MFA for administrative roles." + break findings.append(report) return findings diff --git a/prowler/providers/m365/services/entra/entra_admin_users_phishing_resistant_mfa_enabled/__init__.py b/prowler/providers/m365/services/entra/entra_admin_users_phishing_resistant_mfa_enabled/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/entra/entra_admin_users_phishing_resistant_mfa_enabled/entra_admin_users_phishing_resistant_mfa_enabled.metadata.json b/prowler/providers/m365/services/entra/entra_admin_users_phishing_resistant_mfa_enabled/entra_admin_users_phishing_resistant_mfa_enabled.metadata.json new file mode 100644 index 0000000000..e01fbca951 --- /dev/null +++ b/prowler/providers/m365/services/entra/entra_admin_users_phishing_resistant_mfa_enabled/entra_admin_users_phishing_resistant_mfa_enabled.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "entra_admin_users_phishing_resistant_mfa_enabled", + "CheckTitle": "Ensure phishing-resistant MFA strength is required for all administrator accounts", + "CheckType": [], + "ServiceName": "entra", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "high", + "ResourceType": "Conditional Access Policy", + "Description": "Ensure ", + "Risk": "Administrators using weaker MFA methods, such as SMS or push notifications, are vulnerable to phishing attacks and MFA fatigue attacks. Attackers can intercept codes or trick users into approving fraudulent authentication requests, leading to unauthorized access to critical systems.", + "RelatedUrl": "https://learn.microsoft.com/en-us/entra/identity/conditional-access/policy-admin-phish-resistant-mfa", + "Remediation": { + "Code": { + "CLI": "", + "NativeIaC": "", + "Other": "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.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Require phishing-resistant MFA strength for all administrator accounts through Conditional Access policies. Enforce the use of FIDO2 security keys, Windows Hello for Business, or certificate-based authentication. Ensure administrators are pre-registered for these methods before enforcement to prevent lockouts. Maintain a break-glass account exempt from this policy for emergency access.", + "Url": "https://learn.microsoft.com/en-us/entra/identity/conditional-access/policy-admin-phish-resistant-mfa#create-a-conditional-access-policy" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/entra/entra_admin_users_phishing_resistant_mfa_enabled/entra_admin_users_phishing_resistant_mfa_enabled.py b/prowler/providers/m365/services/entra/entra_admin_users_phishing_resistant_mfa_enabled/entra_admin_users_phishing_resistant_mfa_enabled.py new file mode 100644 index 0000000000..6f0fbc281d --- /dev/null +++ b/prowler/providers/m365/services/entra/entra_admin_users_phishing_resistant_mfa_enabled/entra_admin_users_phishing_resistant_mfa_enabled.py @@ -0,0 +1,67 @@ +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.entra.entra_client import entra_client +from prowler.providers.m365.services.entra.entra_service import ( + AdminRoles, + AuthenticationStrength, + ConditionalAccessPolicyState, +) + + +class entra_admin_users_phishing_resistant_mfa_enabled(Check): + """Check if Conditional Access policies require Phishing-resistant MFA strength for admin users.""" + + def execute(self) -> list[CheckReportM365]: + """Execute the check to ensure that Conditional Access policies require Phishing-resistant MFA strength for admin users. + + Returns: + list[CheckReportM365]: A list containing the results of the check. + """ + findings = [] + report = CheckReportM365( + metadata=self.metadata(), + resource={}, + resource_name="Conditional Access Policies", + resource_id="conditionalAccessPolicies", + ) + report.status = "FAIL" + report.status_extended = "No Conditional Access Policy requires Phishing-resistant MFA strength for admin users." + + for policy in entra_client.conditional_access_policies.values(): + if policy.state == ConditionalAccessPolicyState.DISABLED: + continue + + if not ( + {role.value for role in AdminRoles}.issuperset( + policy.conditions.user_conditions.included_roles + ) + ): + continue + + if ( + "All" + not in policy.conditions.application_conditions.included_applications + or policy.conditions.application_conditions.excluded_applications != [] + ): + continue + + if ( + policy.grant_controls.authentication_strength is not None + and policy.grant_controls.authentication_strength + == AuthenticationStrength.PHISHING_RESISTANT_MFA + ): + report = CheckReportM365( + metadata=self.metadata(), + resource=policy, + resource_name=policy.display_name, + resource_id=policy.id, + ) + if policy.state == ConditionalAccessPolicyState.ENABLED_FOR_REPORTING: + report.status = "FAIL" + report.status_extended = f"Conditional Access Policy '{policy.display_name}' reports Phishing-resistant MFA strength for admin users but does not require it." + else: + report.status = "PASS" + report.status_extended = f"Conditional Access Policy '{policy.display_name}' requires Phishing-resistant MFA strength for admin users." + break + + findings.append(report) + return findings diff --git a/prowler/providers/m365/services/entra/entra_admin_users_sign_in_frequency_enabled/__init__.py b/prowler/providers/m365/services/entra/entra_admin_users_sign_in_frequency_enabled/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/microsoft365/services/entra/entra_admin_users_sign_in_frequency_enabled/entra_admin_users_sign_in_frequency_enabled.metadata.json b/prowler/providers/m365/services/entra/entra_admin_users_sign_in_frequency_enabled/entra_admin_users_sign_in_frequency_enabled.metadata.json similarity index 97% rename from prowler/providers/microsoft365/services/entra/entra_admin_users_sign_in_frequency_enabled/entra_admin_users_sign_in_frequency_enabled.metadata.json rename to prowler/providers/m365/services/entra/entra_admin_users_sign_in_frequency_enabled/entra_admin_users_sign_in_frequency_enabled.metadata.json index c7dd5caa40..3a872b2768 100644 --- a/prowler/providers/microsoft365/services/entra/entra_admin_users_sign_in_frequency_enabled/entra_admin_users_sign_in_frequency_enabled.metadata.json +++ b/prowler/providers/m365/services/entra/entra_admin_users_sign_in_frequency_enabled/entra_admin_users_sign_in_frequency_enabled.metadata.json @@ -1,5 +1,5 @@ { - "Provider": "microsoft365", + "Provider": "m365", "CheckID": "entra_admin_users_sign_in_frequency_enabled", "CheckTitle": "Ensure Sign-in frequency periodic reauthentication is enabled and properly configured.", "CheckType": [], @@ -23,7 +23,9 @@ "Url": "https://learn.microsoft.com/en-us/entra/identity/conditional-access/concept-session-lifetime#user-sign-in-frequency" } }, - "Categories": [], + "Categories": [ + "e3" + ], "DependsOn": [], "RelatedTo": [], "Notes": "" diff --git a/prowler/providers/microsoft365/services/entra/entra_admin_users_sign_in_frequency_enabled/entra_admin_users_sign_in_frequency_enabled.py b/prowler/providers/m365/services/entra/entra_admin_users_sign_in_frequency_enabled/entra_admin_users_sign_in_frequency_enabled.py similarity index 91% rename from prowler/providers/microsoft365/services/entra/entra_admin_users_sign_in_frequency_enabled/entra_admin_users_sign_in_frequency_enabled.py rename to prowler/providers/m365/services/entra/entra_admin_users_sign_in_frequency_enabled/entra_admin_users_sign_in_frequency_enabled.py index 38558fc0f3..3e63d16f32 100644 --- a/prowler/providers/microsoft365/services/entra/entra_admin_users_sign_in_frequency_enabled/entra_admin_users_sign_in_frequency_enabled.py +++ b/prowler/providers/m365/services/entra/entra_admin_users_sign_in_frequency_enabled/entra_admin_users_sign_in_frequency_enabled.py @@ -1,6 +1,6 @@ -from prowler.lib.check.models import Check, CheckReportMicrosoft365 -from prowler.providers.microsoft365.services.entra.entra_client import entra_client -from prowler.providers.microsoft365.services.entra.entra_service import ( +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.entra.entra_client import entra_client +from prowler.providers.m365.services.entra.entra_service import ( AdminRoles, ConditionalAccessPolicyState, SignInFrequencyInterval, @@ -11,10 +11,10 @@ from prowler.providers.microsoft365.services.entra.entra_service import ( class entra_admin_users_sign_in_frequency_enabled(Check): """Check if Conditional Access policies enforce sign-in frequency for admin users.""" - def execute(self) -> list[CheckReportMicrosoft365]: + def execute(self) -> list[CheckReportM365]: """Validate sign-in frequency enforcement for admin users.""" findings = [] - report = CheckReportMicrosoft365( + report = CheckReportM365( metadata=self.metadata(), resource={}, resource_name="Conditional Access Policies", @@ -40,7 +40,7 @@ class entra_admin_users_sign_in_frequency_enabled(Check): ): continue - report = CheckReportMicrosoft365( + report = CheckReportM365( metadata=self.metadata(), resource=policy, resource_name=policy.display_name, diff --git a/prowler/providers/microsoft365/services/entra/entra_client.py b/prowler/providers/m365/services/entra/entra_client.py similarity index 58% rename from prowler/providers/microsoft365/services/entra/entra_client.py rename to prowler/providers/m365/services/entra/entra_client.py index 1a3b921adf..84c60b40fd 100644 --- a/prowler/providers/microsoft365/services/entra/entra_client.py +++ b/prowler/providers/m365/services/entra/entra_client.py @@ -1,4 +1,4 @@ from prowler.providers.common.provider import Provider -from prowler.providers.microsoft365.services.entra.entra_service import Entra +from prowler.providers.m365.services.entra.entra_service import Entra entra_client = Entra(Provider.get_global_provider()) diff --git a/prowler/providers/m365/services/entra/entra_dynamic_group_for_guests_created/__init__.py b/prowler/providers/m365/services/entra/entra_dynamic_group_for_guests_created/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/microsoft365/services/entra/entra_dynamic_group_for_guests_created/entra_dynamic_group_for_guests_created.metadata.json b/prowler/providers/m365/services/entra/entra_dynamic_group_for_guests_created/entra_dynamic_group_for_guests_created.metadata.json similarity index 96% rename from prowler/providers/microsoft365/services/entra/entra_dynamic_group_for_guests_created/entra_dynamic_group_for_guests_created.metadata.json rename to prowler/providers/m365/services/entra/entra_dynamic_group_for_guests_created/entra_dynamic_group_for_guests_created.metadata.json index 55c2916196..b9cabe1238 100644 --- a/prowler/providers/microsoft365/services/entra/entra_dynamic_group_for_guests_created/entra_dynamic_group_for_guests_created.metadata.json +++ b/prowler/providers/m365/services/entra/entra_dynamic_group_for_guests_created/entra_dynamic_group_for_guests_created.metadata.json @@ -1,5 +1,5 @@ { - "Provider": "microsoft365", + "Provider": "m365", "CheckID": "entra_dynamic_group_for_guests_created", "CheckTitle": "Ensure a dynamic group for guest users is created.", "CheckType": [], @@ -23,7 +23,9 @@ "Url": "https://learn.microsoft.com/en-us/entra/identity/users/groups-create-rule" } }, - "Categories": [], + "Categories": [ + "e3" + ], "DependsOn": [], "RelatedTo": [], "Notes": "" diff --git a/prowler/providers/microsoft365/services/entra/entra_dynamic_group_for_guests_created/entra_dynamic_group_for_guests_created.py b/prowler/providers/m365/services/entra/entra_dynamic_group_for_guests_created/entra_dynamic_group_for_guests_created.py similarity index 84% rename from prowler/providers/microsoft365/services/entra/entra_dynamic_group_for_guests_created/entra_dynamic_group_for_guests_created.py rename to prowler/providers/m365/services/entra/entra_dynamic_group_for_guests_created/entra_dynamic_group_for_guests_created.py index 9bd70f624c..f4ba9ff616 100644 --- a/prowler/providers/microsoft365/services/entra/entra_dynamic_group_for_guests_created/entra_dynamic_group_for_guests_created.py +++ b/prowler/providers/m365/services/entra/entra_dynamic_group_for_guests_created/entra_dynamic_group_for_guests_created.py @@ -1,7 +1,7 @@ from typing import List -from prowler.lib.check.models import Check, CheckReportMicrosoft365 -from prowler.providers.microsoft365.services.entra.entra_client import entra_client +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.entra.entra_client import entra_client class entra_dynamic_group_for_guests_created(Check): @@ -14,7 +14,7 @@ class entra_dynamic_group_for_guests_created(Check): automated enforcement of conditional access policies and reduces manual management of guest access. """ - def execute(self) -> List[CheckReportMicrosoft365]: + def execute(self) -> List[CheckReportM365]: """ Execute the dynamic group for guest users check. @@ -22,7 +22,7 @@ class entra_dynamic_group_for_guests_created(Check): indicating whether at least one dynamic group exists with a membership rule targeting guest users. Returns: - List[CheckReportMicrosoft365]: A list containing a single report with the result of the check. + List[CheckReportM365]: A list containing a single report with the result of the check. """ findings = [] if entra_client.groups: @@ -33,7 +33,7 @@ class entra_dynamic_group_for_guests_created(Check): dynamic_group = group break - report = CheckReportMicrosoft365( + report = CheckReportM365( self.metadata(), resource=dynamic_group if dynamic_group else {}, resource_name=dynamic_group.name if dynamic_group else "Group", diff --git a/prowler/providers/m365/services/entra/entra_identity_protection_sign_in_risk_enabled/__init__.py b/prowler/providers/m365/services/entra/entra_identity_protection_sign_in_risk_enabled/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/microsoft365/services/entra/entra_identity_protection_sign_in_risk_enabled/entra_identity_protection_sign_in_risk_enabled.metadata.json b/prowler/providers/m365/services/entra/entra_identity_protection_sign_in_risk_enabled/entra_identity_protection_sign_in_risk_enabled.metadata.json similarity index 97% rename from prowler/providers/microsoft365/services/entra/entra_identity_protection_sign_in_risk_enabled/entra_identity_protection_sign_in_risk_enabled.metadata.json rename to prowler/providers/m365/services/entra/entra_identity_protection_sign_in_risk_enabled/entra_identity_protection_sign_in_risk_enabled.metadata.json index 039071202c..17e90eadda 100644 --- a/prowler/providers/microsoft365/services/entra/entra_identity_protection_sign_in_risk_enabled/entra_identity_protection_sign_in_risk_enabled.metadata.json +++ b/prowler/providers/m365/services/entra/entra_identity_protection_sign_in_risk_enabled/entra_identity_protection_sign_in_risk_enabled.metadata.json @@ -1,5 +1,5 @@ { - "Provider": "microsoft365", + "Provider": "m365", "CheckID": "entra_identity_protection_sign_in_risk_enabled", "CheckTitle": "Ensure that Identity Protection sign-in risk policies are enabled", "CheckType": [], @@ -23,7 +23,9 @@ "Url": "https://learn.microsoft.com/en-us/entra/id-protection/howto-identity-protection-configure-risk-policies" } }, - "Categories": [], + "Categories": [ + "e5" + ], "DependsOn": [], "RelatedTo": [], "Notes": "" diff --git a/prowler/providers/microsoft365/services/entra/entra_identity_protection_sign_in_risk_enabled/entra_identity_protection_sign_in_risk_enabled.py b/prowler/providers/m365/services/entra/entra_identity_protection_sign_in_risk_enabled/entra_identity_protection_sign_in_risk_enabled.py similarity index 86% rename from prowler/providers/microsoft365/services/entra/entra_identity_protection_sign_in_risk_enabled/entra_identity_protection_sign_in_risk_enabled.py rename to prowler/providers/m365/services/entra/entra_identity_protection_sign_in_risk_enabled/entra_identity_protection_sign_in_risk_enabled.py index 29b33cdc3e..c9878c8315 100644 --- a/prowler/providers/microsoft365/services/entra/entra_identity_protection_sign_in_risk_enabled/entra_identity_protection_sign_in_risk_enabled.py +++ b/prowler/providers/m365/services/entra/entra_identity_protection_sign_in_risk_enabled/entra_identity_protection_sign_in_risk_enabled.py @@ -1,6 +1,6 @@ -from prowler.lib.check.models import Check, CheckReportMicrosoft365 -from prowler.providers.microsoft365.services.entra.entra_client import entra_client -from prowler.providers.microsoft365.services.entra.entra_service import ( +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.entra.entra_client import entra_client +from prowler.providers.m365.services.entra.entra_service import ( ConditionalAccessGrantControl, ConditionalAccessPolicyState, RiskLevel, @@ -14,15 +14,15 @@ class entra_identity_protection_sign_in_risk_enabled(Check): This check ensures that at least one Conditional Access policy is a Identity Protection sign-in risk policy. """ - def execute(self) -> list[CheckReportMicrosoft365]: + def execute(self) -> list[CheckReportM365]: """Execute the check to ensure that at least one Conditional Access policy is a Identity Protection sign-in risk policy. Returns: - list[CheckReportMicrosoft365]: A list containing the results of the check. + list[CheckReportM365]: A list containing the results of the check. """ findings = [] - report = CheckReportMicrosoft365( + report = CheckReportM365( metadata=self.metadata(), resource={}, resource_name="Conditional Access Policies", @@ -56,7 +56,7 @@ class entra_identity_protection_sign_in_risk_enabled(Check): ): continue - report = CheckReportMicrosoft365( + report = CheckReportM365( metadata=self.metadata(), resource=policy, resource_name=policy.display_name, diff --git a/prowler/providers/m365/services/entra/entra_identity_protection_user_risk_enabled/__init__.py b/prowler/providers/m365/services/entra/entra_identity_protection_user_risk_enabled/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/microsoft365/services/entra/entra_identity_protection_user_risk_enabled/entra_identity_protection_user_risk_enabled.metadata.json b/prowler/providers/m365/services/entra/entra_identity_protection_user_risk_enabled/entra_identity_protection_user_risk_enabled.metadata.json similarity index 97% rename from prowler/providers/microsoft365/services/entra/entra_identity_protection_user_risk_enabled/entra_identity_protection_user_risk_enabled.metadata.json rename to prowler/providers/m365/services/entra/entra_identity_protection_user_risk_enabled/entra_identity_protection_user_risk_enabled.metadata.json index 04f94276b9..ed630e4739 100644 --- a/prowler/providers/microsoft365/services/entra/entra_identity_protection_user_risk_enabled/entra_identity_protection_user_risk_enabled.metadata.json +++ b/prowler/providers/m365/services/entra/entra_identity_protection_user_risk_enabled/entra_identity_protection_user_risk_enabled.metadata.json @@ -1,5 +1,5 @@ { - "Provider": "microsoft365", + "Provider": "m365", "CheckID": "entra_identity_protection_user_risk_enabled", "CheckTitle": "Ensure that Identity Protection user risk policies are enabled", "CheckType": [], @@ -23,7 +23,9 @@ "Url": "https://learn.microsoft.com/en-us/entra/id-protection/howto-identity-protection-configure-risk-policies" } }, - "Categories": [], + "Categories": [ + "e5" + ], "DependsOn": [], "RelatedTo": [], "Notes": "" diff --git a/prowler/providers/microsoft365/services/entra/entra_identity_protection_user_risk_enabled/entra_identity_protection_user_risk_enabled.py b/prowler/providers/m365/services/entra/entra_identity_protection_user_risk_enabled/entra_identity_protection_user_risk_enabled.py similarity index 86% rename from prowler/providers/microsoft365/services/entra/entra_identity_protection_user_risk_enabled/entra_identity_protection_user_risk_enabled.py rename to prowler/providers/m365/services/entra/entra_identity_protection_user_risk_enabled/entra_identity_protection_user_risk_enabled.py index f6cb547474..8864663e68 100644 --- a/prowler/providers/microsoft365/services/entra/entra_identity_protection_user_risk_enabled/entra_identity_protection_user_risk_enabled.py +++ b/prowler/providers/m365/services/entra/entra_identity_protection_user_risk_enabled/entra_identity_protection_user_risk_enabled.py @@ -1,6 +1,6 @@ -from prowler.lib.check.models import Check, CheckReportMicrosoft365 -from prowler.providers.microsoft365.services.entra.entra_client import entra_client -from prowler.providers.microsoft365.services.entra.entra_service import ( +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.entra.entra_client import entra_client +from prowler.providers.m365.services.entra.entra_service import ( ConditionalAccessGrantControl, ConditionalAccessPolicyState, GrantControlOperator, @@ -14,15 +14,15 @@ class entra_identity_protection_user_risk_enabled(Check): This check ensures that at least one Conditional Access policy is a Identity Protection user risk policy. """ - def execute(self) -> list[CheckReportMicrosoft365]: + def execute(self) -> list[CheckReportM365]: """Execute the check to ensure that at least one Conditional Access policy is a Identity Protection user risk policy. Returns: - list[CheckReportMicrosoft365]: A list containing the results of the check. + list[CheckReportM365]: A list containing the results of the check. """ findings = [] - report = CheckReportMicrosoft365( + report = CheckReportM365( metadata=self.metadata(), resource={}, resource_name="Conditional Access Policies", @@ -54,7 +54,7 @@ class entra_identity_protection_user_risk_enabled(Check): continue if policy.conditions.user_risk_levels: - report = CheckReportMicrosoft365( + report = CheckReportM365( metadata=self.metadata(), resource=policy, resource_name=policy.display_name, diff --git a/prowler/providers/m365/services/entra/entra_legacy_authentication_blocked/__init__.py b/prowler/providers/m365/services/entra/entra_legacy_authentication_blocked/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/entra/entra_legacy_authentication_blocked/entra_legacy_authentication_blocked.metadata.json b/prowler/providers/m365/services/entra/entra_legacy_authentication_blocked/entra_legacy_authentication_blocked.metadata.json new file mode 100644 index 0000000000..9c7541dfda --- /dev/null +++ b/prowler/providers/m365/services/entra/entra_legacy_authentication_blocked/entra_legacy_authentication_blocked.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "entra_legacy_authentication_blocked", + "CheckTitle": "Ensure that Conditional Access policy blocks legacy authentication", + "CheckType": [], + "ServiceName": "entra", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "critical", + "ResourceType": "Conditional Access Policy", + "Description": "Ensure that Conditional Access policy blocks legacy authentication in Microsoft Entra ID to enforce modern authentication methods and protect against credential-stuffing and brute-force attacks.", + "Risk": "Legacy authentication protocols do not support MFA, making them vulnerable to credential-stuffing and brute-force attacks. Attackers commonly exploit these protocols to bypass security controls and gain unauthorized access.", + "RelatedUrl": "https://learn.microsoft.com/en-us/entra/identity/conditional-access/policy-block-legacy-authentication", + "Remediation": { + "Code": { + "CLI": "", + "NativeIaC": "", + "Other": "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.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Enforce Conditional Access policies to block legacy authentication across all users in Microsoft Entra ID. Ensure all applications and devices use modern authentication methods such as OAuth 2.0. For necessary exceptions (e.g., multifunction printers), configure secure alternatives following Microsoft's mail flow best practices.", + "Url": "https://learn.microsoft.com/en-us/entra/identity/conditional-access/policy-block-legacy-authentication" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/entra/entra_legacy_authentication_blocked/entra_legacy_authentication_blocked.py b/prowler/providers/m365/services/entra/entra_legacy_authentication_blocked/entra_legacy_authentication_blocked.py new file mode 100644 index 0000000000..f625cb6182 --- /dev/null +++ b/prowler/providers/m365/services/entra/entra_legacy_authentication_blocked/entra_legacy_authentication_blocked.py @@ -0,0 +1,73 @@ +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.entra.entra_client import entra_client +from prowler.providers.m365.services.entra.entra_service import ( + ClientAppType, + ConditionalAccessGrantControl, + ConditionalAccessPolicyState, +) + + +class entra_legacy_authentication_blocked(Check): + """Check if at least one Conditional Access policy blocks legacy authentication. + + This check ensures that at least one Conditional Access policy blocks legacy authentication. + """ + + def execute(self) -> list[CheckReportM365]: + """Execute the check to ensure that at least one Conditional Access policy blocks legacy authentication. + + Returns: + list[CheckReportM365]: A list containing the results of the check. + """ + findings = [] + report = CheckReportM365( + metadata=self.metadata(), + resource={}, + resource_name="Conditional Access Policies", + resource_id="conditionalAccessPolicies", + ) + report.status = "FAIL" + report.status_extended = ( + "No Conditional Access Policy blocks legacy authentication." + ) + + for policy in entra_client.conditional_access_policies.values(): + if policy.state == ConditionalAccessPolicyState.DISABLED: + continue + + if "All" not in policy.conditions.user_conditions.included_users: + continue + + if ( + "All" + not in policy.conditions.application_conditions.included_applications + ): + continue + + if ( + ClientAppType.EXCHANGE_ACTIVE_SYNC + not in policy.conditions.client_app_types + or ClientAppType.OTHER_CLIENTS not in policy.conditions.client_app_types + ): + continue + + if ( + ConditionalAccessGrantControl.BLOCK + in policy.grant_controls.built_in_controls + ): + report = CheckReportM365( + metadata=self.metadata(), + resource=policy, + resource_name=policy.display_name, + resource_id=policy.id, + ) + if policy.state == ConditionalAccessPolicyState.ENABLED_FOR_REPORTING: + report.status = "FAIL" + report.status_extended = f"Conditional Access Policy '{policy.display_name}' reports legacy authentication but does not block it." + else: + report.status = "PASS" + report.status_extended = f"Conditional Access Policy '{policy.display_name}' blocks legacy authentication." + break + + findings.append(report) + return findings diff --git a/prowler/providers/m365/services/entra/entra_managed_device_required_for_authentication/__init__.py b/prowler/providers/m365/services/entra/entra_managed_device_required_for_authentication/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/microsoft365/services/entra/entra_managed_device_required_for_authentication/entra_managed_device_required_for_authentication.metadata.json b/prowler/providers/m365/services/entra/entra_managed_device_required_for_authentication/entra_managed_device_required_for_authentication.metadata.json similarity index 97% rename from prowler/providers/microsoft365/services/entra/entra_managed_device_required_for_authentication/entra_managed_device_required_for_authentication.metadata.json rename to prowler/providers/m365/services/entra/entra_managed_device_required_for_authentication/entra_managed_device_required_for_authentication.metadata.json index abaf961476..70d1b60333 100644 --- a/prowler/providers/microsoft365/services/entra/entra_managed_device_required_for_authentication/entra_managed_device_required_for_authentication.metadata.json +++ b/prowler/providers/m365/services/entra/entra_managed_device_required_for_authentication/entra_managed_device_required_for_authentication.metadata.json @@ -1,5 +1,5 @@ { - "Provider": "microsoft365", + "Provider": "m365", "CheckID": "entra_managed_device_required_for_authentication", "CheckTitle": "Ensure that only managed devices are required for authentication", "CheckType": [], @@ -23,7 +23,9 @@ "Url": "https://learn.microsoft.com/en-us/mem/intune/protect/create-conditional-access-intune" } }, - "Categories": [], + "Categories": [ + "e3" + ], "DependsOn": [], "RelatedTo": [], "Notes": "" diff --git a/prowler/providers/microsoft365/services/entra/entra_managed_device_required_for_authentication/entra_managed_device_required_for_authentication.py b/prowler/providers/m365/services/entra/entra_managed_device_required_for_authentication/entra_managed_device_required_for_authentication.py similarity index 82% rename from prowler/providers/microsoft365/services/entra/entra_managed_device_required_for_authentication/entra_managed_device_required_for_authentication.py rename to prowler/providers/m365/services/entra/entra_managed_device_required_for_authentication/entra_managed_device_required_for_authentication.py index 08ba22de9a..c8a8845bd9 100644 --- a/prowler/providers/microsoft365/services/entra/entra_managed_device_required_for_authentication/entra_managed_device_required_for_authentication.py +++ b/prowler/providers/m365/services/entra/entra_managed_device_required_for_authentication/entra_managed_device_required_for_authentication.py @@ -1,6 +1,6 @@ -from prowler.lib.check.models import Check, CheckReportMicrosoft365 -from prowler.providers.microsoft365.services.entra.entra_client import entra_client -from prowler.providers.microsoft365.services.entra.entra_service import ( +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.entra.entra_client import entra_client +from prowler.providers.m365.services.entra.entra_service import ( ConditionalAccessGrantControl, ConditionalAccessPolicyState, GrantControlOperator, @@ -8,20 +8,20 @@ from prowler.providers.microsoft365.services.entra.entra_service import ( class entra_managed_device_required_for_authentication(Check): - """Check if Conditional Access policies deny access to the Microsoft 365 + """Check if Conditional Access policies enforce managed device requirement for authentication. This check ensures that Conditional Access policies are in place to enforce managed device requirement for authentication. """ - def execute(self) -> list[CheckReportMicrosoft365]: + def execute(self) -> list[CheckReportM365]: """Execute the check to ensure that Conditional Access policies enforce managed device requirement for authentication. Returns: - list[CheckReportMicrosoft365]: A list containing the results of the check. + list[CheckReportM365]: A list containing the results of the check. """ findings = [] - report = CheckReportMicrosoft365( + report = CheckReportM365( metadata=self.metadata(), resource={}, resource_name="Conditional Access Policies", @@ -54,7 +54,7 @@ class entra_managed_device_required_for_authentication(Check): continue if policy.grant_controls.operator == GrantControlOperator.OR: - report = CheckReportMicrosoft365( + report = CheckReportM365( metadata=self.metadata(), resource=policy, resource_name=policy.display_name, diff --git a/prowler/providers/m365/services/entra/entra_managed_device_required_for_mfa_registration/__init__.py b/prowler/providers/m365/services/entra/entra_managed_device_required_for_mfa_registration/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/entra/entra_managed_device_required_for_mfa_registration/entra_managed_device_required_for_mfa_registration.metadata.json b/prowler/providers/m365/services/entra/entra_managed_device_required_for_mfa_registration/entra_managed_device_required_for_mfa_registration.metadata.json new file mode 100644 index 0000000000..cba39dd796 --- /dev/null +++ b/prowler/providers/m365/services/entra/entra_managed_device_required_for_mfa_registration/entra_managed_device_required_for_mfa_registration.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "entra_managed_device_required_for_mfa_registration", + "CheckTitle": "Ensure that only managed devices are required for MFA registration", + "CheckType": [], + "ServiceName": "entra", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "critical", + "ResourceType": "Conditional Access Policy", + "Description": "Ensure that only managed devices are required for MFA registration. This ensures that users enroll MFA using secure, organization-controlled devices.", + "Risk": "If users are allowed to register MFA on unmanaged or potentially compromised devices, attackers with stolen credentials may register their own MFA methods, effectively locking out legitimate users and taking over accounts. This increases the risk of unauthorized access, data breaches, and privilege escalation.", + "RelatedUrl": "https://learn.microsoft.com/en-us/entra/identity/conditional-access/overview", + "Remediation": { + "Code": { + "CLI": "", + "NativeIaC": "", + "Other": "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.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Enforce MFA registration only from managed devices by requiring compliance through Intune or Entra hybrid join. This ensures that users enroll MFA using secure, organization-controlled devices.", + "Url": "https://learn.microsoft.com/en-us/entra/identity/conditional-access/policy-all-users-device-registration" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/entra/entra_managed_device_required_for_mfa_registration/entra_managed_device_required_for_mfa_registration.py b/prowler/providers/m365/services/entra/entra_managed_device_required_for_mfa_registration/entra_managed_device_required_for_mfa_registration.py new file mode 100644 index 0000000000..ee5336a4fd --- /dev/null +++ b/prowler/providers/m365/services/entra/entra_managed_device_required_for_mfa_registration/entra_managed_device_required_for_mfa_registration.py @@ -0,0 +1,72 @@ +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.entra.entra_client import entra_client +from prowler.providers.m365.services.entra.entra_service import ( + ConditionalAccessGrantControl, + ConditionalAccessPolicyState, + GrantControlOperator, + UserAction, +) + + +class entra_managed_device_required_for_mfa_registration(Check): + """Check if Conditional Access policies enforce MFA registration on a managed device. + + This check ensures that Conditional Access policies are in place to enforce MFA registration on a managed device. + """ + + def execute(self) -> list[CheckReportM365]: + """Execute the check to ensure that Conditional Access policies enforce MFA registration on a managed device. + + Returns: + list[CheckReportM365]: A list containing the results of the check. + """ + findings = [] + + report = CheckReportM365( + metadata=self.metadata(), + resource={}, + resource_name="Conditional Access Policies", + resource_id="conditionalAccessPolicies", + ) + report.status = "FAIL" + report.status_extended = "No Conditional Access Policy requires a managed device for MFA registration." + + for policy in entra_client.conditional_access_policies.values(): + if policy.state == ConditionalAccessPolicyState.DISABLED: + continue + + if "All" not in policy.conditions.user_conditions.included_users: + continue + + if ( + UserAction.REGISTER_SECURITY_INFO + not in policy.conditions.application_conditions.included_user_actions + ): + continue + + if ( + ConditionalAccessGrantControl.DOMAIN_JOINED_DEVICE + not in policy.grant_controls.built_in_controls + or ConditionalAccessGrantControl.MFA + not in policy.grant_controls.built_in_controls + ): + continue + + if policy.grant_controls.operator == GrantControlOperator.OR: + report = CheckReportM365( + metadata=self.metadata(), + resource=policy, + resource_name=policy.display_name, + resource_id=policy.id, + ) + if policy.state == ConditionalAccessPolicyState.ENABLED_FOR_REPORTING: + report.status = "FAIL" + report.status_extended = f"Conditional Access Policy '{policy.display_name}' reports the requirement of a managed device for MFA registration but does not enforce it." + else: + report.status = "PASS" + report.status_extended = f"Conditional Access Policy '{policy.display_name}' does require a managed device for MFA registration." + break + + findings.append(report) + + return findings diff --git a/prowler/providers/m365/services/entra/entra_password_hash_sync_enabled/__init__.py b/prowler/providers/m365/services/entra/entra_password_hash_sync_enabled/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/microsoft365/services/entra/entra_password_hash_sync_enabled/entra_password_hash_sync_enabled.metadata.json b/prowler/providers/m365/services/entra/entra_password_hash_sync_enabled/entra_password_hash_sync_enabled.metadata.json similarity index 97% rename from prowler/providers/microsoft365/services/entra/entra_password_hash_sync_enabled/entra_password_hash_sync_enabled.metadata.json rename to prowler/providers/m365/services/entra/entra_password_hash_sync_enabled/entra_password_hash_sync_enabled.metadata.json index 9966b06066..ab07066e4c 100644 --- a/prowler/providers/microsoft365/services/entra/entra_password_hash_sync_enabled/entra_password_hash_sync_enabled.metadata.json +++ b/prowler/providers/m365/services/entra/entra_password_hash_sync_enabled/entra_password_hash_sync_enabled.metadata.json @@ -1,5 +1,5 @@ { - "Provider": "microsoft365", + "Provider": "m365", "CheckID": "entra_password_hash_sync_enabled", "CheckTitle": "Ensure that password hash sync is enabled for hybrid deployments.", "CheckType": [], @@ -23,7 +23,9 @@ "Url": "https://learn.microsoft.com/en-us/entra/identity/hybrid/connect/whatis-phs" } }, - "Categories": [], + "Categories": [ + "e3" + ], "DependsOn": [], "RelatedTo": [], "Notes": "Applies only to hybrid Microsoft Entra deployments using Entra Connect sync and does not apply to federated domains." diff --git a/prowler/providers/microsoft365/services/entra/entra_password_hash_sync_enabled/entra_password_hash_sync_enabled.py b/prowler/providers/m365/services/entra/entra_password_hash_sync_enabled/entra_password_hash_sync_enabled.py similarity index 82% rename from prowler/providers/microsoft365/services/entra/entra_password_hash_sync_enabled/entra_password_hash_sync_enabled.py rename to prowler/providers/m365/services/entra/entra_password_hash_sync_enabled/entra_password_hash_sync_enabled.py index 57d4868fc3..25ece6283d 100644 --- a/prowler/providers/microsoft365/services/entra/entra_password_hash_sync_enabled/entra_password_hash_sync_enabled.py +++ b/prowler/providers/m365/services/entra/entra_password_hash_sync_enabled/entra_password_hash_sync_enabled.py @@ -1,7 +1,7 @@ from typing import List -from prowler.lib.check.models import Check, CheckReportMicrosoft365 -from prowler.providers.microsoft365.services.entra.entra_client import entra_client +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.entra.entra_client import entra_client class entra_password_hash_sync_enabled(Check): @@ -16,7 +16,7 @@ class entra_password_hash_sync_enabled(Check): Note: This control applies only to hybrid deployments using Microsoft Entra Connect sync and does not apply to federated domains. """ - def execute(self) -> List[CheckReportMicrosoft365]: + def execute(self) -> List[CheckReportM365]: """ Execute the password hash synchronization requirement check. @@ -24,11 +24,11 @@ class entra_password_hash_sync_enabled(Check): password hash synchronization is enabled. Returns: - List[CheckReportMicrosoft365]: A list containing the report object with the result of the check. + List[CheckReportM365]: A list containing the report object with the result of the check. """ findings = [] for organization in entra_client.organizations: - report = CheckReportMicrosoft365( + report = CheckReportM365( self.metadata(), resource=organization, resource_id=organization.id, diff --git a/prowler/providers/m365/services/entra/entra_policy_ensure_default_user_cannot_create_tenants/__init__.py b/prowler/providers/m365/services/entra/entra_policy_ensure_default_user_cannot_create_tenants/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/microsoft365/services/entra/entra_policy_ensure_default_user_cannot_create_tenants/entra_policy_ensure_default_user_cannot_create_tenants.metadata.json b/prowler/providers/m365/services/entra/entra_policy_ensure_default_user_cannot_create_tenants/entra_policy_ensure_default_user_cannot_create_tenants.metadata.json similarity index 93% rename from prowler/providers/microsoft365/services/entra/entra_policy_ensure_default_user_cannot_create_tenants/entra_policy_ensure_default_user_cannot_create_tenants.metadata.json rename to prowler/providers/m365/services/entra/entra_policy_ensure_default_user_cannot_create_tenants/entra_policy_ensure_default_user_cannot_create_tenants.metadata.json index 12a0da5cf9..b60aee0f5e 100644 --- a/prowler/providers/microsoft365/services/entra/entra_policy_ensure_default_user_cannot_create_tenants/entra_policy_ensure_default_user_cannot_create_tenants.metadata.json +++ b/prowler/providers/m365/services/entra/entra_policy_ensure_default_user_cannot_create_tenants/entra_policy_ensure_default_user_cannot_create_tenants.metadata.json @@ -1,5 +1,5 @@ { - "Provider": "microsoft365", + "Provider": "m365", "CheckID": "entra_policy_ensure_default_user_cannot_create_tenants", "CheckTitle": "Ensure that 'Restrict non-admin users from creating tenants' is set to 'Yes'", "CheckType": [], @@ -7,7 +7,7 @@ "SubServiceName": "", "ResourceIdTemplate": "", "Severity": "high", - "ResourceType": "#microsoft.graph.authorizationPolicy", + "ResourceType": "Authorization Policy", "Description": "Require administrators or appropriately delegated users to create new tenants.", "Risk": "It is recommended to only allow an administrator to create new tenants. This prevent users from creating new Azure AD or Azure AD B2C tenants and ensures that only authorized users are able to do so.", "RelatedUrl": "https://learn.microsoft.com/en-us/entra/fundamentals/users-default-permissions", @@ -23,7 +23,9 @@ "Url": "https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/permissions-reference#tenant-creator" } }, - "Categories": [], + "Categories": [ + "e3" + ], "DependsOn": [], "RelatedTo": [], "Notes": "" diff --git a/prowler/providers/microsoft365/services/entra/entra_policy_ensure_default_user_cannot_create_tenants/entra_policy_ensure_default_user_cannot_create_tenants.py b/prowler/providers/m365/services/entra/entra_policy_ensure_default_user_cannot_create_tenants/entra_policy_ensure_default_user_cannot_create_tenants.py similarity index 82% rename from prowler/providers/microsoft365/services/entra/entra_policy_ensure_default_user_cannot_create_tenants/entra_policy_ensure_default_user_cannot_create_tenants.py rename to prowler/providers/m365/services/entra/entra_policy_ensure_default_user_cannot_create_tenants/entra_policy_ensure_default_user_cannot_create_tenants.py index de2c2112eb..4a8c822b48 100644 --- a/prowler/providers/microsoft365/services/entra/entra_policy_ensure_default_user_cannot_create_tenants/entra_policy_ensure_default_user_cannot_create_tenants.py +++ b/prowler/providers/m365/services/entra/entra_policy_ensure_default_user_cannot_create_tenants/entra_policy_ensure_default_user_cannot_create_tenants.py @@ -1,7 +1,7 @@ from typing import List -from prowler.lib.check.models import Check, CheckReportMicrosoft365 -from prowler.providers.microsoft365.services.entra.entra_client import entra_client +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.entra.entra_client import entra_client class entra_policy_ensure_default_user_cannot_create_tenants(Check): @@ -14,7 +14,7 @@ class entra_policy_ensure_default_user_cannot_create_tenants(Check): metadata: Metadata associated with the check (inherited from Check). """ - def execute(self) -> List[CheckReportMicrosoft365]: + def execute(self) -> List[CheckReportM365]: """Execute the check for tenant creation restrictions. This method examines the authorization policy settings to determine if @@ -22,12 +22,12 @@ class entra_policy_ensure_default_user_cannot_create_tenants(Check): restricted, the check passes. Returns: - List[Check_Report_Microsoft365]: A list containing the result of the check. + List[Check_Report_M365]: A list containing the result of the check. """ findings = [] auth_policy = entra_client.authorization_policy - report = CheckReportMicrosoft365( + report = CheckReportM365( metadata=self.metadata(), resource=auth_policy if auth_policy else {}, resource_name=auth_policy.name if auth_policy else "Authorization Policy", diff --git a/prowler/providers/m365/services/entra/entra_policy_guest_invite_only_for_admin_roles/__init__.py b/prowler/providers/m365/services/entra/entra_policy_guest_invite_only_for_admin_roles/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/entra/entra_policy_guest_invite_only_for_admin_roles/entra_policy_guest_invite_only_for_admin_roles.metadata.json b/prowler/providers/m365/services/entra/entra_policy_guest_invite_only_for_admin_roles/entra_policy_guest_invite_only_for_admin_roles.metadata.json new file mode 100644 index 0000000000..60d4da5290 --- /dev/null +++ b/prowler/providers/m365/services/entra/entra_policy_guest_invite_only_for_admin_roles/entra_policy_guest_invite_only_for_admin_roles.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "entra_policy_guest_invite_only_for_admin_roles", + "CheckTitle": "Ensure that 'Guest invite restrictions' is set to 'Only users assigned to specific admin roles can invite guest users'", + "CheckType": [], + "ServiceName": "entra", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "medium", + "ResourceType": "Authorization Policy", + "Description": "Restrict invitations to users with specific administrative roles only.", + "Risk": "Restricting invitations to users with specific administrator roles ensures that only authorized accounts have access to cloud resources. This helps to maintain 'Need to Know' permissions and prevents inadvertent access to data. By default the setting Guest invite restrictions is set to Anyone in the organization can invite guest users including guests and non-admins. This would allow anyone within the organization to invite guests and non-admins to the tenant, posing a security risk.", + "RelatedUrl": "https://learn.microsoft.com/en-us/entra/external-id/external-collaboration-settings-configure", + "Remediation": { + "Code": { + "CLI": "Update-MgPolicyAuthorizationPolicy -AllowInvitesFrom 'adminsAndGuestInviters'", + "NativeIaC": "", + "Other": "1. Navigate to Microsoft Entra admin center https://entra.microsoft.com/. 2. Expand Identity > External Identities and 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'. 4. Click Save.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Restrict guest user invitations to only designated administrators or the Guest Inviter role to enhance security.", + "Url": "https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/permissions-reference#guest-inviter" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "A more restrictive setting is acceptable, but the minimum requirement is limiting invitations to admins and Guest Inviters." +} diff --git a/prowler/providers/m365/services/entra/entra_policy_guest_invite_only_for_admin_roles/entra_policy_guest_invite_only_for_admin_roles.py b/prowler/providers/m365/services/entra/entra_policy_guest_invite_only_for_admin_roles/entra_policy_guest_invite_only_for_admin_roles.py new file mode 100644 index 0000000000..710b5c524d --- /dev/null +++ b/prowler/providers/m365/services/entra/entra_policy_guest_invite_only_for_admin_roles/entra_policy_guest_invite_only_for_admin_roles.py @@ -0,0 +1,51 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.entra.entra_client import entra_client +from prowler.providers.m365.services.entra.entra_service import InvitationsFrom + + +class entra_policy_guest_invite_only_for_admin_roles(Check): + """Check if guest invitations are restricted to users with specific administrative roles. + + This check verifies the `guest_invite_settings` property of the authorization policy. + If the setting is set to either "adminsAndGuestInviters" or "none", guest invitations + are limited accordingly. Otherwise, they are not restricted. + """ + + def execute(self) -> List[CheckReportM365]: + """ + Execute the guest invitation restriction check. + + Retrieves the authorization policy from the Microsoft Entra client and checks + whether the 'guest_invite_settings' is set to restrict invitations to users with + specific administrative roles only. + + Returns: + List[CheckReportM365]: A list containing a single check report that + details the pass/fail status and description. + """ + findings = [] + auth_policy = entra_client.authorization_policy + + report = CheckReportM365( + metadata=self.metadata(), + resource=auth_policy if auth_policy else {}, + resource_name=auth_policy.name if auth_policy else "Authorization Policy", + resource_id=auth_policy.id if auth_policy else "authorizationPolicy", + ) + report.status = "FAIL" + report.status_extended = "Guest invitations are not restricted to users with specific administrative roles only." + + if ( + getattr(auth_policy, "guest_invite_settings", None) + == InvitationsFrom.ADMINS_AND_GUEST_INVITERS.value + ) or ( + getattr(auth_policy, "guest_invite_settings", None) + == InvitationsFrom.NONE.value + ): + report.status = "PASS" + report.status_extended = "Guest invitations are restricted to users with specific administrative roles only." + + findings.append(report) + return findings diff --git a/prowler/providers/m365/services/entra/entra_policy_guest_users_access_restrictions/__init__.py b/prowler/providers/m365/services/entra/entra_policy_guest_users_access_restrictions/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/entra/entra_policy_guest_users_access_restrictions/entra_policy_guest_users_access_restrictions.metadata.json b/prowler/providers/m365/services/entra/entra_policy_guest_users_access_restrictions/entra_policy_guest_users_access_restrictions.metadata.json new file mode 100644 index 0000000000..601abf8965 --- /dev/null +++ b/prowler/providers/m365/services/entra/entra_policy_guest_users_access_restrictions/entra_policy_guest_users_access_restrictions.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "entra_policy_guest_users_access_restrictions", + "CheckTitle": "Ensure That 'Guest users access restrictions' is set to 'Guest user access is restricted to properties and memberships of their own directory objects'", + "CheckType": [], + "ServiceName": "entra", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "medium", + "ResourceType": "Authorization Policy", + "Description": "Limit guest user permissions.", + "Risk": "Limiting guest access ensures that guest accounts do not have permission for certain directory tasks, such as enumerating users, groups or other directory resources, and cannot be assigned to administrative roles in your directory. Guest access has three levels of restriction. 1. Guest users have the same access as members (most inclusive), 2. Guest users have limited access to properties and memberships of directory objects (default value), 3. Guest user access is restricted to properties and memberships of their own directory objects (most restrictive). The recommended option is the 3rd, most restrictive: 'Guest user access is restricted to their own directory object'.", + "RelatedUrl": "https://learn.microsoft.com/en-us/entra/identity/users/users-restrict-guest-permissions", + "Remediation": { + "Code": { + "CLI": "Update-MgPolicyAuthorizationPolicy -GuestUserRoleId ", + "NativeIaC": "", + "Other": "1. Navigate to Microsoft Entra admin center https://entra.microsoft.com/. 2. Expand Identity > External Identities and select External collaboration settings. 3. Under Guest user access, set 'Guest user access restrictions' to either 'Guest users have limited access to properties and memberships of directory objects' or 'Guest user access is restricted to properties and memberships of their own directory objects (most restrictive)'.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Restrict guest user access in Microsoft Entra to limit the exposure of directory objects and reduce security risks.", + "Url": "https://learn.microsoft.com/en-us/entra/fundamentals/users-default-permissions#member-and-guest-users" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "Either of the two restrictive settings ensures compliance. The most restrictive setting prevents guests from viewing other directory objects entirely." +} diff --git a/prowler/providers/m365/services/entra/entra_policy_guest_users_access_restrictions/entra_policy_guest_users_access_restrictions.py b/prowler/providers/m365/services/entra/entra_policy_guest_users_access_restrictions/entra_policy_guest_users_access_restrictions.py new file mode 100644 index 0000000000..8669135970 --- /dev/null +++ b/prowler/providers/m365/services/entra/entra_policy_guest_users_access_restrictions/entra_policy_guest_users_access_restrictions.py @@ -0,0 +1,50 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.entra.entra_client import entra_client +from prowler.providers.m365.services.entra.entra_service import AuthPolicyRoles + + +class entra_policy_guest_users_access_restrictions(Check): + """Check if guest user access is restricted to their own directory objects. + + This check verifies whether the authorization policy is configured so that guest users + are limited to accessing only the properties and memberships of their own directory objects. + """ + + def execute(self) -> List[CheckReportM365]: + """ + Execute the guest user access restriction check. + + This method retrieves the authorization policy from the M365 Entra client, + and then checks if the 'guest_user_role_id' matches the predefined restricted role ID. + If it matches, the check passes; otherwise, it fails. + + Returns: + List[CheckReportM365]: A list containing a single check report detailing + the status and details of the guest user access restriction. + """ + findings = [] + auth_policy = entra_client.authorization_policy + + report = CheckReportM365( + metadata=self.metadata(), + resource=auth_policy if auth_policy else {}, + resource_name=auth_policy.name if auth_policy else "Authorization Policy", + resource_id=auth_policy.id if auth_policy else "authorizationPolicy", + ) + report.status = "FAIL" + report.status_extended = "Guest user access is not restricted to properties and memberships of their own directory objects" + + if ( + getattr(auth_policy, "guest_user_role_id", None) + == AuthPolicyRoles.GUEST_USER_ACCESS_RESTRICTED.value + ) or ( + getattr(auth_policy, "guest_user_role_id", None) + == AuthPolicyRoles.GUEST_USER.value + ): + report.status = "PASS" + report.status_extended = "Guest user access is restricted to properties and memberships of their own directory objects" + + findings.append(report) + return findings diff --git a/prowler/providers/m365/services/entra/entra_policy_restricts_user_consent_for_apps/__init__.py b/prowler/providers/m365/services/entra/entra_policy_restricts_user_consent_for_apps/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/entra/entra_policy_restricts_user_consent_for_apps/entra_policy_restricts_user_consent_for_apps.metadata.json b/prowler/providers/m365/services/entra/entra_policy_restricts_user_consent_for_apps/entra_policy_restricts_user_consent_for_apps.metadata.json new file mode 100644 index 0000000000..b643fd5b4f --- /dev/null +++ b/prowler/providers/m365/services/entra/entra_policy_restricts_user_consent_for_apps/entra_policy_restricts_user_consent_for_apps.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "entra_policy_restricts_user_consent_for_apps", + "CheckTitle": "Ensure 'User consent for applications' is set to 'Do not allow user consent'", + "CheckType": [], + "ServiceName": "entra", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "high", + "ResourceType": "Authorization Policy", + "Description": "Require administrators to provide consent for applications before use.", + "Risk": "If Microsoft Entra ID is running as an identity provider for third-party applications, permissions and consent should be limited to administrators or pre-approved. Malicious applications may attempt to exfiltrate data or abuse privileged user accounts.", + "RelatedUrl": "https://learn.microsoft.com/en-gb/entra/identity/enterprise-apps/configure-user-consent?pivots=portal", + "Remediation": { + "Code": { + "CLI": "", + "NativeIaC": "", + "Other": "1. Navigate to Microsoft Entra admin center (https://entra.microsoft.com/); 2. Click to expand Identity > Applications and 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.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Disable user consent for applications in the Microsoft Entra admin center. This ensures that end users and group owners cannot grant consent to applications, requiring administrator approval for all future consent operations, thereby reducing the risk of unauthorized access to company data.", + "Url": "https://learn.microsoft.com/en-gb/entra/identity/enterprise-apps/configure-user-consent?pivots=portal" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "Enforcing this setting may create additional requests that administrators need to review." +} diff --git a/prowler/providers/m365/services/entra/entra_policy_restricts_user_consent_for_apps/entra_policy_restricts_user_consent_for_apps.py b/prowler/providers/m365/services/entra/entra_policy_restricts_user_consent_for_apps/entra_policy_restricts_user_consent_for_apps.py new file mode 100644 index 0000000000..1d54ab41df --- /dev/null +++ b/prowler/providers/m365/services/entra/entra_policy_restricts_user_consent_for_apps/entra_policy_restricts_user_consent_for_apps.py @@ -0,0 +1,47 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.entra.entra_client import entra_client + + +class entra_policy_restricts_user_consent_for_apps(Check): + """Check if the authorization policy restricts users from consenting apps. + + This check verifies whether the default user role permissions in Microsoft Entra + prevent users from consenting to apps that access company data on their behalf. + If such consent is disabled, the check passes. + """ + + def execute(self) -> List[CheckReportM365]: + """Execute the check for user consent restrictions. + + Returns: + List[CheckReportM365]: A list containing the result of the check. + """ + findings = [] + auth_policy = entra_client.authorization_policy + + report = CheckReportM365( + metadata=self.metadata(), + resource=auth_policy if auth_policy else {}, + resource_name=auth_policy.name if auth_policy else "Authorization Policy", + resource_id=auth_policy.id if auth_policy else "authorizationPolicy", + ) + report.status = "FAIL" + report.status_extended = ( + "Entra allows users to consent apps accessing company data on their behalf." + ) + + if getattr(auth_policy, "default_user_role_permissions", None) and not any( + "ManagePermissionGrantsForSelf" in policy_assigned + for policy_assigned in getattr( + auth_policy.default_user_role_permissions, + "permission_grant_policies_assigned", + ["ManagePermissionGrantsForSelf.microsoft-user-default-legacy"], + ) + ): + report.status = "PASS" + report.status_extended = "Entra does not allow users to consent apps accessing company data on their behalf." + + findings.append(report) + return findings diff --git a/prowler/providers/microsoft365/services/entra/entra_service.py b/prowler/providers/m365/services/entra/entra_service.py similarity index 76% rename from prowler/providers/microsoft365/services/entra/entra_service.py rename to prowler/providers/m365/services/entra/entra_service.py index 9b83f98fc4..3e548afdba 100644 --- a/prowler/providers/microsoft365/services/entra/entra_service.py +++ b/prowler/providers/m365/services/entra/entra_service.py @@ -1,16 +1,18 @@ +import asyncio from asyncio import gather, get_event_loop from enum import Enum from typing import List, Optional +from uuid import UUID from pydantic import BaseModel from prowler.lib.logger import logger -from prowler.providers.microsoft365.lib.service.service import Microsoft365Service -from prowler.providers.microsoft365.microsoft365_provider import Microsoft365Provider +from prowler.providers.m365.lib.service.service import M365Service +from prowler.providers.m365.m365_provider import M365Provider -class Entra(Microsoft365Service): - def __init__(self, provider: Microsoft365Provider): +class Entra(M365Service): + def __init__(self, provider: M365Provider): super().__init__(provider) loop = get_event_loop() @@ -22,6 +24,7 @@ class Entra(Microsoft365Service): self._get_admin_consent_policy(), self._get_groups(), self._get_organization(), + self._get_users(), ) ) @@ -30,6 +33,7 @@ class Entra(Microsoft365Service): self.admin_consent_policy = attributes[2] self.groups = attributes[3] self.organizations = attributes[4] + self.users = attributes[5] async def _get_authorization_policy(self): logger.info("Entra - Getting authorization policy...") @@ -83,6 +87,8 @@ class Entra(Microsoft365Service): ) ], ), + guest_invite_settings=auth_policy.allow_invites_from, + guest_user_role_id=auth_policy.guest_user_role_id, ) except Exception as error: logger.error( @@ -119,6 +125,14 @@ class Entra(Microsoft365Service): [], ) ], + included_user_actions=[ + UserAction(user_action) + for user_action in getattr( + policy.conditions.applications, + "include_user_actions", + [], + ) + ], ), user_conditions=UsersConditions( included_groups=[ @@ -170,6 +184,14 @@ class Entra(Microsoft365Service): ) ], ), + client_app_types=[ + ClientAppType(client_app_type) + for client_app_type in getattr( + policy.conditions, + "client_app_types", + [], + ) + ], user_risk_levels=[ RiskLevel(risk_level) for risk_level in getattr( @@ -203,6 +225,15 @@ class Entra(Microsoft365Service): getattr(policy.grant_controls, "operator", "AND") ) ), + authentication_strength=( + AuthenticationStrength( + policy.grant_controls.authentication_strength.display_name + ) + if policy.grant_controls is not None + and policy.grant_controls.authentication_strength + is not None + else None + ), ), session_controls=SessionControls( persistent_browser=PersistentBrowser( @@ -261,31 +292,6 @@ class Entra(Microsoft365Service): ) return conditional_access_policies - async def _get_organization(self): - logger.info("Entra - Getting organizations...") - organizations = [] - try: - org_data = await self.client.organization.get() - for org in org_data.value: - sync_enabled = ( - org.on_premises_sync_enabled - if org.on_premises_sync_enabled is not None - else False - ) - - organization = Organization( - id=org.id, - name=org.display_name, - on_premises_sync_enabled=sync_enabled, - ) - organizations.append(organization) - except Exception as error: - logger.error( - f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" - ) - - return organizations - async def _get_admin_consent_policy(self): logger.info("Entra - Getting group settings...") admin_consent_policy = None @@ -323,6 +329,87 @@ class Entra(Microsoft365Service): ) return groups + async def _get_organization(self): + logger.info("Entra - Getting organizations...") + organizations = [] + try: + org_data = await self.client.organization.get() + for org in org_data.value: + sync_enabled = ( + org.on_premises_sync_enabled + if org.on_premises_sync_enabled is not None + else False + ) + + organization = Organization( + id=org.id, + name=org.display_name, + on_premises_sync_enabled=sync_enabled, + ) + organizations.append(organization) + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + + return organizations + + async def _get_users(self): + logger.info("Entra - Getting users...") + users = {} + try: + users_list = await self.client.users.get() + directory_roles = await self.client.directory_roles.get() + + async def fetch_role_members(directory_role): + members_response = ( + await self.client.directory_roles.by_directory_role_id( + directory_role.id + ).members.get() + ) + return directory_role.role_template_id, members_response.value + + tasks = [fetch_role_members(role) for role in directory_roles.value] + roles_members_list = await asyncio.gather(*tasks) + + user_roles_map = {} + for role_template_id, members in roles_members_list: + for member in members: + user_roles_map.setdefault(member.id, []).append(role_template_id) + + try: + registration_details_list = ( + await self.client.reports.authentication_methods.user_registration_details.get() + ) + registration_details = { + detail.id: detail for detail in registration_details_list.value + } + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + registration_details = {} + + for user in users_list.value: + users[user.id] = User( + id=user.id, + name=user.display_name, + on_premises_sync_enabled=( + True if (user.on_premises_sync_enabled) else False + ), + directory_roles_ids=user_roles_map.get(user.id, []), + is_mfa_capable=( + registration_details.get(user.id, {}).is_mfa_capable + if registration_details.get(user.id, None) is not None + else False + ), + ) + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + return users + class ConditionalAccessPolicyState(Enum): ENABLED = "enabled" @@ -330,9 +417,14 @@ class ConditionalAccessPolicyState(Enum): ENABLED_FOR_REPORTING = "enabledForReportingButNotEnforced" +class UserAction(Enum): + REGISTER_SECURITY_INFO = "urn:user:registersecurityinfo" + + class ApplicationsConditions(BaseModel): included_applications: List[str] excluded_applications: List[str] + included_user_actions: List[UserAction] class UsersConditions(BaseModel): @@ -351,9 +443,18 @@ class RiskLevel(Enum): NO_RISK = "none" +class ClientAppType(Enum): + ALL = "all" + BROWSER = "browser" + MOBILE_APPS_AND_DESKTOP_CLIENTS = "mobileAppsAndDesktopClients" + EXCHANGE_ACTIVE_SYNC = "exchangeActiveSync" + OTHER_CLIENTS = "other" + + class Conditions(BaseModel): application_conditions: Optional[ApplicationsConditions] user_conditions: Optional[UsersConditions] + client_app_types: Optional[List[ClientAppType]] user_risk_levels: List[RiskLevel] = [] sign_in_risk_levels: List[RiskLevel] = [] @@ -397,9 +498,16 @@ class GrantControlOperator(Enum): OR = "OR" +class AuthenticationStrength(Enum): + MFA = "Multifactor authentication" + PASSWORDLESS_MFA = "Passwordless MFA" + PHISHING_RESISTANT_MFA = "Phishing-resistant MFA" + + class GrantControls(BaseModel): built_in_controls: List[ConditionalAccessGrantControl] operator: GrantControlOperator + authentication_strength: Optional[AuthenticationStrength] class ConditionalAccessPolicy(BaseModel): @@ -426,6 +534,8 @@ class AuthorizationPolicy(BaseModel): name: str description: str default_user_role_permissions: Optional[DefaultUserRolePermissions] + guest_invite_settings: Optional[str] + guest_user_role_id: Optional[UUID] class Organization(BaseModel): @@ -464,3 +574,24 @@ class AdminRoles(Enum): SECURITY_ADMINISTRATOR = "194ae4cb-b126-40b2-bd5b-6091b380977d" SHAREPOINT_ADMINISTRATOR = "f28a1f50-f6e7-4571-818b-6a12f2af6b6c" USER_ADMINISTRATOR = "fe930be7-5e62-47db-91af-98c3a49a38b1" + + +class User(BaseModel): + id: str + name: str + on_premises_sync_enabled: bool + directory_roles_ids: List[str] = [] + is_mfa_capable: bool = False + + +class InvitationsFrom(Enum): + NONE = "none" + ADMINS_AND_GUEST_INVITERS = "adminsAndGuestInviters" + ADMINS_AND_GUEST_INVITERS_AND_MEMBERS = "adminsAndGuestInvitersAndAllMembers" + EVERYONE = "everyone" + + +class AuthPolicyRoles(Enum): + USER = UUID("a0b1b346-4d3e-4e8b-98f8-753987be4970") + GUEST_USER = UUID("10dae51f-b6af-4016-8d66-8c2a99b929b3") + GUEST_USER_ACCESS_RESTRICTED = UUID("2af84b1e-32c8-42b7-82bc-daa82404023b") diff --git a/prowler/providers/m365/services/entra/entra_thirdparty_integrated_apps_not_allowed/__init__.py b/prowler/providers/m365/services/entra/entra_thirdparty_integrated_apps_not_allowed/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/microsoft365/services/entra/entra_thirdparty_integrated_apps_not_allowed/entra_thirdparty_integrated_apps_not_allowed.metadata.json b/prowler/providers/m365/services/entra/entra_thirdparty_integrated_apps_not_allowed/entra_thirdparty_integrated_apps_not_allowed.metadata.json similarity index 97% rename from prowler/providers/microsoft365/services/entra/entra_thirdparty_integrated_apps_not_allowed/entra_thirdparty_integrated_apps_not_allowed.metadata.json rename to prowler/providers/m365/services/entra/entra_thirdparty_integrated_apps_not_allowed/entra_thirdparty_integrated_apps_not_allowed.metadata.json index 59676ee664..85309efe5e 100644 --- a/prowler/providers/microsoft365/services/entra/entra_thirdparty_integrated_apps_not_allowed/entra_thirdparty_integrated_apps_not_allowed.metadata.json +++ b/prowler/providers/m365/services/entra/entra_thirdparty_integrated_apps_not_allowed/entra_thirdparty_integrated_apps_not_allowed.metadata.json @@ -1,5 +1,5 @@ { - "Provider": "microsoft365", + "Provider": "m365", "CheckID": "entra_thirdparty_integrated_apps_not_allowed", "CheckTitle": "Ensure third party integrated applications are not allowed", "CheckType": [], @@ -23,7 +23,9 @@ "Url": "https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/delegate-app-roles#restrict-who-can-create-applications" } }, - "Categories": [], + "Categories": [ + "e3" + ], "DependsOn": [], "RelatedTo": [], "Notes": "Enforcing this setting will create additional requests for approval that will need to be addressed by an administrator. If permissions are delegated, a user may approve a malevolent third party application, potentially giving it access to your data." diff --git a/prowler/providers/microsoft365/services/entra/entra_thirdparty_integrated_apps_not_allowed/entra_thirdparty_integrated_apps_not_allowed.py b/prowler/providers/m365/services/entra/entra_thirdparty_integrated_apps_not_allowed/entra_thirdparty_integrated_apps_not_allowed.py similarity index 83% rename from prowler/providers/microsoft365/services/entra/entra_thirdparty_integrated_apps_not_allowed/entra_thirdparty_integrated_apps_not_allowed.py rename to prowler/providers/m365/services/entra/entra_thirdparty_integrated_apps_not_allowed/entra_thirdparty_integrated_apps_not_allowed.py index 36ce95286c..5927990dbf 100644 --- a/prowler/providers/microsoft365/services/entra/entra_thirdparty_integrated_apps_not_allowed/entra_thirdparty_integrated_apps_not_allowed.py +++ b/prowler/providers/m365/services/entra/entra_thirdparty_integrated_apps_not_allowed/entra_thirdparty_integrated_apps_not_allowed.py @@ -1,7 +1,7 @@ from typing import List -from prowler.lib.check.models import Check, CheckReportMicrosoft365 -from prowler.providers.microsoft365.services.entra.entra_client import entra_client +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.entra.entra_client import entra_client class entra_thirdparty_integrated_apps_not_allowed(Check): @@ -14,20 +14,20 @@ class entra_thirdparty_integrated_apps_not_allowed(Check): metadata: Metadata associated with the check (inherited from Check). """ - def execute(self) -> List[CheckReportMicrosoft365]: + def execute(self) -> List[CheckReportM365]: """Execute the check to ensure third-party integrated apps are not allowed for non-admin users. This method checks if the authorization policy allows non-admin users to create apps. If the policy allows app creation, the check fails. Otherwise, the check passes. Returns: - List[CheckReportMicrosoft365]: A list containing the result of the check for app creation policy. + List[CheckReportM365]: A list containing the result of the check for app creation policy. """ findings = [] auth_policy = entra_client.authorization_policy if auth_policy: - report = CheckReportMicrosoft365( + report = CheckReportM365( metadata=self.metadata(), resource=auth_policy if auth_policy else {}, resource_name=( diff --git a/prowler/providers/m365/services/entra/entra_users_mfa_capable/__init__.py b/prowler/providers/m365/services/entra/entra_users_mfa_capable/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/entra/entra_users_mfa_capable/entra_users_mfa_capable.metadata.json b/prowler/providers/m365/services/entra/entra_users_mfa_capable/entra_users_mfa_capable.metadata.json new file mode 100644 index 0000000000..594138cccc --- /dev/null +++ b/prowler/providers/m365/services/entra/entra_users_mfa_capable/entra_users_mfa_capable.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "entra_users_mfa_capable", + "CheckTitle": "Ensure all users are MFA capable", + "CheckType": [], + "ServiceName": "entra", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "critical", + "ResourceType": "Conditional Access Policy", + "Description": "Ensure all users are being registered and enabled for multifactor authentication.", + "Risk": "Users who are not MFA capable are more vulnerable to account compromise, as they may rely solely on single-factor authentication (typically a password), which can be easily phished or cracked.", + "RelatedUrl": "https://learn.microsoft.com/en-us/entra/identity/authentication/concept-mfa-howitworks", + "Remediation": { + "Code": { + "CLI": "", + "NativeIaC": "", + "Other": "Remediation steps will depend on the status of the personnel in question or configuration of Conditional Access policies. Administrators should review each user identified on a case-by-case basis.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Ensure all member users are MFA capable by registering and enabling a strong authentication method that complies with the organization's authentication policy. Regularly review user status to detect gaps in MFA deployment and correct misconfigurations.", + "Url": "https://learn.microsoft.com/en-us/entra/identity/authentication/concept-mfa-howitworks" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/entra/entra_users_mfa_capable/entra_users_mfa_capable.py b/prowler/providers/m365/services/entra/entra_users_mfa_capable/entra_users_mfa_capable.py new file mode 100644 index 0000000000..6196f1e9cc --- /dev/null +++ b/prowler/providers/m365/services/entra/entra_users_mfa_capable/entra_users_mfa_capable.py @@ -0,0 +1,45 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.entra.entra_client import entra_client + + +class entra_users_mfa_capable(Check): + """ + Ensure all users are MFA capable. + + This check verifies if users are MFA capable. + + The check fails if any user is not MFA capable. + """ + + def execute(self) -> List[CheckReportM365]: + """ + Execute the admin MFA capable check for all users. + + Iterates over the users retrieved from the Entra client and generates a report + indicating if users are MFA capable. + + Returns: + List[CheckReportM365]: A list containing a single report with the result of the check. + """ + findings = [] + + for user in entra_client.users.values(): + report = CheckReportM365( + metadata=self.metadata(), + resource={}, + resource_name="Users", + resource_id="users", + ) + + if not user.is_mfa_capable: + report.status = "FAIL" + report.status_extended = f"User {user.name} is not MFA capable." + else: + report.status = "PASS" + report.status_extended = f"User {user.name} is MFA capable." + + findings.append(report) + + return findings diff --git a/prowler/providers/m365/services/entra/entra_users_mfa_enabled/__init__.py b/prowler/providers/m365/services/entra/entra_users_mfa_enabled/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/entra/entra_users_mfa_enabled/entra_users_mfa_enabled.metadata.json b/prowler/providers/m365/services/entra/entra_users_mfa_enabled/entra_users_mfa_enabled.metadata.json new file mode 100644 index 0000000000..5d6aff1529 --- /dev/null +++ b/prowler/providers/m365/services/entra/entra_users_mfa_enabled/entra_users_mfa_enabled.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "entra_users_mfa_enabled", + "CheckTitle": "Ensure multifactor authentication is enabled for all users.", + "CheckType": [], + "ServiceName": "entra", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "critical", + "ResourceType": "Conditional Access Policy", + "Description": "Ensure that multifactor authentication (MFA) is enabled for all users to enhance security and reduce the risk of unauthorized access.", + "Risk": "Without multifactor authentication (MFA), users are at a higher risk of account compromise due to credential theft, phishing, or brute-force attacks. A single-factor authentication method, such as passwords, is often insufficient to protect against modern cyber threats.", + "RelatedUrl": "https://learn.microsoft.com/en-us/entra/identity/authentication/tutorial-enable-azure-mfa", + "Remediation": { + "Code": { + "CLI": "", + "NativeIaC": "", + "Other": "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.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Enable multifactor authentication for all users in the Microsoft 365 tenant. Ensure users register at least one strong second-factor authentication method, such as Microsoft Authenticator, SMS codes, or phone calls. Educate users on the importance of MFA and provide clear instructions for enrollment to minimize disruptions.", + "Url": "https://learn.microsoft.com/en-us/entra/identity/authentication/tutorial-enable-azure-mfa" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/entra/entra_users_mfa_enabled/entra_users_mfa_enabled.py b/prowler/providers/m365/services/entra/entra_users_mfa_enabled/entra_users_mfa_enabled.py new file mode 100644 index 0000000000..a87d1edec3 --- /dev/null +++ b/prowler/providers/m365/services/entra/entra_users_mfa_enabled/entra_users_mfa_enabled.py @@ -0,0 +1,77 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.entra.entra_client import entra_client +from prowler.providers.m365.services.entra.entra_service import ( + ConditionalAccessGrantControl, + ConditionalAccessPolicyState, +) + + +class entra_users_mfa_enabled(Check): + """ + Ensure multifactor authentication is enabled for all users. + + This check verifies that at least one Conditional Access Policy in Microsoft Entra, which is in an enabled state, + requires multifactor authentication for all users. + + The check fails if no enabled policy is found that requires MFA for all users. + """ + + def execute(self) -> List[CheckReportM365]: + """ + Execute the admin MFA requirement check for all users. + + Iterates over the Conditional Access Policies retrieved from the Entra client and generates a report + indicating whether MFA is enforced for users in all users. + + Returns: + List[CheckReportM365]: A list containing a single report with the result of the check. + """ + findings = [] + + report = CheckReportM365( + metadata=self.metadata(), + resource={}, + resource_name="Conditional Access Policies", + resource_id="conditionalAccessPolicies", + ) + + report.status = "FAIL" + report.status_extended = ( + "No Conditional Access Policy enforces MFA for all users." + ) + + for policy in entra_client.conditional_access_policies.values(): + if policy.state == ConditionalAccessPolicyState.DISABLED: + continue + + if "All" not in policy.conditions.user_conditions.included_users: + continue + + if ( + "All" + not in policy.conditions.application_conditions.included_applications + ): + continue + + if ( + ConditionalAccessGrantControl.MFA + in policy.grant_controls.built_in_controls + ): + report = CheckReportM365( + metadata=self.metadata(), + resource=entra_client.conditional_access_policies, + resource_name=policy.display_name, + resource_id=policy.id, + ) + if policy.state == ConditionalAccessPolicyState.ENABLED_FOR_REPORTING: + report.status = "FAIL" + report.status_extended = f"Conditional Access Policy '{policy.display_name}' reports MFA requirement for all users but does not enforce it." + else: + report.status = "PASS" + report.status_extended = f"Conditional Access Policy '{policy.display_name}' enforces MFA for all users." + break + + findings.append(report) + return findings diff --git a/prowler/providers/m365/services/exchange/__init__.py b/prowler/providers/m365/services/exchange/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/exchange/exchange_client.py b/prowler/providers/m365/services/exchange/exchange_client.py new file mode 100644 index 0000000000..5be172a2a3 --- /dev/null +++ b/prowler/providers/m365/services/exchange/exchange_client.py @@ -0,0 +1,4 @@ +from prowler.providers.common.provider import Provider +from prowler.providers.m365.services.exchange.exchange_service import Exchange + +exchange_client = Exchange(Provider.get_global_provider()) diff --git a/prowler/providers/m365/services/exchange/exchange_external_email_tagging_enabled/__init__.py b/prowler/providers/m365/services/exchange/exchange_external_email_tagging_enabled/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/exchange/exchange_external_email_tagging_enabled/exchange_external_email_tagging_enabled.metadata.json b/prowler/providers/m365/services/exchange/exchange_external_email_tagging_enabled/exchange_external_email_tagging_enabled.metadata.json new file mode 100644 index 0000000000..04dd408be2 --- /dev/null +++ b/prowler/providers/m365/services/exchange/exchange_external_email_tagging_enabled/exchange_external_email_tagging_enabled.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "exchange_external_email_tagging_enabled", + "CheckTitle": "Ensure email from external senders is identified.", + "CheckType": [], + "ServiceName": "exchange", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "medium", + "ResourceType": "Exchange External Mail Tagging", + "Description": "Ensure that emails from external senders are identified using the native External tag experience in Outlook clients, which helps users recognize messages originating outside the organization.", + "Risk": "If external email tagging is not enabled, users may be unable to quickly identify emails coming from outside the organization, increasing the risk of phishing or social engineering attacks.", + "RelatedUrl": "https://learn.microsoft.com/en-us/powershell/module/exchange/set-externalinoutlook?view=exchange-ps", + "Remediation": { + "Code": { + "CLI": "Set-ExternalInOutlook -Enabled $true", + "NativeIaC": "", + "Other": "", + "Terraform": "" + }, + "Recommendation": { + "Text": "Enable the External tag for Outlook to help users visually identify emails from outside the organization.", + "Url": "https://techcommunity.microsoft.com/t5/exchange-team-blog/native-external-sender-callouts-on-email-in-outlook/ba-p/2250098" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/exchange/exchange_external_email_tagging_enabled/exchange_external_email_tagging_enabled.py b/prowler/providers/m365/services/exchange/exchange_external_email_tagging_enabled/exchange_external_email_tagging_enabled.py new file mode 100644 index 0000000000..5d2c3eeb81 --- /dev/null +++ b/prowler/providers/m365/services/exchange/exchange_external_email_tagging_enabled/exchange_external_email_tagging_enabled.py @@ -0,0 +1,41 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.exchange.exchange_client import exchange_client + + +class exchange_external_email_tagging_enabled(Check): + """Ensure email from external senders is identified. + + This check verifies that the native "External" sender tag feature is enabled + in Exchange so that messages from outside the organization are automatically marked. + """ + + def execute(self) -> List[CheckReportM365]: + """Run the check to validate that external sender tagging is enabled. + + Iterates through the external mail configuration to determine if the + ExternalInOutlook setting is turned on and generates a report accordingly. + + Returns: + List[CheckReportM365]: A list of reports for each organization identity. + """ + findings = [] + + for mail_config in exchange_client.external_mail_config: + report = CheckReportM365( + metadata=self.metadata(), + resource=mail_config, + resource_name=mail_config.identity, + resource_id=mail_config.identity, + ) + report.status = "FAIL" + report.status_extended = f"External sender tagging is disabled for Exchange identity {mail_config.identity}." + + if mail_config.external_mail_tag_enabled: + report.status = "PASS" + report.status_extended = f"External sender tagging is enabled for Exchange identity {mail_config.identity}." + + findings.append(report) + + return findings diff --git a/prowler/providers/m365/services/exchange/exchange_mailbox_audit_bypass_disabled/__init__.py b/prowler/providers/m365/services/exchange/exchange_mailbox_audit_bypass_disabled/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/exchange/exchange_mailbox_audit_bypass_disabled/exchange_mailbox_audit_bypass_disabled.metadata.json b/prowler/providers/m365/services/exchange/exchange_mailbox_audit_bypass_disabled/exchange_mailbox_audit_bypass_disabled.metadata.json new file mode 100644 index 0000000000..e25451be52 --- /dev/null +++ b/prowler/providers/m365/services/exchange/exchange_mailbox_audit_bypass_disabled/exchange_mailbox_audit_bypass_disabled.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "exchange_mailbox_audit_bypass_disabled", + "CheckTitle": "Ensure 'AuditBypassEnabled' is not enabled on any mailbox in the organization.", + "CheckType": [], + "ServiceName": "exchange", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "high", + "ResourceType": "Exchange Mailboxes", + "Description": "Ensure that no mailboxes in the organization have 'AuditBypassEnabled' set to true. This setting prevents mailbox audit logging and can allow unauthorized access without traceability.", + "Risk": "If 'AuditBypassEnabled' is set to true for any mailbox, access to those mailboxes won't be logged, creating a blind spot in forensic analysis and increasing the risk of undetected malicious activity.", + "RelatedUrl": "https://learn.microsoft.com/en-us/powershell/module/exchange/get-mailboxauditbypassassociation?view=exchange-ps", + "Remediation": { + "Code": { + "CLI": "$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 }", + "NativeIaC": "", + "Other": "", + "Terraform": "" + }, + "Recommendation": { + "Text": "Ensure that no mailboxes have 'AuditBypassEnabled' enabled to guarantee full audit logging for all mailbox activities.", + "Url": "https://learn.microsoft.com/en-us/powershell/module/exchange/set-mailboxauditbypassassociation?view=exchange-ps" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/exchange/exchange_mailbox_audit_bypass_disabled/exchange_mailbox_audit_bypass_disabled.py b/prowler/providers/m365/services/exchange/exchange_mailbox_audit_bypass_disabled/exchange_mailbox_audit_bypass_disabled.py new file mode 100644 index 0000000000..449c8f3ac3 --- /dev/null +++ b/prowler/providers/m365/services/exchange/exchange_mailbox_audit_bypass_disabled/exchange_mailbox_audit_bypass_disabled.py @@ -0,0 +1,39 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.exchange.exchange_client import exchange_client + + +class exchange_mailbox_audit_bypass_disabled(Check): + """Verify if Exchange mailbox auditing is enabled. + + This check ensures that mailbox auditing is not bypassed and is properly enabled. + """ + + def execute(self) -> List[CheckReportM365]: + """Run the check to validate Exchange mailbox auditing. + + Iterates through the mailbox configurations to determine if auditing is enabled + and generates a report for each mailbox. + + Returns: + List[CheckReportM365]: A list of reports with the audit status for each mailbox. + """ + findings = [] + for mailbox_config in exchange_client.mailboxes_config: + report = CheckReportM365( + metadata=self.metadata(), + resource=mailbox_config, + resource_name=mailbox_config.name, + resource_id=mailbox_config.id, + ) + report.status = "FAIL" + report.status_extended = f"Exchange mailbox auditing is bypassed and not enabled for mailbox: {mailbox_config.name}." + + if not mailbox_config.audit_bypass_enabled: + report.status = "PASS" + report.status_extended = f"Exchange mailbox auditing is enabled for mailbox: {mailbox_config.name}." + + findings.append(report) + + return findings diff --git a/prowler/providers/m365/services/exchange/exchange_mailbox_policy_additional_storage_restricted/__init__.py b/prowler/providers/m365/services/exchange/exchange_mailbox_policy_additional_storage_restricted/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/exchange/exchange_mailbox_policy_additional_storage_restricted/exchange_mailbox_policy_additional_storage_restricted.metadata.json b/prowler/providers/m365/services/exchange/exchange_mailbox_policy_additional_storage_restricted/exchange_mailbox_policy_additional_storage_restricted.metadata.json new file mode 100644 index 0000000000..3f4edb187d --- /dev/null +++ b/prowler/providers/m365/services/exchange/exchange_mailbox_policy_additional_storage_restricted/exchange_mailbox_policy_additional_storage_restricted.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "exchange_mailbox_policy_additional_storage_restricted", + "CheckTitle": "Ensure additional storage providers are restricted in Outlook on the web.", + "CheckType": [], + "ServiceName": "exchange", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "high", + "ResourceType": "Exchange Mailboxes Policy", + "Description": "Restrict the availability of additional storage providers (e.g., Box, Dropbox, Google Drive) in Outlook on the web to prevent users from accessing external storage services through the OWA interface.", + "Risk": "Allowing users to access third-party storage providers from Outlook on the web increases the risk of data exfiltration and exposure to untrusted content or malware.", + "RelatedUrl": "https://learn.microsoft.com/en-us/powershell/module/exchange/set-owamailboxpolicy?view=exchange-ps", + "Remediation": { + "Code": { + "CLI": "Set-OwaMailboxPolicy -Identity OwaMailboxPolicy-Default -AdditionalStorageProvidersAvailable $false", + "NativeIaC": "", + "Other": "", + "Terraform": "" + }, + "Recommendation": { + "Text": "Disable access to additional storage providers in Outlook on the web to reduce the risk of data leakage.", + "Url": "https://learn.microsoft.com/en-us/powershell/module/exchange/set-owamailboxpolicy?view=exchange-ps" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/exchange/exchange_mailbox_policy_additional_storage_restricted/exchange_mailbox_policy_additional_storage_restricted.py b/prowler/providers/m365/services/exchange/exchange_mailbox_policy_additional_storage_restricted/exchange_mailbox_policy_additional_storage_restricted.py new file mode 100644 index 0000000000..05ecd7cc0d --- /dev/null +++ b/prowler/providers/m365/services/exchange/exchange_mailbox_policy_additional_storage_restricted/exchange_mailbox_policy_additional_storage_restricted.py @@ -0,0 +1,44 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.exchange.exchange_client import exchange_client + + +class exchange_mailbox_policy_additional_storage_restricted(Check): + """Check if Exchange mailbox policy restricts additional storage providers. + + This check ensures that the mailbox policy does not allow additional storage providers. + """ + + def execute(self) -> List[CheckReportM365]: + """Run the check to validate Exchange mailbox policy restrictions. + + Iterates through the mailbox policy configuration to determine if additional storage + providers are restricted and generates a report based on the policy status. + + Returns: + List[CheckReportM365]: A list of reports with the restriction status for the mailbox policy. + """ + findings = [] + mailbox_policy = exchange_client.mailbox_policy + if mailbox_policy: + report = CheckReportM365( + metadata=self.metadata(), + resource=mailbox_policy, + resource_name="Exchange Mailbox Policy", + resource_id=mailbox_policy.id, + ) + report.status = "FAIL" + report.status_extended = ( + "Exchange mailbox policy allows additional storage providers." + ) + + if not mailbox_policy.additional_storage_enabled: + report.status = "PASS" + report.status_extended = ( + "Exchange mailbox policy restricts additional storage providers." + ) + + findings.append(report) + + return findings diff --git a/prowler/providers/m365/services/exchange/exchange_organization_mailbox_auditing_enabled/__init__.py b/prowler/providers/m365/services/exchange/exchange_organization_mailbox_auditing_enabled/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/exchange/exchange_organization_mailbox_auditing_enabled/exchange_organization_mailbox_auditing_enabled.metadata.json b/prowler/providers/m365/services/exchange/exchange_organization_mailbox_auditing_enabled/exchange_organization_mailbox_auditing_enabled.metadata.json new file mode 100644 index 0000000000..f1884cde7e --- /dev/null +++ b/prowler/providers/m365/services/exchange/exchange_organization_mailbox_auditing_enabled/exchange_organization_mailbox_auditing_enabled.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "exchange_organization_mailbox_auditing_enabled", + "CheckTitle": "Ensure AuditDisabled organizationally is set to False.", + "CheckType": [], + "ServiceName": "exchange", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "high", + "ResourceType": "Exchange Organization Configuration", + "Description": "Ensure that the AuditDisabled property is set to False at the organizational level in Exchange Online. This enables mailbox auditing by default for all mailboxes and overrides individual mailbox settings.", + "Risk": "If mailbox auditing is disabled at the organization level, no mailbox actions are audited, limiting forensic investigation capabilities and exposing the organization to undetected malicious activity.", + "RelatedUrl": "https://learn.microsoft.com/en-us/purview/audit-mailboxes?view=o365-worldwide", + "Remediation": { + "Code": { + "CLI": "Set-OrganizationConfig -AuditDisabled $false", + "NativeIaC": "", + "Other": "", + "Terraform": "" + }, + "Recommendation": { + "Text": "Set AuditDisabled to False at the organization level to ensure mailbox auditing is always enforced.", + "Url": "https://learn.microsoft.com/en-us/powershell/module/exchange/set-organizationconfig?view=exchange-ps#-auditdisabled" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/exchange/exchange_organization_mailbox_auditing_enabled/exchange_organization_mailbox_auditing_enabled.py b/prowler/providers/m365/services/exchange/exchange_organization_mailbox_auditing_enabled/exchange_organization_mailbox_auditing_enabled.py new file mode 100644 index 0000000000..2e4cdaedea --- /dev/null +++ b/prowler/providers/m365/services/exchange/exchange_organization_mailbox_auditing_enabled/exchange_organization_mailbox_auditing_enabled.py @@ -0,0 +1,44 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.exchange.exchange_client import exchange_client + + +class exchange_organization_mailbox_auditing_enabled(Check): + """Check if Exchange mailbox auditing is enabled. + + Attributes: + metadata: Metadata associated with the check (inherited from Check). + """ + + def execute(self) -> List[CheckReportM365]: + """Execute the check for Exchange mailbox auditing. + + This method checks if mailbox auditing is enabled in the Exchange organization configuration. + + Returns: + List[CheckReportM365]: A list of reports containing the result of the check. + """ + findings = [] + organization_config = exchange_client.organization_config + if organization_config: + report = CheckReportM365( + metadata=self.metadata(), + resource=organization_config, + resource_name=organization_config.name, + resource_id=organization_config.guid, + ) + report.status = "FAIL" + report.status_extended = ( + "Exchange mailbox auditing is not enabled on your organization." + ) + + if not organization_config.audit_disabled: + report.status = "PASS" + report.status_extended = ( + "Exchange mailbox auditing is enabled on your organization." + ) + + findings.append(report) + + return findings diff --git a/prowler/providers/m365/services/exchange/exchange_organization_mailtips_enabled/__init__.py b/prowler/providers/m365/services/exchange/exchange_organization_mailtips_enabled/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/exchange/exchange_organization_mailtips_enabled/exchange_organization_mailtips_enabled.metadata.json b/prowler/providers/m365/services/exchange/exchange_organization_mailtips_enabled/exchange_organization_mailtips_enabled.metadata.json new file mode 100644 index 0000000000..d73b4f1bf8 --- /dev/null +++ b/prowler/providers/m365/services/exchange/exchange_organization_mailtips_enabled/exchange_organization_mailtips_enabled.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "exchange_organization_mailtips_enabled", + "CheckTitle": "Ensure MailTips are enabled for end users.", + "CheckType": [], + "ServiceName": "exchange", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "medium", + "ResourceType": "Exchange Organization Configuration", + "Description": "Ensure that MailTips are enabled in Exchange Online to provide users with informative messages while composing emails, helping to avoid issues such as sending to large groups or external recipients unintentionally.", + "Risk": "Without MailTips, users may inadvertently send sensitive information externally or generate non-delivery reports, leading to communication errors and potential data exposure.", + "RelatedUrl": "https://learn.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/mailtips/mailtips", + "Remediation": { + "Code": { + "CLI": "$TipsParams = @{ MailTipsAllTipsEnabled = $true; MailTipsExternalRecipientsTipsEnabled = $true; MailTipsGroupMetricsEnabled = $true; MailTipsLargeAudienceThreshold = '25' }; Set-OrganizationConfig @TipsParams", + "NativeIaC": "", + "Other": "", + "Terraform": "" + }, + "Recommendation": { + "Text": "Enable MailTips features in Exchange Online and configure the large audience threshold appropriately to assist users when composing emails.", + "Url": "https://learn.microsoft.com/en-us/powershell/module/exchange/set-organizationconfig?view=exchange-ps" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/exchange/exchange_organization_mailtips_enabled/exchange_organization_mailtips_enabled.py b/prowler/providers/m365/services/exchange/exchange_organization_mailtips_enabled/exchange_organization_mailtips_enabled.py new file mode 100644 index 0000000000..52aa8dc060 --- /dev/null +++ b/prowler/providers/m365/services/exchange/exchange_organization_mailtips_enabled/exchange_organization_mailtips_enabled.py @@ -0,0 +1,54 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.exchange.exchange_client import exchange_client + + +class exchange_organization_mailtips_enabled(Check): + """ + Check if MailTips are enabled for Exchange Online. + + Attributes: + metadata: Metadata associated with the check (inherited from Check). + """ + + def execute(self) -> List[CheckReportM365]: + """ + Execute the check for MailTips in Exchange Online. + + This method checks if MailTips are enabled in the Exchange organization configuration. + + Returns: + List[CheckReportM365]: A list of reports containing the result of the check. + """ + findings = [] + organization_config = exchange_client.organization_config + if organization_config: + report = CheckReportM365( + metadata=self.metadata(), + resource=organization_config, + resource_name=organization_config.name, + resource_id=organization_config.guid, + ) + report.status = "FAIL" + report.status_extended = ( + "MailTips are not fully enabled for Exchange Online." + ) + + if ( + organization_config.mailtips_enabled + and organization_config.mailtips_external_recipient_enabled + and organization_config.mailtips_group_metrics_enabled + and organization_config.mailtips_large_audience_threshold + <= exchange_client.audit_config.get( + "recommended_mailtips_large_audience_threshold", 25 + ) + ): + report.status = "PASS" + report.status_extended = ( + "MailTips are fully enabled for Exchange Online." + ) + + findings.append(report) + + return findings diff --git a/prowler/providers/m365/services/exchange/exchange_organization_modern_authentication_enabled/__init__.py b/prowler/providers/m365/services/exchange/exchange_organization_modern_authentication_enabled/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/exchange/exchange_organization_modern_authentication_enabled/exchange_organization_modern_authentication_enabled.metadata.json b/prowler/providers/m365/services/exchange/exchange_organization_modern_authentication_enabled/exchange_organization_modern_authentication_enabled.metadata.json new file mode 100644 index 0000000000..de57477a8b --- /dev/null +++ b/prowler/providers/m365/services/exchange/exchange_organization_modern_authentication_enabled/exchange_organization_modern_authentication_enabled.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "exchange_organization_modern_authentication_enabled", + "CheckTitle": "Ensure Modern Authentication for Exchange Online is enabled.", + "CheckType": [], + "ServiceName": "exchange", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "critical", + "ResourceType": "Exchange Organization Configuration", + "Description": "Ensure that modern authentication is enabled for Exchange Online, requiring exchange and mailboxes clients to use strong authentication mechanisms instead of basic authentication.", + "Risk": "If modern authentication is not enabled, Exchange Online email clients may fall back to basic authentication, making it easier for attackers to bypass multifactor authentication and compromise user credentials.", + "RelatedUrl": "https://learn.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/enable-or-disable-modern-authentication-in-exchange-online", + "Remediation": { + "Code": { + "CLI": "Set-OrganizationConfig -OAuth2ClientProfileEnabled $True", + "NativeIaC": "", + "Other": "", + "Terraform": "" + }, + "Recommendation": { + "Text": "Enable modern authentication in Exchange Online to enforce secure authentication methods for email clients.", + "Url": "https://learn.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/enable-or-disable-modern-authentication-in-exchange-online" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/exchange/exchange_organization_modern_authentication_enabled/exchange_organization_modern_authentication_enabled.py b/prowler/providers/m365/services/exchange/exchange_organization_modern_authentication_enabled/exchange_organization_modern_authentication_enabled.py new file mode 100644 index 0000000000..93b13d133d --- /dev/null +++ b/prowler/providers/m365/services/exchange/exchange_organization_modern_authentication_enabled/exchange_organization_modern_authentication_enabled.py @@ -0,0 +1,46 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.exchange.exchange_client import exchange_client + + +class exchange_organization_modern_authentication_enabled(Check): + """ + Check if Modern Authentication is enabled for Exchange Online. + + Attributes: + metadata: Metadata associated with the check (inherited from Check). + """ + + def execute(self) -> List[CheckReportM365]: + """ + Execute the check for Modern Authentication in Exchange Online. + + This method checks if Modern Authentication is enabled in the Exchange organization configuration. + + Returns: + List[CheckReportM365]: A list of reports containing the result of the check. + """ + findings = [] + organization_config = exchange_client.organization_config + if organization_config: + report = CheckReportM365( + metadata=self.metadata(), + resource=organization_config, + resource_name=organization_config.name, + resource_id=organization_config.guid, + ) + report.status = "FAIL" + report.status_extended = ( + "Modern Authentication is not enabled for Exchange Online." + ) + + if organization_config.oauth_enabled: + report.status = "PASS" + report.status_extended = ( + "Modern Authentication is enabled for Exchange Online." + ) + + findings.append(report) + + return findings diff --git a/prowler/providers/m365/services/exchange/exchange_roles_assignment_policy_addins_disabled/__init__.py b/prowler/providers/m365/services/exchange/exchange_roles_assignment_policy_addins_disabled/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/exchange/exchange_roles_assignment_policy_addins_disabled/exchange_roles_assignment_policy_addins_disabled.metadata.json b/prowler/providers/m365/services/exchange/exchange_roles_assignment_policy_addins_disabled/exchange_roles_assignment_policy_addins_disabled.metadata.json new file mode 100644 index 0000000000..d558b1e514 --- /dev/null +++ b/prowler/providers/m365/services/exchange/exchange_roles_assignment_policy_addins_disabled/exchange_roles_assignment_policy_addins_disabled.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "exchange_roles_assignment_policy_addins_disabled", + "CheckTitle": "Ensure there is no policy with Outlook add-ins allowed.", + "CheckType": [], + "ServiceName": "exchange", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "high", + "ResourceType": "Exchange Role Assignment Policy", + "Description": "Restricting users from installing Outlook add-ins reduces the risk of data exposure or exploitation through unapproved or vulnerable add-ins.", + "Risk": "Allowing users to install add-ins may expose sensitive information or introduce malicious behavior through third-party integrations. Disabling this capability mitigates the risk of unauthorized data access.", + "RelatedUrl": "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", + "Remediation": { + "Code": { + "CLI": "$policy = \"Role Assignment Policy - Prevent Add-ins\"; $roles = \"MyTextMessaging\", \"MyDistributionGroups\", \"MyMailSubscriptions\", \"MyBaseOptions\", \"MyVoiceMail\", \"MyProfileInformation\", \"MyContactInformation\", \"MyRetentionPolicies\", \"MyDistributionGroupMembership\"; New-RoleAssignmentPolicy -Name $policy -Roles $roles; Set-RoleAssignmentPolicy -id $policy -IsDefault; Get-EXOMailbox -ResultSize Unlimited | Set-Mailbox -RoleAssignmentPolicy $policy", + "NativeIaC": "", + "Other": "1. Navigate to Exchange admin center https://admin.exchange.microsoft.com. 2. Click to expand Roles > User roles. 3. Select Default Role Assignment Policy. 4. In the right pane, click Manage permissions. 5. Uncheck My Custom Apps, My Marketplace Apps and My ReadWriteMailboxApps under Other roles. 6. Save changes.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Restrict Outlook add-in installation by updating the Role Assignment Policy to exclude roles that allow app installation.", + "Url": "https://learn.microsoft.com/en-us/exchange/permissions-exo/role-assignment-policies" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/exchange/exchange_roles_assignment_policy_addins_disabled/exchange_roles_assignment_policy_addins_disabled.py b/prowler/providers/m365/services/exchange/exchange_roles_assignment_policy_addins_disabled/exchange_roles_assignment_policy_addins_disabled.py new file mode 100644 index 0000000000..74f770352b --- /dev/null +++ b/prowler/providers/m365/services/exchange/exchange_roles_assignment_policy_addins_disabled/exchange_roles_assignment_policy_addins_disabled.py @@ -0,0 +1,50 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.exchange.exchange_client import exchange_client +from prowler.providers.m365.services.exchange.exchange_service import AddinRoles + + +class exchange_roles_assignment_policy_addins_disabled(Check): + """Check if any Exchange role assignment policy allows Outlook add-ins. + + Attributes: + metadata: Metadata associated with the check (inherited from Check). + """ + + def execute(self) -> List[CheckReportM365]: + """Execute the check for role assignment policies that allow Outlook add-ins. + + This method checks all Exchange Online Role Assignment Policies to verify + whether any of them allow the installation of add-ins by including risky roles. + + Returns: + List[CheckReportM365]: A list of reports containing the result of the check. + """ + findings = [] + + addin_roles = [e.value for e in AddinRoles] + + for policy in exchange_client.role_assignment_policies: + report = CheckReportM365( + metadata=self.metadata(), + resource=policy, + resource_name=policy.name, + resource_id=policy.id, + ) + + report.status = "PASS" + report.status_extended = f"Role assignment policy '{policy.name}' does not allow Outlook add-ins." + + risky_roles_found = [] + for role in policy.assigned_roles: + if role in addin_roles: + risky_roles_found.append(role) + + if risky_roles_found: + report.status = "FAIL" + report.status_extended = f"Role assignment policy '{policy.name}' allows Outlook add-ins via roles: {', '.join(risky_roles_found)}." + + findings.append(report) + + return findings diff --git a/prowler/providers/m365/services/exchange/exchange_service.py b/prowler/providers/m365/services/exchange/exchange_service.py new file mode 100644 index 0000000000..40dc8c3893 --- /dev/null +++ b/prowler/providers/m365/services/exchange/exchange_service.py @@ -0,0 +1,341 @@ +from enum import Enum +from typing import Optional + +from pydantic import BaseModel + +from prowler.lib.logger import logger +from prowler.providers.m365.lib.service.service import M365Service +from prowler.providers.m365.m365_provider import M365Provider + + +class Exchange(M365Service): + def __init__(self, provider: M365Provider): + super().__init__(provider) + self.organization_config = None + self.mailboxes_config = [] + self.external_mail_config = [] + self.transport_rules = [] + self.transport_config = None + self.mailbox_policy = None + self.role_assignment_policies = [] + self.mailbox_audit_properties = [] + + if self.powershell: + self.powershell.connect_exchange_online() + self.organization_config = self._get_organization_config() + self.mailboxes_config = self._get_mailbox_audit_config() + self.external_mail_config = self._get_external_mail_config() + self.transport_rules = self._get_transport_rules() + self.transport_config = self._get_transport_config() + self.mailbox_policy = self._get_mailbox_policy() + self.role_assignment_policies = self._get_role_assignment_policies() + self.mailbox_audit_properties = self._get_mailbox_audit_properties() + self.powershell.close() + + def _get_organization_config(self): + logger.info("Microsoft365 - Getting Exchange Organization configuration...") + organization_config = None + try: + organization_configuration = self.powershell.get_organization_config() + if organization_configuration: + organization_config = Organization( + name=organization_configuration.get("Name", ""), + guid=organization_configuration.get("Guid", ""), + audit_disabled=organization_configuration.get( + "AuditDisabled", False + ), + oauth_enabled=organization_configuration.get( + "OAuth2ClientProfileEnabled", True + ), + mailtips_enabled=organization_configuration.get( + "MailTipsAllTipsEnabled", True + ), + mailtips_external_recipient_enabled=organization_configuration.get( + "MailTipsExternalRecipientsTipsEnabled", False + ), + mailtips_group_metrics_enabled=organization_configuration.get( + "MailTipsGroupMetricsEnabled", True + ), + mailtips_large_audience_threshold=organization_configuration.get( + "MailTipsLargeAudienceThreshold", 25 + ), + ) + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + return organization_config + + def _get_mailbox_audit_config(self): + logger.info("Microsoft365 - Getting mailbox audit configuration...") + mailboxes_config = [] + try: + mailbox_audit_data = self.powershell.get_mailbox_audit_config() + for mailbox_audit_config in mailbox_audit_data: + mailboxes_config.append( + MailboxAuditConfig( + name=mailbox_audit_config.get("Name", ""), + id=mailbox_audit_config.get("Id", ""), + audit_bypass_enabled=mailbox_audit_config.get( + "AuditBypassEnabled", True + ), + ) + ) + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + return mailboxes_config + + def _get_external_mail_config(self): + logger.info("Microsoft365 - Getting external mail configuration...") + external_mail_config = [] + try: + external_mail_configuration = self.powershell.get_external_mail_config() + if not external_mail_configuration: + return external_mail_config + if isinstance(external_mail_configuration, dict): + external_mail_configuration = [external_mail_configuration] + for external_mail in external_mail_configuration: + if external_mail: + external_mail_config.append( + ExternalMailConfig( + identity=external_mail.get("Identity", ""), + external_mail_tag_enabled=external_mail.get( + "Enabled", False + ), + ) + ) + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + return external_mail_config + + def _get_transport_rules(self): + logger.info("Microsoft365 - Getting transport rules configuration...") + transport_rules = [] + try: + rules_data = self.powershell.get_transport_rules() + if not rules_data: + return transport_rules + if isinstance(rules_data, dict): + rules_data = [rules_data] + for rule in rules_data: + if rule: + transport_rules.append( + TransportRule( + name=rule.get("Name", ""), + scl=rule.get("SetSCL", None), + sender_domain_is=rule.get("SenderDomainIs", []), + redirect_message_to=rule.get("RedirectMessageTo", None), + ) + ) + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + return transport_rules + + def _get_transport_config(self): + logger.info("Microsoft365 - Getting transport configuration...") + transport_config = [] + try: + transport_configuration = self.powershell.get_transport_config() + if transport_configuration: + transport_config = TransportConfig( + smtp_auth_disabled=transport_configuration.get( + "SmtpClientAuthenticationDisabled", False + ), + ) + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + return transport_config + + def _get_mailbox_policy(self): + logger.info("Microsoft365 - Getting mailbox policy configuration...") + mailboxes_policy = None + try: + mailbox_policy = self.powershell.get_mailbox_policy() + if mailbox_policy: + mailboxes_policy = MailboxPolicy( + id=mailbox_policy.get("Id", ""), + additional_storage_enabled=mailbox_policy.get( + "AdditionalStorageProvidersAvailable", True + ), + ) + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + return mailboxes_policy + + def _get_role_assignment_policies(self): + logger.info("Microsoft365 - Getting role assignment policies...") + role_assignment_policies = [] + try: + policies_data = self.powershell.get_role_assignment_policies() + if not policies_data: + return role_assignment_policies + if isinstance(policies_data, dict): + policies_data = [policies_data] + for policy in policies_data: + if policy: + role_assignment_policies.append( + RoleAssignmentPolicy( + name=policy.get("Name", ""), + id=policy.get("Guid", ""), + assigned_roles=policy.get("AssignedRoles", []), + ) + ) + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + return role_assignment_policies + + def _get_mailbox_audit_properties(self): + logger.info("Microsoft365 - Getting mailbox audit properties...") + mailbox_audit_properties = [] + try: + mailbox_audit_properties_info = ( + self.powershell.get_mailbox_audit_properties() + ) + if not mailbox_audit_properties_info: + return mailbox_audit_properties + if isinstance(mailbox_audit_properties_info, dict): + mailbox_audit_properties_info = [mailbox_audit_properties_info] + for mailbox_audit_property in mailbox_audit_properties_info: + if mailbox_audit_property: + mailbox_audit_properties.append( + MailboxAuditProperties( + name=mailbox_audit_property.get("UserPrincipalName", ""), + audit_enabled=mailbox_audit_property.get( + "AuditEnabled", False + ), + audit_admin=mailbox_audit_property.get("AuditAdmin", []), + audit_delegate=mailbox_audit_property.get( + "AuditDelegate", [] + ), + audit_owner=mailbox_audit_property.get("AuditOwner", []), + audit_log_age=int( + mailbox_audit_property.get( + "AuditLogAgeLimit", "90.00:00:00" + ).split(".")[0] + ), + identity=mailbox_audit_property.get("Identity", ""), + ) + ) + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + return mailbox_audit_properties + + +class Organization(BaseModel): + name: str + guid: str + audit_disabled: bool + oauth_enabled: bool + mailtips_enabled: bool + mailtips_external_recipient_enabled: bool + mailtips_group_metrics_enabled: bool + mailtips_large_audience_threshold: int + + +class MailboxAuditConfig(BaseModel): + name: str + id: str + audit_bypass_enabled: bool + + +class ExternalMailConfig(BaseModel): + identity: str + external_mail_tag_enabled: bool + + +class TransportRule(BaseModel): + name: str + scl: Optional[int] + sender_domain_is: list[str] + redirect_message_to: Optional[list[str]] + + +class TransportConfig(BaseModel): + smtp_auth_disabled: bool + + +class MailboxPolicy(BaseModel): + id: str + additional_storage_enabled: bool + + +class RoleAssignmentPolicy(BaseModel): + name: str + id: str + assigned_roles: list[str] + + +class AddinRoles(Enum): + MY_CUSTOM_APPS = "My Custom Apps" + MY_MARKETPLACE_APPS = "My Marketplace Apps" + MY_READWRITE_MAILBOX_APPS = "My ReadWriteMailbox Apps" + + +class MailboxAuditProperties(BaseModel): + name: str + audit_enabled: bool + audit_admin: list[str] + audit_delegate: list[str] + audit_owner: list[str] + audit_log_age: int + identity: str + + +class AuditAdmin(Enum): + APPLY_RECORD = "ApplyRecord" + COPY = "Copy" + CREATE = "Create" + FOLDER_BIND = "FolderBind" + HARD_DELETE = "HardDelete" + MOVE = "Move" + MOVE_TO_DELETED_ITEMS = "MoveToDeletedItems" + SEND_AS = "SendAs" + SEND_ON_BEHALF = "SendOnBehalf" + SOFT_DELETE = "SoftDelete" + UPDATE = "Update" + UPDATE_CALENDAR_DELEGATION = "UpdateCalendarDelegation" + UPDATE_FOLDER_PERMISSIONS = "UpdateFolderPermissions" + UPDATE_INBOX_RULES = "UpdateInboxRules" + + +class AuditDelegate(Enum): + APPLY_RECORD = "ApplyRecord" + CREATE = "Create" + FOLDER_BIND = "FolderBind" + HARD_DELETE = "HardDelete" + MOVE = "Move" + MOVE_TO_DELETED_ITEMS = "MoveToDeletedItems" + SEND_AS = "SendAs" + SEND_ON_BEHALF = "SendOnBehalf" + SOFT_DELETE = "SoftDelete" + UPDATE = "Update" + UPDATE_FOLDER_PERMISSIONS = "UpdateFolderPermissions" + UPDATE_INBOX_RULES = "UpdateInboxRules" + + +class AuditOwner(Enum): + APPLY_RECORD = "ApplyRecord" + CREATE = "Create" + HARD_DELETE = "HardDelete" + MAILBOX_LOGIN = "MailboxLogin" + MOVE = "Move" + MOVE_TO_DELETED_ITEMS = "MoveToDeletedItems" + SOFT_DELETE = "SoftDelete" + UPDATE = "Update" + UPDATE_CALENDAR_DELEGATION = "UpdateCalendarDelegation" + UPDATE_FOLDER_PERMISSIONS = "UpdateFolderPermissions" + UPDATE_INBOX_RULES = "UpdateInboxRules" diff --git a/prowler/providers/m365/services/exchange/exchange_transport_config_smtp_auth_disabled/__init__.py b/prowler/providers/m365/services/exchange/exchange_transport_config_smtp_auth_disabled/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/exchange/exchange_transport_config_smtp_auth_disabled/exchange_transport_config_smtp_auth_disabled.metadata.json b/prowler/providers/m365/services/exchange/exchange_transport_config_smtp_auth_disabled/exchange_transport_config_smtp_auth_disabled.metadata.json new file mode 100644 index 0000000000..b9b7c02983 --- /dev/null +++ b/prowler/providers/m365/services/exchange/exchange_transport_config_smtp_auth_disabled/exchange_transport_config_smtp_auth_disabled.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "exchange_transport_config_smtp_auth_disabled", + "CheckTitle": "Ensure SMTP AUTH is disabled.", + "CheckType": [], + "ServiceName": "exchange", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "high", + "ResourceType": "Exchange Transport Config", + "Description": "Ensure that SMTP AUTH is disabled at the organization level in Exchange Online to reduce exposure to legacy protocols that can be exploited for malicious use.", + "Risk": "Leaving SMTP AUTH enabled allows legacy clients to authenticate using outdated methods, increasing the risk of credential compromise and unauthorized email sending.", + "RelatedUrl": "https://learn.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/authenticated-client-smtp-submission", + "Remediation": { + "Code": { + "CLI": "Set-TransportConfig -SmtpClientAuthenticationDisabled $true", + "NativeIaC": "", + "Other": "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.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Disable SMTP AUTH at the organization level to support secure, modern authentication practices and block legacy protocol usage.", + "Url": "https://learn.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/authenticated-client-smtp-submission" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/exchange/exchange_transport_config_smtp_auth_disabled/exchange_transport_config_smtp_auth_disabled.py b/prowler/providers/m365/services/exchange/exchange_transport_config_smtp_auth_disabled/exchange_transport_config_smtp_auth_disabled.py new file mode 100644 index 0000000000..f842c59b87 --- /dev/null +++ b/prowler/providers/m365/services/exchange/exchange_transport_config_smtp_auth_disabled/exchange_transport_config_smtp_auth_disabled.py @@ -0,0 +1,44 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.exchange.exchange_client import exchange_client + + +class exchange_transport_config_smtp_auth_disabled(Check): + """Check if SMTP AUTH is disabled in Exchange Online Transport Config. + + Attributes: + metadata: Metadata associated with the check (inherited from Check). + """ + + def execute(self) -> List[CheckReportM365]: + """Execute the check for SMTP AUTH setting in Transport Config. + + This method checks if SMTP AUTH is disabled at the organization level in Exchange Online. + + Returns: + List[CheckReportM365]: A list of reports containing the result of the check. + """ + findings = [] + transport_config = exchange_client.transport_config + if transport_config: + report = CheckReportM365( + metadata=self.metadata(), + resource=transport_config, + resource_name="Transport Configuration", + resource_id="transport_config", + ) + report.status = "FAIL" + report.status_extended = ( + "SMTP AUTH is enabled in the Exchange Online Transport Config." + ) + + if transport_config.smtp_auth_disabled: + report.status = "PASS" + report.status_extended = ( + "SMTP AUTH is disabled in the Exchange Online Transport Config." + ) + + findings.append(report) + + return findings diff --git a/prowler/providers/m365/services/exchange/exchange_transport_rules_mail_forwarding_disabled/__init__.py b/prowler/providers/m365/services/exchange/exchange_transport_rules_mail_forwarding_disabled/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/exchange/exchange_transport_rules_mail_forwarding_disabled/exchange_transport_rules_mail_forwarding_disabled.metadata.json b/prowler/providers/m365/services/exchange/exchange_transport_rules_mail_forwarding_disabled/exchange_transport_rules_mail_forwarding_disabled.metadata.json new file mode 100644 index 0000000000..0b9a127f09 --- /dev/null +++ b/prowler/providers/m365/services/exchange/exchange_transport_rules_mail_forwarding_disabled/exchange_transport_rules_mail_forwarding_disabled.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "exchange_transport_rules_mail_forwarding_disabled", + "CheckTitle": "Ensure mail transport rules are set to disable mail forwarding.", + "CheckType": [], + "ServiceName": "exchange", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "high", + "ResourceType": "Exchange Transport Rules", + "Description": "Ensure mail transport rules are set to disable mail forwarding.", + "Risk": "Enabling email auto-forwarding can be exploited by attackers or malicious insiders to exfiltrate sensitive data outside the organization, often without detection.", + "RelatedUrl": "https://learn.microsoft.com/en-us/exchange/security-and-compliance/mail-flow-rules/configuration-best-practices", + "Remediation": { + "Code": { + "CLI": "Remove-TransportRule -Identity ", + "NativeIaC": "", + "Other": "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.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Block all forms of mail forwarding using Transport rules in Exchange Online. Apply exclusions only where justified by organizational policy.", + "Url": "https://learn.microsoft.com/en-us/exchange/security-and-compliance/mail-flow-rules/mail-flow-rules" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/exchange/exchange_transport_rules_mail_forwarding_disabled/exchange_transport_rules_mail_forwarding_disabled.py b/prowler/providers/m365/services/exchange/exchange_transport_rules_mail_forwarding_disabled/exchange_transport_rules_mail_forwarding_disabled.py new file mode 100644 index 0000000000..c9932af3e6 --- /dev/null +++ b/prowler/providers/m365/services/exchange/exchange_transport_rules_mail_forwarding_disabled/exchange_transport_rules_mail_forwarding_disabled.py @@ -0,0 +1,43 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.exchange.exchange_client import exchange_client + + +class exchange_transport_rules_mail_forwarding_disabled(Check): + """ + Check to ensure that no mail transport rules allow forwarding mail to external domains. + + Attributes: + metadata: Metadata associated with the check (inherited from Check). + """ + + def execute(self) -> List[CheckReportM365]: + """ + Execute the check to validate that no transport rules allow forwarding mail to external domains. + + This method retrieves all transport rules from the Exchange service and evaluates + whether any of them allow forwarding mail to external domains. A report is generated for each + transport rule. + + Returns: + List[CheckReportM365]: A list of findings with the status of each transport rule. + """ + findings = [] + for rule in exchange_client.transport_rules: + report = CheckReportM365( + metadata=self.metadata(), + resource=rule, + resource_name=rule.name, + resource_id="ExchangeTransportRule", + ) + report.status = "PASS" + report.status_extended = f"Transport rule {rule.name} does not allow forwarding mail to external domains." + + if rule.redirect_message_to: + report.status = "FAIL" + report.status_extended = f"Transport rule {rule.name} allows forwarding mail to external domains: {', '.join(rule.redirect_message_to)}." + + findings.append(report) + + return findings diff --git a/prowler/providers/m365/services/exchange/exchange_transport_rules_whitelist_disabled/__init__.py b/prowler/providers/m365/services/exchange/exchange_transport_rules_whitelist_disabled/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/exchange/exchange_transport_rules_whitelist_disabled/exchange_transport_rules_whitelist_disabled.metadata.json b/prowler/providers/m365/services/exchange/exchange_transport_rules_whitelist_disabled/exchange_transport_rules_whitelist_disabled.metadata.json new file mode 100644 index 0000000000..aecec711d4 --- /dev/null +++ b/prowler/providers/m365/services/exchange/exchange_transport_rules_whitelist_disabled/exchange_transport_rules_whitelist_disabled.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "exchange_transport_rules_whitelist_disabled", + "CheckTitle": "Ensure mail transport rules do not whitelist specific domains", + "CheckType": [], + "ServiceName": "exchange", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "high", + "ResourceType": "Exchange Transport Rules", + "Description": "Mail flow rules (transport rules) in Exchange Online are used to identify and take action on messages that flow through the organization.", + "Risk": "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.", + "RelatedUrl": "https://learn.microsoft.com/en-us/exchange/security-and-compliance/mail-flow-rules/configuration-best-practices", + "Remediation": { + "Code": { + "CLI": "Remove-TransportRule -Identity ", + "NativeIaC": "", + "Other": "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.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Remove transport rules that whitelist specific domains to ensure proper scanning.", + "Url": "https://learn.microsoft.com/en-us/exchange/security-and-compliance/mail-flow-rules/mail-flow-rules" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/exchange/exchange_transport_rules_whitelist_disabled/exchange_transport_rules_whitelist_disabled.py b/prowler/providers/m365/services/exchange/exchange_transport_rules_whitelist_disabled/exchange_transport_rules_whitelist_disabled.py new file mode 100644 index 0000000000..58cd7b23bc --- /dev/null +++ b/prowler/providers/m365/services/exchange/exchange_transport_rules_whitelist_disabled/exchange_transport_rules_whitelist_disabled.py @@ -0,0 +1,47 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.exchange.exchange_client import exchange_client + + +class exchange_transport_rules_whitelist_disabled(Check): + """ + Check to ensure that no mail transport rules whitelist specific domains. + + Attributes: + metadata: Metadata associated with the check (inherited from Check). + """ + + def execute(self) -> List[CheckReportM365]: + """ + Execute the check to validate that no transport rules whitelist specific domains. + + This method retrieves all transport rules from the Exchange service and evaluates + whether any of them whitelist specific domains. A report is generated for each + transport rule. + + Returns: + List[CheckReportM365]: A list of findings with the status of each transport rule. + """ + findings = [] + + for rule in exchange_client.transport_rules: + report = CheckReportM365( + metadata=self.metadata(), + resource=rule, + resource_name=rule.name, + resource_id="ExchangeTransportRule", + ) + + report.status = "PASS" + report.status_extended = ( + f"Transport rule {rule.name} does not whitelist any domains." + ) + + if rule.sender_domain_is and rule.scl == -1: + report.status = "FAIL" + report.status_extended = f"Transport rule {rule.name} whitelists domains: {', '.join(rule.sender_domain_is)}." + + findings.append(report) + + return findings diff --git a/prowler/providers/m365/services/exchange/exchange_user_mailbox_auditing_enabled/__init__.py b/prowler/providers/m365/services/exchange/exchange_user_mailbox_auditing_enabled/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/exchange/exchange_user_mailbox_auditing_enabled/exchange_user_mailbox_auditing_enabled.metadata.json b/prowler/providers/m365/services/exchange/exchange_user_mailbox_auditing_enabled/exchange_user_mailbox_auditing_enabled.metadata.json new file mode 100644 index 0000000000..93b5049fab --- /dev/null +++ b/prowler/providers/m365/services/exchange/exchange_user_mailbox_auditing_enabled/exchange_user_mailbox_auditing_enabled.metadata.json @@ -0,0 +1,33 @@ +{ + "Provider": "m365", + "CheckID": "exchange_user_mailbox_auditing_enabled", + "CheckTitle": "Ensure mailbox auditing is enabled for all user mailboxes.", + "CheckType": [], + "ServiceName": "exchange", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "high", + "ResourceType": "Exchange Mailboxes Properties", + "Description": "Ensure mailbox auditing is enabled for all user mailboxes, including the configuration of audit actions for owners, delegates, and admins beyond the Microsoft defaults. The difference between both subscription is the log age so this parameter is configurable and users can set it to their subscription needs.", + "Risk": "If auditing is not properly enabled and configured, critical mailbox actions may go unrecorded, reducing the ability to investigate incidents, enforce compliance, or detect malicious behavior.", + "RelatedUrl": "https://learn.microsoft.com/en-us/purview/audit-mailboxes?view=o365-worldwide", + "Remediation": { + "Code": { + "CLI": "$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", + "NativeIaC": "", + "Other": "", + "Terraform": "" + }, + "Recommendation": { + "Text": "Enable mailbox auditing for all user mailboxes and configure auditing for key mailbox actions for owners, delegates, and admins.", + "Url": "https://learn.microsoft.com/en-us/purview/audit-mailboxes?view=o365-worldwide" + } + }, + "Categories": [ + "e3", + "e5" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/exchange/exchange_user_mailbox_auditing_enabled/exchange_user_mailbox_auditing_enabled.py b/prowler/providers/m365/services/exchange/exchange_user_mailbox_auditing_enabled/exchange_user_mailbox_auditing_enabled.py new file mode 100644 index 0000000000..da10f08cd3 --- /dev/null +++ b/prowler/providers/m365/services/exchange/exchange_user_mailbox_auditing_enabled/exchange_user_mailbox_auditing_enabled.py @@ -0,0 +1,72 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.exchange.exchange_client import exchange_client +from prowler.providers.m365.services.exchange.exchange_service import ( + AuditAdmin, + AuditDelegate, + AuditOwner, +) + + +class exchange_user_mailbox_auditing_enabled(Check): + """ + Check to ensure mailbox auditing is enabled for all user mailboxes. + + Attributes: + metadata: Metadata associated with the check (inherited from Check). + """ + + def execute(self) -> List[CheckReportM365]: + """ + Execute the check to validate that mailbox auditing is enabled for all user mailboxes. + + This method retrieves all mailbox audit properties from the Exchange service and evaluates + whether auditing is enabled and correctly configured for each mailbox. A report is generated + for each mailbox. + + Returns: + List[CheckReportM365]: A list of findings with the status of each mailbox. + """ + findings = [] + + required_admin = {e.value for e in AuditAdmin} + required_delegate = {e.value for e in AuditDelegate} + required_owner = {e.value for e in AuditOwner} + + for mailbox in exchange_client.mailbox_audit_properties: + report = CheckReportM365( + metadata=self.metadata(), + resource=mailbox, + resource_name=mailbox.name, + resource_id=mailbox.identity, + ) + + report.status = "FAIL" + report.status_extended = ( + f"Mailbox Audit Properties for Mailbox {mailbox.name} is not enabled." + ) + + if mailbox.audit_enabled: + audit_admin = set(mailbox.audit_admin or []) + audit_delegate = set(mailbox.audit_delegate or []) + audit_owner = set(mailbox.audit_owner or []) + + if ( + required_admin.issubset(audit_admin) + and required_delegate.issubset(audit_delegate) + and required_owner.issubset(audit_owner) + ): + if mailbox.audit_log_age >= exchange_client.audit_config.get( + "audit_log_age", 90 + ): + report.status = "PASS" + report.status_extended = f"Mailbox Audit Properties for Mailbox {mailbox.name} is enabled with an audit log age of {mailbox.audit_log_age} days." + else: + report.status_extended = f"Mailbox Audit Properties for Mailbox {mailbox.name} is enabled but the audit log age is less than {exchange_client.audit_config.get('audit_log_age', 90)} days ({mailbox.audit_log_age} days)." + else: + report.status_extended = f"Mailbox Audit Properties for Mailbox {mailbox.name} is enabled but without all audit actions configured." + + findings.append(report) + + return findings diff --git a/prowler/providers/m365/services/purview/__init__.py b/prowler/providers/m365/services/purview/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/purview/purview_audit_log_search_enabled/__init__.py b/prowler/providers/m365/services/purview/purview_audit_log_search_enabled/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/purview/purview_audit_log_search_enabled/purview_audit_log_search_enabled.metadata.json b/prowler/providers/m365/services/purview/purview_audit_log_search_enabled/purview_audit_log_search_enabled.metadata.json new file mode 100644 index 0000000000..cc276cc6a6 --- /dev/null +++ b/prowler/providers/m365/services/purview/purview_audit_log_search_enabled/purview_audit_log_search_enabled.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "purview_audit_log_search_enabled", + "CheckTitle": "Ensure Purview audit log search is enabled", + "CheckType": [], + "ServiceName": "purview", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "critical", + "ResourceType": "Purview Settings", + "Description": "Ensure Purview audit log search is enabled.", + "Risk": "Disabling Microsoft 365 audit log search can hinder the ability to track and monitor user and admin activities, making it harder to detect suspicious behavior, security incidents, or compliance violations. This can result in undetected breaches and inability to respond to incidents effectively.", + "RelatedUrl": "https://learn.microsoft.com/en-us/purview/audit-search?tabs=microsoft-purview-portal", + "Remediation": { + "Code": { + "CLI": "Set-AdminAuditLogConfig -UnifiedAuditLogIngestionEnabled $true", + "NativeIaC": "", + "Other": "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.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Ensure that Microsoft 365 audit log search is enabled to maintain a comprehensive record of user and admin activities. This will help improve security monitoring, support compliance needs, and provide critical insights for responding to incidents.", + "Url": "https://learn.microsoft.com/en-us/purview/audit-search?tabs=microsoft-purview-portal" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/purview/purview_audit_log_search_enabled/purview_audit_log_search_enabled.py b/prowler/providers/m365/services/purview/purview_audit_log_search_enabled/purview_audit_log_search_enabled.py new file mode 100644 index 0000000000..49df75ec93 --- /dev/null +++ b/prowler/providers/m365/services/purview/purview_audit_log_search_enabled/purview_audit_log_search_enabled.py @@ -0,0 +1,42 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.purview.purview_client import purview_client + + +class purview_audit_log_search_enabled(Check): + """Check if Purview audit log search is enabled. + + Attributes: + metadata: Metadata associated with the check (inherited from Check). + """ + + def execute(self) -> List[CheckReportM365]: + """Execute the check for audit log search + + This method checks if audit log search is enabled Purview settings + + Returns: + List[CheckReportM365]: A list of reports containing the result of the check. + """ + findings = [] + audit_log_config = purview_client.audit_log_config + if audit_log_config: + report = CheckReportM365( + metadata=self.metadata(), + resource=audit_log_config if audit_log_config else {}, + resource_name="Purview Settings", + resource_id="purviewSettings", + ) + report.status = "FAIL" + report.status_extended = "Purview audit log search is not enabled." + + if purview_client.audit_log_config and getattr( + purview_client.audit_log_config, "audit_log_search", False + ): + report.status = "PASS" + report.status_extended = "Purview audit log search is enabled." + + findings.append(report) + + return findings diff --git a/prowler/providers/m365/services/purview/purview_client.py b/prowler/providers/m365/services/purview/purview_client.py new file mode 100644 index 0000000000..dea423b967 --- /dev/null +++ b/prowler/providers/m365/services/purview/purview_client.py @@ -0,0 +1,4 @@ +from prowler.providers.common.provider import Provider +from prowler.providers.m365.services.purview.purview_service import Purview + +purview_client = Purview(Provider.get_global_provider()) diff --git a/prowler/providers/m365/services/purview/purview_service.py b/prowler/providers/m365/services/purview/purview_service.py new file mode 100644 index 0000000000..138305c899 --- /dev/null +++ b/prowler/providers/m365/services/purview/purview_service.py @@ -0,0 +1,37 @@ +from pydantic import BaseModel + +from prowler.lib.logger import logger +from prowler.providers.m365.lib.service.service import M365Service +from prowler.providers.m365.m365_provider import M365Provider + + +class Purview(M365Service): + def __init__(self, provider: M365Provider): + super().__init__(provider) + self.audit_log_config = None + + if self.powershell: + self.powershell.connect_exchange_online() + self.audit_log_config = self._get_audit_log_config() + self.powershell.close() + + def _get_audit_log_config(self): + logger.info("M365 - Getting Admin Audit Log settings...") + audit_log_config = None + try: + audit_log_config_response = self.powershell.get_audit_log_config() + if audit_log_config_response: + audit_log_config = AuditLogConfig( + audit_log_search=audit_log_config_response.get( + "UnifiedAuditLogIngestionEnabled", False + ) + ) + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + return audit_log_config + + +class AuditLogConfig(BaseModel): + audit_log_search: bool diff --git a/prowler/providers/m365/services/sharepoint/__init__.py b/prowler/providers/m365/services/sharepoint/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/microsoft365/services/sharepoint/sharepoint_client.py b/prowler/providers/m365/services/sharepoint/sharepoint_client.py similarity index 53% rename from prowler/providers/microsoft365/services/sharepoint/sharepoint_client.py rename to prowler/providers/m365/services/sharepoint/sharepoint_client.py index fc547bc167..be3cf6377b 100644 --- a/prowler/providers/microsoft365/services/sharepoint/sharepoint_client.py +++ b/prowler/providers/m365/services/sharepoint/sharepoint_client.py @@ -1,6 +1,4 @@ from prowler.providers.common.provider import Provider -from prowler.providers.microsoft365.services.sharepoint.sharepoint_service import ( - SharePoint, -) +from prowler.providers.m365.services.sharepoint.sharepoint_service import SharePoint sharepoint_client = SharePoint(Provider.get_global_provider()) diff --git a/prowler/providers/m365/services/sharepoint/sharepoint_external_sharing_managed/__init__.py b/prowler/providers/m365/services/sharepoint/sharepoint_external_sharing_managed/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/microsoft365/services/sharepoint/sharepoint_external_sharing_managed/sharepoint_external_sharing_managed.metadata.json b/prowler/providers/m365/services/sharepoint/sharepoint_external_sharing_managed/sharepoint_external_sharing_managed.metadata.json similarity index 96% rename from prowler/providers/microsoft365/services/sharepoint/sharepoint_external_sharing_managed/sharepoint_external_sharing_managed.metadata.json rename to prowler/providers/m365/services/sharepoint/sharepoint_external_sharing_managed/sharepoint_external_sharing_managed.metadata.json index ee559a57a0..4295628f78 100644 --- a/prowler/providers/microsoft365/services/sharepoint/sharepoint_external_sharing_managed/sharepoint_external_sharing_managed.metadata.json +++ b/prowler/providers/m365/services/sharepoint/sharepoint_external_sharing_managed/sharepoint_external_sharing_managed.metadata.json @@ -1,5 +1,5 @@ { - "Provider": "microsoft365", + "Provider": "m365", "CheckID": "sharepoint_external_sharing_managed", "CheckTitle": "Ensure SharePoint external sharing is managed through domain whitelists/blacklists.", "CheckType": [], @@ -23,7 +23,9 @@ "Url": "https://learn.microsoft.com/en-us/powershell/module/sharepoint-online/set-spotenant?view=sharepoint-ps" } }, - "Categories": [], + "Categories": [ + "e3" + ], "DependsOn": [], "RelatedTo": [], "Notes": "" diff --git a/prowler/providers/microsoft365/services/sharepoint/sharepoint_external_sharing_managed/sharepoint_external_sharing_managed.py b/prowler/providers/m365/services/sharepoint/sharepoint_external_sharing_managed/sharepoint_external_sharing_managed.py similarity index 88% rename from prowler/providers/microsoft365/services/sharepoint/sharepoint_external_sharing_managed/sharepoint_external_sharing_managed.py rename to prowler/providers/m365/services/sharepoint/sharepoint_external_sharing_managed/sharepoint_external_sharing_managed.py index 9fd8c432a1..087d9a2540 100644 --- a/prowler/providers/microsoft365/services/sharepoint/sharepoint_external_sharing_managed/sharepoint_external_sharing_managed.py +++ b/prowler/providers/m365/services/sharepoint/sharepoint_external_sharing_managed/sharepoint_external_sharing_managed.py @@ -1,7 +1,7 @@ from typing import List -from prowler.lib.check.models import Check, CheckReportMicrosoft365 -from prowler.providers.microsoft365.services.sharepoint.sharepoint_client import ( +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.sharepoint.sharepoint_client import ( sharepoint_client, ) @@ -19,7 +19,7 @@ class sharepoint_external_sharing_managed(Check): of verifying that the allowed/blocked domain list is not empty. """ - def execute(self) -> List[CheckReportMicrosoft365]: + def execute(self) -> List[CheckReportM365]: """ Execute the SharePoint external sharing management check. @@ -27,12 +27,12 @@ class sharepoint_external_sharing_managed(Check): generates a report indicating whether external sharing is managed via domain restrictions. Returns: - List[CheckReportMicrosoft365]: A list containing a report with the result of the check. + List[CheckReportM365]: A list containing a report with the result of the check. """ findings = [] settings = sharepoint_client.settings if settings: - report = CheckReportMicrosoft365( + report = CheckReportM365( self.metadata(), resource=settings if settings else {}, resource_name="SharePoint Settings", diff --git a/prowler/providers/m365/services/sharepoint/sharepoint_external_sharing_restricted/__init__.py b/prowler/providers/m365/services/sharepoint/sharepoint_external_sharing_restricted/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/microsoft365/services/sharepoint/sharepoint_external_sharing_restricted/sharepoint_external_sharing_restricted.metadata.json b/prowler/providers/m365/services/sharepoint/sharepoint_external_sharing_restricted/sharepoint_external_sharing_restricted.metadata.json similarity index 96% rename from prowler/providers/microsoft365/services/sharepoint/sharepoint_external_sharing_restricted/sharepoint_external_sharing_restricted.metadata.json rename to prowler/providers/m365/services/sharepoint/sharepoint_external_sharing_restricted/sharepoint_external_sharing_restricted.metadata.json index 63b040672d..47f2464b6f 100644 --- a/prowler/providers/microsoft365/services/sharepoint/sharepoint_external_sharing_restricted/sharepoint_external_sharing_restricted.metadata.json +++ b/prowler/providers/m365/services/sharepoint/sharepoint_external_sharing_restricted/sharepoint_external_sharing_restricted.metadata.json @@ -1,5 +1,5 @@ { - "Provider": "microsoft365", + "Provider": "m365", "CheckID": "sharepoint_external_sharing_restricted", "CheckTitle": "Ensure external content sharing is restricted.", "CheckType": [], @@ -23,7 +23,9 @@ "Url": "https://learn.microsoft.com/en-us/powershell/module/sharepoint-online/set-spotenant?view=sharepoint-ps" } }, - "Categories": [], + "Categories": [ + "e3" + ], "DependsOn": [], "RelatedTo": [], "Notes": "" diff --git a/prowler/providers/microsoft365/services/sharepoint/sharepoint_external_sharing_restricted/sharepoint_external_sharing_restricted.py b/prowler/providers/m365/services/sharepoint/sharepoint_external_sharing_restricted/sharepoint_external_sharing_restricted.py similarity index 83% rename from prowler/providers/microsoft365/services/sharepoint/sharepoint_external_sharing_restricted/sharepoint_external_sharing_restricted.py rename to prowler/providers/m365/services/sharepoint/sharepoint_external_sharing_restricted/sharepoint_external_sharing_restricted.py index 639ce00df3..728231a22f 100644 --- a/prowler/providers/microsoft365/services/sharepoint/sharepoint_external_sharing_restricted/sharepoint_external_sharing_restricted.py +++ b/prowler/providers/m365/services/sharepoint/sharepoint_external_sharing_restricted/sharepoint_external_sharing_restricted.py @@ -1,7 +1,7 @@ from typing import List -from prowler.lib.check.models import Check, CheckReportMicrosoft365 -from prowler.providers.microsoft365.services.sharepoint.sharepoint_client import ( +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.sharepoint.sharepoint_client import ( sharepoint_client, ) @@ -15,7 +15,7 @@ class sharepoint_external_sharing_restricted(Check): setting is used, legacy sharing may be allowed, increasing the risk of unauthorized data access. """ - def execute(self) -> List[CheckReportMicrosoft365]: + def execute(self) -> List[CheckReportM365]: """ Execute the SharePoint external sharing restriction check. @@ -23,12 +23,12 @@ class sharepoint_external_sharing_restricted(Check): indicating whether external sharing is restricted to 'New and existing guests' (ExternalUserSharingOnly). Returns: - List[Check_Report_Microsoft365]: A list containing a report with the result of the check. + List[Check_Report_M365]: A list containing a report with the result of the check. """ findings = [] settings = sharepoint_client.settings if settings: - report = CheckReportMicrosoft365( + report = CheckReportM365( self.metadata(), resource=settings if settings else {}, resource_name="SharePoint Settings", diff --git a/prowler/providers/m365/services/sharepoint/sharepoint_guest_sharing_restricted/__init__.py b/prowler/providers/m365/services/sharepoint/sharepoint_guest_sharing_restricted/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/microsoft365/services/sharepoint/sharepoint_guest_sharing_restricted/sharepoint_guest_sharing_restricted.metadata.json b/prowler/providers/m365/services/sharepoint/sharepoint_guest_sharing_restricted/sharepoint_guest_sharing_restricted.metadata.json similarity index 96% rename from prowler/providers/microsoft365/services/sharepoint/sharepoint_guest_sharing_restricted/sharepoint_guest_sharing_restricted.metadata.json rename to prowler/providers/m365/services/sharepoint/sharepoint_guest_sharing_restricted/sharepoint_guest_sharing_restricted.metadata.json index 89acd7e46a..e85850f950 100644 --- a/prowler/providers/microsoft365/services/sharepoint/sharepoint_guest_sharing_restricted/sharepoint_guest_sharing_restricted.metadata.json +++ b/prowler/providers/m365/services/sharepoint/sharepoint_guest_sharing_restricted/sharepoint_guest_sharing_restricted.metadata.json @@ -1,5 +1,5 @@ { - "Provider": "microsoft365", + "Provider": "m365", "CheckID": "sharepoint_guest_sharing_restricted", "CheckTitle": "Ensure that SharePoint guest users cannot share items they don't own.", "CheckType": [], @@ -23,7 +23,9 @@ "Url": "https://learn.microsoft.com/en-us/sharepoint/turn-external-sharing-on-or-off" } }, - "Categories": [], + "Categories": [ + "e3" + ], "DependsOn": [], "RelatedTo": [], "Notes": "" diff --git a/prowler/providers/microsoft365/services/sharepoint/sharepoint_guest_sharing_restricted/sharepoint_guest_sharing_restricted.py b/prowler/providers/m365/services/sharepoint/sharepoint_guest_sharing_restricted/sharepoint_guest_sharing_restricted.py similarity index 81% rename from prowler/providers/microsoft365/services/sharepoint/sharepoint_guest_sharing_restricted/sharepoint_guest_sharing_restricted.py rename to prowler/providers/m365/services/sharepoint/sharepoint_guest_sharing_restricted/sharepoint_guest_sharing_restricted.py index 3666a837b1..ff66780a87 100644 --- a/prowler/providers/microsoft365/services/sharepoint/sharepoint_guest_sharing_restricted/sharepoint_guest_sharing_restricted.py +++ b/prowler/providers/m365/services/sharepoint/sharepoint_guest_sharing_restricted/sharepoint_guest_sharing_restricted.py @@ -1,7 +1,7 @@ from typing import List -from prowler.lib.check.models import Check, CheckReportMicrosoft365 -from prowler.providers.microsoft365.services.sharepoint.sharepoint_client import ( +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.sharepoint.sharepoint_client import ( sharepoint_client, ) @@ -16,7 +16,7 @@ class sharepoint_guest_sharing_restricted(Check): to prevent external users from resharing is enabled. """ - def execute(self) -> List[CheckReportMicrosoft365]: + def execute(self) -> List[CheckReportM365]: """ Execute the SharePoint guest sharing restriction check. @@ -24,12 +24,12 @@ class sharepoint_guest_sharing_restricted(Check): and generates a report indicating whether guest users are prevented from sharing items they do not own. Returns: - List[CheckReportMicrosoft365]: A list containing a report with the result of the check. + List[CheckReportM365]: A list containing a report with the result of the check. """ findings = [] settings = sharepoint_client.settings if settings: - report = CheckReportMicrosoft365( + report = CheckReportM365( self.metadata(), resource=settings if settings else {}, resource_name="SharePoint Settings", diff --git a/prowler/providers/m365/services/sharepoint/sharepoint_modern_authentication_required/__init__.py b/prowler/providers/m365/services/sharepoint/sharepoint_modern_authentication_required/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/microsoft365/services/sharepoint/sharepoint_modern_authentication_required/sharepoint_modern_authentication_required.metadata.json b/prowler/providers/m365/services/sharepoint/sharepoint_modern_authentication_required/sharepoint_modern_authentication_required.metadata.json similarity index 96% rename from prowler/providers/microsoft365/services/sharepoint/sharepoint_modern_authentication_required/sharepoint_modern_authentication_required.metadata.json rename to prowler/providers/m365/services/sharepoint/sharepoint_modern_authentication_required/sharepoint_modern_authentication_required.metadata.json index e9c0047115..0a234fc198 100644 --- a/prowler/providers/microsoft365/services/sharepoint/sharepoint_modern_authentication_required/sharepoint_modern_authentication_required.metadata.json +++ b/prowler/providers/m365/services/sharepoint/sharepoint_modern_authentication_required/sharepoint_modern_authentication_required.metadata.json @@ -1,5 +1,5 @@ { - "Provider": "microsoft365", + "Provider": "m365", "CheckID": "sharepoint_modern_authentication_required", "CheckTitle": "Ensure modern authentication for SharePoint applications is required.", "CheckType": [], @@ -23,7 +23,9 @@ "Url": "https://learn.microsoft.com/en-us/powershell/module/sharepoint-online/set-spotenant?view=sharepoint-ps" } }, - "Categories": [], + "Categories": [ + "e3" + ], "DependsOn": [], "RelatedTo": [], "Notes": "" diff --git a/prowler/providers/microsoft365/services/sharepoint/sharepoint_modern_authentication_required/sharepoint_modern_authentication_required.py b/prowler/providers/m365/services/sharepoint/sharepoint_modern_authentication_required/sharepoint_modern_authentication_required.py similarity index 83% rename from prowler/providers/microsoft365/services/sharepoint/sharepoint_modern_authentication_required/sharepoint_modern_authentication_required.py rename to prowler/providers/m365/services/sharepoint/sharepoint_modern_authentication_required/sharepoint_modern_authentication_required.py index 04f61084b2..6d5761ca35 100644 --- a/prowler/providers/microsoft365/services/sharepoint/sharepoint_modern_authentication_required/sharepoint_modern_authentication_required.py +++ b/prowler/providers/m365/services/sharepoint/sharepoint_modern_authentication_required/sharepoint_modern_authentication_required.py @@ -1,7 +1,7 @@ from typing import List -from prowler.lib.check.models import Check, CheckReportMicrosoft365 -from prowler.providers.microsoft365.services.sharepoint.sharepoint_client import ( +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.sharepoint.sharepoint_client import ( sharepoint_client, ) @@ -18,7 +18,7 @@ class sharepoint_modern_authentication_required(Check): The check fails if modern authentication is not enforced, indicating that legacy protocols may be used. """ - def execute(self) -> List[CheckReportMicrosoft365]: + def execute(self) -> List[CheckReportM365]: """ Execute the SharePoint modern authentication requirement check. @@ -26,12 +26,12 @@ class sharepoint_modern_authentication_required(Check): generates a report indicating whether modern authentication is required for SharePoint applications. Returns: - List[CheckReportMicrosoft365]: A list containing the report object with the result of the check. + List[CheckReportM365]: A list containing the report object with the result of the check. """ findings = [] settings = sharepoint_client.settings if settings: - report = CheckReportMicrosoft365( + report = CheckReportM365( self.metadata(), resource=settings if settings else {}, resource_name="SharePoint Settings", diff --git a/prowler/providers/m365/services/sharepoint/sharepoint_onedrive_sync_restricted_unmanaged_devices/__init__.py b/prowler/providers/m365/services/sharepoint/sharepoint_onedrive_sync_restricted_unmanaged_devices/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/sharepoint/sharepoint_onedrive_sync_restricted_unmanaged_devices/sharepoint_onedrive_sync_restricted_unmanaged_devices.metadata.json b/prowler/providers/m365/services/sharepoint/sharepoint_onedrive_sync_restricted_unmanaged_devices/sharepoint_onedrive_sync_restricted_unmanaged_devices.metadata.json new file mode 100644 index 0000000000..6816592170 --- /dev/null +++ b/prowler/providers/m365/services/sharepoint/sharepoint_onedrive_sync_restricted_unmanaged_devices/sharepoint_onedrive_sync_restricted_unmanaged_devices.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "sharepoint_onedrive_sync_restricted_unmanaged_devices", + "CheckTitle": "Ensure OneDrive sync is restricted for unmanaged devices.", + "CheckType": [], + "ServiceName": "sharepoint", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "critical", + "ResourceType": "Sharepoint Settings", + "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).", + "Risk": "Unmanaged devices can pose a security risk by allowing users to sync sensitive data to unauthorized devices, potentially leading to data leakage or unauthorized access.", + "RelatedUrl": "https://learn.microsoft.com/en-us/graph/api/resources/sharepoint?view=graph-rest-1.0", + "Remediation": { + "Code": { + "CLI": "Set-SPOTenantSyncClientRestriction -Enable -DomainGuids '; ; ...'", + "NativeIaC": "", + "Other": "1. Navigate to SharePoint admin center https://admin.microsoft.com/sharepoint 2. 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.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Restrict OneDrive sync to managed devices to prevent unauthorized access to sensitive data.", + "Url": "https://learn.microsoft.com/en-us/sharepoint/allow-syncing-only-on-specific-domains" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/sharepoint/sharepoint_onedrive_sync_restricted_unmanaged_devices/sharepoint_onedrive_sync_restricted_unmanaged_devices.py b/prowler/providers/m365/services/sharepoint/sharepoint_onedrive_sync_restricted_unmanaged_devices/sharepoint_onedrive_sync_restricted_unmanaged_devices.py new file mode 100644 index 0000000000..ca6d5415fa --- /dev/null +++ b/prowler/providers/m365/services/sharepoint/sharepoint_onedrive_sync_restricted_unmanaged_devices/sharepoint_onedrive_sync_restricted_unmanaged_devices.py @@ -0,0 +1,48 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.sharepoint.sharepoint_client import ( + sharepoint_client, +) + + +class sharepoint_onedrive_sync_restricted_unmanaged_devices(Check): + """ + Check if OneDrive sync is restricted for unmanaged devices. + + This check verifies that OneDrive sync is restricted to managed devices only. + Unmanaged devices can pose a security risk by allowing users to sync sensitive data to unauthorized devices, + potentially leading to data leakage or unauthorized access. + + The check fails if OneDrive sync is not restricted to managed devices (AllowedDomainGuidsForSyncApp is empty). + """ + + def execute(self) -> List[CheckReportM365]: + """ + Execute the OneDrive sync restriction check. + + Retrieves the OneDrive sync settings from the Microsoft 365 SharePoint client and + generates a report indicating whether OneDrive sync is restricted to managed devices only. + + Returns: + List[CheckReportM365]: A list containing the report object with the result of the check. + """ + findings = [] + settings = sharepoint_client.settings + if settings: + report = CheckReportM365( + self.metadata(), + resource=settings if settings else {}, + resource_name="SharePoint Settings", + resource_id=sharepoint_client.tenant_domain, + ) + report.status = "PASS" + report.status_extended = "Microsoft 365 SharePoint does not allow OneDrive sync to unmanaged devices." + + if len(settings.allowedDomainGuidsForSyncApp) == 0: + report.status = "FAIL" + report.status_extended = "Microsoft 365 SharePoint allows OneDrive sync to unmanaged devices." + + findings.append(report) + + return findings diff --git a/prowler/providers/microsoft365/services/sharepoint/sharepoint_service.py b/prowler/providers/m365/services/sharepoint/sharepoint_service.py similarity index 82% rename from prowler/providers/microsoft365/services/sharepoint/sharepoint_service.py rename to prowler/providers/m365/services/sharepoint/sharepoint_service.py index bb8f2c6903..02a701821f 100644 --- a/prowler/providers/microsoft365/services/sharepoint/sharepoint_service.py +++ b/prowler/providers/m365/services/sharepoint/sharepoint_service.py @@ -1,3 +1,4 @@ +import uuid from asyncio import gather, get_event_loop from typing import List, Optional @@ -5,12 +6,12 @@ from msgraph.generated.models.o_data_errors.o_data_error import ODataError from pydantic import BaseModel from prowler.lib.logger import logger -from prowler.providers.microsoft365.lib.service.service import Microsoft365Service -from prowler.providers.microsoft365.microsoft365_provider import Microsoft365Provider +from prowler.providers.m365.lib.service.service import M365Service +from prowler.providers.m365.m365_provider import M365Provider -class SharePoint(Microsoft365Service): - def __init__(self, provider: Microsoft365Provider): +class SharePoint(M365Service): + def __init__(self, provider: M365Provider): super().__init__(provider) loop = get_event_loop() self.tenant_domain = provider.identity.tenant_domain @@ -22,11 +23,10 @@ class SharePoint(Microsoft365Service): self.settings = attributes[0] async def _get_settings(self): - logger.info("Microsoft365 - Getting SharePoint global settings...") + logger.info("M365 - Getting SharePoint global settings...") settings = None try: global_settings = await self.client.admin.sharepoint.settings.get() - settings = SharePointSettings( sharingCapability=( str(global_settings.sharing_capability).split(".")[-1] @@ -38,6 +38,7 @@ class SharePoint(Microsoft365Service): sharingDomainRestrictionMode=global_settings.sharing_domain_restriction_mode, legacyAuth=global_settings.is_legacy_auth_protocols_enabled, resharingEnabled=global_settings.is_resharing_by_external_users_enabled, + allowedDomainGuidsForSyncApp=global_settings.allowed_domain_guids_for_sync_app, ) except ODataError as error: @@ -60,3 +61,4 @@ class SharePointSettings(BaseModel): sharingDomainRestrictionMode: str resharingEnabled: bool legacyAuth: bool + allowedDomainGuidsForSyncApp: List[uuid.UUID] diff --git a/prowler/providers/m365/services/teams/__init__.py b/prowler/providers/m365/services/teams/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/teams/teams_client.py b/prowler/providers/m365/services/teams/teams_client.py new file mode 100644 index 0000000000..9727500d7d --- /dev/null +++ b/prowler/providers/m365/services/teams/teams_client.py @@ -0,0 +1,4 @@ +from prowler.providers.common.provider import Provider +from prowler.providers.m365.services.teams.teams_service import Teams + +teams_client = Teams(Provider.get_global_provider()) diff --git a/prowler/providers/m365/services/teams/teams_email_sending_to_channel_disabled/__init__.py b/prowler/providers/m365/services/teams/teams_email_sending_to_channel_disabled/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/teams/teams_email_sending_to_channel_disabled/teams_email_sending_to_channel_disabled.metadata.json b/prowler/providers/m365/services/teams/teams_email_sending_to_channel_disabled/teams_email_sending_to_channel_disabled.metadata.json new file mode 100644 index 0000000000..306530b61c --- /dev/null +++ b/prowler/providers/m365/services/teams/teams_email_sending_to_channel_disabled/teams_email_sending_to_channel_disabled.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "teams_email_sending_to_channel_disabled", + "CheckTitle": "Ensure users are not be able to email the channel directly.", + "CheckType": [], + "ServiceName": "teams", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "high", + "ResourceType": "Teams Settings", + "Description": "Ensure users can not send emails to channel email addresses.", + "Risk": "Allowing users to send emails to Teams channel email addresses introduces a security risk, as these addresses are outside the tenantโ€™s domain and lack proper security controls. This creates a potential attack vector where threat actors could exploit the channel email to deliver malicious content or spam.", + "RelatedUrl": "https://learn.microsoft.com/en-us/powershell/module/teams/get-csteamsclientconfiguration?view=teams-ps", + "Remediation": { + "Code": { + "CLI": "Set-CsTeamsClientConfiguration -Identity Global -AllowEmailIntoChannel $false", + "NativeIaC": "", + "Other": "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.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Disable the ability for users to send emails to Teams channel email addresses to reduce the risk of external abuse and enhance control over organizational communications.", + "Url": "https://learn.microsoft.com/en-us/powershell/module/teams/get-csteamsclientconfiguration?view=teams-ps" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/teams/teams_email_sending_to_channel_disabled/teams_email_sending_to_channel_disabled.py b/prowler/providers/m365/services/teams/teams_email_sending_to_channel_disabled/teams_email_sending_to_channel_disabled.py new file mode 100644 index 0000000000..6a473daf96 --- /dev/null +++ b/prowler/providers/m365/services/teams/teams_email_sending_to_channel_disabled/teams_email_sending_to_channel_disabled.py @@ -0,0 +1,44 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.teams.teams_client import teams_client + + +class teams_email_sending_to_channel_disabled(Check): + """Check if users can send emails to channel email addresses. + + Attributes: + metadata: Metadata associated with the check (inherited from Check). + """ + + def execute(self) -> List[CheckReportM365]: + """Execute the check for + + This method checks if users can send emails to channel email addresses. + + Returns: + List[CheckReportM365]: A list of reports containing the result of the check. + """ + findings = [] + teams_settings = teams_client.teams_settings + if teams_settings: + report = CheckReportM365( + metadata=self.metadata(), + resource=teams_settings if teams_settings else {}, + resource_name="Teams Settings", + resource_id="teamsSettings", + ) + report.status = "FAIL" + report.status_extended = ( + "Teams users can send emails to channel email addresses." + ) + + if teams_settings and not teams_settings.allow_email_into_channel: + report.status = "PASS" + report.status_extended = ( + "Teams users cannot send emails to channel email addresses." + ) + + findings.append(report) + + return findings diff --git a/prowler/providers/m365/services/teams/teams_external_domains_restricted/__init__.py b/prowler/providers/m365/services/teams/teams_external_domains_restricted/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/teams/teams_external_domains_restricted/teams_external_domains_restricted.metadata.json b/prowler/providers/m365/services/teams/teams_external_domains_restricted/teams_external_domains_restricted.metadata.json new file mode 100644 index 0000000000..dbae20a0f6 --- /dev/null +++ b/prowler/providers/m365/services/teams/teams_external_domains_restricted/teams_external_domains_restricted.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "teams_external_domains_restricted", + "CheckTitle": "Ensure external domains are restricted.", + "CheckType": [], + "ServiceName": "teams", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "high", + "ResourceType": "Teams Settings", + "Description": "Ensure external domains are restricted from being used in Teams admin center.", + "Risk": "Allowing unrestricted communication with external domains in Microsoft Teams increases the risk of exposure to social engineering attacks, phishing, malware delivery (e.g., DarkGate), and exploitation tactics such as GIFShell or username enumeration.", + "RelatedUrl": "https://learn.microsoft.com/en-us/powershell/module/teams/set-cstenantfederationconfiguration?view=teams-ps", + "Remediation": { + "Code": { + "CLI": "Set-CsTenantFederationConfiguration -AllowFederatedUsers $false", + "NativeIaC": "", + "Other": "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 or Block all external domains. 4. Click Save.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Restrict external collaboration by configuring Teams to either Block all external domains or Allow only specific, trusted external domains. This ensures users can only interact with vetted organizations, significantly reducing the attack surface.", + "Url": "https://learn.microsoft.com/en-us/powershell/module/teams/set-cstenantfederationconfiguration?view=teams-ps" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/teams/teams_external_domains_restricted/teams_external_domains_restricted.py b/prowler/providers/m365/services/teams/teams_external_domains_restricted/teams_external_domains_restricted.py new file mode 100644 index 0000000000..f2f2d0bae4 --- /dev/null +++ b/prowler/providers/m365/services/teams/teams_external_domains_restricted/teams_external_domains_restricted.py @@ -0,0 +1,40 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.teams.teams_client import teams_client + + +class teams_external_domains_restricted(Check): + """Check if external domains are restricted from being used in Teams admin center. + + Attributes: + metadata: Metadata associated with the check (inherited from Check). + """ + + def execute(self) -> List[CheckReportM365]: + """Execute the check for + + This method checks if external domains are restricted from being used in Teams admin center. + + Returns: + List[CheckReportM365]: A list of reports containing the result of the check. + """ + findings = [] + user_settings = teams_client.user_settings + if user_settings: + report = CheckReportM365( + metadata=self.metadata(), + resource=user_settings if user_settings else {}, + resource_name="Teams User Settings", + resource_id="userSettings", + ) + report.status = "FAIL" + report.status_extended = "Users can access external domains." + + if user_settings and not user_settings.allow_external_access: + report.status = "PASS" + report.status_extended = "Users can not access external domains." + + findings.append(report) + + return findings diff --git a/prowler/providers/m365/services/teams/teams_external_file_sharing_restricted/__init__.py b/prowler/providers/m365/services/teams/teams_external_file_sharing_restricted/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/teams/teams_external_file_sharing_restricted/teams_external_file_sharing_restricted.metadata.json b/prowler/providers/m365/services/teams/teams_external_file_sharing_restricted/teams_external_file_sharing_restricted.metadata.json new file mode 100644 index 0000000000..6a84dec3c4 --- /dev/null +++ b/prowler/providers/m365/services/teams/teams_external_file_sharing_restricted/teams_external_file_sharing_restricted.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "teams_external_file_sharing_restricted", + "CheckTitle": "Ensure external file sharing in Teams is enabled for only approved cloud storage services", + "CheckType": [], + "ServiceName": "teams", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "high", + "ResourceType": "Teams Settings", + "Description": "", + "Risk": "Allowing unrestricted third-party cloud storage services in Teams increases the risk of data exfiltration, compliance violations, and unauthorized access to sensitive information. Users may store or share data through unapproved platforms with weaker security controls.", + "RelatedUrl": "https://learn.microsoft.com/en-us/powershell/module/teams/get-csteamsclientconfiguration?view=teams-ps", + "Remediation": { + "Code": { + "CLI": "Set-CsTeamsClientConfiguration -AllowGoogleDrive $false -AllowShareFile $false -AllowBox $false -AllowDropBox $false -AllowEgnyte $false", + "NativeIaC": "", + "Other": "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.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Restrict external file sharing in Teams to only approved cloud storage providers, such as SharePoint Online and OneDrive. Configure Teams policies to block unauthorized services and enforce compliance with organizational data protection standards.", + "Url": "https://learn.microsoft.com/en-us/powershell/module/teams/get-csteamsclientconfiguration?view=teams-ps" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/teams/teams_external_file_sharing_restricted/teams_external_file_sharing_restricted.py b/prowler/providers/m365/services/teams/teams_external_file_sharing_restricted/teams_external_file_sharing_restricted.py new file mode 100644 index 0000000000..33111d5509 --- /dev/null +++ b/prowler/providers/m365/services/teams/teams_external_file_sharing_restricted/teams_external_file_sharing_restricted.py @@ -0,0 +1,68 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.teams.teams_client import teams_client +from prowler.providers.m365.services.teams.teams_service import CloudStorageSettings + + +class teams_external_file_sharing_restricted(Check): + """Check if external file sharing is restricted in Teams. + + Attributes: + metadata: Metadata associated with the check (inherited from Check). + """ + + def execute(self) -> List[CheckReportM365]: + """Execute the check for external file sharing settings in Teams. + + This method checks if external file sharing is restricted in Teams. If external file sharing + is restricted to only approved cloud storage services the check passes; otherwise, it fails. + + Returns: + List[CheckReportM365]: A list of reports containing the result of the check. + """ + findings = [] + if teams_client.teams_settings: + cloud_storage_settings = teams_client.teams_settings.cloud_storage_settings + report = CheckReportM365( + metadata=self.metadata(), + resource=cloud_storage_settings if cloud_storage_settings else {}, + resource_name="Cloud Storage Settings", + resource_id="cloudStorageSettings", + ) + report.status = "FAIL" + report.status_extended = "External file sharing is not restricted to only approved cloud storage services." + + allowed_services = teams_client.audit_config.get( + "allowed_cloud_storage_services", [] + ) + if cloud_storage_settings: + # Get storage services from CloudStorageSettings class items + storage_services = [ + attr + for attr, type in CloudStorageSettings.__annotations__.items() + if type is bool + ] + + # Check if all services are disabled when no allowed services are specified + # or if all enabled services are in the allowed list + if ( + not allowed_services + and all( + not getattr(cloud_storage_settings, service, True) + for service in storage_services + ) + ) or ( + allowed_services + and not any( + getattr(cloud_storage_settings, service, True) + and service not in allowed_services + for service in storage_services + ) + ): + report.status = "PASS" + report.status_extended = "External file sharing is restricted to only approved cloud storage services." + + findings.append(report) + + return findings diff --git a/prowler/providers/m365/services/teams/teams_external_users_cannot_start_conversations/__init__.py b/prowler/providers/m365/services/teams/teams_external_users_cannot_start_conversations/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/teams/teams_external_users_cannot_start_conversations/teams_external_users_cannot_start_conversations.metadata.json b/prowler/providers/m365/services/teams/teams_external_users_cannot_start_conversations/teams_external_users_cannot_start_conversations.metadata.json new file mode 100644 index 0000000000..34a92f131e --- /dev/null +++ b/prowler/providers/m365/services/teams/teams_external_users_cannot_start_conversations/teams_external_users_cannot_start_conversations.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "teams_external_users_cannot_start_conversations", + "CheckTitle": "Ensure external users cannot start conversations.", + "CheckType": [], + "ServiceName": "teams", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "critical", + "ResourceType": "Teams Settings", + "Description": "Ensure external users cannot initiate conversations.", + "Risk": "Allowing unmanaged external Teams users to initiate conversations increases the risk of phishing, malware distribution such as DarkGate, social engineering attacks like those by Midnight Blizzard, GIFShell exploitation, and username enumeration.", + "RelatedUrl": "https://learn.microsoft.com/en-us/powershell/module/teams/set-cstenantfederationconfiguration?view=teams-ps", + "Remediation": { + "Code": { + "CLI": "Set-CsTenantFederationConfiguration -AllowTeamsConsumerInbound $false", + "NativeIaC": "", + "Other": "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.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Disable the ability for external Teams users not managed by an organization to initiate conversations by unchecking the option that permits them to contact users in your organization. This provides an added layer of protection, especially if exceptions are made to allow limited communication with unmanaged users.", + "Url": "https://learn.microsoft.com/en-us/powershell/module/teams/set-cstenantfederationconfiguration?view=teams-ps" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/teams/teams_external_users_cannot_start_conversations/teams_external_users_cannot_start_conversations.py b/prowler/providers/m365/services/teams/teams_external_users_cannot_start_conversations/teams_external_users_cannot_start_conversations.py new file mode 100644 index 0000000000..863c026383 --- /dev/null +++ b/prowler/providers/m365/services/teams/teams_external_users_cannot_start_conversations/teams_external_users_cannot_start_conversations.py @@ -0,0 +1,42 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.teams.teams_client import teams_client + + +class teams_external_users_cannot_start_conversations(Check): + """Check if external users cannot start conversations. + + Attributes: + metadata: Metadata associated with the check (inherited from Check). + """ + + def execute(self) -> List[CheckReportM365]: + """Execute the check for external users cannot start conversations. + + This method checks if external users cannot start conversations. + + Returns: + List[CheckReportM365]: A list of reports containing the result of the check. + """ + findings = [] + user_settings = teams_client.user_settings + if user_settings: + report = CheckReportM365( + metadata=self.metadata(), + resource=user_settings if user_settings else {}, + resource_name="Teams User Settings", + resource_id="userSettings", + ) + report.status = "FAIL" + report.status_extended = "External Teams users can initiate conversations." + + if user_settings and not user_settings.allow_teams_consumer_inbound: + report.status = "PASS" + report.status_extended = ( + "External Teams users cannot initiate conversations." + ) + + findings.append(report) + + return findings diff --git a/prowler/providers/m365/services/teams/teams_meeting_anonymous_user_join_disabled/__init__.py b/prowler/providers/m365/services/teams/teams_meeting_anonymous_user_join_disabled/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/teams/teams_meeting_anonymous_user_join_disabled/teams_meeting_anonymous_user_join_disabled.metadata.json b/prowler/providers/m365/services/teams/teams_meeting_anonymous_user_join_disabled/teams_meeting_anonymous_user_join_disabled.metadata.json new file mode 100644 index 0000000000..5d6e0615d2 --- /dev/null +++ b/prowler/providers/m365/services/teams/teams_meeting_anonymous_user_join_disabled/teams_meeting_anonymous_user_join_disabled.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "teams_meeting_anonymous_user_join_disabled", + "CheckTitle": "Ensure anonymous users are not able to join meetings.", + "CheckType": [], + "ServiceName": "teams", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "critical", + "ResourceType": "Teams Global Meeting Policy", + "Description": "Ensure individuals who are not sent or forwarded a meeting invite will not be able to join the meeting automatically.", + "Risk": "Allowing anonymous users to join meetings can lead to unauthorized access, information leakage, and potential disruptions, especially in meetings involving sensitive data.", + "RelatedUrl": "https://learn.microsoft.com/en-us/powershell/module/teams/set-csteamsmeetingpolicy?view=teams-ps", + "Remediation": { + "Code": { + "CLI": "Set-CsTeamsMeetingPolicy -Identity Global -AllowAnonymousUsersToJoinMeeting $false", + "NativeIaC": "", + "Other": "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 join & lobby set Anonymous users can join a meeting to Off.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Disable anonymous user access to Microsoft Teams meetings to ensure only invited participants can join. This adds a layer of vetting by requiring organizer approval for anyone not explicitly invited.", + "Url": "https://learn.microsoft.com/en-us/powershell/module/teams/set-csteamsmeetingpolicy?view=teams-ps" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/teams/teams_meeting_anonymous_user_join_disabled/teams_meeting_anonymous_user_join_disabled.py b/prowler/providers/m365/services/teams/teams_meeting_anonymous_user_join_disabled/teams_meeting_anonymous_user_join_disabled.py new file mode 100644 index 0000000000..c3f8df2f64 --- /dev/null +++ b/prowler/providers/m365/services/teams/teams_meeting_anonymous_user_join_disabled/teams_meeting_anonymous_user_join_disabled.py @@ -0,0 +1,40 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.teams.teams_client import teams_client + + +class teams_meeting_anonymous_user_join_disabled(Check): + """Check if anonymous users are not able to join meetings. + + Attributes: + metadata: Metadata associated with the check (inherited from Check). + """ + + def execute(self) -> List[CheckReportM365]: + """Execute the check for anonymous users are not able to join meetings. + + This method checks if anonymous users are not able to join meetings. + + Returns: + List[CheckReportM365]: A list of reports containing the result of the check. + """ + findings = [] + global_meeting_policy = teams_client.global_meeting_policy + if global_meeting_policy: + report = CheckReportM365( + metadata=self.metadata(), + resource=global_meeting_policy if global_meeting_policy else {}, + resource_name="Teams Meetings Global (Org-wide default) Policy", + resource_id="teamsMeetingsGlobalPolicy", + ) + report.status = "FAIL" + report.status_extended = "Anonymous Teams users can join meetings." + + if not global_meeting_policy.allow_anonymous_users_to_join_meeting: + report.status = "PASS" + report.status_extended = "Anonymous Teams users can not join meetings." + + findings.append(report) + + return findings diff --git a/prowler/providers/m365/services/teams/teams_meeting_anonymous_user_start_disabled/__init__.py b/prowler/providers/m365/services/teams/teams_meeting_anonymous_user_start_disabled/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/teams/teams_meeting_anonymous_user_start_disabled/teams_meeting_anonymous_user_start_disabled.metadata.json b/prowler/providers/m365/services/teams/teams_meeting_anonymous_user_start_disabled/teams_meeting_anonymous_user_start_disabled.metadata.json new file mode 100644 index 0000000000..7c8b2a9cbe --- /dev/null +++ b/prowler/providers/m365/services/teams/teams_meeting_anonymous_user_start_disabled/teams_meeting_anonymous_user_start_disabled.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "teams_meeting_anonymous_user_start_disabled", + "CheckTitle": "Ensure anonymous users are not able to start meetings.", + "CheckType": [], + "ServiceName": "teams", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "critical", + "ResourceType": "Teams Global Meeting Policy", + "Description": "Ensure anonymous users and dial-in callers are not able to start meetings.", + "Risk": "Allowing anonymous users and dial-in callers to start meetings without an authenticated participant present can lead to meeting spamming, unauthorized activity, and potential misuse of organizational resources.", + "RelatedUrl": "https://learn.microsoft.com/en-us/powershell/module/teams/set-csteamsmeetingpolicy?view=teams-ps", + "Remediation": { + "Code": { + "CLI": "Set-CsTeamsMeetingPolicy -Identity Global -AllowAnonymousUsersToStartMeeting $false", + "NativeIaC": "", + "Other": "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 join & lobby set Anonymous users and dial-in callers can start a meeting to Off.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Ensure that anonymous users and dial-in callers are required to wait in the lobby until a verified user from the organization or a trusted external domain starts the meeting. This reduces the risk of abuse and maintains meeting integrity.", + "Url": "https://learn.microsoft.com/en-us/powershell/module/teams/set-csteamsmeetingpolicy?view=teams-ps" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/teams/teams_meeting_anonymous_user_start_disabled/teams_meeting_anonymous_user_start_disabled.py b/prowler/providers/m365/services/teams/teams_meeting_anonymous_user_start_disabled/teams_meeting_anonymous_user_start_disabled.py new file mode 100644 index 0000000000..cae9198a54 --- /dev/null +++ b/prowler/providers/m365/services/teams/teams_meeting_anonymous_user_start_disabled/teams_meeting_anonymous_user_start_disabled.py @@ -0,0 +1,40 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.teams.teams_client import teams_client + + +class teams_meeting_anonymous_user_start_disabled(Check): + """Check if anonymous users are not able to start meetings. + + Attributes: + metadata: Metadata associated with the check (inherited from Check). + """ + + def execute(self) -> List[CheckReportM365]: + """Execute the check for anonymous users are not able to start meetings. + + This method checks if anonymous users and dial-in callers are not able to start meetings. + + Returns: + List[CheckReportM365]: A list of reports containing the result of the check. + """ + findings = [] + global_meeting_policy = teams_client.global_meeting_policy + if global_meeting_policy: + report = CheckReportM365( + metadata=self.metadata(), + resource=global_meeting_policy if global_meeting_policy else {}, + resource_name="Teams Meetings Global (Org-wide default) Policy", + resource_id="teamsMeetingsGlobalPolicy", + ) + report.status = "FAIL" + report.status_extended = "Anonymous Teams users can start meetings." + + if not global_meeting_policy.allow_anonymous_users_to_start_meeting: + report.status = "PASS" + report.status_extended = "Anonymous Teams users can not start meetings." + + findings.append(report) + + return findings diff --git a/prowler/providers/m365/services/teams/teams_meeting_chat_anonymous_users_disabled/__init__.py b/prowler/providers/m365/services/teams/teams_meeting_chat_anonymous_users_disabled/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/teams/teams_meeting_chat_anonymous_users_disabled/teams_meeting_chat_anonymous_users_disabled.metadata.json b/prowler/providers/m365/services/teams/teams_meeting_chat_anonymous_users_disabled/teams_meeting_chat_anonymous_users_disabled.metadata.json new file mode 100644 index 0000000000..0beb3918e5 --- /dev/null +++ b/prowler/providers/m365/services/teams/teams_meeting_chat_anonymous_users_disabled/teams_meeting_chat_anonymous_users_disabled.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "teams_meeting_chat_anonymous_users_disabled", + "CheckTitle": "Ensure meeting chat does not allow anonymous users", + "CheckType": [], + "ServiceName": "teams", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "critical", + "ResourceType": "Teams Global Meeting Policy", + "Description": "Ensure meeting chat does not allow anonymous users.", + "Risk": "Allowing anonymous users to participate in meeting chat can expose sensitive information and increase the risk of inappropriate content being shared by unverified participants.", + "RelatedUrl": "https://learn.microsoft.com/en-us/powershell/module/teams/set-csteamsmeetingpolicy?view=teams-ps", + "Remediation": { + "Code": { + "CLI": "Set-CsTeamsMeetingPolicy -Identity Global -MeetingChatEnabledType 'EnabledExceptAnonymous'", + "NativeIaC": "", + "Other": "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 Meeting chat is set to On for everyone but anonymous users.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Restrict chat access during meetings to only authenticated and authorized users. Disable chat capabilities for anonymous users to maintain confidentiality and prevent misuse.", + "Url": "https://learn.microsoft.com/en-us/powershell/module/teams/set-csteamsmeetingpolicy?view=teams-ps" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/teams/teams_meeting_chat_anonymous_users_disabled/teams_meeting_chat_anonymous_users_disabled.py b/prowler/providers/m365/services/teams/teams_meeting_chat_anonymous_users_disabled/teams_meeting_chat_anonymous_users_disabled.py new file mode 100644 index 0000000000..9eacc6b8af --- /dev/null +++ b/prowler/providers/m365/services/teams/teams_meeting_chat_anonymous_users_disabled/teams_meeting_chat_anonymous_users_disabled.py @@ -0,0 +1,48 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.teams.teams_client import teams_client + + +class teams_meeting_chat_anonymous_users_disabled(Check): + """Check if meeting chat does not allow anonymous users. + + Attributes: + metadata: Metadata associated with the check (inherited from Check). + """ + + def execute(self) -> List[CheckReportM365]: + """Execute the check for meeting chat does not allow anonymous users. + + This method checks if meeting chat does not allow anonymous users. + + Returns: + List[CheckReportM365]: A list of reports containing the result of the check. + """ + findings = [] + global_meeting_policy = teams_client.global_meeting_policy + if global_meeting_policy: + report = CheckReportM365( + metadata=self.metadata(), + resource=global_meeting_policy if global_meeting_policy else {}, + resource_name="Teams Meetings Global (Org-wide default) Policy", + resource_id="teamsMeetingsGlobalPolicy", + ) + report.status = "FAIL" + report.status_extended = "Meeting chat allows anonymous users." + + allowed_meeting_chat_settings = { + "EnabledExceptAnonymous", + "EnabledInMeetingOnlyForAllExceptAnonymous", + } + + if ( + global_meeting_policy.meeting_chat_enabled_type + in allowed_meeting_chat_settings + ): + report.status = "PASS" + report.status_extended = "Meeting chat does not allow anonymous users." + + findings.append(report) + + return findings diff --git a/prowler/providers/m365/services/teams/teams_meeting_dial_in_lobby_bypass_disabled/__init__.py b/prowler/providers/m365/services/teams/teams_meeting_dial_in_lobby_bypass_disabled/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/teams/teams_meeting_dial_in_lobby_bypass_disabled/teams_meeting_dial_in_lobby_bypass_disabled.metadata.json b/prowler/providers/m365/services/teams/teams_meeting_dial_in_lobby_bypass_disabled/teams_meeting_dial_in_lobby_bypass_disabled.metadata.json new file mode 100644 index 0000000000..632c257e0c --- /dev/null +++ b/prowler/providers/m365/services/teams/teams_meeting_dial_in_lobby_bypass_disabled/teams_meeting_dial_in_lobby_bypass_disabled.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "teams_meeting_dial_in_lobby_bypass_disabled", + "CheckTitle": "Ensure that dial-in users cannot bypass the lobby in Teams meetings", + "CheckType": [], + "ServiceName": "teams", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "critical", + "ResourceType": "Teams Global Meeting Policy", + "Description": "Ensure that dial-in users cannot bypass the lobby in Teams meetings", + "Risk": "Allowing dial-in users to bypass the lobby may result in unauthorized or unauthenticated individuals joining sensitive meetings without prior validation, increasing the risk of information leakage or meeting disruptions.", + "RelatedUrl": "https://learn.microsoft.com/en-us/powershell/module/teams/set-csteamsmeetingpolicy?view=teams-ps", + "Remediation": { + "Code": { + "CLI": "Set-CsTeamsMeetingPolicy -Identity Global -AllowPSTNUsersToBypassLobby $false", + "NativeIaC": "", + "Other": "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 join & lobby set People dialing in can bypass the lobby to Off.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Require all users dialing in by phone to wait in the lobby until admitted by the meeting organizer, co-organizer, or presenter. This ensures proper vetting before granting access to potentially sensitive discussions.", + "Url": "https://learn.microsoft.com/en-us/powershell/module/teams/set-csteamsmeetingpolicy?view=teams-ps" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/teams/teams_meeting_dial_in_lobby_bypass_disabled/teams_meeting_dial_in_lobby_bypass_disabled.py b/prowler/providers/m365/services/teams/teams_meeting_dial_in_lobby_bypass_disabled/teams_meeting_dial_in_lobby_bypass_disabled.py new file mode 100644 index 0000000000..0014be6d61 --- /dev/null +++ b/prowler/providers/m365/services/teams/teams_meeting_dial_in_lobby_bypass_disabled/teams_meeting_dial_in_lobby_bypass_disabled.py @@ -0,0 +1,40 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.teams.teams_client import teams_client + + +class teams_meeting_dial_in_lobby_bypass_disabled(Check): + """Check if users dialing in can't bypass the lobby. + + Attributes: + metadata: Metadata associated with the check (inherited from Check). + """ + + def execute(self) -> List[CheckReportM365]: + """Execute the check for users dialing in can't bypass the lobby. + + This method checks if users dialing in can't bypass the lobby. + + Returns: + List[CheckReportM365]: A list of reports containing the result of the check. + """ + findings = [] + global_meeting_policy = teams_client.global_meeting_policy + if global_meeting_policy: + report = CheckReportM365( + metadata=self.metadata(), + resource=global_meeting_policy if global_meeting_policy else {}, + resource_name="Teams Meetings Global (Org-wide default) Policy", + resource_id="teamsMeetingsGlobalPolicy", + ) + report.status = "FAIL" + report.status_extended = "Dial-in users can bypass the lobby." + + if not global_meeting_policy.allow_pstn_users_to_bypass_lobby: + report.status = "PASS" + report.status_extended = "Dial-in users cannot bypass the lobby." + + findings.append(report) + + return findings diff --git a/prowler/providers/m365/services/teams/teams_meeting_external_chat_disabled/__init__.py b/prowler/providers/m365/services/teams/teams_meeting_external_chat_disabled/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/teams/teams_meeting_external_chat_disabled/teams_meeting_external_chat_disabled.metadata.json b/prowler/providers/m365/services/teams/teams_meeting_external_chat_disabled/teams_meeting_external_chat_disabled.metadata.json new file mode 100644 index 0000000000..9a414f6e3b --- /dev/null +++ b/prowler/providers/m365/services/teams/teams_meeting_external_chat_disabled/teams_meeting_external_chat_disabled.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "teams_meeting_external_chat_disabled", + "CheckTitle": "Ensure external meeting chat is off", + "CheckType": [], + "ServiceName": "teams", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "high", + "ResourceType": "Teams Global Meeting Policy", + "Description": "Ensure users can't read or write messages in external meeting chats with untrusted organizations.", + "Risk": "Allowing chat in external meetings increases the risk of exploits like GIFShell or DarkGate malware being delivered to users through untrusted organizations.", + "RelatedUrl": "https://learn.microsoft.com/en-us/powershell/module/teams/set-csteamsmeetingpolicy?view=teams-ps", + "Remediation": { + "Code": { + "CLI": "Set-CsTeamsMeetingPolicy -Identity Global -AllowExternalNonTrustedMeetingChat $false", + "NativeIaC": "", + "Other": "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.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Disable external meeting chat to prevent potential security risks from untrusted organizations. This helps protect against exploits like GIFShell or DarkGate malware.", + "Url": "https://learn.microsoft.com/en-us/powershell/module/teams/set-csteamsmeetingpolicy?view=teams-ps" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/teams/teams_meeting_external_chat_disabled/teams_meeting_external_chat_disabled.py b/prowler/providers/m365/services/teams/teams_meeting_external_chat_disabled/teams_meeting_external_chat_disabled.py new file mode 100644 index 0000000000..ac4787f7e6 --- /dev/null +++ b/prowler/providers/m365/services/teams/teams_meeting_external_chat_disabled/teams_meeting_external_chat_disabled.py @@ -0,0 +1,44 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.teams.teams_client import teams_client + + +class teams_meeting_external_chat_disabled(Check): + """Check if external meeting chat is disabled. + + Attributes: + metadata: Metadata associated with the check (inherited from Check). + """ + + def execute(self) -> List[CheckReportM365]: + """Execute the check for external meeting chat settings. + + This method checks if external meeting chat is disabled for untrusted organizations. + + Returns: + List[CheckReportM365]: A list of reports containing the result of the check. + """ + findings = [] + global_meeting_policy = teams_client.global_meeting_policy + if global_meeting_policy: + report = CheckReportM365( + metadata=self.metadata(), + resource=global_meeting_policy if global_meeting_policy else {}, + resource_name="Teams Meetings Global (Org-wide default) Policy", + resource_id="teamsMeetingsGlobalPolicy", + ) + report.status = "FAIL" + report.status_extended = ( + "External meeting chat is enabled for untrusted organizations." + ) + + if not global_meeting_policy.allow_external_non_trusted_meeting_chat: + report.status = "PASS" + report.status_extended = ( + "External meeting chat is disabled for untrusted organizations." + ) + + findings.append(report) + + return findings diff --git a/prowler/providers/m365/services/teams/teams_meeting_external_control_disabled/__init__.py b/prowler/providers/m365/services/teams/teams_meeting_external_control_disabled/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/teams/teams_meeting_external_control_disabled/teams_meeting_external_control_disabled.metadata.json b/prowler/providers/m365/services/teams/teams_meeting_external_control_disabled/teams_meeting_external_control_disabled.metadata.json new file mode 100644 index 0000000000..ef46ae25c4 --- /dev/null +++ b/prowler/providers/m365/services/teams/teams_meeting_external_control_disabled/teams_meeting_external_control_disabled.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "teams_meeting_external_control_disabled", + "CheckTitle": "Ensure external participants can't give or request control", + "CheckType": [], + "ServiceName": "teams", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "high", + "ResourceType": "Teams Global Meeting Policy", + "Description": "Ensure external participants can't give or request control in Teams meetings.", + "Risk": "Allowing external participants to give or request control during meetings could lead to unauthorized content sharing or malicious actions by external users.", + "RelatedUrl": "https://learn.microsoft.com/en-us/powershell/module/teams/set-csteamsmeetingpolicy?view=teams-ps", + "Remediation": { + "Code": { + "CLI": "Set-CsTeamsMeetingPolicy -Identity Global -AllowExternalParticipantGiveRequestControl $false", + "NativeIaC": "", + "Other": "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.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Disable the ability for external participants to give or request control during Teams meetings to prevent unauthorized content sharing and maintain meeting security.", + "Url": "https://learn.microsoft.com/en-us/powershell/module/teams/set-csteamsmeetingpolicy?view=teams-ps" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/teams/teams_meeting_external_control_disabled/teams_meeting_external_control_disabled.py b/prowler/providers/m365/services/teams/teams_meeting_external_control_disabled/teams_meeting_external_control_disabled.py new file mode 100644 index 0000000000..c08ee4ee32 --- /dev/null +++ b/prowler/providers/m365/services/teams/teams_meeting_external_control_disabled/teams_meeting_external_control_disabled.py @@ -0,0 +1,46 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.teams.teams_client import teams_client + + +class teams_meeting_external_control_disabled(Check): + """Check if external participants can't give or request control in meetings. + + Attributes: + metadata: Metadata associated with the check (inherited from Check). + """ + + def execute(self) -> List[CheckReportM365]: + """Execute the check for external participants' control permissions in meetings. + + This method checks if external participants are prevented from giving or requesting control in meetings. + + Returns: + List[CheckReportM365]: A list of reports containing the result of the check. + """ + findings = [] + global_meeting_policy = teams_client.global_meeting_policy + if global_meeting_policy: + report = CheckReportM365( + metadata=self.metadata(), + resource=global_meeting_policy if global_meeting_policy else {}, + resource_name="Teams Meetings Global (Org-wide default) Policy", + resource_id="teamsMeetingsGlobalPolicy", + ) + report.status = "FAIL" + report.status_extended = ( + "External participants can give or request control." + ) + + if ( + not global_meeting_policy.allow_external_participant_give_request_control + ): + report.status = "PASS" + report.status_extended = ( + "External participants cannot give or request control." + ) + + findings.append(report) + + return findings diff --git a/prowler/providers/m365/services/teams/teams_meeting_external_lobby_bypass_disabled/__init__.py b/prowler/providers/m365/services/teams/teams_meeting_external_lobby_bypass_disabled/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/teams/teams_meeting_external_lobby_bypass_disabled/teams_meeting_external_lobby_bypass_disabled.metadata.json b/prowler/providers/m365/services/teams/teams_meeting_external_lobby_bypass_disabled/teams_meeting_external_lobby_bypass_disabled.metadata.json new file mode 100644 index 0000000000..60a63bc218 --- /dev/null +++ b/prowler/providers/m365/services/teams/teams_meeting_external_lobby_bypass_disabled/teams_meeting_external_lobby_bypass_disabled.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "teams_meeting_external_lobby_bypass_disabled", + "CheckTitle": "Ensure only people in the organization can bypass the lobby.", + "CheckType": [], + "ServiceName": "teams", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "critical", + "ResourceType": "Teams Global Meeting Policy", + "Description": "Ensure only people in the organization can bypass the lobby.", + "Risk": "Allowing external users or unauthenticated participants to bypass the lobby increases the risk of unauthorized access to sensitive meetings and potential disruptions. It may also lead to unscheduled meetings being initiated by external parties.", + "RelatedUrl": "https://learn.microsoft.com/en-us/powershell/module/teams/set-csteamsmeetingpolicy?view=teams-ps", + "Remediation": { + "Code": { + "CLI": "Set-CsTeamsMeetingPolicy -Identity Global -AutoAdmittedUsers 'EveryoneInCompanyExcludingGuests' ", + "NativeIaC": "", + "Other": "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 join & lobby set Who can bypass the lobby to People in my org.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Ensure that only people within the organization can bypass the lobby, requiring external users and dial-in participants to wait for approval from an organizer, co-organizer, or presenter. This helps secure sensitive meetings and prevents unauthorized access.", + "Url": "https://learn.microsoft.com/en-us/powershell/module/teams/set-csteamsmeetingpolicy?view=teams-ps" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/teams/teams_meeting_external_lobby_bypass_disabled/teams_meeting_external_lobby_bypass_disabled.py b/prowler/providers/m365/services/teams/teams_meeting_external_lobby_bypass_disabled/teams_meeting_external_lobby_bypass_disabled.py new file mode 100644 index 0000000000..53796008f5 --- /dev/null +++ b/prowler/providers/m365/services/teams/teams_meeting_external_lobby_bypass_disabled/teams_meeting_external_lobby_bypass_disabled.py @@ -0,0 +1,52 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.teams.teams_client import teams_client + + +class teams_meeting_external_lobby_bypass_disabled(Check): + """Check if only people in the organization can bypass the lobby. + + Attributes: + metadata: Metadata associated with the check (inherited from Check). + """ + + def execute(self) -> List[CheckReportM365]: + """Execute the check for only people in the organization can bypass the lobby. + + This method checks if only people in the organization can bypass the lobby. + + Returns: + List[CheckReportM365]: A list of reports containing the result of the check. + """ + findings = [] + global_meeting_policy = teams_client.global_meeting_policy + if global_meeting_policy: + report = CheckReportM365( + metadata=self.metadata(), + resource=global_meeting_policy if global_meeting_policy else {}, + resource_name="Teams Meetings Global (Org-wide default) Policy", + resource_id="teamsMeetingsGlobalPolicy", + ) + report.status = "FAIL" + report.status_extended = ( + "People outside the organization can bypass the lobby." + ) + + allowed_bypass_settings = { + "EveryoneInCompanyExcludingGuests", + "OrganizerOnly", + "InvitedUsers", + } + if ( + global_meeting_policy.allow_external_users_to_bypass_lobby + in allowed_bypass_settings + ): + report.status = "PASS" + report.status_extended = ( + "Only people in the organization can bypass the lobby." + ) + + findings.append(report) + + return findings diff --git a/prowler/providers/m365/services/teams/teams_meeting_presenters_restricted/__init__.py b/prowler/providers/m365/services/teams/teams_meeting_presenters_restricted/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/teams/teams_meeting_presenters_restricted/teams_meeting_presenters_restricted.metadata.json b/prowler/providers/m365/services/teams/teams_meeting_presenters_restricted/teams_meeting_presenters_restricted.metadata.json new file mode 100644 index 0000000000..3d5064aa53 --- /dev/null +++ b/prowler/providers/m365/services/teams/teams_meeting_presenters_restricted/teams_meeting_presenters_restricted.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "teams_meeting_presenters_restricted", + "CheckTitle": "Ensure only organizers and co-organizers can present", + "CheckType": [], + "ServiceName": "teams", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "high", + "ResourceType": "Teams Global Meeting Policy", + "Description": "Ensure only organizers and co-organizers can present in a Teams meeting. The recommended state is 'Only organizers and co-organizers'.", + "Risk": "Allowing everyone to present increases the risk that a malicious user can inadvertently show inappropriate content.", + "RelatedUrl": "https://learn.microsoft.com/en-us/microsoftteams/meeting-who-present-request-control", + "Remediation": { + "Code": { + "CLI": "Set-CsTeamsMeetingPolicy -Identity Global -DesignatedPresenterRoleMode \"OrganizerOnlyUserOverride\"", + "NativeIaC": "", + "Other": "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 Who can present to Only organizers and co-organizers.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Restrict presentation capabilities to only organizers and co-organizers to reduce the risk of inappropriate content being shown.", + "Url": "https://learn.microsoft.com/en-us/microsoftteams/meeting-who-present-request-control" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/teams/teams_meeting_presenters_restricted/teams_meeting_presenters_restricted.py b/prowler/providers/m365/services/teams/teams_meeting_presenters_restricted/teams_meeting_presenters_restricted.py new file mode 100644 index 0000000000..bfbdd169f2 --- /dev/null +++ b/prowler/providers/m365/services/teams/teams_meeting_presenters_restricted/teams_meeting_presenters_restricted.py @@ -0,0 +1,47 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.teams.teams_client import teams_client + + +class teams_meeting_presenters_restricted(Check): + """Check if only organizers and co-organizers can present. + + Attributes: + metadata: Metadata associated with the check (inherited from Check). + """ + + def execute(self) -> List[CheckReportM365]: + """Execute the check for meeting presenter settings. + + This method checks if only organizers and co-organizers can present. + + Returns: + List[CheckReportM365]: A list of reports containing the result of the check. + """ + findings = [] + global_meeting_policy = teams_client.global_meeting_policy + if global_meeting_policy: + report = CheckReportM365( + metadata=self.metadata(), + resource=global_meeting_policy if global_meeting_policy else {}, + resource_name="Teams Meetings Global (Org-wide default) Policy", + resource_id="teamsMeetingsGlobalPolicy", + ) + report.status = "FAIL" + report.status_extended = ( + "Not only organizers and co-organizers can present." + ) + + if ( + global_meeting_policy.designated_presenter_role_mode + == "OrganizerOnlyUserOverride" + ): + report.status = "PASS" + report.status_extended = ( + "Only organizers and co-organizers can present." + ) + + findings.append(report) + + return findings diff --git a/prowler/providers/m365/services/teams/teams_meeting_recording_disabled/__init__.py b/prowler/providers/m365/services/teams/teams_meeting_recording_disabled/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/teams/teams_meeting_recording_disabled/teams_meeting_recording_disabled.metadata.json b/prowler/providers/m365/services/teams/teams_meeting_recording_disabled/teams_meeting_recording_disabled.metadata.json new file mode 100644 index 0000000000..8effe74064 --- /dev/null +++ b/prowler/providers/m365/services/teams/teams_meeting_recording_disabled/teams_meeting_recording_disabled.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "teams_meeting_recording_disabled", + "CheckTitle": "Ensure meeting recording is disabled by default", + "CheckType": [], + "ServiceName": "teams", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "high", + "ResourceType": "Teams Global Meeting Policy", + "Description": "Ensures that only authorized users, such as organizers, co-organizers, and leads, can initiate a recording.", + "Risk": "Allowing meeting recordings by default increases the risk of unauthorized individuals capturing and potentially sharing sensitive meeting content.", + "RelatedUrl": "https://learn.microsoft.com/en-us/powershell/module/teams/set-csteamsmeetingpolicy?view=teams-ps", + "Remediation": { + "Code": { + "CLI": "Set-CsTeamsMeetingPolicy -Identity Global -AllowCloudRecording $false", + "NativeIaC": "", + "Other": "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.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Disable meeting recording in the Global meeting policy to ensure only authorized users can initiate recordings. Create separate policies for users or groups who need recording capabilities.", + "Url": "https://learn.microsoft.com/en-us/powershell/module/teams/set-csteamsmeetingpolicy?view=teams-ps" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/teams/teams_meeting_recording_disabled/teams_meeting_recording_disabled.py b/prowler/providers/m365/services/teams/teams_meeting_recording_disabled/teams_meeting_recording_disabled.py new file mode 100644 index 0000000000..3da4c89c9c --- /dev/null +++ b/prowler/providers/m365/services/teams/teams_meeting_recording_disabled/teams_meeting_recording_disabled.py @@ -0,0 +1,40 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.teams.teams_client import teams_client + + +class teams_meeting_recording_disabled(Check): + """Check if meeting recording is disabled by default. + + Attributes: + metadata: Metadata associated with the check (inherited from Check). + """ + + def execute(self) -> List[CheckReportM365]: + """Execute the check for meeting recording settings. + + This method checks if meeting recording is disabled in the Global meeting policy. + + Returns: + List[CheckReportM365]: A list of reports containing the result of the check. + """ + findings = [] + global_meeting_policy = teams_client.global_meeting_policy + if global_meeting_policy: + report = CheckReportM365( + metadata=self.metadata(), + resource=global_meeting_policy if global_meeting_policy else {}, + resource_name="Teams Meetings Global (Org-wide default) Policy", + resource_id="teamsMeetingsGlobalPolicy", + ) + report.status = "FAIL" + report.status_extended = "Meeting recording is enabled by default." + + if not global_meeting_policy.allow_cloud_recording: + report.status = "PASS" + report.status_extended = "Meeting recording is disabled by default." + + findings.append(report) + + return findings diff --git a/prowler/providers/m365/services/teams/teams_security_reporting_enabled/__init__.py b/prowler/providers/m365/services/teams/teams_security_reporting_enabled/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/teams/teams_security_reporting_enabled/teams_security_reporting_enabled.metadata.json b/prowler/providers/m365/services/teams/teams_security_reporting_enabled/teams_security_reporting_enabled.metadata.json new file mode 100644 index 0000000000..2137160f18 --- /dev/null +++ b/prowler/providers/m365/services/teams/teams_security_reporting_enabled/teams_security_reporting_enabled.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "teams_security_reporting_enabled", + "CheckTitle": "Ensure users can report security concerns in Teams", + "CheckType": [], + "ServiceName": "teams", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "medium", + "ResourceType": "Teams Global Messaging Policy", + "Description": "Ensure Teams user reporting settings allow a user to report a message as malicious for further analysis", + "Risk": "Without proper security reporting enabled, users cannot effectively report suspicious or malicious messages, potentially allowing security threats to go unnoticed.", + "RelatedUrl": "https://learn.microsoft.com/en-us/defender-office-365/submissions-teams?view=o365-worldwide", + "Remediation": { + "Code": { + "CLI": "Set-CsTeamsMessagingPolicy -Identity Global -AllowSecurityEndUserReporting $true", + "NativeIaC": "", + "Other": "1. Navigate to Microsoft Teams admin center (https://admin.teams.microsoft.com). 2. Click to expand Messaging and select Messaging policies. 3. Click Global (Org-wide default). 4. Ensure Report a security concern is On.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Enable security reporting in Teams messaging policy.", + "Url": "https://learn.microsoft.com/en-us/defender-office-365/submissions-teams?view=o365-worldwide" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/teams/teams_security_reporting_enabled/teams_security_reporting_enabled.py b/prowler/providers/m365/services/teams/teams_security_reporting_enabled/teams_security_reporting_enabled.py new file mode 100644 index 0000000000..f90d41543a --- /dev/null +++ b/prowler/providers/m365/services/teams/teams_security_reporting_enabled/teams_security_reporting_enabled.py @@ -0,0 +1,50 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.teams.teams_client import teams_client + + +class teams_security_reporting_enabled(Check): + """Check if users can report security concerns in Teams. + + Attributes: + metadata: Metadata associated with the check (inherited from Check). + """ + + def execute(self) -> List[CheckReportM365]: + """Execute the check for Teams security reporting settings. + + This method checks if security reporting is properly configured in Teams settings. + + Returns: + List[CheckReportM365]: A list of reports containing the result of the check. + """ + findings = [] + global_messaging_policy = teams_client.global_messaging_policy + + if global_messaging_policy: + report = CheckReportM365( + metadata=self.metadata(), + resource=global_messaging_policy, + resource_name="Teams Security Reporting Settings", + resource_id="teamsSecurityReporting", + ) + + teams_reporting_enabled = ( + global_messaging_policy.allow_security_end_user_reporting + ) + + if teams_reporting_enabled: + report.status = "PASS" + report.status_extended = ( + "Security reporting is enabled in Teams messaging policy." + ) + else: + report.status = "FAIL" + report.status_extended = ( + "Security reporting is not enabled in Teams messaging policy." + ) + + findings.append(report) + + return findings diff --git a/prowler/providers/m365/services/teams/teams_service.py b/prowler/providers/m365/services/teams/teams_service.py new file mode 100644 index 0000000000..f17f22d327 --- /dev/null +++ b/prowler/providers/m365/services/teams/teams_service.py @@ -0,0 +1,162 @@ +from pydantic import BaseModel + +from prowler.lib.logger import logger +from prowler.providers.m365.lib.service.service import M365Service +from prowler.providers.m365.m365_provider import M365Provider + + +class Teams(M365Service): + def __init__(self, provider: M365Provider): + super().__init__(provider) + self.teams_settings = None + self.global_meeting_policy = None + self.global_messaging_policy = None + self.user_settings = None + + if self.powershell: + self.powershell.connect_microsoft_teams() + self.teams_settings = self._get_teams_client_configuration() + self.global_meeting_policy = self._get_global_meeting_policy() + self.global_messaging_policy = self._get_global_messaging_policy() + self.user_settings = self._get_user_settings() + self.powershell.close() + + def _get_teams_client_configuration(self): + logger.info("M365 - Getting Teams settings...") + teams_settings = None + try: + settings = self.powershell.get_teams_settings() + if settings: + teams_settings = TeamsSettings( + cloud_storage_settings=CloudStorageSettings( + allow_box=settings.get("AllowBox", True), + allow_drop_box=settings.get("AllowDropBox", True), + allow_egnyte=settings.get("AllowEgnyte", True), + allow_google_drive=settings.get("AllowGoogleDrive", True), + allow_share_file=settings.get("AllowShareFile", True), + ), + allow_email_into_channel=settings.get( + "AllowEmailIntoChannel", True + ), + ) + + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + return teams_settings + + def _get_global_meeting_policy(self): + logger.info("M365 - Getting Teams global (org-wide default) meeting policy...") + global_meeting_policy = None + try: + global_meeting_policy = self.powershell.get_global_meeting_policy() + if global_meeting_policy: + global_meeting_policy = GlobalMeetingPolicy( + allow_anonymous_users_to_join_meeting=global_meeting_policy.get( + "AllowAnonymousUsersToJoinMeeting", True + ), + allow_anonymous_users_to_start_meeting=global_meeting_policy.get( + "AllowAnonymousUsersToStartMeeting", True + ), + allow_external_participant_give_request_control=global_meeting_policy.get( + "AllowExternalParticipantGiveRequestControl", True + ), + allow_external_users_to_bypass_lobby=global_meeting_policy.get( + "AutoAdmittedUsers", "Everyone" + ), + allow_pstn_users_to_bypass_lobby=global_meeting_policy.get( + "AllowPSTNUsersToBypassLobby", True + ), + allow_external_non_trusted_meeting_chat=global_meeting_policy.get( + "AllowExternalNonTrustedMeetingChat", True + ), + allow_cloud_recording=global_meeting_policy.get( + "AllowCloudRecording", True + ), + designated_presenter_role_mode=global_meeting_policy.get( + "DesignatedPresenterRoleMode", "EveryoneUserOverride" + ), + allow_security_end_user_reporting=global_meeting_policy.get( + "AllowSecurityEndUserReporting", False + ), + meeting_chat_enabled_type=global_meeting_policy.get( + "MeetingChatEnabledType", "EnabledForEveryone" + ), + ) + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + return global_meeting_policy + + def _get_global_messaging_policy(self): + logger.info("M365 - Getting Teams global messaging policy...") + global_messaging_policy = None + try: + global_messaging_policy = self.powershell.get_global_messaging_policy() + if global_messaging_policy: + global_messaging_policy = GlobalMessagingPolicy( + allow_security_end_user_reporting=global_messaging_policy.get( + "AllowSecurityEndUserReporting", False + ), + ) + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + return global_messaging_policy + + def _get_user_settings(self): + logger.info("M365 - Getting Teams user settings...") + user_settings = None + try: + settings = self.powershell.get_user_settings() + if settings: + user_settings = UserSettings( + allow_external_access=settings.get("AllowFederatedUsers", True), + allow_teams_consumer=settings.get("AllowTeamsConsumer", True), + allow_teams_consumer_inbound=settings.get( + "AllowTeamsConsumerInbound", True + ), + ) + except Exception as error: + logger.error( + f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" + ) + return user_settings + + +class CloudStorageSettings(BaseModel): + allow_box: bool + allow_drop_box: bool + allow_egnyte: bool + allow_google_drive: bool + allow_share_file: bool + + +class TeamsSettings(BaseModel): + cloud_storage_settings: CloudStorageSettings + allow_email_into_channel: bool = True + + +class GlobalMeetingPolicy(BaseModel): + allow_anonymous_users_to_join_meeting: bool = True + allow_anonymous_users_to_start_meeting: bool = True + allow_external_participant_give_request_control: bool = True + allow_external_non_trusted_meeting_chat: bool = True + allow_cloud_recording: bool = True + designated_presenter_role_mode: str = "EveryoneUserOverride" + allow_external_users_to_bypass_lobby: str = "Everyone" + allow_pstn_users_to_bypass_lobby: bool = True + meeting_chat_enabled_type: str = "EnabledForEveryone" + + +class GlobalMessagingPolicy(BaseModel): + allow_security_end_user_reporting: bool = False + + +class UserSettings(BaseModel): + allow_external_access: bool = True + allow_teams_consumer: bool = True + allow_teams_consumer_inbound: bool = True diff --git a/prowler/providers/m365/services/teams/teams_unmanaged_communication_disabled/__init__.py b/prowler/providers/m365/services/teams/teams_unmanaged_communication_disabled/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/m365/services/teams/teams_unmanaged_communication_disabled/teams_unmanaged_communication_disabled.metadata.json b/prowler/providers/m365/services/teams/teams_unmanaged_communication_disabled/teams_unmanaged_communication_disabled.metadata.json new file mode 100644 index 0000000000..cb514a220d --- /dev/null +++ b/prowler/providers/m365/services/teams/teams_unmanaged_communication_disabled/teams_unmanaged_communication_disabled.metadata.json @@ -0,0 +1,32 @@ +{ + "Provider": "m365", + "CheckID": "teams_unmanaged_communication_disabled", + "CheckTitle": "Ensure unmanaged communication is disabled.", + "CheckType": [], + "ServiceName": "teams", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "critical", + "ResourceType": "Teams Settings", + "Description": "Ensure unmanaged communication is disabled in Teams admin center.", + "Risk": "Allowing communication with unmanaged Microsoft Teams users increases the risk of targeted attacks such as phishing, malware distribution (e.g., DarkGate), and exploitation techniques like GIFShell and username enumeration. Unmanaged accounts are easier for threat actors to create and use as attack vectors.", + "RelatedUrl": "https://learn.microsoft.com/en-us/powershell/module/teams/set-cstenantfederationconfiguration?view=teams-ps", + "Remediation": { + "Code": { + "CLI": "Set-CsTenantFederationConfiguration -AllowTeamsConsumer $false", + "NativeIaC": "", + "Other": "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.", + "Terraform": "" + }, + "Recommendation": { + "Text": "Disable communication with Teams users whose accounts aren't managed by an organization by setting 'People in my organization can communicate with Teams users whose accounts aren't managed by an organization' to Off. This helps prevent unauthorized or risky external interactions.", + "Url": "https://learn.microsoft.com/en-us/powershell/module/teams/set-cstenantfederationconfiguration?view=teams-ps" + } + }, + "Categories": [ + "e3" + ], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/m365/services/teams/teams_unmanaged_communication_disabled/teams_unmanaged_communication_disabled.py b/prowler/providers/m365/services/teams/teams_unmanaged_communication_disabled/teams_unmanaged_communication_disabled.py new file mode 100644 index 0000000000..dc8e377ecf --- /dev/null +++ b/prowler/providers/m365/services/teams/teams_unmanaged_communication_disabled/teams_unmanaged_communication_disabled.py @@ -0,0 +1,42 @@ +from typing import List + +from prowler.lib.check.models import Check, CheckReportM365 +from prowler.providers.m365.services.teams.teams_client import teams_client + + +class teams_unmanaged_communication_disabled(Check): + """Check if unmanaged communication is disabled in Teams admin center. + + Attributes: + metadata: Metadata associated with the check (inherited from Check). + """ + + def execute(self) -> List[CheckReportM365]: + """Execute the check for unmanaged communication disabled. + + This method checks if unmanaged communication is disabled in Teams admin center. + + Returns: + List[CheckReportM365]: A list of reports containing the result of the check. + """ + findings = [] + user_settings = teams_client.user_settings + if user_settings: + report = CheckReportM365( + metadata=self.metadata(), + resource=user_settings if user_settings else {}, + resource_name="Teams User Settings", + resource_id="userSettings", + ) + report.status = "FAIL" + report.status_extended = "Teams users can communicate with unmanaged users." + + if user_settings and not user_settings.allow_teams_consumer: + report.status = "PASS" + report.status_extended = ( + "Teams users cannot communicate with unmanaged users." + ) + + findings.append(report) + + return findings diff --git a/prowler/providers/microsoft365/lib/arguments/arguments.py b/prowler/providers/microsoft365/lib/arguments/arguments.py deleted file mode 100644 index d3e38642e7..0000000000 --- a/prowler/providers/microsoft365/lib/arguments/arguments.py +++ /dev/null @@ -1,48 +0,0 @@ -def init_parser(self): - """Init the Microsoft365 Provider CLI parser""" - microsoft365_parser = self.subparsers.add_parser( - "microsoft365", - parents=[self.common_providers_parser], - help="Microsoft365 Provider", - ) - # Authentication Modes - microsoft365_auth_subparser = microsoft365_parser.add_argument_group( - "Authentication Modes" - ) - microsoft365_auth_modes_group = ( - microsoft365_auth_subparser.add_mutually_exclusive_group() - ) - microsoft365_auth_modes_group.add_argument( - "--az-cli-auth", - action="store_true", - help="Use Azure CLI authentication to log in against Microsoft365", - ) - microsoft365_auth_modes_group.add_argument( - "--sp-env-auth", - action="store_true", - help="Use Azure Service Principal environment variables authentication to log in against Microsoft365", - ) - microsoft365_auth_modes_group.add_argument( - "--browser-auth", - action="store_true", - help="Use Azure interactive browser authentication to log in against Microsoft365", - ) - microsoft365_parser.add_argument( - "--tenant-id", - nargs="?", - default=None, - help="Microsoft365 Tenant ID to be used with --browser-auth option", - ) - # Regions - microsoft365_regions_subparser = microsoft365_parser.add_argument_group("Regions") - microsoft365_regions_subparser.add_argument( - "--region", - nargs="?", - default="Microsoft365Global", - choices=[ - "Microsoft365Global", - "Microsoft365GlobalChina", - "Microsoft365USGovernment", - ], - help="Microsoft365 region to be used, default is Microsoft365Global", - ) diff --git a/prowler/providers/microsoft365/lib/service/service.py b/prowler/providers/microsoft365/lib/service/service.py deleted file mode 100644 index 85f54b260e..0000000000 --- a/prowler/providers/microsoft365/lib/service/service.py +++ /dev/null @@ -1,14 +0,0 @@ -from msgraph import GraphServiceClient - -from prowler.providers.microsoft365.microsoft365_provider import Microsoft365Provider - - -class Microsoft365Service: - def __init__( - self, - provider: Microsoft365Provider, - ): - self.client = GraphServiceClient(credentials=provider.session) - - self.audit_config = provider.audit_config - self.fixer_config = provider.fixer_config diff --git a/prowler/providers/microsoft365/microsoft365_provider.py b/prowler/providers/microsoft365/microsoft365_provider.py deleted file mode 100644 index af7a723f67..0000000000 --- a/prowler/providers/microsoft365/microsoft365_provider.py +++ /dev/null @@ -1,923 +0,0 @@ -import asyncio -import os -import re -from argparse import ArgumentTypeError -from os import getenv -from uuid import UUID - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError -from azure.identity import ( - ClientSecretCredential, - CredentialUnavailableError, - DefaultAzureCredential, - InteractiveBrowserCredential, -) -from colorama import Fore, Style -from msal import ConfidentialClientApplication -from msgraph import GraphServiceClient - -from prowler.config.config import ( - default_config_file_path, - get_default_mute_file_path, - load_and_validate_config_file, -) -from prowler.lib.logger import logger -from prowler.lib.utils.utils import print_boxes -from prowler.providers.common.models import Audit_Metadata, Connection -from prowler.providers.common.provider import Provider -from prowler.providers.microsoft365.exceptions.exceptions import ( - Microsoft365ArgumentTypeValidationError, - Microsoft365BrowserAuthNoFlagError, - Microsoft365BrowserAuthNoTenantIDError, - Microsoft365ClientAuthenticationError, - Microsoft365ClientIdAndClientSecretNotBelongingToTenantIdError, - Microsoft365ConfigCredentialsError, - Microsoft365CredentialsUnavailableError, - Microsoft365DefaultAzureCredentialError, - Microsoft365EnvironmentVariableError, - Microsoft365GetTokenIdentityError, - Microsoft365HTTPResponseError, - Microsoft365InteractiveBrowserCredentialError, - Microsoft365InvalidProviderIdError, - Microsoft365NoAuthenticationMethodError, - Microsoft365NotTenantIdButClientIdAndClienSecretError, - Microsoft365NotValidClientIdError, - Microsoft365NotValidClientSecretError, - Microsoft365NotValidTenantIdError, - Microsoft365SetUpRegionConfigError, - Microsoft365SetUpSessionError, - Microsoft365TenantIdAndClientIdNotBelongingToClientSecretError, - Microsoft365TenantIdAndClientSecretNotBelongingToClientIdError, -) -from prowler.providers.microsoft365.lib.mutelist.mutelist import Microsoft365Mutelist -from prowler.providers.microsoft365.lib.regions.regions import get_regions_config -from prowler.providers.microsoft365.models import ( - Microsoft365IdentityInfo, - Microsoft365RegionConfig, -) - - -class Microsoft365Provider(Provider): - """ - Represents an Microsoft365 provider. - - This class provides functionality to interact with the Microsoft365 resources. - It handles authentication, region configuration, and provides access to various properties and methods - related to the Microsoft365 provider. - - Attributes: - _type (str): The type of the provider, which is set to "microsoft365". - _session (DefaultMicrosoft365Credential): The session object associated with the Microsoft365 provider. - _identity (Microsoft365IdentityInfo): The identity information for the Microsoft365 provider. - _audit_config (dict): The audit configuration for the Microsoft365 provider. - _region_config (Microsoft365RegionConfig): The region configuration for the Microsoft365 provider. - _mutelist (Microsoft365Mutelist): The mutelist object associated with the Microsoft365 provider. - audit_metadata (Audit_Metadata): The audit metadata for the Microsoft365 provider. - - Methods: - __init__ -> Initializes the Microsoft365 provider. - identity(self): Returns the identity of the Microsoft365 provider. - type(self): Returns the type of the Microsoft365 provider. - session(self): Returns the session object associated with the Microsoft365 provider. - region_config(self): Returns the region configuration for the Microsoft365 provider. - audit_config(self): Returns the audit configuration for the Microsoft365 provider. - fixer_config(self): Returns the fixer configuration. - output_options(self, options: tuple): Sets the output options for the Microsoft365 provider. - mutelist(self) -> Microsoft365Mutelist: Returns the mutelist object associated with the Microsoft365 provider. - setup_region_config(cls, region): Sets up the region configuration for the Microsoft365 provider. - print_credentials(self): Prints the Microsoft365 credentials information. - setup_session(cls, az_cli_auth, app_env_auth, browser_auth, managed_identity_auth, tenant_id, region_config): Set up the Microsoft365 session with the specified authentication method. - """ - - _type: str = "microsoft365" - _session: DefaultAzureCredential # Must be used besides being named for Azure - _identity: Microsoft365IdentityInfo - _audit_config: dict - _region_config: Microsoft365RegionConfig - _mutelist: Microsoft365Mutelist - # TODO: this is not optional, enforce for all providers - audit_metadata: Audit_Metadata - - def __init__( - self, - sp_env_auth: bool, - az_cli_auth: bool, - browser_auth: bool, - tenant_id: str = None, - client_id: str = None, - client_secret: str = None, - region: str = "Microsoft365Global", - config_content: dict = None, - config_path: str = None, - mutelist_path: str = None, - mutelist_content: dict = None, - fixer_config: dict = {}, - ): - """ - Initializes the Microsoft365 provider. - - Args: - tenant_id (str): The Microsoft365 Active Directory tenant ID. - region (str): The Microsoft365 region. - client_id (str): The Microsoft365 client ID. - client_secret (str): The Microsoft365 client secret. - config_path (str): The path to the configuration file. - config_content (dict): The configuration content. - fixer_config (dict): The fixer configuration. - mutelist_path (str): The path to the mutelist file. - mutelist_content (dict): The mutelist content. - - Returns: - None - - Raises: - Microsoft365ArgumentTypeValidationError: If there is an error in the argument type validation. - Microsoft365SetUpRegionConfigError: If there is an error in setting up the region configuration. - Microsoft365ConfigCredentialsError: If there is an error in configuring the Microsoft365 credentials from a dictionary. - Microsoft365GetTokenIdentityError: If there is an error in getting the token from the Microsoft365 identity. - Microsoft365HTTPResponseError: If there is an HTTP response error. - """ - logger.info("Setting Microsoft365 provider ...") - - logger.info("Checking if any credentials mode is set ...") - - # Validate the authentication arguments - self.validate_arguments( - az_cli_auth, - sp_env_auth, - browser_auth, - tenant_id, - client_id, - client_secret, - ) - - logger.info("Checking if region is different than default one") - self._region_config = self.setup_region_config(region) - - # Get the dict from the static credentials - microsoft365_credentials = None - if tenant_id and client_id and client_secret: - microsoft365_credentials = self.validate_static_credentials( - tenant_id=tenant_id, client_id=client_id, client_secret=client_secret - ) - - # Set up the Microsoft365 session - self._session = self.setup_session( - az_cli_auth, - sp_env_auth, - browser_auth, - tenant_id, - microsoft365_credentials, - self._region_config, - ) - - # Set up the identity - self._identity = self.setup_identity( - az_cli_auth, - sp_env_auth, - browser_auth, - client_id, - ) - - # Audit Config - if config_content: - self._audit_config = config_content - else: - if not config_path: - config_path = default_config_file_path - self._audit_config = load_and_validate_config_file(self._type, config_path) - - # Fixer Config - self._fixer_config = fixer_config - - # Mutelist - if mutelist_content: - self._mutelist = Microsoft365Mutelist( - mutelist_content=mutelist_content, - ) - else: - if not mutelist_path: - mutelist_path = get_default_mute_file_path(self.type) - self._mutelist = Microsoft365Mutelist( - mutelist_path=mutelist_path, - ) - - Provider.set_global_provider(self) - - @property - def identity(self): - """Returns the identity of the Microsoft365 provider.""" - return self._identity - - @property - def type(self): - """Returns the type of the Microsoft365 provider.""" - return self._type - - @property - def session(self): - """Returns the session object associated with the Microsoft365 provider.""" - return self._session - - @property - def region_config(self): - """Returns the region configuration for the Microsoft365 provider.""" - return self._region_config - - @property - def audit_config(self): - """Returns the audit configuration for the Microsoft365 provider.""" - return self._audit_config - - @property - def fixer_config(self): - """Returns the fixer configuration.""" - return self._fixer_config - - @property - def mutelist(self) -> Microsoft365Mutelist: - """Mutelist object associated with this Microsoft365 provider.""" - return self._mutelist - - @staticmethod - def validate_arguments( - az_cli_auth: bool, - sp_env_auth: bool, - browser_auth: bool, - tenant_id: str, - client_id: str, - client_secret: str, - ): - """ - Validates the authentication arguments for the Microsoft365 provider. - - Args: - az_cli_auth (bool): Flag indicating whether Azure CLI authentication is enabled. - sp_env_auth (bool): Flag indicating whether application authentication with environment variables is enabled. - browser_auth (bool): Flag indicating whether browser authentication is enabled. - tenant_id (str): The Microsoft365 Tenant ID. - client_id (str): The Microsoft365 Client ID. - client_secret (str): The Microsoft365 Client Secret. - - Raises: - Microsoft365BrowserAuthNoTenantIDError: If browser authentication is enabled but the tenant ID is not found. - """ - - if not client_id and not client_secret: - if not browser_auth and tenant_id: - raise Microsoft365BrowserAuthNoFlagError( - file=os.path.basename(__file__), - message="Microsoft365 tenant ID error: browser authentication flag (--browser-auth) not found", - ) - elif not az_cli_auth and not sp_env_auth and not browser_auth: - raise Microsoft365NoAuthenticationMethodError( - file=os.path.basename(__file__), - message="Microsoft365 provider requires at least one authentication method set: [--az-cli-auth | --sp-env-auth | --browser-auth]", - ) - elif browser_auth and not tenant_id: - raise Microsoft365BrowserAuthNoTenantIDError( - file=os.path.basename(__file__), - message="Microsoft365 Tenant ID (--tenant-id) is required for browser authentication mode", - ) - else: - if not tenant_id: - raise Microsoft365NotTenantIdButClientIdAndClienSecretError( - file=os.path.basename(__file__), - message="Tenant Id is required for Microsoft365 static credentials. Make sure you are using the correct credentials.", - ) - - @staticmethod - def setup_region_config(region): - """ - Sets up the region configuration for the Microsoft365 provider. - - Args: - region (str): The name of the region. - - Returns: - Microsoft365RegionConfig: The region configuration object. - - """ - try: - config = get_regions_config(region) - - return Microsoft365RegionConfig( - name=region, - authority=config["authority"], - base_url=config["base_url"], - credential_scopes=config["credential_scopes"], - ) - except ArgumentTypeError as validation_error: - logger.error( - f"{validation_error.__class__.__name__}[{validation_error.__traceback__.tb_lineno}]: {validation_error}" - ) - raise Microsoft365ArgumentTypeValidationError( - file=os.path.basename(__file__), - original_exception=validation_error, - ) - except Exception as error: - logger.error( - f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" - ) - raise Microsoft365SetUpRegionConfigError( - file=os.path.basename(__file__), - original_exception=error, - ) - - def print_credentials(self): - """Microsoft365 credentials information. - - This method prints the Microsoft365 Tenant Domain, Microsoft365 Tenant ID, Microsoft365 Region, - Microsoft365 Subscriptions, Microsoft365 Identity Type, and Microsoft365 Identity ID. - - Args: - None - - Returns: - None - """ - report_lines = [ - f"Microsoft365 Region: {Fore.YELLOW}{self.region_config.name}{Style.RESET_ALL}", - f"Microsoft365 Tenant Domain: {Fore.YELLOW}{self._identity.tenant_domain}{Style.RESET_ALL} Microsoft365 Tenant ID: {Fore.YELLOW}{self._identity.tenant_id}{Style.RESET_ALL}", - f"Microsoft365 Identity Type: {Fore.YELLOW}{self._identity.identity_type}{Style.RESET_ALL} Microsoft365 Identity ID: {Fore.YELLOW}{self._identity.identity_id}{Style.RESET_ALL}", - ] - report_title = ( - f"{Style.BRIGHT}Using the Microsoft365 credentials below:{Style.RESET_ALL}" - ) - print_boxes(report_lines, report_title) - - # TODO: setup_session or setup_credentials? - # This should be setup_credentials, since it is setting up the credentials for the provider - @staticmethod - def setup_session( - az_cli_auth: bool, - sp_env_auth: bool, - browser_auth: bool, - tenant_id: str, - microsoft365_credentials: dict, - region_config: Microsoft365RegionConfig, - ): - """Returns the Microsoft365 credentials object. - - Set up the Microsoft365 session with the specified authentication method. - - Args: - az_cli_auth (bool): Flag indicating whether to use Azure CLI authentication. - sp_env_auth (bool): Flag indicating whether to use application authentication with environment variables. - browser_auth (bool): Flag indicating whether to use interactive browser authentication. - tenant_id (str): The Microsoft365 Active Directory tenant ID. - microsoft365_credentials (dict): The Microsoft365 configuration object. It contains the following keys: - - tenant_id: The Microsoft365 Active Directory tenant ID. - - client_id: The Microsoft365 client ID. - - client_secret: The Microsoft365 client secret - region_config (Microsoft365RegionConfig): The region configuration object. - - Returns: - credentials: The Microsoft365 credentials object. - - Raises: - Exception: If failed to retrieve Microsoft365 credentials. - - """ - if not browser_auth: - if sp_env_auth: - try: - Microsoft365Provider.check_service_principal_creds_env_vars() - except ( - Microsoft365EnvironmentVariableError - ) as environment_credentials_error: - logger.critical( - f"{environment_credentials_error.__class__.__name__}[{environment_credentials_error.__traceback__.tb_lineno}] -- {environment_credentials_error}" - ) - raise environment_credentials_error - try: - if microsoft365_credentials: - try: - credentials = ClientSecretCredential( - tenant_id=microsoft365_credentials["tenant_id"], - client_id=microsoft365_credentials["client_id"], - client_secret=microsoft365_credentials["client_secret"], - ) - return credentials - except ClientAuthenticationError as error: - logger.error( - f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}] -- {error}" - ) - raise Microsoft365ClientAuthenticationError( - file=os.path.basename(__file__), original_exception=error - ) - except CredentialUnavailableError as error: - logger.error( - f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}] -- {error}" - ) - raise Microsoft365CredentialsUnavailableError( - file=os.path.basename(__file__), original_exception=error - ) - except Exception as error: - logger.error( - f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}] -- {error}" - ) - raise Microsoft365ConfigCredentialsError( - file=os.path.basename(__file__), original_exception=error - ) - else: - # Since the authentication method to be used will come as True, we have to negate it since - # DefaultAzureCredential sets just one authentication method, excluding the others - try: - credentials = DefaultAzureCredential( - exclude_environment_credential=not sp_env_auth, - exclude_cli_credential=not az_cli_auth, - # Microsoft365 Auth using Managed Identity is not supported - exclude_managed_identity_credential=True, - # Microsoft365 Auth using Visual Studio is not supported - exclude_visual_studio_code_credential=True, - # Microsoft365 Auth using Shared Token Cache is not supported - exclude_shared_token_cache_credential=True, - # Microsoft365 Auth using PowerShell is not supported - exclude_powershell_credential=True, - # set Authority of a Microsoft Entra endpoint - authority=region_config.authority, - ) - except ClientAuthenticationError as error: - logger.error( - f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}] -- {error}" - ) - raise Microsoft365ClientAuthenticationError( - file=os.path.basename(__file__), original_exception=error - ) - except CredentialUnavailableError as error: - logger.error( - f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}] -- {error}" - ) - raise Microsoft365CredentialsUnavailableError( - file=os.path.basename(__file__), original_exception=error - ) - except Exception as error: - logger.error( - f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}] -- {error}" - ) - raise Microsoft365DefaultAzureCredentialError( - file=os.path.basename(__file__), original_exception=error - ) - except Exception as error: - logger.critical("Failed to retrieve Microsoft365 credentials") - logger.critical( - f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}] -- {error}" - ) - raise Microsoft365SetUpSessionError( - file=os.path.basename(__file__), original_exception=error - ) - else: - try: - credentials = InteractiveBrowserCredential(tenant_id=tenant_id) - except Exception as error: - logger.critical( - "Failed to retrieve Microsoft365 credentials using browser authentication" - ) - logger.critical( - f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}] -- {error}" - ) - raise Microsoft365InteractiveBrowserCredentialError( - file=os.path.basename(__file__), original_exception=error - ) - - return credentials - - @staticmethod - def test_connection( - az_cli_auth: bool = False, - sp_env_auth: bool = False, - browser_auth: bool = False, - tenant_id: str = None, - region: str = "Microsoft365Global", - raise_on_exception=True, - client_id=None, - client_secret=None, - ) -> Connection: - """Test connection to Microsoft365 subscription. - - Test the connection to an Microsoft365 subscription using the provided credentials. - - Args: - - az_cli_auth (bool): Flag indicating whether to use Azure CLI authentication. - sp_env_auth (bool): Flag indicating whether to use application authentication with environment variables. - browser_auth (bool): Flag indicating whether to use interactive browser authentication. - tenant_id (str): The Microsoft365 Active Directory tenant ID. - region (str): The Microsoft365 region. - raise_on_exception (bool): Flag indicating whether to raise an exception if the connection fails. - client_id (str): The Microsoft365 client ID. - client_secret (str): The Microsoft365 client secret. - - Returns: - bool: True if the connection is successful, False otherwise. - - Raises: - Exception: If failed to test the connection to Microsoft365 subscription. - Microsoft365ArgumentTypeValidationError: If there is an error in the argument type validation. - Microsoft365SetUpRegionConfigError: If there is an error in setting up the region configuration. - Microsoft365InteractiveBrowserCredentialError: If there is an error in retrieving the Microsoft365 credentials using browser authentication. - Microsoft365HTTPResponseError: If there is an HTTP response error. - Microsoft365ConfigCredentialsError: If there is an error in configuring the Microsoft365 credentials from a dictionary. - - - Examples: - >>> Microsoft365Provider.test_connection(az_cli_auth=True) - True - >>> Microsoft365Provider.test_connection(sp_env_auth=False, browser_auth=True, tenant_id=None) - False, ArgumentTypeError: Microsoft365 Tenant ID is required only for browser authentication mode - >>> Microsoft365Provider.test_connection(tenant_id="XXXXXXXXXX", client_id="XXXXXXXXXX", client_secret="XXXXXXXXXX") - True - """ - try: - Microsoft365Provider.validate_arguments( - az_cli_auth, - sp_env_auth, - browser_auth, - tenant_id, - client_id, - client_secret, - ) - region_config = Microsoft365Provider.setup_region_config(region) - - # Get the dict from the static credentials - microsoft365_credentials = None - if tenant_id and client_id and client_secret: - microsoft365_credentials = ( - Microsoft365Provider.validate_static_credentials( - tenant_id=tenant_id, - client_id=client_id, - client_secret=client_secret, - ) - ) - - # Set up the Microsoft365 session - credentials = Microsoft365Provider.setup_session( - az_cli_auth, - sp_env_auth, - browser_auth, - tenant_id, - microsoft365_credentials, - region_config, - ) - - GraphServiceClient(credentials=credentials) - - logger.info("Microsoft365 provider: Connection to Microsoft365 successful") - - return Connection(is_connected=True) - - # Exceptions from setup_region_config - except Microsoft365ArgumentTypeValidationError as type_validation_error: - logger.error( - f"{type_validation_error.__class__.__name__}[{type_validation_error.__traceback__.tb_lineno}]: {type_validation_error}" - ) - if raise_on_exception: - raise type_validation_error - return Connection(error=type_validation_error) - except Microsoft365SetUpRegionConfigError as region_config_error: - logger.error( - f"{region_config_error.__class__.__name__}[{region_config_error.__traceback__.tb_lineno}]: {region_config_error}" - ) - if raise_on_exception: - raise region_config_error - return Connection(error=region_config_error) - # Exceptions from setup_session - except Microsoft365EnvironmentVariableError as environment_credentials_error: - logger.error( - f"{environment_credentials_error.__class__.__name__}[{environment_credentials_error.__traceback__.tb_lineno}]: {environment_credentials_error}" - ) - if raise_on_exception: - raise environment_credentials_error - return Connection(error=environment_credentials_error) - except Microsoft365ConfigCredentialsError as config_credentials_error: - logger.error( - f"{config_credentials_error.__class__.__name__}[{config_credentials_error.__traceback__.tb_lineno}]: {config_credentials_error}" - ) - if raise_on_exception: - raise config_credentials_error - return Connection(error=config_credentials_error) - except Microsoft365ClientAuthenticationError as client_auth_error: - logger.error( - f"{client_auth_error.__class__.__name__}[{client_auth_error.__traceback__.tb_lineno}]: {client_auth_error}" - ) - if raise_on_exception: - raise client_auth_error - return Connection(error=client_auth_error) - except Microsoft365CredentialsUnavailableError as credential_unavailable_error: - logger.error( - f"{credential_unavailable_error.__class__.__name__}[{credential_unavailable_error.__traceback__.tb_lineno}]: {credential_unavailable_error}" - ) - if raise_on_exception: - raise credential_unavailable_error - return Connection(error=credential_unavailable_error) - except ( - Microsoft365ClientIdAndClientSecretNotBelongingToTenantIdError - ) as tenant_id_error: - logger.error( - f"{tenant_id_error.__class__.__name__}[{tenant_id_error.__traceback__.tb_lineno}]: {tenant_id_error}" - ) - if raise_on_exception: - raise tenant_id_error - return Connection(error=tenant_id_error) - except ( - Microsoft365TenantIdAndClientSecretNotBelongingToClientIdError - ) as client_id_error: - logger.error( - f"{client_id_error.__class__.__name__}[{client_id_error.__traceback__.tb_lineno}]: {client_id_error}" - ) - if raise_on_exception: - raise client_id_error - return Connection(error=client_id_error) - except ( - Microsoft365TenantIdAndClientIdNotBelongingToClientSecretError - ) as client_secret_error: - logger.error( - f"{client_secret_error.__class__.__name__}[{client_secret_error.__traceback__.tb_lineno}]: {client_secret_error}" - ) - if raise_on_exception: - raise client_secret_error - return Connection(error=client_secret_error) - # Exceptions from provider_id validation - except Microsoft365InvalidProviderIdError as invalid_credentials_error: - logger.error( - f"{invalid_credentials_error.__class__.__name__}[{invalid_credentials_error.__traceback__.tb_lineno}]: {invalid_credentials_error}" - ) - if raise_on_exception: - raise invalid_credentials_error - return Connection(error=invalid_credentials_error) - # Exceptions from SubscriptionClient - except HttpResponseError as http_response_error: - logger.error( - f"{http_response_error.__class__.__name__}[{http_response_error.__traceback__.tb_lineno}]: {http_response_error}" - ) - if raise_on_exception: - raise Microsoft365HTTPResponseError( - file=os.path.basename(__file__), - original_exception=http_response_error, - ) - return Connection(error=http_response_error) - except Exception as error: - logger.critical( - f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}" - ) - if raise_on_exception: - # Raise directly the exception - raise error - return Connection(error=error) - - @staticmethod - def check_service_principal_creds_env_vars(): - """ - Checks the presence of required environment variables for service principal authentication against Azure. - - This method checks for the presence of the following environment variables: - - AZURE_CLIENT_ID: Azure client ID - - AZURE_TENANT_ID: Azure tenant ID - - AZURE_CLIENT_SECRET: Azure client secret - - If any of the environment variables is missing, it logs a critical error and exits the program. - """ - logger.info( - "Microsoft365 provider: checking service principal environment variables ..." - ) - for env_var in ["AZURE_CLIENT_ID", "AZURE_TENANT_ID", "AZURE_CLIENT_SECRET"]: - if not getenv(env_var): - logger.critical( - f"Microsoft365 provider: Missing environment variable {env_var} needed to authenticate against Microsoft365" - ) - raise Microsoft365EnvironmentVariableError( - file=os.path.basename(__file__), - message=f"Missing environment variable {env_var} required to authenticate.", - ) - - def setup_identity( - self, - az_cli_auth, - sp_env_auth, - browser_auth, - client_id, - ): - """ - Sets up the identity for the Microsoft365 provider. - - Args: - az_cli_auth (bool): Flag indicating if Azure CLI authentication is used. - sp_env_auth (bool): Flag indicating if application authentication with environment variables is used. - browser_auth (bool): Flag indicating if interactive browser authentication is used. - client_id (str): The Microsoft365 client ID. - - Returns: - Microsoft365IdentityInfo: An instance of Microsoft365IdentityInfo containing the identity information. - """ - credentials = self.session - # TODO: fill this object with real values not default and set to none - identity = Microsoft365IdentityInfo() - - # If credentials comes from service principal or browser, if the required permissions are assigned - # the identity can access AAD and retrieve the tenant domain name. - # With cli also should be possible but right now it does not work, microsoft365 python package issue is coming - # At the time of writting this with az cli creds is not working, despite that is included - if az_cli_auth or sp_env_auth or browser_auth or client_id: - - async def get_microsoft365_identity(): - # Trying to recover tenant domain info - try: - logger.info( - "Trying to retrieve tenant domain from AAD to populate identity structure ..." - ) - client = GraphServiceClient(credentials=credentials) - - domain_result = await client.domains.get() - if getattr(domain_result, "value"): - if getattr(domain_result.value[0], "id"): - identity.tenant_domain = domain_result.value[0].id - - except HttpResponseError as error: - logger.error( - f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}] -- {error}" - ) - raise Microsoft365HTTPResponseError( - file=os.path.basename(__file__), - original_exception=error, - ) - except ClientAuthenticationError as error: - logger.error( - f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}] -- {error}" - ) - raise Microsoft365GetTokenIdentityError( - file=os.path.basename(__file__), - original_exception=error, - ) - except Exception as error: - logger.error( - f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}] -- {error}" - ) - # since that exception is not considered as critical, we keep filling another identity fields - if sp_env_auth or client_id: - # The id of the sp can be retrieved from environment variables - identity.identity_id = getenv("AZURE_CLIENT_ID") - identity.identity_type = "Service Principal" - # Same here, if user can access AAD, some fields are retrieved if not, default value, for az cli - # should work but it doesn't, pending issue - else: - identity.identity_id = "Unknown user id (Missing AAD permissions)" - identity.identity_type = "User" - try: - logger.info( - "Trying to retrieve user information from AAD to populate identity structure ..." - ) - client = GraphServiceClient(credentials=credentials) - - me = await client.me.get() - if me: - if getattr(me, "user_principal_name"): - identity.identity_id = me.user_principal_name - - except Exception as error: - logger.error( - f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}] -- {error}" - ) - - # Retrieve tenant id from the client - client = GraphServiceClient(credentials=credentials) - organization_info = await client.organization.get() - identity.tenant_id = organization_info.value[0].id - - asyncio.get_event_loop().run_until_complete(get_microsoft365_identity()) - return identity - - @staticmethod - def validate_static_credentials( - tenant_id: str = None, client_id: str = None, client_secret: str = None - ) -> dict: - """ - Validates the static credentials for the Microsoft365 provider. - - Args: - tenant_id (str): The Microsoft365 Active Directory tenant ID. - client_id (str): The Microsoft365 client ID. - client_secret (str): The Microsoft365 client secret. - - Raises: - Microsoft365NotValidTenantIdError: If the provided Microsoft365 Tenant ID is not valid. - Microsoft365NotValidClientIdError: If the provided Microsoft365 Client ID is not valid. - Microsoft365NotValidClientSecretError: If the provided Microsoft365 Client Secret is not valid. - Microsoft365ClientIdAndClientSecretNotBelongingToTenantIdError: If the provided Microsoft365 Client ID and Client Secret do not belong to the specified Tenant ID. - Microsoft365TenantIdAndClientSecretNotBelongingToClientIdError: If the provided Microsoft365 Tenant ID and Client Secret do not belong to the specified Client ID. - Microsoft365TenantIdAndClientIdNotBelongingToClientSecretError: If the provided Microsoft365 Tenant ID and Client ID do not belong to the specified Client Secret. - - Returns: - dict: A dictionary containing the validated static credentials. - """ - # Validate the Tenant ID - try: - UUID(tenant_id) - except ValueError: - raise Microsoft365NotValidTenantIdError( - file=os.path.basename(__file__), - message="The provided Microsoft365 Tenant ID is not valid.", - ) - - # Validate the Client ID - try: - UUID(client_id) - except ValueError: - raise Microsoft365NotValidClientIdError( - file=os.path.basename(__file__), - message="The provided Microsoft365 Client ID is not valid.", - ) - # Validate the Client Secret - if not re.match("^[a-zA-Z0-9._~-]+$", client_secret): - raise Microsoft365NotValidClientSecretError( - file=os.path.basename(__file__), - message="The provided Microsoft365 Client Secret is not valid.", - ) - - try: - Microsoft365Provider.verify_client(tenant_id, client_id, client_secret) - return { - "tenant_id": tenant_id, - "client_id": client_id, - "client_secret": client_secret, - } - except Microsoft365NotValidTenantIdError as tenant_id_error: - logger.error( - f"{tenant_id_error.__class__.__name__}[{tenant_id_error.__traceback__.tb_lineno}]: {tenant_id_error}" - ) - raise Microsoft365ClientIdAndClientSecretNotBelongingToTenantIdError( - file=os.path.basename(__file__), - message="The provided Microsoft365 Client ID and Client Secret do not belong to the specified Tenant ID.", - ) - except Microsoft365NotValidClientIdError as client_id_error: - logger.error( - f"{client_id_error.__class__.__name__}[{client_id_error.__traceback__.tb_lineno}]: {client_id_error}" - ) - raise Microsoft365TenantIdAndClientSecretNotBelongingToClientIdError( - file=os.path.basename(__file__), - message="The provided Microsoft365 Tenant ID and Client Secret do not belong to the specified Client ID.", - ) - except Microsoft365NotValidClientSecretError as client_secret_error: - logger.error( - f"{client_secret_error.__class__.__name__}[{client_secret_error.__traceback__.tb_lineno}]: {client_secret_error}" - ) - raise Microsoft365TenantIdAndClientIdNotBelongingToClientSecretError( - file=os.path.basename(__file__), - message="The provided Microsoft365 Tenant ID and Client ID do not belong to the specified Client Secret.", - ) - - @staticmethod - def verify_client(tenant_id, client_id, client_secret) -> None: - """ - Verifies the Microsoft365 client credentials using the specified tenant ID, client ID, and client secret. - - Args: - tenant_id (str): The Microsoft365 Active Directory tenant ID. - client_id (str): The Microsoft365 client ID. - client_secret (str): The Microsoft365 client secret. - - Raises: - Microsoft365NotValidTenantIdError: If the provided Microsoft365 Tenant ID is not valid. - Microsoft365NotValidClientIdError: If the provided Microsoft365 Client ID is not valid. - Microsoft365NotValidClientSecretError: If the provided Microsoft365 Client Secret is not valid. - - Returns: - None - """ - authority = f"https://login.microsoftonline.com/{tenant_id}" - try: - # Create a ConfidentialClientApplication instance - app = ConfidentialClientApplication( - client_id=client_id, - client_credential=client_secret, - authority=authority, - ) - - # Attempt to acquire a token - result = app.acquire_token_for_client( - scopes=["https://graph.microsoft.com/.default"] - ) - - # Check if token acquisition was successful - if "access_token" not in result: - # Handle specific errors based on the MSAL response - error_description = result.get("error_description", "") - if f"Tenant '{tenant_id}'" in error_description: - raise Microsoft365NotValidTenantIdError( - file=os.path.basename(__file__), - message="The provided Microsoft 365 Tenant ID is not valid for the specified Client ID and Client Secret.", - ) - if f"Application with identifier '{client_id}'" in error_description: - raise Microsoft365NotValidClientIdError( - file=os.path.basename(__file__), - message="The provided Microsoft 365 Client ID is not valid for the specified Tenant ID and Client Secret.", - ) - if "Invalid client secret provided" in error_description: - raise Microsoft365NotValidClientSecretError( - file=os.path.basename(__file__), - message="The provided Microsoft 365 Client Secret is not valid for the specified Tenant ID and Client ID.", - ) - - except Exception as e: - # Generic exception handling (if needed) - raise RuntimeError(f"An unexpected error occurred: {str(e)}") diff --git a/prowler/providers/nhn/__init__.py b/prowler/providers/nhn/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/nhn/exceptions/exceptions.py b/prowler/providers/nhn/exceptions/exceptions.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/nhn/lib/__init__.py b/prowler/providers/nhn/lib/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/nhn/lib/arguments/__init__.py b/prowler/providers/nhn/lib/arguments/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/nhn/lib/arguments/arguments.py b/prowler/providers/nhn/lib/arguments/arguments.py new file mode 100644 index 0000000000..d4925090e6 --- /dev/null +++ b/prowler/providers/nhn/lib/arguments/arguments.py @@ -0,0 +1,17 @@ +def init_parser(self): + """Init the NHN Provider CLI parser""" + nhn_parser = self.subparsers.add_parser( + "nhn", parents=[self.common_providers_parser], help="NHN Provider" + ) + + # Authentication + nhn_auth_subparser = nhn_parser.add_argument_group("Authentication") + nhn_auth_subparser.add_argument( + "--nhn-username", nargs="?", default=None, help="NHN API Username" + ) + nhn_auth_subparser.add_argument( + "--nhn-password", nargs="?", default=None, help="NHN API Password" + ) + nhn_auth_subparser.add_argument( + "--nhn-tenant-id", nargs="?", default=None, help="NHN Tenant ID" + ) diff --git a/prowler/providers/nhn/lib/mutelist/__init__.py b/prowler/providers/nhn/lib/mutelist/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/nhn/lib/mutelist/mutelist.py b/prowler/providers/nhn/lib/mutelist/mutelist.py new file mode 100644 index 0000000000..14144d00f8 --- /dev/null +++ b/prowler/providers/nhn/lib/mutelist/mutelist.py @@ -0,0 +1,14 @@ +from prowler.lib.check.models import CheckReportNHN +from prowler.lib.mutelist.mutelist import Mutelist +from prowler.lib.outputs.utils import unroll_dict, unroll_tags + + +class NHNMutelist(Mutelist): + def is_finding_muted(self, finding: CheckReportNHN) -> bool: + return self.is_muted( + finding.resource_id, + finding.check_metadata.CheckID, + finding.location, + finding.resource_name, + unroll_dict(unroll_tags(finding.resource_tags)), + ) diff --git a/prowler/providers/nhn/lib/service/__init__.py b/prowler/providers/nhn/lib/service/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/nhn/lib/service/service.py b/prowler/providers/nhn/lib/service/service.py new file mode 100644 index 0000000000..36781b8895 --- /dev/null +++ b/prowler/providers/nhn/lib/service/service.py @@ -0,0 +1 @@ +# TODO: If more services are added, we need to add common methods here diff --git a/prowler/providers/nhn/models.py b/prowler/providers/nhn/models.py new file mode 100644 index 0000000000..0288e1be5d --- /dev/null +++ b/prowler/providers/nhn/models.py @@ -0,0 +1,56 @@ +from pydantic import BaseModel + +from prowler.config.config import output_file_timestamp +from prowler.providers.common.models import ProviderOutputOptions + + +class NHNIdentityInfo(BaseModel): + """ + NHNIdentityInfo holds basic identity fields for the NHN provider. + + Attributes: + - identity_id (str): An optional identity ID if used by NHN services. + - identity_type (str): The type or role of the identity, if needed. + - tenant_domain (str): The tenant domain if applicable. + (Some NHN services might require a domain or project domain.) + - tenant_id (str): The tenant ID for the NHN Cloud account. + - username (str): The username associated with the account. + """ + + identity_id: str = "" + identity_type: str = "" + tenant_domain: str = "" + tenant_id: str + username: str + + +class NHNOutputOptions(ProviderOutputOptions): + """ + NHNOutputOptions overrides ProviderOutputOptions for NHN-specific output logic. + For example, generating a filename that includes the NHN tenant_id. + + Attributes inherited from ProviderOutputOptions: + - output_filename (str): The base filename used for generated reports. + - output_directory (str): The directory to store the output files. + - ... see ProviderOutputOptions for more details. + + Methods: + - __init__: Customizes the output filename logic for NHN. + """ + + def __init__(self, arguments, bulk_checks_metadata, identity: NHNIdentityInfo): + super().__init__(arguments, bulk_checks_metadata) + + # If --output-filename is not specified, build a default name. + if not getattr(arguments, "output_filename", None): + # If tenant_id exists, include it in the filename (e.g., prowler-output-nhn--20230101) + if identity.tenant_id: + self.output_filename = ( + f"prowler-output-nhn-{identity.tenant_id}-{output_file_timestamp}" + ) + # Otherwise just 'prowler-output-nhn-' + else: + self.output_filename = f"prowler-output-nhn-{output_file_timestamp}" + # If --output-filename was explicitly given, respect that + else: + self.output_filename = arguments.output_filename diff --git a/prowler/providers/nhn/nhn_provider.py b/prowler/providers/nhn/nhn_provider.py new file mode 100644 index 0000000000..3e179d694b --- /dev/null +++ b/prowler/providers/nhn/nhn_provider.py @@ -0,0 +1,308 @@ +import os +from typing import Optional + +import requests +from colorama import Style + +from prowler.config.config import ( + default_config_file_path, + get_default_mute_file_path, + load_and_validate_config_file, +) +from prowler.lib.logger import logger +from prowler.lib.utils.utils import print_boxes +from prowler.providers.common.models import Audit_Metadata, Connection +from prowler.providers.common.provider import Provider +from prowler.providers.nhn.lib.mutelist.mutelist import NHNMutelist +from prowler.providers.nhn.models import NHNIdentityInfo + + +class NhnProvider(Provider): + """ + NHN Provider class to handle the NHN provider + + Attributes: + - _type: str -> The type of the provider, which is set to "nhn". + - _session: requests.Session -> The session object associated with the NHN provider. + - _identity: NHNIdentityInfo -> The identity information for the NHN provider. + - _audit_config: dict -> The audit configuration for the NHN provider. + - _mutelist: NHNMutelist -> The mutelist object associated with the NHN provider. + - audit_metadata: Audit_Metadata -> The audit metadata for the NHN provider. + + Methods: + - __init__: Initializes the NHN provider. + - type: Returns the type of the NHN provider. + - identity: Returns the identity of the NHN provider.(ex: tenant_id, username) + - session: Returns the session object associated with the NHN provider.(ex: Bearer token) + - audit_config: Returns the audit configuration for the NHN provider. + - fixer_config: Returns the fixer configuration. + - mutelist: Returns the mutelist object associated with the NHN provider. + - validate_arguments: Validates the NHN provider arguments.(ex: username, password, tenant_id) + - print_credentials: Prints the NHN credentials information.(ex: username, tenant_id) + - setup_session: Set up the NHN session with the specified authentication method. + - test_connection: tests the provider connection + """ + + _type: str = "nhn" + _session: Optional[requests.Session] + _identity: NHNIdentityInfo + _audit_config: dict + _mutelist: NHNMutelist + # TODO: this is not optional, enforce for all providers + audit_metadata: Audit_Metadata + + def __init__( + self, + username: str = None, + password: str = None, + tenant_id: str = None, + config_path: str = None, + fixer_config: dict = None, + mutelist_path: str = None, + mutelist_content: dict = None, + ): + """ + Initializes the NHN provider. + + Args: + - username: The NHN Cloud client ID + - password: The NHN Cloud client password + - tenant_id: The NHN Cloud Tenant ID + - config_path: The path to the configuration file. + - fixer_config: The fixer configuration. + - mutelist_path: The path to the mutelist file. + - mutelist_content: The mutelist content. + """ + logger.info("Initializing Nhn Provider...") + + # 1) Store argument values + self._username = username or os.getenv("NHN_USERNAME") + self._password = password or os.getenv("NHN_PASSWORD") + self._tenant_id = tenant_id or os.getenv("NHN_TENANT_ID") + + if not all([self._username, self._password, self._tenant_id]): + raise ValueError("NhnProvider requires username, password and tenant_id") + + # 2) Load audit_config, fixer_config, mutelist + self._fixer_config = fixer_config if fixer_config else {} + if not config_path: + config_path = default_config_file_path + self._audit_config = load_and_validate_config_file(self._type, config_path) + + if mutelist_content: + self._mutelist = NHNMutelist(mutelist_content=mutelist_content) + else: + if not mutelist_path: + mutelist_path = get_default_mute_file_path(self._type) + self._mutelist = NHNMutelist(mutelist_path=mutelist_path) + + # 3) Initialize session/token + self._token = None + self._session = None + self.setup_session() + + # 4) Create NHNIdentityInfo object + self._identity = NHNIdentityInfo( + tenant_id=self._tenant_id, + username=self._username, + ) + + Provider.set_global_provider(self) + + @property + def type(self) -> str: + """ + Returns the type of the provider ("nhn"). + """ + return self._type + + @property + def identity(self) -> str: + """ + Returns the NHNIdentityInfo object, which may contain tenant_id, username, etc. + """ + return self._identity + + @property + def session(self) -> str: + """ + Returns the requests.Session object for NHN API calls. + """ + return self._session + + @property + def audit_config(self) -> dict: + """ + Returns the audit configuration loaded from file or default settings. + """ + return self._audit_config + + @property + def fixer_config(self) -> dict: + """ + Returns any fixer configuration provided to the NHN provider. + """ + return self._fixer_config + + @property + def mutelist(self) -> dict: + """ + Returns the NHNMutelist object for handling any muted checks. + """ + return self._mutelist + + @staticmethod + def validate_arguments(username: str, password: str, tenant_id: str) -> None: + """ + Ensures that username, password, and tenant_id are not empty. + """ + if not username or not password or not tenant_id: + raise ValueError("NHN Provider requires username, password and tenant_id.") + + def print_credentials(self) -> None: + """ + Prints the NHN credentials in a simple box format. + """ + report_lines = [ + f" Username: {self._username}", + f" TenantID: {self._tenant_id}", + ] + report_title = ( + f"{Style.BRIGHT}Using the NHN credentials below:{Style.RESET_ALL}" + ) + print_boxes(report_lines, report_title) + + def setup_session(self) -> None: + """ + Implement NHN Cloud Authentication method by calling Keystone v2.0 API(POST /v2.0/tokens). + ex) https://api-identity-infrastructure.nhncloudservice.com/v2.0/tokens + { + "auth": { + "tenantId": "f5073eaa26b64cffbee89411df94ce01", + "passwordCredentials": { + "username": "user@example.com", + "password": "secretsecret" + } + } + } + + On success, it creates a requests.Session and sets the X-Auth-Token header. + """ + url = "https://api-identity-infrastructure.nhncloudservice.com/v2.0/tokens" + data = { + "auth": { + "tenantId": self._tenant_id, + "passwordCredentials": { + "username": self._username, + "password": self._password, + }, + } + } + try: + response = requests.post(url, json=data, timeout=10) + if response.status_code == 200: + resp_json = response.json() + self._token = resp_json["access"]["token"]["id"] + sess = requests.Session() + sess.headers.update( + {"X-Auth-Token": self._token, "Content-Type": "application/json"} + ) + self._session = sess + logger.info("NHN token acquired successfully and session is set up.") + else: + logger.critical( + f"Failed to get token. Status: {response.status_code}, Body: {response.text}" + ) + raise ValueError("Failed to get NHN token") + except Exception as e: + logger.critical(f"[setup_session] Error: {e}") + raise e + + @staticmethod + def test_connection( + username: str, + password: str, + tenant_id: str, + raise_on_exception: bool = True, + ) -> Connection: + """ + Test connection to NHN Cloud by performing: + 1) Keystone token request + 2) (Optional) a small test API call to confirm credentials are valid + + Args: + username (str): NHN Cloud user ID (email) + password (str): NHN Cloud user password + tenant_id (str): NHN Cloud tenant ID + raise_on_exception (bool): If True, raise the caught exception; + if False, return Connection(error=exception). + + Returns: + Connection: + Connection(is_connected=True) if success, + otherwise Connection(error=Exception or custom error). + """ + try: + # 1) Validate arguments (์˜ˆ: username/password/tenant_id) + if not username or not password or not tenant_id: + error_msg = ( + "NHN test_connection error: missing username/password/tenant_id" + ) + logger.error(error_msg) + raise ValueError(error_msg) + + # 2) Request Keystone token + token_url = ( + "https://api-identity-infrastructure.nhncloudservice.com/v2.0/tokens" + ) + data = { + "auth": { + "tenantId": tenant_id, + "passwordCredentials": { + "username": username, + "password": password, + }, + } + } + resp = requests.post(token_url, json=data, timeout=10) + if resp.status_code != 200: + # Fail + error_msg = f"Failed to get token. Status: {resp.status_code}, Body: {resp.text}" + logger.error(error_msg) + if raise_on_exception: + raise Exception(error_msg) + return Connection(error=Exception(error_msg)) + + # Success + token_json = resp.json() + keystone_token = token_json["access"]["token"]["id"] + logger.info("NHN test_connection: Successfully acquired Keystone token.") + + # 3) (Optional) Test API call to confirm credentials are valid + compute_endpoint = f"https://kr1-api-instance.infrastructure.cloud.toast.com/v2/{tenant_id}" + + # Check servers list + headers = { + "X-Auth-Token": keystone_token, + "Content-Type": "application/json", + } + servers_resp = requests.get( + f"{compute_endpoint}/servers", headers=headers, timeout=10 + ) + if servers_resp.status_code == 200: + logger.info( + "NHN test_connection: /servers call success. Credentials valid." + ) + return Connection(is_connected=True) + else: + error_msg = f"/servers call failed. Status: {servers_resp.status_code}, Body: {servers_resp.text}" + logger.error(error_msg) + if raise_on_exception: + raise Exception(error_msg) + return Connection(error=Exception(error_msg)) + + except Exception as e: + logger.critical(f"{e.__class__.__name__}[{e.__traceback__.tb_lineno}]: {e}") + if raise_on_exception: + raise e + return Connection(error=e) diff --git a/prowler/providers/nhn/services/compute/__init__.py b/prowler/providers/nhn/services/compute/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/nhn/services/compute/compute_client.py b/prowler/providers/nhn/services/compute/compute_client.py new file mode 100644 index 0000000000..cf4bc98df0 --- /dev/null +++ b/prowler/providers/nhn/services/compute/compute_client.py @@ -0,0 +1,4 @@ +from prowler.providers.common.provider import Provider +from prowler.providers.nhn.services.compute.compute_service import NHNComputeService + +compute_client = NHNComputeService(Provider.get_global_provider()) diff --git a/prowler/providers/nhn/services/compute/compute_instance_login_user/__init__.py b/prowler/providers/nhn/services/compute/compute_instance_login_user/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/nhn/services/compute/compute_instance_login_user/compute_instance_login_user.metadata.json b/prowler/providers/nhn/services/compute/compute_instance_login_user/compute_instance_login_user.metadata.json new file mode 100644 index 0000000000..535597bf39 --- /dev/null +++ b/prowler/providers/nhn/services/compute/compute_instance_login_user/compute_instance_login_user.metadata.json @@ -0,0 +1,30 @@ +{ + "Provider": "nhn", + "CheckID": "compute_instance_login_user", + "CheckTitle": "Check for Administrative Login Users in NHN Compute Instances", + "CheckType": [], + "ServiceName": "compute", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "high", + "ResourceType": "VMInstance", + "Description": "Checks if NHN Compute instances have administrative login users.", + "Risk": "", + "RelatedUrl": "", + "Remediation": { + "Code": { + "CLI": "", + "NativeIaC": "", + "Other": "", + "Terraform": "" + }, + "Recommendation": { + "Text": "Review the login users configured for each VM instance.", + "Url": "" + } + }, + "Categories": [], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/nhn/services/compute/compute_instance_login_user/compute_instance_login_user.py b/prowler/providers/nhn/services/compute/compute_instance_login_user/compute_instance_login_user.py new file mode 100644 index 0000000000..95f575f83c --- /dev/null +++ b/prowler/providers/nhn/services/compute/compute_instance_login_user/compute_instance_login_user.py @@ -0,0 +1,22 @@ +from prowler.lib.check.models import Check, CheckReportNHN +from prowler.providers.nhn.services.compute.compute_client import compute_client + + +class compute_instance_login_user(Check): + def execute(self): + findings = [] + for instance in compute_client.instances: + report = CheckReportNHN( + metadata=self.metadata(), + resource=instance, + ) + report.status = "PASS" + report.status_extended = ( + f"VM Instance {instance.name} has a appropriate login user." + ) + if instance.login_user: + report.status = "FAIL" + report.status_extended = f"VM Instance {instance.name} has an Administrative(admin/root) login user." + findings.append(report) + + return findings diff --git a/prowler/providers/nhn/services/compute/compute_instance_public_ip/__init__.py b/prowler/providers/nhn/services/compute/compute_instance_public_ip/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/nhn/services/compute/compute_instance_public_ip/compute_instance_public_ip.metadata.json b/prowler/providers/nhn/services/compute/compute_instance_public_ip/compute_instance_public_ip.metadata.json new file mode 100644 index 0000000000..b643fc5c60 --- /dev/null +++ b/prowler/providers/nhn/services/compute/compute_instance_public_ip/compute_instance_public_ip.metadata.json @@ -0,0 +1,30 @@ +{ + "Provider": "nhn", + "CheckID": "compute_instance_public_ip", + "CheckTitle": "Check for Public IP in NHN Compute Instances", + "CheckType": [], + "ServiceName": "compute", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "low", + "ResourceType": "VMInstance", + "Description": "Check if a floating(public) IP is assigned to an NHN compute instance.", + "Risk": "", + "RelatedUrl": "", + "Remediation": { + "Code": { + "CLI": "", + "NativeIaC": "", + "Other": "", + "Terraform": "" + }, + "Recommendation": { + "Text": "Remove or unassign floating IP if not required to reduce external exposure.", + "Url": "" + } + }, + "Categories": [], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/nhn/services/compute/compute_instance_public_ip/compute_instance_public_ip.py b/prowler/providers/nhn/services/compute/compute_instance_public_ip/compute_instance_public_ip.py new file mode 100644 index 0000000000..1a02dee8c8 --- /dev/null +++ b/prowler/providers/nhn/services/compute/compute_instance_public_ip/compute_instance_public_ip.py @@ -0,0 +1,22 @@ +from prowler.lib.check.models import Check, CheckReportNHN +from prowler.providers.nhn.services.compute.compute_client import compute_client + + +class compute_instance_public_ip(Check): + def execute(self): + findings = [] + for instance in compute_client.instances: + report = CheckReportNHN( + metadata=self.metadata(), + resource=instance, + ) + report.status = "PASS" + report.status_extended = ( + f"VM Instance {instance.name} does not have a public IP." + ) + if instance.public_ip: + report.status = "FAIL" + report.status_extended = f"VM Instance {instance.name} has a public IP." + findings.append(report) + + return findings diff --git a/prowler/providers/nhn/services/compute/compute_instance_security_groups/__init__.py b/prowler/providers/nhn/services/compute/compute_instance_security_groups/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/nhn/services/compute/compute_instance_security_groups/compute_instance_security_groups.metadata.json b/prowler/providers/nhn/services/compute/compute_instance_security_groups/compute_instance_security_groups.metadata.json new file mode 100644 index 0000000000..22ec845232 --- /dev/null +++ b/prowler/providers/nhn/services/compute/compute_instance_security_groups/compute_instance_security_groups.metadata.json @@ -0,0 +1,30 @@ +{ + "Provider": "nhn", + "CheckID": "compute_instance_security_groups", + "CheckTitle": "Check NHN Compute Security Group Configuration", + "CheckType": [], + "ServiceName": "compute", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "medium", + "ResourceType": "VMInstance", + "Description": "Checks if NHN Compute VM instances are using appropriate security group configurations. Using only the default security group can pose a security risk.", + "Risk": "", + "RelatedUrl": "", + "Remediation": { + "Code": { + "CLI": "", + "NativeIaC": "", + "Other": "", + "Terraform": "" + }, + "Recommendation": { + "Text": "Review and modify security group rules for each VM instance.", + "Url": "" + } + }, + "Categories": [], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/nhn/services/compute/compute_instance_security_groups/compute_instance_security_groups.py b/prowler/providers/nhn/services/compute/compute_instance_security_groups/compute_instance_security_groups.py new file mode 100644 index 0000000000..a6fb3073f4 --- /dev/null +++ b/prowler/providers/nhn/services/compute/compute_instance_security_groups/compute_instance_security_groups.py @@ -0,0 +1,24 @@ +from prowler.lib.check.models import Check, CheckReportNHN +from prowler.providers.nhn.services.compute.compute_client import compute_client + + +class compute_instance_security_groups(Check): + def execute(self): + findings = [] + for instance in compute_client.instances: + report = CheckReportNHN( + metadata=self.metadata(), + resource=instance, + ) + report.status = "PASS" + report.status_extended = ( + f"VM Instance {instance.name} has a variety of security groups." + ) + if instance.security_groups: + report.status = "FAIL" + report.status_extended = ( + f"VM Instance {instance.name} has only the default security group." + ) + findings.append(report) + + return findings diff --git a/prowler/providers/nhn/services/compute/compute_service.py b/prowler/providers/nhn/services/compute/compute_service.py new file mode 100644 index 0000000000..082c04bc96 --- /dev/null +++ b/prowler/providers/nhn/services/compute/compute_service.py @@ -0,0 +1,95 @@ +from pydantic import BaseModel + +from prowler.lib.logger import logger +from prowler.providers.nhn.nhn_provider import NhnProvider + + +class NHNComputeService: + def __init__(self, provider: NhnProvider): + self.session = provider.session + self.tenant_id = provider._tenant_id + self.endpoint = "https://kr1-api-instance.infrastructure.cloud.toast.com" + + self.instances: list[Instance] = [] + self._get_instances() + + def _list_servers(self) -> list: + url = f"{self.endpoint}/v2/{self.tenant_id}/servers" + try: + response = self.session.get(url, timeout=10) + response.raise_for_status() + data = response.json() + return data.get("servers", []) + except Exception as e: + logger.error(f"Error listing servers: {e}") + return [] + + def _get_server_detail(self, server_id: str) -> dict: + url = f"{self.endpoint}/v2/{self.tenant_id}/servers/{server_id}" + try: + response = self.session.get(url, timeout=10) + response.raise_for_status() + return response.json() + except Exception as e: + logger.error(f"Error getting server detail {server_id}: {e}") + return {} + + def _check_public_ip(self, server_info: dict) -> bool: + addresses = server_info.get("addresses", {}) + for _, ip_list in addresses.items(): + for ip_info in ip_list: + if ip_info.get("OS-EXT-IPS:type") == "floating": + return True + return False + + def _check_security_groups(self, server_info: dict) -> bool: + secruity_groups = server_info.get("security_groups", []) + sg_names = [] + for sg_info in secruity_groups: + name = sg_info.get("name", "") + sg_names.append(name) + + for name in sg_names: + if name != "default": + return False + return True + + def _check_login_user(self, server_info: dict) -> bool: + metadata = server_info.get("metadata", {}) + login_user = metadata.get("login_username", "") + if ( + login_user == "Administrator" + or login_user == "root" + or login_user == "admin" + ): + return True + return False + + def _get_instances(self): + server_list = self._list_servers() + for server in server_list: + server_id = server["id"] + server_name = server["name"] + detail = self._get_server_detail(server_id) + server_info = detail.get("server", {}) + + server_public_ip = self._check_public_ip(server_info) + server_security_groups = self._check_security_groups(server_info) + server_login_user = self._check_login_user(server_info) + + instance = Instance( + id=server_id, + name=server_name, + public_ip=server_public_ip, + security_groups=server_security_groups, + login_user=server_login_user, + ) + self.instances.append(instance) + + +class Instance(BaseModel): + id: str + name: str + public_ip: bool + security_groups: bool + login_user: bool diff --git a/prowler/providers/nhn/services/network/__init__.py b/prowler/providers/nhn/services/network/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/nhn/services/network/network_client.py b/prowler/providers/nhn/services/network/network_client.py new file mode 100644 index 0000000000..9c53cfd3ba --- /dev/null +++ b/prowler/providers/nhn/services/network/network_client.py @@ -0,0 +1,4 @@ +from prowler.providers.common.provider import Provider +from prowler.providers.nhn.services.network.network_service import NHNNetworkService + +network_client = NHNNetworkService(Provider.get_global_provider()) diff --git a/prowler/providers/nhn/services/network/network_service.py b/prowler/providers/nhn/services/network/network_service.py new file mode 100644 index 0000000000..140e1d2815 --- /dev/null +++ b/prowler/providers/nhn/services/network/network_service.py @@ -0,0 +1,89 @@ +from pydantic import BaseModel + +from prowler.lib.logger import logger +from prowler.providers.nhn.nhn_provider import NhnProvider + + +class Subnet(BaseModel): + name: str + external_router: bool + enable_dhcp: bool + + +class Network(BaseModel): + id: str + name: str + empty_routingtables: bool + subnets: list[Subnet] + + +class NHNNetworkService: + def __init__(self, provider: NhnProvider): + self.session = provider.session + self.tenant_id = provider._tenant_id + self.endpoint = "https://kr1-api-network-infrastructure.nhncloudservice.com" + self.networks: list[Network] = [] + self._get_networks() + + def _list_vpcs(self) -> list: + url = f"{self.endpoint}/v2.0/vpcs" + try: + response = self.session.get(url, timeout=10) + response.raise_for_status() + data = response.json() + return data.get("vpcs", []) + except Exception as e: + logger.error(f"Error listing vpcs: {e}") + return [] + + def _get_vpc_detail(self, vpc_id: str) -> dict: + url = f"{self.endpoint}/v2.0/vpcs/{vpc_id}" + try: + response = self.session.get(url, timeout=10) + response.raise_for_status() + return response.json() + except Exception as e: + logger.error(f"Error getting vpc detail {vpc_id}: {e}") + return {} + + def _check_has_empty_routingtables(self, vpc_info: dict) -> bool: + routingtables = vpc_info.get("routingtables", []) + return not routingtables + + def _check_subnet_has_external_router(self, subnet: dict) -> bool: + return subnet.get("router:external", True) + + def _check_subnet_enable_dhcp(self, subnet: dict) -> bool: + return subnet.get("enable_dhcp", True) + + def _get_networks(self): + vpc_list = self._list_vpcs() + for vpc in vpc_list: + vpc_id = vpc["id"] + vpc_name = vpc["name"] + detail = self._get_vpc_detail(vpc_id) + vpc_info = detail.get("vpc", {}) + vpc_empty_routingtables = self._check_has_empty_routingtables(vpc_info) + + network = Network( + id=vpc_id, + name=vpc_name, + empty_routingtables=vpc_empty_routingtables, + subnets=[], + ) + self._get_subnets(vpc_info, network) + self.networks.append(network) + + def _get_subnets(self, vpc_info: dict, network: Network): + subnet_list = vpc_info.get("subnets", []) + # ret_subnet_list = [] + for subnet in subnet_list: + subnet_name = subnet["name"] + subnet_external_router = self._check_subnet_has_external_router(subnet) + subnet_enable_dhcp = self._check_subnet_enable_dhcp(subnet) + subnet_instance = Subnet( + name=subnet_name, + external_router=subnet_external_router, + enable_dhcp=subnet_enable_dhcp, + ) + network.subnets.append(subnet_instance) diff --git a/prowler/providers/nhn/services/network/network_vpc_has_empty_routingtables/__init__.py b/prowler/providers/nhn/services/network/network_vpc_has_empty_routingtables/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/nhn/services/network/network_vpc_has_empty_routingtables/network_vpc_has_empty_routingtables.metadata.json b/prowler/providers/nhn/services/network/network_vpc_has_empty_routingtables/network_vpc_has_empty_routingtables.metadata.json new file mode 100644 index 0000000000..8ded29ecb6 --- /dev/null +++ b/prowler/providers/nhn/services/network/network_vpc_has_empty_routingtables/network_vpc_has_empty_routingtables.metadata.json @@ -0,0 +1,30 @@ +{ + "Provider": "nhn", + "CheckID": "network_vpc_has_empty_routingtables", + "CheckTitle": "Check if VPC has empty routing tables", + "CheckType": [], + "ServiceName": "network", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "medium", + "ResourceType": "VPC", + "Description": "Check if VPC has empty routing tables. Having empty routing tables may indicate misconfiguration or incomplete network setup.", + "Risk": "", + "RelatedUrl": "", + "Remediation": { + "Code": { + "CLI": "", + "NativeIaC": "", + "Other": "", + "Terraform": "" + }, + "Recommendation": { + "Text": "Ensure that VPC has properly configured routing tables with necessary routes to ensure proper network connectivity. If not needed, delete the empty routing tables.", + "Url": "" + } + }, + "Categories": [], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/nhn/services/network/network_vpc_has_empty_routingtables/network_vpc_has_empty_routingtables.py b/prowler/providers/nhn/services/network/network_vpc_has_empty_routingtables/network_vpc_has_empty_routingtables.py new file mode 100644 index 0000000000..fd3051445a --- /dev/null +++ b/prowler/providers/nhn/services/network/network_vpc_has_empty_routingtables/network_vpc_has_empty_routingtables.py @@ -0,0 +1,22 @@ +from prowler.lib.check.models import Check, CheckReportNHN +from prowler.providers.nhn.services.network.network_client import network_client + + +class network_vpc_has_empty_routingtables(Check): + def execute(self): + findings = [] + for network in network_client.networks: + report = CheckReportNHN( + metadata=self.metadata(), + resource=network, + ) + report.status = "PASS" + report.status_extended = ( + f"VPC {network.name} does not have empty routingtables." + ) + if network.empty_routingtables: + report.status = "FAIL" + report.status_extended = f"VPC {network.name} has empty routingtables." + findings.append(report) + + return findings diff --git a/prowler/providers/nhn/services/network/network_vpc_subnet_enable_dhcp/__init__.py b/prowler/providers/nhn/services/network/network_vpc_subnet_enable_dhcp/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/nhn/services/network/network_vpc_subnet_enable_dhcp/network_vpc_subnet_enable_dhcp.metadata.json b/prowler/providers/nhn/services/network/network_vpc_subnet_enable_dhcp/network_vpc_subnet_enable_dhcp.metadata.json new file mode 100644 index 0000000000..c13f16cb25 --- /dev/null +++ b/prowler/providers/nhn/services/network/network_vpc_subnet_enable_dhcp/network_vpc_subnet_enable_dhcp.metadata.json @@ -0,0 +1,30 @@ +{ + "Provider": "nhn", + "CheckID": "network_vpc_subnet_enable_dhcp", + "CheckTitle": "Check if DHCP is enabled for subnets in VPC", + "CheckType": [], + "ServiceName": "network", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "medium", + "ResourceType": "VPC", + "Description": "Check if DHCP is enabled for the subnets in the VPC.", + "Risk": "", + "RelatedUrl": "", + "Remediation": { + "Code": { + "CLI": "", + "NativeIaC": "", + "Other": "", + "Terraform": "" + }, + "Recommendation": { + "Text": "Ensure that DHCP is enabled for all subnets where automatic IP address allocation is needed.", + "Url": "" + } + }, + "Categories": [], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/nhn/services/network/network_vpc_subnet_enable_dhcp/network_vpc_subnet_enable_dhcp.py b/prowler/providers/nhn/services/network/network_vpc_subnet_enable_dhcp/network_vpc_subnet_enable_dhcp.py new file mode 100644 index 0000000000..c90c71b8fd --- /dev/null +++ b/prowler/providers/nhn/services/network/network_vpc_subnet_enable_dhcp/network_vpc_subnet_enable_dhcp.py @@ -0,0 +1,23 @@ +from prowler.lib.check.models import Check, CheckReportNHN +from prowler.providers.nhn.services.network.network_client import network_client + + +class network_vpc_subnet_enable_dhcp(Check): + def execute(self): + findings = [] + for network in network_client.networks: + for subnet in network.subnets: + report = CheckReportNHN( + metadata=self.metadata(), + resource=network, + ) + report.status = "PASS" + report.status_extended = f"VPC {network.name} Subnet {subnet.name} does not have DHCP enabled." + if subnet.enable_dhcp: + report.status = "FAIL" + report.status_extended = ( + f"VPC {network.name} Subnet {subnet.name} has DHCP enabled." + ) + findings.append(report) + + return findings diff --git a/prowler/providers/nhn/services/network/network_vpc_subnet_has_external_router/__init__.py b/prowler/providers/nhn/services/network/network_vpc_subnet_has_external_router/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/prowler/providers/nhn/services/network/network_vpc_subnet_has_external_router/network_vpc_subnet_has_external_router.metadata.json b/prowler/providers/nhn/services/network/network_vpc_subnet_has_external_router/network_vpc_subnet_has_external_router.metadata.json new file mode 100644 index 0000000000..4a975d0ed7 --- /dev/null +++ b/prowler/providers/nhn/services/network/network_vpc_subnet_has_external_router/network_vpc_subnet_has_external_router.metadata.json @@ -0,0 +1,30 @@ +{ + "Provider": "nhn", + "CheckID": "network_vpc_subnet_has_external_router", + "CheckTitle": "Check for External Router in NHN VPC Subnet", + "CheckType": [], + "ServiceName": "network", + "SubServiceName": "", + "ResourceIdTemplate": "", + "Severity": "medium", + "ResourceType": "VPC", + "Description": "Checks if VPC allows access from the public internet, by verifying if an external router is configured.", + "Risk": "", + "RelatedUrl": "", + "Remediation": { + "Code": { + "CLI": "", + "NativeIaC": "", + "Other": "", + "Terraform": "" + }, + "Recommendation": { + "Text": "Review the external router settings for the VPC Subnet.", + "Url": "" + } + }, + "Categories": [], + "DependsOn": [], + "RelatedTo": [], + "Notes": "" +} diff --git a/prowler/providers/nhn/services/network/network_vpc_subnet_has_external_router/network_vpc_subnet_has_external_router.py b/prowler/providers/nhn/services/network/network_vpc_subnet_has_external_router/network_vpc_subnet_has_external_router.py new file mode 100644 index 0000000000..c8c7f42d64 --- /dev/null +++ b/prowler/providers/nhn/services/network/network_vpc_subnet_has_external_router/network_vpc_subnet_has_external_router.py @@ -0,0 +1,21 @@ +from prowler.lib.check.models import Check, CheckReportNHN +from prowler.providers.nhn.services.network.network_client import network_client + + +class network_vpc_subnet_has_external_router(Check): + def execute(self): + findings = [] + for network in network_client.networks: + for subnet in network.subnets: + report = CheckReportNHN( + metadata=self.metadata(), + resource=network, + ) + report.status = "PASS" + report.status_extended = f"VPC {network.name} Subnet {subnet.name} does not have an external router." + if subnet.external_router: + report.status = "FAIL" + report.status_extended = f"VPC {network.name} Subnet {subnet.name} has an external router." + findings.append(report) + + return findings diff --git a/pyproject.toml b/pyproject.toml index 44ce5b58af..26cc8d967e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,23 +13,23 @@ classifiers = [ dependencies = [ "awsipranges==0.3.3", "alive-progress==3.2.0", - "azure-identity==1.19.0", + "azure-identity==1.21.0", "azure-keyvault-keys==4.10.0", - "azure-mgmt-applicationinsights==4.0.0", + "azure-mgmt-applicationinsights==4.1.0", "azure-mgmt-authorization==4.0.0", "azure-mgmt-compute==34.0.0", - "azure-mgmt-containerregistry==10.3.0", - "azure-mgmt-containerservice==34.0.0", + "azure-mgmt-containerregistry==12.0.0", + "azure-mgmt-containerservice==34.1.0", "azure-mgmt-cosmosdb==9.7.0", "azure-mgmt-keyvault==10.3.1", "azure-mgmt-monitor==6.0.2", "azure-mgmt-network==28.1.0", "azure-mgmt-rdbms==10.1.0", - "azure-mgmt-resource==23.2.0", + "azure-mgmt-resource==23.3.0", "azure-mgmt-search==9.1.0", "azure-mgmt-security==7.0.0", "azure-mgmt-sql==3.0.1", - "azure-mgmt-storage==21.2.1", + "azure-mgmt-storage==22.1.1", "azure-mgmt-subscription==3.1.1", "azure-mgmt-web==8.0.0", "azure-storage-blob==12.24.1", @@ -45,11 +45,12 @@ dependencies = [ "jsonschema==4.23.0", "kubernetes==32.0.1", "microsoft-kiota-abstractions==1.9.2", - "msgraph-sdk==1.18.0", + "msgraph-sdk==1.23.0", "numpy==2.0.2", "pandas==2.2.3", "py-ocsf-models==0.3.1", "pydantic==1.10.21", + "pygithub==2.5.0", "python-dateutil (>=2.9.0.post0,<3.0.0)", "pytz==2025.1", "schema==0.7.7", @@ -62,13 +63,9 @@ description = "Prowler is an Open Source security tool to perform AWS, GCP and A license = "Apache-2.0" maintainers = [{name = "Prowler Engineering", email = "engineering@prowler.com"}] name = "prowler" -packages = [ - {include = "prowler"}, - {include = "dashboard"} -] readme = "README.md" requires-python = ">3.9.1,<3.13" -version = "5.5.0" +version = "5.8.0" [project.scripts] prowler = "prowler.__main__:prowler" @@ -80,6 +77,10 @@ prowler = "prowler.__main__:prowler" "Issue tracker" = "https://github.com/prowler-cloud/prowler/issues" [tool.poetry] +packages = [ + {include = "prowler"}, + {include = "dashboard"} +] requires-poetry = ">=2.0" [tool.poetry.group.dev.dependencies] @@ -89,6 +90,7 @@ coverage = "7.6.12" docker = "7.1.0" flake8 = "7.1.2" freezegun = "1.5.1" +marshmallow = ">=3.15.0,<4.0.0" mock = "5.2.0" moto = {extras = ["all"], version = "5.0.28"} openapi-schema-validator = "0.6.3" diff --git a/tests/config/config_test.py b/tests/config/config_test.py index 0573e0c19a..465d16a05a 100644 --- a/tests/config/config_test.py +++ b/tests/config/config_test.py @@ -297,7 +297,6 @@ config_aws = { "insecure_key_algorithms": [ "RSA-1024", "P-192", - "SHA-1", ], "eks_required_log_types": [ "api", @@ -324,7 +323,7 @@ config_azure = { "recommended_minimal_tls_versions": ["1.2", "1.3"], } -config_gcp = {"shodan_api_key": None} +config_gcp = {"shodan_api_key": None, "max_unused_account_days": 30} config_kubernetes = { "audit_log_maxbackup": 10, diff --git a/tests/config/fixtures/config.yaml b/tests/config/fixtures/config.yaml index 95e8ff3332..b93d38fda6 100644 --- a/tests/config/fixtures/config.yaml +++ b/tests/config/fixtures/config.yaml @@ -317,7 +317,6 @@ aws: [ "RSA-1024", "P-192", - "SHA-1", ] # AWS EKS Configuration @@ -399,6 +398,7 @@ gcp: # GCP Compute Configuration # gcp.compute_public_address_shodan shodan_api_key: null + max_unused_account_days: 30 # Kubernetes Configuration kubernetes: @@ -430,8 +430,36 @@ kubernetes: "TLS_RSA_WITH_AES_128_GCM_SHA256", ] -# Microsoft365 Configuration -microsoft365: +# M365 Configuration +m365: # Conditional Access Policy # policy.session_controls.sign_in_frequency.frequency in hours sign_in_frequency: 4 + # Teams Settings + # m365.teams_external_file_sharing_restricted + allowed_cloud_storage_services: + [ + #"allow_box", + #"allow_drop_box", + #"allow_egnyte", + #"allow_google_drive", + #"allow_share_file", + ] + # Exchange Organization Settings + # 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" + ] + # Exchange Mailbox Settings + # m365.exchange_mailbox_properties_auditing_enabled + audit_log_age: 90 # maximum number of days to keep audit logs diff --git a/tests/lib/cli/parser_test.py b/tests/lib/cli/parser_test.py index 16b322ac9c..1c72443baf 100644 --- a/tests/lib/cli/parser_test.py +++ b/tests/lib/cli/parser_test.py @@ -1,3 +1,4 @@ +import sys import uuid from argparse import ArgumentTypeError @@ -16,11 +17,13 @@ prowler_command = "prowler" # capsys # https://docs.pytest.org/en/7.1.x/how-to/capture-stdout-stderr.html -prowler_default_usage_error = "usage: prowler [-h] [--version] {aws,azure,gcp,kubernetes,microsoft365,dashboard} ..." +prowler_default_usage_error = ( + "usage: prowler [-h] [--version] {aws,azure,gcp,kubernetes,m365,nhn,dashboard} ..." +) def mock_get_available_providers(): - return ["aws", "azure", "gcp", "kubernetes", "microsoft365"] + return ["aws", "azure", "gcp", "kubernetes", "m365", "nhn"] @pytest.mark.arg_parser @@ -1320,9 +1323,11 @@ class Test_Parser: def test_validate_bucket_invalid_bucket_names(self): bad_bucket_names = [ "xn--bucket-name", + "sthree-bucket-name", + "amzn-s3-demo-bucket-name", "mrryadfpcwlscicvnrchmtmyhwrvzkgfgdxnlnvaaummnywciixnzvycnzmhhpwb", "192.168.5.4", - "bucket-name-s3alias", + "bucket-name--table-s3", "bucket-name-s3alias-", "bucket-n$ame", "bu", @@ -1338,7 +1343,9 @@ class Test_Parser: ) def test_validate_bucket_valid_bucket_names(self): - valid_bucket_names = ["bucket-name" "test" "test-test-test"] + valid_bucket_names = [ + "bucket-name" "test" "test-test-test" "test.test.test" "abc" + ] for bucket_name in valid_bucket_names: assert validate_bucket(bucket_name) == bucket_name @@ -1363,3 +1370,13 @@ class Test_Parser: valid_role_names = ["prowler-role" "test@" "test=test+test,."] for role_name in valid_role_names: assert validate_role_session_name(role_name) == role_name + + def test_microsoft365_alias_conversion(self): + original_argv = sys.argv.copy() + try: + sys.argv = ["prowler", "microsoft365"] + parser = ProwlerArgumentParser() + args = parser.parse() + assert args.provider == "m365" + finally: + sys.argv = original_argv diff --git a/tests/lib/outputs/compliance/aws_well_architected/aws_well_architected_test.py b/tests/lib/outputs/compliance/aws_well_architected/aws_well_architected_test.py index a53d4b5c30..104c127d6e 100644 --- a/tests/lib/outputs/compliance/aws_well_architected/aws_well_architected_test.py +++ b/tests/lib/outputs/compliance/aws_well_architected/aws_well_architected_test.py @@ -25,7 +25,9 @@ class TestAWSWellArchitected: ) ] - output = AWSWellArchitected(findings, AWS_WELL_ARCHITECTED) + output = AWSWellArchitected( + findings, AWS_WELL_ARCHITECTED, file_extension=".csv" + ) output_data = output.data[0] assert isinstance(output_data, AWSWellArchitectedModel) assert output_data.Provider == "aws" diff --git a/tests/lib/outputs/compliance/cis/cis_m365_test.py b/tests/lib/outputs/compliance/cis/cis_m365_test.py new file mode 100644 index 0000000000..1c8232d73a --- /dev/null +++ b/tests/lib/outputs/compliance/cis/cis_m365_test.py @@ -0,0 +1,182 @@ +from datetime import datetime +from io import StringIO + +from freezegun import freeze_time +from mock import patch + +from prowler.lib.outputs.compliance.cis.cis_m365 import M365CIS +from prowler.lib.outputs.compliance.cis.models import M365CISModel +from tests.lib.outputs.compliance.fixtures import CIS_4_0_M365 +from tests.lib.outputs.fixtures.fixtures import generate_finding_output +from tests.providers.m365.m365_fixtures import DOMAIN, LOCATION, TENANT_ID + + +class TestM365CIS: + def test_output_transform(self): + findings = [ + generate_finding_output( + provider="m365", + compliance={"CIS-4.0": "2.1.3"}, + account_name=DOMAIN, + account_uid=TENANT_ID, + region=LOCATION, + ) + ] + # Clear the data from CSV class + output = M365CIS(findings, CIS_4_0_M365) + output_data = output.data[0] + assert isinstance(output_data, M365CISModel) + assert output_data.Provider == "m365" + assert output_data.TenantId == TENANT_ID + assert output_data.Location == LOCATION + assert output_data.Description == CIS_4_0_M365.Description + assert output_data.Requirements_Id == CIS_4_0_M365.Requirements[0].Id + assert ( + output_data.Requirements_Description + == CIS_4_0_M365.Requirements[0].Description + ) + assert ( + output_data.Requirements_Attributes_Section + == CIS_4_0_M365.Requirements[0].Attributes[0].Section + ) + assert ( + output_data.Requirements_Attributes_SubSection + == CIS_4_0_M365.Requirements[0].Attributes[0].SubSection + ) + assert ( + output_data.Requirements_Attributes_Profile + == CIS_4_0_M365.Requirements[0].Attributes[0].Profile + ) + assert ( + output_data.Requirements_Attributes_AssessmentStatus + == CIS_4_0_M365.Requirements[0].Attributes[0].AssessmentStatus + ) + assert ( + output_data.Requirements_Attributes_Description + == CIS_4_0_M365.Requirements[0].Attributes[0].Description + ) + assert ( + output_data.Requirements_Attributes_RationaleStatement + == CIS_4_0_M365.Requirements[0].Attributes[0].RationaleStatement + ) + assert ( + output_data.Requirements_Attributes_ImpactStatement + == CIS_4_0_M365.Requirements[0].Attributes[0].ImpactStatement + ) + assert ( + output_data.Requirements_Attributes_RemediationProcedure + == CIS_4_0_M365.Requirements[0].Attributes[0].RemediationProcedure + ) + assert ( + output_data.Requirements_Attributes_AuditProcedure + == CIS_4_0_M365.Requirements[0].Attributes[0].AuditProcedure + ) + assert ( + output_data.Requirements_Attributes_AdditionalInformation + == CIS_4_0_M365.Requirements[0].Attributes[0].AdditionalInformation + ) + assert ( + output_data.Requirements_Attributes_References + == CIS_4_0_M365.Requirements[0].Attributes[0].References + ) + assert ( + output_data.Requirements_Attributes_DefaultValue + == CIS_4_0_M365.Requirements[0].Attributes[0].DefaultValue + ) + assert output_data.Status == "PASS" + assert output_data.StatusExtended == "" + assert output_data.ResourceId == "" + assert output_data.ResourceName == "" + assert output_data.CheckId == "test-check-id" + assert output_data.Muted is False + # Test manual check + output_data_manual = output.data[1] + assert output_data_manual.Provider == "m365" + assert output_data_manual.TenantId == TENANT_ID + assert output_data_manual.Location == LOCATION + assert output_data_manual.Description == CIS_4_0_M365.Description + assert output_data_manual.Requirements_Id == CIS_4_0_M365.Requirements[1].Id + assert ( + output_data_manual.Requirements_Description + == CIS_4_0_M365.Requirements[1].Description + ) + assert ( + output_data_manual.Requirements_Attributes_Section + == CIS_4_0_M365.Requirements[1].Attributes[0].Section + ) + assert ( + output_data.Requirements_Attributes_SubSection + == CIS_4_0_M365.Requirements[0].Attributes[0].SubSection + ) + assert ( + output_data_manual.Requirements_Attributes_Profile + == CIS_4_0_M365.Requirements[1].Attributes[0].Profile + ) + assert ( + output_data_manual.Requirements_Attributes_AssessmentStatus + == CIS_4_0_M365.Requirements[1].Attributes[0].AssessmentStatus + ) + assert ( + output_data_manual.Requirements_Attributes_Description + == CIS_4_0_M365.Requirements[1].Attributes[0].Description + ) + assert ( + output_data_manual.Requirements_Attributes_RationaleStatement + == CIS_4_0_M365.Requirements[1].Attributes[0].RationaleStatement + ) + assert ( + output_data_manual.Requirements_Attributes_ImpactStatement + == CIS_4_0_M365.Requirements[1].Attributes[0].ImpactStatement + ) + assert ( + output_data_manual.Requirements_Attributes_RemediationProcedure + == CIS_4_0_M365.Requirements[1].Attributes[0].RemediationProcedure + ) + assert ( + output_data_manual.Requirements_Attributes_AuditProcedure + == CIS_4_0_M365.Requirements[1].Attributes[0].AuditProcedure + ) + assert ( + output_data_manual.Requirements_Attributes_AdditionalInformation + == CIS_4_0_M365.Requirements[1].Attributes[0].AdditionalInformation + ) + assert ( + output_data_manual.Requirements_Attributes_References + == CIS_4_0_M365.Requirements[1].Attributes[0].References + ) + assert ( + output_data_manual.Requirements_Attributes_DefaultValue + == CIS_4_0_M365.Requirements[1].Attributes[0].DefaultValue + ) + assert output_data_manual.Status == "MANUAL" + assert output_data_manual.StatusExtended == "Manual check" + assert output_data_manual.ResourceId == "manual_check" + assert output_data_manual.ResourceName == "Manual check" + assert output_data_manual.CheckId == "manual" + assert output_data_manual.Muted is False + + @freeze_time(datetime.now()) + def test_batch_write_data_to_file(self): + mock_file = StringIO() + findings = [ + generate_finding_output( + provider="m365", + compliance={"CIS-4.0": "2.1.3"}, + account_name=DOMAIN, + account_uid=TENANT_ID, + region=LOCATION, + ) + ] + # Clear the data from CSV class + output = M365CIS(findings, CIS_4_0_M365) + output._file_descriptor = mock_file + + with patch.object(mock_file, "close", return_value=None): + output.batch_write_data_to_file() + + mock_file.seek(0) + content = mock_file.read() + + expected_csv = f"PROVIDER;DESCRIPTION;TENANTID;LOCATION;ASSESSMENTDATE;REQUIREMENTS_ID;REQUIREMENTS_DESCRIPTION;REQUIREMENTS_ATTRIBUTES_SECTION;REQUIREMENTS_ATTRIBUTES_SUBSECTION;REQUIREMENTS_ATTRIBUTES_PROFILE;REQUIREMENTS_ATTRIBUTES_ASSESSMENTSTATUS;REQUIREMENTS_ATTRIBUTES_DESCRIPTION;REQUIREMENTS_ATTRIBUTES_RATIONALESTATEMENT;REQUIREMENTS_ATTRIBUTES_IMPACTSTATEMENT;REQUIREMENTS_ATTRIBUTES_REMEDIATIONPROCEDURE;REQUIREMENTS_ATTRIBUTES_AUDITPROCEDURE;REQUIREMENTS_ATTRIBUTES_ADDITIONALINFORMATION;REQUIREMENTS_ATTRIBUTES_DEFAULTVALUE;REQUIREMENTS_ATTRIBUTES_REFERENCES;STATUS;STATUSEXTENDED;RESOURCEID;RESOURCENAME;CHECKID;MUTED\r\nm365;The CIS Microsoft 365 Foundations Benchmark provides prescriptive guidance for configuring security options for Microsoft 365 with an emphasis on foundational, testable, and architecture agnostic settings.;00000000-0000-0000-0000-000000000000;global;{datetime.now()};2.1.3;Ensure MFA Delete is enabled on S3 buckets;2.1. Simple Storage Service (S3);;Level 1;Automated;Once MFA Delete is enabled on your sensitive and classified S3 bucket it requires the user to have two forms of authentication.;Adding MFA delete to an S3 bucket, requires additional authentication when you change the version state of your bucket or you delete and object version adding another layer of security in the event your security credentials are compromised or unauthorized access is granted.;;Perform the steps below to enable MFA delete on an S3 bucket.Note:-You cannot enable MFA Delete using the AWS Management Console. You must use the AWS CLI or API.-You must use your 'root' account to enable MFA Delete on S3 buckets.**From Command line:**1. Run the s3api put-bucket-versioning command aws s3api put-bucket-versioning --profile my-root-profile --bucket Bucket_Name --versioning-configuration Status=Enabled,MFADelete=Enabled --mfa arn:aws:iam::aws_account_id:mfa/root-account-mfa-device passcode;Perform the steps below to confirm MFA delete is configured on an S3 Bucket**From Console:**1. Login to the S3 console at `https://console.aws.amazon.com/s3/`2. Click the `Check` box next to the Bucket name you want to confirm3. In the window under `Properties`4. Confirm that Versioning is `Enabled`5. Confirm that MFA Delete is `Enabled`**From Command Line:**1. Run the `get-bucket-versioning aws s3api get-bucket-versioning --bucket my-bucket Output example: Enabled Enabled\ If the Console or the CLI output does not show Versioning and MFA Delete `enabled` refer to the remediation below.;;By default, MFA Delete is not enabled on S3 buckets.;https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html#MultiFactorAuthenticationDelete:https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMFADelete.html:https://aws.amazon.com/blogs/security/securing-access-to-aws-using-mfa-part-3/:https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_lost-or-broken.html;PASS;;;;test-check-id;False\r\nm365;The CIS Microsoft 365 Foundations Benchmark provides prescriptive guidance for configuring security options for Microsoft 365 with an emphasis on foundational, testable, and architecture agnostic settings.;00000000-0000-0000-0000-000000000000;global;{datetime.now()};2.1.4;Ensure that the controller manager pod specification file permissions are set to 600 or more restrictive;1.1 Control Plane Node Configuration Files;;Level 1 - Master Node;Automated;Ensure that the controller manager pod specification file has permissions of `600` or more restrictive.;The controller manager pod specification file controls various parameters that set the behavior of the Controller Manager on the master node. You should restrict its file permissions to maintain the integrity of the file. The file should be writable by only the administrators on the system.;;Run the below command (based on the file location on your system) on the Control Plane node. For example, ``` chmod 600 /etc/kubernetes/manifests/kube-controller-manager.yaml ```;Run the below command (based on the file location on your system) on the Control Plane node. For example, ``` stat -c %a /etc/kubernetes/manifests/kube-controller-manager.yaml ``` Verify that the permissions are `600` or more restrictive.;;By default, the `kube-controller-manager.yaml` file has permissions of `640`.;https://kubernetes.io/docs/admin/kube-apiserver/;MANUAL;Manual check;manual_check;Manual check;manual;False\r\n" + + assert content == expected_csv diff --git a/tests/lib/outputs/compliance/compliance_test.py b/tests/lib/outputs/compliance/compliance_test.py index d9458bc6b0..b2fc94488f 100644 --- a/tests/lib/outputs/compliance/compliance_test.py +++ b/tests/lib/outputs/compliance/compliance_test.py @@ -330,3 +330,55 @@ class TestCompliance: "CIS-2.0": ["2.1.3"], "CIS-2.1": ["2.1.3"], } + + def test_get_check_compliance_github(self): + check_compliance = [ + Compliance( + Framework="CIS", + Provider="Github", + Version="1.0", + Description="This document provides prescriptive guidance for establishing a secure configuration posture for securing GitHub.", + Requirements=[ + Compliance_Requirement( + Checks=[], + Id="1.1.11", + Description="Ensure all open comments are resolved before allowing code change merging", + Attributes=[ + CIS_Requirement_Attribute( + 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="", + ) + ], + ) + ], + ) + ] + + finding = Check_Report( + metadata=load_check_metadata( + f"{path.dirname(path.realpath(__file__))}/../fixtures/metadata.json" + ).json(), + resource={}, + ) + finding.resource_details = "Test resource details" + finding.resource_id = "test-resource" + finding.resource_arn = "test-arn" + finding.region = "eu-west-1" + finding.status = "PASS" + finding.status_extended = "This is a test" + + bulk_checks_metadata = {} + bulk_checks_metadata["iam_user_accesskey_unused"] = mock.MagicMock() + bulk_checks_metadata["iam_user_accesskey_unused"].Compliance = check_compliance + + assert get_check_compliance(finding, "github", bulk_checks_metadata) == { + "CIS-1.0": ["1.1.11"], + } diff --git a/tests/lib/outputs/compliance/fixtures.py b/tests/lib/outputs/compliance/fixtures.py index f20cf6de85..94c9604cf3 100644 --- a/tests/lib/outputs/compliance/fixtures.py +++ b/tests/lib/outputs/compliance/fixtures.py @@ -13,6 +13,7 @@ from prowler.lib.check.compliance_models import ( Mitre_Requirement_Attribute_AWS, Mitre_Requirement_Attribute_Azure, Mitre_Requirement_Attribute_GCP, + Prowler_ThreatScore_Requirement_Attribute, ) CIS_1_4_AWS_NAME = "cis_1.4_aws" @@ -242,6 +243,58 @@ CIS_1_5_AWS = Compliance( ], ) +CIS_4_0_M365_NAME = "cis_4.0_m365" +CIS_4_0_M365 = Compliance( + Framework="CIS", + Provider="M365", + Version="4.0", + Description="The CIS Microsoft 365 Foundations Benchmark provides prescriptive guidance for configuring security options for Microsoft 365 with an emphasis on foundational, testable, and architecture agnostic settings.", + Requirements=[ + Compliance_Requirement( + Checks=[ + "mfa_delete_enabled", + ], + Id="2.1.3", + Description="Ensure MFA Delete is enabled on S3 buckets", + Attributes=[ + CIS_Requirement_Attribute( + Section="2.1. Simple Storage Service (S3)", + Profile="Level 1", + AssessmentStatus="Automated", + Description="Once MFA Delete is enabled on your sensitive and classified S3 bucket it requires the user to have two forms of authentication.", + RationaleStatement="Adding MFA delete to an S3 bucket, requires additional authentication when you change the version state of your bucket or you delete and object version adding another layer of security in the event your security credentials are compromised or unauthorized access is granted.", + ImpactStatement="", + RemediationProcedure="Perform the steps below to enable MFA delete on an S3 bucket.Note:-You cannot enable MFA Delete using the AWS Management Console. You must use the AWS CLI or API.-You must use your 'root' account to enable MFA Delete on S3 buckets.**From Command line:**1. Run the s3api put-bucket-versioning command aws s3api put-bucket-versioning --profile my-root-profile --bucket Bucket_Name --versioning-configuration Status=Enabled,MFADelete=Enabled --mfa arn:aws:iam::aws_account_id:mfa/root-account-mfa-device passcode", + AuditProcedure="Perform the steps below to confirm MFA delete is configured on an S3 Bucket**From Console:**1. Login to the S3 console at `https://console.aws.amazon.com/s3/`2. Click the `Check` box next to the Bucket name you want to confirm3. In the window under `Properties`4. Confirm that Versioning is `Enabled`5. Confirm that MFA Delete is `Enabled`**From Command Line:**1. Run the `get-bucket-versioning aws s3api get-bucket-versioning --bucket my-bucket Output example: Enabled Enabled\ If the Console or the CLI output does not show Versioning and MFA Delete `enabled` refer to the remediation below.", + AdditionalInformation="", + References="https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html#MultiFactorAuthenticationDelete:https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMFADelete.html:https://aws.amazon.com/blogs/security/securing-access-to-aws-using-mfa-part-3/:https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_lost-or-broken.html", + DefaultValue="By default, MFA Delete is not enabled on S3 buckets.", + ) + ], + ), + Compliance_Requirement( + Checks=[], + Id="2.1.4", + Description="Ensure that the controller manager pod specification file permissions are set to 600 or more restrictive", + Attributes=[ + CIS_Requirement_Attribute( + Section="1.1 Control Plane Node Configuration Files", + Profile="Level 1 - Master Node", + AssessmentStatus="Automated", + Description="Ensure that the controller manager pod specification file has permissions of `600` or more restrictive.", + RationaleStatement="The controller manager pod specification file controls various parameters that set the behavior of the Controller Manager on the master node. You should restrict its file permissions to maintain the integrity of the file. The file should be writable by only the administrators on the system.", + ImpactStatement="", + RemediationProcedure="Run the below command (based on the file location on your system) on the Control Plane node. For example, ``` chmod 600 /etc/kubernetes/manifests/kube-controller-manager.yaml ```", + AuditProcedure="Run the below command (based on the file location on your system) on the Control Plane node. For example, ``` stat -c %a /etc/kubernetes/manifests/kube-controller-manager.yaml ``` Verify that the permissions are `600` or more restrictive.", + AdditionalInformation="", + References="https://kubernetes.io/docs/admin/kube-apiserver/", + DefaultValue="By default, the `kube-controller-manager.yaml` file has permissions of `640`.", + ) + ], + ), + ], +) + MITRE_ATTACK_AWS_NAME = "mitre_attack_aws" MITRE_ATTACK_AWS = Compliance( Framework="MITRE-ATTACK", @@ -803,3 +856,129 @@ KISA_ISMSP_AWS = Compliance( ), ], ) + +PROWLER_THREATSCORE_AWS_NAME = "prowler_threatscore_aws" +PROWLER_THREATSCORE_AWS = Compliance( + Framework="ProwlerThreatScore", + Version="1.0", + Provider="AWS", + Description="Prowler ThreatScore Compliance Framework for AWS ensures that the AWS account is compliant taking into account four main pillars: Identity and Access Management, Attack Surface, Forensic Readiness and Encryption", + Requirements=[ + Compliance_Requirement( + Id="1.1.1", + Description="Ensure MFA is enabled for the 'root' user account", + Attributes=[ + Prowler_ThreatScore_Requirement_Attribute( + Title="MFA enabled for 'root'", + Section="1. IAM", + SubSection="1.1 Authentication", + AttributeDescription="The root user account holds the highest level of privileges within an AWS account. Enabling Multi-Factor Authentication (MFA) enhances security by adding an additional layer of protection beyond just a username and password. With MFA activated, users must provide their credentials (username and password) along with a unique authentication code generated by their AWS MFA device when signing into an AWS website.", + AdditionalInformation="Enabling MFA enhances console security by requiring the authenticating user to both possess a time-sensitive key-generating device and have knowledge of their credentials.", + LevelOfRisk=5, + ) + ], + Checks=[ + "iam_root_mfa_enabled", + ], + ), + Compliance_Requirement( + Id="1.1.2", + Description="Ensure hardware MFA is enabled for the 'root' user account", + Attributes=[ + Prowler_ThreatScore_Requirement_Attribute( + Title="CloudTrail logging enabled", + Section="1. IAM", + SubSection="1.1 Authentication", + AttributeDescription="The root user account in AWS has the highest level of privileges. Multi-Factor Authentication (MFA) enhances security by adding an extra layer of protection beyond a username and password. When MFA is enabled, users must enter their credentials along with a unique authentication code generated by their AWS MFA device when signing into an AWS website.", + AdditionalInformation="A hardware MFA has a smaller attack surface compared to a virtual MFA. Unlike a virtual MFA, which relies on a mobile device that may be vulnerable to malware or compromise, a hardware MFA operates independently, reducing exposure to potential security threats.", + LevelOfRisk=3, + ) + ], + Checks=[], + ), + ], +) + +PROWLER_THREATSCORE_AZURE_NAME = "prowler_threatscore_azure" +PROWLER_THREATSCORE_AZURE = Compliance( + Framework="ProwlerThreatScore", + Version="1.0", + Provider="Azure", + Description="Prowler ThreatScore Compliance Framework for Azure ensures that the Azure account is compliant taking into account four main pillars: Identity and Access Management, Attack Surface, Forensic Readiness and Encryption", + Requirements=[ + Compliance_Requirement( + Id="1.1.1", + Description="Ensure MFA is enabled for the 'root' user account", + Attributes=[ + Prowler_ThreatScore_Requirement_Attribute( + Title="MFA enabled for 'root'", + Section="1. IAM", + SubSection="1.1 Authentication", + AttributeDescription="The root user account holds the highest level of privileges within an AWS account. Enabling Multi-Factor Authentication (MFA) enhances security by adding an additional layer of protection beyond just a username and password. With MFA activated, users must provide their credentials (username and password) along with a unique authentication code generated by their AWS MFA device when signing into an AWS website.", + AdditionalInformation="Enabling MFA enhances console security by requiring the authenticating user to both possess a time-sensitive key-generating device and have knowledge of their credentials.", + LevelOfRisk=5, + ) + ], + Checks=[ + "iam_root_mfa_enabled", + ], + ), + Compliance_Requirement( + Id="1.1.2", + Description="Ensure hardware MFA is enabled for the 'root' user account", + Attributes=[ + Prowler_ThreatScore_Requirement_Attribute( + Title="CloudTrail logging enabled", + Section="1. IAM", + SubSection="1.1 Authentication", + AttributeDescription="The root user account in AWS has the highest level of privileges. Multi-Factor Authentication (MFA) enhances security by adding an extra layer of protection beyond a username and password. When MFA is enabled, users must enter their credentials along with a unique authentication code generated by their AWS MFA device when signing into an AWS website.", + AdditionalInformation="A hardware MFA has a smaller attack surface compared to a virtual MFA. Unlike a virtual MFA, which relies on a mobile device that may be vulnerable to malware or compromise, a hardware MFA operates independently, reducing exposure to potential security threats.", + LevelOfRisk=3, + ) + ], + Checks=[], + ), + ], +) + +PROWLER_THREATSCORE_GCP_NAME = "prowler_threatscore_gcp" +PROWLER_THREATSCORE_GCP = Compliance( + Framework="ProwlerThreatScore", + Version="1.0", + Provider="GCP", + Description="Prowler ThreatScore Compliance Framework for GCP ensures that the GCP account is compliant taking into account four main pillars: Identity and Access Management, Attack Surface, Forensic Readiness and Encryption", + Requirements=[ + Compliance_Requirement( + Id="1.1.1", + Description="Ensure MFA is enabled for the 'root' user account", + Attributes=[ + Prowler_ThreatScore_Requirement_Attribute( + Title="MFA enabled for 'root'", + Section="1. IAM", + SubSection="1.1 Authentication", + AttributeDescription="The root user account holds the highest level of privileges within an AWS account. Enabling Multi-Factor Authentication (MFA) enhances security by adding an additional layer of protection beyond just a username and password. With MFA activated, users must provide their credentials (username and password) along with a unique authentication code generated by their AWS MFA device when signing into an AWS website.", + AdditionalInformation="Enabling MFA enhances console security by requiring the authenticating user to both possess a time-sensitive key-generating device and have knowledge of their credentials.", + LevelOfRisk=5, + ) + ], + Checks=[ + "iam_root_mfa_enabled", + ], + ), + Compliance_Requirement( + Id="1.1.2", + Description="Ensure hardware MFA is enabled for the 'root' user account", + Attributes=[ + Prowler_ThreatScore_Requirement_Attribute( + Title="CloudTrail logging enabled", + Section="1. IAM", + SubSection="1.1 Authentication", + AttributeDescription="The root user account in AWS has the highest level of privileges. Multi-Factor Authentication (MFA) enhances security by adding an extra layer of protection beyond a username and password. When MFA is enabled, users must enter their credentials along with a unique authentication code generated by their AWS MFA device when signing into an AWS website.", + AdditionalInformation="A hardware MFA has a smaller attack surface compared to a virtual MFA. Unlike a virtual MFA, which relies on a mobile device that may be vulnerable to malware or compromise, a hardware MFA operates independently, reducing exposure to potential security threats.", + LevelOfRisk=3, + ) + ], + Checks=[], + ), + ], +) diff --git a/tests/lib/outputs/compliance/prowler_threatscore/prowler_threatscore_aws_test.py b/tests/lib/outputs/compliance/prowler_threatscore/prowler_threatscore_aws_test.py new file mode 100644 index 0000000000..28cf82ab44 --- /dev/null +++ b/tests/lib/outputs/compliance/prowler_threatscore/prowler_threatscore_aws_test.py @@ -0,0 +1,140 @@ +from datetime import datetime +from io import StringIO + +from freezegun import freeze_time +from mock import patch + +from prowler.lib.outputs.compliance.prowler_threatscore.models import ( + ProwlerThreatScoreAWSModel, +) +from prowler.lib.outputs.compliance.prowler_threatscore.prowler_threatscore_aws import ( + ProwlerThreatScoreAWS, +) +from tests.lib.outputs.compliance.fixtures import ( + PROWLER_THREATSCORE_AWS, + PROWLER_THREATSCORE_AWS_NAME, +) +from tests.lib.outputs.fixtures.fixtures import generate_finding_output +from tests.providers.aws.utils import AWS_ACCOUNT_NUMBER, AWS_REGION_EU_WEST_1 + + +class TestProwlerThreatScoreAWS: + def test_output_transform(self): + findings = [ + generate_finding_output(compliance={"ProwlerThreatScore-1.0": "1.1.1"}) + ] + + output = ProwlerThreatScoreAWS( + findings, PROWLER_THREATSCORE_AWS, PROWLER_THREATSCORE_AWS_NAME + ) + output_data = output.data[0] + assert isinstance(output_data, ProwlerThreatScoreAWSModel) + assert output_data.Provider == "aws" + assert output_data.Description == PROWLER_THREATSCORE_AWS.Description + assert output_data.AccountId == AWS_ACCOUNT_NUMBER + assert output_data.Region == AWS_REGION_EU_WEST_1 + assert output_data.Requirements_Id == PROWLER_THREATSCORE_AWS.Requirements[0].Id + assert ( + output_data.Requirements_Description + == PROWLER_THREATSCORE_AWS.Requirements[0].Description + ) + assert ( + output_data.Requirements_Attributes_Title + == PROWLER_THREATSCORE_AWS.Requirements[0].Attributes[0].Title + ) + assert ( + output_data.Requirements_Attributes_Section + == PROWLER_THREATSCORE_AWS.Requirements[0].Attributes[0].Section + ) + assert ( + output_data.Requirements_Attributes_SubSection + == PROWLER_THREATSCORE_AWS.Requirements[0].Attributes[0].SubSection + ) + assert ( + output_data.Requirements_Attributes_AttributeDescription + == PROWLER_THREATSCORE_AWS.Requirements[0] + .Attributes[0] + .AttributeDescription + ) + assert ( + output_data.Requirements_Attributes_AdditionalInformation + == PROWLER_THREATSCORE_AWS.Requirements[0] + .Attributes[0] + .AdditionalInformation + ) + assert ( + output_data.Requirements_Attributes_LevelOfRisk + == PROWLER_THREATSCORE_AWS.Requirements[0].Attributes[0].LevelOfRisk + ) + assert output_data.Status == "PASS" + assert output_data.StatusExtended == "" + assert output_data.ResourceId == "" + assert output_data.ResourceName == "" + assert output_data.CheckId == "test-check-id" + assert not output_data.Muted + # Test manual check + output_data_manual = output.data[1] + assert output_data_manual.Provider == "aws" + assert output_data_manual.AccountId == "" + assert output_data_manual.Region == "" + assert ( + output_data_manual.Requirements_Id + == PROWLER_THREATSCORE_AWS.Requirements[1].Id + ) + assert ( + output_data_manual.Requirements_Description + == PROWLER_THREATSCORE_AWS.Requirements[1].Description + ) + assert ( + output_data_manual.Requirements_Attributes_Title + == PROWLER_THREATSCORE_AWS.Requirements[1].Attributes[0].Title + ) + assert ( + output_data_manual.Requirements_Attributes_Section + == PROWLER_THREATSCORE_AWS.Requirements[1].Attributes[0].Section + ) + assert ( + output_data_manual.Requirements_Attributes_SubSection + == PROWLER_THREATSCORE_AWS.Requirements[1].Attributes[0].SubSection + ) + assert ( + output_data_manual.Requirements_Attributes_AttributeDescription + == PROWLER_THREATSCORE_AWS.Requirements[1] + .Attributes[0] + .AttributeDescription + ) + assert ( + output_data_manual.Requirements_Attributes_AdditionalInformation + == PROWLER_THREATSCORE_AWS.Requirements[1] + .Attributes[0] + .AdditionalInformation + ) + assert ( + output_data_manual.Requirements_Attributes_LevelOfRisk + == PROWLER_THREATSCORE_AWS.Requirements[1].Attributes[0].LevelOfRisk + ) + assert output_data_manual.Status == "MANUAL" + assert output_data_manual.StatusExtended == "Manual check" + assert output_data_manual.ResourceId == "manual_check" + assert output_data_manual.ResourceName == "Manual check" + assert output_data_manual.CheckId == "manual" + assert not output_data_manual.Muted + + @freeze_time(datetime.now()) + def test_batch_write_data_to_file(self): + mock_file = StringIO() + findings = [ + generate_finding_output(compliance={"ProwlerThreatScore-1.0": "1.1.1"}) + ] + output = ProwlerThreatScoreAWS( + findings, PROWLER_THREATSCORE_AWS, PROWLER_THREATSCORE_AWS_NAME + ) + output._file_descriptor = mock_file + + with patch.object(mock_file, "close", return_value=None): + output.batch_write_data_to_file() + + mock_file.seek(0) + content = mock_file.read() + expected_csv = f"PROVIDER;DESCRIPTION;ACCOUNTID;REGION;ASSESSMENTDATE;REQUIREMENTS_ID;REQUIREMENTS_DESCRIPTION;REQUIREMENTS_ATTRIBUTES_TITLE;REQUIREMENTS_ATTRIBUTES_SECTION;REQUIREMENTS_ATTRIBUTES_SUBSECTION;REQUIREMENTS_ATTRIBUTES_ATTRIBUTEDESCRIPTION;REQUIREMENTS_ATTRIBUTES_ADDITIONALINFORMATION;REQUIREMENTS_ATTRIBUTES_LEVELOFRISK;STATUS;STATUSEXTENDED;RESOURCEID;RESOURCENAME;CHECKID;MUTED\r\naws;Prowler ThreatScore Compliance Framework for AWS ensures that the AWS account is compliant taking into account four main pillars: Identity and Access Management, Attack Surface, Forensic Readiness and Encryption;123456789012;eu-west-1;{datetime.now()};1.1.1;Ensure MFA is enabled for the 'root' user account;MFA enabled for 'root';1. IAM;1.1 Authentication;The root user account holds the highest level of privileges within an AWS account. Enabling Multi-Factor Authentication (MFA) enhances security by adding an additional layer of protection beyond just a username and password. With MFA activated, users must provide their credentials (username and password) along with a unique authentication code generated by their AWS MFA device when signing into an AWS website.;Enabling MFA enhances console security by requiring the authenticating user to both possess a time-sensitive key-generating device and have knowledge of their credentials.;5;PASS;;;;test-check-id;False\r\naws;Prowler ThreatScore Compliance Framework for AWS ensures that the AWS account is compliant taking into account four main pillars: Identity and Access Management, Attack Surface, Forensic Readiness and Encryption;;;{datetime.now()};1.1.2;Ensure hardware MFA is enabled for the 'root' user account;CloudTrail logging enabled;1. IAM;1.1 Authentication;The root user account in AWS has the highest level of privileges. Multi-Factor Authentication (MFA) enhances security by adding an extra layer of protection beyond a username and password. When MFA is enabled, users must enter their credentials along with a unique authentication code generated by their AWS MFA device when signing into an AWS website.;A hardware MFA has a smaller attack surface compared to a virtual MFA. Unlike a virtual MFA, which relies on a mobile device that may be vulnerable to malware or compromise, a hardware MFA operates independently, reducing exposure to potential security threats.;3;MANUAL;Manual check;manual_check;Manual check;manual;False\r\n" + assert content == expected_csv diff --git a/tests/lib/outputs/compliance/prowler_threatscore/prowler_threatscore_azure_test.py b/tests/lib/outputs/compliance/prowler_threatscore/prowler_threatscore_azure_test.py new file mode 100644 index 0000000000..0dec129f06 --- /dev/null +++ b/tests/lib/outputs/compliance/prowler_threatscore/prowler_threatscore_azure_test.py @@ -0,0 +1,150 @@ +from datetime import datetime +from io import StringIO + +from freezegun import freeze_time +from mock import patch + +from prowler.lib.outputs.compliance.prowler_threatscore.models import ( + ProwlerThreatScoreAzureModel, +) +from prowler.lib.outputs.compliance.prowler_threatscore.prowler_threatscore_azure import ( + ProwlerThreatScoreAzure, +) +from tests.lib.outputs.compliance.fixtures import ( + PROWLER_THREATSCORE_AZURE, + PROWLER_THREATSCORE_AZURE_NAME, +) +from tests.lib.outputs.fixtures.fixtures import generate_finding_output +from tests.providers.azure.azure_fixtures import ( + AZURE_SUBSCRIPTION_ID, + AZURE_SUBSCRIPTION_NAME, +) + + +class TestProwlerThreatScoreAzure: + def test_output_transform(self): + findings = [ + generate_finding_output( + compliance={"ProwlerThreatScore-1.0": "1.1.1"}, + provider="azure", + account_name=AZURE_SUBSCRIPTION_NAME, + account_uid=AZURE_SUBSCRIPTION_ID, + region="", + ) + ] + + output = ProwlerThreatScoreAzure( + findings, PROWLER_THREATSCORE_AZURE, PROWLER_THREATSCORE_AZURE_NAME + ) + output_data = output.data[0] + assert isinstance(output_data, ProwlerThreatScoreAzureModel) + assert output_data.Provider == "azure" + assert output_data.Description == PROWLER_THREATSCORE_AZURE.Description + assert output_data.SubscriptionId == AZURE_SUBSCRIPTION_ID + assert output_data.Location == "" + assert ( + output_data.Requirements_Id == PROWLER_THREATSCORE_AZURE.Requirements[0].Id + ) + assert ( + output_data.Requirements_Description + == PROWLER_THREATSCORE_AZURE.Requirements[0].Description + ) + assert ( + output_data.Requirements_Attributes_Title + == PROWLER_THREATSCORE_AZURE.Requirements[0].Attributes[0].Title + ) + assert ( + output_data.Requirements_Attributes_Section + == PROWLER_THREATSCORE_AZURE.Requirements[0].Attributes[0].Section + ) + assert ( + output_data.Requirements_Attributes_SubSection + == PROWLER_THREATSCORE_AZURE.Requirements[0].Attributes[0].SubSection + ) + assert ( + output_data.Requirements_Attributes_AttributeDescription + == PROWLER_THREATSCORE_AZURE.Requirements[0] + .Attributes[0] + .AttributeDescription + ) + assert ( + output_data.Requirements_Attributes_AdditionalInformation + == PROWLER_THREATSCORE_AZURE.Requirements[0] + .Attributes[0] + .AdditionalInformation + ) + assert ( + output_data.Requirements_Attributes_LevelOfRisk + == PROWLER_THREATSCORE_AZURE.Requirements[0].Attributes[0].LevelOfRisk + ) + assert output_data.Status == "PASS" + assert output_data.StatusExtended == "" + assert output_data.ResourceId == "" + assert output_data.ResourceName == "" + assert output_data.CheckId == "test-check-id" + assert not output_data.Muted + # Test manual check + output_data_manual = output.data[1] + assert output_data_manual.Provider == "azure" + assert output_data_manual.SubscriptionId == "" + assert output_data_manual.Location == "" + assert ( + output_data_manual.Requirements_Id + == PROWLER_THREATSCORE_AZURE.Requirements[1].Id + ) + assert ( + output_data_manual.Requirements_Description + == PROWLER_THREATSCORE_AZURE.Requirements[1].Description + ) + assert ( + output_data_manual.Requirements_Attributes_Title + == PROWLER_THREATSCORE_AZURE.Requirements[1].Attributes[0].Title + ) + assert ( + output_data_manual.Requirements_Attributes_Section + == PROWLER_THREATSCORE_AZURE.Requirements[1].Attributes[0].Section + ) + assert ( + output_data_manual.Requirements_Attributes_SubSection + == PROWLER_THREATSCORE_AZURE.Requirements[1].Attributes[0].SubSection + ) + assert ( + output_data_manual.Requirements_Attributes_AttributeDescription + == PROWLER_THREATSCORE_AZURE.Requirements[1] + .Attributes[0] + .AttributeDescription + ) + assert ( + output_data_manual.Requirements_Attributes_AdditionalInformation + == PROWLER_THREATSCORE_AZURE.Requirements[1] + .Attributes[0] + .AdditionalInformation + ) + assert ( + output_data_manual.Requirements_Attributes_LevelOfRisk + == PROWLER_THREATSCORE_AZURE.Requirements[1].Attributes[0].LevelOfRisk + ) + assert output_data_manual.Status == "MANUAL" + assert output_data_manual.StatusExtended == "Manual check" + assert output_data_manual.ResourceId == "manual_check" + assert output_data_manual.ResourceName == "Manual check" + assert output_data_manual.CheckId == "manual" + + @freeze_time(datetime.now()) + def test_batch_write_data_to_file(self): + mock_file = StringIO() + findings = [ + generate_finding_output(compliance={"ProwlerThreatScore-1.0": "1.1.1"}) + ] + output = ProwlerThreatScoreAzure( + findings, PROWLER_THREATSCORE_AZURE, PROWLER_THREATSCORE_AZURE_NAME + ) + output._file_descriptor = mock_file + + with patch.object(mock_file, "close", return_value=None): + output.batch_write_data_to_file() + + mock_file.seek(0) + content = mock_file.read() + expected_csv = f"PROVIDER;DESCRIPTION;SUBSCRIPTIONID;LOCATION;ASSESSMENTDATE;REQUIREMENTS_ID;REQUIREMENTS_DESCRIPTION;REQUIREMENTS_ATTRIBUTES_TITLE;REQUIREMENTS_ATTRIBUTES_SECTION;REQUIREMENTS_ATTRIBUTES_SUBSECTION;REQUIREMENTS_ATTRIBUTES_ATTRIBUTEDESCRIPTION;REQUIREMENTS_ATTRIBUTES_ADDITIONALINFORMATION;REQUIREMENTS_ATTRIBUTES_LEVELOFRISK;STATUS;STATUSEXTENDED;RESOURCEID;RESOURCENAME;CHECKID;MUTED\r\naws;Prowler ThreatScore Compliance Framework for Azure ensures that the Azure account is compliant taking into account four main pillars: Identity and Access Management, Attack Surface, Forensic Readiness and Encryption;123456789012;eu-west-1;{datetime.now()};1.1.1;Ensure MFA is enabled for the 'root' user account;MFA enabled for 'root';1. IAM;1.1 Authentication;The root user account holds the highest level of privileges within an AWS account. Enabling Multi-Factor Authentication (MFA) enhances security by adding an additional layer of protection beyond just a username and password. With MFA activated, users must provide their credentials (username and password) along with a unique authentication code generated by their AWS MFA device when signing into an AWS website.;Enabling MFA enhances console security by requiring the authenticating user to both possess a time-sensitive key-generating device and have knowledge of their credentials.;5;PASS;;;;test-check-id;False\r\nazure;Prowler ThreatScore Compliance Framework for Azure ensures that the Azure account is compliant taking into account four main pillars: Identity and Access Management, Attack Surface, Forensic Readiness and Encryption;;;{datetime.now()};1.1.2;Ensure hardware MFA is enabled for the 'root' user account;CloudTrail logging enabled;1. IAM;1.1 Authentication;The root user account in AWS has the highest level of privileges. Multi-Factor Authentication (MFA) enhances security by adding an extra layer of protection beyond a username and password. When MFA is enabled, users must enter their credentials along with a unique authentication code generated by their AWS MFA device when signing into an AWS website.;A hardware MFA has a smaller attack surface compared to a virtual MFA. Unlike a virtual MFA, which relies on a mobile device that may be vulnerable to malware or compromise, a hardware MFA operates independently, reducing exposure to potential security threats.;3;MANUAL;Manual check;manual_check;Manual check;manual;False\r\n" + assert content == expected_csv diff --git a/tests/lib/outputs/compliance/prowler_threatscore/prowler_threatscore_gcp_test.py b/tests/lib/outputs/compliance/prowler_threatscore/prowler_threatscore_gcp_test.py new file mode 100644 index 0000000000..40a5e60494 --- /dev/null +++ b/tests/lib/outputs/compliance/prowler_threatscore/prowler_threatscore_gcp_test.py @@ -0,0 +1,147 @@ +from datetime import datetime +from io import StringIO + +from freezegun import freeze_time +from mock import patch + +from prowler.lib.outputs.compliance.prowler_threatscore.models import ( + ProwlerThreatScoreGCPModel, +) +from prowler.lib.outputs.compliance.prowler_threatscore.prowler_threatscore_gcp import ( + ProwlerThreatScoreGCP, +) +from tests.lib.outputs.compliance.fixtures import ( + PROWLER_THREATSCORE_GCP, + PROWLER_THREATSCORE_GCP_NAME, +) +from tests.lib.outputs.fixtures.fixtures import generate_finding_output +from tests.providers.gcp.gcp_fixtures import GCP_PROJECT_ID + + +class TestProwlerThreatScoreGCP: + def test_output_transform(self): + findings = [ + generate_finding_output( + compliance={"ProwlerThreatScore-1.0": "1.1.1"}, + provider="gcp", + account_name=GCP_PROJECT_ID, + account_uid=GCP_PROJECT_ID, + region="", + ) + ] + + output = ProwlerThreatScoreGCP( + findings, PROWLER_THREATSCORE_GCP, PROWLER_THREATSCORE_GCP_NAME + ) + output_data = output.data[0] + assert isinstance(output_data, ProwlerThreatScoreGCPModel) + assert output_data.Provider == "gcp" + assert output_data.Description == PROWLER_THREATSCORE_GCP.Description + assert output_data.ProjectId == GCP_PROJECT_ID + assert output_data.Location == "" + assert output_data.Requirements_Id == PROWLER_THREATSCORE_GCP.Requirements[0].Id + assert ( + output_data.Requirements_Description + == PROWLER_THREATSCORE_GCP.Requirements[0].Description + ) + assert ( + output_data.Requirements_Attributes_Title + == PROWLER_THREATSCORE_GCP.Requirements[0].Attributes[0].Title + ) + assert ( + output_data.Requirements_Attributes_Section + == PROWLER_THREATSCORE_GCP.Requirements[0].Attributes[0].Section + ) + assert ( + output_data.Requirements_Attributes_SubSection + == PROWLER_THREATSCORE_GCP.Requirements[0].Attributes[0].SubSection + ) + assert ( + output_data.Requirements_Attributes_AttributeDescription + == PROWLER_THREATSCORE_GCP.Requirements[0] + .Attributes[0] + .AttributeDescription + ) + assert ( + output_data.Requirements_Attributes_AdditionalInformation + == PROWLER_THREATSCORE_GCP.Requirements[0] + .Attributes[0] + .AdditionalInformation + ) + assert ( + output_data.Requirements_Attributes_LevelOfRisk + == PROWLER_THREATSCORE_GCP.Requirements[0].Attributes[0].LevelOfRisk + ) + assert output_data.Status == "PASS" + assert output_data.StatusExtended == "" + assert output_data.ResourceId == "" + assert output_data.ResourceName == "" + assert output_data.CheckId == "test-check-id" + assert not output_data.Muted + # Test manual check + output_data_manual = output.data[1] + assert output_data_manual.Provider == "gcp" + assert output_data_manual.ProjectId == "" + assert output_data_manual.Location == "" + assert ( + output_data_manual.Requirements_Id + == PROWLER_THREATSCORE_GCP.Requirements[1].Id + ) + assert ( + output_data_manual.Requirements_Description + == PROWLER_THREATSCORE_GCP.Requirements[1].Description + ) + assert ( + output_data_manual.Requirements_Attributes_Title + == PROWLER_THREATSCORE_GCP.Requirements[1].Attributes[0].Title + ) + assert ( + output_data_manual.Requirements_Attributes_Section + == PROWLER_THREATSCORE_GCP.Requirements[1].Attributes[0].Section + ) + assert ( + output_data_manual.Requirements_Attributes_SubSection + == PROWLER_THREATSCORE_GCP.Requirements[1].Attributes[0].SubSection + ) + assert ( + output_data_manual.Requirements_Attributes_AttributeDescription + == PROWLER_THREATSCORE_GCP.Requirements[1] + .Attributes[0] + .AttributeDescription + ) + assert ( + output_data_manual.Requirements_Attributes_AdditionalInformation + == PROWLER_THREATSCORE_GCP.Requirements[1] + .Attributes[0] + .AdditionalInformation + ) + assert ( + output_data_manual.Requirements_Attributes_LevelOfRisk + == PROWLER_THREATSCORE_GCP.Requirements[1].Attributes[0].LevelOfRisk + ) + assert output_data_manual.Status == "MANUAL" + assert output_data_manual.StatusExtended == "Manual check" + assert output_data_manual.ResourceId == "manual_check" + assert output_data_manual.ResourceName == "Manual check" + assert output_data_manual.CheckId == "manual" + assert not output_data_manual.Muted + + @freeze_time(datetime.now()) + def test_batch_write_data_to_file(self): + mock_file = StringIO() + findings = [ + generate_finding_output(compliance={"ProwlerThreatScore-1.0": "1.1.1"}) + ] + output = ProwlerThreatScoreGCP( + findings, PROWLER_THREATSCORE_GCP, PROWLER_THREATSCORE_GCP_NAME + ) + output._file_descriptor = mock_file + + with patch.object(mock_file, "close", return_value=None): + output.batch_write_data_to_file() + + mock_file.seek(0) + content = mock_file.read() + expected_csv = f"PROVIDER;DESCRIPTION;PROJECTID;LOCATION;ASSESSMENTDATE;REQUIREMENTS_ID;REQUIREMENTS_DESCRIPTION;REQUIREMENTS_ATTRIBUTES_TITLE;REQUIREMENTS_ATTRIBUTES_SECTION;REQUIREMENTS_ATTRIBUTES_SUBSECTION;REQUIREMENTS_ATTRIBUTES_ATTRIBUTEDESCRIPTION;REQUIREMENTS_ATTRIBUTES_ADDITIONALINFORMATION;REQUIREMENTS_ATTRIBUTES_LEVELOFRISK;STATUS;STATUSEXTENDED;RESOURCEID;RESOURCENAME;CHECKID;MUTED\r\naws;Prowler ThreatScore Compliance Framework for GCP ensures that the GCP account is compliant taking into account four main pillars: Identity and Access Management, Attack Surface, Forensic Readiness and Encryption;123456789012;eu-west-1;{datetime.now()};1.1.1;Ensure MFA is enabled for the 'root' user account;MFA enabled for 'root';1. IAM;1.1 Authentication;The root user account holds the highest level of privileges within an AWS account. Enabling Multi-Factor Authentication (MFA) enhances security by adding an additional layer of protection beyond just a username and password. With MFA activated, users must provide their credentials (username and password) along with a unique authentication code generated by their AWS MFA device when signing into an AWS website.;Enabling MFA enhances console security by requiring the authenticating user to both possess a time-sensitive key-generating device and have knowledge of their credentials.;5;PASS;;;;test-check-id;False\r\ngcp;Prowler ThreatScore Compliance Framework for GCP ensures that the GCP account is compliant taking into account four main pillars: Identity and Access Management, Attack Surface, Forensic Readiness and Encryption;;;{datetime.now()};1.1.2;Ensure hardware MFA is enabled for the 'root' user account;CloudTrail logging enabled;1. IAM;1.1 Authentication;The root user account in AWS has the highest level of privileges. Multi-Factor Authentication (MFA) enhances security by adding an extra layer of protection beyond a username and password. When MFA is enabled, users must enter their credentials along with a unique authentication code generated by their AWS MFA device when signing into an AWS website.;A hardware MFA has a smaller attack surface compared to a virtual MFA. Unlike a virtual MFA, which relies on a mobile device that may be vulnerable to malware or compromise, a hardware MFA operates independently, reducing exposure to potential security threats.;3;MANUAL;Manual check;manual_check;Manual check;manual;False\r\n" + + assert content == expected_csv diff --git a/tests/lib/outputs/finding_test.py b/tests/lib/outputs/finding_test.py index 1b9496cbe9..3dea2f614b 100644 --- a/tests/lib/outputs/finding_test.py +++ b/tests/lib/outputs/finding_test.py @@ -53,7 +53,12 @@ def mock_check_metadata(provider): def mock_get_check_compliance(*_): - return {"mock_compliance_key": "mock_compliance_value"} + return { + "CIS-2.0": ["1.12"], + "CIS-3.0": ["1.12"], + "ENS-RD2022": ["op.acc.2.gcp.rbak.1"], + "MITRE-ATTACK": ["T1098"], + } class DummyTag: @@ -71,12 +76,25 @@ class DummyTags: class DummyResource: - def __init__(self, uid, name, resource_arn, region, tags): + def __init__( + self, + uid, + name, + resource_arn, + region, + tags, + details=None, + metadata=None, + partition=None, + ): self.uid = uid self.name = name self.resource_arn = resource_arn self.region = region self.tags = DummyTags(tags) + self.details = details or "" + self.metadata = metadata or "{}" + self.partition = partition def __iter__(self): yield "uid", self.uid @@ -112,14 +130,8 @@ class DummyAPIFinding: Attributes will be added dynamically. """ - pass - class TestFinding: - @patch( - "prowler.lib.outputs.finding.get_check_compliance", - new=mock_get_check_compliance, - ) def test_generate_output_aws(self): # Mock provider provider = MagicMock() @@ -145,7 +157,13 @@ class TestFinding: check_output.status_extended = "mock_status_extended" check_output.muted = False check_output.check_metadata = mock_check_metadata(provider="aws") - check_output.resource = {} + check_output.resource = {"metadata": "mock_metadata"} + check_output.compliance = { + "CIS-2.0": ["1.12"], + "CIS-3.0": ["1.12"], + "ENS-RD2022": ["op.acc.2.gcp.rbak.1"], + "MITRE-ATTACK": ["T1098"], + } # Mock output options output_options = MagicMock() @@ -160,9 +178,14 @@ class TestFinding: assert finding_output.resource_name == "test_resource_id" assert finding_output.resource_uid == "test_resource_arn" assert finding_output.resource_details == "test_resource_details" + assert finding_output.resource_metadata == {"metadata": "mock_metadata"} + assert finding_output.partition == "aws" assert finding_output.region == "us-west-1" assert finding_output.compliance == { - "mock_compliance_key": "mock_compliance_value" + "CIS-2.0": ["1.12"], + "CIS-3.0": ["1.12"], + "ENS-RD2022": ["op.acc.2.gcp.rbak.1"], + "MITRE-ATTACK": ["T1098"], } assert finding_output.status == Status.PASS assert finding_output.status_extended == "mock_status_extended" @@ -211,10 +234,6 @@ class TestFinding: assert finding_output.service_name == "mock_service_name" assert finding_output.raw == {} - @patch( - "prowler.lib.outputs.finding.get_check_compliance", - new=mock_get_check_compliance, - ) def test_generate_output_azure(self): # Mock provider provider = MagicMock() @@ -243,6 +262,12 @@ class TestFinding: check_output.muted = False check_output.check_metadata = mock_check_metadata(provider="azure") check_output.resource = {} + check_output.compliance = { + "CIS-2.0": ["1.12"], + "CIS-3.0": ["1.12"], + "ENS-RD2022": ["op.acc.2.gcp.rbak.1"], + "MITRE-ATTACK": ["T1098"], + } # Mock output options output_options = MagicMock() @@ -262,7 +287,10 @@ class TestFinding: assert finding_output.resource_uid == "test_resource_id" assert finding_output.region == "us-west-1" assert finding_output.compliance == { - "mock_compliance_key": "mock_compliance_value" + "CIS-2.0": ["1.12"], + "CIS-3.0": ["1.12"], + "ENS-RD2022": ["op.acc.2.gcp.rbak.1"], + "MITRE-ATTACK": ["T1098"], } assert finding_output.status == Status.PASS assert finding_output.status_extended == "mock_status_extended" @@ -298,10 +326,6 @@ class TestFinding: assert finding_output.metadata.Notes == "mock_notes" assert finding_output.metadata.Compliance == [] - @patch( - "prowler.lib.outputs.finding.get_check_compliance", - new=mock_get_check_compliance, - ) def test_generate_output_gcp(self): # Mock provider provider = MagicMock() @@ -332,6 +356,12 @@ class TestFinding: check_output.muted = False check_output.check_metadata = mock_check_metadata(provider="gcp") check_output.resource = {} + check_output.compliance = { + "CIS-2.0": ["1.12"], + "CIS-3.0": ["1.12"], + "ENS-RD2022": ["op.acc.2.gcp.rbak.1"], + "MITRE-ATTACK": ["T1098"], + } # Mock output options output_options = MagicMock() @@ -347,7 +377,10 @@ class TestFinding: assert finding_output.resource_uid == "test_resource_id" assert finding_output.region == "us-west-1" assert finding_output.compliance == { - "mock_compliance_key": "mock_compliance_value" + "CIS-2.0": ["1.12"], + "CIS-3.0": ["1.12"], + "ENS-RD2022": ["op.acc.2.gcp.rbak.1"], + "MITRE-ATTACK": ["T1098"], } assert finding_output.status == Status.PASS assert finding_output.status_extended == "mock_status_extended" @@ -388,10 +421,6 @@ class TestFinding: assert finding_output.metadata.Notes == "mock_notes" assert finding_output.metadata.Compliance == [] - @patch( - "prowler.lib.outputs.finding.get_check_compliance", - new=mock_get_check_compliance, - ) def test_generate_output_kubernetes(self): # Mock provider provider = MagicMock() @@ -411,6 +440,12 @@ class TestFinding: check_output.check_metadata = mock_check_metadata(provider="kubernetes") check_output.timestamp = datetime.now() check_output.resource = {} + check_output.compliance = { + "CIS-2.0": ["1.12"], + "CIS-3.0": ["1.12"], + "ENS-RD2022": ["op.acc.2.gcp.rbak.1"], + "MITRE-ATTACK": ["T1098"], + } # Mock Output Options output_options = MagicMock() @@ -427,7 +462,10 @@ class TestFinding: assert finding_output.region == "namespace: test_namespace" assert finding_output.account_name == "context: In-Cluster" assert finding_output.compliance == { - "mock_compliance_key": "mock_compliance_value" + "CIS-2.0": ["1.12"], + "CIS-3.0": ["1.12"], + "ENS-RD2022": ["op.acc.2.gcp.rbak.1"], + "MITRE-ATTACK": ["T1098"], } assert finding_output.status == Status.PASS assert finding_output.status_extended == "mock_status_extended" @@ -586,6 +624,7 @@ class TestFinding: dummy_finding.status_extended = "extended" dummy_finding.check_metadata = check_metadata dummy_finding.resources = resources + dummy_finding.muted = True # Call the transform_api_finding classmethod finding_obj = Finding.transform_api_finding(dummy_finding, provider) @@ -627,7 +666,10 @@ class TestFinding: assert finding_obj.resource_tags == {"env": "prod"} assert finding_obj.region == "us-east-1" assert finding_obj.compliance == { - "mock_compliance_key": "mock_compliance_value" + "CIS-2.0": ["1.12"], + "CIS-3.0": ["1.12"], + "ENS-RD2022": ["op.acc.2.gcp.rbak.1"], + "MITRE-ATTACK": ["T1098"], } @patch( @@ -709,6 +751,7 @@ class TestFinding: ) api_finding.resources = DummyResources(api_resource) api_finding.subscription = "default" + api_finding.muted = False finding_obj = Finding.transform_api_finding(api_finding, provider) assert finding_obj.account_organization_uid == "test-ing-432a-a828-d9c965196f87" @@ -718,7 +761,10 @@ class TestFinding: assert finding_obj.region == api_resource.region assert finding_obj.resource_tags == {} assert finding_obj.compliance == { - "mock_compliance_key": "mock_compliance_value" + "CIS-2.0": ["1.12"], + "CIS-3.0": ["1.12"], + "ENS-RD2022": ["op.acc.2.gcp.rbak.1"], + "MITRE-ATTACK": ["T1098"], } assert finding_obj.status == Status("FAIL") @@ -807,6 +853,7 @@ class TestFinding: dummy_finding.check_metadata = check_metadata dummy_finding.raw_result = {} dummy_finding.project_id = "project1" + dummy_finding.muted = True resource = DummyResource( uid="gcp-resource-uid", @@ -831,7 +878,10 @@ class TestFinding: == dummy_project.organization.display_name ) assert finding_obj.compliance == { - "mock_compliance_key": "mock_compliance_value" + "CIS-2.0": ["1.12"], + "CIS-3.0": ["1.12"], + "ENS-RD2022": ["op.acc.2.gcp.rbak.1"], + "MITRE-ATTACK": ["T1098"], } assert finding_obj.status == Status("PASS") assert finding_obj.status_extended == "GCP check extended" @@ -893,6 +943,7 @@ class TestFinding: ) resource.region = "namespace: default" api_finding.resources = DummyResources(resource) + api_finding.muted = True finding_obj = Finding.transform_api_finding(api_finding, provider) assert finding_obj.auth_method == "in-cluster" assert finding_obj.resource_name == "k8s-resource-name" @@ -905,9 +956,9 @@ class TestFinding: "prowler.lib.outputs.finding.get_check_compliance", new=mock_get_check_compliance, ) - def test_transform_api_finding_microsoft365(self): + def test_transform_api_finding_m365(self): provider = MagicMock() - provider.type = "microsoft365" + provider.type = "m365" provider.identity.identity_type = "ms_identity_type" provider.identity.identity_id = "ms_identity_id" provider.identity.tenant_id = "ms-tenant-id" @@ -919,7 +970,7 @@ class TestFinding: dummy_finding.status = "PASS" dummy_finding.status_extended = "M365 check extended" check_metadata = { - "provider": "microsoft365", + "provider": "m365", "checkid": "m365-check-001", "checktitle": "Test M365 Check", "checktype": [], @@ -958,6 +1009,7 @@ class TestFinding: tags=[], ) dummy_finding.resources = DummyResources(resource) + dummy_finding.muted = True finding_obj = Finding.transform_api_finding(dummy_finding, provider) assert finding_obj.auth_method == "ms_identity_type: ms_identity_id" assert finding_obj.account_uid == "ms-tenant-id" diff --git a/tests/lib/outputs/html/html_test.py b/tests/lib/outputs/html/html_test.py index c9fe3ddba9..9ee634dc0f 100644 --- a/tests/lib/outputs/html/html_test.py +++ b/tests/lib/outputs/html/html_test.py @@ -12,6 +12,7 @@ from tests.providers.gcp.gcp_fixtures import GCP_PROJECT_ID, set_mocked_gcp_prov from tests.providers.kubernetes.kubernetes_fixtures import ( set_mocked_kubernetes_provider, ) +from tests.providers.m365.m365_fixtures import set_mocked_m365_provider html_stats = { "total_pass": 25, @@ -222,6 +223,38 @@ kubernetes_html_assessment_summary = """
""" +m365_html_assessment_summary = """ +
+
+
+ M365 Assessment Summary +
+
    +
  • + M365 Tenant Domain: user.onmicrosoft.com +
  • +
+
+
+
+
+
+ M365 Credentials +
+
    +
  • + M365 Identity Type: Application +
  • +
  • + M365 Identity ID: 00000000-0000-0000-0000-000000000000 +
  • +
  • + M365 User: user@email.com +
  • +
+
+
""" + def get_aws_html_header(args: list) -> str: """ @@ -233,8 +266,7 @@ def get_aws_html_header(args: list) -> str: Returns: str: HTML header for AWS """ - aws_html_header = f""" - + aws_html_header = f""" @@ -555,3 +587,13 @@ class TestHTML: summary = output.get_assessment_summary(provider) assert summary == kubernetes_html_assessment_summary + + def test_m365_get_assessment_summary(self): + findings = [generate_finding_output()] + output = HTML(findings) + provider = set_mocked_m365_provider() + + summary = output.get_assessment_summary(provider) + + expected_summary = m365_html_assessment_summary + assert summary == expected_summary diff --git a/tests/lib/outputs/jira/jira_test.py b/tests/lib/outputs/jira/jira_test.py index 238f433894..e4cc7fbc0b 100644 --- a/tests/lib/outputs/jira/jira_test.py +++ b/tests/lib/outputs/jira/jira_test.py @@ -1,3 +1,4 @@ +import base64 from datetime import datetime, timedelta from unittest.mock import MagicMock, PropertyMock, patch from urllib.parse import parse_qs, urlparse @@ -7,6 +8,7 @@ from freezegun import freeze_time from prowler.lib.outputs.jira.exceptions.exceptions import ( JiraAuthenticationError, + JiraBasicAuthError, JiraCreateIssueError, JiraGetAvailableIssueTypesError, JiraGetCloudIDError, @@ -39,6 +41,22 @@ class TestJiraIntegration: client_secret=self.client_secret, ) + @pytest.fixture(autouse=True) + @patch.object(Jira, "get_basic_auth", return_value=None) + def setup_basic_auth(self, mock_get_basic_auth): + # To disable vulture + mock_get_basic_auth = mock_get_basic_auth + + self.user_mail = "test_user_mail" + self.api_token = "test_api_token" + self.domain = "test_domain" + + self.jira_integration_basic_auth = Jira( + user_mail=self.user_mail, + api_token=self.api_token, + domain=self.domain, + ) + @patch.object(Jira, "get_auth", return_value=None) def test_auth_code_url(self, mock_get_auth): """Test to verify the authorization URL generation with correct query parameters""" @@ -68,6 +86,31 @@ class TestJiraIntegration: assert query_params["response_type"][0] == "code" assert query_params["prompt"][0] == "consent" + @patch.object(Jira, "get_cloud_id", return_value="test_cloud_id") + def test_get_auth_successful_basic_auth(self, mock_get_cloud_id): + """Test successful token retrieval in get_basic_auth.""" + # To disable vulture + mock_get_cloud_id = mock_get_cloud_id + + self.jira_integration_basic_auth.get_basic_auth() + + user_string = "test_user_mail:test_api_token" + user_string_base64 = base64.b64encode(user_string.encode("utf-8")).decode( + "utf-8" + ) + + assert self.jira_integration_basic_auth._access_token == user_string_base64 + assert self.jira_integration_basic_auth._cloud_id == "test_cloud_id" + + @patch.object(Jira, "get_cloud_id", side_effect=Exception("Connection error")) + def test_get_auth_error_basic_auth(self, mock_get_cloud_id): + """Test successful token retrieval in get_basic_auth.""" + # To disable vulture + mock_get_cloud_id = mock_get_cloud_id + + with pytest.raises(JiraBasicAuthError): + self.jira_integration_basic_auth.get_basic_auth() + @freeze_time(TEST_DATETIME) @patch("prowler.lib.outputs.jira.jira.requests.post") @patch.object(Jira, "get_cloud_id", return_value="test_cloud_id") @@ -276,6 +319,33 @@ class TestJiraIntegration: assert connection.is_connected assert connection.error is None + @patch.object(Jira, "get_access_token", return_value="valid_access_token") + @patch.object(Jira, "get_cloud_id", return_value="test_cloud_id") + @patch.object(Jira, "get_basic_auth", return_value=None) + @patch("prowler.lib.outputs.jira.jira.requests.get") + def test_test_connection_successful_basic_auth( + self, mock_get, mock_get_cloud_id, mock_get_auth, mock_get_access_token + ): + """Test that a successful connection returns an active Connection object.""" + # To disable vulture + mock_get_cloud_id = mock_get_cloud_id + mock_get_auth = mock_get_auth + mock_get_access_token = mock_get_access_token + + mock_response = MagicMock() + mock_response.status_code = 200 + mock_response.json.return_value = {"id": "test_user_id"} + mock_get.return_value = mock_response + + connection = self.jira_integration_basic_auth.test_connection( + user_mail=self.user_mail, + api_token=self.api_token, + domain=self.domain, + ) + + assert connection.is_connected + assert connection.error is None + @patch.object( Jira, "get_access_token", @@ -293,6 +363,23 @@ class TestJiraIntegration: client_secret=self.client_secret, ) + @patch.object( + Jira, + "get_cloud_id", + side_effect=JiraBasicAuthError("Failed to authenticate with Jira"), + ) + def test_test_connection_failed_basic_auth(self, mock_get_access_token): + """Test that a failed connection raises JiraAuthenticationError.""" + # To disable vulture + mock_get_access_token = mock_get_access_token + + with pytest.raises(JiraBasicAuthError): + self.jira_integration_basic_auth.test_connection( + user_mail=self.user_mail, + api_token=self.api_token, + domain=self.domain, + ) + @patch.object(Jira, "get_access_token", return_value="valid_access_token") @patch.object( Jira, "cloud_id", new_callable=PropertyMock, return_value="test_cloud_id" diff --git a/tests/lib/outputs/ocsf/ocsf_test.py b/tests/lib/outputs/ocsf/ocsf_test.py index 4f761ff274..9f8d493069 100644 --- a/tests/lib/outputs/ocsf/ocsf_test.py +++ b/tests/lib/outputs/ocsf/ocsf_test.py @@ -328,7 +328,10 @@ class TestOCSF: assert isinstance(resource_details[0], ResourceDetails) assert resource_details[0].labels == ["Name:test", "Environment:dev"] assert resource_details[0].name == finding_output.resource_name - assert resource_details[0].uid == finding_output.resource_uid + assert resource_details[0].data == { + "details": finding_output.resource_details, + "metadata": {}, # TODO: add metadata to the resource details + } assert resource_details[0].type == finding_output.metadata.ResourceType assert resource_details[0].cloud_partition == finding_output.partition assert resource_details[0].region == finding_output.region diff --git a/tests/lib/powershell/powershell_test.py b/tests/lib/powershell/powershell_test.py new file mode 100644 index 0000000000..49108e1cd2 --- /dev/null +++ b/tests/lib/powershell/powershell_test.py @@ -0,0 +1,247 @@ +from unittest.mock import MagicMock, patch + +from prowler.providers.m365.lib.powershell.m365_powershell import PowerShellSession + + +class TestPowerShellSession: + @patch("subprocess.Popen") + def test_init(self, mock_popen): + mock_process = MagicMock() + mock_popen.return_value = mock_process + session = PowerShellSession() + + mock_popen.assert_called_once() + assert session.process == mock_process + assert session.END == "" + session.close() + + @patch("subprocess.Popen") + def test_sanitize(self, _): + session = PowerShellSession() + + test_cases = [ + ("test@example.com", "test@example.com"), + ("test@example.com!", "test@example.com"), + ("test@example.com#", "test@example.com"), + ("test@example.com$", "test@example.com"), + ("test@example.com%", "test@example.com"), + ("test@example.com^", "test@example.com"), + ("test@example.com&", "test@example.com"), + ("test@example.com*", "test@example.com"), + ("test@example.com(", "test@example.com"), + ("test@example.com)", "test@example.com"), + ("test@example.com-", "test@example.com-"), + ("test@example.com_", "test@example.com_"), + ("test@example.com+", "test@example.com+"), + ("test_;echo pwned;password", "test_echopwnedpassword"), + ] + + for input_str, expected in test_cases: + assert session.sanitize(input_str) == expected + session.close() + + @patch("subprocess.Popen") + def test_remove_ansi(self, mock_popen): + session = PowerShellSession() + + test_cases = [ + ("\x1b[32mSuccess\x1b[0m", "Success"), + ("\x1b[31mError\x1b[0m", "Error"), + ("\x1b[33mWarning\x1b[0m", "Warning"), + ("Normal text", "Normal text"), + ("\x1b[1mBold\x1b[0m", "Bold"), + ] + + for input_str, expected in test_cases: + assert session.remove_ansi(input_str) == expected + session.close() + + @patch("subprocess.Popen") + def test_execute(self, mock_popen): + """Test the execute method with various scenarios: + - Normal command execution + - JSON parsing enabled + - Timeout handling + - Error handling + """ + # Setup + mock_process = MagicMock() + mock_popen.return_value = mock_process + session = PowerShellSession() + + # Test 1: Normal command execution + mock_process.stdout.readline.side_effect = ["Hello World\n", f"{session.END}\n"] + mock_process.stderr.readline.return_value = f"Write-Error: {session.END}\n" + with patch.object(session, "remove_ansi", side_effect=lambda x: x): + result = session.execute("Get-Command") + assert result == "Hello World" + mock_process.stdin.write.assert_any_call("Get-Command\n") + mock_process.stdin.write.assert_any_call(f"Write-Output '{session.END}'\n") + mock_process.stdin.write.assert_any_call(f"Write-Error '{session.END}'\n") + + # Test 2: JSON parsing enabled + mock_process.stdout.readline.side_effect = [ + '{"key": "value"}\n', + f"{session.END}\n", + ] + mock_process.stderr.readline.return_value = f"Write-Error: {session.END}\n" + with patch.object(session, "remove_ansi", side_effect=lambda x: x): + with patch.object( + session, "json_parse_output", return_value={"key": "value"} + ) as mock_json_parse: + result = session.execute("Get-Command", json_parse=True) + assert result == {"key": "value"} + mock_json_parse.assert_called_once_with('{"key": "value"}') + + # Test 3: Timeout handling + mock_process.stdout.readline.side_effect = ["test output\n"] # No END marker + mock_process.stderr.readline.return_value = f"Write-Error: {session.END}\n" + result = session.execute("Get-Command", timeout=0.1) + assert result == "" + + # Test 4: Error handling + mock_process.stdout.readline.side_effect = ["\n", f"{session.END}\n"] + mock_process.stderr.readline.side_effect = [ + "Write-Error: This is an error\n", + f"Write-Error: {session.END}\n", + ] + with patch.object(session, "remove_ansi", side_effect=lambda x: x): + with patch("prowler.lib.logger.logger.error") as mock_error: + result = session.execute("Get-Command") + assert result == "" + mock_error.assert_called_once_with( + "PowerShell error output: Write-Error: This is an error" + ) + + session.close() + + @patch("subprocess.Popen") + def test_read_output(self, mock_popen): + """Test the read_output method with various scenarios: + - Normal stdout output + - Error in stderr + - Timeout in stdout + - Empty output + """ + # Setup + mock_process = MagicMock() + mock_popen.return_value = mock_process + session = PowerShellSession() + + # Test 1: Normal stdout output + mock_process.stdout.readline.side_effect = ["Hello World\n", f"{session.END}\n"] + mock_process.stderr.readline.return_value = f"Write-Error: {session.END}\n" + with patch.object(session, "remove_ansi", side_effect=lambda x: x): + result = session.read_output() + assert result == "Hello World" + + # Test 2: Error in stderr + mock_process.stdout.readline.side_effect = ["\n", f"{session.END}\n"] + mock_process.stderr.readline.side_effect = [ + "Write-Error: This is an error\n", + f"Write-Error: {session.END}\n", + ] + with patch.object(session, "remove_ansi", side_effect=lambda x: x): + with patch("prowler.lib.logger.logger.error") as mock_error: + result = session.read_output() + assert result == "" + mock_error.assert_called_once_with( + "PowerShell error output: Write-Error: This is an error" + ) + + # Test 3: Timeout in stdout + mock_process.stdout.readline.side_effect = ["test output\n"] # No END marker + mock_process.stderr.readline.return_value = f"Write-Error: {session.END}\n" + result = session.read_output(timeout=0.1, default="timeout") + assert result == "timeout" + + # Test 4: Empty output + mock_process.stdout.readline.side_effect = [f"{session.END}\n"] + mock_process.stderr.readline.return_value = f"Write-Error: {session.END}\n" + result = session.read_output() + assert result == "" + + session.close() + + @patch("subprocess.Popen") + def test_json_parse_output(self, mock_popen): + mock_process = MagicMock() + mock_popen.return_value = mock_process + session = PowerShellSession() + + test_cases = [ + ('{"key": "value"}', {"key": "value"}), + ('[{"key": "value"}]', [{"key": "value"}]), + ( + '[{"key": "value"},{"key": "value"}]', + [{"key": "value"}, {"key": "value"}], + ), + ("[{}]", [{}]), + ("[{},{}]", [{}, {}]), + ("not json", {}), + ("", {}), + ] + + for input_str, expected in test_cases: + result = session.json_parse_output(input_str) + assert result == expected + session.close() + + @patch("subprocess.Popen") + def test_json_parse_output_logging(self, mock_popen): + mock_process = MagicMock() + mock_popen.return_value = mock_process + session = PowerShellSession() + + # Test warning for non-JSON output + with patch("prowler.lib.logger.logger.error") as mock_error: + result = session.json_parse_output("some text without json") + assert result == {} + mock_error.assert_called_once_with( + "Unexpected PowerShell output: some text without json\n" + ) + + session.close() + + @patch("subprocess.Popen") + def test_json_parse_output_with_text_around_json(self, mock_popen): + mock_process = MagicMock() + mock_popen.return_value = mock_process + session = PowerShellSession() + + # Test JSON extraction from text with surrounding content + result = session.json_parse_output('some text {"key": "value"} more text') + assert result == {"key": "value"} + + result = session.json_parse_output('prefix [{"key": "value"}] suffix') + assert result == [{"key": "value"}] + + # Test non-JSON text returns empty dict + result = session.json_parse_output("just some text") + assert result == {} + + session.close() + + @patch("subprocess.Popen") + def test_json_parse_output_empty(self, mock_popen): + mock_process = MagicMock() + mock_popen.return_value = mock_process + session = PowerShellSession() + + # Test empty string + result = session.json_parse_output("") + assert result == {} + + session.close() + + @patch("subprocess.Popen") + def test_close(self, mock_popen): + mock_process = MagicMock() + mock_popen.return_value = mock_process + session = PowerShellSession() + + session.close() + + mock_process.stdin.flush.assert_called_once() + mock_process.terminate.assert_called_once() + mock_process = None diff --git a/tests/providers/aws/lib/mutelist/aws_mutelist_test.py b/tests/providers/aws/lib/mutelist/aws_mutelist_test.py index 9df192a016..51e6890852 100644 --- a/tests/providers/aws/lib/mutelist/aws_mutelist_test.py +++ b/tests/providers/aws/lib/mutelist/aws_mutelist_test.py @@ -848,7 +848,6 @@ class TestAWSMutelist: def test_is_muted_aws_default_mutelist( self, ): - mutelist = AWSMutelist( mutelist_path=f"{path.dirname(path.realpath(__file__))}/../../../../../prowler/config/aws_mutelist.yaml" ) @@ -1877,3 +1876,57 @@ class TestAWSMutelist: assert muted_finding.status == "MUTED" assert muted_finding.muted assert muted_finding.raw["status"] == "FAIL" + + def test_is_muted_with_wildcard_check(self): + mutelist_content = { + "Accounts": { + "*": { + "Checks": { + "cloudtrail_*": { + "Regions": ["*"], + "Resources": ["*"], + } + } + } + } + } + mutelist = AWSMutelist(mutelist_content=mutelist_content) + + assert not mutelist.is_muted( + AWS_ACCOUNT_NUMBER, + "iam_inline_policy_no_full_access_to_cloudtrail", + AWS_REGION_US_EAST_1, + "prowler", + "", + ) + + assert mutelist.is_muted( + AWS_ACCOUNT_NUMBER, + "cloudtrail_insights_exist", + AWS_REGION_US_EAST_1, + "prowler", + "", + ) + + def test_is_muted_with_wildcard_in_middle_of_check(self): + mutelist_content = { + "Accounts": { + "*": { + "Checks": { + "guardduty_*_enabled": { + "Regions": ["*"], + "Resources": ["*"], + } + } + } + } + } + mutelist = AWSMutelist(mutelist_content=mutelist_content) + + assert mutelist.is_muted( + AWS_ACCOUNT_NUMBER, + "guardduty_is_enabled", + AWS_REGION_US_EAST_1, + "prowler", + "", + ) diff --git a/tests/providers/aws/lib/s3/s3_test.py b/tests/providers/aws/lib/s3/s3_test.py index 2cede7364d..e32b7ad1ec 100644 --- a/tests/providers/aws/lib/s3/s3_test.py +++ b/tests/providers/aws/lib/s3/s3_test.py @@ -93,7 +93,7 @@ class TestS3: Bucket=S3_BUCKET_NAME, Key=uploaded_object_name, )["ContentType"] - == "binary/octet-stream" + == "text/csv" ) @mock_aws @@ -132,7 +132,7 @@ class TestS3: Bucket=S3_BUCKET_NAME, Key=uploaded_object_name, )["ContentType"] - == "binary/octet-stream" + == "text/csv" ) remove(f"{CURRENT_DIRECTORY}/{csv_file}") @@ -171,7 +171,7 @@ class TestS3: Bucket=S3_BUCKET_NAME, Key=uploaded_object_name, )["ContentType"] - == "binary/octet-stream" + == "application/json" ) @mock_aws @@ -209,7 +209,7 @@ class TestS3: Bucket=S3_BUCKET_NAME, Key=uploaded_object_name, )["ContentType"] - == "binary/octet-stream" + == "text/html" ) @mock_aws @@ -290,7 +290,7 @@ class TestS3: Bucket=S3_BUCKET_NAME, Key=uploaded_object_name, )["ContentType"] - == "binary/octet-stream" + == "text/csv" ) def test_get_get_object_path_with_prowler(self): @@ -344,3 +344,46 @@ class TestS3: assert s3 is not None assert s3.is_connected is False assert s3.error is not None + + @mock_aws + def test_init_without_session(self): + with pytest.raises(ValueError) as e: + S3( + session=None, + bucket_name=S3_BUCKET_NAME, + output_directory=CURRENT_DIRECTORY, + ) + + assert ( + str(e.value) + == "If no role ARN is provided, a profile, an AWS access key ID, or an AWS secret access key is required." + ) + + @mock_aws + def test_init_without_session_but_role_arn(self): + with pytest.raises(ValueError) as e: + S3( + session=None, + bucket_name=S3_BUCKET_NAME, + output_directory=CURRENT_DIRECTORY, + role_arn="arn:aws:iam::123456789012:role/role_name", + ) + + assert ( + str(e.value) + == "If a role ARN is provided, a session duration, an external ID, and a role session name are required." + ) + + @mock_aws + def test_init_without_session_and_role_arn_but_session_duration(self): + with pytest.raises(ValueError) as e: + S3( + session=None, + bucket_name=S3_BUCKET_NAME, + output_directory=CURRENT_DIRECTORY, + session_duration=3600, + ) + assert ( + str(e.value) + == "If a session duration, an external ID, or a role session name is provided, a role ARN is required." + ) diff --git a/tests/providers/aws/lib/security_hub/security_hub_test.py b/tests/providers/aws/lib/security_hub/security_hub_test.py index 3919b8c779..1095667090 100644 --- a/tests/providers/aws/lib/security_hub/security_hub_test.py +++ b/tests/providers/aws/lib/security_hub/security_hub_test.py @@ -2,6 +2,7 @@ import re from logging import WARNING import botocore +import pytest from boto3 import session from botocore.client import ClientError from mock import patch @@ -521,3 +522,47 @@ class TestSecurityHub: assert connection.is_connected is False assert isinstance(connection.error, SecurityHubNoEnabledRegionsError) + + def test_init_without_session(self): + with pytest.raises(ValueError) as e: + SecurityHub( + aws_session=None, + aws_account_id=AWS_ACCOUNT_NUMBER, + aws_partition=AWS_COMMERCIAL_PARTITION, + aws_security_hub_available_regions=[AWS_REGION_EU_WEST_1], + ) + + assert ( + str(e.value) + == "If no role ARN is provided, a profile, an AWS access key ID, or an AWS secret access key is required." + ) + + def test_init_without_session_but_role_arn(self): + with pytest.raises(ValueError) as e: + SecurityHub( + aws_session=None, + aws_account_id=AWS_ACCOUNT_NUMBER, + aws_partition=AWS_COMMERCIAL_PARTITION, + aws_security_hub_available_regions=[AWS_REGION_EU_WEST_1], + role_arn="arn:aws:iam::123456789012:role/my-role", + ) + + assert ( + str(e.value) + == "If a role ARN is provided, a session duration, an external ID, and a role session name are required." + ) + + def test_init_without_session_and_role_arn_but_session_duration(self): + with pytest.raises(ValueError) as e: + SecurityHub( + aws_session=None, + aws_account_id=AWS_ACCOUNT_NUMBER, + aws_partition=AWS_COMMERCIAL_PARTITION, + aws_security_hub_available_regions=[AWS_REGION_EU_WEST_1], + session_duration=3600, + ) + + assert ( + str(e.value) + == "If a session duration, an external ID, or a role session name is provided, a role ARN is required." + ) diff --git a/tests/providers/aws/services/codebuild/codebuild_project_logging_enabled/codebuild_project_logging_enabled_test.py b/tests/providers/aws/services/codebuild/codebuild_project_logging_enabled/codebuild_project_logging_enabled_test.py index 8428b1ece3..d961190cd9 100644 --- a/tests/providers/aws/services/codebuild/codebuild_project_logging_enabled/codebuild_project_logging_enabled_test.py +++ b/tests/providers/aws/services/codebuild/codebuild_project_logging_enabled/codebuild_project_logging_enabled_test.py @@ -224,7 +224,7 @@ class Test_codebuild_project_logging_enabled: assert result[0].status == "PASS" assert ( result[0].status_extended - == f"CodeBuild project {project_name} has enabled CloudWartch logs in log group cw-test-group and S3 logs in bucket s3://test-bucket/logs." + == f"CodeBuild project {project_name} has enabled CloudWatch logs in log group cw-test-group and S3 logs in bucket s3://test-bucket/logs." ) assert result[0].resource_id == project_name assert result[0].resource_arn == project_arn diff --git a/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_all_ports/ec2_securitygroup_allow_ingress_from_internet_to_all_ports_test.py b/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_all_ports/ec2_securitygroup_allow_ingress_from_internet_to_all_ports_test.py index 85c1fd3c3d..98bfe0907e 100644 --- a/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_all_ports/ec2_securitygroup_allow_ingress_from_internet_to_all_ports_test.py +++ b/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_all_ports/ec2_securitygroup_allow_ingress_from_internet_to_all_ports_test.py @@ -269,6 +269,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_all_ports: == f"arn:{aws_provider.identity.partition}:ec2:{AWS_REGION_US_EAST_1}:{aws_provider.identity.account}:security-group/{default_sg_id}" ) assert sg.resource_details == default_sg_name + assert sg.check_metadata.Severity == "high" assert sg.resource_tags == [] @mock_aws @@ -361,6 +362,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_all_ports: assert len(result) == 1 assert result[0].status == "PASS" assert result[0].region == AWS_REGION_US_EAST_1 + assert result[0].check_metadata.Severity == "critical" @mock_aws def test_set_failed_check_called_correctly(self): @@ -409,7 +411,6 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_all_ports: "prowler.providers.aws.lib.service.service.AWSService.set_failed_check" ) as mock_set_failed_check, ): - from prowler.providers.aws.services.ec2.ec2_securitygroup_allow_ingress_from_internet_to_all_ports.ec2_securitygroup_allow_ingress_from_internet_to_all_ports import ( ec2_securitygroup_allow_ingress_from_internet_to_all_ports, ) diff --git a/tests/providers/aws/services/fms/fms_policy_compliant/fms_policy_compliant_test.py b/tests/providers/aws/services/fms/fms_policy_compliant/fms_policy_compliant_test.py index 0c6fa8606a..4810d6c1e6 100644 --- a/tests/providers/aws/services/fms/fms_policy_compliant/fms_policy_compliant_test.py +++ b/tests/providers/aws/services/fms/fms_policy_compliant/fms_policy_compliant_test.py @@ -97,6 +97,7 @@ class Test_fms_policy_compliant: == f"arn:aws:fms:{AWS_REGION_US_EAST_1}:{AWS_ACCOUNT_NUMBER}:policy" ) assert result[0].region == AWS_REGION_US_EAST_1 + assert result[0].resource == fms_client.fms_policies[0] def test_fms_admin_with_compliant_policies(self): fms_client = mock.MagicMock @@ -150,6 +151,7 @@ class Test_fms_policy_compliant: == f"arn:aws:fms:{AWS_REGION_US_EAST_1}:{AWS_ACCOUNT_NUMBER}:policy" ) assert result[0].region == AWS_REGION_US_EAST_1 + assert result[0].resource == {} def test_fms_admin_with_non_and_compliant_policies(self): fms_client = mock.MagicMock @@ -209,6 +211,7 @@ class Test_fms_policy_compliant: == f"arn:aws:fms:{AWS_REGION_US_EAST_1}:{AWS_ACCOUNT_NUMBER}:policy" ) assert result[0].region == AWS_REGION_US_EAST_1 + assert result[0].resource == fms_client.fms_policies[0] def test_fms_admin_without_policies(self): fms_client = mock.MagicMock @@ -246,6 +249,7 @@ class Test_fms_policy_compliant: == f"arn:aws:fms:{AWS_REGION_US_EAST_1}:{AWS_ACCOUNT_NUMBER}:policy" ) assert result[0].region == AWS_REGION_US_EAST_1 + assert result[0].resource == {} def test_fms_admin_with_policy_with_null_status(self): fms_client = mock.MagicMock @@ -297,3 +301,4 @@ class Test_fms_policy_compliant: assert result[0].resource_id == "12345678901" assert result[0].resource_arn == "arn:aws:fms:us-east-1:12345678901" assert result[0].region == AWS_REGION_US_EAST_1 + assert result[0].resource == fms_client.fms_policies[0] diff --git a/tests/providers/aws/services/iam/iam_check_saml_providers_sts/iam_check_saml_providers_sts_test.py b/tests/providers/aws/services/iam/iam_check_saml_providers_sts/iam_check_saml_providers_sts_test.py index 87fb82808b..3bf7c3fcbf 100644 --- a/tests/providers/aws/services/iam/iam_check_saml_providers_sts/iam_check_saml_providers_sts_test.py +++ b/tests/providers/aws/services/iam/iam_check_saml_providers_sts/iam_check_saml_providers_sts_test.py @@ -123,3 +123,28 @@ nTTxU4a7x1naFxzYXK1iQ1vMARKMjDb19QEJIEJKZlDK4uS7yMlf1nFS assert result[0].resource_arn == "arn:aws:iam::123456789012:root" assert result[0].region == AWS_REGION_US_EAST_1 assert result[0].status_extended == "No SAML Providers found." + + @mock_aws + def test_iam_check_saml_providers_sts_none_saml_providers(self): + from prowler.providers.aws.services.iam.iam_service import IAM + + aws_provider = set_mocked_aws_provider([AWS_REGION_US_EAST_1]) + + with mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=aws_provider, + ): + with mock.patch( + "prowler.providers.aws.services.iam.iam_check_saml_providers_sts.iam_check_saml_providers_sts.iam_client", + new=IAM(aws_provider), + ) as iam_client: + # Test Check + from prowler.providers.aws.services.iam.iam_check_saml_providers_sts.iam_check_saml_providers_sts import ( + iam_check_saml_providers_sts, + ) + + iam_client.saml_providers = None + + check = iam_check_saml_providers_sts() + result = check.execute() + assert len(result) == 0 diff --git a/tests/providers/aws/services/iam/lib/policy_test.py b/tests/providers/aws/services/iam/lib/policy_test.py index bac84355ac..02e88739ec 100644 --- a/tests/providers/aws/services/iam/lib/policy_test.py +++ b/tests/providers/aws/services/iam/lib/policy_test.py @@ -3,9 +3,11 @@ from prowler.providers.aws.services.iam.lib.policy import ( check_full_service_access, is_condition_block_restrictive, is_condition_block_restrictive_organization, + is_condition_block_restrictive_sns_endpoint, is_condition_restricting_from_private_ip, is_policy_public, ) +import pytest TRUSTED_AWS_ACCOUNT_NUMBER = "123456789012" NON_TRUSTED_AWS_ACCOUNT_NUMBER = "111222333444" @@ -1442,6 +1444,39 @@ class Test_Policy: condition_statement = {"StringEquals": {"aws:PrincipalOrgID": ALL_ORGS}} assert not is_condition_block_restrictive_organization(condition_statement) + @pytest.mark.parametrize( + "condition_value,expected", + [ + ("*@example.com", True), + ("https://events.pagerduty.com/integration//enqueue", True), + ( + "arn:aws:sns:eu-west-2:123456789012:example-topic:995be20c-a7e3-44ca-8c18-77cb263d15e7", + True, + ), + ("*@*.com", False), + ("*@*", False), + ("*@example.*", False), + ("https://events.pagerduty.com/integration/*/enqueue", False), + ("arn:aws:sns:eu-west-2:123456789012:example-topic:*", False), + ( + "arn:aws:sns:eu-west-2:*:example-topic:995be20c-a7e3-44ca-8c18-77cb263d15e7", + False, + ), + ], + ) + def test_condition_parser_string_equals_sns_endpoint_str( + self, condition_value: str, expected: bool + ): + condition_statement = {"StringEquals": {"SNS:Endpoint": condition_value}} + assert ( + is_condition_block_restrictive_sns_endpoint(condition_statement) == expected + ) + + condition_statement = {"StringLike": {"SNS:Endpoint": condition_value}} + assert ( + is_condition_block_restrictive_sns_endpoint(condition_statement) == expected + ) + def test_policy_allows_cross_account_access_with_root_and_wildcard_principal(self): policy_allow_root_and_wildcard_principal = { "Statement": [ diff --git a/tests/providers/aws/services/inspector2/inspector2_active_findings_exist/inspector2_active_findings_exist_test.py b/tests/providers/aws/services/inspector2/inspector2_active_findings_exist/inspector2_active_findings_exist_test.py index ef0abf9f55..a489700e86 100644 --- a/tests/providers/aws/services/inspector2/inspector2_active_findings_exist/inspector2_active_findings_exist_test.py +++ b/tests/providers/aws/services/inspector2/inspector2_active_findings_exist/inspector2_active_findings_exist_test.py @@ -46,7 +46,6 @@ class Test_inspector2_active_findings_exist: "prowler.providers.aws.services.inspector2.inspector2_active_findings_exist.inspector2_active_findings_exist.inspector2_client", new=inspector2_client, ): - # Test Check from prowler.providers.aws.services.inspector2.inspector2_active_findings_exist.inspector2_active_findings_exist import ( inspector2_active_findings_exist, @@ -101,7 +100,6 @@ class Test_inspector2_active_findings_exist: "prowler.providers.aws.services.inspector2.inspector2_active_findings_exist.inspector2_active_findings_exist.inspector2_client", new=inspector2_client, ): - # Test Check from prowler.providers.aws.services.inspector2.inspector2_active_findings_exist.inspector2_active_findings_exist import ( inspector2_active_findings_exist, @@ -156,7 +154,6 @@ class Test_inspector2_active_findings_exist: "prowler.providers.aws.services.inspector2.inspector2_active_findings_exist.inspector2_active_findings_exist.inspector2_client", new=inspector2_client, ): - # Test Check from prowler.providers.aws.services.inspector2.inspector2_active_findings_exist.inspector2_active_findings_exist import ( inspector2_active_findings_exist, @@ -177,6 +174,49 @@ class Test_inspector2_active_findings_exist: ) assert result[0].region == AWS_REGION_EU_WEST_1 + def test_enabled_with_none_finding(self): + # Mock the inspector2 client + inspector2_client = mock.MagicMock + + inspector2_client.provider = set_mocked_aws_provider([AWS_REGION_EU_WEST_1]) + inspector2_client.audited_account = AWS_ACCOUNT_NUMBER + inspector2_client.audited_account_arn = ( + f"arn:aws:iam::{AWS_ACCOUNT_NUMBER}:root" + ) + inspector2_client.region = AWS_REGION_EU_WEST_1 + inspector2_client.inspectors = [ + Inspector( + id=AWS_ACCOUNT_NUMBER, + arn=f"arn:aws:inspector2:{AWS_REGION_EU_WEST_1}:{AWS_ACCOUNT_NUMBER}:inspector2", + region=AWS_REGION_EU_WEST_1, + status="ENABLED", + ec2_status="ENABLED", + ecr_status="DISABLED", + lambda_status="DISABLED", + lambda_code_status="ENABLED", + active_findings=None, + ) + ] + aws_provider = set_mocked_aws_provider([AWS_REGION_EU_WEST_1]) + + with mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=aws_provider, + ): + with mock.patch( + "prowler.providers.aws.services.inspector2.inspector2_active_findings_exist.inspector2_active_findings_exist.inspector2_client", + new=inspector2_client, + ): + # Test Check + from prowler.providers.aws.services.inspector2.inspector2_active_findings_exist.inspector2_active_findings_exist import ( + inspector2_active_findings_exist, + ) + + check = inspector2_active_findings_exist() + result = check.execute() + + assert len(result) == 0 + def test_inspector2_disabled_ignoring(self): # Mock the inspector2 client inspector2_client = mock.MagicMock @@ -221,7 +261,6 @@ class Test_inspector2_active_findings_exist: "prowler.providers.aws.services.inspector2.inspector2_active_findings_exist.inspector2_active_findings_exist.inspector2_client", new=inspector2_client, ): - # Test Check from prowler.providers.aws.services.inspector2.inspector2_active_findings_exist.inspector2_active_findings_exist import ( inspector2_active_findings_exist, diff --git a/tests/providers/aws/services/rds/rds_service_test.py b/tests/providers/aws/services/rds/rds_service_test.py index 111a3d1da1..bce34ac9f4 100644 --- a/tests/providers/aws/services/rds/rds_service_test.py +++ b/tests/providers/aws/services/rds/rds_service_test.py @@ -4,6 +4,7 @@ from unittest.mock import patch import botocore from boto3 import client +from botocore.exceptions import ClientError from moto import mock_aws from prowler.providers.aws.services.rds.rds_service import RDS, Certificate, DBInstance @@ -31,6 +32,20 @@ def mock_make_api_call(self, operation_name, kwarg): return make_api_call(self, operation_name, kwarg) +def mock_make_api_call_excepcion_deprecated_cert(self, operation_name, kwarg): + if operation_name == "DescribeCertificates": + raise ClientError( + error_response={ + "Error": { + "Code": "CertificateNotFound", + "Message": "Certificate rds-ca-2019 not found", + } + }, + operation_name=operation_name, + ) + return make_api_call(self, operation_name, kwarg) + + @patch("botocore.client.BaseClient._make_api_call", new=mock_make_api_call) class Test_RDS_Service: # Test RDS Service @@ -226,6 +241,57 @@ class Test_RDS_Service: assert not cert.customer_override assert cert.customer_override_valid_till == datetime(2025, 1, 1) + @mock_aws + def test_describe_db_certificate_with_deprecated_cert_not_found(self): + with mock.patch( + "botocore.client.BaseClient._make_api_call", + new=mock_make_api_call_excepcion_deprecated_cert, + ): + rds_client = mock.MagicMock + rds_client.db_instances = { + "arn:aws:rds:us-east-1:123456789012:db:db-master-1": DBInstance( + id="db-master-1", + region=AWS_REGION_US_EAST_1, + endpoint={ + "Address": "db-master-1.aaaaaaaaaa.us-east-1.rds.amazonaws.com", + "Port": 5432, + }, + status="available", + public=True, + encrypted=True, + backup_retention_period=10, + cloudwatch_logs=["audit", "error"], + deletion_protection=True, + auto_minor_version_upgrade=True, + multi_az=True, + cluster_id="cluster-postgres", + tags=[{"Key": "test", "Value": "test"}], + parameter_groups=["test"], + copy_tags_to_snapshot=True, + ca_cert="rds-cert-2019", + arn="arn:aws:rds:us-east-1:123456789012:db:db-master-1", + engine="postgres", + engine_version="9.6.9", + username="test", + iam_auth=False, + cert=[], + ) + } + + with mock.patch( + "prowler.providers.aws.services.rds.rds_service.RDS", + new=rds_client, + ): + from prowler.providers.aws.services.rds.rds_service import RDS + + rds = RDS(rds_client) + assert len(rds.db_instances) == 1 + db_instance_arn, db_instance = next(iter(rds.db_instances.items())) + assert db_instance.id == "db-master-1" + assert db_instance.region == AWS_REGION_US_EAST_1 + # No certificate should be found due to the exception + assert len(db_instance.cert) == 0 + # Test RDS Describe DB Snapshots @mock_aws def test_describe_db_snapshots(self): diff --git a/tests/providers/aws/services/redshift/redshift_cluster_multi_az_enabled/redshift_cluster_multi_az_enabled_test.py b/tests/providers/aws/services/redshift/redshift_cluster_multi_az_enabled/redshift_cluster_multi_az_enabled_test.py index 1b2d2221c5..a32d8435db 100644 --- a/tests/providers/aws/services/redshift/redshift_cluster_multi_az_enabled/redshift_cluster_multi_az_enabled_test.py +++ b/tests/providers/aws/services/redshift/redshift_cluster_multi_az_enabled/redshift_cluster_multi_az_enabled_test.py @@ -149,7 +149,7 @@ class Test_redshift_cluster_multi_az_enabled: ) # Moto does not pass the multi_az parameter back. - service_client.clusters[0].multi_az = 1 + service_client.clusters[0].multi_az = "Enabled" check = redshift_cluster_multi_az_enabled() result = check.execute() diff --git a/tests/providers/aws/services/redshift/redshift_cluster_public_access/redshift_cluster_public_access_test.py b/tests/providers/aws/services/redshift/redshift_cluster_public_access/redshift_cluster_public_access_test.py index 816f52489a..9e7f9dc103 100644 --- a/tests/providers/aws/services/redshift/redshift_cluster_public_access/redshift_cluster_public_access_test.py +++ b/tests/providers/aws/services/redshift/redshift_cluster_public_access/redshift_cluster_public_access_test.py @@ -206,7 +206,7 @@ class Test_redshift_cluster_public_access: ) ) vpc_client = mock.MagicMock - vpc_client.subnets = {"subnet-123456": mock.MagicMock(public=True)} + vpc_client.vpc_subnets = {"subnet-123456": mock.MagicMock(public=True)} ec2_client = mock.MagicMock aws_provider = set_mocked_aws_provider([AWS_REGION_EU_WEST_1]) @@ -260,7 +260,7 @@ class Test_redshift_cluster_public_access: ) ) vpc_client = mock.MagicMock - vpc_client.subnets = {"subnet-123456": mock.MagicMock(public=True)} + vpc_client.vpc_subnets = {"subnet-123456": mock.MagicMock(public=True)} ec2_client = mock.MagicMock ec2_client.security_groups = { f"arn:aws:ec2:{AWS_REGION_EU_WEST_1}:{AWS_ACCOUNT_NUMBER}:security-group/sg-123456": mock.MagicMock( diff --git a/tests/providers/aws/services/redshift/redshift_service_test.py b/tests/providers/aws/services/redshift/redshift_service_test.py index ffdd6cdefa..28380ded4d 100644 --- a/tests/providers/aws/services/redshift/redshift_service_test.py +++ b/tests/providers/aws/services/redshift/redshift_service_test.py @@ -140,7 +140,8 @@ class Test_Redshift_Service: ] assert redshift.clusters[0].parameter_group_name == "default.redshift-1.0" assert redshift.clusters[0].encrypted - assert redshift.clusters[0].multi_az is False + # Moto does not pass the multi_az parameter back. + assert redshift.clusters[0].multi_az == "" assert redshift.clusters[0].master_username == "user" assert redshift.clusters[0].enhanced_vpc_routing assert redshift.clusters[0].database_name == "test" diff --git a/tests/providers/aws/services/route53/route53_public_hosted_zones_cloudwatch_logging_enabled/route53_public_hosted_zones_cloudwatch_logging_enabled_test.py b/tests/providers/aws/services/route53/route53_public_hosted_zones_cloudwatch_logging_enabled/route53_public_hosted_zones_cloudwatch_logging_enabled_test.py index a5fd5f17c9..6f3d044ff2 100644 --- a/tests/providers/aws/services/route53/route53_public_hosted_zones_cloudwatch_logging_enabled/route53_public_hosted_zones_cloudwatch_logging_enabled_test.py +++ b/tests/providers/aws/services/route53/route53_public_hosted_zones_cloudwatch_logging_enabled/route53_public_hosted_zones_cloudwatch_logging_enabled_test.py @@ -117,6 +117,68 @@ class Test_route53_public_hosted_zones_cloudwatch_logging_enabled: == f"Route53 Public Hosted Zone {hosted_zone_id} has query logging disabled." ) + def test_two_hosted_zone_public_one_logging_enabled_other_disabled(self): + route53 = mock.MagicMock + hosted_zone_name = "test-domain.com" + hosted_zone_id = "ABCDEF12345678" + log_group_name = "test-log-group" + log_group_arn = f"rn:aws:logs:{AWS_REGION_US_EAST_1}:{AWS_ACCOUNT_NUMBER}:log-group:{log_group_name}" + + hosted_zone_name_disabled = "test-domain-disabled.com" + hosted_zone_id_disabled = "ABCDEF123456789" + + route53.hosted_zones = { + hosted_zone_name: HostedZone( + name=hosted_zone_name, + arn=f"arn:aws:route53:::{hosted_zone_id}", + id=hosted_zone_id, + private_zone=False, + region=AWS_REGION_US_EAST_1, + logging_config=LoggingConfig(cloudwatch_log_group_arn=log_group_arn), + ), + hosted_zone_name_disabled: HostedZone( + name=hosted_zone_name_disabled, + arn=f"arn:aws:route53:::{hosted_zone_id_disabled}", + id=hosted_zone_id_disabled, + private_zone=False, + region=AWS_REGION_US_EAST_1, + ), + } + + with ( + mock.patch( + "prowler.providers.aws.services.route53.route53_service.Route53", + new=route53, + ), + mock.patch( + "prowler.providers.aws.services.route53.route53_public_hosted_zones_cloudwatch_logging_enabled.route53_public_hosted_zones_cloudwatch_logging_enabled.route53_client", + new=route53, + ), + ): + # Test Check + from prowler.providers.aws.services.route53.route53_public_hosted_zones_cloudwatch_logging_enabled.route53_public_hosted_zones_cloudwatch_logging_enabled import ( + route53_public_hosted_zones_cloudwatch_logging_enabled, + ) + + check = route53_public_hosted_zones_cloudwatch_logging_enabled() + result = check.execute() + + assert len(result) == 2 + assert result[0].resource_id == hosted_zone_id + assert result[0].region == AWS_REGION_US_EAST_1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == f"Route53 Public Hosted Zone {hosted_zone_id} has query logging enabled in Log Group {log_group_arn}." + ) + assert result[1].resource_id == hosted_zone_id_disabled + assert result[1].region == AWS_REGION_US_EAST_1 + assert result[1].status == "FAIL" + assert ( + result[1].status_extended + == f"Route53 Public Hosted Zone {hosted_zone_id_disabled} has query logging disabled." + ) + def test_hosted_zone__private(self): route53 = mock.MagicMock hosted_zone_name = "test-domain.com" diff --git a/tests/providers/aws/services/s3/s3_account_level_public_access_blocks/s3_account_level_public_access_blocks_test.py b/tests/providers/aws/services/s3/s3_account_level_public_access_blocks/s3_account_level_public_access_blocks_test.py index 994a6bcbe6..96b02bd88b 100644 --- a/tests/providers/aws/services/s3/s3_account_level_public_access_blocks/s3_account_level_public_access_blocks_test.py +++ b/tests/providers/aws/services/s3/s3_account_level_public_access_blocks/s3_account_level_public_access_blocks_test.py @@ -156,3 +156,33 @@ class Test_s3_account_level_public_access_blocks: result = check.execute() assert len(result) == 0 + + def test_none_bucket_account_public_block(self): + from prowler.providers.aws.services.s3.s3_service import S3, S3Control + + aws_provider = set_mocked_aws_provider([AWS_REGION_US_EAST_1]) + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=aws_provider, + ), + mock.patch( + "prowler.providers.aws.services.s3.s3_account_level_public_access_blocks.s3_account_level_public_access_blocks.s3_client", + new=S3(aws_provider), + ), + mock.patch( + "prowler.providers.aws.services.s3.s3_account_level_public_access_blocks.s3_account_level_public_access_blocks.s3control_client", + new=S3Control(aws_provider), + ) as s3control_client, + ): + # Test Check + from prowler.providers.aws.services.s3.s3_account_level_public_access_blocks.s3_account_level_public_access_blocks import ( + s3_account_level_public_access_blocks, + ) + + s3control_client.account_public_access_block = None + check = s3_account_level_public_access_blocks() + result = check.execute() + + assert len(result) == 0 diff --git a/tests/providers/aws/services/sns/sns_topics_not_publicly_accessible/sns_topics_not_publicly_accessible_test.py b/tests/providers/aws/services/sns/sns_topics_not_publicly_accessible/sns_topics_not_publicly_accessible_test.py index 81f2cc8bad..71aa6c4477 100644 --- a/tests/providers/aws/services/sns/sns_topics_not_publicly_accessible/sns_topics_not_publicly_accessible_test.py +++ b/tests/providers/aws/services/sns/sns_topics_not_publicly_accessible/sns_topics_not_publicly_accessible_test.py @@ -1,8 +1,10 @@ +from typing import Any, Dict from unittest import mock from uuid import uuid4 from prowler.providers.aws.services.sns.sns_service import Topic from tests.providers.aws.utils import AWS_ACCOUNT_NUMBER, AWS_REGION_EU_WEST_1 +import pytest kms_key_id = str(uuid4()) topic_name = "test-topic" @@ -97,6 +99,20 @@ test_policy_restricted_principal_account_organization = { } +def generate_policy_restricted_on_sns_endpoint(endpoint: str) -> Dict[str, Any]: + return { + "Statement": [ + { + "Effect": "Allow", + "Principal": {"AWS": "*"}, + "Action": ["sns:Publish"], + "Resource": f"arn:aws:sns:{AWS_REGION_EU_WEST_1}:{AWS_ACCOUNT_NUMBER}:{topic_name}", + "Condition": {"StringEquals": {"SNS:Endpoint": endpoint}}, + } + ] + } + + class Test_sns_topics_not_publicly_accessible: def test_no_topics(self): sns_client = mock.MagicMock @@ -379,3 +395,94 @@ class Test_sns_topics_not_publicly_accessible: assert result[0].resource_arn == topic_arn assert result[0].region == AWS_REGION_EU_WEST_1 assert result[0].resource_tags == [] + + @pytest.mark.parametrize( + "endpoint", + [ + ("*@example.com"), + ("user@example.com"), + ("https://events.pagerduty.com/integration/987654321/enqueue"), + ( + "arn:aws:sns:eu-west-2:123456789012:example-topic:995be20c-a7e3-44ca-8c18-77cb263d15e7" + ), + ], + ) + def test_topic_public_with_sns_endpoint(self, endpoint: str): + sns_client = mock.MagicMock + sns_client.audited_account = AWS_ACCOUNT_NUMBER + sns_client.topics = [] + sns_client.topics.append( + Topic( + arn=topic_arn, + name=topic_name, + policy=generate_policy_restricted_on_sns_endpoint(endpoint=endpoint), + region=AWS_REGION_EU_WEST_1, + ) + ) + sns_client.provider = mock.MagicMock() + sns_client.provider.organizations_metadata = mock.MagicMock() + sns_client.provider.organizations_metadata.organization_id = org_id + with mock.patch( + "prowler.providers.aws.services.sns.sns_service.SNS", + sns_client, + ): + from prowler.providers.aws.services.sns.sns_topics_not_publicly_accessible.sns_topics_not_publicly_accessible import ( + sns_topics_not_publicly_accessible, + ) + + check = sns_topics_not_publicly_accessible() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == f"SNS topic {topic_name} is not public because its policy only allows access from an endpoint." + ) + assert result[0].resource_id == topic_name + assert result[0].resource_arn == topic_arn + assert result[0].region == AWS_REGION_EU_WEST_1 + assert result[0].resource_tags == [] + + @pytest.mark.parametrize( + "endpoint", + [ + ("*@*"), + ("https://events.pagerduty.com/integration/*/enqueue"), + ("arn:aws:sns:eu-west-2:*:example-topic:*"), + ], + ) + def test_topic_public_with_unrestricted_sns_endpoint(self, endpoint: str): + sns_client = mock.MagicMock + sns_client.audited_account = AWS_ACCOUNT_NUMBER + sns_client.topics = [] + sns_client.topics.append( + Topic( + arn=topic_arn, + name=topic_name, + policy=generate_policy_restricted_on_sns_endpoint(endpoint=endpoint), + region=AWS_REGION_EU_WEST_1, + ) + ) + sns_client.provider = mock.MagicMock() + sns_client.provider.organizations_metadata = mock.MagicMock() + sns_client.provider.organizations_metadata.organization_id = org_id + with mock.patch( + "prowler.providers.aws.services.sns.sns_service.SNS", + sns_client, + ): + from prowler.providers.aws.services.sns.sns_topics_not_publicly_accessible.sns_topics_not_publicly_accessible import ( + sns_topics_not_publicly_accessible, + ) + + check = sns_topics_not_publicly_accessible() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == f"SNS topic {topic_name} is public because its policy allows public access." + ) + assert result[0].resource_id == topic_name + assert result[0].resource_arn == topic_arn + assert result[0].region == AWS_REGION_EU_WEST_1 + assert result[0].resource_tags == [] diff --git a/tests/providers/aws/services/stepfunctions/stepfunctions_statemachine_logging_enabled/stepfunctions_statemachine_logging_enabled_test.py b/tests/providers/aws/services/stepfunctions/stepfunctions_statemachine_logging_enabled/stepfunctions_statemachine_logging_enabled_test.py index 212267fdf3..801c045f5b 100644 --- a/tests/providers/aws/services/stepfunctions/stepfunctions_statemachine_logging_enabled/stepfunctions_statemachine_logging_enabled_test.py +++ b/tests/providers/aws/services/stepfunctions/stepfunctions_statemachine_logging_enabled/stepfunctions_statemachine_logging_enabled_test.py @@ -74,6 +74,15 @@ def create_state_machine(name, logging_configuration): }, 1, ), # Logging enabled + ( + { + STATE_MACHINE_ARN: create_state_machine( + "TestStateMachine", + None, + ) + }, + 1, + ), # Logging configuration is None ], ) @mock_aws(config={"stepfunctions": {"execute_state_machine": True}}) @@ -104,10 +113,9 @@ def test_stepfunctions_statemachine_logging(state_machines, expected_status): # Additional assertions for specific scenarios if expected_status == 1: - if ( - state_machines[STATE_MACHINE_ARN].logging_configuration.level - == LoggingLevel.OFF - ): + logging_conf = state_machines[STATE_MACHINE_ARN].logging_configuration + + if logging_conf is None or logging_conf.level == LoggingLevel.OFF: assert result[0].status == "FAIL" assert ( result[0].status_extended @@ -123,3 +131,4 @@ def test_stepfunctions_statemachine_logging(state_machines, expected_status): assert result[0].resource_id == STATE_MACHINE_ID assert result[0].resource_arn == STATE_MACHINE_ARN assert result[0].region == AWS_REGION_EU_WEST_1 + assert result[0].resource == state_machines[STATE_MACHINE_ARN] diff --git a/tests/providers/azure/services/containerregistry/containerregistry_uses_private_link/containerregistry_uses_private_link_test.py b/tests/providers/azure/services/containerregistry/containerregistry_uses_private_link/containerregistry_uses_private_link_test.py index c49da40f98..f8b9237a21 100644 --- a/tests/providers/azure/services/containerregistry/containerregistry_uses_private_link/containerregistry_uses_private_link_test.py +++ b/tests/providers/azure/services/containerregistry/containerregistry_uses_private_link/containerregistry_uses_private_link_test.py @@ -2,12 +2,6 @@ from unittest import mock from unittest.mock import MagicMock from uuid import uuid4 -from azure.mgmt.containerregistry.models import ( - PrivateEndpoint, - PrivateEndpointConnection, - PrivateLinkServiceConnectionState, -) - from tests.providers.azure.azure_fixtures import ( AZURE_SUBSCRIPTION_ID, set_mocked_azure_provider, @@ -110,6 +104,7 @@ class Test_containerregistry_uses_private_link: ): from prowler.providers.azure.services.containerregistry.containerregistry_service import ( ContainerRegistryInfo, + PrivateEndpointConnection, ) from prowler.providers.azure.services.containerregistry.containerregistry_uses_private_link.containerregistry_uses_private_link import ( containerregistry_uses_private_link, @@ -132,15 +127,8 @@ class Test_containerregistry_uses_private_link: private_endpoint_connections=[ PrivateEndpointConnection( id="/subscriptions/AZURE_SUBSCRIPTION_ID/resourceGroups/mock_resource_group/providers/Microsoft.ContainerRegistry/registries/mock_registry/privateEndpointConnections/myConnection", - private_endpoint=PrivateEndpoint( - id="/subscriptions/AZURE_SUBSCRIPTION_ID/resourceGroups/mock_resource_group/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint" - ), - private_link_service_connection_state=PrivateLinkServiceConnectionState( - status="Approved", - description="Auto-approved connection", - actions_required="None", - ), - provisioning_state="Succeeded", + name="myConnection", + type="Microsoft.ContainerRegistry/registries/privateEndpointConnections", ) ], ) diff --git a/tests/providers/azure/services/defender/defender_container_images_scan_enabled/defender_container_images_scan_enabled_test.py b/tests/providers/azure/services/defender/defender_container_images_scan_enabled/defender_container_images_scan_enabled_test.py index 13bbd57838..6bb9fb0e9a 100644 --- a/tests/providers/azure/services/defender/defender_container_images_scan_enabled/defender_container_images_scan_enabled_test.py +++ b/tests/providers/azure/services/defender/defender_container_images_scan_enabled/defender_container_images_scan_enabled_test.py @@ -60,6 +60,7 @@ class Test_defender_container_images_scan_enabled: AZURE_SUBSCRIPTION_ID: { "NotContainers": Pricing( resource_id=str(uuid4()), + resource_name="Defender plan Servers", pricing_tier="Free", free_trial_remaining_time=timedelta(days=1), ) @@ -90,6 +91,7 @@ class Test_defender_container_images_scan_enabled: AZURE_SUBSCRIPTION_ID: { "Containers": Pricing( resource_id=str(uuid4()), + resource_name="Defender plan for Containers", pricing_tier="Free", free_trial_remaining_time=timedelta(days=1), extensions={}, @@ -124,7 +126,7 @@ class Test_defender_container_images_scan_enabled: "Containers" ].resource_id ) - assert result[0].resource_name == "Dender plan for Containers" + assert result[0].resource_name == "Defender plan for Containers" assert result[0].subscription == AZURE_SUBSCRIPTION_ID def test_defender_subscription_containers_container_images_scan_off(self): @@ -133,6 +135,7 @@ class Test_defender_container_images_scan_enabled: AZURE_SUBSCRIPTION_ID: { "Containers": Pricing( resource_id=str(uuid4()), + resource_name="Defender plan for Containers", pricing_tier="Free", free_trial_remaining_time=timedelta(days=1), extensions={"ContainerRegistriesVulnerabilityAssessments": False}, @@ -167,7 +170,7 @@ class Test_defender_container_images_scan_enabled: "Containers" ].resource_id ) - assert result[0].resource_name == "Dender plan for Containers" + assert result[0].resource_name == "Defender plan for Containers" assert result[0].subscription == AZURE_SUBSCRIPTION_ID def test_defender_subscription_containers_container_images_scan_on(self): @@ -176,6 +179,7 @@ class Test_defender_container_images_scan_enabled: AZURE_SUBSCRIPTION_ID: { "Containers": Pricing( resource_id=str(uuid4()), + resource_name="Defender plan for Containers", pricing_tier="Free", free_trial_remaining_time=timedelta(days=1), extensions={"ContainerRegistriesVulnerabilityAssessments": True}, @@ -210,5 +214,5 @@ class Test_defender_container_images_scan_enabled: "Containers" ].resource_id ) - assert result[0].resource_name == "Dender plan for Containers" + assert result[0].resource_name == "Defender plan for Containers" assert result[0].subscription == AZURE_SUBSCRIPTION_ID diff --git a/tests/providers/azure/services/defender/defender_ensure_defender_for_app_services_is_on/defender_ensure_defender_for_app_services_is_on_test.py b/tests/providers/azure/services/defender/defender_ensure_defender_for_app_services_is_on/defender_ensure_defender_for_app_services_is_on_test.py index e3c83045f7..a3b10bb0d4 100644 --- a/tests/providers/azure/services/defender/defender_ensure_defender_for_app_services_is_on/defender_ensure_defender_for_app_services_is_on_test.py +++ b/tests/providers/azure/services/defender/defender_ensure_defender_for_app_services_is_on/defender_ensure_defender_for_app_services_is_on_test.py @@ -38,6 +38,7 @@ class Test_defender_ensure_defender_for_app_services_is_on: AZURE_SUBSCRIPTION_ID: { "AppServices": Pricing( resource_id=resource_id, + resource_name="Defender plan Servers", pricing_tier="Not Standard", free_trial_remaining_time=0, ) @@ -77,6 +78,7 @@ class Test_defender_ensure_defender_for_app_services_is_on: AZURE_SUBSCRIPTION_ID: { "AppServices": Pricing( resource_id=resource_id, + resource_name="Defender plan Servers", pricing_tier="Standard", free_trial_remaining_time=0, ) diff --git a/tests/providers/azure/services/defender/defender_ensure_defender_for_arm_is_on/defender_ensure_defender_for_arm_is_on_test.py b/tests/providers/azure/services/defender/defender_ensure_defender_for_arm_is_on/defender_ensure_defender_for_arm_is_on_test.py index 4341ce9e08..247cebf877 100644 --- a/tests/providers/azure/services/defender/defender_ensure_defender_for_arm_is_on/defender_ensure_defender_for_arm_is_on_test.py +++ b/tests/providers/azure/services/defender/defender_ensure_defender_for_arm_is_on/defender_ensure_defender_for_arm_is_on_test.py @@ -38,6 +38,7 @@ class Test_defender_ensure_defender_for_arm_is_on: AZURE_SUBSCRIPTION_ID: { "Arm": Pricing( resource_id=resource_id, + resource_name="Defender plan Servers", pricing_tier="Not Standard", free_trial_remaining_time=0, ) @@ -77,6 +78,7 @@ class Test_defender_ensure_defender_for_arm_is_on: AZURE_SUBSCRIPTION_ID: { "Arm": Pricing( resource_id=resource_id, + resource_name="Defender plan Servers", pricing_tier="Standard", free_trial_remaining_time=0, ) diff --git a/tests/providers/azure/services/defender/defender_ensure_defender_for_azure_sql_databases_is_on/defender_ensure_defender_for_azure_sql_databases_is_on_test.py b/tests/providers/azure/services/defender/defender_ensure_defender_for_azure_sql_databases_is_on/defender_ensure_defender_for_azure_sql_databases_is_on_test.py index 15269e71f1..5a0ab49b7a 100644 --- a/tests/providers/azure/services/defender/defender_ensure_defender_for_azure_sql_databases_is_on/defender_ensure_defender_for_azure_sql_databases_is_on_test.py +++ b/tests/providers/azure/services/defender/defender_ensure_defender_for_azure_sql_databases_is_on/defender_ensure_defender_for_azure_sql_databases_is_on_test.py @@ -38,6 +38,7 @@ class Test_defender_ensure_defender_for_azure_sql_databases_is_on: AZURE_SUBSCRIPTION_ID: { "SqlServers": Pricing( resource_id=resource_id, + resource_name="Defender plan Servers", pricing_tier="Not Standard", free_trial_remaining_time=0, ) @@ -67,7 +68,7 @@ class Test_defender_ensure_defender_for_azure_sql_databases_is_on: == f"Defender plan Defender for Azure SQL DB Servers from subscription {AZURE_SUBSCRIPTION_ID} is set to OFF (pricing tier not standard)." ) assert result[0].subscription == AZURE_SUBSCRIPTION_ID - assert result[0].resource_name == "Defender plan Azure SQL DB Servers" + assert result[0].resource_name == "Defender plan Servers" assert result[0].resource_id == resource_id def test_defender_sql_databases_pricing_tier_standard(self): @@ -77,6 +78,7 @@ class Test_defender_ensure_defender_for_azure_sql_databases_is_on: AZURE_SUBSCRIPTION_ID: { "SqlServers": Pricing( resource_id=resource_id, + resource_name="Defender plan Servers", pricing_tier="Standard", free_trial_remaining_time=0, ) @@ -106,5 +108,5 @@ class Test_defender_ensure_defender_for_azure_sql_databases_is_on: == f"Defender plan Defender for Azure SQL DB Servers from subscription {AZURE_SUBSCRIPTION_ID} is set to ON (pricing tier standard)." ) assert result[0].subscription == AZURE_SUBSCRIPTION_ID - assert result[0].resource_name == "Defender plan Azure SQL DB Servers" + assert result[0].resource_name == "Defender plan Servers" assert result[0].resource_id == resource_id diff --git a/tests/providers/azure/services/defender/defender_ensure_defender_for_containers_is_on/defender_ensure_defender_for_containers_is_on_test.py b/tests/providers/azure/services/defender/defender_ensure_defender_for_containers_is_on/defender_ensure_defender_for_containers_is_on_test.py index d40fbe1b1c..622ad77b42 100644 --- a/tests/providers/azure/services/defender/defender_ensure_defender_for_containers_is_on/defender_ensure_defender_for_containers_is_on_test.py +++ b/tests/providers/azure/services/defender/defender_ensure_defender_for_containers_is_on/defender_ensure_defender_for_containers_is_on_test.py @@ -38,6 +38,7 @@ class Test_defender_ensure_defender_for_containers_is_on: AZURE_SUBSCRIPTION_ID: { "Containers": Pricing( resource_id=resource_id, + resource_name="Defender plan Servers", pricing_tier="Not Standard", free_trial_remaining_time=0, ) @@ -67,7 +68,7 @@ class Test_defender_ensure_defender_for_containers_is_on: == f"Defender plan Defender for Containers from subscription {AZURE_SUBSCRIPTION_ID} is set to OFF (pricing tier not standard)." ) assert result[0].subscription == AZURE_SUBSCRIPTION_ID - assert result[0].resource_name == "Defender plan Container Registries" + assert result[0].resource_name == "Defender plan Servers" assert result[0].resource_id == resource_id def test_defender_container_registries_pricing_tier_standard(self): @@ -77,6 +78,7 @@ class Test_defender_ensure_defender_for_containers_is_on: AZURE_SUBSCRIPTION_ID: { "Containers": Pricing( resource_id=resource_id, + resource_name="Defender plan Servers", pricing_tier="Standard", free_trial_remaining_time=0, ) @@ -106,5 +108,5 @@ class Test_defender_ensure_defender_for_containers_is_on: == f"Defender plan Defender for Containers from subscription {AZURE_SUBSCRIPTION_ID} is set to ON (pricing tier standard)." ) assert result[0].subscription == AZURE_SUBSCRIPTION_ID - assert result[0].resource_name == "Defender plan Container Registries" + assert result[0].resource_name == "Defender plan Servers" assert result[0].resource_id == resource_id diff --git a/tests/providers/azure/services/defender/defender_ensure_defender_for_cosmosdb_is_on/defender_ensure_defender_for_cosmosdb_is_on_test.py b/tests/providers/azure/services/defender/defender_ensure_defender_for_cosmosdb_is_on/defender_ensure_defender_for_cosmosdb_is_on_test.py index 5f7906e1c2..21507b9c20 100644 --- a/tests/providers/azure/services/defender/defender_ensure_defender_for_cosmosdb_is_on/defender_ensure_defender_for_cosmosdb_is_on_test.py +++ b/tests/providers/azure/services/defender/defender_ensure_defender_for_cosmosdb_is_on/defender_ensure_defender_for_cosmosdb_is_on_test.py @@ -38,6 +38,7 @@ class Test_defender_ensure_defender_for_cosmosdb_is_on: AZURE_SUBSCRIPTION_ID: { "CosmosDbs": Pricing( resource_id=resource_id, + resource_name="Defender plan Servers", pricing_tier="Not Standard", free_trial_remaining_time=0, ) @@ -77,6 +78,7 @@ class Test_defender_ensure_defender_for_cosmosdb_is_on: AZURE_SUBSCRIPTION_ID: { "CosmosDbs": Pricing( resource_id=resource_id, + resource_name="Defender plan Servers", pricing_tier="Standard", free_trial_remaining_time=0, ) diff --git a/tests/providers/azure/services/defender/defender_ensure_defender_for_databases_is_on/defender_ensure_defender_for_databases_is_on_test.py b/tests/providers/azure/services/defender/defender_ensure_defender_for_databases_is_on/defender_ensure_defender_for_databases_is_on_test.py index 755151da20..354025d4b6 100644 --- a/tests/providers/azure/services/defender/defender_ensure_defender_for_databases_is_on/defender_ensure_defender_for_databases_is_on_test.py +++ b/tests/providers/azure/services/defender/defender_ensure_defender_for_databases_is_on/defender_ensure_defender_for_databases_is_on_test.py @@ -38,6 +38,7 @@ class Test_defender_ensure_defender_for_databases_is_on: AZURE_SUBSCRIPTION_ID: { "SqlServers": Pricing( resource_id=resource_id, + resource_name="Defender plan Servers", pricing_tier="Standard", free_trial_remaining_time=0, ) @@ -69,6 +70,7 @@ class Test_defender_ensure_defender_for_databases_is_on: AZURE_SUBSCRIPTION_ID: { "SqlServerVirtualMachines": Pricing( resource_id=resource_id, + resource_name="Defender plan Servers", pricing_tier="Standard", free_trial_remaining_time=0, ) @@ -100,6 +102,7 @@ class Test_defender_ensure_defender_for_databases_is_on: AZURE_SUBSCRIPTION_ID: { "OpenSourceRelationalDatabases": Pricing( resource_id=resource_id, + resource_name="Defender plan Servers", pricing_tier="Standard", free_trial_remaining_time=0, ) @@ -131,6 +134,7 @@ class Test_defender_ensure_defender_for_databases_is_on: AZURE_SUBSCRIPTION_ID: { "CosmosDbs": Pricing( resource_id=resource_id, + resource_name="Defender plan Servers", pricing_tier="Standard", free_trial_remaining_time=0, ) @@ -162,21 +166,25 @@ class Test_defender_ensure_defender_for_databases_is_on: AZURE_SUBSCRIPTION_ID: { "SqlServers": Pricing( resource_id=resource_id, + resource_name="Defender plan Servers", pricing_tier="Standard", free_trial_remaining_time=0, ), "SqlServerVirtualMachines": Pricing( resource_id=resource_id, + resource_name="Defender plan Servers", pricing_tier="Standard", free_trial_remaining_time=0, ), "OpenSourceRelationalDatabases": Pricing( resource_id=resource_id, + resource_name="Defender plan Servers", pricing_tier="Standard", free_trial_remaining_time=0, ), "CosmosDbs": Pricing( resource_id=resource_id, + resource_name="Defender plan Servers", pricing_tier="Standard", free_trial_remaining_time=0, ), @@ -206,7 +214,7 @@ class Test_defender_ensure_defender_for_databases_is_on: == f"Defender plan Defender for Databases from subscription {AZURE_SUBSCRIPTION_ID} is set to ON (pricing tier standard)." ) assert result[0].subscription == AZURE_SUBSCRIPTION_ID - assert result[0].resource_name == "Defender plan Databases" + assert result[0].resource_name == "Defender plan Servers" assert result[0].resource_id == resource_id def test_defender_databases_cosmosdb_not_standard(self): @@ -216,21 +224,25 @@ class Test_defender_ensure_defender_for_databases_is_on: AZURE_SUBSCRIPTION_ID: { "SqlServers": Pricing( resource_id=resource_id, + resource_name="Defender plan Servers", pricing_tier="Standard", free_trial_remaining_time=0, ), "SqlServerVirtualMachines": Pricing( resource_id=resource_id, + resource_name="Defender plan Servers", pricing_tier="Standard", free_trial_remaining_time=0, ), "OpenSourceRelationalDatabases": Pricing( resource_id=resource_id, + resource_name="Defender plan Servers", pricing_tier="Standard", free_trial_remaining_time=0, ), "CosmosDbs": Pricing( resource_id=resource_id, + resource_name="Defender plan Servers", pricing_tier="Not Standard", free_trial_remaining_time=0, ), @@ -260,5 +272,5 @@ class Test_defender_ensure_defender_for_databases_is_on: == f"Defender plan Defender for Databases from subscription {AZURE_SUBSCRIPTION_ID} is set to OFF (pricing tier not standard)." ) assert result[0].subscription == AZURE_SUBSCRIPTION_ID - assert result[0].resource_name == "Defender plan Databases" + assert result[0].resource_name == "Defender plan Servers" assert result[0].resource_id == resource_id diff --git a/tests/providers/azure/services/defender/defender_ensure_defender_for_dns_is_on/defender_ensure_defender_for_dns_is_on_test.py b/tests/providers/azure/services/defender/defender_ensure_defender_for_dns_is_on/defender_ensure_defender_for_dns_is_on_test.py index 64d81487f0..22729f4677 100644 --- a/tests/providers/azure/services/defender/defender_ensure_defender_for_dns_is_on/defender_ensure_defender_for_dns_is_on_test.py +++ b/tests/providers/azure/services/defender/defender_ensure_defender_for_dns_is_on/defender_ensure_defender_for_dns_is_on_test.py @@ -38,6 +38,7 @@ class Test_defender_ensure_defender_for_dns_is_on: AZURE_SUBSCRIPTION_ID: { "Dns": Pricing( resource_id=resource_id, + resource_name="Defender plan Servers", pricing_tier="Not Standard", free_trial_remaining_time=0, ) @@ -77,6 +78,7 @@ class Test_defender_ensure_defender_for_dns_is_on: AZURE_SUBSCRIPTION_ID: { "Dns": Pricing( resource_id=resource_id, + resource_name="Defender plan Servers", pricing_tier="Standard", free_trial_remaining_time=0, ) diff --git a/tests/providers/azure/services/defender/defender_ensure_defender_for_keyvault_is_on/defender_ensure_defender_for_keyvault_is_on_test.py b/tests/providers/azure/services/defender/defender_ensure_defender_for_keyvault_is_on/defender_ensure_defender_for_keyvault_is_on_test.py index 4c4315e75c..f2ef503114 100644 --- a/tests/providers/azure/services/defender/defender_ensure_defender_for_keyvault_is_on/defender_ensure_defender_for_keyvault_is_on_test.py +++ b/tests/providers/azure/services/defender/defender_ensure_defender_for_keyvault_is_on/defender_ensure_defender_for_keyvault_is_on_test.py @@ -38,6 +38,7 @@ class Test_defender_ensure_defender_for_keyvault_is_on: AZURE_SUBSCRIPTION_ID: { "KeyVaults": Pricing( resource_id=resource_id, + resource_name="Defender plan Servers", pricing_tier="Not Standard", free_trial_remaining_time=0, ) @@ -77,6 +78,7 @@ class Test_defender_ensure_defender_for_keyvault_is_on: AZURE_SUBSCRIPTION_ID: { "KeyVaults": Pricing( resource_id=resource_id, + resource_name="Defender plan Servers", pricing_tier="Standard", free_trial_remaining_time=0, ) diff --git a/tests/providers/azure/services/defender/defender_ensure_defender_for_os_relational_databases_is_on/defender_ensure_defender_for_os_relational_databases_is_on_test.py b/tests/providers/azure/services/defender/defender_ensure_defender_for_os_relational_databases_is_on/defender_ensure_defender_for_os_relational_databases_is_on_test.py index 48ddb8b72d..a00ad47526 100644 --- a/tests/providers/azure/services/defender/defender_ensure_defender_for_os_relational_databases_is_on/defender_ensure_defender_for_os_relational_databases_is_on_test.py +++ b/tests/providers/azure/services/defender/defender_ensure_defender_for_os_relational_databases_is_on/defender_ensure_defender_for_os_relational_databases_is_on_test.py @@ -38,6 +38,7 @@ class Test_defender_ensure_defender_for_os_relational_databases_is_on: AZURE_SUBSCRIPTION_ID: { "OpenSourceRelationalDatabases": Pricing( resource_id=resource_id, + resource_name="Defender plan Servers", pricing_tier="Not Standard", free_trial_remaining_time=0, ) @@ -80,6 +81,7 @@ class Test_defender_ensure_defender_for_os_relational_databases_is_on: AZURE_SUBSCRIPTION_ID: { "OpenSourceRelationalDatabases": Pricing( resource_id=resource_id, + resource_name="Defender plan Servers", pricing_tier="Standard", free_trial_remaining_time=0, ) diff --git a/tests/providers/azure/services/defender/defender_ensure_defender_for_server_is_on/defender_ensure_defender_for_server_is_on_test.py b/tests/providers/azure/services/defender/defender_ensure_defender_for_server_is_on/defender_ensure_defender_for_server_is_on_test.py index 17405d9f6d..460a206150 100644 --- a/tests/providers/azure/services/defender/defender_ensure_defender_for_server_is_on/defender_ensure_defender_for_server_is_on_test.py +++ b/tests/providers/azure/services/defender/defender_ensure_defender_for_server_is_on/defender_ensure_defender_for_server_is_on_test.py @@ -38,6 +38,7 @@ class Test_defender_ensure_defender_for_server_is_on: AZURE_SUBSCRIPTION_ID: { "VirtualMachines": Pricing( resource_id=resource_id, + resource_name="Defender plan Servers", pricing_tier="Not Standard", free_trial_remaining_time=0, ) @@ -77,6 +78,7 @@ class Test_defender_ensure_defender_for_server_is_on: AZURE_SUBSCRIPTION_ID: { "VirtualMachines": Pricing( resource_id=resource_id, + resource_name="Defender plan Servers", pricing_tier="Standard", free_trial_remaining_time=0, ) diff --git a/tests/providers/azure/services/defender/defender_ensure_defender_for_sql_servers_is_on/defender_ensure_defender_for_sql_servers_is_on_test.py b/tests/providers/azure/services/defender/defender_ensure_defender_for_sql_servers_is_on/defender_ensure_defender_for_sql_servers_is_on_test.py index 72e1f82257..c99a270e89 100644 --- a/tests/providers/azure/services/defender/defender_ensure_defender_for_sql_servers_is_on/defender_ensure_defender_for_sql_servers_is_on_test.py +++ b/tests/providers/azure/services/defender/defender_ensure_defender_for_sql_servers_is_on/defender_ensure_defender_for_sql_servers_is_on_test.py @@ -38,6 +38,7 @@ class Test_defender_ensure_defender_for_sql_servers_is_on: AZURE_SUBSCRIPTION_ID: { "SqlServerVirtualMachines": Pricing( resource_id=resource_id, + resource_name="Defender plan Servers", pricing_tier="Not Standard", free_trial_remaining_time=0, ) @@ -77,6 +78,7 @@ class Test_defender_ensure_defender_for_sql_servers_is_on: AZURE_SUBSCRIPTION_ID: { "SqlServerVirtualMachines": Pricing( resource_id=resource_id, + resource_name="Defender plan Servers", pricing_tier="Standard", free_trial_remaining_time=0, ) diff --git a/tests/providers/azure/services/defender/defender_ensure_defender_for_storage_is_on/defender_ensure_defender_for_storage_is_on_test.py b/tests/providers/azure/services/defender/defender_ensure_defender_for_storage_is_on/defender_ensure_defender_for_storage_is_on_test.py index 53db01231c..d3d22ee1d7 100644 --- a/tests/providers/azure/services/defender/defender_ensure_defender_for_storage_is_on/defender_ensure_defender_for_storage_is_on_test.py +++ b/tests/providers/azure/services/defender/defender_ensure_defender_for_storage_is_on/defender_ensure_defender_for_storage_is_on_test.py @@ -38,6 +38,7 @@ class Test_defender_ensure_defender_for_storage_is_on: AZURE_SUBSCRIPTION_ID: { "StorageAccounts": Pricing( resource_id=resource_id, + resource_name="Defender plan Servers", pricing_tier="Not Standard", free_trial_remaining_time=0, ) @@ -77,6 +78,7 @@ class Test_defender_ensure_defender_for_storage_is_on: AZURE_SUBSCRIPTION_ID: { "StorageAccounts": Pricing( resource_id=resource_id, + resource_name="Defender plan Servers", pricing_tier="Standard", free_trial_remaining_time=0, ) diff --git a/tests/providers/azure/services/defender/defender_service_test.py b/tests/providers/azure/services/defender/defender_service_test.py index 8fb0437338..ccf4260885 100644 --- a/tests/providers/azure/services/defender/defender_service_test.py +++ b/tests/providers/azure/services/defender/defender_service_test.py @@ -21,6 +21,7 @@ def mock_defender_get_pricings(_): AZURE_SUBSCRIPTION_ID: { "Standard": Pricing( resource_id="resource_id", + resource_name="resource_name", pricing_tier="pricing_tier", free_trial_remaining_time=timedelta(days=1), extensions={}, @@ -140,6 +141,10 @@ class Test_Defender_Service: defender.pricings[AZURE_SUBSCRIPTION_ID]["Standard"].resource_id == "resource_id" ) + assert ( + defender.pricings[AZURE_SUBSCRIPTION_ID]["Standard"].resource_name + == "resource_name" + ) assert ( defender.pricings[AZURE_SUBSCRIPTION_ID]["Standard"].pricing_tier == "pricing_tier" diff --git a/tests/providers/azure/services/iam/iam_custom_role_has_permissions_to_administer_resource_locks/iam_custom_role_has_permissions_to_administer_resource_locks_test.py b/tests/providers/azure/services/iam/iam_custom_role_has_permissions_to_administer_resource_locks/iam_custom_role_has_permissions_to_administer_resource_locks_test.py index 90c838317d..760015e6a1 100644 --- a/tests/providers/azure/services/iam/iam_custom_role_has_permissions_to_administer_resource_locks/iam_custom_role_has_permissions_to_administer_resource_locks_test.py +++ b/tests/providers/azure/services/iam/iam_custom_role_has_permissions_to_administer_resource_locks/iam_custom_role_has_permissions_to_administer_resource_locks_test.py @@ -198,3 +198,25 @@ class Test_iam_custom_role_has_permissions_to_administer_resource_locks: result[0].resource_id == defender_client.custom_roles[AZURE_SUBSCRIPTION_ID][0].id ) + + def test_iam_custom_roles_empty_list_but_with_key(self): + defender_client = mock.MagicMock + defender_client.custom_roles = {AZURE_SUBSCRIPTION_ID: []} + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_azure_provider(), + ), + mock.patch( + "prowler.providers.azure.services.iam.iam_custom_role_has_permissions_to_administer_resource_locks.iam_custom_role_has_permissions_to_administer_resource_locks.iam_client", + new=defender_client, + ), + ): + from prowler.providers.azure.services.iam.iam_custom_role_has_permissions_to_administer_resource_locks.iam_custom_role_has_permissions_to_administer_resource_locks import ( + iam_custom_role_has_permissions_to_administer_resource_locks, + ) + + check = iam_custom_role_has_permissions_to_administer_resource_locks() + result = check.execute() + assert len(result) == 0 diff --git a/tests/providers/azure/services/network/network_http_internet_access_restricted/network_http_internet_access_restricted_test.py b/tests/providers/azure/services/network/network_http_internet_access_restricted/network_http_internet_access_restricted_test.py index 31cd18c2a3..9b8959777e 100644 --- a/tests/providers/azure/services/network/network_http_internet_access_restricted/network_http_internet_access_restricted_test.py +++ b/tests/providers/azure/services/network/network_http_internet_access_restricted/network_http_internet_access_restricted_test.py @@ -37,7 +37,7 @@ class Test_network_http_internet_access_restricted: result = check.execute() assert len(result) == 0 - def test_network_security_groups_no_security_rules(self): + def test_network_security_groups_none_destination_port_range(self): network_client = mock.MagicMock security_group_name = "Security Group Name" security_group_id = str(uuid4()) @@ -48,7 +48,15 @@ class Test_network_http_internet_access_restricted: id=security_group_id, name=security_group_name, location="location", - security_rules=[], + security_rules=[ + SecurityRule( + destination_port_range=None, + protocol="TCP", + source_address_prefix="Internet", + access="Allow", + direction="Inbound", + ) + ], ) ] } diff --git a/tests/providers/azure/services/network/network_rdp_internet_access_restricted/network_rdp_internet_access_restricted_test.py b/tests/providers/azure/services/network/network_rdp_internet_access_restricted/network_rdp_internet_access_restricted_test.py index f1410e1c7c..9f8c9b145a 100644 --- a/tests/providers/azure/services/network/network_rdp_internet_access_restricted/network_rdp_internet_access_restricted_test.py +++ b/tests/providers/azure/services/network/network_rdp_internet_access_restricted/network_rdp_internet_access_restricted_test.py @@ -37,6 +37,61 @@ class Test_network_rdp_internet_access_restricted: result = check.execute() assert len(result) == 0 + def test_network_security_groups_none_destination_port_range(self): + network_client = mock.MagicMock + security_group_name = "Security Group Name" + security_group_id = str(uuid4()) + + network_client.security_groups = { + AZURE_SUBSCRIPTION_ID: [ + SecurityGroup( + id=security_group_id, + name=security_group_name, + location="location", + security_rules=[ + SecurityRule( + destination_port_range=None, + protocol="TCP", + source_address_prefix="Internet", + access="Allow", + direction="Inbound", + ) + ], + ) + ] + } + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_azure_provider(), + ), + mock.patch( + "prowler.providers.azure.services.network.network_service.Network", + new=network_client, + ) as service_client, + mock.patch( + "prowler.providers.azure.services.network.network_client.network_client", + new=service_client, + ), + ): + from prowler.providers.azure.services.network.network_http_internet_access_restricted.network_http_internet_access_restricted import ( + network_http_internet_access_restricted, + ) + + check = network_http_internet_access_restricted() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == f"Security Group {security_group_name} from subscription {AZURE_SUBSCRIPTION_ID} has HTTP internet access restricted." + ) + assert result[0].subscription == AZURE_SUBSCRIPTION_ID + assert result[0].resource_name == security_group_name + assert result[0].resource_id == security_group_id + assert result[0].location == "location" + def test_network_security_groups_no_security_rules(self): network_client = mock.MagicMock security_group_name = "Security Group Name" diff --git a/tests/providers/azure/services/network/network_ssh_internet_access_restricted/network_ssh_internet_access_restricted_test.py b/tests/providers/azure/services/network/network_ssh_internet_access_restricted/network_ssh_internet_access_restricted_test.py index be567f6ae3..4472055075 100644 --- a/tests/providers/azure/services/network/network_ssh_internet_access_restricted/network_ssh_internet_access_restricted_test.py +++ b/tests/providers/azure/services/network/network_ssh_internet_access_restricted/network_ssh_internet_access_restricted_test.py @@ -37,6 +37,61 @@ class Test_network_ssh_internet_access_restricted: result = check.execute() assert len(result) == 0 + def test_network_security_groups_none_destination_port_range(self): + network_client = mock.MagicMock + security_group_name = "Security Group Name" + security_group_id = str(uuid4()) + + network_client.security_groups = { + AZURE_SUBSCRIPTION_ID: [ + SecurityGroup( + id=security_group_id, + name=security_group_name, + location="location", + security_rules=[ + SecurityRule( + destination_port_range=None, + protocol="TCP", + source_address_prefix="Internet", + access="Allow", + direction="Inbound", + ) + ], + ) + ] + } + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_azure_provider(), + ), + mock.patch( + "prowler.providers.azure.services.network.network_service.Network", + new=network_client, + ) as service_client, + mock.patch( + "prowler.providers.azure.services.network.network_client.network_client", + new=service_client, + ), + ): + from prowler.providers.azure.services.network.network_http_internet_access_restricted.network_http_internet_access_restricted import ( + network_http_internet_access_restricted, + ) + + check = network_http_internet_access_restricted() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == f"Security Group {security_group_name} from subscription {AZURE_SUBSCRIPTION_ID} has HTTP internet access restricted." + ) + assert result[0].subscription == AZURE_SUBSCRIPTION_ID + assert result[0].resource_name == security_group_name + assert result[0].resource_id == security_group_id + assert result[0].location == "location" + def test_network_security_groups_no_security_rules(self): network_client = mock.MagicMock security_group_name = "Security Group Name" diff --git a/tests/providers/azure/services/network/network_udp_internet_access_restricted/network_udp_internet_access_restricted_test.py b/tests/providers/azure/services/network/network_udp_internet_access_restricted/network_udp_internet_access_restricted_test.py index eea305e77b..7d519df326 100644 --- a/tests/providers/azure/services/network/network_udp_internet_access_restricted/network_udp_internet_access_restricted_test.py +++ b/tests/providers/azure/services/network/network_udp_internet_access_restricted/network_udp_internet_access_restricted_test.py @@ -37,6 +37,61 @@ class Test_network_udp_internet_access_restricted: result = check.execute() assert len(result) == 0 + def test_network_security_groups_none_source_address_prefix(self): + network_client = mock.MagicMock + security_group_name = "Security Group Name" + security_group_id = str(uuid4()) + + network_client.security_groups = { + AZURE_SUBSCRIPTION_ID: [ + SecurityGroup( + id=security_group_id, + name=security_group_name, + location="location", + security_rules=[ + SecurityRule( + destination_port_range=None, + protocol="TCP", + source_address_prefix=None, + access="Allow", + direction="Inbound", + ) + ], + ) + ] + } + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_azure_provider(), + ), + mock.patch( + "prowler.providers.azure.services.network.network_service.Network", + new=network_client, + ) as service_client, + mock.patch( + "prowler.providers.azure.services.network.network_client.network_client", + new=service_client, + ), + ): + from prowler.providers.azure.services.network.network_http_internet_access_restricted.network_http_internet_access_restricted import ( + network_http_internet_access_restricted, + ) + + check = network_http_internet_access_restricted() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == f"Security Group {security_group_name} from subscription {AZURE_SUBSCRIPTION_ID} has HTTP internet access restricted." + ) + assert result[0].subscription == AZURE_SUBSCRIPTION_ID + assert result[0].resource_name == security_group_name + assert result[0].resource_id == security_group_id + assert result[0].location == "location" + def test_network_security_groups_no_security_rules(self): network_client = mock.MagicMock security_group_name = "Security Group Name" diff --git a/tests/providers/azure/services/storage/storage_default_network_access_rule_is_denied/storage_default_network_access_rule_is_denied_test.py b/tests/providers/azure/services/storage/storage_default_network_access_rule_is_denied/storage_default_network_access_rule_is_denied_test.py index ad80b1e80a..9ed07a4644 100644 --- a/tests/providers/azure/services/storage/storage_default_network_access_rule_is_denied/storage_default_network_access_rule_is_denied_test.py +++ b/tests/providers/azure/services/storage/storage_default_network_access_rule_is_denied/storage_default_network_access_rule_is_denied_test.py @@ -1,9 +1,10 @@ from unittest import mock from uuid import uuid4 -from azure.mgmt.storage.v2022_09_01.models import NetworkRuleSet - -from prowler.providers.azure.services.storage.storage_service import Account +from prowler.providers.azure.services.storage.storage_service import ( + Account, + NetworkRuleSet, +) from tests.providers.azure.azure_fixtures import ( AZURE_SUBSCRIPTION_ID, set_mocked_azure_provider, @@ -46,7 +47,9 @@ class Test_storage_default_network_access_rule_is_denied: enable_https_traffic_only=False, infrastructure_encryption=False, allow_blob_public_access=None, - network_rule_set=NetworkRuleSet(default_action="Allow"), + network_rule_set=NetworkRuleSet( + default_action="Allow", bypass="AzureServices" + ), encryption_type=None, minimum_tls_version=None, key_expiration_period_in_days=None, @@ -96,7 +99,9 @@ class Test_storage_default_network_access_rule_is_denied: enable_https_traffic_only=False, infrastructure_encryption=False, allow_blob_public_access=None, - network_rule_set=NetworkRuleSet(default_action="Deny"), + network_rule_set=NetworkRuleSet( + default_action="Deny", bypass="AzureServices" + ), encryption_type=None, minimum_tls_version=None, key_expiration_period_in_days=None, diff --git a/tests/providers/azure/services/storage/storage_ensure_azure_services_are_trusted_to_access_is_enabled/storage_ensure_azure_services_are_trusted_to_access_is_enabled_test.py b/tests/providers/azure/services/storage/storage_ensure_azure_services_are_trusted_to_access_is_enabled/storage_ensure_azure_services_are_trusted_to_access_is_enabled_test.py index 7b2780eb89..7d8eb1b741 100644 --- a/tests/providers/azure/services/storage/storage_ensure_azure_services_are_trusted_to_access_is_enabled/storage_ensure_azure_services_are_trusted_to_access_is_enabled_test.py +++ b/tests/providers/azure/services/storage/storage_ensure_azure_services_are_trusted_to_access_is_enabled/storage_ensure_azure_services_are_trusted_to_access_is_enabled_test.py @@ -1,9 +1,10 @@ from unittest import mock from uuid import uuid4 -from azure.mgmt.storage.v2022_09_01.models import NetworkRuleSet - -from prowler.providers.azure.services.storage.storage_service import Account +from prowler.providers.azure.services.storage.storage_service import ( + Account, + NetworkRuleSet, +) from tests.providers.azure.azure_fixtures import ( AZURE_SUBSCRIPTION_ID, set_mocked_azure_provider, @@ -46,7 +47,9 @@ class Test_storage_ensure_azure_services_are_trusted_to_access_is_enabled: enable_https_traffic_only=False, infrastructure_encryption=False, allow_blob_public_access=None, - network_rule_set=NetworkRuleSet(bypass=[None]), + network_rule_set=NetworkRuleSet( + bypass="None", default_action="Deny" + ), encryption_type=None, minimum_tls_version=None, key_expiration_period_in_days=None, @@ -96,7 +99,9 @@ class Test_storage_ensure_azure_services_are_trusted_to_access_is_enabled: enable_https_traffic_only=False, infrastructure_encryption=False, allow_blob_public_access=None, - network_rule_set=NetworkRuleSet(bypass=["AzureServices"]), + network_rule_set=NetworkRuleSet( + bypass="AzureServices", default_action="Allow" + ), encryption_type=None, minimum_tls_version=None, key_expiration_period_in_days=None, diff --git a/tests/providers/azure/services/storage/storage_ensure_private_endpoints_in_storage_accounts/storage_ensure_private_endpoints_in_storage_accounts_test.py b/tests/providers/azure/services/storage/storage_ensure_private_endpoints_in_storage_accounts/storage_ensure_private_endpoints_in_storage_accounts_test.py index a446cb2d57..50f7dfc2d2 100644 --- a/tests/providers/azure/services/storage/storage_ensure_private_endpoints_in_storage_accounts/storage_ensure_private_endpoints_in_storage_accounts_test.py +++ b/tests/providers/azure/services/storage/storage_ensure_private_endpoints_in_storage_accounts/storage_ensure_private_endpoints_in_storage_accounts_test.py @@ -1,9 +1,10 @@ from unittest import mock from uuid import uuid4 -from azure.mgmt.storage.v2023_01_01.models import PrivateEndpointConnection - -from prowler.providers.azure.services.storage.storage_service import Account +from prowler.providers.azure.services.storage.storage_service import ( + Account, + PrivateEndpointConnection, +) from tests.providers.azure.azure_fixtures import ( AZURE_SUBSCRIPTION_ID, set_mocked_azure_provider, @@ -105,7 +106,13 @@ class Test_storage_ensure_private_endpoints_in_storage_accounts: minimum_tls_version=None, key_expiration_period_in_days=None, location="westeurope", - private_endpoint_connections=PrivateEndpointConnection(), + private_endpoint_connections=PrivateEndpointConnection( + id=str( + uuid4(), + ), + name="Test Private Endpoint Connection", + type="Test Type", + ), ) ] } diff --git a/tests/providers/azure/services/storage/storage_ensure_soft_delete_is_enabled/storage_ensure_soft_delete_is_enabled_test.py b/tests/providers/azure/services/storage/storage_ensure_soft_delete_is_enabled/storage_ensure_soft_delete_is_enabled_test.py index 6992a523c9..3bac97b5b5 100644 --- a/tests/providers/azure/services/storage/storage_ensure_soft_delete_is_enabled/storage_ensure_soft_delete_is_enabled_test.py +++ b/tests/providers/azure/services/storage/storage_ensure_soft_delete_is_enabled/storage_ensure_soft_delete_is_enabled_test.py @@ -1,11 +1,10 @@ from unittest import mock from uuid import uuid4 -from azure.mgmt.storage.v2023_01_01.models import DeleteRetentionPolicy - from prowler.providers.azure.services.storage.storage_service import ( Account, BlobProperties, + DeleteRetentionPolicy, ) from tests.providers.azure.azure_fixtures import ( AZURE_SUBSCRIPTION_ID, @@ -90,7 +89,9 @@ class Test_storage_ensure_soft_delete_is_enabled: name=None, type=None, default_service_version=None, - container_delete_retention_policy=DeleteRetentionPolicy(enabled=False), + container_delete_retention_policy=DeleteRetentionPolicy( + enabled=False, days=7 + ), ) storage_client.storage_accounts = { AZURE_SUBSCRIPTION_ID: [ @@ -150,7 +151,9 @@ class Test_storage_ensure_soft_delete_is_enabled: name=None, type=None, default_service_version=None, - container_delete_retention_policy=DeleteRetentionPolicy(enabled=True), + container_delete_retention_policy=DeleteRetentionPolicy( + enabled=True, days=7 + ), ) storage_client.storage_accounts = { AZURE_SUBSCRIPTION_ID: [ diff --git a/tests/providers/azure/services/vm/vm_service_test.py b/tests/providers/azure/services/vm/vm_service_test.py index 5bd225e1bf..6e0f53e2e5 100644 --- a/tests/providers/azure/services/vm/vm_service_test.py +++ b/tests/providers/azure/services/vm/vm_service_test.py @@ -41,6 +41,32 @@ def mock_vm_get_virtual_machines(_): } +def mock_vm_get_virtual_machines_with_none(_): + return { + AZURE_SUBSCRIPTION_ID: { + "vm_id-1": VirtualMachine( + resource_id="/subscriptions/resource_id", + resource_name="VMWithNoneValues", + location="location", + security_profile=None, + extensions=None, + storage_profile=None, + ), + "vm_id-2": VirtualMachine( + resource_id="/subscriptions/resource_id2", + resource_name="VMWithPartialNone", + location="location", + security_profile=None, + extensions=None, + storage_profile=StorageProfile( + os_disk=None, + data_disks=None, + ), + ), + } + } + + def mock_vm_get_disks(_): return { AZURE_SUBSCRIPTION_ID: { @@ -137,3 +163,22 @@ class Test_VirtualMachines_Service: disks[AZURE_SUBSCRIPTION_ID]["disk_id-1"].encryption_type == "EncryptionAtRestWithPlatformKey" ) + + +@patch( + "prowler.providers.azure.services.vm.vm_service.VirtualMachines._get_virtual_machines", + new=mock_vm_get_virtual_machines_with_none, +) +class Test_VirtualMachines_NoneCases: + def test_virtual_machine_with_none_storage_profile(self): + virtual_machines = VirtualMachines(set_mocked_azure_provider()) + vm_1 = virtual_machines.virtual_machines[AZURE_SUBSCRIPTION_ID]["vm_id-1"] + assert vm_1.storage_profile is None + assert vm_1.resource_name == "VMWithNoneValues" + + def test_virtual_machine_with_partial_none_storage_profile(self): + virtual_machines = VirtualMachines(set_mocked_azure_provider()) + vm_2 = virtual_machines.virtual_machines[AZURE_SUBSCRIPTION_ID]["vm_id-2"] + assert vm_2.storage_profile.os_disk is None + assert vm_2.storage_profile.data_disks is None + assert vm_2.resource_name == "VMWithPartialNone" diff --git a/tests/providers/azure/services/vm/vm_trusted_launch_enabled/vm_trusted_launch_enabled_test.py b/tests/providers/azure/services/vm/vm_trusted_launch_enabled/vm_trusted_launch_enabled_test.py index 8f81756561..05e96a5c1d 100644 --- a/tests/providers/azure/services/vm/vm_trusted_launch_enabled/vm_trusted_launch_enabled_test.py +++ b/tests/providers/azure/services/vm/vm_trusted_launch_enabled/vm_trusted_launch_enabled_test.py @@ -158,3 +158,52 @@ class Test_vm_trusted_launch_enabled: result[0].status_extended == f"VM VMTest has trusted launch disabled in subscription {AZURE_SUBSCRIPTION_ID}" ) + + def test_vm_no_security_profile(self): + vm_id = str(uuid4()) + vm_client = mock.MagicMock + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_azure_provider(), + ), + mock.patch( + "prowler.providers.azure.services.vm.vm_trusted_launch_enabled.vm_trusted_launch_enabled.vm_client", + new=vm_client, + ), + ): + from prowler.providers.azure.services.vm.vm_service import VirtualMachine + from prowler.providers.azure.services.vm.vm_trusted_launch_enabled.vm_trusted_launch_enabled import ( + vm_trusted_launch_enabled, + ) + + vm_client.virtual_machines = { + AZURE_SUBSCRIPTION_ID: { + vm_id: VirtualMachine( + resource_id=vm_id, + resource_name="VMTest", + location="location", + security_profile=None, + extensions=[], + storage_profile=mock.MagicMock( + os_disk=mock.MagicMock( + create_option="FromImage", + managed_disk=mock.MagicMock(id="managed_disk_id"), + ), + data_disks=[], + ), + ) + } + } + + check = vm_trusted_launch_enabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert result[0].subscription == AZURE_SUBSCRIPTION_ID + assert result[0].resource_name == "VMTest" + assert result[0].resource_id == vm_id + assert ( + result[0].status_extended + == f"VM VMTest has trusted launch disabled in subscription {AZURE_SUBSCRIPTION_ID}" + ) diff --git a/tests/providers/gcp/gcp_fixtures.py b/tests/providers/gcp/gcp_fixtures.py index d11b1cc508..e41884d0c1 100644 --- a/tests/providers/gcp/gcp_fixtures.py +++ b/tests/providers/gcp/gcp_fixtures.py @@ -351,6 +351,83 @@ def mock_api_projects_calls(client: MagicMock): }, ] } + + client.projects().timeSeries().list().execute.return_value = { + "timeSeries": [ + { + "metric": { + "labels": { + "key_id": "key1", + }, + "type": "iam.googleapis.com/service_account/key/authn_events_count", + }, + "resource": { + "type": "iam_service_account", + "labels": { + "project_id": "{GCP_PROJECT_ID}", + "unique_id": "111222233334444", + }, + }, + "metricKind": "DELTA", + "valueType": "INT64", + }, + { + "metric": { + "labels": { + "key_id": "key2", + }, + "type": "iam.googleapis.com/service_account/key/authn_events_count", + }, + "resource": { + "type": "iam_service_account", + "labels": { + "project_id": "{GCP_PROJECT_ID}", + "unique_id": "111222233334444", + }, + }, + "metricKind": "DELTA", + "valueType": "INT64", + }, + { + "metric": { + "labels": { + "response_code": "200", + "protocol": "https", + }, + "type": "serviceruntime.googleapis.com/api/request_count", + }, + "resource": { + "type": "consumed_api", + "labels": { + "service": "securitycenter.googleapis.com", + "project_id": "{GCP_PROJECT_ID}", + "credential_id": "serviceaccount:111222233334444", + }, + }, + "metricKind": "DELTA", + "valueType": "INT64", + }, + { + "metric": { + "labels": { + "response_code": "200", + "protocol": "https", + }, + "type": "serviceruntime.googleapis.com/api/request_count", + }, + "resource": { + "type": "consumed_api", + "labels": { + "service": "securitycenter.googleapis.com", + "project_id": "{GCP_PROJECT_ID}", + "credential_id": "serviceaccount:55566666777888999", + }, + }, + "metricKind": "DELTA", + "valueType": "INT64", + }, + ] + } client.projects().alertPolicies().list_next.return_value = None # Used by IAM client.projects().serviceAccounts().list().execute.return_value = { @@ -359,11 +436,13 @@ def mock_api_projects_calls(client: MagicMock): "name": f"projects/{GCP_PROJECT_ID}/serviceAccounts/service-account1@{GCP_PROJECT_ID}.iam.gserviceaccount.com", "email": "service-account1@gmail.com", "displayName": "Service Account 1", + "uniqueId": "111222233334444", }, { "name": f"projects/{GCP_PROJECT_ID}/serviceAccounts/service-account2@{GCP_PROJECT_ID}.iam.gserviceaccount.com", "email": "service-account2@gmail.com", "displayName": "Service Account 2", + "uniqueId": "55566666777888999", }, ] } @@ -887,6 +966,22 @@ def mock_api_urlMaps_calls(client: MagicMock): } client.urlMaps().list_next.return_value = None + client.regionUrlMaps().list().execute.return_value = { + "items": [ + { + "name": "regional_url_map1", + "id": str(uuid4()), + "defaultService": "regional_service1", + }, + { + "name": "regional_url_map2", + "id": str(uuid4()), + "defaultService": "regional_service2", + }, + ] + } + client.regionUrlMaps().list_next.return_value = None + client.backendServices().get().execute.side_effect = [ { "logConfig": {"enable": True}, diff --git a/tests/providers/gcp/gcp_provider_test.py b/tests/providers/gcp/gcp_provider_test.py index c82e5320a8..8a10350d7d 100644 --- a/tests/providers/gcp/gcp_provider_test.py +++ b/tests/providers/gcp/gcp_provider_test.py @@ -86,7 +86,10 @@ class TestGCPProvider: assert gcp_provider.projects == projects assert gcp_provider.default_project_id == "test-project" assert gcp_provider.identity == GCPIdentityInfo(profile="default") - assert gcp_provider.audit_config == {"shodan_api_key": None} + assert gcp_provider.audit_config == { + "shodan_api_key": None, + "max_unused_account_days": 180, + } @freeze_time(datetime.today()) def test_is_project_matching(self): @@ -320,6 +323,26 @@ class TestGCPProvider: == "test-impersonate-service-account" ) + def test_setup_session_with_access_token(self, monkeypatch): + from google.oauth2.credentials import Credentials as TokenCredentials + + access_token = "fake-access-token" + default_project_id = "test-access-token-project" + + monkeypatch.setenv("CLOUDSDK_AUTH_ACCESS_TOKEN", access_token) + monkeypatch.setenv("GOOGLE_CLOUD_PROJECT", default_project_id) + + session, project_id = GcpProvider.setup_session( + credentials_file=None, + service_account=None, + gcp_credentials=None, + service_account_key=None, + ) + + assert isinstance(session, TokenCredentials) + assert session.token == access_token + assert project_id == default_project_id + def test_setup_session_with_organization_id(self): mocked_credentials = MagicMock() @@ -810,6 +833,7 @@ class TestGCPProvider: ): with pytest.raises(Exception) as e: GcpProvider.test_connection( + provider_id="test-provider-id", client_id="test-client-id", client_secret="test-client-secret", refresh_token="test-refresh-token", @@ -817,6 +841,20 @@ class TestGCPProvider: assert e.type == GCPTestConnectionError assert "Test exception" in e.value.args[0] + def test_test_connection_with_exception_no_project_id(self): + with patch( + "prowler.providers.gcp.gcp_provider.GcpProvider.setup_session", + side_effect=GCPInvalidProviderIdError("Test exception"), + ): + with pytest.raises(GCPInvalidProviderIdError) as e: + GcpProvider.test_connection( + client_id="test-client-id", + client_secret="test-client-secret", + refresh_token="test-refresh-token", + ) + assert e.type == GCPInvalidProviderIdError + assert "[3008] Provider ID is required." in e.value.args[0] + def test_test_connection_with_exception_service_account_key(self): with patch( "prowler.providers.gcp.gcp_provider.GcpProvider.setup_session", @@ -824,6 +862,7 @@ class TestGCPProvider: ): with pytest.raises(Exception) as e: GcpProvider.test_connection( + provider_id="test-provider-id", service_account_key={"test": "key"}, ) assert e.type == GCPTestConnectionError diff --git a/tests/providers/gcp/services/compute/compute_loadbalancer_logging_enabled/compute_loadbalancer_logging_enabled_test.py b/tests/providers/gcp/services/compute/compute_loadbalancer_logging_enabled/compute_loadbalancer_logging_enabled_test.py index aaefebcb23..12fa95d1ce 100644 --- a/tests/providers/gcp/services/compute/compute_loadbalancer_logging_enabled/compute_loadbalancer_logging_enabled_test.py +++ b/tests/providers/gcp/services/compute/compute_loadbalancer_logging_enabled/compute_loadbalancer_logging_enabled_test.py @@ -115,3 +115,34 @@ class Test_compute_loadbalancer_logging_enabled: assert result[0].resource_name == load_balancer.name assert result[0].project_id == GCP_PROJECT_ID assert result[0].location == compute_client.region + + def test_one_load_balancer_without_backend_service(self): + from prowler.providers.gcp.services.compute.compute_service import LoadBalancer + + load_balancer = LoadBalancer( + name="test", id="test_id", project_id=GCP_PROJECT_ID, service="" + ) + + compute_client = mock.MagicMock() + compute_client.project_ids = [GCP_PROJECT_ID] + compute_client.load_balancers = [load_balancer] + compute_client.region = "global" + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_gcp_provider(), + ), + mock.patch( + "prowler.providers.gcp.services.compute.compute_loadbalancer_logging_enabled.compute_loadbalancer_logging_enabled.compute_client", + new=compute_client, + ), + ): + from prowler.providers.gcp.services.compute.compute_loadbalancer_logging_enabled.compute_loadbalancer_logging_enabled import ( + compute_loadbalancer_logging_enabled, + ) + + check = compute_loadbalancer_logging_enabled() + result = check.execute() + + assert len(result) == 0 diff --git a/tests/providers/gcp/services/compute/compute_project_os_login_enabled/compute_project_os_login_enabled_test.py b/tests/providers/gcp/services/compute/compute_project_os_login_enabled/compute_project_os_login_enabled_test.py index b1ace7cc62..abfd4ea361 100644 --- a/tests/providers/gcp/services/compute/compute_project_os_login_enabled/compute_project_os_login_enabled_test.py +++ b/tests/providers/gcp/services/compute/compute_project_os_login_enabled/compute_project_os_login_enabled_test.py @@ -75,6 +75,7 @@ class Test_compute_project_os_login_enabled: result[0].status_extended, ) assert result[0].resource_id == project.id + assert result[0].resource_name == "test" assert result[0].location == "global" assert result[0].project_id == GCP_PROJECT_ID @@ -124,5 +125,6 @@ class Test_compute_project_os_login_enabled: result[0].status_extended, ) assert result[0].resource_id == project.id + assert result[0].resource_name == "test" assert result[0].location == "global" assert result[0].project_id == GCP_PROJECT_ID diff --git a/tests/providers/gcp/services/compute/compute_service_test.py b/tests/providers/gcp/services/compute/compute_service_test.py index 24062d670e..0280744cec 100644 --- a/tests/providers/gcp/services/compute/compute_service_test.py +++ b/tests/providers/gcp/services/compute/compute_service_test.py @@ -159,19 +159,24 @@ class TestComputeService: assert compute_client.firewalls[2].direction == "INGRESS" assert compute_client.firewalls[2].project_id == GCP_PROJECT_ID - assert len(compute_client.load_balancers) == 2 + assert len(compute_client.load_balancers) == 4 assert compute_client.load_balancers[0].name == "url_map1" assert compute_client.load_balancers[0].id.__class__.__name__ == "str" assert compute_client.load_balancers[0].service == "service1" assert compute_client.load_balancers[0].project_id == GCP_PROJECT_ID - + assert compute_client.load_balancers[0].logging assert compute_client.load_balancers[1].name == "url_map2" assert compute_client.load_balancers[1].id.__class__.__name__ == "str" assert compute_client.load_balancers[1].service == "service2" assert compute_client.load_balancers[1].project_id == GCP_PROJECT_ID - - assert len(compute_client.load_balancers) == 2 - - assert compute_client.load_balancers[0].logging - assert not compute_client.load_balancers[1].logging + assert compute_client.load_balancers[2].name == "regional_url_map1" + assert compute_client.load_balancers[2].id.__class__.__name__ == "str" + assert compute_client.load_balancers[2].service == "regional_service1" + assert compute_client.load_balancers[2].project_id == GCP_PROJECT_ID + assert not compute_client.load_balancers[2].logging + assert compute_client.load_balancers[3].name == "regional_url_map2" + assert compute_client.load_balancers[3].id.__class__.__name__ == "str" + assert compute_client.load_balancers[3].service == "regional_service2" + assert compute_client.load_balancers[3].project_id == GCP_PROJECT_ID + assert not compute_client.load_balancers[3].logging diff --git a/tests/providers/gcp/services/iam/iam_audit_logs_enabled/iam_audit_logs_enabled_test.py b/tests/providers/gcp/services/iam/iam_audit_logs_enabled/iam_audit_logs_enabled_test.py index de6a2ddc6a..1056b4f055 100644 --- a/tests/providers/gcp/services/iam/iam_audit_logs_enabled/iam_audit_logs_enabled_test.py +++ b/tests/providers/gcp/services/iam/iam_audit_logs_enabled/iam_audit_logs_enabled_test.py @@ -76,6 +76,7 @@ class Test_iam_audit_logs_enabled: r.status_extended, ) assert r.resource_id == GCP_PROJECT_ID + assert r.resource_name == "test" assert r.project_id == GCP_PROJECT_ID assert r.location == cloudresourcemanager_client.region @@ -125,5 +126,6 @@ class Test_iam_audit_logs_enabled: r.status_extended, ) assert r.resource_id == GCP_PROJECT_ID + assert r.resource_name == "test" assert r.project_id == GCP_PROJECT_ID assert r.location == cloudresourcemanager_client.region diff --git a/tests/providers/gcp/services/iam/iam_sa_dormant_user_managed_keys/iam_sa_dormant_user_managed_keys_test.py b/tests/providers/gcp/services/iam/iam_sa_dormant_user_managed_keys/iam_sa_dormant_user_managed_keys_test.py new file mode 100644 index 0000000000..50a3932d6e --- /dev/null +++ b/tests/providers/gcp/services/iam/iam_sa_dormant_user_managed_keys/iam_sa_dormant_user_managed_keys_test.py @@ -0,0 +1,292 @@ +from datetime import datetime +from unittest import mock + +from tests.providers.gcp.gcp_fixtures import ( + GCP_PROJECT_ID, + GCP_US_CENTER1_LOCATION, + set_mocked_gcp_provider, +) + + +class Test_iam_sa_user_managed_key_unused: + def test_iam_no_sa(self): + iam_client = mock.MagicMock() + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_gcp_provider(), + ), + mock.patch( + "prowler.providers.gcp.services.iam.iam_sa_user_managed_key_unused.iam_sa_user_managed_key_unused.iam_client", + new=iam_client, + ), + ): + from prowler.providers.gcp.services.iam.iam_sa_user_managed_key_unused.iam_sa_user_managed_key_unused import ( + iam_sa_user_managed_key_unused, + ) + + iam_client.project_ids = [GCP_PROJECT_ID] + iam_client.region = GCP_US_CENTER1_LOCATION + iam_client.service_accounts = [] + + check = iam_sa_user_managed_key_unused() + result = check.execute() + assert len(result) == 0 + + def test_iam_sa_unused_no_keys(self): + iam_client = mock.MagicMock() + monitoring_client = mock.MagicMock() + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_gcp_provider(), + ), + mock.patch( + "prowler.providers.gcp.services.iam.iam_sa_user_managed_key_unused.iam_sa_user_managed_key_unused.iam_client", + new=iam_client, + ), + mock.patch( + "prowler.providers.gcp.services.iam.iam_sa_user_managed_key_unused.iam_sa_user_managed_key_unused.monitoring_client", + new=monitoring_client, + ), + ): + from prowler.providers.gcp.services.iam.iam_sa_user_managed_key_unused.iam_sa_user_managed_key_unused import ( + iam_sa_user_managed_key_unused, + ) + from prowler.providers.gcp.services.iam.iam_service import ServiceAccount + + iam_client.project_ids = [GCP_PROJECT_ID] + iam_client.region = GCP_US_CENTER1_LOCATION + + iam_client.service_accounts = [ + ServiceAccount( + name="projects/my-project/serviceAccounts/my-service-account@my-project.iam.gserviceaccount.com", + email="my-service-account@my-project.iam.gserviceaccount.com", + display_name="My service account", + keys=[], + project_id=GCP_PROJECT_ID, + uniqueId="111222233334444", + ) + ] + + monitoring_client.sa_keys_metrics = set( + ["90c48f61c65cd56224a12ab18e6ee9ca9c3aee7c"] + ) + + check = iam_sa_user_managed_key_unused() + result = check.execute() + assert len(result) == 0 + + def test_iam_sa_unused_system_managed_keys(self): + iam_client = mock.MagicMock() + monitoring_client = mock.MagicMock() + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_gcp_provider(), + ), + mock.patch( + "prowler.providers.gcp.services.iam.iam_sa_user_managed_key_unused.iam_sa_user_managed_key_unused.iam_client", + new=iam_client, + ), + mock.patch( + "prowler.providers.gcp.services.iam.iam_sa_user_managed_key_unused.iam_sa_user_managed_key_unused.monitoring_client", + new=monitoring_client, + ), + ): + from prowler.providers.gcp.services.iam.iam_sa_user_managed_key_unused.iam_sa_user_managed_key_unused import ( + iam_sa_user_managed_key_unused, + ) + from prowler.providers.gcp.services.iam.iam_service import ( + Key, + ServiceAccount, + ) + + iam_client.project_ids = [GCP_PROJECT_ID] + iam_client.region = GCP_US_CENTER1_LOCATION + + iam_client.service_accounts = [ + ServiceAccount( + name="projects/my-project/serviceAccounts/my-service-account@my-project.iam.gserviceaccount.com", + email="my-service-account@my-project.iam.gserviceaccount.com", + display_name="My service account", + keys=[ + Key( + name="90c48f61c65cd56224a12ab18e6ee9ca9c3aee7c", + origin="GOOGLE_PROVIDED", + type="SYSTEM_MANAGED", + valid_after=datetime.strptime("2024-07-10", "%Y-%m-%d"), + valid_before=datetime.strptime("9999-12-31", "%Y-%m-%d"), + ) + ], + project_id=GCP_PROJECT_ID, + uniqueId="111222233334444", + ) + ] + + monitoring_client.sa_keys_metrics = set( + ["90c48f61c65cd56224a12ab18e6ee9ca9c3aee7c"] + ) + + check = iam_sa_user_managed_key_unused() + result = check.execute() + assert len(result) == 0 + + def test_iam_sa_user_managed_key_unused(self): + iam_client = mock.MagicMock() + monitoring_client = mock.MagicMock() + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_gcp_provider(), + ), + mock.patch( + "prowler.providers.gcp.services.iam.iam_sa_user_managed_key_unused.iam_sa_user_managed_key_unused.iam_client", + new=iam_client, + ), + mock.patch( + "prowler.providers.gcp.services.iam.iam_sa_user_managed_key_unused.iam_sa_user_managed_key_unused.monitoring_client", + new=monitoring_client, + ), + ): + from prowler.providers.gcp.services.iam.iam_sa_user_managed_key_unused.iam_sa_user_managed_key_unused import ( + iam_sa_user_managed_key_unused, + ) + from prowler.providers.gcp.services.iam.iam_service import ( + Key, + ServiceAccount, + ) + + iam_client.project_ids = [GCP_PROJECT_ID] + iam_client.region = GCP_US_CENTER1_LOCATION + + iam_client.service_accounts = [ + ServiceAccount( + name="projects/my-project/serviceAccounts/my-service-account@my-project.iam.gserviceaccount.com", + email="my-service-account@my-project.iam.gserviceaccount.com", + display_name="My service account", + keys=[ + Key( + name="90c48f61c65cd56224a12ab18e6ee9ca9c3aee7c", + origin="GOOGLE_PROVIDED", + type="USER_MANAGED", + valid_after=datetime.strptime("2024-07-10", "%Y-%m-%d"), + valid_before=datetime.strptime("9999-12-31", "%Y-%m-%d"), + ) + ], + project_id=GCP_PROJECT_ID, + uniqueId="111222233334444", + ) + ] + + monitoring_client.sa_keys_metrics = set( + ["90c48f61c65cd56224a12ab18e6ee9ca9c3aee7c"] + ) + monitoring_client.audit_config = {"max_unused_account_days": 30} + + check = iam_sa_user_managed_key_unused() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == f"User-managed key {iam_client.service_accounts[0].keys[0].name} for Service Account {iam_client.service_accounts[0].email} was used over the last 30 days." + ) + assert result[0].resource_id == iam_client.service_accounts[0].keys[0].name + assert result[0].project_id == GCP_PROJECT_ID + assert result[0].location == GCP_US_CENTER1_LOCATION + assert result[0].resource_name == iam_client.service_accounts[0].email + + def test_iam_sa_unused_mixed_keys(self): + iam_client = mock.MagicMock() + monitoring_client = mock.MagicMock() + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_gcp_provider(), + ), + mock.patch( + "prowler.providers.gcp.services.iam.iam_sa_user_managed_key_unused.iam_sa_user_managed_key_unused.iam_client", + new=iam_client, + ), + mock.patch( + "prowler.providers.gcp.services.iam.iam_sa_user_managed_key_unused.iam_sa_user_managed_key_unused.monitoring_client", + new=monitoring_client, + ), + ): + from prowler.providers.gcp.services.iam.iam_sa_user_managed_key_unused.iam_sa_user_managed_key_unused import ( + iam_sa_user_managed_key_unused, + ) + from prowler.providers.gcp.services.iam.iam_service import ( + Key, + ServiceAccount, + ) + + iam_client.project_ids = [GCP_PROJECT_ID] + iam_client.region = GCP_US_CENTER1_LOCATION + + iam_client.service_accounts = [ + ServiceAccount( + name="projects/my-project/serviceAccounts/my-service-account@my-project.iam.gserviceaccount.com", + email="my-service-account@my-project.iam.gserviceaccount.com", + display_name="My service account", + keys=[ + Key( + name="90c48f61c65cd56224a12ab18e6ee9ca9c3aee7c", + origin="GOOGLE_PROVIDED", + type="SYSTEM_MANAGED", + valid_after=datetime.strptime("2024-07-10", "%Y-%m-%d"), + valid_before=datetime.strptime("9999-12-31", "%Y-%m-%d"), + ), + Key( + name="e5e3800831ac1adc8a5849da7d827b4724b1fce8", + origin="GOOGLE_PROVIDED", + type="USER_MANAGED", + valid_after=datetime.strptime("2024-07-10", "%Y-%m-%d"), + valid_before=datetime.strptime("9999-12-31", "%Y-%m-%d"), + ), + Key( + name="f8e4771561be5cda9b1267add7006c5143e3a220", + origin="GOOGLE_PROVIDED", + type="USER_MANAGED", + valid_after=datetime.strptime("2024-07-10", "%Y-%m-%d"), + valid_before=datetime.strptime("9999-12-31", "%Y-%m-%d"), + ), + ], + project_id=GCP_PROJECT_ID, + uniqueId="111222233334444", + ) + ] + + monitoring_client.sa_keys_metrics = set( + ["f8e4771561be5cda9b1267add7006c5143e3a220"] + ) + monitoring_client.audit_config = {"max_unused_account_days": 30} + + check = iam_sa_user_managed_key_unused() + result = check.execute() + assert len(result) == 2 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == f"User-managed key {iam_client.service_accounts[0].keys[1].name} for Service Account {iam_client.service_accounts[0].email} was not used over the last 30 days." + ) + assert result[0].resource_id == iam_client.service_accounts[0].keys[1].name + assert result[0].project_id == GCP_PROJECT_ID + assert result[0].location == GCP_US_CENTER1_LOCATION + assert result[0].resource_name == iam_client.service_accounts[0].email + + assert result[1].status == "PASS" + assert ( + result[1].status_extended + == f"User-managed key {iam_client.service_accounts[0].keys[2].name} for Service Account {iam_client.service_accounts[0].email} was used over the last 30 days." + ) + assert result[1].resource_id == iam_client.service_accounts[0].keys[2].name + assert result[1].project_id == GCP_PROJECT_ID + assert result[1].location == GCP_US_CENTER1_LOCATION + assert result[1].resource_name == iam_client.service_accounts[0].email diff --git a/tests/providers/gcp/services/iam/iam_sa_no_administrative_privileges/iam_sa_no_administrative_privileges_test.py b/tests/providers/gcp/services/iam/iam_sa_no_administrative_privileges/iam_sa_no_administrative_privileges_test.py index f55f8f3f10..f37d312f8a 100644 --- a/tests/providers/gcp/services/iam/iam_sa_no_administrative_privileges/iam_sa_no_administrative_privileges_test.py +++ b/tests/providers/gcp/services/iam/iam_sa_no_administrative_privileges/iam_sa_no_administrative_privileges_test.py @@ -66,6 +66,7 @@ class Test_iam_sa_no_administrative_privileges: display_name="My service account", keys=[], project_id=GCP_PROJECT_ID, + uniqueId="111222233334444", ) ] @@ -122,6 +123,7 @@ class Test_iam_sa_no_administrative_privileges: display_name="My service account", keys=[], project_id=GCP_PROJECT_ID, + uniqueId="111222233334444", ) ] @@ -187,6 +189,7 @@ class Test_iam_sa_no_administrative_privileges: display_name="My service account", keys=[], project_id=GCP_PROJECT_ID, + uniqueId="111222233334444", ) ] @@ -252,6 +255,7 @@ class Test_iam_sa_no_administrative_privileges: display_name="My service account", keys=[], project_id=GCP_PROJECT_ID, + uniqueId="111222233334444", ) ] @@ -317,6 +321,7 @@ class Test_iam_sa_no_administrative_privileges: display_name="My service account", keys=[], project_id=GCP_PROJECT_ID, + uniqueId="111222233334444", ) ] @@ -382,6 +387,7 @@ class Test_iam_sa_no_administrative_privileges: display_name="My service account", keys=[], project_id=GCP_PROJECT_ID, + uniqueId="111222233334444", ) ] @@ -447,6 +453,7 @@ class Test_iam_sa_no_administrative_privileges: display_name="My service account", keys=[], project_id=GCP_PROJECT_ID, + uniqueId="111222233334444", ) ] @@ -512,6 +519,7 @@ class Test_iam_sa_no_administrative_privileges: display_name="My service account", keys=[], project_id=GCP_PROJECT_ID, + uniqueId="111222233334444", ) ] diff --git a/tests/providers/gcp/services/iam/iam_sa_no_user_managed_keys/iam_sa_no_user_managed_keys_test.py b/tests/providers/gcp/services/iam/iam_sa_no_user_managed_keys/iam_sa_no_user_managed_keys_test.py index 9b49a21271..2fbd41df9f 100644 --- a/tests/providers/gcp/services/iam/iam_sa_no_user_managed_keys/iam_sa_no_user_managed_keys_test.py +++ b/tests/providers/gcp/services/iam/iam_sa_no_user_managed_keys/iam_sa_no_user_managed_keys_test.py @@ -62,6 +62,7 @@ class Test_iam_sa_no_user_managed_keys: display_name="My service account", keys=[], project_id=GCP_PROJECT_ID, + uniqueId="111222233334444", ) ] @@ -117,6 +118,7 @@ class Test_iam_sa_no_user_managed_keys: ) ], project_id=GCP_PROJECT_ID, + uniqueId="111222233334444", ) ] @@ -172,6 +174,7 @@ class Test_iam_sa_no_user_managed_keys: ) ], project_id=GCP_PROJECT_ID, + uniqueId="111222233334444", ) ] @@ -234,6 +237,7 @@ class Test_iam_sa_no_user_managed_keys: ), ], project_id=GCP_PROJECT_ID, + uniqueId="111222233334444", ) ] diff --git a/tests/providers/gcp/services/iam/iam_sa_user_managed_key_rotate_90_days/iam_sa_user_managed_key_rotate_90_days_test.py b/tests/providers/gcp/services/iam/iam_sa_user_managed_key_rotate_90_days/iam_sa_user_managed_key_rotate_90_days_test.py index 934f4f3222..8862136463 100644 --- a/tests/providers/gcp/services/iam/iam_sa_user_managed_key_rotate_90_days/iam_sa_user_managed_key_rotate_90_days_test.py +++ b/tests/providers/gcp/services/iam/iam_sa_user_managed_key_rotate_90_days/iam_sa_user_managed_key_rotate_90_days_test.py @@ -62,6 +62,7 @@ class Test_iam_sa_user_managed_key_rotate_90_days: display_name="My service account", keys=[], project_id=GCP_PROJECT_ID, + uniqueId="111222233334444", ) ] @@ -108,6 +109,7 @@ class Test_iam_sa_user_managed_key_rotate_90_days: ) ], project_id=GCP_PROJECT_ID, + uniqueId="111222233334444", ) ] @@ -166,6 +168,7 @@ class Test_iam_sa_user_managed_key_rotate_90_days: ) ], project_id=GCP_PROJECT_ID, + uniqueId="111222233334444", ) ] diff --git a/tests/providers/gcp/services/iam/iam_service_account_unused/iam_service_account_unused_test.py b/tests/providers/gcp/services/iam/iam_service_account_unused/iam_service_account_unused_test.py new file mode 100644 index 0000000000..d76200734d --- /dev/null +++ b/tests/providers/gcp/services/iam/iam_service_account_unused/iam_service_account_unused_test.py @@ -0,0 +1,181 @@ +from datetime import datetime +from unittest import mock + +from tests.providers.gcp.gcp_fixtures import ( + GCP_PROJECT_ID, + GCP_US_CENTER1_LOCATION, + set_mocked_gcp_provider, +) + + +class Test_iam_service_account_unused: + def test_iam_no_sa(self): + iam_client = mock.MagicMock() + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_gcp_provider(), + ), + mock.patch( + "prowler.providers.gcp.services.iam.iam_service_account_unused.iam_service_account_unused.iam_client", + new=iam_client, + ), + ): + from prowler.providers.gcp.services.iam.iam_service_account_unused.iam_service_account_unused import ( + iam_service_account_unused, + ) + + iam_client.project_ids = [GCP_PROJECT_ID] + iam_client.region = GCP_US_CENTER1_LOCATION + iam_client.service_accounts = [] + + check = iam_service_account_unused() + result = check.execute() + assert len(result) == 0 + + def test_iam_service_account_unused_single(self): + iam_client = mock.MagicMock() + monitoring_client = mock.MagicMock() + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_gcp_provider(), + ), + mock.patch( + "prowler.providers.gcp.services.iam.iam_service_account_unused.iam_service_account_unused.iam_client", + new=iam_client, + ), + mock.patch( + "prowler.providers.gcp.services.iam.iam_service_account_unused.iam_service_account_unused.monitoring_client", + new=monitoring_client, + ), + ): + from prowler.providers.gcp.services.iam.iam_service import ( + Key, + ServiceAccount, + ) + from prowler.providers.gcp.services.iam.iam_service_account_unused.iam_service_account_unused import ( + iam_service_account_unused, + ) + + iam_client.project_ids = [GCP_PROJECT_ID] + iam_client.region = GCP_US_CENTER1_LOCATION + + iam_client.service_accounts = [ + ServiceAccount( + name="projects/my-project/serviceAccounts/my-service-account@my-project.iam.gserviceaccount.com", + email="my-service-account@my-project.iam.gserviceaccount.com", + display_name="My service account", + keys=[ + Key( + name="90c48f61c65cd56224a12ab18e6ee9ca9c3aee7c", + origin="GOOGLE_PROVIDED", + type="USER_MANAGED", + valid_after=datetime.strptime("2024-07-10", "%Y-%m-%d"), + valid_before=datetime.strptime("9999-12-31", "%Y-%m-%d"), + ) + ], + project_id=GCP_PROJECT_ID, + uniqueId="111222233334444", + ) + ] + + monitoring_client.sa_api_metrics = set(["111222233334444"]) + monitoring_client.audit_config = {"max_unused_account_days": 30} + + check = iam_service_account_unused() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == f"Service Account {iam_client.service_accounts[0].email} was used over the last 30 days." + ) + assert result[0].resource_id == iam_client.service_accounts[0].email + assert result[0].project_id == GCP_PROJECT_ID + assert result[0].location == GCP_US_CENTER1_LOCATION + assert result[0].resource == iam_client.service_accounts[0] + + def test_iam_service_account_unused_mix(self): + iam_client = mock.MagicMock() + monitoring_client = mock.MagicMock() + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_gcp_provider(), + ), + mock.patch( + "prowler.providers.gcp.services.iam.iam_service_account_unused.iam_service_account_unused.iam_client", + new=iam_client, + ), + mock.patch( + "prowler.providers.gcp.services.iam.iam_service_account_unused.iam_service_account_unused.monitoring_client", + new=monitoring_client, + ), + ): + from prowler.providers.gcp.services.iam.iam_service import ( + Key, + ServiceAccount, + ) + from prowler.providers.gcp.services.iam.iam_service_account_unused.iam_service_account_unused import ( + iam_service_account_unused, + ) + + iam_client.project_ids = [GCP_PROJECT_ID] + iam_client.region = GCP_US_CENTER1_LOCATION + + iam_client.service_accounts = [ + ServiceAccount( + name="projects/my-project/serviceAccounts/my-service-account@my-project.iam.gserviceaccount.com", + email="my-service-account@my-project.iam.gserviceaccount.com", + display_name="My service account", + keys=[ + Key( + name="90c48f61c65cd56224a12ab18e6ee9ca9c3aee7c", + origin="GOOGLE_PROVIDED", + type="USER_MANAGED", + valid_after=datetime.strptime("2024-07-10", "%Y-%m-%d"), + valid_before=datetime.strptime("9999-12-31", "%Y-%m-%d"), + ) + ], + project_id=GCP_PROJECT_ID, + uniqueId="111222233334444", + ), + ServiceAccount( + name="projects/my-project/serviceAccounts/my-service-account2@my-project.iam.gserviceaccount.com", + email="my-service-account2@my-project.iam.gserviceaccount.com", + display_name="My service account 2", + keys=[], + project_id=GCP_PROJECT_ID, + uniqueId="55566666777888999", + ), + ] + + monitoring_client.sa_api_metrics = set(["111222233334444"]) + monitoring_client.audit_config = {"max_unused_account_days": 30} + + check = iam_service_account_unused() + result = check.execute() + assert len(result) == 2 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == f"Service Account {iam_client.service_accounts[0].email} was used over the last 30 days." + ) + assert result[0].resource_id == iam_client.service_accounts[0].email + assert result[0].project_id == GCP_PROJECT_ID + assert result[0].location == GCP_US_CENTER1_LOCATION + assert result[0].resource == iam_client.service_accounts[0] + + assert result[1].status == "FAIL" + assert ( + result[1].status_extended + == f"Service Account {iam_client.service_accounts[1].email} was not used over the last 30 days." + ) + assert result[1].resource_id == iam_client.service_accounts[1].email + assert result[1].project_id == GCP_PROJECT_ID + assert result[1].location == GCP_US_CENTER1_LOCATION + assert result[1].resource == iam_client.service_accounts[1] diff --git a/tests/providers/gcp/services/iam/iamgcp_service_test.py b/tests/providers/gcp/services/iam/iamgcp_service_test.py index 3b40b89858..c2b5e655f2 100644 --- a/tests/providers/gcp/services/iam/iamgcp_service_test.py +++ b/tests/providers/gcp/services/iam/iamgcp_service_test.py @@ -41,6 +41,7 @@ class TestIAMService: ) assert iam_client.service_accounts[0].email == "service-account1@gmail.com" assert iam_client.service_accounts[0].display_name == "Service Account 1" + assert iam_client.service_accounts[0].uniqueId == "111222233334444" assert len(iam_client.service_accounts[0].keys) == 2 assert iam_client.service_accounts[0].keys[0].name == "key1" assert iam_client.service_accounts[0].keys[0].valid_after == datetime( @@ -66,6 +67,7 @@ class TestIAMService: ) assert iam_client.service_accounts[1].email == "service-account2@gmail.com" assert iam_client.service_accounts[1].display_name == "Service Account 2" + assert iam_client.service_accounts[1].uniqueId == "55566666777888999" assert len(iam_client.service_accounts[1].keys) == 1 assert iam_client.service_accounts[1].keys[0].name == "key3" assert iam_client.service_accounts[1].keys[0].valid_after == datetime( diff --git a/tests/providers/gcp/services/logging/logging_sink_created/logging_sink_created_test.py b/tests/providers/gcp/services/logging/logging_sink_created/logging_sink_created_test.py index 7ad8f9a51f..9392efb625 100644 --- a/tests/providers/gcp/services/logging/logging_sink_created/logging_sink_created_test.py +++ b/tests/providers/gcp/services/logging/logging_sink_created/logging_sink_created_test.py @@ -146,6 +146,15 @@ class Test_logging_sink_created: project_id=GCP_PROJECT_ID, ) ] + logging_client.projects = { + GCP_PROJECT_ID: GCPProject( + id=GCP_PROJECT_ID, + number="123456789012", + name="test", + labels={}, + lifecycle_state="ACTIVE", + ) + } check = logging_sink_created() result = check.execute() @@ -153,9 +162,9 @@ class Test_logging_sink_created: assert result[0].status == "FAIL" assert ( result[0].status_extended - == f"Sink sink1 is enabled but not exporting copies of all the log entries in project {GCP_PROJECT_ID}." + == f"There are no logging sinks to export copies of all the log entries in project {GCP_PROJECT_ID}." ) - assert result[0].resource_id == "sink1" - assert result[0].resource_name == "sink1" + assert result[0].resource_id == GCP_PROJECT_ID + assert result[0].resource_name == "test" assert result[0].project_id == GCP_PROJECT_ID assert result[0].location == GCP_EU1_LOCATION diff --git a/tests/providers/gcp/services/monitoring/monitoring_service_test.py b/tests/providers/gcp/services/monitoring/monitoring_service_test.py index 0db573a99d..992589649e 100644 --- a/tests/providers/gcp/services/monitoring/monitoring_service_test.py +++ b/tests/providers/gcp/services/monitoring/monitoring_service_test.py @@ -41,3 +41,48 @@ class TestMonitoringService: assert monitoring_client.alert_policies[1].filters == [ 'metric.type="compute.googleapis.com/instance/disk/write_bytes_count"' ] + + def test_sa_keys_metrics(self): + with ( + patch( + "prowler.providers.gcp.lib.service.service.GCPService.__is_api_active__", + new=mock_is_api_active, + ), + patch( + "prowler.providers.gcp.lib.service.service.GCPService.__generate_client__", + new=mock_api_client, + ), + ): + monitoring_client = Monitoring( + set_mocked_gcp_provider(project_ids=[GCP_PROJECT_ID]) + ) + monitoring_client.audit_config = {"max_unused_account_days": 30} + assert monitoring_client.service == "monitoring" + assert monitoring_client.project_ids == [GCP_PROJECT_ID] + + assert len(monitoring_client.sa_keys_metrics) == 2 + assert "key1" in monitoring_client.sa_keys_metrics + assert "key2" in monitoring_client.sa_keys_metrics + assert "key3" not in monitoring_client.sa_keys_metrics + + def test_sa_api_metrics(self): + with ( + patch( + "prowler.providers.gcp.lib.service.service.GCPService.__is_api_active__", + new=mock_is_api_active, + ), + patch( + "prowler.providers.gcp.lib.service.service.GCPService.__generate_client__", + new=mock_api_client, + ), + ): + monitoring_client = Monitoring( + set_mocked_gcp_provider(project_ids=[GCP_PROJECT_ID]) + ) + assert monitoring_client.service == "monitoring" + assert monitoring_client.project_ids == [GCP_PROJECT_ID] + + assert len(monitoring_client.sa_api_metrics) == 2 + assert "111222233334444" in monitoring_client.sa_api_metrics + assert "55566666777888999" in monitoring_client.sa_api_metrics + assert "0000000000000" not in monitoring_client.sa_api_metrics diff --git a/tests/providers/github/github_fixtures.py b/tests/providers/github/github_fixtures.py new file mode 100644 index 0000000000..a848c9ed17 --- /dev/null +++ b/tests/providers/github/github_fixtures.py @@ -0,0 +1,37 @@ +from mock import MagicMock + +from prowler.providers.github.github_provider import GithubProvider +from prowler.providers.github.models import GithubIdentityInfo, GithubSession + +# GitHub Identity +ACCOUNT_NAME = "account-name" +ACCOUNT_ID = "account-id" +ACCOUNT_URL = "/user" + +# GitHub Credentials +PAT_TOKEN = "github-token" +OAUTH_TOKEN = "oauth-token" +APP_ID = "app-id" +APP_KEY = "app-key" + + +# Mocked GitHub Provider +def set_mocked_github_provider( + auth_method: str = "personal_access", + credentials: GithubSession = GithubSession(token=PAT_TOKEN, id=APP_ID, key=APP_KEY), + identity: GithubIdentityInfo = GithubIdentityInfo( + account_name=ACCOUNT_NAME, + account_id=ACCOUNT_ID, + account_url=ACCOUNT_URL, + ), + audit_config: dict = None, +) -> GithubProvider: + + provider = MagicMock() + provider.type = "github" + provider.auth_method = auth_method + provider.session = credentials + provider.identity = identity + provider.audit_config = audit_config + + return provider diff --git a/tests/providers/github/github_provider_test.py b/tests/providers/github/github_provider_test.py new file mode 100644 index 0000000000..30d770ef3b --- /dev/null +++ b/tests/providers/github/github_provider_test.py @@ -0,0 +1,137 @@ +from unittest.mock import patch + +from prowler.config.config import ( + default_fixer_config_file_path, + load_and_validate_config_file, +) +from prowler.providers.github.github_provider import GithubProvider +from prowler.providers.github.models import ( + GithubAppIdentityInfo, + GithubIdentityInfo, + GithubSession, +) +from tests.providers.github.github_fixtures import ( + ACCOUNT_ID, + ACCOUNT_NAME, + ACCOUNT_URL, + APP_ID, + APP_KEY, + OAUTH_TOKEN, + PAT_TOKEN, +) + + +class TestGitHubProvider: + def test_github_provider_PAT(self): + personal_access_token = PAT_TOKEN + oauth_app_token = None + github_app_id = None + github_app_key = None + fixer_config = load_and_validate_config_file( + "github", default_fixer_config_file_path + ) + + with ( + patch( + "prowler.providers.github.github_provider.GithubProvider.setup_session", + return_value=GithubSession(token=PAT_TOKEN, id="", key=""), + ), + patch( + "prowler.providers.github.github_provider.GithubProvider.setup_identity", + return_value=GithubIdentityInfo( + account_id=ACCOUNT_ID, + account_name=ACCOUNT_NAME, + account_url=ACCOUNT_URL, + ), + ), + ): + provider = GithubProvider( + personal_access_token, + oauth_app_token, + github_app_id, + github_app_key, + ) + + assert provider._type == "github" + assert provider.session == GithubSession(token=PAT_TOKEN, id="", key="") + assert provider.identity == GithubIdentityInfo( + account_name=ACCOUNT_NAME, + account_id=ACCOUNT_ID, + account_url=ACCOUNT_URL, + ) + assert provider._audit_config == {} + assert provider._fixer_config == fixer_config + + def test_github_provider_OAuth(self): + personal_access_token = None + oauth_app_token = OAUTH_TOKEN + github_app_id = None + github_app_key = None + fixer_config = load_and_validate_config_file( + "github", default_fixer_config_file_path + ) + + with ( + patch( + "prowler.providers.github.github_provider.GithubProvider.setup_session", + return_value=GithubSession(token=OAUTH_TOKEN, id="", key=""), + ), + patch( + "prowler.providers.github.github_provider.GithubProvider.setup_identity", + return_value=GithubIdentityInfo( + account_id=ACCOUNT_ID, + account_name=ACCOUNT_NAME, + account_url=ACCOUNT_URL, + ), + ), + ): + provider = GithubProvider( + personal_access_token, + oauth_app_token, + github_app_id, + github_app_key, + ) + + assert provider._type == "github" + assert provider.session == GithubSession(token=OAUTH_TOKEN, id="", key="") + assert provider.identity == GithubIdentityInfo( + account_name=ACCOUNT_NAME, + account_id=ACCOUNT_ID, + account_url=ACCOUNT_URL, + ) + assert provider._audit_config == {} + assert provider._fixer_config == fixer_config + + def test_github_provider_App(self): + personal_access_token = None + oauth_app_token = None + github_app_id = APP_ID + github_app_key = APP_KEY + fixer_config = load_and_validate_config_file( + "github", default_fixer_config_file_path + ) + + with ( + patch( + "prowler.providers.github.github_provider.GithubProvider.setup_session", + return_value=GithubSession(token="", id=APP_ID, key=APP_KEY), + ), + patch( + "prowler.providers.github.github_provider.GithubProvider.setup_identity", + return_value=GithubAppIdentityInfo( + app_id=APP_ID, + ), + ), + ): + provider = GithubProvider( + personal_access_token, + oauth_app_token, + github_app_id, + github_app_key, + ) + + assert provider._type == "github" + assert provider.session == GithubSession(token="", id=APP_ID, key=APP_KEY) + assert provider.identity == GithubAppIdentityInfo(app_id=APP_ID) + assert provider._audit_config == {} + assert provider._fixer_config == fixer_config diff --git a/tests/providers/github/lib/mutelist/fixtures/github_mutelist.yaml b/tests/providers/github/lib/mutelist/fixtures/github_mutelist.yaml new file mode 100644 index 0000000000..591dbed772 --- /dev/null +++ b/tests/providers/github/lib/mutelist/fixtures/github_mutelist.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/tests/providers/github/lib/mutelist/github_mutelist_test.py b/tests/providers/github/lib/mutelist/github_mutelist_test.py new file mode 100644 index 0000000000..8b8cc803fd --- /dev/null +++ b/tests/providers/github/lib/mutelist/github_mutelist_test.py @@ -0,0 +1,100 @@ +import yaml +from mock import MagicMock + +from prowler.providers.github.lib.mutelist.mutelist import GithubMutelist +from tests.lib.outputs.fixtures.fixtures import generate_finding_output + +MUTELIST_FIXTURE_PATH = ( + "tests/providers/github/lib/mutelist/fixtures/github_mutelist.yaml" +) + + +class TestGithubMutelist: + def test_get_mutelist_file_from_local_file(self): + mutelist = GithubMutelist(mutelist_path=MUTELIST_FIXTURE_PATH) + + with open(MUTELIST_FIXTURE_PATH) as f: + mutelist_fixture = yaml.safe_load(f)["Mutelist"] + + assert mutelist.mutelist == mutelist_fixture + assert mutelist.mutelist_file_path == MUTELIST_FIXTURE_PATH + + def test_get_mutelist_file_from_local_file_non_existent(self): + mutelist_path = "tests/lib/mutelist/fixtures/not_present" + mutelist = GithubMutelist(mutelist_path=mutelist_path) + + assert mutelist.mutelist == {} + assert mutelist.mutelist_file_path == mutelist_path + + def test_validate_mutelist_not_valid_key(self): + mutelist_path = MUTELIST_FIXTURE_PATH + with open(mutelist_path) as f: + mutelist_fixture = yaml.safe_load(f)["Mutelist"] + + mutelist_fixture["Accounts1"] = mutelist_fixture["Accounts"] + del mutelist_fixture["Accounts"] + + mutelist = GithubMutelist(mutelist_content=mutelist_fixture) + + assert not mutelist.validate_mutelist() + assert mutelist.mutelist == {} + assert mutelist.mutelist_file_path is None + + def test_is_finding_muted(self): + # Mutelist + mutelist_content = { + "Accounts": { + "account_1": { + "Checks": { + "check_test": { + "Regions": ["*"], + "Resources": ["test_resource"], + } + } + } + } + } + + mutelist = GithubMutelist(mutelist_content=mutelist_content) + + finding = MagicMock() + finding.check_metadata = MagicMock() + finding.check_metadata.CheckID = "check_test" + finding.status = "FAIL" + finding.resource_name = "test_resource" + finding.account_name = "account_1" + finding.location = "test-location" + finding.resource_tags = [] + + assert mutelist.is_finding_muted(finding, finding.account_name) + + def test_mute_finding(self): + # Mutelist + mutelist_content = { + "Accounts": { + "account_1": { + "Checks": { + "check_test": { + "Regions": ["*"], + "Resources": ["test_resource"], + } + } + } + } + } + + mutelist = GithubMutelist(mutelist_content=mutelist_content) + + finding_1 = generate_finding_output( + check_id="check_test", + status="FAIL", + account_uid="account_1", + resource_uid="test_resource", + resource_tags=[], + ) + + muted_finding = mutelist.mute_finding(finding=finding_1) + + assert muted_finding.status == "MUTED" + assert muted_finding.muted + assert muted_finding.raw["status"] == "FAIL" diff --git a/tests/providers/github/services/organization/organization_members_mfa_required/organization_members_mfa_required_test.py b/tests/providers/github/services/organization/organization_members_mfa_required/organization_members_mfa_required_test.py new file mode 100644 index 0000000000..823c0f294f --- /dev/null +++ b/tests/providers/github/services/organization/organization_members_mfa_required/organization_members_mfa_required_test.py @@ -0,0 +1,100 @@ +from unittest import mock + +from prowler.providers.github.services.organization.organization_service import Org +from tests.providers.github.github_fixtures import set_mocked_github_provider + + +class Test_organization_members_mfa_required: + def test_no_organizations(self): + organization_client = mock.MagicMock + organization_client.organizations = {} + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_github_provider(), + ), + mock.patch( + "prowler.providers.github.services.organization.organization_members_mfa_required.organization_members_mfa_required.organization_client", + new=organization_client, + ), + ): + from prowler.providers.github.services.organization.organization_members_mfa_required.organization_members_mfa_required import ( + organization_members_mfa_required, + ) + + check = organization_members_mfa_required() + result = check.execute() + assert len(result) == 0 + + def test_organization_mfa_disabled(self): + organization_client = mock.MagicMock + org_name = "test-organization" + organization_client.organizations = { + 1: Org( + id=1, + name=org_name, + mfa_required=False, + ), + } + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_github_provider(), + ), + mock.patch( + "prowler.providers.github.services.organization.organization_members_mfa_required.organization_members_mfa_required.organization_client", + new=organization_client, + ), + ): + from prowler.providers.github.services.organization.organization_members_mfa_required.organization_members_mfa_required import ( + organization_members_mfa_required, + ) + + check = organization_members_mfa_required() + result = check.execute() + assert len(result) == 1 + assert result[0].resource_id == 1 + assert result[0].resource_name == "test-organization" + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == f"Organization {org_name} does not require members to have two-factor authentication enabled." + ) + + def test_one_organization_securitymd(self): + organization_client = mock.MagicMock + org_name = "test-organization" + organization_client.organizations = { + 1: Org( + id=1, + name=org_name, + mfa_required=True, + ), + } + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_github_provider(), + ), + mock.patch( + "prowler.providers.github.services.organization.organization_members_mfa_required.organization_members_mfa_required.organization_client", + new=organization_client, + ), + ): + from prowler.providers.github.services.organization.organization_members_mfa_required.organization_members_mfa_required import ( + organization_members_mfa_required, + ) + + check = organization_members_mfa_required() + result = check.execute() + assert len(result) == 1 + assert result[0].resource_id == 1 + assert result[0].resource_name == "test-organization" + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == f"Organization {org_name} does require members to have two-factor authentication enabled." + ) diff --git a/tests/providers/github/services/organization/organization_service_test.py b/tests/providers/github/services/organization/organization_service_test.py new file mode 100644 index 0000000000..7720841698 --- /dev/null +++ b/tests/providers/github/services/organization/organization_service_test.py @@ -0,0 +1,37 @@ +from unittest.mock import patch + +from prowler.providers.github.services.organization.organization_service import ( + Org, + Organization, +) +from tests.providers.github.github_fixtures import set_mocked_github_provider + + +def mock_list_organizations(_): + return { + 1: Org( + id=1, + name="test-organization", + mfa_required=True, + ), + } + + +@patch( + "prowler.providers.github.services.organization.organization_service.Organization._list_organizations", + new=mock_list_organizations, +) +class Test_Repository_Service: + def test_get_client(self): + repository_service = Organization(set_mocked_github_provider()) + assert repository_service.clients[0].__class__.__name__ == "Github" + + def test_get_service(self): + repository_service = Organization(set_mocked_github_provider()) + assert repository_service.__class__.__name__ == "Organization" + + def test_list_organizations(self): + repository_service = Organization(set_mocked_github_provider()) + assert len(repository_service.organizations) == 1 + assert repository_service.organizations[1].name == "test-organization" + assert repository_service.organizations[1].mfa_required diff --git a/tests/providers/github/services/repository/repository_branch_delete_on_merge_enabled/repository_branch_delete_on_merge_enabled_test.py b/tests/providers/github/services/repository/repository_branch_delete_on_merge_enabled/repository_branch_delete_on_merge_enabled_test.py new file mode 100644 index 0000000000..fc9a5c3ddd --- /dev/null +++ b/tests/providers/github/services/repository/repository_branch_delete_on_merge_enabled/repository_branch_delete_on_merge_enabled_test.py @@ -0,0 +1,108 @@ +from unittest import mock + +from prowler.providers.github.services.repository.repository_service import Repo +from tests.providers.github.github_fixtures import set_mocked_github_provider + + +class Test_repository_branch_delete_on_merge_enabled_test: + def test_no_repositories(self): + repository_client = mock.MagicMock + repository_client.repositories = {} + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_github_provider(), + ), + mock.patch( + "prowler.providers.github.services.repository.repository_branch_delete_on_merge_enabled.repository_branch_delete_on_merge_enabled.repository_client", + new=repository_client, + ), + ): + from prowler.providers.github.services.repository.repository_branch_delete_on_merge_enabled.repository_branch_delete_on_merge_enabled import ( + repository_branch_delete_on_merge_enabled, + ) + + check = repository_branch_delete_on_merge_enabled() + result = check.execute() + assert len(result) == 0 + + def test_branch_deletion_disabled(self): + repository_client = mock.MagicMock + repo_name = "repo1" + repository_client.repositories = { + 1: Repo( + id=1, + name=repo_name, + full_name="account-name/repo1", + default_branch="main", + private=False, + securitymd=False, + delete_branch_on_merge=False, + ), + } + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_github_provider(), + ), + mock.patch( + "prowler.providers.github.services.repository.repository_branch_delete_on_merge_enabled.repository_branch_delete_on_merge_enabled.repository_client", + new=repository_client, + ), + ): + from prowler.providers.github.services.repository.repository_branch_delete_on_merge_enabled.repository_branch_delete_on_merge_enabled import ( + repository_branch_delete_on_merge_enabled, + ) + + check = repository_branch_delete_on_merge_enabled() + result = check.execute() + assert len(result) == 1 + assert result[0].resource_id == 1 + assert result[0].resource_name == "repo1" + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == f"Repository {repo_name} does not delete branches on merge." + ) + + def test_branch_deletion_enabled(self): + repository_client = mock.MagicMock + repo_name = "repo1" + repository_client.repositories = { + 1: Repo( + id=1, + name=repo_name, + full_name="account-name/repo1", + default_branch="main", + private=False, + securitymd=True, + delete_branch_on_merge=True, + ), + } + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_github_provider(), + ), + mock.patch( + "prowler.providers.github.services.repository.repository_branch_delete_on_merge_enabled.repository_branch_delete_on_merge_enabled.repository_client", + new=repository_client, + ), + ): + from prowler.providers.github.services.repository.repository_branch_delete_on_merge_enabled.repository_branch_delete_on_merge_enabled import ( + repository_branch_delete_on_merge_enabled, + ) + + check = repository_branch_delete_on_merge_enabled() + result = check.execute() + assert len(result) == 1 + assert result[0].resource_id == 1 + assert result[0].resource_name == "repo1" + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == f"Repository {repo_name} does delete branches on merge." + ) diff --git a/tests/providers/github/services/repository/repository_default_branch_deletion_disabled/repository_default_branch_deletion_disabled_test.py b/tests/providers/github/services/repository/repository_default_branch_deletion_disabled/repository_default_branch_deletion_disabled_test.py new file mode 100644 index 0000000000..825e4bdc6e --- /dev/null +++ b/tests/providers/github/services/repository/repository_default_branch_deletion_disabled/repository_default_branch_deletion_disabled_test.py @@ -0,0 +1,110 @@ +from unittest import mock + +from prowler.providers.github.services.repository.repository_service import Repo +from tests.providers.github.github_fixtures import set_mocked_github_provider + + +class Test_repository_default_branch_deletion_disabled_test: + def test_no_repositories(self): + repository_client = mock.MagicMock + repository_client.repositories = {} + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_github_provider(), + ), + mock.patch( + "prowler.providers.github.services.repository.repository_default_branch_deletion_disabled.repository_default_branch_deletion_disabled.repository_client", + new=repository_client, + ), + ): + from prowler.providers.github.services.repository.repository_default_branch_deletion_disabled.repository_default_branch_deletion_disabled import ( + repository_default_branch_deletion_disabled, + ) + + check = repository_default_branch_deletion_disabled() + result = check.execute() + assert len(result) == 0 + + def test_allow_branch_deletion_enabled(self): + repository_client = mock.MagicMock + repo_name = "repo1" + default_branch = "main" + repository_client.repositories = { + 1: Repo( + id=1, + name=repo_name, + full_name="account-name/repo1", + default_branch=default_branch, + default_branch_deletion=True, + private=False, + securitymd=False, + ), + } + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_github_provider(), + ), + mock.patch( + "prowler.providers.github.services.repository.repository_default_branch_deletion_disabled.repository_default_branch_deletion_disabled.repository_client", + new=repository_client, + ), + ): + from prowler.providers.github.services.repository.repository_default_branch_deletion_disabled.repository_default_branch_deletion_disabled import ( + repository_default_branch_deletion_disabled, + ) + + check = repository_default_branch_deletion_disabled() + result = check.execute() + assert len(result) == 1 + assert result[0].resource_id == 1 + assert result[0].resource_name == "repo1" + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == f"Repository {repo_name} does allow default branch deletion." + ) + + def test_allow_branch_deletion_disabled(self): + repository_client = mock.MagicMock + repo_name = "repo1" + default_branch = "main" + repository_client.repositories = { + 1: Repo( + id=1, + name=repo_name, + full_name="account-name/repo1", + private=False, + default_branch=default_branch, + default_branch_deletion=False, + securitymd=True, + ), + } + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_github_provider(), + ), + mock.patch( + "prowler.providers.github.services.repository.repository_default_branch_deletion_disabled.repository_default_branch_deletion_disabled.repository_client", + new=repository_client, + ), + ): + from prowler.providers.github.services.repository.repository_default_branch_deletion_disabled.repository_default_branch_deletion_disabled import ( + repository_default_branch_deletion_disabled, + ) + + check = repository_default_branch_deletion_disabled() + result = check.execute() + assert len(result) == 1 + assert result[0].resource_id == 1 + assert result[0].resource_name == "repo1" + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == f"Repository {repo_name} does deny default branch deletion." + ) diff --git a/tests/providers/github/services/repository/repository_default_branch_disallows_force_push/repository_default_branch_disallows_force_push_test.py b/tests/providers/github/services/repository/repository_default_branch_disallows_force_push/repository_default_branch_disallows_force_push_test.py new file mode 100644 index 0000000000..a9da35d0fe --- /dev/null +++ b/tests/providers/github/services/repository/repository_default_branch_disallows_force_push/repository_default_branch_disallows_force_push_test.py @@ -0,0 +1,110 @@ +from unittest import mock + +from prowler.providers.github.services.repository.repository_service import Repo +from tests.providers.github.github_fixtures import set_mocked_github_provider + + +class Test_repository_default_branch_disallows_force_push_test: + def test_no_repositories(self): + repository_client = mock.MagicMock + repository_client.repositories = {} + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_github_provider(), + ), + mock.patch( + "prowler.providers.github.services.repository.repository_default_branch_disallows_force_push.repository_default_branch_disallows_force_push.repository_client", + new=repository_client, + ), + ): + from prowler.providers.github.services.repository.repository_default_branch_disallows_force_push.repository_default_branch_disallows_force_push import ( + repository_default_branch_disallows_force_push, + ) + + check = repository_default_branch_disallows_force_push() + result = check.execute() + assert len(result) == 0 + + def test_allow_force_push_enabled(self): + repository_client = mock.MagicMock + repo_name = "repo1" + default_branch = "main" + repository_client.repositories = { + 1: Repo( + id=1, + name=repo_name, + full_name="account-name/repo1", + default_branch=default_branch, + allow_force_pushes=True, + private=False, + securitymd=False, + ), + } + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_github_provider(), + ), + mock.patch( + "prowler.providers.github.services.repository.repository_default_branch_disallows_force_push.repository_default_branch_disallows_force_push.repository_client", + new=repository_client, + ), + ): + from prowler.providers.github.services.repository.repository_default_branch_disallows_force_push.repository_default_branch_disallows_force_push import ( + repository_default_branch_disallows_force_push, + ) + + check = repository_default_branch_disallows_force_push() + result = check.execute() + assert len(result) == 1 + assert result[0].resource_id == 1 + assert result[0].resource_name == "repo1" + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == f"Repository {repo_name} does allow force push." + ) + + def test_allow_force_push_disabled(self): + repository_client = mock.MagicMock + repo_name = "repo1" + default_branch = "main" + repository_client.repositories = { + 1: Repo( + id=1, + name=repo_name, + full_name="account-name/repo1", + private=False, + default_branch=default_branch, + allow_force_pushes=False, + securitymd=True, + ), + } + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_github_provider(), + ), + mock.patch( + "prowler.providers.github.services.repository.repository_default_branch_disallows_force_push.repository_default_branch_disallows_force_push.repository_client", + new=repository_client, + ), + ): + from prowler.providers.github.services.repository.repository_default_branch_disallows_force_push.repository_default_branch_disallows_force_push import ( + repository_default_branch_disallows_force_push, + ) + + check = repository_default_branch_disallows_force_push() + result = check.execute() + assert len(result) == 1 + assert result[0].resource_id == 1 + assert result[0].resource_name == "repo1" + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == f"Repository {repo_name} does deny force push." + ) diff --git a/tests/providers/github/services/repository/repository_default_branch_protection_applies_to_admins/repository_default_branch_protection_applies_to_admins_test.py b/tests/providers/github/services/repository/repository_default_branch_protection_applies_to_admins/repository_default_branch_protection_applies_to_admins_test.py new file mode 100644 index 0000000000..f85bbdced9 --- /dev/null +++ b/tests/providers/github/services/repository/repository_default_branch_protection_applies_to_admins/repository_default_branch_protection_applies_to_admins_test.py @@ -0,0 +1,110 @@ +from unittest import mock + +from prowler.providers.github.services.repository.repository_service import Repo +from tests.providers.github.github_fixtures import set_mocked_github_provider + + +class Test_repository_default_branch_protection_applies_to_admins_test: + def test_no_repositories(self): + repository_client = mock.MagicMock + repository_client.repositories = {} + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_github_provider(), + ), + mock.patch( + "prowler.providers.github.services.repository.repository_default_branch_protection_applies_to_admins.repository_default_branch_protection_applies_to_admins.repository_client", + new=repository_client, + ), + ): + from prowler.providers.github.services.repository.repository_default_branch_protection_applies_to_admins.repository_default_branch_protection_applies_to_admins import ( + repository_default_branch_protection_applies_to_admins, + ) + + check = repository_default_branch_protection_applies_to_admins() + result = check.execute() + assert len(result) == 0 + + def test_enforce_status_checks_disabled(self): + repository_client = mock.MagicMock + repo_name = "repo1" + default_branch = "main" + repository_client.repositories = { + 1: Repo( + id=1, + name=repo_name, + full_name="account-name/repo1", + default_branch=default_branch, + private=False, + securitymd=False, + enforce_admins=False, + ), + } + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_github_provider(), + ), + mock.patch( + "prowler.providers.github.services.repository.repository_default_branch_protection_applies_to_admins.repository_default_branch_protection_applies_to_admins.repository_client", + new=repository_client, + ), + ): + from prowler.providers.github.services.repository.repository_default_branch_protection_applies_to_admins.repository_default_branch_protection_applies_to_admins import ( + repository_default_branch_protection_applies_to_admins, + ) + + check = repository_default_branch_protection_applies_to_admins() + result = check.execute() + assert len(result) == 1 + assert result[0].resource_id == 1 + assert result[0].resource_name == "repo1" + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == f"Repository {repo_name} does not enforce administrators to be subject to the same branch protection rules as other users." + ) + + def test_enforce_status_checks_enabled(self): + repository_client = mock.MagicMock + repo_name = "repo1" + default_branch = "main" + repository_client.repositories = { + 1: Repo( + id=1, + name=repo_name, + full_name="account-name/repo1", + private=False, + default_branch=default_branch, + enforce_admins=True, + securitymd=True, + ), + } + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_github_provider(), + ), + mock.patch( + "prowler.providers.github.services.repository.repository_default_branch_protection_applies_to_admins.repository_default_branch_protection_applies_to_admins.repository_client", + new=repository_client, + ), + ): + from prowler.providers.github.services.repository.repository_default_branch_protection_applies_to_admins.repository_default_branch_protection_applies_to_admins import ( + repository_default_branch_protection_applies_to_admins, + ) + + check = repository_default_branch_protection_applies_to_admins() + result = check.execute() + assert len(result) == 1 + assert result[0].resource_id == 1 + assert result[0].resource_name == "repo1" + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == f"Repository {repo_name} does enforce administrators to be subject to the same branch protection rules as other users." + ) diff --git a/tests/providers/github/services/repository/repository_default_branch_protection_enabled/repository_default_branch_protection_enabled_test.py b/tests/providers/github/services/repository/repository_default_branch_protection_enabled/repository_default_branch_protection_enabled_test.py new file mode 100644 index 0000000000..3723863298 --- /dev/null +++ b/tests/providers/github/services/repository/repository_default_branch_protection_enabled/repository_default_branch_protection_enabled_test.py @@ -0,0 +1,110 @@ +from unittest import mock + +from prowler.providers.github.services.repository.repository_service import Repo +from tests.providers.github.github_fixtures import set_mocked_github_provider + + +class Test_repository_default_branch_protection_enabled_test: + def test_no_repositories(self): + repository_client = mock.MagicMock + repository_client.repositories = {} + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_github_provider(), + ), + mock.patch( + "prowler.providers.github.services.repository.repository_default_branch_protection_enabled.repository_default_branch_protection_enabled.repository_client", + new=repository_client, + ), + ): + from prowler.providers.github.services.repository.repository_default_branch_protection_enabled.repository_default_branch_protection_enabled import ( + repository_default_branch_protection_enabled, + ) + + check = repository_default_branch_protection_enabled() + result = check.execute() + assert len(result) == 0 + + def test_without_default_branch_protection(self): + repository_client = mock.MagicMock + repo_name = "repo1" + default_branch = "main" + repository_client.repositories = { + 1: Repo( + id=1, + name=repo_name, + full_name="account-name/repo1", + default_branch=default_branch, + private=False, + default_branch_protection=False, + securitymd=False, + ), + } + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_github_provider(), + ), + mock.patch( + "prowler.providers.github.services.repository.repository_default_branch_protection_enabled.repository_default_branch_protection_enabled.repository_client", + new=repository_client, + ), + ): + from prowler.providers.github.services.repository.repository_default_branch_protection_enabled.repository_default_branch_protection_enabled import ( + repository_default_branch_protection_enabled, + ) + + check = repository_default_branch_protection_enabled() + result = check.execute() + assert len(result) == 1 + assert result[0].resource_id == 1 + assert result[0].resource_name == "repo1" + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == f"Repository {repo_name} does not enforce branch protection on default branch ({default_branch})." + ) + + def test_default_branch_protection(self): + repository_client = mock.MagicMock + repo_name = "repo1" + default_branch = "main" + repository_client.repositories = { + 1: Repo( + id=1, + name=repo_name, + full_name="account-name/repo1", + private=False, + default_branch=default_branch, + default_branch_protection=True, + securitymd=True, + ), + } + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_github_provider(), + ), + mock.patch( + "prowler.providers.github.services.repository.repository_default_branch_protection_enabled.repository_default_branch_protection_enabled.repository_client", + new=repository_client, + ), + ): + from prowler.providers.github.services.repository.repository_default_branch_protection_enabled.repository_default_branch_protection_enabled import ( + repository_default_branch_protection_enabled, + ) + + check = repository_default_branch_protection_enabled() + result = check.execute() + assert len(result) == 1 + assert result[0].resource_id == 1 + assert result[0].resource_name == "repo1" + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == f"Repository {repo_name} does enforce branch protection on default branch ({default_branch})." + ) diff --git a/tests/providers/github/services/repository/repository_default_branch_requires_conversation_resolution/repository_default_branch_requires_conversation_resolution_test.py b/tests/providers/github/services/repository/repository_default_branch_requires_conversation_resolution/repository_default_branch_requires_conversation_resolution_test.py new file mode 100644 index 0000000000..2fe4b1dbd5 --- /dev/null +++ b/tests/providers/github/services/repository/repository_default_branch_requires_conversation_resolution/repository_default_branch_requires_conversation_resolution_test.py @@ -0,0 +1,110 @@ +from unittest import mock + +from prowler.providers.github.services.repository.repository_service import Repo +from tests.providers.github.github_fixtures import set_mocked_github_provider + + +class Test_repository_default_branch_requires_conversation_resolution_test: + def test_no_repositories(self): + repository_client = mock.MagicMock + repository_client.repositories = {} + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_github_provider(), + ), + mock.patch( + "prowler.providers.github.services.repository.repository_default_branch_requires_conversation_resolution.repository_default_branch_requires_conversation_resolution.repository_client", + new=repository_client, + ), + ): + from prowler.providers.github.services.repository.repository_default_branch_requires_conversation_resolution.repository_default_branch_requires_conversation_resolution import ( + repository_default_branch_requires_conversation_resolution, + ) + + check = repository_default_branch_requires_conversation_resolution() + result = check.execute() + assert len(result) == 0 + + def test_conversation_resolution_disabled(self): + repository_client = mock.MagicMock + repo_name = "repo1" + default_branch = "main" + repository_client.repositories = { + 1: Repo( + id=1, + name=repo_name, + full_name="account-name/repo1", + default_branch=default_branch, + conversation_resolution=False, + private=False, + securitymd=False, + ), + } + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_github_provider(), + ), + mock.patch( + "prowler.providers.github.services.repository.repository_default_branch_requires_conversation_resolution.repository_default_branch_requires_conversation_resolution.repository_client", + new=repository_client, + ), + ): + from prowler.providers.github.services.repository.repository_default_branch_requires_conversation_resolution.repository_default_branch_requires_conversation_resolution import ( + repository_default_branch_requires_conversation_resolution, + ) + + check = repository_default_branch_requires_conversation_resolution() + result = check.execute() + assert len(result) == 1 + assert result[0].resource_id == 1 + assert result[0].resource_name == "repo1" + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == f"Repository {repo_name} does not require conversation resolution." + ) + + def test_conversation_resolution_enabled(self): + repository_client = mock.MagicMock + repo_name = "repo1" + default_branch = "main" + repository_client.repositories = { + 1: Repo( + id=1, + name=repo_name, + full_name="account-name/repo1", + private=False, + default_branch=default_branch, + conversation_resolution=True, + securitymd=True, + ), + } + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_github_provider(), + ), + mock.patch( + "prowler.providers.github.services.repository.repository_default_branch_requires_conversation_resolution.repository_default_branch_requires_conversation_resolution.repository_client", + new=repository_client, + ), + ): + from prowler.providers.github.services.repository.repository_default_branch_requires_conversation_resolution.repository_default_branch_requires_conversation_resolution import ( + repository_default_branch_requires_conversation_resolution, + ) + + check = repository_default_branch_requires_conversation_resolution() + result = check.execute() + assert len(result) == 1 + assert result[0].resource_id == 1 + assert result[0].resource_name == "repo1" + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == f"Repository {repo_name} does require conversation resolution." + ) diff --git a/tests/providers/github/services/repository/repository_default_branch_requires_linear_history/repository_default_branch_requires_linear_history_test.py b/tests/providers/github/services/repository/repository_default_branch_requires_linear_history/repository_default_branch_requires_linear_history_test.py new file mode 100644 index 0000000000..5759697999 --- /dev/null +++ b/tests/providers/github/services/repository/repository_default_branch_requires_linear_history/repository_default_branch_requires_linear_history_test.py @@ -0,0 +1,110 @@ +from unittest import mock + +from prowler.providers.github.services.repository.repository_service import Repo +from tests.providers.github.github_fixtures import set_mocked_github_provider + + +class Test_repository_default_branch_requires_linear_history_test: + def test_no_repositories(self): + repository_client = mock.MagicMock + repository_client.repositories = {} + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_github_provider(), + ), + mock.patch( + "prowler.providers.github.services.repository.repository_default_branch_requires_linear_history.repository_default_branch_requires_linear_history.repository_client", + new=repository_client, + ), + ): + from prowler.providers.github.services.repository.repository_default_branch_requires_linear_history.repository_default_branch_requires_linear_history import ( + repository_default_branch_requires_linear_history, + ) + + check = repository_default_branch_requires_linear_history() + result = check.execute() + assert len(result) == 0 + + def test_linear_history_disabled(self): + repository_client = mock.MagicMock + repo_name = "repo1" + default_branch = "main" + repository_client.repositories = { + 1: Repo( + id=1, + name=repo_name, + full_name="account-name/repo1", + default_branch=default_branch, + required_linear_history=False, + private=False, + securitymd=False, + ), + } + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_github_provider(), + ), + mock.patch( + "prowler.providers.github.services.repository.repository_default_branch_requires_linear_history.repository_default_branch_requires_linear_history.repository_client", + new=repository_client, + ), + ): + from prowler.providers.github.services.repository.repository_default_branch_requires_linear_history.repository_default_branch_requires_linear_history import ( + repository_default_branch_requires_linear_history, + ) + + check = repository_default_branch_requires_linear_history() + result = check.execute() + assert len(result) == 1 + assert result[0].resource_id == 1 + assert result[0].resource_name == "repo1" + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == f"Repository {repo_name} does not require linear history on default branch ({default_branch})." + ) + + def test_linear_history_enabled(self): + repository_client = mock.MagicMock + repo_name = "repo1" + default_branch = "main" + repository_client.repositories = { + 1: Repo( + id=1, + name=repo_name, + full_name="account-name/repo1", + private=False, + default_branch=default_branch, + required_linear_history=True, + securitymd=True, + ), + } + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_github_provider(), + ), + mock.patch( + "prowler.providers.github.services.repository.repository_default_branch_requires_linear_history.repository_default_branch_requires_linear_history.repository_client", + new=repository_client, + ), + ): + from prowler.providers.github.services.repository.repository_default_branch_requires_linear_history.repository_default_branch_requires_linear_history import ( + repository_default_branch_requires_linear_history, + ) + + check = repository_default_branch_requires_linear_history() + result = check.execute() + assert len(result) == 1 + assert result[0].resource_id == 1 + assert result[0].resource_name == "repo1" + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == f"Repository {repo_name} does require linear history on default branch ({default_branch})." + ) diff --git a/tests/providers/github/services/repository/repository_default_branch_requires_multiple_approvals/repository_default_branch_requires_multiple_approvals_test.py b/tests/providers/github/services/repository/repository_default_branch_requires_multiple_approvals/repository_default_branch_requires_multiple_approvals_test.py new file mode 100644 index 0000000000..be8905fc7d --- /dev/null +++ b/tests/providers/github/services/repository/repository_default_branch_requires_multiple_approvals/repository_default_branch_requires_multiple_approvals_test.py @@ -0,0 +1,154 @@ +from unittest import mock + +from prowler.providers.github.services.repository.repository_service import Repo +from tests.providers.github.github_fixtures import set_mocked_github_provider + + +class Test_repository_default_branch_requires_multiple_approvals: + def test_no_repositories(self): + repository_client = mock.MagicMock + repository_client.repositories = {} + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_github_provider(), + ), + mock.patch( + "prowler.providers.github.services.repository.repository_default_branch_requires_multiple_approvals.repository_default_branch_requires_multiple_approvals.repository_client", + new=repository_client, + ), + ): + from prowler.providers.github.services.repository.repository_default_branch_requires_multiple_approvals.repository_default_branch_requires_multiple_approvals import ( + repository_default_branch_requires_multiple_approvals, + ) + + check = repository_default_branch_requires_multiple_approvals() + result = check.execute() + assert len(result) == 0 + + def test_repository_no_require_pull_request(self): + repository_client = mock.MagicMock + repo_name = "repo1" + repository_client.repositories = { + 1: Repo( + id=1, + name=repo_name, + full_name="account-name/repo1", + default_branch_protection=False, + default_branch="main", + private=False, + securitymd=False, + require_pull_request=False, + approval_count=0, + ), + } + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_github_provider(), + ), + mock.patch( + "prowler.providers.github.services.repository.repository_default_branch_requires_multiple_approvals.repository_default_branch_requires_multiple_approvals.repository_client", + new=repository_client, + ), + ): + from prowler.providers.github.services.repository.repository_default_branch_requires_multiple_approvals.repository_default_branch_requires_multiple_approvals import ( + repository_default_branch_requires_multiple_approvals, + ) + + check = repository_default_branch_requires_multiple_approvals() + result = check.execute() + assert len(result) == 1 + assert result[0].resource_id == 1 + assert result[0].resource_name == "repo1" + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == f"Repository {repo_name} does not enforce at least 2 approvals for code changes." + ) + + def test_repository_no_approvals(self): + repository_client = mock.MagicMock + repo_name = "repo1" + repository_client.repositories = { + 1: Repo( + id=1, + name=repo_name, + full_name="account-name/repo1", + default_branch_protection=False, + default_branch="master", + private=False, + securitymd=False, + require_pull_request=True, + approval_count=0, + ), + } + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_github_provider(), + ), + mock.patch( + "prowler.providers.github.services.repository.repository_default_branch_requires_multiple_approvals.repository_default_branch_requires_multiple_approvals.repository_client", + new=repository_client, + ), + ): + from prowler.providers.github.services.repository.repository_default_branch_requires_multiple_approvals.repository_default_branch_requires_multiple_approvals import ( + repository_default_branch_requires_multiple_approvals, + ) + + check = repository_default_branch_requires_multiple_approvals() + result = check.execute() + assert len(result) == 1 + assert result[0].resource_id == 1 + assert result[0].resource_name == "repo1" + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == f"Repository {repo_name} does not enforce at least 2 approvals for code changes." + ) + + def test_repository_two_approvals(self): + repository_client = mock.MagicMock + repo_name = "repo1" + repository_client.repositories = { + 1: Repo( + id=1, + name=repo_name, + full_name="account-name/repo1", + default_branch_protection=True, + default_branch="master", + private=False, + securitymd=True, + require_pull_request=True, + approval_count=2, + ), + } + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_github_provider(), + ), + mock.patch( + "prowler.providers.github.services.repository.repository_default_branch_requires_multiple_approvals.repository_default_branch_requires_multiple_approvals.repository_client", + new=repository_client, + ), + ): + from prowler.providers.github.services.repository.repository_default_branch_requires_multiple_approvals.repository_default_branch_requires_multiple_approvals import ( + repository_default_branch_requires_multiple_approvals, + ) + + check = repository_default_branch_requires_multiple_approvals() + result = check.execute() + assert len(result) == 1 + assert result[0].resource_id == 1 + assert result[0].resource_name == "repo1" + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == f"Repository {repo_name} does enforce at least 2 approvals for code changes." + ) diff --git a/tests/providers/github/services/repository/repository_default_branch_status_checks_required/repository_default_branch_status_checks_required_test.py b/tests/providers/github/services/repository/repository_default_branch_status_checks_required/repository_default_branch_status_checks_required_test.py new file mode 100644 index 0000000000..0da7d9425f --- /dev/null +++ b/tests/providers/github/services/repository/repository_default_branch_status_checks_required/repository_default_branch_status_checks_required_test.py @@ -0,0 +1,110 @@ +from unittest import mock + +from prowler.providers.github.services.repository.repository_service import Repo +from tests.providers.github.github_fixtures import set_mocked_github_provider + + +class Test_repository_default_branch_status_checks_required_test: + def test_no_repositories(self): + repository_client = mock.MagicMock + repository_client.repositories = {} + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_github_provider(), + ), + mock.patch( + "prowler.providers.github.services.repository.repository_default_branch_status_checks_required.repository_default_branch_status_checks_required.repository_client", + new=repository_client, + ), + ): + from prowler.providers.github.services.repository.repository_default_branch_status_checks_required.repository_default_branch_status_checks_required import ( + repository_default_branch_status_checks_required, + ) + + check = repository_default_branch_status_checks_required() + result = check.execute() + assert len(result) == 0 + + def test_enforce_status_checks_disabled(self): + repository_client = mock.MagicMock + repo_name = "repo1" + default_branch = "main" + repository_client.repositories = { + 1: Repo( + id=1, + name=repo_name, + full_name="account-name/repo1", + default_branch=default_branch, + status_checks=False, + private=False, + securitymd=False, + ), + } + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_github_provider(), + ), + mock.patch( + "prowler.providers.github.services.repository.repository_default_branch_status_checks_required.repository_default_branch_status_checks_required.repository_client", + new=repository_client, + ), + ): + from prowler.providers.github.services.repository.repository_default_branch_status_checks_required.repository_default_branch_status_checks_required import ( + repository_default_branch_status_checks_required, + ) + + check = repository_default_branch_status_checks_required() + result = check.execute() + assert len(result) == 1 + assert result[0].resource_id == 1 + assert result[0].resource_name == "repo1" + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == f"Repository {repo_name} does not enforce status checks." + ) + + def test_enforce_status_checks_enabled(self): + repository_client = mock.MagicMock + repo_name = "repo1" + default_branch = "main" + repository_client.repositories = { + 1: Repo( + id=1, + name=repo_name, + full_name="account-name/repo1", + private=False, + default_branch=default_branch, + status_checks=True, + securitymd=True, + ), + } + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_github_provider(), + ), + mock.patch( + "prowler.providers.github.services.repository.repository_default_branch_status_checks_required.repository_default_branch_status_checks_required.repository_client", + new=repository_client, + ), + ): + from prowler.providers.github.services.repository.repository_default_branch_status_checks_required.repository_default_branch_status_checks_required import ( + repository_default_branch_status_checks_required, + ) + + check = repository_default_branch_status_checks_required() + result = check.execute() + assert len(result) == 1 + assert result[0].resource_id == 1 + assert result[0].resource_name == "repo1" + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == f"Repository {repo_name} does enforce status checks." + ) diff --git a/tests/providers/github/services/repository/repository_public_has_securitymd_file/repository_public_has_securitymd_file_test.py b/tests/providers/github/services/repository/repository_public_has_securitymd_file/repository_public_has_securitymd_file_test.py new file mode 100644 index 0000000000..776d557252 --- /dev/null +++ b/tests/providers/github/services/repository/repository_public_has_securitymd_file/repository_public_has_securitymd_file_test.py @@ -0,0 +1,110 @@ +from unittest import mock + +from prowler.providers.github.services.repository.repository_service import Repo +from tests.providers.github.github_fixtures import set_mocked_github_provider + + +class Test_repository_public_has_securitymd_file_test: + def test_no_repositories(self): + repository_client = mock.MagicMock + repository_client.repositories = {} + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_github_provider(), + ), + mock.patch( + "prowler.providers.github.services.repository.repository_public_has_securitymd_file.repository_public_has_securitymd_file.repository_client", + new=repository_client, + ), + ): + from prowler.providers.github.services.repository.repository_public_has_securitymd_file.repository_public_has_securitymd_file import ( + repository_public_has_securitymd_file, + ) + + check = repository_public_has_securitymd_file() + result = check.execute() + assert len(result) == 0 + + def test_one_repository_no_securitymd(self): + repository_client = mock.MagicMock + repo_name = "repo1" + repository_client.repositories = { + 1: Repo( + id=1, + name=repo_name, + full_name="account-name/repo1", + default_branch="main", + private=False, + securitymd=False, + require_pull_request=False, + approval_count=0, + ), + } + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_github_provider(), + ), + mock.patch( + "prowler.providers.github.services.repository.repository_public_has_securitymd_file.repository_public_has_securitymd_file.repository_client", + new=repository_client, + ), + ): + from prowler.providers.github.services.repository.repository_public_has_securitymd_file.repository_public_has_securitymd_file import ( + repository_public_has_securitymd_file, + ) + + check = repository_public_has_securitymd_file() + result = check.execute() + assert len(result) == 1 + assert result[0].resource_id == 1 + assert result[0].resource_name == "repo1" + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == f"Repository {repo_name} does not have a SECURITY.md file." + ) + + def test_one_repository_securitymd(self): + repository_client = mock.MagicMock + repo_name = "repo1" + repository_client.repositories = { + 1: Repo( + id=1, + name=repo_name, + full_name="account-name/repo1", + default_branch="main", + private=False, + securitymd=True, + require_pull_request=False, + approval_count=0, + ), + } + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_github_provider(), + ), + mock.patch( + "prowler.providers.github.services.repository.repository_public_has_securitymd_file.repository_public_has_securitymd_file.repository_client", + new=repository_client, + ), + ): + from prowler.providers.github.services.repository.repository_public_has_securitymd_file.repository_public_has_securitymd_file import ( + repository_public_has_securitymd_file, + ) + + check = repository_public_has_securitymd_file() + result = check.execute() + assert len(result) == 1 + assert result[0].resource_id == 1 + assert result[0].resource_name == "repo1" + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == f"Repository {repo_name} does have a SECURITY.md file." + ) diff --git a/tests/providers/github/services/repository/repository_service_test.py b/tests/providers/github/services/repository/repository_service_test.py new file mode 100644 index 0000000000..bcc3b19791 --- /dev/null +++ b/tests/providers/github/services/repository/repository_service_test.py @@ -0,0 +1,62 @@ +from unittest.mock import patch + +from prowler.providers.github.services.repository.repository_service import ( + Repo, + Repository, +) +from tests.providers.github.github_fixtures import set_mocked_github_provider + + +def mock_list_repositories(_): + return { + 1: Repo( + id=1, + name="repo1", + full_name="account-name/repo1", + default_branch_protection=True, + default_branch="main", + private=False, + securitymd=True, + require_pull_request=True, + required_linear_history=True, + allow_force_pushes=True, + default_branch_deletion=True, + status_checks=True, + approval_count=2, + enforce_admins=True, + delete_branch_on_merge=True, + conversation_resolution=True, + ), + } + + +@patch( + "prowler.providers.github.services.repository.repository_service.Repository._list_repositories", + new=mock_list_repositories, +) +class Test_Repository_Service: + def test_get_client(self): + repository_service = Repository(set_mocked_github_provider()) + assert repository_service.clients[0].__class__.__name__ == "Github" + + def test_get_service(self): + repository_service = Repository(set_mocked_github_provider()) + assert repository_service.__class__.__name__ == "Repository" + + def test_list_repositories(self): + repository_service = Repository(set_mocked_github_provider()) + assert len(repository_service.repositories) == 1 + assert repository_service.repositories[1].name == "repo1" + assert repository_service.repositories[1].full_name == "account-name/repo1" + assert repository_service.repositories[1].private is False + assert repository_service.repositories[1].default_branch == "main" + assert repository_service.repositories[1].securitymd + assert repository_service.repositories[1].required_linear_history + assert repository_service.repositories[1].require_pull_request + assert repository_service.repositories[1].allow_force_pushes + assert repository_service.repositories[1].default_branch_deletion + assert repository_service.repositories[1].status_checks + assert repository_service.repositories[1].enforce_admins + assert repository_service.repositories[1].delete_branch_on_merge + assert repository_service.repositories[1].conversation_resolution + assert repository_service.repositories[1].approval_count == 2 diff --git a/tests/providers/kubernetes/kubernetes_provider_test.py b/tests/providers/kubernetes/kubernetes_provider_test.py index 681e9b9b39..d21792aeb0 100644 --- a/tests/providers/kubernetes/kubernetes_provider_test.py +++ b/tests/providers/kubernetes/kubernetes_provider_test.py @@ -1,5 +1,7 @@ from argparse import Namespace -from unittest.mock import patch +from unittest.mock import MagicMock, patch + +from kubernetes.config.config_exception import ConfigException from kubernetes import client from prowler.config.config import ( @@ -305,3 +307,105 @@ class TestKubernetesProvider: assert connection.is_connected assert connection.error is None + + def test_kubernetes_provider_incluster_with_env_var(self, monkeypatch): + monkeypatch.setenv("CLUSTER_NAME", "env-cluster-name") + + with ( + patch( + "kubernetes.config.load_kube_config", + side_effect=ConfigException("No kubeconfig"), + ), + patch("kubernetes.config.load_incluster_config", return_value=None), + patch("prowler.providers.kubernetes.kubernetes_provider.client.ApiClient"), + patch( + "prowler.providers.kubernetes.kubernetes_provider.KubernetesProvider.get_all_namespaces", + return_value=["default"], + ), + ): + session = KubernetesProvider.setup_session( + kubeconfig_file=None, + kubeconfig_content=None, + context=None, + cluster_name=None, + ) + assert isinstance(session, KubernetesSession) + assert session.context["context"]["cluster"] == "env-cluster-name" + + def test_kubernetes_provider_incluster_with_cli_flag(self): + with ( + patch( + "kubernetes.config.load_kube_config", + side_effect=ConfigException("No kubeconfig"), + ), + patch("kubernetes.config.load_incluster_config", return_value=None), + patch("prowler.providers.kubernetes.kubernetes_provider.client.ApiClient"), + patch( + "prowler.providers.kubernetes.kubernetes_provider.KubernetesProvider.get_all_namespaces", + return_value=["default"], + ), + ): + session = KubernetesProvider.setup_session( + kubeconfig_file=None, + kubeconfig_content=None, + context=None, + cluster_name="cli-cluster-name", + ) + assert isinstance(session, KubernetesSession) + assert session.context["context"]["cluster"] == "cli-cluster-name" + + def test_kubernetes_provider_proxy_from_env(self, monkeypatch): + monkeypatch.setenv("HTTPS_PROXY", "http://my.internal.proxy:8888") + + captured = {} + + def fake_api_client(configuration): + captured["proxy"] = getattr(configuration, "proxy", None) + return MagicMock() + + with ( + patch( + "kubernetes.config.load_kube_config", + side_effect=ConfigException("No kubeconfig"), + ), + patch("kubernetes.config.load_incluster_config", return_value=None), + patch( + "prowler.providers.kubernetes.kubernetes_provider.ApiClient", + side_effect=fake_api_client, + ), + patch( + "prowler.providers.kubernetes.kubernetes_provider.KubernetesProvider.get_all_namespaces", + return_value=["default"], + ), + ): + KubernetesProvider.setup_session() + + assert captured["proxy"] == "http://my.internal.proxy:8888" + + def test_kubernetes_provider_disable_tls_verification(self, monkeypatch): + monkeypatch.setenv("K8S_SKIP_TLS_VERIFY", "true") + + captured = {} + + def fake_api_client(configuration): + captured["verify_ssl"] = getattr(configuration, "verify_ssl", True) + return MagicMock() + + with ( + patch( + "kubernetes.config.load_kube_config", + side_effect=ConfigException("No kubeconfig"), + ), + patch("kubernetes.config.load_incluster_config", return_value=None), + patch( + "prowler.providers.kubernetes.kubernetes_provider.ApiClient", + side_effect=fake_api_client, + ), + patch( + "prowler.providers.kubernetes.kubernetes_provider.KubernetesProvider.get_all_namespaces", + return_value=["default"], + ), + ): + KubernetesProvider.setup_session() + + assert captured["verify_ssl"] is False diff --git a/tests/providers/microsoft365/lib/mutelist/fixtures/microsoft365_mutelist.yaml b/tests/providers/m365/lib/mutelist/fixtures/m365_mutelist.yaml similarity index 100% rename from tests/providers/microsoft365/lib/mutelist/fixtures/microsoft365_mutelist.yaml rename to tests/providers/m365/lib/mutelist/fixtures/m365_mutelist.yaml diff --git a/tests/providers/microsoft365/lib/mutelist/microsoft365_mutelist_test.py b/tests/providers/m365/lib/mutelist/m365_mutelist_test.py similarity index 82% rename from tests/providers/microsoft365/lib/mutelist/microsoft365_mutelist_test.py rename to tests/providers/m365/lib/mutelist/m365_mutelist_test.py index 5bbde2e89d..8df9a97292 100644 --- a/tests/providers/microsoft365/lib/mutelist/microsoft365_mutelist_test.py +++ b/tests/providers/m365/lib/mutelist/m365_mutelist_test.py @@ -1,17 +1,15 @@ import yaml from mock import MagicMock -from prowler.providers.microsoft365.lib.mutelist.mutelist import Microsoft365Mutelist +from prowler.providers.m365.lib.mutelist.mutelist import M365Mutelist from tests.lib.outputs.fixtures.fixtures import generate_finding_output -MUTELIST_FIXTURE_PATH = ( - "tests/providers/microsoft365/lib/mutelist/fixtures/microsoft365_mutelist.yaml" -) +MUTELIST_FIXTURE_PATH = "tests/providers/m365/lib/mutelist/fixtures/m365_mutelist.yaml" -class TestMicrosoft365Mutelist: +class TestM365Mutelist: def test_get_mutelist_file_from_local_file(self): - mutelist = Microsoft365Mutelist(mutelist_path=MUTELIST_FIXTURE_PATH) + mutelist = M365Mutelist(mutelist_path=MUTELIST_FIXTURE_PATH) with open(MUTELIST_FIXTURE_PATH) as f: mutelist_fixture = yaml.safe_load(f)["Mutelist"] @@ -21,7 +19,7 @@ class TestMicrosoft365Mutelist: def test_get_mutelist_file_from_local_file_non_existent(self): mutelist_path = "tests/lib/mutelist/fixtures/not_present" - mutelist = Microsoft365Mutelist(mutelist_path=mutelist_path) + mutelist = M365Mutelist(mutelist_path=mutelist_path) assert mutelist.mutelist == {} assert mutelist.mutelist_file_path == mutelist_path @@ -34,7 +32,7 @@ class TestMicrosoft365Mutelist: mutelist_fixture["Accounts1"] = mutelist_fixture["Accounts"] del mutelist_fixture["Accounts"] - mutelist = Microsoft365Mutelist(mutelist_content=mutelist_fixture) + mutelist = M365Mutelist(mutelist_content=mutelist_fixture) assert not mutelist.validate_mutelist() assert mutelist.mutelist == {} @@ -55,7 +53,7 @@ class TestMicrosoft365Mutelist: } } - mutelist = Microsoft365Mutelist(mutelist_content=mutelist_content) + mutelist = M365Mutelist(mutelist_content=mutelist_content) finding = MagicMock finding.tenant_id = "subscription_1" @@ -84,7 +82,7 @@ class TestMicrosoft365Mutelist: } } - mutelist = Microsoft365Mutelist(mutelist_content=mutelist_content) + mutelist = M365Mutelist(mutelist_content=mutelist_content) finding_1 = generate_finding_output( check_id="check_test", diff --git a/tests/providers/m365/lib/powershell/m365_powershell_test.py b/tests/providers/m365/lib/powershell/m365_powershell_test.py new file mode 100644 index 0000000000..7bc3236433 --- /dev/null +++ b/tests/providers/m365/lib/powershell/m365_powershell_test.py @@ -0,0 +1,563 @@ +from unittest.mock import MagicMock, call, patch + +import pytest + +from prowler.lib.powershell.powershell import PowerShellSession +from prowler.providers.m365.exceptions.exceptions import ( + M365UserNotBelongingToTenantError, +) +from prowler.providers.m365.lib.powershell.m365_powershell import M365PowerShell +from prowler.providers.m365.models import M365Credentials, M365IdentityInfo + + +class Testm365PowerShell: + @patch("subprocess.Popen") + def test_init(self, mock_popen): + mock_process = MagicMock() + mock_popen.return_value = mock_process + credentials = M365Credentials(user="test@example.com", passwd="test_password") + identity = M365IdentityInfo( + identity_id="test_id", + identity_type="User", + tenant_id="test_tenant", + tenant_domain="example.com", + tenant_domains=["example.com"], + location="test_location", + ) + + with patch.object(M365PowerShell, "init_credential") as mock_init_credential: + session = M365PowerShell(credentials, identity) + + mock_popen.assert_called_once() + mock_init_credential.assert_called_once_with(credentials) + assert session.process == mock_process + assert session.END == "" + session.close() + + @patch("subprocess.Popen") + def test_sanitize(self, _): + credentials = M365Credentials(user="test@example.com", passwd="test_password") + identity = M365IdentityInfo( + identity_id="test_id", + identity_type="User", + tenant_id="test_tenant", + tenant_domain="example.com", + tenant_domains=["example.com"], + location="test_location", + ) + session = M365PowerShell(credentials, identity) + + test_cases = [ + ("test@example.com", "test@example.com"), + ("test@example.com!", "test@example.com"), + ("test@example.com#", "test@example.com"), + ("test@example.com$", "test@example.com"), + ("test@example.com%", "test@example.com"), + ("test@example.com^", "test@example.com"), + ("test@example.com&", "test@example.com"), + ("test@example.com*", "test@example.com"), + ("test@example.com(", "test@example.com"), + ("test@example.com)", "test@example.com"), + ("test@example.com-", "test@example.com-"), + ("test@example.com_", "test@example.com_"), + ("test@example.com+", "test@example.com+"), + ("test_;echo pwned;password", "test_echopwnedpassword"), + ] + + for input_str, expected in test_cases: + assert session.sanitize(input_str) == expected + session.close() + + @patch("subprocess.Popen") + def test_init_credential(self, mock_popen): + mock_process = MagicMock() + mock_popen.return_value = mock_process + credentials = M365Credentials( + user="test@example.com", + passwd="test_password", + client_id="test_client_id", + client_secret="test_client_secret", + tenant_id="test_tenant_id", + ) + identity = M365IdentityInfo( + identity_id="test_id", + identity_type="User", + tenant_id="test_tenant", + tenant_domain="example.com", + tenant_domains=["example.com"], + location="test_location", + ) + session = M365PowerShell(credentials, identity) + + session.execute = MagicMock() + + session.init_credential(credentials) + + session.execute.assert_any_call(f'$user = "{credentials.user}"') + session.execute.assert_any_call( + f'$secureString = "{credentials.passwd}" | ConvertTo-SecureString' + ) + session.execute.assert_any_call( + "$credential = New-Object System.Management.Automation.PSCredential ($user, $secureString)" + ) + session.close() + + @patch("subprocess.Popen") + @patch("msal.ConfidentialClientApplication") + def test_test_credentials(self, mock_msal, mock_popen): + mock_process = MagicMock() + mock_popen.return_value = mock_process + mock_msal_instance = MagicMock() + mock_msal.return_value = mock_msal_instance + mock_msal_instance.acquire_token_by_username_password.return_value = { + "access_token": "test_token" + } + + credentials = M365Credentials( + user="test@contoso.onmicrosoft.com", + passwd="test_password", + client_id="test_client_id", + client_secret="test_client_secret", + tenant_id="test_tenant_id", + ) + identity = M365IdentityInfo( + identity_id="test_id", + identity_type="User", + tenant_id="test_tenant", + tenant_domain="contoso.onmicrosoft.com", + tenant_domains=["contoso.onmicrosoft.com"], + location="test_location", + ) + session = M365PowerShell(credentials, identity) + + # Mock read_output to return the decrypted password + session.read_output = MagicMock(return_value="decrypted_password") + + # Mock execute to return the result of read_output + session.execute = MagicMock(side_effect=lambda _: session.read_output()) + + # Execute the test + result = session.test_credentials(credentials) + assert result is True + + # Verify execute was called with the correct commands + session.execute.assert_any_call( + f'$securePassword = "{credentials.passwd}" | ConvertTo-SecureString' + ) + session.execute.assert_any_call( + f'$credential = New-Object System.Management.Automation.PSCredential("{session.sanitize(credentials.user)}", $securePassword)' + ) + session.execute.assert_any_call( + 'Write-Output "$($credential.GetNetworkCredential().Password)"' + ) + + # Verify MSAL was called with the correct parameters + mock_msal.assert_called_once_with( + client_id="test_client_id", + client_credential="test_client_secret", + authority="https://login.microsoftonline.com/test_tenant_id", + ) + mock_msal_instance.acquire_token_by_username_password.assert_called_once_with( + username="test@contoso.onmicrosoft.com", + password="decrypted_password", + scopes=["https://graph.microsoft.com/.default"], + ) + session.close() + + @patch("subprocess.Popen") + @patch("msal.ConfidentialClientApplication") + def test_test_credentials_user_not_belonging_to_tenant(self, mock_msal, mock_popen): + mock_process = MagicMock() + mock_popen.return_value = mock_process + mock_msal_instance = MagicMock() + mock_msal.return_value = mock_msal_instance + mock_msal_instance.acquire_token_by_username_password.return_value = { + "access_token": "test_token" + } + + credentials = M365Credentials( + user="user@otherdomain.com", + passwd="test_password", + client_id="test_client_id", + client_secret="test_client_secret", + tenant_id="test_tenant_id", + ) + identity = M365IdentityInfo( + identity_id="test_id", + identity_type="User", + tenant_id="test_tenant", + tenant_domain="contoso.onmicrosoft.com", + tenant_domains=["contoso.onmicrosoft.com"], + location="test_location", + ) + session = M365PowerShell(credentials, identity) + + # Mock the execute method to return the decrypted password + def mock_execute(command, *args, **kwargs): + if "Write-Output" in command: + return "decrypted_password" + return None + + session.execute = MagicMock(side_effect=mock_execute) + session.process.stdin.write = MagicMock() + session.read_output = MagicMock(return_value="decrypted_password") + + with pytest.raises(M365UserNotBelongingToTenantError) as exception: + session.test_credentials(credentials) + + assert exception.type == M365UserNotBelongingToTenantError + assert ( + "The user domain otherdomain.com does not match any of the tenant domains: contoso.onmicrosoft.com" + in str(exception.value) + ) + + # Verify MSAL was not called since domain validation failed first + mock_msal.assert_not_called() + mock_msal_instance.acquire_token_by_username_password.assert_not_called() + + session.close() + + @patch("subprocess.Popen") + @patch("msal.ConfidentialClientApplication") + def test_test_credentials_auth_failure(self, mock_msal, mock_popen): + mock_process = MagicMock() + mock_popen.return_value = mock_process + mock_msal_instance = MagicMock() + mock_msal.return_value = mock_msal_instance + mock_msal_instance.acquire_token_by_username_password.return_value = None + + credentials = M365Credentials( + user="test@contoso.onmicrosoft.com", + passwd="test_password", + client_id="test_client_id", + client_secret="test_client_secret", + tenant_id="test_tenant_id", + ) + identity = M365IdentityInfo( + identity_id="test_id", + identity_type="User", + tenant_id="test_tenant", + tenant_domain="contoso.onmicrosoft.com", + tenant_domains=["contoso.onmicrosoft.com"], + location="test_location", + ) + session = M365PowerShell(credentials, identity) + + # Mock the execute method to return the decrypted password + def mock_execute(command, *args, **kwargs): + if "Write-Output" in command: + return "decrypted_password" + return None + + session.execute = MagicMock(side_effect=mock_execute) + session.process.stdin.write = MagicMock() + session.read_output = MagicMock(return_value="decrypted_password") + + assert session.test_credentials(credentials) is False + + mock_msal.assert_called_once_with( + client_id="test_client_id", + client_credential="test_client_secret", + authority="https://login.microsoftonline.com/test_tenant_id", + ) + mock_msal_instance.acquire_token_by_username_password.assert_called_once_with( + username="test@contoso.onmicrosoft.com", + password="decrypted_password", + scopes=["https://graph.microsoft.com/.default"], + ) + + session.close() + + @patch("subprocess.Popen") + def test_remove_ansi(self, mock_popen): + credentials = M365Credentials(user="test@example.com", passwd="test_password") + identity = M365IdentityInfo( + identity_id="test_id", + identity_type="User", + tenant_id="test_tenant", + tenant_domain="example.com", + tenant_domains=["example.com"], + location="test_location", + ) + session = M365PowerShell(credentials, identity) + + test_cases = [ + ("\x1b[32mSuccess\x1b[0m", "Success"), + ("\x1b[31mError\x1b[0m", "Error"), + ("\x1b[33mWarning\x1b[0m", "Warning"), + ("Normal text", "Normal text"), + ("\x1b[1mBold\x1b[0m", "Bold"), + ] + + for input_str, expected in test_cases: + assert session.remove_ansi(input_str) == expected + session.close() + + @patch("subprocess.Popen") + def test_execute(self, mock_popen): + mock_process = MagicMock() + mock_popen.return_value = mock_process + credentials = M365Credentials(user="test@example.com", passwd="test_password") + identity = M365IdentityInfo( + identity_id="test_id", + identity_type="User", + tenant_id="test_tenant", + tenant_domain="example.com", + tenant_domains=["example.com"], + location="test_location", + ) + session = M365PowerShell(credentials, identity) + command = "Get-Command" + expected_output = {"Name": "Get-Command"} + + with patch.object(session, "execute", return_value=expected_output): + result = session.execute(command) + assert result == expected_output + session.close() + + @patch("subprocess.Popen") + def test_read_output(self, mock_popen): + """Test the read_output method with various scenarios""" + mock_process = MagicMock() + mock_popen.return_value = mock_process + credentials = M365Credentials(user="test@example.com", passwd="test_password") + identity = M365IdentityInfo( + identity_id="test_id", + identity_type="User", + tenant_id="test_tenant", + tenant_domain="example.com", + tenant_domains=["example.com"], + location="test_location", + ) + session = M365PowerShell(credentials, identity) + + # Test 1: Normal stdout output + mock_process.stdout.readline.side_effect = [ + "test@example.com\n", + f"{session.END}\n", + ] + mock_process.stderr.readline.return_value = f"Write-Error: {session.END}\n" + with patch.object(session, "remove_ansi", side_effect=lambda x: x): + result = session.read_output() + assert result == "test@example.com" + + # Test 2: Error in stderr + mock_process.stdout.readline.side_effect = ["\n", f"{session.END}\n"] + mock_process.stderr.readline.side_effect = [ + "Write-Error: Authentication failed\n", + f"Write-Error: {session.END}\n", + ] + with patch.object(session, "remove_ansi", side_effect=lambda x: x): + with patch("prowler.lib.logger.logger.error") as mock_error: + result = session.read_output() + assert result == "" + mock_error.assert_called_once_with( + "PowerShell error output: Write-Error: Authentication failed" + ) + + # Test 3: Timeout in stdout + mock_process.stdout.readline.side_effect = ["test output\n"] # No END marker + mock_process.stderr.readline.return_value = f"Write-Error: {session.END}\n" + result = session.read_output(timeout=0.1, default="timeout") + assert result == "timeout" + + session.close() + + @patch("subprocess.Popen") + def test_json_parse_output(self, mock_popen): + mock_process = MagicMock() + mock_popen.return_value = mock_process + credentials = M365Credentials(user="test@example.com", passwd="test_password") + identity = M365IdentityInfo( + identity_id="test_id", + identity_type="User", + tenant_id="test_tenant", + tenant_domain="example.com", + tenant_domains=["example.com"], + location="test_location", + ) + session = M365PowerShell(credentials, identity) + + test_cases = [ + ('{"key": "value"}', {"key": "value"}), + ('[{"key": "value"}]', [{"key": "value"}]), + ( + '[{"key": "value"},{"key": "value"}]', + [{"key": "value"}, {"key": "value"}], + ), + ("[{}]", [{}]), + ("[{},{}]", [{}, {}]), + ("not json", {}), + ("", {}), + ] + + for input_str, expected in test_cases: + result = session.json_parse_output(input_str) + assert result == expected + session.close() + + @patch("subprocess.Popen") + def test_close(self, mock_popen): + mock_process = MagicMock() + mock_popen.return_value = mock_process + credentials = M365Credentials(user="test@example.com", passwd="test_password") + identity = M365IdentityInfo( + identity_id="test_id", + identity_type="User", + tenant_id="test_tenant", + tenant_domain="example.com", + tenant_domains=["example.com"], + location="test_location", + ) + session = M365PowerShell(credentials, identity) + + session.close() + + mock_process.stdin.flush.assert_called_once() + mock_process.terminate.assert_called_once() + + @patch("subprocess.Popen") + def test_initialize_m365_powershell_modules_success(self, mock_popen): + """Test initialize_m365_powershell_modules when all modules are successfully initialized""" + mock_process = MagicMock() + mock_popen.return_value = mock_process + + # Mock the execute method to simulate successful module installation + def mock_execute(command, *args, **kwargs): + if "Get-Module" in command: + return None # Module not installed + elif "Install-Module" in command: + return None # Installation successful + elif "Import-Module" in command: + return None # Import successful + return None + + with ( + patch.object( + PowerShellSession, "execute", side_effect=mock_execute + ) as mock_execute_obj, + patch("prowler.lib.logger.logger.info") as mock_info, + ): + from prowler.providers.m365.lib.powershell.m365_powershell import ( + initialize_m365_powershell_modules, + ) + + result = initialize_m365_powershell_modules() + + # Verify successful initialization + assert result is True + # Verify that execute was called for each module + assert mock_execute_obj.call_count == 6 # 2 modules * 3 commands each + # Verify success messages were logged + mock_info.assert_any_call( + "Successfully installed module ExchangeOnlineManagement" + ) + mock_info.assert_any_call("Successfully installed module MicrosoftTeams") + + @patch("subprocess.Popen") + def test_initialize_m365_powershell_modules_failure(self, mock_popen): + """Test initialize_m365_powershell_modules when module initialization fails""" + mock_process = MagicMock() + mock_popen.return_value = mock_process + + # Mock the execute method to simulate installation failure + def mock_execute(command, *args, **kwargs): + if "Get-Module" in command: + return None # Module not installed + elif "Install-Module" in command: + raise Exception("Installation failed") + return None + + with ( + patch.object( + PowerShellSession, "execute", side_effect=mock_execute + ) as mock_execute_obj, + patch("prowler.lib.logger.logger.error") as mock_error, + ): + from prowler.providers.m365.lib.powershell.m365_powershell import ( + initialize_m365_powershell_modules, + ) + + result = initialize_m365_powershell_modules() + + # Verify failed initialization + assert result is False + # Verify that execute was called at least twice + assert mock_execute_obj.call_count >= 2 + # Verify error was logged + mock_error.assert_called_with( + "Failed to initialize module ExchangeOnlineManagement: Installation failed" + ) + + @patch("subprocess.Popen") + def test_main_success(self, mock_popen): + """Test main() function when module initialization is successful""" + mock_process = MagicMock() + mock_popen.return_value = mock_process + + # Mock the execute method to simulate successful module installation + def mock_execute(command, *args, **kwargs): + if "Get-Module" in command: + return None # Module not installed + elif "Install-Module" in command: + return None # Installation successful + elif "Import-Module" in command: + return None # Import successful + return None + + with ( + patch.object(PowerShellSession, "execute", side_effect=mock_execute), + patch("prowler.lib.logger.logger.info") as mock_info, + patch("prowler.lib.logger.logger.error") as mock_error, + ): + from prowler.providers.m365.lib.powershell.m365_powershell import main + + main() + + # Verify all info messages were logged in the correct order + assert mock_info.call_count == 3 + mock_info.assert_has_calls( + [ + call("Successfully installed module ExchangeOnlineManagement"), + call("Successfully installed module MicrosoftTeams"), + call("M365 PowerShell modules initialized successfully"), + ] + ) + # Verify no error was logged + mock_error.assert_not_called() + + @patch("subprocess.Popen") + def test_main_failure(self, mock_popen): + """Test main() function when module initialization fails""" + mock_process = MagicMock() + mock_popen.return_value = mock_process + + # Mock the execute method to simulate installation failure + def mock_execute(command, *args, **kwargs): + if "Get-Module" in command: + return None # Module not installed + elif "Install-Module" in command: + raise Exception("Installation failed") + return None + + with ( + patch.object(PowerShellSession, "execute", side_effect=mock_execute), + patch("prowler.lib.logger.logger.info") as mock_info, + patch("prowler.lib.logger.logger.error") as mock_error, + ): + from prowler.providers.m365.lib.powershell.m365_powershell import main + + main() + + # Verify all error messages were logged in the correct order + assert mock_error.call_count == 2 + mock_error.assert_has_calls( + [ + call( + "Failed to initialize module ExchangeOnlineManagement: Installation failed" + ), + call("Failed to initialize M365 PowerShell modules"), + ] + ) + # Verify no info messages were logged + mock_info.assert_not_called() diff --git a/tests/providers/microsoft365/lib/regions/microsoft365_regions_test.py b/tests/providers/m365/lib/regions/m365_regions_test.py similarity index 76% rename from tests/providers/microsoft365/lib/regions/microsoft365_regions_test.py rename to tests/providers/m365/lib/regions/m365_regions_test.py index 49ec5a480d..676e769276 100644 --- a/tests/providers/microsoft365/lib/regions/microsoft365_regions_test.py +++ b/tests/providers/m365/lib/regions/m365_regions_test.py @@ -1,6 +1,6 @@ from azure.identity import AzureAuthorityHosts -from prowler.providers.microsoft365.lib.regions.regions import ( +from prowler.providers.m365.lib.regions.regions import ( MICROSOFT365_CHINA_CLOUD, MICROSOFT365_GENERIC_CLOUD, MICROSOFT365_US_GOV_CLOUD, @@ -8,25 +8,25 @@ from prowler.providers.microsoft365.lib.regions.regions import ( ) -class Test_microsoft365_regions: +class Test_m365_regions: def test_get_regions_config(self): allowed_regions = [ - "Microsoft365Global", - "Microsoft365China", - "Microsoft365USGovernment", + "M365Global", + "M365China", + "M365USGovernment", ] expected_output = { - "Microsoft365Global": { + "M365Global": { "authority": None, "base_url": MICROSOFT365_GENERIC_CLOUD, "credential_scopes": [MICROSOFT365_GENERIC_CLOUD + "/.default"], }, - "Microsoft365China": { + "M365China": { "authority": AzureAuthorityHosts.AZURE_CHINA, "base_url": MICROSOFT365_CHINA_CLOUD, "credential_scopes": [MICROSOFT365_CHINA_CLOUD + "/.default"], }, - "Microsoft365USGovernment": { + "M365USGovernment": { "authority": AzureAuthorityHosts.AZURE_GOVERNMENT, "base_url": MICROSOFT365_US_GOV_CLOUD, "credential_scopes": [MICROSOFT365_US_GOV_CLOUD + "/.default"], diff --git a/tests/providers/microsoft365/microsoft365_fixtures.py b/tests/providers/m365/m365_fixtures.py similarity index 52% rename from tests/providers/microsoft365/microsoft365_fixtures.py rename to tests/providers/m365/m365_fixtures.py index 1dbb09c612..f985f94b6a 100644 --- a/tests/providers/microsoft365/microsoft365_fixtures.py +++ b/tests/providers/m365/m365_fixtures.py @@ -1,10 +1,11 @@ from azure.identity import DefaultAzureCredential from mock import MagicMock -from prowler.providers.microsoft365.microsoft365_provider import Microsoft365Provider -from prowler.providers.microsoft365.models import ( - Microsoft365IdentityInfo, - Microsoft365RegionConfig, +from prowler.providers.m365.m365_provider import M365Provider +from prowler.providers.m365.models import ( + M365Credentials, + M365IdentityInfo, + M365RegionConfig, ) # Azure Identity @@ -18,20 +19,25 @@ LOCATION = "global" # Mocked Azure Audit Info -def set_mocked_microsoft365_provider( - credentials: DefaultAzureCredential = DefaultAzureCredential(), - identity: Microsoft365IdentityInfo = Microsoft365IdentityInfo( +def set_mocked_m365_provider( + session_credentials: DefaultAzureCredential = DefaultAzureCredential(), + credentials: M365Credentials = M365Credentials( + user="user@email.com", passwd="111111aa111111aaa1111" + ), + identity: M365IdentityInfo = M365IdentityInfo( identity_id=IDENTITY_ID, identity_type=IDENTITY_TYPE, tenant_id=TENANT_ID, tenant_domain=DOMAIN, + user="user@email.com", ), audit_config: dict = None, - azure_region_config: Microsoft365RegionConfig = Microsoft365RegionConfig(), -) -> Microsoft365Provider: + azure_region_config: M365RegionConfig = M365RegionConfig(), +) -> M365Provider: provider = MagicMock() - provider.type = "microsoft365" - provider.session.credentials = credentials + provider.type = "m365" + provider.session.credentials = session_credentials + provider.credentials = credentials provider.identity = identity provider.audit_config = audit_config provider.region_config = azure_region_config diff --git a/tests/providers/m365/m365_provider_test.py b/tests/providers/m365/m365_provider_test.py new file mode 100644 index 0000000000..2f30efabde --- /dev/null +++ b/tests/providers/m365/m365_provider_test.py @@ -0,0 +1,819 @@ +import os +from unittest.mock import patch +from uuid import uuid4 + +import pytest +from azure.core.credentials import AccessToken +from azure.identity import ( + ClientSecretCredential, + DefaultAzureCredential, + InteractiveBrowserCredential, +) +from mock import MagicMock + +from prowler.config.config import ( + default_config_file_path, + default_fixer_config_file_path, + load_and_validate_config_file, +) +from prowler.providers.common.models import Connection +from prowler.providers.m365.exceptions.exceptions import ( + M365HTTPResponseError, + M365InvalidProviderIdError, + M365MissingEnvironmentCredentialsError, + M365NoAuthenticationMethodError, + M365NotValidClientIdError, + M365NotValidClientSecretError, + M365NotValidEncryptedPasswordError, + M365NotValidTenantIdError, + M365NotValidUserError, + M365UserNotBelongingToTenantError, +) +from prowler.providers.m365.m365_provider import M365Provider +from prowler.providers.m365.models import ( + M365Credentials, + M365IdentityInfo, + M365RegionConfig, +) +from tests.providers.m365.m365_fixtures import ( + CLIENT_ID, + CLIENT_SECRET, + DOMAIN, + IDENTITY_ID, + IDENTITY_TYPE, + LOCATION, + TENANT_ID, +) + + +class TestM365Provider: + def test_m365_provider(self): + tenant_id = None + client_id = None + client_secret = None + + fixer_config = load_and_validate_config_file( + "m365", default_fixer_config_file_path + ) + azure_region = "M365Global" + + with ( + patch( + "prowler.providers.m365.m365_provider.M365Provider.setup_session", + return_value=ClientSecretCredential( + client_id=CLIENT_ID, + tenant_id=TENANT_ID, + client_secret=CLIENT_SECRET, + ), + ), + patch( + "prowler.providers.m365.m365_provider.M365Provider.setup_identity", + return_value=M365IdentityInfo( + identity_id=IDENTITY_ID, + identity_type=IDENTITY_TYPE, + tenant_id=TENANT_ID, + tenant_domain=DOMAIN, + location=LOCATION, + ), + ), + ): + m365_provider = M365Provider( + sp_env_auth=True, + az_cli_auth=False, + browser_auth=False, + env_auth=False, + tenant_id=tenant_id, + client_id=client_id, + client_secret=client_secret, + region=azure_region, + config_path=default_config_file_path, + fixer_config=fixer_config, + ) + + assert m365_provider.region_config == M365RegionConfig( + name="M365Global", + authority=None, + base_url="https://graph.microsoft.com", + credential_scopes=["https://graph.microsoft.com/.default"], + ) + assert m365_provider.identity == M365IdentityInfo( + identity_id=IDENTITY_ID, + identity_type=IDENTITY_TYPE, + tenant_id=TENANT_ID, + tenant_domain=DOMAIN, + location=LOCATION, + ) + + def test_m365_provider_env_auth(self): + tenant_id = None + client_id = None + client_secret = None + + fixer_config = load_and_validate_config_file( + "m365", default_fixer_config_file_path + ) + azure_region = "M365Global" + + with ( + patch( + "prowler.providers.m365.m365_provider.M365Provider.setup_session", + return_value=ClientSecretCredential( + client_id=CLIENT_ID, + tenant_id=TENANT_ID, + client_secret=CLIENT_SECRET, + ), + ), + patch( + "prowler.providers.m365.m365_provider.M365Provider.setup_identity", + return_value=M365IdentityInfo( + identity_id=IDENTITY_ID, + identity_type=IDENTITY_TYPE, + tenant_id=TENANT_ID, + tenant_domain=DOMAIN, + location=LOCATION, + ), + ), + patch( + "prowler.providers.m365.m365_provider.M365Provider.setup_powershell", + return_value=M365Credentials( + user="test@test.com", + passwd="password", + ), + ), + ): + m365_provider = M365Provider( + sp_env_auth=False, + az_cli_auth=False, + browser_auth=False, + env_auth=True, + tenant_id=tenant_id, + client_id=client_id, + client_secret=client_secret, + region=azure_region, + config_path=default_config_file_path, + fixer_config=fixer_config, + ) + + assert m365_provider.region_config == M365RegionConfig( + name="M365Global", + authority=None, + base_url="https://graph.microsoft.com", + credential_scopes=["https://graph.microsoft.com/.default"], + ) + assert m365_provider.identity == M365IdentityInfo( + identity_id=IDENTITY_ID, + identity_type=IDENTITY_TYPE, + tenant_id=TENANT_ID, + tenant_domain=DOMAIN, + location=LOCATION, + ) + + def test_m365_provider_cli_auth(self): + """Test M365 Provider initialization with CLI authentication""" + azure_region = "M365Global" + fixer_config = load_and_validate_config_file( + "m365", default_fixer_config_file_path + ) + + with ( + patch( + "prowler.providers.m365.m365_provider.M365Provider.setup_session", + return_value=DefaultAzureCredential( + exclude_environment_credential=True, + exclude_cli_credential=False, + exclude_managed_identity_credential=True, + exclude_visual_studio_code_credential=True, + exclude_shared_token_cache_credential=True, + exclude_powershell_credential=True, + exclude_browser_credential=True, + ), + ), + patch( + "prowler.providers.m365.m365_provider.M365Provider.setup_identity", + return_value=M365IdentityInfo( + identity_id=IDENTITY_ID, + identity_type="User", + tenant_id=TENANT_ID, + tenant_domain=DOMAIN, + location=LOCATION, + ), + ), + ): + m365_provider = M365Provider( + sp_env_auth=False, + az_cli_auth=True, + browser_auth=False, + env_auth=False, + region=azure_region, + config_path=default_config_file_path, + fixer_config=fixer_config, + ) + + assert m365_provider.region_config == M365RegionConfig( + name="M365Global", + authority=None, + base_url="https://graph.microsoft.com", + credential_scopes=["https://graph.microsoft.com/.default"], + ) + assert m365_provider.identity == M365IdentityInfo( + identity_id=IDENTITY_ID, + identity_type="User", + tenant_id=TENANT_ID, + tenant_domain=DOMAIN, + location=LOCATION, + ) + assert isinstance(m365_provider.session, DefaultAzureCredential) + + def test_m365_provider_browser_auth(self): + """Test M365 Provider initialization with Browser authentication""" + azure_region = "M365Global" + fixer_config = load_and_validate_config_file( + "m365", default_fixer_config_file_path + ) + + with ( + patch( + "prowler.providers.m365.m365_provider.M365Provider.setup_session", + return_value=InteractiveBrowserCredential( + tenant_id=TENANT_ID, + ), + ), + patch( + "prowler.providers.m365.m365_provider.M365Provider.setup_identity", + return_value=M365IdentityInfo( + identity_id=IDENTITY_ID, + identity_type="User", + tenant_id=TENANT_ID, + tenant_domain=DOMAIN, + location=LOCATION, + ), + ), + ): + m365_provider = M365Provider( + sp_env_auth=False, + az_cli_auth=False, + browser_auth=True, + env_auth=False, + tenant_id=TENANT_ID, + region=azure_region, + config_path=default_config_file_path, + fixer_config=fixer_config, + ) + + assert m365_provider.region_config == M365RegionConfig( + name="M365Global", + authority=None, + base_url="https://graph.microsoft.com", + credential_scopes=["https://graph.microsoft.com/.default"], + ) + assert m365_provider.identity == M365IdentityInfo( + identity_id=IDENTITY_ID, + identity_type="User", + tenant_id=TENANT_ID, + tenant_domain=DOMAIN, + location=LOCATION, + ) + assert isinstance(m365_provider.session, InteractiveBrowserCredential) + + def test_test_connection_browser_auth(self): + with ( + patch( + "prowler.providers.m365.m365_provider.DefaultAzureCredential" + ) as mock_default_credential, + patch( + "prowler.providers.m365.m365_provider.M365Provider.setup_session" + ) as mock_setup_session, + patch( + "prowler.providers.m365.m365_provider.GraphServiceClient" + ) as mock_graph_client, + patch( + "prowler.providers.m365.m365_provider.M365Provider.setup_identity", + return_value=M365IdentityInfo( + identity_id=IDENTITY_ID, + identity_type="User", + tenant_id=TENANT_ID, + tenant_domain=DOMAIN, + tenant_domains=["test.onmicrosoft.com"], + location=LOCATION, + ), + ), + ): + # Mock the return value of DefaultAzureCredential + mock_credentials = MagicMock() + mock_credentials.get_token.return_value = AccessToken( + token="fake_token", expires_on=9999999999 + ) + mock_default_credential.return_value = mock_credentials + + # Mock setup_session to return a mocked session object + mock_session = MagicMock() + mock_setup_session.return_value = mock_session + + # Mock GraphServiceClient + mock_client = MagicMock() + mock_graph_client.return_value = mock_client + + test_connection = M365Provider.test_connection( + browser_auth=True, + tenant_id=str(uuid4()), + region="M365Global", + raise_on_exception=False, + provider_id="test.onmicrosoft.com", + ) + + assert isinstance(test_connection, Connection) + assert test_connection.is_connected + assert test_connection.error is None + + def test_test_connection_tenant_id_client_id_client_secret(self): + with ( + patch( + "prowler.providers.m365.m365_provider.M365Provider.setup_session" + ) as mock_setup_session, + patch( + "prowler.providers.m365.m365_provider.M365Provider.validate_static_credentials" + ) as mock_validate_static_credentials, + patch( + "prowler.providers.m365.m365_provider.M365Provider.setup_identity", + return_value=M365IdentityInfo( + identity_id=IDENTITY_ID, + identity_type="User", + tenant_id=TENANT_ID, + tenant_domain=DOMAIN, + tenant_domains=["test.onmicrosoft.com"], + location=LOCATION, + ), + ), + ): + # Mock setup_session to return a mocked session object + mock_session = MagicMock() + mock_setup_session.return_value = mock_session + + # Mock ValidateStaticCredentials to avoid real API calls + mock_validate_static_credentials.return_value = None + + test_connection = M365Provider.test_connection( + tenant_id=str(uuid4()), + region="M365Global", + raise_on_exception=False, + client_id=str(uuid4()), + client_secret=str(uuid4()), + provider_id="test.onmicrosoft.com", + ) + + assert isinstance(test_connection, Connection) + assert test_connection.is_connected + assert test_connection.error is None + + def test_test_connection_tenant_id_client_id_client_secret_no_user_encrypted_password( + self, + ): + with patch( + "prowler.providers.m365.m365_provider.M365Provider.validate_static_credentials" + ) as mock_validate_static_credentials: + mock_validate_static_credentials.side_effect = M365NotValidUserError( + file=os.path.basename(__file__), + message="The provided M365 User is not valid.", + ) + + with pytest.raises(M365NotValidUserError) as exception: + M365Provider.test_connection( + tenant_id=str(uuid4()), + region="M365Global", + raise_on_exception=True, + client_id=str(uuid4()), + client_secret=str(uuid4()), + user=None, + encrypted_password="test_password", + ) + + assert exception.type == M365NotValidUserError + assert "The provided M365 User is not valid." in str(exception.value) + + def test_test_connection_tenant_id_client_id_client_secret_user_no_encrypted_password( + self, + ): + with patch( + "prowler.providers.m365.m365_provider.M365Provider.validate_static_credentials" + ) as mock_validate_static_credentials: + mock_validate_static_credentials.side_effect = ( + M365NotValidEncryptedPasswordError( + file=os.path.basename(__file__), + message="The provided M365 Encrypted Password is not valid.", + ) + ) + + with pytest.raises(M365NotValidEncryptedPasswordError) as exception: + M365Provider.test_connection( + tenant_id=str(uuid4()), + region="M365Global", + raise_on_exception=True, + client_id=str(uuid4()), + client_secret=str(uuid4()), + user="test@example.com", + encrypted_password=None, + ) + + assert exception.type == M365NotValidEncryptedPasswordError + assert "The provided M365 Encrypted Password is not valid." in str( + exception.value + ) + + def test_test_connection_with_httpresponseerror(self): + with patch( + "prowler.providers.m365.m365_provider.M365Provider.setup_session" + ) as mock_setup_session: + mock_setup_session.side_effect = M365HTTPResponseError( + file="test_file", original_exception="Simulated HttpResponseError" + ) + + with pytest.raises(M365HTTPResponseError) as exception: + M365Provider.test_connection( + az_cli_auth=True, + raise_on_exception=True, + ) + + assert exception.type == M365HTTPResponseError + assert ( + exception.value.args[0] + == "[6003] Error in HTTP response from Microsoft 365 - Simulated HttpResponseError" + ) + + def test_test_connection_with_exception(self): + with patch( + "prowler.providers.m365.m365_provider.M365Provider.setup_session" + ) as mock_setup_session: + mock_setup_session.side_effect = Exception("Simulated Exception") + + with pytest.raises(Exception) as exception: + M365Provider.test_connection( + sp_env_auth=True, + raise_on_exception=True, + ) + + assert exception.type is Exception + assert exception.value.args[0] == "Simulated Exception" + + def test_test_connection_without_any_method(self): + with pytest.raises(M365NoAuthenticationMethodError) as exception: + M365Provider.test_connection() + + assert exception.type == M365NoAuthenticationMethodError + assert ( + "M365 provider requires at least one authentication method set: [--env-auth | --az-cli-auth | --sp-env-auth | --browser-auth]" + in exception.value.args[0] + ) + + def test_setup_powershell_valid_credentials(self): + credentials_dict = { + "user": "test@example.com", + "encrypted_password": "test_password", + "client_id": "test_client_id", + "tenant_id": "test_tenant_id", + "client_secret": "test_client_secret", + } + + with ( + patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.test_credentials", + return_value=True, + ), + ): + result = M365Provider.setup_powershell( + env_auth=False, + m365_credentials=credentials_dict, + identity=M365IdentityInfo( + identity_id=IDENTITY_ID, + identity_type="User", + tenant_id=TENANT_ID, + tenant_domain=DOMAIN, + tenant_domains=["test.onmicrosoft.com"], + location=LOCATION, + ), + ) + assert result.user == credentials_dict["user"] + assert result.passwd == credentials_dict["encrypted_password"] + + def test_setup_powershell_invalid_env_credentials(self): + credentials = None + + with patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell" + ) as mock_powershell: + mock_session = MagicMock() + mock_session.test_credentials.return_value = False + mock_powershell.return_value = mock_session + + with pytest.raises(M365MissingEnvironmentCredentialsError) as exc_info: + M365Provider.setup_powershell( + env_auth=True, m365_credentials=credentials + ) + + assert ( + "Missing M365_USER or M365_ENCRYPTED_PASSWORD environment variables required for credentials authentication" + in str(exc_info.value) + ) + mock_session.test_credentials.assert_not_called() + + def test_test_connection_user_not_belonging_to_tenant( + self, + ): + with patch( + "prowler.providers.m365.m365_provider.M365Provider.validate_static_credentials" + ) as mock_validate_static_credentials: + mock_validate_static_credentials.side_effect = M365UserNotBelongingToTenantError( + file=os.path.basename(__file__), + message="The provided M365 User does not belong to the specified tenant.", + ) + + with pytest.raises(M365UserNotBelongingToTenantError) as exception: + M365Provider.test_connection( + tenant_id="contoso.onmicrosoft.com", + region="M365Global", + raise_on_exception=True, + client_id=str(uuid4()), + client_secret=str(uuid4()), + user="user@otherdomain.com", + encrypted_password="test_password", + ) + + assert exception.type == M365UserNotBelongingToTenantError + assert ( + "The provided M365 User does not belong to the specified tenant." + in str(exception.value) + ) + + def test_validate_static_credentials_invalid_tenant_id(self): + with pytest.raises(M365NotValidTenantIdError) as exception: + M365Provider.validate_static_credentials( + tenant_id="invalid-tenant-id", + client_id="12345678-1234-5678-1234-567812345678", + client_secret="test_secret", + user="test@example.com", + encrypted_password="test_password", + ) + assert "The provided Tenant ID is not valid." in str(exception.value) + + def test_validate_static_credentials_missing_client_id(self): + with pytest.raises(M365NotValidClientIdError) as exception: + M365Provider.validate_static_credentials( + tenant_id="12345678-1234-5678-1234-567812345678", + client_id="", + client_secret="test_secret", + user="test@example.com", + encrypted_password="test_password", + ) + assert "The provided Client ID is not valid." in str(exception.value) + + def test_validate_static_credentials_missing_client_secret(self): + with pytest.raises(M365NotValidClientSecretError) as exception: + M365Provider.validate_static_credentials( + tenant_id="12345678-1234-5678-1234-567812345678", + client_id="12345678-1234-5678-1234-567812345678", + client_secret="", + user="test@example.com", + encrypted_password="test_password", + ) + assert "The provided Client Secret is not valid." in str(exception.value) + + def test_validate_static_credentials_missing_user(self): + with pytest.raises(M365NotValidUserError) as exception: + M365Provider.validate_static_credentials( + tenant_id="12345678-1234-5678-1234-567812345678", + client_id="12345678-1234-5678-1234-567812345678", + client_secret="test_secret", + user="", + encrypted_password="test_password", + ) + assert "The provided User is not valid." in str(exception.value) + + def test_validate_static_credentials_missing_encrypted_password(self): + with pytest.raises(M365NotValidEncryptedPasswordError) as exception: + M365Provider.validate_static_credentials( + tenant_id="12345678-1234-5678-1234-567812345678", + client_id="12345678-1234-5678-1234-567812345678", + client_secret="test_secret", + user="test@example.com", + encrypted_password="", + ) + assert "The provided Encrypted Password is not valid." in str(exception.value) + + def test_validate_arguments_missing_env_credentials(self): + with pytest.raises(M365MissingEnvironmentCredentialsError) as exception: + M365Provider.validate_arguments( + az_cli_auth=False, + sp_env_auth=False, + env_auth=True, + browser_auth=False, + tenant_id=None, + client_id="test_client_id", + client_secret="test_secret", + user=None, + encrypted_password=None, + ) + + assert ( + "M365 provider requires AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, AZURE_TENANT_ID, M365_USER and M365_ENCRYPTED_PASSWORD environment variables to be set when using --env-auth" + in str(exception.value) + ) + + def test_test_connection_invalid_provider_id(self): + with ( + patch( + "prowler.providers.m365.m365_provider.M365Provider.setup_session" + ) as mock_setup_session, + patch( + "prowler.providers.m365.m365_provider.M365Provider.validate_static_credentials" + ) as mock_validate_static_credentials, + patch( + "prowler.providers.m365.m365_provider.M365Provider.setup_identity", + return_value=M365IdentityInfo( + identity_id=IDENTITY_ID, + identity_type="User", + tenant_id=TENANT_ID, + tenant_domain="contoso.com", + tenant_domains=["contoso.com"], + location=LOCATION, + ), + ), + ): + # Mock setup_session to return a mocked session object + mock_session = MagicMock() + mock_setup_session.return_value = mock_session + + # Mock ValidateStaticCredentials to avoid real API calls + mock_validate_static_credentials.return_value = None + + user_domain = "contoso.com" + provider_id = "Test.com" + + with pytest.raises(M365InvalidProviderIdError) as exception: + M365Provider.test_connection( + tenant_id=str(uuid4()), + region="M365Global", + raise_on_exception=True, + client_id=str(uuid4()), + client_secret=str(uuid4()), + user=f"user@{user_domain}", + encrypted_password="test_password", + provider_id=provider_id, + ) + + assert exception.type == M365InvalidProviderIdError + assert ( + f"The provider ID {provider_id} does not match any of the service principal tenant domains: {user_domain}" + in str(exception.value) + ) + + def test_provider_init_modules_false(self): + """Test that initialize_m365_powershell_modules is not called when init_modules is False""" + credentials_dict = { + "user": "test@example.com", + "encrypted_password": "test_password", + "client_id": "test_client_id", + "tenant_id": "test_tenant_id", + "client_secret": "test_client_secret", + } + + with ( + patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.test_credentials", + return_value=True, + ), + patch( + "prowler.providers.m365.m365_provider.initialize_m365_powershell_modules" + ) as mock_init_modules, + ): + M365Provider.setup_powershell( + env_auth=False, + m365_credentials=credentials_dict, + identity=M365IdentityInfo( + identity_id=IDENTITY_ID, + identity_type="User", + tenant_id=TENANT_ID, + tenant_domain=DOMAIN, + tenant_domains=["test.onmicrosoft.com"], + location=LOCATION, + ), + init_modules=False, + ) + mock_init_modules.assert_not_called() + + def test_provider_init_modules_true(self): + """Test that initialize_m365_powershell_modules is called when init_modules is True""" + credentials_dict = { + "user": "test@example.com", + "encrypted_password": "test_password", + "client_id": "test_client_id", + "tenant_id": "test_tenant_id", + "client_secret": "test_client_secret", + } + + with ( + patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.test_credentials", + return_value=True, + ), + patch( + "prowler.providers.m365.m365_provider.initialize_m365_powershell_modules" + ) as mock_init_modules, + ): + M365Provider.setup_powershell( + env_auth=False, + m365_credentials=credentials_dict, + identity=M365IdentityInfo( + identity_id=IDENTITY_ID, + identity_type="User", + tenant_id=TENANT_ID, + tenant_domain=DOMAIN, + tenant_domains=["test.onmicrosoft.com"], + location=LOCATION, + ), + init_modules=True, + ) + mock_init_modules.assert_called_once() + + def test_setup_powershell_init_modules_failure(self): + """Test that setup_powershell handles initialization failures correctly""" + credentials_dict = { + "user": "test@example.com", + "encrypted_password": "test_password", + "client_id": "test_client_id", + "tenant_id": "test_tenant_id", + "client_secret": "test_client_secret", + } + + with ( + patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.test_credentials", + return_value=True, + ), + patch( + "prowler.providers.m365.m365_provider.initialize_m365_powershell_modules", + side_effect=Exception("Module initialization failed"), + ), + ): + with pytest.raises(Exception) as exc_info: + M365Provider.setup_powershell( + env_auth=False, + m365_credentials=credentials_dict, + identity=M365IdentityInfo( + identity_id=IDENTITY_ID, + identity_type="User", + tenant_id=TENANT_ID, + tenant_domain=DOMAIN, + tenant_domains=["test.onmicrosoft.com"], + location=LOCATION, + ), + init_modules=True, + ) + + assert str(exc_info.value) == "Module initialization failed" + + def test_test_connection_provider_id_not_in_tenant_domains(self): + """Test that an exception is raised when provider_id is not in tenant_domains""" + with ( + patch( + "prowler.providers.m365.m365_provider.M365Provider.setup_session" + ) as mock_setup_session, + patch( + "prowler.providers.m365.m365_provider.M365Provider.validate_static_credentials" + ) as mock_validate_static_credentials, + patch( + "prowler.providers.m365.m365_provider.M365Provider.setup_identity", + return_value=M365IdentityInfo( + identity_id=IDENTITY_ID, + identity_type="User", + tenant_id=TENANT_ID, + tenant_domain="contoso.onmicrosoft.com", + tenant_domains=["contoso.onmicrosoft.com", "contoso.com"], + location=LOCATION, + ), + ), + ): + # Mock setup_session to return a mocked session object + mock_session = MagicMock() + mock_setup_session.return_value = mock_session + + # Mock ValidateStaticCredentials to avoid real API calls + mock_validate_static_credentials.return_value = None + + provider_id = "test.onmicrosoft.com" + + with pytest.raises(M365InvalidProviderIdError) as exception: + M365Provider.test_connection( + tenant_id=str(uuid4()), + region="M365Global", + raise_on_exception=True, + client_id=str(uuid4()), + client_secret=str(uuid4()), + user="user@contoso.onmicrosoft.com", + encrypted_password="test_password", + provider_id=provider_id, + ) + + assert exception.type == M365InvalidProviderIdError + assert ( + f"The provider ID {provider_id} does not match any of the service principal tenant domains: contoso.onmicrosoft.com, contoso.com" + in str(exception.value) + ) diff --git a/tests/providers/m365/services/admincenter/admincenter_external_calendar_sharing_disabled/admincenter_external_calendar_sharing_disabled_test.py b/tests/providers/m365/services/admincenter/admincenter_external_calendar_sharing_disabled/admincenter_external_calendar_sharing_disabled_test.py new file mode 100644 index 0000000000..0c76f2f696 --- /dev/null +++ b/tests/providers/m365/services/admincenter/admincenter_external_calendar_sharing_disabled/admincenter_external_calendar_sharing_disabled_test.py @@ -0,0 +1,120 @@ +from unittest import mock + +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_admincenter_external_calendar_sharing_disabled: + def test_admincenter_no_sharing_policy(self): + admincenter_client = mock.MagicMock() + admincenter_client.audited_tenant = "audited_tenant" + admincenter_client.audited_domain = DOMAIN + admincenter_client.sharing_policy = None + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.admincenter.admincenter_external_calendar_sharing_disabled.admincenter_external_calendar_sharing_disabled.admincenter_client", + new=admincenter_client, + ), + ): + from prowler.providers.m365.services.admincenter.admincenter_external_calendar_sharing_disabled.admincenter_external_calendar_sharing_disabled import ( + admincenter_external_calendar_sharing_disabled, + ) + + check = admincenter_external_calendar_sharing_disabled() + result = check.execute() + assert len(result) == 0 + + def test_admincenter_calendar_sharing_disabled(self): + admincenter_client = mock.MagicMock() + admincenter_client.audited_tenant = "audited_tenant" + admincenter_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.admincenter.admincenter_external_calendar_sharing_disabled.admincenter_external_calendar_sharing_disabled.admincenter_client", + new=admincenter_client, + ), + ): + from prowler.providers.m365.services.admincenter.admincenter_external_calendar_sharing_disabled.admincenter_external_calendar_sharing_disabled import ( + admincenter_external_calendar_sharing_disabled, + ) + from prowler.providers.m365.services.admincenter.admincenter_service import ( + SharingPolicy, + ) + + admincenter_client.sharing_policy = SharingPolicy( + name="test-org", + guid="org-guid", + enabled=False, + ) + + check = admincenter_external_calendar_sharing_disabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "External calendar sharing is disabled at the organization level." + ) + assert result[0].resource == admincenter_client.sharing_policy.dict() + assert result[0].resource_name == "test-org" + assert result[0].resource_id == "org-guid" + assert result[0].location == "global" + + def test_admincenter_calendar_sharing_enabled(self): + admincenter_client = mock.MagicMock() + admincenter_client.audited_tenant = "audited_tenant" + admincenter_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.admincenter.admincenter_external_calendar_sharing_disabled.admincenter_external_calendar_sharing_disabled.admincenter_client", + new=admincenter_client, + ), + ): + from prowler.providers.m365.services.admincenter.admincenter_external_calendar_sharing_disabled.admincenter_external_calendar_sharing_disabled import ( + admincenter_external_calendar_sharing_disabled, + ) + from prowler.providers.m365.services.admincenter.admincenter_service import ( + SharingPolicy, + ) + + admincenter_client.sharing_policy = SharingPolicy( + name="test-org", + guid="org-guid", + enabled=True, + ) + + check = admincenter_external_calendar_sharing_disabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "External calendar sharing is enabled at the organization level." + ) + assert result[0].resource == admincenter_client.sharing_policy.dict() + assert result[0].resource_name == "test-org" + assert result[0].resource_id == "org-guid" + assert result[0].location == "global" diff --git a/tests/providers/microsoft365/services/admincenter/admincenter_groups_not_public_visibility/admincenter_groups_not_public_visibility_test.py b/tests/providers/m365/services/admincenter/admincenter_groups_not_public_visibility/admincenter_groups_not_public_visibility_test.py similarity index 64% rename from tests/providers/microsoft365/services/admincenter/admincenter_groups_not_public_visibility/admincenter_groups_not_public_visibility_test.py rename to tests/providers/m365/services/admincenter/admincenter_groups_not_public_visibility/admincenter_groups_not_public_visibility_test.py index 4f7c5c2bc0..81209d67a4 100644 --- a/tests/providers/microsoft365/services/admincenter/admincenter_groups_not_public_visibility/admincenter_groups_not_public_visibility_test.py +++ b/tests/providers/m365/services/admincenter/admincenter_groups_not_public_visibility/admincenter_groups_not_public_visibility_test.py @@ -1,10 +1,7 @@ from unittest import mock from uuid import uuid4 -from tests.providers.microsoft365.microsoft365_fixtures import ( - DOMAIN, - set_mocked_microsoft365_provider, -) +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider class Test_admincenter_groups_not_public_visibility: @@ -16,14 +13,17 @@ class Test_admincenter_groups_not_public_visibility: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.admincenter.admincenter_groups_not_public_visibility.admincenter_groups_not_public_visibility.admincenter_client", + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.admincenter.admincenter_groups_not_public_visibility.admincenter_groups_not_public_visibility.admincenter_client", new=admincenter_client, ), ): - from prowler.providers.microsoft365.services.admincenter.admincenter_groups_not_public_visibility.admincenter_groups_not_public_visibility import ( + from prowler.providers.m365.services.admincenter.admincenter_groups_not_public_visibility.admincenter_groups_not_public_visibility import ( admincenter_groups_not_public_visibility, ) @@ -41,17 +41,20 @@ class Test_admincenter_groups_not_public_visibility: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.admincenter.admincenter_groups_not_public_visibility.admincenter_groups_not_public_visibility.admincenter_client", + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.admincenter.admincenter_groups_not_public_visibility.admincenter_groups_not_public_visibility.admincenter_client", new=admincenter_client, ), ): - from prowler.providers.microsoft365.services.admincenter.admincenter_groups_not_public_visibility.admincenter_groups_not_public_visibility import ( + from prowler.providers.m365.services.admincenter.admincenter_groups_not_public_visibility.admincenter_groups_not_public_visibility import ( admincenter_groups_not_public_visibility, ) - from prowler.providers.microsoft365.services.admincenter.admincenter_service import ( + from prowler.providers.m365.services.admincenter.admincenter_service import ( Group, ) @@ -79,17 +82,20 @@ class Test_admincenter_groups_not_public_visibility: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.admincenter.admincenter_groups_not_public_visibility.admincenter_groups_not_public_visibility.admincenter_client", + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.admincenter.admincenter_groups_not_public_visibility.admincenter_groups_not_public_visibility.admincenter_client", new=admincenter_client, ), ): - from prowler.providers.microsoft365.services.admincenter.admincenter_groups_not_public_visibility.admincenter_groups_not_public_visibility import ( + from prowler.providers.m365.services.admincenter.admincenter_groups_not_public_visibility.admincenter_groups_not_public_visibility import ( admincenter_groups_not_public_visibility, ) - from prowler.providers.microsoft365.services.admincenter.admincenter_service import ( + from prowler.providers.m365.services.admincenter.admincenter_service import ( Group, ) diff --git a/tests/providers/m365/services/admincenter/admincenter_organization_customer_lockbox_enabled/admincenter_organization_customer_lockbox_enabled_test.py b/tests/providers/m365/services/admincenter/admincenter_organization_customer_lockbox_enabled/admincenter_organization_customer_lockbox_enabled_test.py new file mode 100644 index 0000000000..48d3f1e745 --- /dev/null +++ b/tests/providers/m365/services/admincenter/admincenter_organization_customer_lockbox_enabled/admincenter_organization_customer_lockbox_enabled_test.py @@ -0,0 +1,120 @@ +from unittest import mock + +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_admincenter_organization_customer_lockbox_enabled: + def test_admincenter_no_org_config(self): + admincenter_client = mock.MagicMock() + admincenter_client.audited_tenant = "audited_tenant" + admincenter_client.audited_domain = DOMAIN + admincenter_client.organization_config = None + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.admincenter.admincenter_organization_customer_lockbox_enabled.admincenter_organization_customer_lockbox_enabled.admincenter_client", + new=admincenter_client, + ), + ): + from prowler.providers.m365.services.admincenter.admincenter_organization_customer_lockbox_enabled.admincenter_organization_customer_lockbox_enabled import ( + admincenter_organization_customer_lockbox_enabled, + ) + + check = admincenter_organization_customer_lockbox_enabled() + result = check.execute() + assert len(result) == 0 + + def test_admincenter_customer_lockbox_enabled(self): + admincenter_client = mock.MagicMock() + admincenter_client.audited_tenant = "audited_tenant" + admincenter_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.admincenter.admincenter_organization_customer_lockbox_enabled.admincenter_organization_customer_lockbox_enabled.admincenter_client", + new=admincenter_client, + ), + ): + from prowler.providers.m365.services.admincenter.admincenter_organization_customer_lockbox_enabled.admincenter_organization_customer_lockbox_enabled import ( + admincenter_organization_customer_lockbox_enabled, + ) + from prowler.providers.m365.services.admincenter.admincenter_service import ( + Organization, + ) + + admincenter_client.organization_config = Organization( + name="test-org", + guid="org-guid", + customer_lockbox_enabled=True, + ) + + check = admincenter_organization_customer_lockbox_enabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Customer Lockbox is enabled at organization level." + ) + assert result[0].resource == admincenter_client.organization_config.dict() + assert result[0].resource_name == "test-org" + assert result[0].resource_id == "org-guid" + assert result[0].location == "global" + + def test_admincenter_customer_lockbox_disabled(self): + admincenter_client = mock.MagicMock() + admincenter_client.audited_tenant = "audited_tenant" + admincenter_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.admincenter.admincenter_organization_customer_lockbox_enabled.admincenter_organization_customer_lockbox_enabled.admincenter_client", + new=admincenter_client, + ), + ): + from prowler.providers.m365.services.admincenter.admincenter_organization_customer_lockbox_enabled.admincenter_organization_customer_lockbox_enabled import ( + admincenter_organization_customer_lockbox_enabled, + ) + from prowler.providers.m365.services.admincenter.admincenter_service import ( + Organization, + ) + + admincenter_client.organization_config = Organization( + name="test-org", + guid="org-guid", + customer_lockbox_enabled=False, + ) + + check = admincenter_organization_customer_lockbox_enabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Customer Lockbox is not enabled at organization level." + ) + assert result[0].resource == admincenter_client.organization_config.dict() + assert result[0].resource_name == "test-org" + assert result[0].resource_id == "org-guid" + assert result[0].location == "global" diff --git a/tests/providers/m365/services/admincenter/admincenter_service_test.py b/tests/providers/m365/services/admincenter/admincenter_service_test.py new file mode 100644 index 0000000000..287c91d661 --- /dev/null +++ b/tests/providers/m365/services/admincenter/admincenter_service_test.py @@ -0,0 +1,163 @@ +from unittest import mock +from unittest.mock import patch + +from prowler.providers.m365.models import M365IdentityInfo +from prowler.providers.m365.services.admincenter.admincenter_service import ( + AdminCenter, + DirectoryRole, + Group, + Organization, + SharingPolicy, + User, +) +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +async def mock_admincenter_get_users(_): + return { + "user-1@tenant1.es": User( + id="id-1", + name="User 1", + directory_roles=[], + ), + } + + +async def mock_admincenter_get_directory_roles(_): + return { + "GlobalAdministrator": DirectoryRole( + id="id-directory-role", + name="GlobalAdministrator", + members=[], + ) + } + + +async def mock_admincenter_get_groups(_): + return { + "id-1": Group(id="id-1", name="Test", visibility="Public"), + } + + +def mock_admincenter_get_organization(_): + return Organization( + guid="id-1", + name="Test", + customer_lockbox_enabled=False, + ) + + +def mock_admincenter_get_sharing_policy(_): + return SharingPolicy( + guid="id-1", + name="Test", + enabled=False, + ) + + +@patch( + "prowler.providers.m365.services.admincenter.admincenter_service.AdminCenter._get_users", + new=mock_admincenter_get_users, +) +@patch( + "prowler.providers.m365.services.admincenter.admincenter_service.AdminCenter._get_directory_roles", + new=mock_admincenter_get_directory_roles, +) +@patch( + "prowler.providers.m365.services.admincenter.admincenter_service.AdminCenter._get_groups", + new=mock_admincenter_get_groups, +) +@patch( + "prowler.providers.m365.services.admincenter.admincenter_service.AdminCenter._get_organization_config", + new=mock_admincenter_get_organization, +) +@patch( + "prowler.providers.m365.services.admincenter.admincenter_service.AdminCenter._get_sharing_policy", + new=mock_admincenter_get_sharing_policy, +) +class Test_AdminCenter_Service: + def test_get_client(self): + with ( + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + ): + admincenter_client = AdminCenter( + set_mocked_m365_provider( + identity=M365IdentityInfo(tenant_domain=DOMAIN) + ) + ) + assert admincenter_client.client.__class__.__name__ == "GraphServiceClient" + + def test_get_users(self): + with ( + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + ): + admincenter_client = AdminCenter(set_mocked_m365_provider()) + assert len(admincenter_client.users) == 1 + assert admincenter_client.users["user-1@tenant1.es"].id == "id-1" + assert admincenter_client.users["user-1@tenant1.es"].name == "User 1" + + def test_get_group_settings(self): + with ( + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + ): + admincenter_client = AdminCenter(set_mocked_m365_provider()) + assert len(admincenter_client.groups) == 1 + assert admincenter_client.groups["id-1"].id == "id-1" + assert admincenter_client.groups["id-1"].name == "Test" + assert admincenter_client.groups["id-1"].visibility == "Public" + + def test_get_directory_roles(self): + with ( + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + ): + admincenter_client = AdminCenter(set_mocked_m365_provider()) + assert ( + admincenter_client.directory_roles["GlobalAdministrator"].id + == "id-directory-role" + ) + assert ( + len(admincenter_client.directory_roles["GlobalAdministrator"].members) + == 0 + ) + + def test_get_organization(self): + with ( + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + ): + admincenter_client = AdminCenter( + set_mocked_m365_provider( + identity=M365IdentityInfo(tenant_domain=DOMAIN) + ) + ) + assert admincenter_client.organization_config.guid == "id-1" + assert admincenter_client.organization_config.name == "Test" + assert ( + admincenter_client.organization_config.customer_lockbox_enabled is False + ) + admincenter_client.powershell.close() + + def test_get_sharing_policy(self): + with ( + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + ): + admincenter_client = AdminCenter( + set_mocked_m365_provider( + identity=M365IdentityInfo(tenant_domain=DOMAIN) + ) + ) + assert admincenter_client.sharing_policy.guid == "id-1" + assert admincenter_client.sharing_policy.name == "Test" + assert admincenter_client.sharing_policy.enabled is False + admincenter_client.powershell.close() diff --git a/tests/providers/microsoft365/services/admincenter/admincenter_settings_password_never_expire/admincenter_settings_password_never_expire_test.py b/tests/providers/m365/services/admincenter/admincenter_settings_password_never_expire/admincenter_settings_password_never_expire_test.py similarity index 64% rename from tests/providers/microsoft365/services/admincenter/admincenter_settings_password_never_expire/admincenter_settings_password_never_expire_test.py rename to tests/providers/m365/services/admincenter/admincenter_settings_password_never_expire/admincenter_settings_password_never_expire_test.py index 15630b90c6..e0537249a1 100644 --- a/tests/providers/microsoft365/services/admincenter/admincenter_settings_password_never_expire/admincenter_settings_password_never_expire_test.py +++ b/tests/providers/m365/services/admincenter/admincenter_settings_password_never_expire/admincenter_settings_password_never_expire_test.py @@ -1,10 +1,7 @@ from unittest import mock from uuid import uuid4 -from tests.providers.microsoft365.microsoft365_fixtures import ( - DOMAIN, - set_mocked_microsoft365_provider, -) +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider class Test_admincenter_settings_password_never_expire: @@ -16,14 +13,17 @@ class Test_admincenter_settings_password_never_expire: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.admincenter.admincenter_settings_password_never_expire.admincenter_settings_password_never_expire.admincenter_client", + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.admincenter.admincenter_settings_password_never_expire.admincenter_settings_password_never_expire.admincenter_client", new=admincenter_client, ), ): - from prowler.providers.microsoft365.services.admincenter.admincenter_settings_password_never_expire.admincenter_settings_password_never_expire import ( + from prowler.providers.m365.services.admincenter.admincenter_settings_password_never_expire.admincenter_settings_password_never_expire import ( admincenter_settings_password_never_expire, ) @@ -41,17 +41,20 @@ class Test_admincenter_settings_password_never_expire: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.admincenter.admincenter_settings_password_never_expire.admincenter_settings_password_never_expire.admincenter_client", + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.admincenter.admincenter_settings_password_never_expire.admincenter_settings_password_never_expire.admincenter_client", new=admincenter_client, ), ): - from prowler.providers.microsoft365.services.admincenter.admincenter_service import ( + from prowler.providers.m365.services.admincenter.admincenter_service import ( Domain, ) - from prowler.providers.microsoft365.services.admincenter.admincenter_settings_password_never_expire.admincenter_settings_password_never_expire import ( + from prowler.providers.m365.services.admincenter.admincenter_settings_password_never_expire.admincenter_settings_password_never_expire import ( admincenter_settings_password_never_expire, ) @@ -82,17 +85,20 @@ class Test_admincenter_settings_password_never_expire: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.admincenter.admincenter_settings_password_never_expire.admincenter_settings_password_never_expire.admincenter_client", + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.admincenter.admincenter_settings_password_never_expire.admincenter_settings_password_never_expire.admincenter_client", new=admincenter_client, ), ): - from prowler.providers.microsoft365.services.admincenter.admincenter_service import ( + from prowler.providers.m365.services.admincenter.admincenter_service import ( Domain, ) - from prowler.providers.microsoft365.services.admincenter.admincenter_settings_password_never_expire.admincenter_settings_password_never_expire import ( + from prowler.providers.m365.services.admincenter.admincenter_settings_password_never_expire.admincenter_settings_password_never_expire import ( admincenter_settings_password_never_expire, ) diff --git a/tests/providers/microsoft365/services/admincenter/admincenter_users_admins_reduced_license_footprint/admincenter_users_admins_reduced_license_footprint_test.py b/tests/providers/m365/services/admincenter/admincenter_users_admins_reduced_license_footprint/admincenter_users_admins_reduced_license_footprint_test.py similarity index 65% rename from tests/providers/microsoft365/services/admincenter/admincenter_users_admins_reduced_license_footprint/admincenter_users_admins_reduced_license_footprint_test.py rename to tests/providers/m365/services/admincenter/admincenter_users_admins_reduced_license_footprint/admincenter_users_admins_reduced_license_footprint_test.py index f684c11988..6b93429b3d 100644 --- a/tests/providers/microsoft365/services/admincenter/admincenter_users_admins_reduced_license_footprint/admincenter_users_admins_reduced_license_footprint_test.py +++ b/tests/providers/m365/services/admincenter/admincenter_users_admins_reduced_license_footprint/admincenter_users_admins_reduced_license_footprint_test.py @@ -1,10 +1,7 @@ from unittest import mock from uuid import uuid4 -from tests.providers.microsoft365.microsoft365_fixtures import ( - DOMAIN, - set_mocked_microsoft365_provider, -) +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider class Test_admincenter_users_admins_reduced_license_footprint: @@ -16,14 +13,17 @@ class Test_admincenter_users_admins_reduced_license_footprint: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.admincenter.admincenter_users_admins_reduced_license_footprint.admincenter_users_admins_reduced_license_footprint.admincenter_client", + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.admincenter.admincenter_users_admins_reduced_license_footprint.admincenter_users_admins_reduced_license_footprint.admincenter_client", new=admincenter_client, ), ): - from prowler.providers.microsoft365.services.admincenter.admincenter_users_admins_reduced_license_footprint.admincenter_users_admins_reduced_license_footprint import ( + from prowler.providers.m365.services.admincenter.admincenter_users_admins_reduced_license_footprint.admincenter_users_admins_reduced_license_footprint import ( admincenter_users_admins_reduced_license_footprint, ) @@ -41,17 +41,20 @@ class Test_admincenter_users_admins_reduced_license_footprint: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.admincenter.admincenter_users_admins_reduced_license_footprint.admincenter_users_admins_reduced_license_footprint.admincenter_client", + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.admincenter.admincenter_users_admins_reduced_license_footprint.admincenter_users_admins_reduced_license_footprint.admincenter_client", new=admincenter_client, ), ): - from prowler.providers.microsoft365.services.admincenter.admincenter_service import ( + from prowler.providers.m365.services.admincenter.admincenter_service import ( User, ) - from prowler.providers.microsoft365.services.admincenter.admincenter_users_admins_reduced_license_footprint.admincenter_users_admins_reduced_license_footprint import ( + from prowler.providers.m365.services.admincenter.admincenter_users_admins_reduced_license_footprint.admincenter_users_admins_reduced_license_footprint import ( admincenter_users_admins_reduced_license_footprint, ) @@ -78,17 +81,20 @@ class Test_admincenter_users_admins_reduced_license_footprint: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.admincenter.admincenter_users_admins_reduced_license_footprint.admincenter_users_admins_reduced_license_footprint.admincenter_client", + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.admincenter.admincenter_users_admins_reduced_license_footprint.admincenter_users_admins_reduced_license_footprint.admincenter_client", new=admincenter_client, ), ): - from prowler.providers.microsoft365.services.admincenter.admincenter_service import ( + from prowler.providers.m365.services.admincenter.admincenter_service import ( User, ) - from prowler.providers.microsoft365.services.admincenter.admincenter_users_admins_reduced_license_footprint.admincenter_users_admins_reduced_license_footprint import ( + from prowler.providers.m365.services.admincenter.admincenter_users_admins_reduced_license_footprint.admincenter_users_admins_reduced_license_footprint import ( admincenter_users_admins_reduced_license_footprint, ) @@ -124,17 +130,20 @@ class Test_admincenter_users_admins_reduced_license_footprint: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.admincenter.admincenter_users_admins_reduced_license_footprint.admincenter_users_admins_reduced_license_footprint.admincenter_client", + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.admincenter.admincenter_users_admins_reduced_license_footprint.admincenter_users_admins_reduced_license_footprint.admincenter_client", new=admincenter_client, ), ): - from prowler.providers.microsoft365.services.admincenter.admincenter_service import ( + from prowler.providers.m365.services.admincenter.admincenter_service import ( User, ) - from prowler.providers.microsoft365.services.admincenter.admincenter_users_admins_reduced_license_footprint.admincenter_users_admins_reduced_license_footprint import ( + from prowler.providers.m365.services.admincenter.admincenter_users_admins_reduced_license_footprint.admincenter_users_admins_reduced_license_footprint import ( admincenter_users_admins_reduced_license_footprint, ) @@ -170,17 +179,20 @@ class Test_admincenter_users_admins_reduced_license_footprint: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.admincenter.admincenter_users_admins_reduced_license_footprint.admincenter_users_admins_reduced_license_footprint.admincenter_client", + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.admincenter.admincenter_users_admins_reduced_license_footprint.admincenter_users_admins_reduced_license_footprint.admincenter_client", new=admincenter_client, ), ): - from prowler.providers.microsoft365.services.admincenter.admincenter_service import ( + from prowler.providers.m365.services.admincenter.admincenter_service import ( User, ) - from prowler.providers.microsoft365.services.admincenter.admincenter_users_admins_reduced_license_footprint.admincenter_users_admins_reduced_license_footprint import ( + from prowler.providers.m365.services.admincenter.admincenter_users_admins_reduced_license_footprint.admincenter_users_admins_reduced_license_footprint import ( admincenter_users_admins_reduced_license_footprint, ) diff --git a/tests/providers/microsoft365/services/admincenter/admincenter_users_between_two_and_four_global_admins/admincenter_users_between_two_and_four_global_admins_test.py b/tests/providers/m365/services/admincenter/admincenter_users_between_two_and_four_global_admins/admincenter_users_between_two_and_four_global_admins_test.py similarity index 70% rename from tests/providers/microsoft365/services/admincenter/admincenter_users_between_two_and_four_global_admins/admincenter_users_between_two_and_four_global_admins_test.py rename to tests/providers/m365/services/admincenter/admincenter_users_between_two_and_four_global_admins/admincenter_users_between_two_and_four_global_admins_test.py index b7fafb56a9..98cb224900 100644 --- a/tests/providers/microsoft365/services/admincenter/admincenter_users_between_two_and_four_global_admins/admincenter_users_between_two_and_four_global_admins_test.py +++ b/tests/providers/m365/services/admincenter/admincenter_users_between_two_and_four_global_admins/admincenter_users_between_two_and_four_global_admins_test.py @@ -1,10 +1,7 @@ from unittest import mock from uuid import uuid4 -from tests.providers.microsoft365.microsoft365_fixtures import ( - DOMAIN, - set_mocked_microsoft365_provider, -) +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider class Test_admincenter_users_between_two_and_four_global_admins: @@ -16,14 +13,17 @@ class Test_admincenter_users_between_two_and_four_global_admins: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.admincenter.admincenter_users_between_two_and_four_global_admins.admincenter_users_between_two_and_four_global_admins.admincenter_client", + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.admincenter.admincenter_users_between_two_and_four_global_admins.admincenter_users_between_two_and_four_global_admins.admincenter_client", new=admincenter_client, ), ): - from prowler.providers.microsoft365.services.admincenter.admincenter_users_between_two_and_four_global_admins.admincenter_users_between_two_and_four_global_admins import ( + from prowler.providers.m365.services.admincenter.admincenter_users_between_two_and_four_global_admins.admincenter_users_between_two_and_four_global_admins import ( admincenter_users_between_two_and_four_global_admins, ) @@ -41,18 +41,21 @@ class Test_admincenter_users_between_two_and_four_global_admins: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.admincenter.admincenter_users_between_two_and_four_global_admins.admincenter_users_between_two_and_four_global_admins.admincenter_client", + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.admincenter.admincenter_users_between_two_and_four_global_admins.admincenter_users_between_two_and_four_global_admins.admincenter_client", new=admincenter_client, ), ): - from prowler.providers.microsoft365.services.admincenter.admincenter_service import ( + from prowler.providers.m365.services.admincenter.admincenter_service import ( DirectoryRole, User, ) - from prowler.providers.microsoft365.services.admincenter.admincenter_users_between_two_and_four_global_admins.admincenter_users_between_two_and_four_global_admins import ( + from prowler.providers.m365.services.admincenter.admincenter_users_between_two_and_four_global_admins.admincenter_users_between_two_and_four_global_admins import ( admincenter_users_between_two_and_four_global_admins, ) @@ -92,18 +95,21 @@ class Test_admincenter_users_between_two_and_four_global_admins: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.admincenter.admincenter_users_between_two_and_four_global_admins.admincenter_users_between_two_and_four_global_admins.admincenter_client", + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.admincenter.admincenter_users_between_two_and_four_global_admins.admincenter_users_between_two_and_four_global_admins.admincenter_client", new=admincenter_client, ), ): - from prowler.providers.microsoft365.services.admincenter.admincenter_service import ( + from prowler.providers.m365.services.admincenter.admincenter_service import ( DirectoryRole, User, ) - from prowler.providers.microsoft365.services.admincenter.admincenter_users_between_two_and_four_global_admins.admincenter_users_between_two_and_four_global_admins import ( + from prowler.providers.m365.services.admincenter.admincenter_users_between_two_and_four_global_admins.admincenter_users_between_two_and_four_global_admins import ( admincenter_users_between_two_and_four_global_admins, ) @@ -154,18 +160,21 @@ class Test_admincenter_users_between_two_and_four_global_admins: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.admincenter.admincenter_users_between_two_and_four_global_admins.admincenter_users_between_two_and_four_global_admins.admincenter_client", + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.admincenter.admincenter_users_between_two_and_four_global_admins.admincenter_users_between_two_and_four_global_admins.admincenter_client", new=admincenter_client, ), ): - from prowler.providers.microsoft365.services.admincenter.admincenter_service import ( + from prowler.providers.m365.services.admincenter.admincenter_service import ( DirectoryRole, User, ) - from prowler.providers.microsoft365.services.admincenter.admincenter_users_between_two_and_four_global_admins.admincenter_users_between_two_and_four_global_admins import ( + from prowler.providers.m365.services.admincenter.admincenter_users_between_two_and_four_global_admins.admincenter_users_between_two_and_four_global_admins import ( admincenter_users_between_two_and_four_global_admins, ) diff --git a/tests/providers/m365/services/defender/defender_antiphishing_policy_configured/defender_antiphishing_policy_configured_test.py b/tests/providers/m365/services/defender/defender_antiphishing_policy_configured/defender_antiphishing_policy_configured_test.py new file mode 100644 index 0000000000..8610e96769 --- /dev/null +++ b/tests/providers/m365/services/defender/defender_antiphishing_policy_configured/defender_antiphishing_policy_configured_test.py @@ -0,0 +1,523 @@ +from unittest import mock + +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_defender_antiphishing_policy_configured: + def test_case_1_default_policy_properly_configured(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_antiphishing_policy_configured.defender_antiphishing_policy_configured.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_antiphishing_policy_configured.defender_antiphishing_policy_configured import ( + defender_antiphishing_policy_configured, + ) + from prowler.providers.m365.services.defender.defender_service import ( + AntiphishingPolicy, + ) + + defender_client.antiphishing_policies = { + "Default": AntiphishingPolicy( + name="Default", + spoof_intelligence=True, + spoof_intelligence_action="Quarantine", + dmarc_reject_action="Quarantine", + dmarc_quarantine_action="Quarantine", + safety_tips=True, + unauthenticated_sender_action=True, + show_tag=True, + honor_dmarc_policy=True, + default=True, + ) + } + defender_client.antiphishing_rules = {} + + check = defender_antiphishing_policy_configured() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Default is the only policy and it's properly configured in the default Defender Anti-Phishing Policy." + ) + assert ( + result[0].resource_name + == defender_client.antiphishing_policies["Default"].name + ) + assert ( + result[0].resource_id + == defender_client.antiphishing_policies["Default"].name + ) + assert ( + result[0].resource + == defender_client.antiphishing_policies["Default"].dict() + ) + + def test_case_2_all_policies_properly_configured(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_antiphishing_policy_configured.defender_antiphishing_policy_configured.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_antiphishing_policy_configured.defender_antiphishing_policy_configured import ( + defender_antiphishing_policy_configured, + ) + from prowler.providers.m365.services.defender.defender_service import ( + AntiphishingPolicy, + AntiphishingRule, + ) + + defender_client.antiphishing_policies = { + "Default": AntiphishingPolicy( + name="Default", + spoof_intelligence=True, + spoof_intelligence_action="Quarantine", + dmarc_reject_action="Quarantine", + dmarc_quarantine_action="Quarantine", + safety_tips=True, + unauthenticated_sender_action=True, + show_tag=True, + honor_dmarc_policy=True, + default=True, + ), + "Policy1": AntiphishingPolicy( + name="Policy1", + spoof_intelligence=True, + spoof_intelligence_action="Quarantine", + dmarc_reject_action="Quarantine", + dmarc_quarantine_action="Quarantine", + safety_tips=True, + unauthenticated_sender_action=True, + show_tag=True, + honor_dmarc_policy=True, + default=False, + ), + } + defender_client.antiphishing_rules = { + "Policy1": AntiphishingRule( + state="Enabled", + priority=1, + users=["test@example.com"], + groups=["example_group"], + domains=["example.com"], + ) + } + + check = defender_antiphishing_policy_configured() + result = check.execute() + assert len(result) == 2 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Default is properly configured in the default Defender Anti-Phishing Policy, but could be overridden by another bad-configured Custom Policy." + ) + assert ( + result[0].resource_name + == defender_client.antiphishing_policies["Default"].name + ) + assert ( + result[0].resource_id + == defender_client.antiphishing_policies["Default"].name + ) + assert ( + result[0].resource + == defender_client.antiphishing_policies["Default"].dict() + ) + assert result[1].status == "PASS" + assert ( + result[1].status_extended + == f"Custom Anti-phishing policy {defender_client.antiphishing_policies['Policy1'].name} is properly configured and includes users: {', '.join(defender_client.antiphishing_rules['Policy1'].users)}; groups: {', '.join(defender_client.antiphishing_rules['Policy1'].groups)}; domains: {', '.join(defender_client.antiphishing_rules['Policy1'].domains)}, " + f"with priority {defender_client.antiphishing_rules['Policy1'].priority} (0 is the highest). " + "Also, the default policy is properly configured, so entities not included by this custom policy could still be correctly protected." + ) + assert ( + result[1].resource_name + == defender_client.antiphishing_policies["Policy1"].name + ) + assert ( + result[1].resource_id + == defender_client.antiphishing_policies["Policy1"].name + ) + assert ( + result[1].resource + == defender_client.antiphishing_policies["Policy1"].dict() + ) + + def test_case_3_default_ok_others_not(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_antiphishing_policy_configured.defender_antiphishing_policy_configured.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_antiphishing_policy_configured.defender_antiphishing_policy_configured import ( + defender_antiphishing_policy_configured, + ) + from prowler.providers.m365.services.defender.defender_service import ( + AntiphishingPolicy, + AntiphishingRule, + ) + + defender_client.antiphishing_policies = { + "Default": AntiphishingPolicy( + name="Default", + spoof_intelligence=True, + spoof_intelligence_action="Quarantine", + dmarc_reject_action="Quarantine", + dmarc_quarantine_action="Quarantine", + safety_tips=True, + unauthenticated_sender_action=True, + show_tag=True, + honor_dmarc_policy=True, + default=True, + ), + "Policy1": AntiphishingPolicy( + name="Policy1", + spoof_intelligence=False, + spoof_intelligence_action="None", + dmarc_reject_action="None", + dmarc_quarantine_action="None", + safety_tips=False, + unauthenticated_sender_action=False, + show_tag=False, + honor_dmarc_policy=False, + default=False, + ), + } + defender_client.antiphishing_rules = { + "Policy1": AntiphishingRule( + state="Enabled", + priority=1, + users=["test@example.com"], + groups=["example_group"], + domains=["example.com"], + ) + } + + check = defender_antiphishing_policy_configured() + result = check.execute() + assert len(result) == 2 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Default is properly configured in the default Defender Anti-Phishing Policy, but could be overridden by another bad-configured Custom Policy." + ) + assert result[0].resource_name == "Default" + assert result[0].resource_id == "Default" + assert ( + result[0].resource + == defender_client.antiphishing_policies["Default"].dict() + ) + + assert result[1].status == "FAIL" + assert ( + result[1].status_extended + == "Custom Anti-phishing policy Policy1 is not properly configured and includes users: test@example.com; groups: example_group; domains: example.com, " + "with priority 1 (0 is the highest). However, the default policy is properly configured, so entities not included by this custom policy could be correctly protected." + ) + assert result[1].resource_name == "Policy1" + assert result[1].resource_id == "Policy1" + assert ( + result[1].resource + == defender_client.antiphishing_policies["Policy1"].dict() + ) + + def test_case_4_default_not_ok_potential_false_positive(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_antiphishing_policy_configured.defender_antiphishing_policy_configured.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_antiphishing_policy_configured.defender_antiphishing_policy_configured import ( + defender_antiphishing_policy_configured, + ) + from prowler.providers.m365.services.defender.defender_service import ( + AntiphishingPolicy, + AntiphishingRule, + ) + + defender_client.antiphishing_policies = { + "Default": AntiphishingPolicy( + name="Default", + spoof_intelligence=False, + spoof_intelligence_action="None", + dmarc_reject_action="None", + dmarc_quarantine_action="None", + safety_tips=False, + unauthenticated_sender_action=False, + show_tag=False, + honor_dmarc_policy=False, + default=True, + ), + "Policy1": AntiphishingPolicy( + name="Policy1", + spoof_intelligence=True, + spoof_intelligence_action="Quarantine", + dmarc_reject_action="Quarantine", + dmarc_quarantine_action="Quarantine", + safety_tips=True, + unauthenticated_sender_action=True, + show_tag=True, + honor_dmarc_policy=True, + default=False, + ), + } + defender_client.antiphishing_rules = { + "Policy1": AntiphishingRule( + state="Enabled", + priority=1, + users=["test@example.com"], + groups=["example_group"], + domains=["example.com"], + ) + } + + check = defender_antiphishing_policy_configured() + result = check.execute() + assert len(result) == 2 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Default is not properly configured in the default Defender Anti-Phishing Policy, but could be overridden by another well-configured Custom Policy." + ) + assert result[0].resource_name == "Default" + assert result[0].resource_id == "Default" + assert ( + result[0].resource + == defender_client.antiphishing_policies["Default"].dict() + ) + assert result[1].status == "PASS" + assert ( + result[1].status_extended + == "Custom Anti-phishing policy Policy1 is properly configured and includes users: test@example.com; groups: example_group; domains: example.com, " + f"with priority {defender_client.antiphishing_rules['Policy1'].priority} (0 is the highest). " + "However, the default policy is not properly configured, so entities not included by this custom policy could not be correctly protected." + ) + assert result[1].resource_name == "Policy1" + assert result[1].resource_id == "Policy1" + assert ( + result[1].resource + == defender_client.antiphishing_policies["Policy1"].dict() + ) + + def test_case_5_default_policy_not_properly_configured(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_antiphishing_policy_configured.defender_antiphishing_policy_configured.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_antiphishing_policy_configured.defender_antiphishing_policy_configured import ( + defender_antiphishing_policy_configured, + ) + from prowler.providers.m365.services.defender.defender_service import ( + AntiphishingPolicy, + ) + + defender_client.antiphishing_policies = { + "Default": AntiphishingPolicy( + name="Default", + spoof_intelligence=False, + spoof_intelligence_action="None", + dmarc_reject_action="None", + dmarc_quarantine_action="None", + safety_tips=False, + unauthenticated_sender_action=False, + show_tag=False, + honor_dmarc_policy=False, + default=True, + ) + } + defender_client.antiphishing_rules = {} + + check = defender_antiphishing_policy_configured() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Default is the only policy and it's not properly configured in the default Defender Anti-Phishing Policy." + ) + assert result[0].resource_name == "Default" + assert result[0].resource_id == "Default" + assert ( + result[0].resource + == defender_client.antiphishing_policies["Default"].dict() + ) + + def test_case_6_both_policies_not_properly_configured(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_antiphishing_policy_configured.defender_antiphishing_policy_configured.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_antiphishing_policy_configured.defender_antiphishing_policy_configured import ( + defender_antiphishing_policy_configured, + ) + from prowler.providers.m365.services.defender.defender_service import ( + AntiphishingPolicy, + AntiphishingRule, + ) + + defender_client.antiphishing_policies = { + "Default": AntiphishingPolicy( + name="Default", + spoof_intelligence=False, + spoof_intelligence_action="None", + dmarc_reject_action="None", + dmarc_quarantine_action="None", + safety_tips=False, + unauthenticated_sender_action=False, + show_tag=False, + honor_dmarc_policy=False, + default=True, + ), + "Policy1": AntiphishingPolicy( + name="Policy1", + spoof_intelligence=False, + spoof_intelligence_action="None", + dmarc_reject_action="None", + dmarc_quarantine_action="None", + safety_tips=False, + unauthenticated_sender_action=False, + show_tag=False, + honor_dmarc_policy=False, + default=False, + ), + } + defender_client.antiphishing_rules = { + "Policy1": AntiphishingRule( + state="Enabled", + priority=1, + users=[], + groups=[], + domains=["example.com"], + ) + } + + check = defender_antiphishing_policy_configured() + result = check.execute() + assert len(result) == 2 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Default is not properly configured in the default Defender Anti-Phishing Policy, but could be overridden by another well-configured Custom Policy." + ) + assert result[0].resource_name == "Default" + assert result[0].resource_id == "Default" + assert ( + result[0].resource + == defender_client.antiphishing_policies["Default"].dict() + ) + assert result[1].status == "FAIL" + assert ( + result[1].status_extended + == "Custom Anti-phishing policy Policy1 is not properly configured and includes domains: example.com, " + "with priority 1 (0 is the highest). Also, the default policy is not properly configured, so entities not included by this custom policy could not be correctly protected." + ) + assert result[1].resource_name == "Policy1" + assert result[1].resource_id == "Policy1" + assert ( + result[1].resource + == defender_client.antiphishing_policies["Policy1"].dict() + ) + + def test_no_antiphishing_policies(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_antiphishing_policy_configured.defender_antiphishing_policy_configured.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_antiphishing_policy_configured.defender_antiphishing_policy_configured import ( + defender_antiphishing_policy_configured, + ) + + defender_client.antiphishing_policies = {} + defender_client.antiphishing_rules = {} + + check = defender_antiphishing_policy_configured() + result = check.execute() + assert len(result) == 0 diff --git a/tests/providers/m365/services/defender/defender_antispam_connection_filter_policy_empty_ip_allowlist/defender_antispam_connection_filter_policy_empty_ip_allowlist_test.py b/tests/providers/m365/services/defender/defender_antispam_connection_filter_policy_empty_ip_allowlist/defender_antispam_connection_filter_policy_empty_ip_allowlist_test.py new file mode 100644 index 0000000000..83f10ccea9 --- /dev/null +++ b/tests/providers/m365/services/defender/defender_antispam_connection_filter_policy_empty_ip_allowlist/defender_antispam_connection_filter_policy_empty_ip_allowlist_test.py @@ -0,0 +1,126 @@ +from unittest import mock + +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_defender_antispam_connection_filter_policy_empty_ip_allowlist: + def test_ip_allow_list_not_used(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_antispam_connection_filter_policy_empty_ip_allowlist.defender_antispam_connection_filter_policy_empty_ip_allowlist.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_antispam_connection_filter_policy_empty_ip_allowlist.defender_antispam_connection_filter_policy_empty_ip_allowlist import ( + defender_antispam_connection_filter_policy_empty_ip_allowlist, + ) + from prowler.providers.m365.services.defender.defender_service import ( + ConnectionFilterPolicy, + ) + + defender_client.connection_filter_policy = ConnectionFilterPolicy( + ip_allow_list=[], + identity="Default", + enable_safe_list=False, + ) + + check = defender_antispam_connection_filter_policy_empty_ip_allowlist() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "IP Allowlist is not used in the Antispam Connection Filter Policy Default." + ) + assert result[0].resource == defender_client.connection_filter_policy.dict() + assert ( + result[0].resource_name == "Defender Antispam Connection Filter Policy" + ) + assert result[0].resource_id == "Default" + assert result[0].location == "global" + + def test_ip_allow_list_used(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_antispam_connection_filter_policy_empty_ip_allowlist.defender_antispam_connection_filter_policy_empty_ip_allowlist.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_antispam_connection_filter_policy_empty_ip_allowlist.defender_antispam_connection_filter_policy_empty_ip_allowlist import ( + defender_antispam_connection_filter_policy_empty_ip_allowlist, + ) + from prowler.providers.m365.services.defender.defender_service import ( + ConnectionFilterPolicy, + ) + + defender_client.connection_filter_policy = ConnectionFilterPolicy( + ip_allow_list=["192.168.0.1", "10.0.0.5"], + identity="Default", + enable_safe_list=False, + ) + + check = defender_antispam_connection_filter_policy_empty_ip_allowlist() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "FAIL" + assert result[0].status_extended == ( + "IP Allowlist is used in the Antispam Connection Filter Policy Default with IPs: ['192.168.0.1', '10.0.0.5']." + ) + assert result[0].resource == defender_client.connection_filter_policy.dict() + assert ( + result[0].resource_name == "Defender Antispam Connection Filter Policy" + ) + assert result[0].resource_id == "Default" + assert result[0].location == "global" + + def test_no_connection_filter_policy(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_antispam_connection_filter_policy_empty_ip_allowlist.defender_antispam_connection_filter_policy_empty_ip_allowlist.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_antispam_connection_filter_policy_empty_ip_allowlist.defender_antispam_connection_filter_policy_empty_ip_allowlist import ( + defender_antispam_connection_filter_policy_empty_ip_allowlist, + ) + + defender_client.connection_filter_policy = None + + check = defender_antispam_connection_filter_policy_empty_ip_allowlist() + result = check.execute() + assert len(result) == 0 diff --git a/tests/providers/m365/services/defender/defender_antispam_connection_filter_policy_safe_list_off/defender_antispam_connection_filter_policy_safe_list_off_test.py b/tests/providers/m365/services/defender/defender_antispam_connection_filter_policy_safe_list_off/defender_antispam_connection_filter_policy_safe_list_off_test.py new file mode 100644 index 0000000000..239f5aaf2f --- /dev/null +++ b/tests/providers/m365/services/defender/defender_antispam_connection_filter_policy_safe_list_off/defender_antispam_connection_filter_policy_safe_list_off_test.py @@ -0,0 +1,128 @@ +from unittest import mock + +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_defender_antispam_connection_filter_policy_safe_list_off: + def test_safe_list_off(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_antispam_connection_filter_policy_safe_list_off.defender_antispam_connection_filter_policy_safe_list_off.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_antispam_connection_filter_policy_safe_list_off.defender_antispam_connection_filter_policy_safe_list_off import ( + defender_antispam_connection_filter_policy_safe_list_off, + ) + from prowler.providers.m365.services.defender.defender_service import ( + ConnectionFilterPolicy, + ) + + defender_client.connection_filter_policy = ConnectionFilterPolicy( + ip_allow_list=[], + identity="Default", + enable_safe_list=False, + ) + + check = defender_antispam_connection_filter_policy_safe_list_off() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Safe List is disabled in the Antispam Connection Filter Policy Default." + ) + assert result[0].resource == defender_client.connection_filter_policy.dict() + assert ( + result[0].resource_name == "Defender Antispam Connection Filter Policy" + ) + assert result[0].resource_id == "Default" + assert result[0].location == "global" + + def test_safe_list_on(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_antispam_connection_filter_policy_safe_list_off.defender_antispam_connection_filter_policy_safe_list_off.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_antispam_connection_filter_policy_safe_list_off.defender_antispam_connection_filter_policy_safe_list_off import ( + defender_antispam_connection_filter_policy_safe_list_off, + ) + from prowler.providers.m365.services.defender.defender_service import ( + ConnectionFilterPolicy, + ) + + defender_client.connection_filter_policy = ConnectionFilterPolicy( + ip_allow_list=[], + identity="Default", + enable_safe_list=True, + ) + + check = defender_antispam_connection_filter_policy_safe_list_off() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Safe List is not disabled in the Antispam Connection Filter Policy Default." + ) + assert result[0].resource == defender_client.connection_filter_policy.dict() + assert ( + result[0].resource_name == "Defender Antispam Connection Filter Policy" + ) + assert result[0].resource_id == "Default" + assert result[0].location == "global" + + def test_no_connection_filter_policy(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_antispam_connection_filter_policy_safe_list_off.defender_antispam_connection_filter_policy_safe_list_off.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_antispam_connection_filter_policy_safe_list_off.defender_antispam_connection_filter_policy_safe_list_off import ( + defender_antispam_connection_filter_policy_safe_list_off, + ) + + defender_client.connection_filter_policy = None + + check = defender_antispam_connection_filter_policy_safe_list_off() + result = check.execute() + + assert len(result) == 0 diff --git a/tests/providers/m365/services/defender/defender_antispam_outbound_policy_configured/defender_antispam_outbound_policy_configured_test.py b/tests/providers/m365/services/defender/defender_antispam_outbound_policy_configured/defender_antispam_outbound_policy_configured_test.py new file mode 100644 index 0000000000..7baedbeb61 --- /dev/null +++ b/tests/providers/m365/services/defender/defender_antispam_outbound_policy_configured/defender_antispam_outbound_policy_configured_test.py @@ -0,0 +1,479 @@ +from unittest import mock + +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_defender_antispam_outbound_policy_configured: + def test_case_1_default_policy_properly_configured(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_antispam_outbound_policy_configured.defender_antispam_outbound_policy_configured.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_antispam_outbound_policy_configured.defender_antispam_outbound_policy_configured import ( + defender_antispam_outbound_policy_configured, + ) + from prowler.providers.m365.services.defender.defender_service import ( + OutboundSpamPolicy, + ) + + defender_client.outbound_spam_policies = { + "Default": OutboundSpamPolicy( + name="Default", + notify_limit_exceeded=True, + notify_sender_blocked=True, + notify_limit_exceeded_addresses=["admin@example.com"], + notify_sender_blocked_addresses=["admin@example.com"], + auto_forwarding_mode=False, + default=True, + ) + } + defender_client.outbound_spam_rules = {} + + check = defender_antispam_outbound_policy_configured() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Default is the only policy and it's properly configured in the default Defender Outbound Spam Policy." + ) + assert ( + result[0].resource_name + == defender_client.outbound_spam_policies["Default"].name + ) + assert result[0].resource_id == "Default" + assert ( + result[0].resource + == defender_client.outbound_spam_policies["Default"].dict() + ) + + def test_case_2_all_policies_properly_configured(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_antispam_outbound_policy_configured.defender_antispam_outbound_policy_configured.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_antispam_outbound_policy_configured.defender_antispam_outbound_policy_configured import ( + defender_antispam_outbound_policy_configured, + ) + from prowler.providers.m365.services.defender.defender_service import ( + OutboundSpamPolicy, + OutboundSpamRule, + ) + + defender_client.outbound_spam_policies = { + "Default": OutboundSpamPolicy( + name="Default", + notify_limit_exceeded=True, + notify_sender_blocked=True, + notify_limit_exceeded_addresses=["admin@example.com"], + notify_sender_blocked_addresses=["admin@example.com"], + auto_forwarding_mode=False, + default=True, + ), + "Policy1": OutboundSpamPolicy( + name="Policy1", + notify_limit_exceeded=True, + notify_sender_blocked=True, + notify_limit_exceeded_addresses=["admin@example.com"], + notify_sender_blocked_addresses=["admin@example.com"], + auto_forwarding_mode=False, + default=False, + ), + } + defender_client.outbound_spam_rules = { + "Policy1": OutboundSpamRule( + state="Enabled", + priority=1, + users=["test@example.com"], + groups=["group1"], + domains=["example.com"], + ) + } + + check = defender_antispam_outbound_policy_configured() + result = check.execute() + assert len(result) == 2 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Default is properly configured in the default Defender Outbound Spam Policy, but could be overridden by another bad-configured Custom Policy." + ) + assert result[0].resource_name == "Default" + assert result[0].resource_id == "Default" + assert ( + result[0].resource + == defender_client.outbound_spam_policies["Default"].dict() + ) + + assert result[1].status == "PASS" + assert ( + result[1].status_extended + == "Custom Outbound Spam policy Policy1 is properly configured and includes users: test@example.com; groups: group1; domains: example.com, " + "with priority 1 (0 is the highest). Also, the default policy is properly configured, so entities not included by this custom policy could still be correctly protected." + ) + assert result[1].resource_name == "Policy1" + assert result[1].resource_id == "Policy1" + assert ( + result[1].resource + == defender_client.outbound_spam_policies["Policy1"].dict() + ) + + def test_case_3_default_ok_others_not(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_antispam_outbound_policy_configured.defender_antispam_outbound_policy_configured.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_antispam_outbound_policy_configured.defender_antispam_outbound_policy_configured import ( + defender_antispam_outbound_policy_configured, + ) + from prowler.providers.m365.services.defender.defender_service import ( + OutboundSpamPolicy, + OutboundSpamRule, + ) + + defender_client.outbound_spam_policies = { + "Default": OutboundSpamPolicy( + name="Default", + notify_limit_exceeded=True, + notify_sender_blocked=True, + notify_limit_exceeded_addresses=["admin@example.com"], + notify_sender_blocked_addresses=["admin@example.com"], + auto_forwarding_mode=False, + default=True, + ), + "Policy1": OutboundSpamPolicy( + name="Policy1", + notify_limit_exceeded=False, + notify_sender_blocked=False, + notify_limit_exceeded_addresses=[], + notify_sender_blocked_addresses=[], + auto_forwarding_mode=False, + default=False, + ), + } + defender_client.outbound_spam_rules = { + "Policy1": OutboundSpamRule( + state="Enabled", + priority=1, + users=["test@example.com"], + groups=["group1"], + domains=["example.com"], + ) + } + + check = defender_antispam_outbound_policy_configured() + result = check.execute() + assert len(result) == 2 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Default is properly configured in the default Defender Outbound Spam Policy, but could be overridden by another bad-configured Custom Policy." + ) + assert result[0].resource_name == "Default" + assert result[0].resource_id == "Default" + assert ( + result[0].resource + == defender_client.outbound_spam_policies["Default"].dict() + ) + + assert result[1].status == "FAIL" + assert ( + result[1].status_extended + == "Custom Outbound Spam policy Policy1 is not properly configured and includes users: test@example.com; groups: group1; domains: example.com, " + "with priority 1 (0 is the highest). However, the default policy is properly configured, so entities not included by this custom policy could be correctly protected." + ) + assert result[1].resource_name == "Policy1" + assert result[1].resource_id == "Policy1" + assert ( + result[1].resource + == defender_client.outbound_spam_policies["Policy1"].dict() + ) + + def test_case_4_default_not_ok_custom_good(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_antispam_outbound_policy_configured.defender_antispam_outbound_policy_configured.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_antispam_outbound_policy_configured.defender_antispam_outbound_policy_configured import ( + defender_antispam_outbound_policy_configured, + ) + from prowler.providers.m365.services.defender.defender_service import ( + OutboundSpamPolicy, + OutboundSpamRule, + ) + + defender_client.outbound_spam_policies = { + "Default": OutboundSpamPolicy( + name="Default", + notify_limit_exceeded=False, + notify_sender_blocked=False, + notify_limit_exceeded_addresses=[], + notify_sender_blocked_addresses=[], + auto_forwarding_mode=False, + default=True, + ), + "Policy1": OutboundSpamPolicy( + name="Policy1", + notify_limit_exceeded=True, + notify_sender_blocked=True, + notify_limit_exceeded_addresses=["admin@example.com"], + notify_sender_blocked_addresses=["admin@example.com"], + auto_forwarding_mode=False, + default=False, + ), + } + defender_client.outbound_spam_rules = { + "Policy1": OutboundSpamRule( + state="Enabled", + priority=0, + users=["user1@example.com"], + groups=["group1"], + domains=["domain.com"], + ) + } + + check = defender_antispam_outbound_policy_configured() + result = check.execute() + assert len(result) == 2 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Default is not properly configured in the default Defender Outbound Spam Policy, but could be overridden by another well-configured Custom Policy." + ) + assert result[0].resource_name == "Default" + assert result[0].resource_id == "Default" + assert ( + result[0].resource + == defender_client.outbound_spam_policies["Default"].dict() + ) + + assert result[1].status == "PASS" + assert ( + result[1].status_extended + == "Custom Outbound Spam policy Policy1 is properly configured and includes users: user1@example.com; groups: group1; domains: domain.com, " + "with priority 0 (0 is the highest). However, the default policy is not properly configured, so entities not included by this custom policy could not be correctly protected." + ) + assert result[1].resource_name == "Policy1" + assert result[1].resource_id == "Policy1" + assert ( + result[1].resource + == defender_client.outbound_spam_policies["Policy1"].dict() + ) + + def test_case_5_only_default_not_ok(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_antispam_outbound_policy_configured.defender_antispam_outbound_policy_configured.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_antispam_outbound_policy_configured.defender_antispam_outbound_policy_configured import ( + defender_antispam_outbound_policy_configured, + ) + from prowler.providers.m365.services.defender.defender_service import ( + OutboundSpamPolicy, + ) + + defender_client.outbound_spam_policies = { + "Default": OutboundSpamPolicy( + name="Default", + notify_limit_exceeded=False, + notify_sender_blocked=False, + notify_limit_exceeded_addresses=[], + notify_sender_blocked_addresses=[], + auto_forwarding_mode=False, + default=True, + ) + } + defender_client.outbound_spam_rules = {} + + check = defender_antispam_outbound_policy_configured() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Default is the only policy and it's not properly configured in the default Defender Outbound Spam Policy." + ) + assert result[0].resource_name == "Default" + assert result[0].resource_id == "Default" + assert ( + result[0].resource + == defender_client.outbound_spam_policies["Default"].dict() + ) + + def test_case_6_default_and_custom_not_ok(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_antispam_outbound_policy_configured.defender_antispam_outbound_policy_configured.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_antispam_outbound_policy_configured.defender_antispam_outbound_policy_configured import ( + defender_antispam_outbound_policy_configured, + ) + from prowler.providers.m365.services.defender.defender_service import ( + OutboundSpamPolicy, + OutboundSpamRule, + ) + + defender_client.outbound_spam_policies = { + "Default": OutboundSpamPolicy( + name="Default", + notify_limit_exceeded=False, + notify_sender_blocked=False, + notify_limit_exceeded_addresses=[], + notify_sender_blocked_addresses=[], + auto_forwarding_mode=False, + default=True, + ), + "Policy1": OutboundSpamPolicy( + name="Policy1", + notify_limit_exceeded=False, + notify_sender_blocked=False, + notify_limit_exceeded_addresses=[], + notify_sender_blocked_addresses=[], + auto_forwarding_mode=False, + default=False, + ), + } + defender_client.outbound_spam_rules = { + "Policy1": OutboundSpamRule( + state="Enabled", + priority=5, + users=["user@example.com"], + groups=["group1"], + domains=["domain.com"], + ) + } + + check = defender_antispam_outbound_policy_configured() + result = check.execute() + assert len(result) == 2 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Default is not properly configured in the default Defender Outbound Spam Policy, but could be overridden by another well-configured Custom Policy." + ) + assert result[0].resource_name == "Default" + assert result[0].resource_id == "Default" + assert ( + result[0].resource + == defender_client.outbound_spam_policies["Default"].dict() + ) + + assert result[1].status == "FAIL" + assert ( + result[1].status_extended + == "Custom Outbound Spam policy Policy1 is not properly configured and includes users: user@example.com; groups: group1; domains: domain.com, " + "with priority 5 (0 is the highest). Also, the default policy is not properly configured, so entities not included by this custom policy could not be correctly protected." + ) + assert result[1].resource_name == "Policy1" + assert result[1].resource_id == "Policy1" + assert ( + result[1].resource + == defender_client.outbound_spam_policies["Policy1"].dict() + ) + + def test_no_outbound_spam_policies(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_antispam_outbound_policy_configured.defender_antispam_outbound_policy_configured.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_antispam_outbound_policy_configured.defender_antispam_outbound_policy_configured import ( + defender_antispam_outbound_policy_configured, + ) + + defender_client.outbound_spam_policies = {} + defender_client.outbound_spam_rules = {} + + check = defender_antispam_outbound_policy_configured() + result = check.execute() + assert len(result) == 0 diff --git a/tests/providers/m365/services/defender/defender_antispam_outbound_policy_forwarding_disabled/defender_antispam_outbound_policy_forwarding_disabled_test.py b/tests/providers/m365/services/defender/defender_antispam_outbound_policy_forwarding_disabled/defender_antispam_outbound_policy_forwarding_disabled_test.py new file mode 100644 index 0000000000..64fce5f88b --- /dev/null +++ b/tests/providers/m365/services/defender/defender_antispam_outbound_policy_forwarding_disabled/defender_antispam_outbound_policy_forwarding_disabled_test.py @@ -0,0 +1,484 @@ +from unittest import mock + +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_defender_antispam_outbound_policy_forwarding_disabled: + def test_case_1_default_policy_forwarding_disabled(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_antispam_outbound_policy_forwarding_disabled.defender_antispam_outbound_policy_forwarding_disabled.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_antispam_outbound_policy_forwarding_disabled.defender_antispam_outbound_policy_forwarding_disabled import ( + defender_antispam_outbound_policy_forwarding_disabled, + ) + from prowler.providers.m365.services.defender.defender_service import ( + OutboundSpamPolicy, + ) + + defender_client.outbound_spam_policies = { + "Default": OutboundSpamPolicy( + name="Default", + auto_forwarding_mode=False, + notify_limit_exceeded=True, + notify_sender_blocked=True, + notify_limit_exceeded_addresses=["admin@example.com"], + notify_sender_blocked_addresses=["admin@example.com"], + default=True, + ) + } + defender_client.outbound_spam_rules = {} + + check = defender_antispam_outbound_policy_forwarding_disabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Default is the only policy and mail forwarding is disabled." + ) + assert result[0].resource_name == "Default" + assert result[0].resource_id == "Default" + assert ( + result[0].resource + == defender_client.outbound_spam_policies["Default"].dict() + ) + + def test_case_2_all_policies_forwarding_disabled(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_antispam_outbound_policy_forwarding_disabled.defender_antispam_outbound_policy_forwarding_disabled.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_antispam_outbound_policy_forwarding_disabled.defender_antispam_outbound_policy_forwarding_disabled import ( + defender_antispam_outbound_policy_forwarding_disabled, + ) + from prowler.providers.m365.services.defender.defender_service import ( + OutboundSpamPolicy, + OutboundSpamRule, + ) + + defender_client.outbound_spam_policies = { + "Default": OutboundSpamPolicy( + name="Default", + auto_forwarding_mode=False, + notify_limit_exceeded=True, + notify_sender_blocked=True, + notify_limit_exceeded_addresses=["admin@example.com"], + notify_sender_blocked_addresses=["admin@example.com"], + default=True, + ), + "Policy1": OutboundSpamPolicy( + name="Policy1", + auto_forwarding_mode=False, + notify_limit_exceeded=True, + notify_sender_blocked=True, + notify_limit_exceeded_addresses=["admin@example.com"], + notify_sender_blocked_addresses=["admin@example.com"], + default=False, + ), + } + + defender_client.outbound_spam_rules = { + "Policy1": OutboundSpamRule( + state="Enabled", + priority=1, + users=["test@example.com"], + groups=["group1"], + domains=["example.com"], + ) + } + + check = defender_antispam_outbound_policy_forwarding_disabled() + result = check.execute() + assert len(result) == 2 + + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Default is the default policy and mail forwarding is disabled, but it could be overridden by another misconfigured Custom Policy." + ) + assert result[0].resource_name == "Default" + assert result[0].resource_id == "Default" + assert ( + result[0].resource + == defender_client.outbound_spam_policies["Default"].dict() + ) + + assert result[1].status == "PASS" + assert ( + result[1].status_extended + == "Custom Outbound Spam policy Policy1 disables mail forwarding and includes users: test@example.com; groups: group1; domains: example.com, " + "with priority 1 (0 is the highest). Also, the default policy disables mail forwarding, so entities not included by this custom policy could still be correctly protected." + ) + assert result[1].resource_name == "Policy1" + assert result[1].resource_id == "Policy1" + assert ( + result[1].resource + == defender_client.outbound_spam_policies["Policy1"].dict() + ) + + def test_case_3_default_ok_custom_not(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_antispam_outbound_policy_forwarding_disabled.defender_antispam_outbound_policy_forwarding_disabled.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_antispam_outbound_policy_forwarding_disabled.defender_antispam_outbound_policy_forwarding_disabled import ( + defender_antispam_outbound_policy_forwarding_disabled, + ) + from prowler.providers.m365.services.defender.defender_service import ( + OutboundSpamPolicy, + OutboundSpamRule, + ) + + defender_client.outbound_spam_policies = { + "Default": OutboundSpamPolicy( + name="Default", + auto_forwarding_mode=False, + notify_limit_exceeded=True, + notify_sender_blocked=True, + notify_limit_exceeded_addresses=["admin@example.com"], + notify_sender_blocked_addresses=["admin@example.com"], + default=True, + ), + "Policy1": OutboundSpamPolicy( + name="Policy1", + auto_forwarding_mode=True, + notify_limit_exceeded=False, + notify_sender_blocked=False, + notify_limit_exceeded_addresses=[], + notify_sender_blocked_addresses=[], + default=False, + ), + } + + defender_client.outbound_spam_rules = { + "Policy1": OutboundSpamRule( + state="Enabled", + priority=1, + users=["test@example.com"], + groups=["group1"], + domains=["example.com"], + ) + } + + check = defender_antispam_outbound_policy_forwarding_disabled() + result = check.execute() + assert len(result) == 2 + + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Default is the default policy and mail forwarding is disabled, but it could be overridden by another misconfigured Custom Policy." + ) + assert result[0].resource_name == "Default" + assert result[0].resource_id == "Default" + assert ( + result[0].resource + == defender_client.outbound_spam_policies["Default"].dict() + ) + + assert result[1].status == "FAIL" + assert ( + result[1].status_extended + == "Custom Outbound Spam policy Policy1 allows mail forwarding and includes users: test@example.com; groups: group1; domains: example.com, " + "with priority 1 (0 is the highest). However, the default policy disables mail forwarding, so entities not included by this custom policy could be correctly protected." + ) + assert result[1].resource_name == "Policy1" + assert result[1].resource_id == "Policy1" + assert ( + result[1].resource + == defender_client.outbound_spam_policies["Policy1"].dict() + ) + + def test_case_4_default_not_ok_custom_good(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_antispam_outbound_policy_forwarding_disabled.defender_antispam_outbound_policy_forwarding_disabled.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_antispam_outbound_policy_forwarding_disabled.defender_antispam_outbound_policy_forwarding_disabled import ( + defender_antispam_outbound_policy_forwarding_disabled, + ) + from prowler.providers.m365.services.defender.defender_service import ( + OutboundSpamPolicy, + OutboundSpamRule, + ) + + defender_client.outbound_spam_policies = { + "Default": OutboundSpamPolicy( + name="Default", + auto_forwarding_mode=True, + notify_limit_exceeded=False, + notify_sender_blocked=False, + notify_limit_exceeded_addresses=[], + notify_sender_blocked_addresses=[], + default=True, + ), + "Policy1": OutboundSpamPolicy( + name="Policy1", + auto_forwarding_mode=False, + notify_limit_exceeded=True, + notify_sender_blocked=True, + notify_limit_exceeded_addresses=["admin@example.com"], + notify_sender_blocked_addresses=["admin@example.com"], + default=False, + ), + } + + defender_client.outbound_spam_rules = { + "Policy1": OutboundSpamRule( + state="Enabled", + priority=0, + users=["user1@example.com"], + groups=["group1"], + domains=["domain.com"], + ) + } + + check = defender_antispam_outbound_policy_forwarding_disabled() + result = check.execute() + assert len(result) == 2 + + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Default is the default policy and mail forwarding is allowed, but it could be overridden by another well-configured Custom Policy." + ) + assert result[0].resource_name == "Default" + assert result[0].resource_id == "Default" + assert ( + result[0].resource + == defender_client.outbound_spam_policies["Default"].dict() + ) + + assert result[1].status == "PASS" + assert ( + result[1].status_extended + == "Custom Outbound Spam policy Policy1 disables mail forwarding and includes users: user1@example.com; groups: group1; domains: domain.com, " + "with priority 0 (0 is the highest). However, the default policy allows mail forwarding, so entities not included by this custom policy could not be correctly protected." + ) + assert result[1].resource_name == "Policy1" + assert result[1].resource_id == "Policy1" + assert ( + result[1].resource + == defender_client.outbound_spam_policies["Policy1"].dict() + ) + + def test_case_5_only_default_not_ok(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_antispam_outbound_policy_forwarding_disabled.defender_antispam_outbound_policy_forwarding_disabled.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_antispam_outbound_policy_forwarding_disabled.defender_antispam_outbound_policy_forwarding_disabled import ( + defender_antispam_outbound_policy_forwarding_disabled, + ) + from prowler.providers.m365.services.defender.defender_service import ( + OutboundSpamPolicy, + ) + + defender_client.outbound_spam_policies = { + "Default": OutboundSpamPolicy( + name="Default", + auto_forwarding_mode=True, + notify_limit_exceeded=False, + notify_sender_blocked=False, + notify_limit_exceeded_addresses=[], + notify_sender_blocked_addresses=[], + default=True, + ) + } + defender_client.outbound_spam_rules = {} + + check = defender_antispam_outbound_policy_forwarding_disabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Default is the only policy and mail forwarding is allowed." + ) + assert result[0].resource_name == "Default" + assert result[0].resource_id == "Default" + assert ( + result[0].resource + == defender_client.outbound_spam_policies["Default"].dict() + ) + + def test_case_6_default_and_custom_not_ok(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_antispam_outbound_policy_forwarding_disabled.defender_antispam_outbound_policy_forwarding_disabled.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_antispam_outbound_policy_forwarding_disabled.defender_antispam_outbound_policy_forwarding_disabled import ( + defender_antispam_outbound_policy_forwarding_disabled, + ) + from prowler.providers.m365.services.defender.defender_service import ( + OutboundSpamPolicy, + OutboundSpamRule, + ) + + defender_client.outbound_spam_policies = { + "Default": OutboundSpamPolicy( + name="Default", + auto_forwarding_mode=True, + notify_limit_exceeded=False, + notify_sender_blocked=False, + notify_limit_exceeded_addresses=[], + notify_sender_blocked_addresses=[], + default=True, + ), + "Policy1": OutboundSpamPolicy( + name="Policy1", + auto_forwarding_mode=True, + notify_limit_exceeded=False, + notify_sender_blocked=False, + notify_limit_exceeded_addresses=[], + notify_sender_blocked_addresses=[], + default=False, + ), + } + + defender_client.outbound_spam_rules = { + "Policy1": OutboundSpamRule( + state="Enabled", + priority=1, + users=["user@example.com"], + groups=["group1"], + domains=["domain.com"], + ) + } + + check = defender_antispam_outbound_policy_forwarding_disabled() + result = check.execute() + assert len(result) == 2 + + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Default is the default policy and mail forwarding is allowed, but it could be overridden by another well-configured Custom Policy." + ) + assert result[0].resource_name == "Default" + assert result[0].resource_id == "Default" + assert ( + result[0].resource + == defender_client.outbound_spam_policies["Default"].dict() + ) + + assert result[1].status == "FAIL" + assert ( + result[1].status_extended + == "Custom Outbound Spam policy Policy1 allows mail forwarding and includes users: user@example.com; groups: group1; domains: domain.com, " + "with priority 1 (0 is the highest). Also, the default policy allows mail forwarding, so entities not included by this custom policy could not be correctly protected." + ) + assert result[1].resource_name == "Policy1" + assert result[1].resource_id == "Policy1" + assert ( + result[1].resource + == defender_client.outbound_spam_policies["Policy1"].dict() + ) + + def test_no_outbound_spam_policies(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_antispam_outbound_policy_forwarding_disabled.defender_antispam_outbound_policy_forwarding_disabled.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_antispam_outbound_policy_forwarding_disabled.defender_antispam_outbound_policy_forwarding_disabled import ( + defender_antispam_outbound_policy_forwarding_disabled, + ) + + defender_client.outbound_spam_policies = {} + defender_client.outbound_spam_rules = {} + + check = defender_antispam_outbound_policy_forwarding_disabled() + result = check.execute() + assert len(result) == 0 diff --git a/tests/providers/m365/services/defender/defender_antispam_policy_inbound_no_allowed_domains/defender_antispam_policy_inbound_no_allowed_domains_test.py b/tests/providers/m365/services/defender/defender_antispam_policy_inbound_no_allowed_domains/defender_antispam_policy_inbound_no_allowed_domains_test.py new file mode 100644 index 0000000000..625fc8ded3 --- /dev/null +++ b/tests/providers/m365/services/defender/defender_antispam_policy_inbound_no_allowed_domains/defender_antispam_policy_inbound_no_allowed_domains_test.py @@ -0,0 +1,412 @@ +from unittest import mock + +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_defender_antispam_policy_inbound_no_allowed_domains: + def test_case_1_default_policy_no_allowed_domains(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_antispam_policy_inbound_no_allowed_domains.defender_antispam_policy_inbound_no_allowed_domains.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_antispam_policy_inbound_no_allowed_domains.defender_antispam_policy_inbound_no_allowed_domains import ( + defender_antispam_policy_inbound_no_allowed_domains, + ) + from prowler.providers.m365.services.defender.defender_service import ( + DefenderInboundSpamPolicy, + ) + + defender_client.inbound_spam_policies = [ + DefenderInboundSpamPolicy( + identity="Default", + default=True, + allowed_sender_domains=[], + ) + ] + defender_client.inbound_spam_rules = {} + + check = defender_antispam_policy_inbound_no_allowed_domains() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Default is the only policy and it does not contain allowed domains." + ) + assert result[0].resource_name == "Default" + assert result[0].resource_id == "Default" + assert result[0].resource == defender_client.inbound_spam_policies[0].dict() + + def test_case_2_all_policies_no_allowed_domains(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_antispam_policy_inbound_no_allowed_domains.defender_antispam_policy_inbound_no_allowed_domains.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_antispam_policy_inbound_no_allowed_domains.defender_antispam_policy_inbound_no_allowed_domains import ( + defender_antispam_policy_inbound_no_allowed_domains, + ) + from prowler.providers.m365.services.defender.defender_service import ( + DefenderInboundSpamPolicy, + InboundSpamRule, + ) + + defender_client.inbound_spam_policies = [ + DefenderInboundSpamPolicy( + identity="Default", + default=True, + allowed_sender_domains=[], + ), + DefenderInboundSpamPolicy( + identity="Policy1", + default=False, + allowed_sender_domains=[], + ), + ] + defender_client.inbound_spam_rules = { + "Policy1": InboundSpamRule( + state="Enabled", + priority=1, + users=["user1@example.com"], + groups=["group1"], + domains=["example.com"], + ) + } + + check = defender_antispam_policy_inbound_no_allowed_domains() + result = check.execute() + assert len(result) == 2 + + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Default is the default policy and it does not contain allowed domains, but it could be overridden by another misconfigured Custom Policy." + ) + assert result[0].resource_name == "Default" + assert result[0].resource_id == "Default" + assert result[0].resource == defender_client.inbound_spam_policies[0].dict() + + assert result[1].status == "PASS" + assert ( + result[1].status_extended + == "Custom Inbound Spam policy Policy1 does not contain allowed domains and includes users: user1@example.com; groups: group1; domains: example.com, " + "with priority 1 (0 is the highest). Also, the default policy does not contain allowed domains, so entities not included by this custom policy could still be correctly protected." + ) + assert result[1].resource_name == "Policy1" + assert result[1].resource_id == "Policy1" + assert result[1].resource == defender_client.inbound_spam_policies[1].dict() + + def test_case_3_default_ok_custom_with_allowed_domains(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_antispam_policy_inbound_no_allowed_domains.defender_antispam_policy_inbound_no_allowed_domains.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_antispam_policy_inbound_no_allowed_domains.defender_antispam_policy_inbound_no_allowed_domains import ( + defender_antispam_policy_inbound_no_allowed_domains, + ) + from prowler.providers.m365.services.defender.defender_service import ( + DefenderInboundSpamPolicy, + InboundSpamRule, + ) + + defender_client.inbound_spam_policies = [ + DefenderInboundSpamPolicy( + identity="Default", + default=True, + allowed_sender_domains=[], + ), + DefenderInboundSpamPolicy( + identity="Policy1", + default=False, + allowed_sender_domains=["spam.com"], + ), + ] + defender_client.inbound_spam_rules = { + "Policy1": InboundSpamRule( + state="Enabled", + priority=2, + users=["user@example.com"], + groups=["group1"], + domains=["domain.com"], + ) + } + + check = defender_antispam_policy_inbound_no_allowed_domains() + result = check.execute() + assert len(result) == 2 + + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Default is the default policy and it does not contain allowed domains, but it could be overridden by another misconfigured Custom Policy." + ) + assert result[0].resource_name == "Default" + assert result[0].resource_id == "Default" + assert result[0].resource == defender_client.inbound_spam_policies[0].dict() + + assert result[1].status == "FAIL" + assert ( + result[1].status_extended + == "Custom Inbound Spam policy Policy1 contains allowed domains and includes users: user@example.com; groups: group1; domains: domain.com, " + "with priority 2 (0 is the highest). However, the default policy does not contain allowed domains, so entities not included by this custom policy could be correctly protected." + ) + assert result[1].resource_name == "Policy1" + assert result[1].resource_id == "Policy1" + assert result[1].resource == defender_client.inbound_spam_policies[1].dict() + + def test_case_4_default_with_allowed_domains_custom_ok(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_antispam_policy_inbound_no_allowed_domains.defender_antispam_policy_inbound_no_allowed_domains.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_antispam_policy_inbound_no_allowed_domains.defender_antispam_policy_inbound_no_allowed_domains import ( + defender_antispam_policy_inbound_no_allowed_domains, + ) + from prowler.providers.m365.services.defender.defender_service import ( + DefenderInboundSpamPolicy, + InboundSpamRule, + ) + + defender_client.inbound_spam_policies = [ + DefenderInboundSpamPolicy( + identity="Default", + default=True, + allowed_sender_domains=["example.org"], + ), + DefenderInboundSpamPolicy( + identity="Policy1", + default=False, + allowed_sender_domains=[], + ), + ] + + defender_client.inbound_spam_rules = { + "Policy1": InboundSpamRule( + state="Enabled", + priority=0, + users=["user@example.com"], + groups=["group1"], + domains=["domain.com"], + ) + } + + check = defender_antispam_policy_inbound_no_allowed_domains() + result = check.execute() + assert len(result) == 2 + + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Default is the default policy and it contains allowed domains: example.org, but it could be overridden by another well-configured Custom Policy." + ) + assert result[0].resource_name == "Default" + assert result[0].resource_id == "Default" + assert result[0].resource == defender_client.inbound_spam_policies[0].dict() + + assert result[1].status == "PASS" + assert ( + result[1].status_extended + == "Custom Inbound Spam policy Policy1 does not contain allowed domains and includes users: user@example.com; groups: group1; domains: domain.com, " + "with priority 0 (0 is the highest). However, the default policy contains allowed domains, so entities not included by this custom policy could not be correctly protected." + ) + assert result[1].resource_name == "Policy1" + assert result[1].resource_id == "Policy1" + assert result[1].resource == defender_client.inbound_spam_policies[1].dict() + + def test_case_5_default_with_allowed_domains(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_antispam_policy_inbound_no_allowed_domains.defender_antispam_policy_inbound_no_allowed_domains.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_antispam_policy_inbound_no_allowed_domains.defender_antispam_policy_inbound_no_allowed_domains import ( + defender_antispam_policy_inbound_no_allowed_domains, + ) + from prowler.providers.m365.services.defender.defender_service import ( + DefenderInboundSpamPolicy, + ) + + defender_client.inbound_spam_policies = [ + DefenderInboundSpamPolicy( + identity="Default", + default=True, + allowed_sender_domains=["example.com"], + ) + ] + defender_client.inbound_spam_rules = {} + + check = defender_antispam_policy_inbound_no_allowed_domains() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Default is the only policy and it contains allowed domains: example.com." + ) + assert result[0].resource_name == "Default" + assert result[0].resource_id == "Default" + assert result[0].resource == defender_client.inbound_spam_policies[0].dict() + + def test_case_6_both_default_and_custom_with_allowed_domains(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_antispam_policy_inbound_no_allowed_domains.defender_antispam_policy_inbound_no_allowed_domains.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_antispam_policy_inbound_no_allowed_domains.defender_antispam_policy_inbound_no_allowed_domains import ( + defender_antispam_policy_inbound_no_allowed_domains, + ) + from prowler.providers.m365.services.defender.defender_service import ( + DefenderInboundSpamPolicy, + InboundSpamRule, + ) + + defender_client.inbound_spam_policies = [ + DefenderInboundSpamPolicy( + identity="Default", + default=True, + allowed_sender_domains=["example.com"], + ), + DefenderInboundSpamPolicy( + identity="Policy1", + default=False, + allowed_sender_domains=["spam.com"], + ), + ] + + defender_client.inbound_spam_rules = { + "Policy1": InboundSpamRule( + state="Enabled", + priority=5, + users=["user@example.com"], + groups=["group1"], + domains=["domain.com"], + ) + } + + check = defender_antispam_policy_inbound_no_allowed_domains() + result = check.execute() + assert len(result) == 2 + + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Default is the default policy and it contains allowed domains: example.com, but it could be overridden by another well-configured Custom Policy." + ) + assert result[0].resource_name == "Default" + assert result[0].resource_id == "Default" + assert result[0].resource == defender_client.inbound_spam_policies[0].dict() + + assert result[1].status == "FAIL" + assert ( + result[1].status_extended + == "Custom Inbound Spam policy Policy1 contains allowed domains and includes users: user@example.com; groups: group1; domains: domain.com, " + "with priority 5 (0 is the highest). Also, the default policy contains allowed domains, so entities not included by this custom policy could not be correctly protected." + ) + assert result[1].resource_name == "Policy1" + assert result[1].resource_id == "Policy1" + assert result[1].resource == defender_client.inbound_spam_policies[1].dict() + + def test_no_inbound_spam_policies(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_antispam_policy_inbound_no_allowed_domains.defender_antispam_policy_inbound_no_allowed_domains.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_antispam_policy_inbound_no_allowed_domains.defender_antispam_policy_inbound_no_allowed_domains import ( + defender_antispam_policy_inbound_no_allowed_domains, + ) + + defender_client.inbound_spam_policies = [] + defender_client.inbound_spam_rules = {} + + check = defender_antispam_policy_inbound_no_allowed_domains() + result = check.execute() + assert len(result) == 0 diff --git a/tests/providers/m365/services/defender/defender_chat_report_policy_configured/defender_chat_report_policy_configured_test.py b/tests/providers/m365/services/defender/defender_chat_report_policy_configured/defender_chat_report_policy_configured_test.py new file mode 100644 index 0000000000..54fabb5762 --- /dev/null +++ b/tests/providers/m365/services/defender/defender_chat_report_policy_configured/defender_chat_report_policy_configured_test.py @@ -0,0 +1,127 @@ +from unittest import mock + +from prowler.providers.m365.services.defender.defender_service import ( + ReportSubmissionPolicy, +) +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_defender_chat_report_policy_configured: + def test_report_policy_configured_pass(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + defender_client.report_submission_policy = ReportSubmissionPolicy( + report_junk_to_customized_address=True, + report_not_junk_to_customized_address=True, + report_phish_to_customized_address=True, + report_junk_addresses=["address1"], + report_not_junk_addresses=["address2"], + report_phish_addresses=["address3"], + report_chat_message_enabled=False, + report_chat_message_to_customized_address_enabled=True, + ) + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_chat_report_policy_configured.defender_chat_report_policy_configured.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_chat_report_policy_configured.defender_chat_report_policy_configured import ( + defender_chat_report_policy_configured, + ) + + check = defender_chat_report_policy_configured() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Defender report submission policy is properly configured for Teams security reporting." + ) + assert result[0].resource == defender_client.report_submission_policy.dict() + assert result[0].resource_name == "Defender Security Reporting Policy" + assert result[0].resource_id == "defenderSecurityReportingPolicy" + assert result[0].location == "global" + + def test_report_policy_configured_fail(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + defender_client.report_submission_policy = ReportSubmissionPolicy( + report_junk_to_customized_address=False, + report_not_junk_to_customized_address=True, + report_phish_to_customized_address=True, + report_junk_addresses=[], + report_not_junk_addresses=[], + report_phish_addresses=[], + report_chat_message_enabled=True, + report_chat_message_to_customized_address_enabled=False, + ) + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_chat_report_policy_configured.defender_chat_report_policy_configured.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_chat_report_policy_configured.defender_chat_report_policy_configured import ( + defender_chat_report_policy_configured, + ) + + check = defender_chat_report_policy_configured() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Defender report submission policy is not properly configured for Teams security reporting." + ) + assert result[0].resource == defender_client.report_submission_policy.dict() + assert result[0].resource_name == "Defender Security Reporting Policy" + assert result[0].resource_id == "defenderSecurityReportingPolicy" + assert result[0].location == "global" + + def test_report_policy_configured_none(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + defender_client.report_submission_policy = None + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_chat_report_policy_configured.defender_chat_report_policy_configured.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_chat_report_policy_configured.defender_chat_report_policy_configured import ( + defender_chat_report_policy_configured, + ) + + check = defender_chat_report_policy_configured() + result = check.execute() + assert len(result) == 0 diff --git a/tests/providers/m365/services/defender/defender_domain_dkim_enabled/defender_domain_dkim_enabled_test.py b/tests/providers/m365/services/defender/defender_domain_dkim_enabled/defender_domain_dkim_enabled_test.py new file mode 100644 index 0000000000..bbbf82b51c --- /dev/null +++ b/tests/providers/m365/services/defender/defender_domain_dkim_enabled/defender_domain_dkim_enabled_test.py @@ -0,0 +1,119 @@ +from unittest import mock + +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_defender_domain_dkim_enabled: + def test_dkim_enabled(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_domain_dkim_enabled.defender_domain_dkim_enabled.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_domain_dkim_enabled.defender_domain_dkim_enabled import ( + defender_domain_dkim_enabled, + ) + from prowler.providers.m365.services.defender.defender_service import ( + DkimConfig, + ) + + defender_client.dkim_configurations = [ + DkimConfig(dkim_signing_enabled=True, id="domain1") + ] + + check = defender_domain_dkim_enabled() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "DKIM is enabled for domain with ID domain1." + ) + assert result[0].resource == defender_client.dkim_configurations[0].dict() + assert result[0].resource_name == "DKIM Configuration" + assert result[0].resource_id == "domain1" + assert result[0].location == "global" + + def test_dkim_disabled(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_domain_dkim_enabled.defender_domain_dkim_enabled.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_domain_dkim_enabled.defender_domain_dkim_enabled import ( + defender_domain_dkim_enabled, + ) + from prowler.providers.m365.services.defender.defender_service import ( + DkimConfig, + ) + + defender_client.dkim_configurations = [ + DkimConfig(dkim_signing_enabled=False, id="domain2") + ] + + check = defender_domain_dkim_enabled() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "DKIM is not enabled for domain with ID domain2." + ) + assert result[0].resource == defender_client.dkim_configurations[0].dict() + assert result[0].resource_name == "DKIM Configuration" + assert result[0].resource_id == "domain2" + assert result[0].location == "global" + + def test_no_dkim_configurations(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_domain_dkim_enabled.defender_domain_dkim_enabled.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_domain_dkim_enabled.defender_domain_dkim_enabled import ( + defender_domain_dkim_enabled, + ) + + defender_client.dkim_configurations = [] + + check = defender_domain_dkim_enabled() + result = check.execute() + assert len(result) == 0 diff --git a/tests/providers/m365/services/defender/defender_malware_policy_common_attachments_filter_enabled/defender_malware_policy_common_attachments_filter_enabled_test.py b/tests/providers/m365/services/defender/defender_malware_policy_common_attachments_filter_enabled/defender_malware_policy_common_attachments_filter_enabled_test.py new file mode 100644 index 0000000000..adb62b213d --- /dev/null +++ b/tests/providers/m365/services/defender/defender_malware_policy_common_attachments_filter_enabled/defender_malware_policy_common_attachments_filter_enabled_test.py @@ -0,0 +1,444 @@ +from unittest import mock + +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_defender_malware_policy_common_attachments_filter_enabled: + def test_case_1_only_default_policy_enabled(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_malware_policy_common_attachments_filter_enabled.defender_malware_policy_common_attachments_filter_enabled.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_malware_policy_common_attachments_filter_enabled.defender_malware_policy_common_attachments_filter_enabled import ( + defender_malware_policy_common_attachments_filter_enabled, + ) + from prowler.providers.m365.services.defender.defender_service import ( + MalwarePolicy, + ) + + defender_client.malware_policies = [ + MalwarePolicy( + identity="Default", + enable_file_filter=True, + enable_internal_sender_admin_notifications=True, + internal_sender_admin_address="admin@example.com", + file_types=["exe", "js"], + is_default=True, + ) + ] + defender_client.malware_rules = {} + + check = defender_malware_policy_common_attachments_filter_enabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Default is the only policy and Common Attachment Types Filter is enabled." + ) + assert result[0].resource_name == "Default" + assert result[0].resource_id == "Default" + assert result[0].resource == defender_client.malware_policies[0].dict() + + def test_case_2_all_policies_enabled(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_malware_policy_common_attachments_filter_enabled.defender_malware_policy_common_attachments_filter_enabled.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_malware_policy_common_attachments_filter_enabled.defender_malware_policy_common_attachments_filter_enabled import ( + defender_malware_policy_common_attachments_filter_enabled, + ) + from prowler.providers.m365.services.defender.defender_service import ( + MalwarePolicy, + MalwareRule, + ) + + defender_client.malware_policies = [ + MalwarePolicy( + identity="Default", + enable_file_filter=True, + enable_internal_sender_admin_notifications=True, + internal_sender_admin_address="admin@example.com", + file_types=["exe", "js"], + is_default=True, + ), + MalwarePolicy( + identity="Policy1", + enable_file_filter=True, + enable_internal_sender_admin_notifications=True, + internal_sender_admin_address="admin@example.com", + file_types=["exe"], + is_default=False, + ), + ] + + defender_client.malware_rules = { + "Policy1": MalwareRule( + state="Enabled", + priority=1, + users=["user1@example.com"], + groups=["group1"], + domains=["domain.com"], + ) + } + + check = defender_malware_policy_common_attachments_filter_enabled() + result = check.execute() + assert len(result) == 2 + + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Default is the default policy and Common Attachment Types Filter is enabled, but it could be overridden by another misconfigured Custom Policy." + ) + assert result[0].resource_name == "Default" + assert result[0].resource_id == "Default" + assert result[0].resource == defender_client.malware_policies[0].dict() + + assert result[1].status == "PASS" + assert ( + result[1].status_extended + == "Custom Malware policy Policy1 enables Common Attachment Types Filter and includes users: user1@example.com; groups: group1; domains: domain.com, " + "with priority 1 (0 is the highest). Also, the default policy enables the filter, so entities not included by this custom policy could still be correctly protected." + ) + assert result[1].resource_name == "Policy1" + assert result[1].resource_id == "Policy1" + assert result[1].resource == defender_client.malware_policies[1].dict() + + def test_case_3_default_ok_custom_not_ok(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_malware_policy_common_attachments_filter_enabled.defender_malware_policy_common_attachments_filter_enabled.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_malware_policy_common_attachments_filter_enabled.defender_malware_policy_common_attachments_filter_enabled import ( + defender_malware_policy_common_attachments_filter_enabled, + ) + from prowler.providers.m365.services.defender.defender_service import ( + MalwarePolicy, + MalwareRule, + ) + + defender_client.malware_policies = [ + MalwarePolicy( + identity="Default", + enable_file_filter=True, + enable_internal_sender_admin_notifications=True, + internal_sender_admin_address="admin@example.com", + file_types=["exe"], + is_default=True, + ), + MalwarePolicy( + identity="Policy1", + enable_file_filter=False, + enable_internal_sender_admin_notifications=True, + internal_sender_admin_address="admin@example.com", + file_types=["js"], + is_default=False, + ), + ] + + defender_client.malware_rules = { + "Policy1": MalwareRule( + state="Enabled", + priority=2, + users=["user@example.com"], + groups=["group1"], + domains=["domain.com"], + ) + } + + check = defender_malware_policy_common_attachments_filter_enabled() + result = check.execute() + assert len(result) == 2 + + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Default is the default policy and Common Attachment Types Filter is enabled, but it could be overridden by another misconfigured Custom Policy." + ) + assert result[0].resource_name == "Default" + assert result[0].resource_id == "Default" + assert result[0].resource == defender_client.malware_policies[0].dict() + + assert result[1].status == "FAIL" + assert ( + result[1].status_extended + == "Custom Malware policy Policy1 does not enable Common Attachment Types Filter and includes users: user@example.com; groups: group1; domains: domain.com, " + "with priority 2 (0 is the highest). However, the default policy enables the filter, so entities not included by this custom policy could be correctly protected." + ) + assert result[1].resource_name == "Policy1" + assert result[1].resource_id == "Policy1" + assert result[1].resource == defender_client.malware_policies[1].dict() + + def test_case_4_default_not_ok_custom_ok(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_malware_policy_common_attachments_filter_enabled.defender_malware_policy_common_attachments_filter_enabled.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_malware_policy_common_attachments_filter_enabled.defender_malware_policy_common_attachments_filter_enabled import ( + defender_malware_policy_common_attachments_filter_enabled, + ) + from prowler.providers.m365.services.defender.defender_service import ( + MalwarePolicy, + MalwareRule, + ) + + defender_client.malware_policies = [ + MalwarePolicy( + identity="Default", + enable_file_filter=False, + enable_internal_sender_admin_notifications=True, + internal_sender_admin_address="admin@example.com", + file_types=[], + is_default=True, + ), + MalwarePolicy( + identity="Policy1", + enable_file_filter=True, + enable_internal_sender_admin_notifications=True, + internal_sender_admin_address="admin@example.com", + file_types=["exe"], + is_default=False, + ), + ] + + defender_client.malware_rules = { + "Policy1": MalwareRule( + state="Enabled", + priority=0, + users=["user@example.com"], + groups=["group1"], + domains=["domain.com"], + ) + } + + check = defender_malware_policy_common_attachments_filter_enabled() + result = check.execute() + assert len(result) == 2 + + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Default is the default policy and Common Attachment Types Filter is not enabled, but it could be overridden by another well-configured Custom Policy." + ) + assert result[0].resource_name == "Default" + assert result[0].resource_id == "Default" + assert result[0].resource == defender_client.malware_policies[0].dict() + + assert result[1].status == "PASS" + assert ( + result[1].status_extended + == "Custom Malware policy Policy1 enables Common Attachment Types Filter and includes users: user@example.com; groups: group1; domains: domain.com, " + "with priority 0 (0 is the highest). However, the default policy does not enable the filter, so entities not included by this custom policy could not be correctly protected." + ) + assert result[1].resource_name == "Policy1" + assert result[1].resource_id == "Policy1" + assert result[1].resource == defender_client.malware_policies[1].dict() + + def test_case_5_only_default_not_ok(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_malware_policy_common_attachments_filter_enabled.defender_malware_policy_common_attachments_filter_enabled.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_malware_policy_common_attachments_filter_enabled.defender_malware_policy_common_attachments_filter_enabled import ( + defender_malware_policy_common_attachments_filter_enabled, + ) + from prowler.providers.m365.services.defender.defender_service import ( + MalwarePolicy, + ) + + defender_client.malware_policies = [ + MalwarePolicy( + identity="Default", + enable_file_filter=False, + enable_internal_sender_admin_notifications=True, + internal_sender_admin_address="admin@example.com", + file_types=[], + is_default=True, + ) + ] + defender_client.malware_rules = {} + + check = defender_malware_policy_common_attachments_filter_enabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Default is the only policy and Common Attachment Types Filter is not enabled." + ) + assert result[0].resource_name == "Default" + assert result[0].resource_id == "Default" + assert result[0].resource == defender_client.malware_policies[0].dict() + + def test_case_6_default_and_custom_not_ok(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_malware_policy_common_attachments_filter_enabled.defender_malware_policy_common_attachments_filter_enabled.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_malware_policy_common_attachments_filter_enabled.defender_malware_policy_common_attachments_filter_enabled import ( + defender_malware_policy_common_attachments_filter_enabled, + ) + from prowler.providers.m365.services.defender.defender_service import ( + MalwarePolicy, + MalwareRule, + ) + + defender_client.malware_policies = [ + MalwarePolicy( + identity="Default", + enable_file_filter=False, + enable_internal_sender_admin_notifications=True, + internal_sender_admin_address="admin@example.com", + file_types=[], + is_default=True, + ), + MalwarePolicy( + identity="Policy1", + enable_file_filter=False, + enable_internal_sender_admin_notifications=True, + internal_sender_admin_address="admin@example.com", + file_types=["exe"], + is_default=False, + ), + ] + + defender_client.malware_rules = { + "Policy1": MalwareRule( + state="Enabled", + priority=5, + users=["user1@example.com"], + groups=["group1"], + domains=["domain.com"], + ) + } + + check = defender_malware_policy_common_attachments_filter_enabled() + result = check.execute() + assert len(result) == 2 + + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Default is the default policy and Common Attachment Types Filter is not enabled, but it could be overridden by another well-configured Custom Policy." + ) + assert result[0].resource_name == "Default" + assert result[0].resource_id == "Default" + assert result[0].resource == defender_client.malware_policies[0].dict() + + assert result[1].status == "FAIL" + assert ( + result[1].status_extended + == "Custom Malware policy Policy1 does not enable Common Attachment Types Filter and includes users: user1@example.com; groups: group1; domains: domain.com, " + "with priority 5 (0 is the highest). Also, the default policy does not enable the filter, so entities not included by this custom policy could not be correctly protected." + ) + assert result[1].resource_name == "Policy1" + assert result[1].resource_id == "Policy1" + assert result[1].resource == defender_client.malware_policies[1].dict() + + def test_no_malware_policies(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_malware_policy_common_attachments_filter_enabled.defender_malware_policy_common_attachments_filter_enabled.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_malware_policy_common_attachments_filter_enabled.defender_malware_policy_common_attachments_filter_enabled import ( + defender_malware_policy_common_attachments_filter_enabled, + ) + + defender_client.malware_policies = [] + defender_client.malware_rules = {} + + check = defender_malware_policy_common_attachments_filter_enabled() + result = check.execute() + assert len(result) == 0 diff --git a/tests/providers/m365/services/defender/defender_malware_policy_comprehensive_attachments_filter_applied/defender_malware_policy_comprehensive_attachments_filter_applied_test.py b/tests/providers/m365/services/defender/defender_malware_policy_comprehensive_attachments_filter_applied/defender_malware_policy_comprehensive_attachments_filter_applied_test.py new file mode 100644 index 0000000000..682f86c768 --- /dev/null +++ b/tests/providers/m365/services/defender/defender_malware_policy_comprehensive_attachments_filter_applied/defender_malware_policy_comprehensive_attachments_filter_applied_test.py @@ -0,0 +1,454 @@ +from unittest import mock + +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_defender_malware_policy_comprehensive_attachments_filter_applied: + def test_case_1_default_policy_properly_configured(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_malware_policy_comprehensive_attachments_filter_applied.defender_malware_policy_comprehensive_attachments_filter_applied.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_malware_policy_comprehensive_attachments_filter_applied.defender_malware_policy_comprehensive_attachments_filter_applied import ( + defender_malware_policy_comprehensive_attachments_filter_applied, + ) + from prowler.providers.m365.services.defender.defender_service import ( + MalwarePolicy, + ) + + defender_client.audit_config = { + "recommended_blocked_file_types": ["exe", "bat", "js"] + } + defender_client.malware_policies = [ + MalwarePolicy( + identity="Default", + enable_file_filter=True, + enable_internal_sender_admin_notifications=True, + internal_sender_admin_address="admin@example.com", + file_types=["exe", "bat", "js"], + is_default=True, + ) + ] + defender_client.malware_rules = {} + + check = defender_malware_policy_comprehensive_attachments_filter_applied() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Default is the only policy and Common Attachment Types Filter is properly configured." + ) + assert result[0].resource_name == "Default" + assert result[0].resource_id == "Default" + assert result[0].resource == defender_client.malware_policies[0].dict() + + def test_case_2_all_policies_properly_configured(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_malware_policy_comprehensive_attachments_filter_applied.defender_malware_policy_comprehensive_attachments_filter_applied.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_malware_policy_comprehensive_attachments_filter_applied.defender_malware_policy_comprehensive_attachments_filter_applied import ( + defender_malware_policy_comprehensive_attachments_filter_applied, + ) + from prowler.providers.m365.services.defender.defender_service import ( + MalwarePolicy, + MalwareRule, + ) + + defender_client.audit_config = { + "recommended_blocked_file_types": ["exe", "bat"] + } + defender_client.malware_policies = [ + MalwarePolicy( + identity="Default", + enable_file_filter=True, + enable_internal_sender_admin_notifications=True, + internal_sender_admin_address="admin@example.com", + file_types=["exe", "bat"], + is_default=True, + ), + MalwarePolicy( + identity="Custom1", + enable_file_filter=True, + enable_internal_sender_admin_notifications=True, + internal_sender_admin_address="admin@example.com", + file_types=["exe", "bat"], + is_default=False, + ), + ] + defender_client.malware_rules = { + "Custom1": MalwareRule( + state="Enabled", + priority=1, + users=["user1@example.com"], + groups=["group1"], + domains=["example.com"], + ) + } + + check = defender_malware_policy_comprehensive_attachments_filter_applied() + result = check.execute() + assert len(result) == 2 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Default is the default policy and Common Attachment Types Filter is properly configured, but it could be overridden by another misconfigured Custom Policy." + ) + assert result[0].resource_name == "Default" + assert result[0].resource_id == "Default" + assert result[0].resource == defender_client.malware_policies[0].dict() + + assert result[1].status == "PASS" + assert ( + result[1].status_extended + == "Custom Malware policy Custom1 is properly configured and includes users: user1@example.com; groups: group1; domains: example.com, " + "with priority 1 (0 is the highest). Also, the default policy is properly configured, so entities not included by this custom policy could still be correctly protected." + ) + assert result[1].resource_name == "Custom1" + assert result[1].resource_id == "Custom1" + assert result[1].resource == defender_client.malware_policies[1].dict() + + def test_case_3_default_ok_custom_not(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_malware_policy_comprehensive_attachments_filter_applied.defender_malware_policy_comprehensive_attachments_filter_applied.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_malware_policy_comprehensive_attachments_filter_applied.defender_malware_policy_comprehensive_attachments_filter_applied import ( + defender_malware_policy_comprehensive_attachments_filter_applied, + ) + from prowler.providers.m365.services.defender.defender_service import ( + MalwarePolicy, + MalwareRule, + ) + + defender_client.audit_config = { + "recommended_blocked_file_types": ["exe", "bat"] + } + defender_client.malware_policies = [ + MalwarePolicy( + identity="Default", + enable_file_filter=True, + enable_internal_sender_admin_notifications=True, + internal_sender_admin_address="admin@example.com", + file_types=["exe", "bat"], + is_default=True, + ), + MalwarePolicy( + identity="Custom1", + enable_file_filter=True, + enable_internal_sender_admin_notifications=True, + internal_sender_admin_address="admin@example.com", + file_types=["exe"], # missing bat + is_default=False, + ), + ] + defender_client.malware_rules = { + "Custom1": MalwareRule( + state="Enabled", + priority=1, + users=["user1@example.com"], + groups=["group1"], + domains=["example.com"], + ) + } + + check = defender_malware_policy_comprehensive_attachments_filter_applied() + result = check.execute() + assert len(result) == 2 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Default is the default policy and Common Attachment Types Filter is properly configured, but it could be overridden by another misconfigured Custom Policy." + ) + assert result[0].resource_name == "Default" + assert result[0].resource_id == "Default" + assert result[0].resource == defender_client.malware_policies[0].dict() + + assert result[1].status == "FAIL" + assert ( + result[1].status_extended + == "Custom Malware policy Custom1 is not properly configured and includes users: user1@example.com; groups: group1; domains: example.com, " + "with priority 1 (0 is the highest). Missing recommended file types: bat. However, the default policy is properly configured, so entities not included by this custom policy could be correctly protected." + ) + assert result[1].resource_name == "Custom1" + assert result[1].resource_id == "Custom1" + assert result[1].resource == defender_client.malware_policies[1].dict() + + def test_case_4_default_not_ok_custom_ok(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_malware_policy_comprehensive_attachments_filter_applied.defender_malware_policy_comprehensive_attachments_filter_applied.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_malware_policy_comprehensive_attachments_filter_applied.defender_malware_policy_comprehensive_attachments_filter_applied import ( + defender_malware_policy_comprehensive_attachments_filter_applied, + ) + from prowler.providers.m365.services.defender.defender_service import ( + MalwarePolicy, + MalwareRule, + ) + + defender_client.audit_config = { + "recommended_blocked_file_types": ["exe", "bat"] + } + defender_client.malware_policies = [ + MalwarePolicy( + identity="Default", + enable_file_filter=False, + enable_internal_sender_admin_notifications=True, + internal_sender_admin_address="admin@example.com", + file_types=[], + is_default=True, + ), + MalwarePolicy( + identity="Custom1", + enable_file_filter=True, + enable_internal_sender_admin_notifications=True, + internal_sender_admin_address="admin@example.com", + file_types=["exe", "bat"], + is_default=False, + ), + ] + defender_client.malware_rules = { + "Custom1": MalwareRule( + state="Enabled", + priority=0, + users=["user1@example.com"], + groups=["group1"], + domains=["domain.com"], + ) + } + + check = defender_malware_policy_comprehensive_attachments_filter_applied() + result = check.execute() + assert len(result) == 2 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Default is the default policy and Common Attachment Types Filter is not properly configured, but it could be overridden by another well-configured Custom Policy. Missing recommended file types: exe, bat." + ) + assert result[0].resource_name == "Default" + assert result[0].resource_id == "Default" + assert result[0].resource == defender_client.malware_policies[0].dict() + + assert result[1].status == "PASS" + assert ( + result[1].status_extended + == "Custom Malware policy Custom1 is properly configured and includes users: user1@example.com; groups: group1; domains: domain.com, " + "with priority 0 (0 is the highest). However, the default policy is not properly configured, so entities not included by this custom policy could not be correctly protected." + ) + assert result[1].resource_name == "Custom1" + assert result[1].resource_id == "Custom1" + assert result[1].resource == defender_client.malware_policies[1].dict() + + def test_case_5_only_default_not_ok(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_malware_policy_comprehensive_attachments_filter_applied.defender_malware_policy_comprehensive_attachments_filter_applied.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_malware_policy_comprehensive_attachments_filter_applied.defender_malware_policy_comprehensive_attachments_filter_applied import ( + defender_malware_policy_comprehensive_attachments_filter_applied, + ) + from prowler.providers.m365.services.defender.defender_service import ( + MalwarePolicy, + ) + + defender_client.audit_config = { + "recommended_blocked_file_types": ["exe", "bat"] + } + defender_client.malware_policies = [ + MalwarePolicy( + identity="Default", + enable_file_filter=False, + enable_internal_sender_admin_notifications=True, + internal_sender_admin_address="admin@example.com", + file_types=[], + is_default=True, + ) + ] + defender_client.malware_rules = {} + + check = defender_malware_policy_comprehensive_attachments_filter_applied() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Default is the only policy and Common Attachment Types Filter is not properly configured. Missing recommended file types: exe, bat." + ) + assert result[0].resource_name == "Default" + assert result[0].resource_id == "Default" + assert result[0].resource == defender_client.malware_policies[0].dict() + + def test_case_6_default_and_custom_not_ok(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_malware_policy_comprehensive_attachments_filter_applied.defender_malware_policy_comprehensive_attachments_filter_applied.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_malware_policy_comprehensive_attachments_filter_applied.defender_malware_policy_comprehensive_attachments_filter_applied import ( + defender_malware_policy_comprehensive_attachments_filter_applied, + ) + from prowler.providers.m365.services.defender.defender_service import ( + MalwarePolicy, + MalwareRule, + ) + + defender_client.audit_config = { + "recommended_blocked_file_types": ["exe", "bat"] + } + defender_client.malware_policies = [ + MalwarePolicy( + identity="Default", + enable_file_filter=False, + enable_internal_sender_admin_notifications=True, + internal_sender_admin_address="admin@example.com", + file_types=[], + is_default=True, + ), + MalwarePolicy( + identity="Custom1", + enable_file_filter=True, + enable_internal_sender_admin_notifications=True, + internal_sender_admin_address="admin@example.com", + file_types=["exe"], # missing bat + is_default=False, + ), + ] + defender_client.malware_rules = { + "Custom1": MalwareRule( + state="Enabled", + priority=2, + users=["user@example.com"], + groups=["group1"], + domains=["example.com"], + ) + } + + check = defender_malware_policy_comprehensive_attachments_filter_applied() + result = check.execute() + assert len(result) == 2 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Default is the default policy and Common Attachment Types Filter is not properly configured, but it could be overridden by another well-configured Custom Policy. Missing recommended file types: exe, bat." + ) + assert result[0].resource_name == "Default" + assert result[0].resource_id == "Default" + assert result[0].resource == defender_client.malware_policies[0].dict() + + assert result[1].status == "FAIL" + assert ( + result[1].status_extended + == "Custom Malware policy Custom1 is not properly configured and includes users: user@example.com; groups: group1; domains: example.com, " + "with priority 2 (0 is the highest). Missing recommended file types: bat. Also, the default policy is not properly configured, so entities not included by this custom policy could not be correctly protected." + ) + assert result[1].resource_name == "Custom1" + assert result[1].resource_id == "Custom1" + assert result[1].resource == defender_client.malware_policies[1].dict() + + def test_no_malware_policies(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + defender_client.malware_policies = [] + defender_client.malware_rules = {} + defender_client.audit_config = {} + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_malware_policy_comprehensive_attachments_filter_applied.defender_malware_policy_comprehensive_attachments_filter_applied.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_malware_policy_comprehensive_attachments_filter_applied.defender_malware_policy_comprehensive_attachments_filter_applied import ( + defender_malware_policy_comprehensive_attachments_filter_applied, + ) + + check = defender_malware_policy_comprehensive_attachments_filter_applied() + result = check.execute() + assert len(result) == 0 diff --git a/tests/providers/m365/services/defender/defender_malware_policy_notifications_internal_users_malware_enabled/defender_malware_policy_notifications_internal_users_malware_enabled_test.py b/tests/providers/m365/services/defender/defender_malware_policy_notifications_internal_users_malware_enabled/defender_malware_policy_notifications_internal_users_malware_enabled_test.py new file mode 100644 index 0000000000..16fe656c2b --- /dev/null +++ b/tests/providers/m365/services/defender/defender_malware_policy_notifications_internal_users_malware_enabled/defender_malware_policy_notifications_internal_users_malware_enabled_test.py @@ -0,0 +1,458 @@ +from unittest import mock + +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_defender_malware_policy_notifications_internal_users_malware_enabled: + def test_case_1_default_properly_configured(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_malware_policy_notifications_internal_users_malware_enabled.defender_malware_policy_notifications_internal_users_malware_enabled.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_malware_policy_notifications_internal_users_malware_enabled.defender_malware_policy_notifications_internal_users_malware_enabled import ( + defender_malware_policy_notifications_internal_users_malware_enabled, + ) + from prowler.providers.m365.services.defender.defender_service import ( + MalwarePolicy, + ) + + defender_client.malware_policies = [ + MalwarePolicy( + identity="Default", + enable_file_filter=False, + enable_internal_sender_admin_notifications=True, + internal_sender_admin_address="admin@example.com", + file_types=[], + is_default=True, + ) + ] + defender_client.malware_rules = {} + + check = ( + defender_malware_policy_notifications_internal_users_malware_enabled() + ) + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Default is the only policy and notifications for internal users sending malware are enabled." + ) + assert result[0].resource_name == "Default" + assert result[0].resource_id == "Default" + assert result[0].resource == defender_client.malware_policies[0].dict() + + def test_case_2_default_and_custom_properly_configured(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_malware_policy_notifications_internal_users_malware_enabled.defender_malware_policy_notifications_internal_users_malware_enabled.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_malware_policy_notifications_internal_users_malware_enabled.defender_malware_policy_notifications_internal_users_malware_enabled import ( + defender_malware_policy_notifications_internal_users_malware_enabled, + ) + from prowler.providers.m365.services.defender.defender_service import ( + MalwarePolicy, + MalwareRule, + ) + + defender_client.malware_policies = [ + MalwarePolicy( + identity="Default", + enable_file_filter=False, + enable_internal_sender_admin_notifications=True, + internal_sender_admin_address="admin@example.com", + file_types=[], + is_default=True, + ), + MalwarePolicy( + identity="Policy1", + enable_file_filter=False, + enable_internal_sender_admin_notifications=True, + internal_sender_admin_address="admin@example.com", + file_types=[], + is_default=False, + ), + ] + + defender_client.malware_rules = { + "Policy1": MalwareRule( + state="Enabled", + priority=1, + users=["user@example.com"], + groups=["group1"], + domains=["domain.com"], + ) + } + + check = ( + defender_malware_policy_notifications_internal_users_malware_enabled() + ) + result = check.execute() + assert len(result) == 2 + + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Default is the default policy and notifications for internal users sending malware are enabled, but it could be overridden by another misconfigured Custom Policy." + ) + assert result[0].resource_name == "Default" + assert result[0].resource_id == "Default" + assert result[0].resource == defender_client.malware_policies[0].dict() + + assert result[1].status == "PASS" + assert ( + result[1].status_extended + == "Custom Malware policy Policy1 is properly configured and includes users: user@example.com; groups: group1; domains: domain.com, " + "with priority 1 (0 is the highest). Also, the default policy is properly configured, so entities not included by this custom policy could still be correctly protected." + ) + assert result[1].resource_name == "Policy1" + assert result[1].resource_id == "Policy1" + assert result[1].resource == defender_client.malware_policies[1].dict() + + def test_case_3_default_ok_custom_not_configured(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_malware_policy_notifications_internal_users_malware_enabled.defender_malware_policy_notifications_internal_users_malware_enabled.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_malware_policy_notifications_internal_users_malware_enabled.defender_malware_policy_notifications_internal_users_malware_enabled import ( + defender_malware_policy_notifications_internal_users_malware_enabled, + ) + from prowler.providers.m365.services.defender.defender_service import ( + MalwarePolicy, + MalwareRule, + ) + + defender_client.malware_policies = [ + MalwarePolicy( + identity="Default", + enable_file_filter=False, + enable_internal_sender_admin_notifications=True, + internal_sender_admin_address="admin@example.com", + file_types=[], + is_default=True, + ), + MalwarePolicy( + identity="Policy1", + enable_file_filter=False, + enable_internal_sender_admin_notifications=False, + internal_sender_admin_address="", + file_types=[], + is_default=False, + ), + ] + + defender_client.malware_rules = { + "Policy1": MalwareRule( + state="Enabled", + priority=2, + users=["internal@example.com"], + groups=["group2"], + domains=["example.org"], + ) + } + + check = ( + defender_malware_policy_notifications_internal_users_malware_enabled() + ) + result = check.execute() + assert len(result) == 2 + + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Default is the default policy and notifications for internal users sending malware are enabled, but it could be overridden by another misconfigured Custom Policy." + ) + assert result[0].resource_name == "Default" + assert result[0].resource_id == "Default" + assert result[0].resource == defender_client.malware_policies[0].dict() + + assert result[1].status == "FAIL" + assert ( + result[1].status_extended + == "Custom Malware policy Policy1 is not properly configured and includes users: internal@example.com; groups: group2; domains: example.org, " + "with priority 2 (0 is the highest). However, the default policy is properly configured, so entities not included by this custom policy could be correctly protected." + ) + assert result[1].resource_name == "Policy1" + assert result[1].resource_id == "Policy1" + assert result[1].resource == defender_client.malware_policies[1].dict() + + def test_case_4_default_not_ok_custom_properly_configured(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_malware_policy_notifications_internal_users_malware_enabled.defender_malware_policy_notifications_internal_users_malware_enabled.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_malware_policy_notifications_internal_users_malware_enabled.defender_malware_policy_notifications_internal_users_malware_enabled import ( + defender_malware_policy_notifications_internal_users_malware_enabled, + ) + from prowler.providers.m365.services.defender.defender_service import ( + MalwarePolicy, + MalwareRule, + ) + + defender_client.malware_policies = [ + MalwarePolicy( + identity="Default", + enable_file_filter=False, + enable_internal_sender_admin_notifications=False, + internal_sender_admin_address="", + file_types=[], + is_default=True, + ), + MalwarePolicy( + identity="Policy1", + enable_file_filter=False, + enable_internal_sender_admin_notifications=True, + internal_sender_admin_address="admin@example.com", + file_types=[], + is_default=False, + ), + ] + + defender_client.malware_rules = { + "Policy1": MalwareRule( + state="Enabled", + priority=0, + users=["user@example.com"], + groups=["group1"], + domains=["domain.com"], + ) + } + + check = ( + defender_malware_policy_notifications_internal_users_malware_enabled() + ) + result = check.execute() + assert len(result) == 2 + + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Default is the default policy and notifications for internal users sending malware are not enabled, but it could be overridden by another well-configured Custom Policy." + ) + assert result[0].resource_name == "Default" + assert result[0].resource_id == "Default" + assert result[0].resource == defender_client.malware_policies[0].dict() + + assert result[1].status == "PASS" + assert ( + result[1].status_extended + == "Custom Malware policy Policy1 is properly configured and includes users: user@example.com; groups: group1; domains: domain.com, " + "with priority 0 (0 is the highest). However, the default policy is not properly configured, so entities not included by this custom policy could not be correctly protected." + ) + assert result[1].resource_name == "Policy1" + assert result[1].resource_id == "Policy1" + assert result[1].resource == defender_client.malware_policies[1].dict() + + def test_case_5_only_default_not_ok(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_malware_policy_notifications_internal_users_malware_enabled.defender_malware_policy_notifications_internal_users_malware_enabled.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_malware_policy_notifications_internal_users_malware_enabled.defender_malware_policy_notifications_internal_users_malware_enabled import ( + defender_malware_policy_notifications_internal_users_malware_enabled, + ) + from prowler.providers.m365.services.defender.defender_service import ( + MalwarePolicy, + ) + + defender_client.malware_policies = [ + MalwarePolicy( + identity="Default", + enable_file_filter=False, + enable_internal_sender_admin_notifications=False, + internal_sender_admin_address="", + file_types=[], + is_default=True, + ) + ] + defender_client.malware_rules = {} + + check = ( + defender_malware_policy_notifications_internal_users_malware_enabled() + ) + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Default is the only policy and notifications for internal users sending malware are not enabled." + ) + assert result[0].resource_name == "Default" + assert result[0].resource_id == "Default" + assert result[0].resource == defender_client.malware_policies[0].dict() + + def test_case_6_default_and_custom_not_configured(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_malware_policy_notifications_internal_users_malware_enabled.defender_malware_policy_notifications_internal_users_malware_enabled.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_malware_policy_notifications_internal_users_malware_enabled.defender_malware_policy_notifications_internal_users_malware_enabled import ( + defender_malware_policy_notifications_internal_users_malware_enabled, + ) + from prowler.providers.m365.services.defender.defender_service import ( + MalwarePolicy, + MalwareRule, + ) + + defender_client.malware_policies = [ + MalwarePolicy( + identity="Default", + enable_file_filter=False, + enable_internal_sender_admin_notifications=False, + internal_sender_admin_address="", + file_types=[], + is_default=True, + ), + MalwarePolicy( + identity="Policy1", + enable_file_filter=False, + enable_internal_sender_admin_notifications=False, + internal_sender_admin_address="", + file_types=[], + is_default=False, + ), + ] + + defender_client.malware_rules = { + "Policy1": MalwareRule( + state="Enabled", + priority=3, + users=["u@example.com"], + groups=["g1"], + domains=["d.com"], + ) + } + + check = ( + defender_malware_policy_notifications_internal_users_malware_enabled() + ) + result = check.execute() + assert len(result) == 2 + + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Default is the default policy and notifications for internal users sending malware are not enabled, but it could be overridden by another well-configured Custom Policy." + ) + assert result[0].resource_name == "Default" + assert result[0].resource_id == "Default" + assert result[0].resource == defender_client.malware_policies[0].dict() + + assert result[1].status == "FAIL" + assert ( + result[1].status_extended + == "Custom Malware policy Policy1 is not properly configured and includes users: u@example.com; groups: g1; domains: d.com, " + "with priority 3 (0 is the highest). Also, the default policy is not properly configured, so entities not included by this custom policy could not be correctly protected." + ) + assert result[1].resource_name == "Policy1" + assert result[1].resource_id == "Policy1" + assert result[1].resource == defender_client.malware_policies[1].dict() + + def test_no_malware_policies(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_malware_policy_notifications_internal_users_malware_enabled.defender_malware_policy_notifications_internal_users_malware_enabled.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_malware_policy_notifications_internal_users_malware_enabled.defender_malware_policy_notifications_internal_users_malware_enabled import ( + defender_malware_policy_notifications_internal_users_malware_enabled, + ) + + defender_client.malware_policies = [] + defender_client.malware_rules = {} + + check = ( + defender_malware_policy_notifications_internal_users_malware_enabled() + ) + result = check.execute() + assert len(result) == 0 diff --git a/tests/providers/m365/services/defender/defender_report_policy_configured/defender_report_policy_configured_test.py b/tests/providers/m365/services/defender/defender_report_policy_configured/defender_report_policy_configured_test.py new file mode 100644 index 0000000000..54fabb5762 --- /dev/null +++ b/tests/providers/m365/services/defender/defender_report_policy_configured/defender_report_policy_configured_test.py @@ -0,0 +1,127 @@ +from unittest import mock + +from prowler.providers.m365.services.defender.defender_service import ( + ReportSubmissionPolicy, +) +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_defender_chat_report_policy_configured: + def test_report_policy_configured_pass(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + defender_client.report_submission_policy = ReportSubmissionPolicy( + report_junk_to_customized_address=True, + report_not_junk_to_customized_address=True, + report_phish_to_customized_address=True, + report_junk_addresses=["address1"], + report_not_junk_addresses=["address2"], + report_phish_addresses=["address3"], + report_chat_message_enabled=False, + report_chat_message_to_customized_address_enabled=True, + ) + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_chat_report_policy_configured.defender_chat_report_policy_configured.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_chat_report_policy_configured.defender_chat_report_policy_configured import ( + defender_chat_report_policy_configured, + ) + + check = defender_chat_report_policy_configured() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Defender report submission policy is properly configured for Teams security reporting." + ) + assert result[0].resource == defender_client.report_submission_policy.dict() + assert result[0].resource_name == "Defender Security Reporting Policy" + assert result[0].resource_id == "defenderSecurityReportingPolicy" + assert result[0].location == "global" + + def test_report_policy_configured_fail(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + defender_client.report_submission_policy = ReportSubmissionPolicy( + report_junk_to_customized_address=False, + report_not_junk_to_customized_address=True, + report_phish_to_customized_address=True, + report_junk_addresses=[], + report_not_junk_addresses=[], + report_phish_addresses=[], + report_chat_message_enabled=True, + report_chat_message_to_customized_address_enabled=False, + ) + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_chat_report_policy_configured.defender_chat_report_policy_configured.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_chat_report_policy_configured.defender_chat_report_policy_configured import ( + defender_chat_report_policy_configured, + ) + + check = defender_chat_report_policy_configured() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Defender report submission policy is not properly configured for Teams security reporting." + ) + assert result[0].resource == defender_client.report_submission_policy.dict() + assert result[0].resource_name == "Defender Security Reporting Policy" + assert result[0].resource_id == "defenderSecurityReportingPolicy" + assert result[0].location == "global" + + def test_report_policy_configured_none(self): + defender_client = mock.MagicMock() + defender_client.audited_tenant = "audited_tenant" + defender_client.audited_domain = DOMAIN + defender_client.report_submission_policy = None + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.defender.defender_chat_report_policy_configured.defender_chat_report_policy_configured.defender_client", + new=defender_client, + ), + ): + from prowler.providers.m365.services.defender.defender_chat_report_policy_configured.defender_chat_report_policy_configured import ( + defender_chat_report_policy_configured, + ) + + check = defender_chat_report_policy_configured() + result = check.execute() + assert len(result) == 0 diff --git a/tests/providers/m365/services/defender/m365_defender_service_test.py b/tests/providers/m365/services/defender/m365_defender_service_test.py new file mode 100644 index 0000000000..35534a53e3 --- /dev/null +++ b/tests/providers/m365/services/defender/m365_defender_service_test.py @@ -0,0 +1,556 @@ +from unittest import mock +from unittest.mock import patch + +from prowler.providers.m365.models import M365IdentityInfo +from prowler.providers.m365.services.defender.defender_service import ( + AntiphishingPolicy, + AntiphishingRule, + ConnectionFilterPolicy, + Defender, + DefenderInboundSpamPolicy, + DkimConfig, + InboundSpamRule, + MalwarePolicy, + MalwareRule, + OutboundSpamPolicy, + OutboundSpamRule, + ReportSubmissionPolicy, +) +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +def mock_defender_get_malware_filter_policy(_): + return [ + MalwarePolicy( + enable_file_filter=False, + identity="Policy1", + enable_internal_sender_admin_notifications=False, + internal_sender_admin_address="", + file_types=[], + is_default=True, + ), + MalwarePolicy( + enable_file_filter=True, + identity="Policy2", + enable_internal_sender_admin_notifications=True, + internal_sender_admin_address="security@example.com", + file_types=["exe", "zip"], + is_default=False, + ), + ] + + +def mock_defender_get_malware_filter_rule(_): + return { + "Policy1": MalwareRule( + state="Enabled", + priority=1, + users=["test@example.com"], + groups=["example_group"], + domains=["example.com"], + ), + "Policy2": MalwareRule( + state="Disabled", + priority=2, + users=["test@example.com"], + groups=["example_group"], + domains=["example.com"], + ), + } + + +def mock_defender_get_antiphishing_policy(_): + return { + "Policy1": AntiphishingPolicy( + name="Policy1", + spoof_intelligence=True, + spoof_intelligence_action="Quarantine", + dmarc_reject_action="Reject", + dmarc_quarantine_action="Quarantine", + safety_tips=True, + unauthenticated_sender_action=True, + show_tag=True, + honor_dmarc_policy=True, + default=False, + ), + "Policy2": AntiphishingPolicy( + name="Policy2", + spoof_intelligence=False, + spoof_intelligence_action="None", + dmarc_reject_action="None", + dmarc_quarantine_action="None", + safety_tips=False, + unauthenticated_sender_action=False, + show_tag=False, + honor_dmarc_policy=False, + default=True, + ), + } + + +def mock_defender_get_antiphishing_rules(_): + return { + "Policy1": AntiphishingRule( + state="Enabled", + priority=1, + users=["test@example.com"], + groups=["example_group"], + domains=["example.com"], + ), + "Policy2": AntiphishingRule( + state="Disabled", + priority=2, + users=["test@example.com"], + groups=["example_group"], + domains=["example.com"], + ), + } + + +def mock_defender_get_inbound_spam_policy(_): + return [ + DefenderInboundSpamPolicy( + identity="Policy1", + allowed_sender_domains=[], + default=False, + ), + DefenderInboundSpamPolicy( + identity="Policy2", + allowed_sender_domains=["example.com"], + default=True, + ), + ] + + +def mock_defender_get_inbound_spam_rule(_): + return { + "Policy1": InboundSpamRule( + state="Enabled", + priority=1, + users=["test@example.com"], + groups=["example_group"], + domains=["example.com"], + ), + "Policy2": InboundSpamRule( + state="Disabled", + priority=2, + users=["test@example.com"], + groups=["example_group"], + domains=["example.com"], + ), + } + + +def mock_defender_get_connection_filter_policy(_): + return ConnectionFilterPolicy( + ip_allow_list=[], + identity="Default", + enable_safe_list=False, + ) + + +def mock_defender_get_dkim_config(_): + return [ + DkimConfig(dkim_signing_enabled=True, id="domain1"), + DkimConfig(dkim_signing_enabled=False, id="domain2"), + ] + + +def mock_defender_get_report_submission_policy(_): + return ReportSubmissionPolicy( + id="DefaultReportSubmissionPolicy", + identity="DefaultReportSubmissionPolicy", + name="DefaultReportSubmissionPolicy", + report_junk_to_customized_address=True, + report_not_junk_to_customized_address=True, + report_phish_to_customized_address=True, + report_junk_addresses=[], + report_not_junk_addresses=[], + report_phish_addresses=[], + report_chat_message_enabled=True, + report_chat_message_to_customized_address_enabled=True, + ) + + +def mock_defender_get_outbound_spam_filter_policy(_): + return { + "Policy1": OutboundSpamPolicy( + name="Policy1", + notify_sender_blocked=True, + notify_limit_exceeded=True, + notify_limit_exceeded_addresses=["security@example.com"], + notify_sender_blocked_addresses=["security@example.com"], + auto_forwarding_mode=False, + default=False, + ), + "Policy2": OutboundSpamPolicy( + name="Policy2", + notify_sender_blocked=False, + notify_limit_exceeded=False, + notify_limit_exceeded_addresses=[], + notify_sender_blocked_addresses=[], + auto_forwarding_mode=True, + default=True, + ), + } + + +def mock_defender_get_outbound_spam_filter_rule(_): + return { + "Policy1": OutboundSpamRule( + state="Enabled", + priority=1, + users=["test@example.com"], + groups=["example_group"], + domains=["example.com"], + ), + "Policy2": OutboundSpamRule( + state="Disabled", + priority=2, + users=["test@example.com"], + groups=["example_group"], + domains=["example.com"], + ), + } + + +class Test_Defender_Service: + def test_get_client(self): + with ( + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + ): + defender_client = Defender( + set_mocked_m365_provider( + identity=M365IdentityInfo(tenant_domain=DOMAIN) + ) + ) + assert defender_client.client.__class__.__name__ == "GraphServiceClient" + assert defender_client.powershell.__class__.__name__ == "M365PowerShell" + defender_client.powershell.close() + + @patch( + "prowler.providers.m365.services.defender.defender_service.Defender._get_malware_filter_policy", + new=mock_defender_get_malware_filter_policy, + ) + def test__get_malware_filter_policy(self): + with ( + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + ): + defender_client = Defender( + set_mocked_m365_provider( + identity=M365IdentityInfo(tenant_domain=DOMAIN) + ) + ) + malware_policies = defender_client.malware_policies + assert ( + malware_policies[0].enable_internal_sender_admin_notifications is False + ) + assert malware_policies[0].internal_sender_admin_address == "" + assert malware_policies[0].enable_file_filter is False + assert malware_policies[0].identity == "Policy1" + assert malware_policies[0].file_types == [] + assert malware_policies[0].is_default is True + assert malware_policies[1].enable_file_filter is True + assert malware_policies[1].identity == "Policy2" + assert ( + malware_policies[1].enable_internal_sender_admin_notifications is True + ) + assert ( + malware_policies[1].internal_sender_admin_address + == "security@example.com" + ) + assert malware_policies[1].file_types == ["exe", "zip"] + assert malware_policies[1].is_default is False + defender_client.powershell.close() + + @patch( + "prowler.providers.m365.services.defender.defender_service.Defender._get_malware_filter_rule", + new=mock_defender_get_malware_filter_rule, + ) + def test__get_malware_filter_rule(self): + with ( + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + ): + defender_client = Defender( + set_mocked_m365_provider( + identity=M365IdentityInfo(tenant_domain=DOMAIN) + ) + ) + malware_rules = defender_client.malware_rules + assert malware_rules["Policy1"].state == "Enabled" + assert malware_rules["Policy1"].priority == 1 + assert malware_rules["Policy1"].users == ["test@example.com"] + assert malware_rules["Policy1"].groups == ["example_group"] + assert malware_rules["Policy1"].domains == ["example.com"] + assert malware_rules["Policy2"].state == "Disabled" + assert malware_rules["Policy2"].priority == 2 + assert malware_rules["Policy2"].users == ["test@example.com"] + assert malware_rules["Policy2"].groups == ["example_group"] + assert malware_rules["Policy2"].domains == ["example.com"] + defender_client.powershell.close() + + @patch( + "prowler.providers.m365.services.defender.defender_service.Defender._get_antiphishing_policy", + new=mock_defender_get_antiphishing_policy, + ) + def test_get_antiphishing_policy(self): + with ( + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + ): + defender_client = Defender( + set_mocked_m365_provider( + identity=M365IdentityInfo(tenant_domain=DOMAIN) + ) + ) + antiphishing_policies = defender_client.antiphishing_policies + assert antiphishing_policies["Policy1"].name == "Policy1" + assert antiphishing_policies["Policy1"].spoof_intelligence is True + assert ( + antiphishing_policies["Policy1"].spoof_intelligence_action + == "Quarantine" + ) + assert antiphishing_policies["Policy1"].dmarc_reject_action == "Reject" + assert ( + antiphishing_policies["Policy1"].dmarc_quarantine_action == "Quarantine" + ) + assert antiphishing_policies["Policy1"].safety_tips is True + assert ( + antiphishing_policies["Policy1"].unauthenticated_sender_action is True + ) + assert antiphishing_policies["Policy1"].show_tag is True + assert antiphishing_policies["Policy1"].honor_dmarc_policy is True + assert antiphishing_policies["Policy1"].default is False + assert antiphishing_policies["Policy2"].name == "Policy2" + assert antiphishing_policies["Policy2"].spoof_intelligence is False + assert antiphishing_policies["Policy2"].spoof_intelligence_action == "None" + assert antiphishing_policies["Policy2"].dmarc_reject_action == "None" + assert antiphishing_policies["Policy2"].dmarc_quarantine_action == "None" + assert antiphishing_policies["Policy2"].safety_tips is False + assert ( + antiphishing_policies["Policy2"].unauthenticated_sender_action is False + ) + assert antiphishing_policies["Policy2"].show_tag is False + assert antiphishing_policies["Policy2"].honor_dmarc_policy is False + assert antiphishing_policies["Policy2"].default is True + defender_client.powershell.close() + + @patch( + "prowler.providers.m365.services.defender.defender_service.Defender._get_antiphishing_rules", + new=mock_defender_get_antiphishing_rules, + ) + def test_get_antiphishing_rules(self): + with ( + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + ): + defender_client = Defender( + set_mocked_m365_provider( + identity=M365IdentityInfo(tenant_domain=DOMAIN) + ) + ) + antiphishing_rules = defender_client.antiphishing_rules + assert antiphishing_rules["Policy1"].state == "Enabled" + assert antiphishing_rules["Policy1"].priority == 1 + assert antiphishing_rules["Policy1"].users == ["test@example.com"] + assert antiphishing_rules["Policy1"].groups == ["example_group"] + assert antiphishing_rules["Policy1"].domains == ["example.com"] + assert antiphishing_rules["Policy2"].state == "Disabled" + assert antiphishing_rules["Policy2"].priority == 2 + assert antiphishing_rules["Policy2"].users == ["test@example.com"] + assert antiphishing_rules["Policy2"].groups == ["example_group"] + assert antiphishing_rules["Policy2"].domains == ["example.com"] + defender_client.powershell.close() + + @patch( + "prowler.providers.m365.services.defender.defender_service.Defender._get_connection_filter_policy", + new=mock_defender_get_connection_filter_policy, + ) + def test__get_connection_filter_policy(self): + with ( + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + ): + defender_client = Defender( + set_mocked_m365_provider( + identity=M365IdentityInfo(tenant_domain=DOMAIN) + ) + ) + connection_filter_policy = defender_client.connection_filter_policy + assert connection_filter_policy.ip_allow_list == [] + assert connection_filter_policy.identity == "Default" + assert connection_filter_policy.enable_safe_list is False + defender_client.powershell.close() + + @patch( + "prowler.providers.m365.services.defender.defender_service.Defender._get_dkim_config", + new=mock_defender_get_dkim_config, + ) + def test_get_dkim_config(self): + with ( + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + ): + defender_client = Defender( + set_mocked_m365_provider( + identity=M365IdentityInfo(tenant_domain=DOMAIN) + ) + ) + dkim_configs = defender_client.dkim_configurations + assert dkim_configs[0].dkim_signing_enabled is True + assert dkim_configs[0].id == "domain1" + assert dkim_configs[1].dkim_signing_enabled is False + assert dkim_configs[1].id == "domain2" + defender_client.powershell.close() + + @patch( + "prowler.providers.m365.services.defender.defender_service.Defender._get_outbound_spam_filter_policy", + new=mock_defender_get_outbound_spam_filter_policy, + ) + def test_get_outbound_spam_filter_policy(self): + with ( + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + ): + defender_client = Defender( + set_mocked_m365_provider( + identity=M365IdentityInfo(tenant_domain=DOMAIN) + ) + ) + outbound_spam_policies = defender_client.outbound_spam_policies + assert outbound_spam_policies["Policy1"].name == "Policy1" + assert outbound_spam_policies["Policy1"].notify_sender_blocked is True + assert outbound_spam_policies["Policy1"].notify_limit_exceeded is True + assert outbound_spam_policies[ + "Policy1" + ].notify_limit_exceeded_addresses == ["security@example.com"] + assert outbound_spam_policies[ + "Policy1" + ].notify_sender_blocked_addresses == ["security@example.com"] + assert outbound_spam_policies["Policy1"].auto_forwarding_mode is False + assert outbound_spam_policies["Policy1"].default is False + assert outbound_spam_policies["Policy2"].name == "Policy2" + assert outbound_spam_policies["Policy2"].notify_sender_blocked is False + assert outbound_spam_policies["Policy2"].notify_limit_exceeded is False + assert ( + outbound_spam_policies["Policy2"].notify_limit_exceeded_addresses == [] + ) + assert ( + outbound_spam_policies["Policy2"].notify_sender_blocked_addresses == [] + ) + assert outbound_spam_policies["Policy2"].auto_forwarding_mode is True + assert outbound_spam_policies["Policy2"].default is True + defender_client.powershell.close() + + @patch( + "prowler.providers.m365.services.defender.defender_service.Defender._get_outbound_spam_filter_rule", + new=mock_defender_get_outbound_spam_filter_rule, + ) + def test_get_outbound_spam_filter_rule(self): + with ( + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + ): + defender_client = Defender( + set_mocked_m365_provider( + identity=M365IdentityInfo(tenant_domain=DOMAIN) + ) + ) + outbound_spam_rules = defender_client.outbound_spam_rules + assert outbound_spam_rules["Policy1"].state == "Enabled" + assert outbound_spam_rules["Policy1"].priority == 1 + assert outbound_spam_rules["Policy1"].users == ["test@example.com"] + assert outbound_spam_rules["Policy1"].groups == ["example_group"] + assert outbound_spam_rules["Policy1"].domains == ["example.com"] + assert outbound_spam_rules["Policy2"].state == "Disabled" + assert outbound_spam_rules["Policy2"].priority == 2 + assert outbound_spam_rules["Policy2"].users == ["test@example.com"] + assert outbound_spam_rules["Policy2"].groups == ["example_group"] + assert outbound_spam_rules["Policy2"].domains == ["example.com"] + defender_client.powershell.close() + + @patch( + "prowler.providers.m365.services.defender.defender_service.Defender._get_inbound_spam_filter_policy", + new=mock_defender_get_inbound_spam_policy, + ) + def test__get_inbound_spam_filter_policy(self): + with ( + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + ): + defender_client = Defender( + set_mocked_m365_provider( + identity=M365IdentityInfo(tenant_domain=DOMAIN) + ) + ) + inbound_spam_policies = defender_client.inbound_spam_policies + assert inbound_spam_policies[0].allowed_sender_domains == [] + assert inbound_spam_policies[1].allowed_sender_domains == ["example.com"] + defender_client.powershell.close() + + @patch( + "prowler.providers.m365.services.defender.defender_service.Defender._get_inbound_spam_filter_rule", + new=mock_defender_get_inbound_spam_rule, + ) + def test__get_inbound_spam_filter_rule(self): + with ( + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + ): + defender_client = Defender( + set_mocked_m365_provider( + identity=M365IdentityInfo(tenant_domain=DOMAIN) + ) + ) + inbound_spam_rules = defender_client.inbound_spam_rules + assert inbound_spam_rules["Policy1"].state == "Enabled" + assert inbound_spam_rules["Policy1"].priority == 1 + assert inbound_spam_rules["Policy1"].users == ["test@example.com"] + assert inbound_spam_rules["Policy1"].groups == ["example_group"] + assert inbound_spam_rules["Policy1"].domains == ["example.com"] + assert inbound_spam_rules["Policy2"].state == "Disabled" + assert inbound_spam_rules["Policy2"].priority == 2 + assert inbound_spam_rules["Policy2"].users == ["test@example.com"] + assert inbound_spam_rules["Policy2"].groups == ["example_group"] + assert inbound_spam_rules["Policy2"].domains == ["example.com"] + defender_client.powershell.close() + + @patch( + "prowler.providers.m365.services.defender.defender_service.Defender._get_report_submission_policy", + new=mock_defender_get_report_submission_policy, + ) + def test_get_report_submission_policy(self): + with ( + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + ): + defender_client = Defender( + set_mocked_m365_provider( + identity=M365IdentityInfo(tenant_domain=DOMAIN) + ) + ) + report_submission_policy = defender_client.report_submission_policy + assert report_submission_policy.report_junk_to_customized_address is True + assert ( + report_submission_policy.report_not_junk_to_customized_address is True + ) + assert report_submission_policy.report_phish_to_customized_address is True + assert report_submission_policy.report_junk_addresses == [] + assert report_submission_policy.report_not_junk_addresses == [] + assert report_submission_policy.report_phish_addresses == [] + assert report_submission_policy.report_chat_message_enabled is True diff --git a/tests/providers/microsoft365/services/entra/entra_admin_consent_workflow_enabled/entra_admin_consent_workflow_enabled_test.py b/tests/providers/m365/services/entra/entra_admin_consent_workflow_enabled/entra_admin_consent_workflow_enabled_test.py similarity index 76% rename from tests/providers/microsoft365/services/entra/entra_admin_consent_workflow_enabled/entra_admin_consent_workflow_enabled_test.py rename to tests/providers/m365/services/entra/entra_admin_consent_workflow_enabled/entra_admin_consent_workflow_enabled_test.py index 9a72389813..8599a5d56a 100644 --- a/tests/providers/microsoft365/services/entra/entra_admin_consent_workflow_enabled/entra_admin_consent_workflow_enabled_test.py +++ b/tests/providers/m365/services/entra/entra_admin_consent_workflow_enabled/entra_admin_consent_workflow_enabled_test.py @@ -1,12 +1,7 @@ from unittest import mock -from prowler.providers.microsoft365.services.entra.entra_service import ( - AdminConsentPolicy, -) -from tests.providers.microsoft365.microsoft365_fixtures import ( - DOMAIN, - set_mocked_microsoft365_provider, -) +from prowler.providers.m365.services.entra.entra_service import AdminConsentPolicy +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider class Test_entra_admin_consent_workflow_enabled: @@ -20,14 +15,14 @@ class Test_entra_admin_consent_workflow_enabled: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_admin_consent_workflow_enabled.entra_admin_consent_workflow_enabled.entra_client", + "prowler.providers.m365.services.entra.entra_admin_consent_workflow_enabled.entra_admin_consent_workflow_enabled.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_admin_consent_workflow_enabled.entra_admin_consent_workflow_enabled import ( + from prowler.providers.m365.services.entra.entra_admin_consent_workflow_enabled.entra_admin_consent_workflow_enabled import ( entra_admin_consent_workflow_enabled, ) @@ -62,14 +57,14 @@ class Test_entra_admin_consent_workflow_enabled: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_admin_consent_workflow_enabled.entra_admin_consent_workflow_enabled.entra_client", + "prowler.providers.m365.services.entra.entra_admin_consent_workflow_enabled.entra_admin_consent_workflow_enabled.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_admin_consent_workflow_enabled.entra_admin_consent_workflow_enabled import ( + from prowler.providers.m365.services.entra.entra_admin_consent_workflow_enabled.entra_admin_consent_workflow_enabled import ( entra_admin_consent_workflow_enabled, ) @@ -104,14 +99,14 @@ class Test_entra_admin_consent_workflow_enabled: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_admin_consent_workflow_enabled.entra_admin_consent_workflow_enabled.entra_client", + "prowler.providers.m365.services.entra.entra_admin_consent_workflow_enabled.entra_admin_consent_workflow_enabled.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_admin_consent_workflow_enabled.entra_admin_consent_workflow_enabled import ( + from prowler.providers.m365.services.entra.entra_admin_consent_workflow_enabled.entra_admin_consent_workflow_enabled import ( entra_admin_consent_workflow_enabled, ) @@ -148,14 +143,14 @@ class Test_entra_admin_consent_workflow_enabled: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_admin_consent_workflow_enabled.entra_admin_consent_workflow_enabled.entra_client", + "prowler.providers.m365.services.entra.entra_admin_consent_workflow_enabled.entra_admin_consent_workflow_enabled.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_admin_consent_workflow_enabled.entra_admin_consent_workflow_enabled import ( + from prowler.providers.m365.services.entra.entra_admin_consent_workflow_enabled.entra_admin_consent_workflow_enabled import ( entra_admin_consent_workflow_enabled, ) diff --git a/tests/providers/microsoft365/services/entra/entra_admin_portals_role_limited_access/entra_admin_portals_role_limited_access_test.py b/tests/providers/m365/services/entra/entra_admin_portals_access_restriction/entra_admin_portals_access_restriction_test.py similarity index 79% rename from tests/providers/microsoft365/services/entra/entra_admin_portals_role_limited_access/entra_admin_portals_role_limited_access_test.py rename to tests/providers/m365/services/entra/entra_admin_portals_access_restriction/entra_admin_portals_access_restriction_test.py index 506d4908ae..1226f07261 100644 --- a/tests/providers/microsoft365/services/entra/entra_admin_portals_role_limited_access/entra_admin_portals_role_limited_access_test.py +++ b/tests/providers/m365/services/entra/entra_admin_portals_access_restriction/entra_admin_portals_access_restriction_test.py @@ -1,7 +1,7 @@ from unittest import mock from uuid import uuid4 -from prowler.providers.microsoft365.services.entra.entra_service import ( +from prowler.providers.m365.services.entra.entra_service import ( ApplicationsConditions, ConditionalAccessGrantControl, ConditionalAccessPolicyState, @@ -14,13 +14,10 @@ from prowler.providers.microsoft365.services.entra.entra_service import ( SignInFrequencyInterval, UsersConditions, ) -from tests.providers.microsoft365.microsoft365_fixtures import ( - DOMAIN, - set_mocked_microsoft365_provider, -) +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider -class Test_entra_admin_portals_role_limited_access: +class Test_entra_admin_portals_access_restriction: def test_entra_no_conditional_access_policies(self): entra_client = mock.MagicMock entra_client.audited_tenant = "audited_tenant" @@ -28,20 +25,20 @@ class Test_entra_admin_portals_role_limited_access: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_admin_portals_role_limited_access.entra_admin_portals_role_limited_access.entra_client", + "prowler.providers.m365.services.entra.entra_admin_portals_access_restriction.entra_admin_portals_access_restriction.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_admin_portals_role_limited_access.entra_admin_portals_role_limited_access import ( - entra_admin_portals_role_limited_access, + from prowler.providers.m365.services.entra.entra_admin_portals_access_restriction.entra_admin_portals_access_restriction import ( + entra_admin_portals_access_restriction, ) entra_client.conditional_access_policies = {} - check = entra_admin_portals_role_limited_access() + check = entra_admin_portals_access_restriction() result = check.execute() assert len(result) == 1 assert result[0].status == "FAIL" @@ -63,17 +60,17 @@ class Test_entra_admin_portals_role_limited_access: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_admin_portals_role_limited_access.entra_admin_portals_role_limited_access.entra_client", + "prowler.providers.m365.services.entra.entra_admin_portals_access_restriction.entra_admin_portals_access_restriction.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_admin_portals_role_limited_access.entra_admin_portals_role_limited_access import ( - entra_admin_portals_role_limited_access, + from prowler.providers.m365.services.entra.entra_admin_portals_access_restriction.entra_admin_portals_access_restriction import ( + entra_admin_portals_access_restriction, ) - from prowler.providers.microsoft365.services.entra.entra_service import ( + from prowler.providers.m365.services.entra.entra_service import ( ConditionalAccessPolicy, ) @@ -83,7 +80,9 @@ class Test_entra_admin_portals_role_limited_access: display_name="Test", conditions=Conditions( application_conditions=ApplicationsConditions( - included_applications=[], excluded_applications=[] + included_applications=[], + excluded_applications=[], + included_user_actions=[], ), user_conditions=UsersConditions( included_groups=[], @@ -112,7 +111,7 @@ class Test_entra_admin_portals_role_limited_access: ) } - check = entra_admin_portals_role_limited_access() + check = entra_admin_portals_access_restriction() result = check.execute() assert len(result) == 1 assert result[0].status == "FAIL" @@ -135,17 +134,17 @@ class Test_entra_admin_portals_role_limited_access: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_admin_portals_role_limited_access.entra_admin_portals_role_limited_access.entra_client", + "prowler.providers.m365.services.entra.entra_admin_portals_access_restriction.entra_admin_portals_access_restriction.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_admin_portals_role_limited_access.entra_admin_portals_role_limited_access import ( - entra_admin_portals_role_limited_access, + from prowler.providers.m365.services.entra.entra_admin_portals_access_restriction.entra_admin_portals_access_restriction import ( + entra_admin_portals_access_restriction, ) - from prowler.providers.microsoft365.services.entra.entra_service import ( + from prowler.providers.m365.services.entra.entra_service import ( ConditionalAccessPolicy, ) @@ -157,6 +156,7 @@ class Test_entra_admin_portals_role_limited_access: application_conditions=ApplicationsConditions( included_applications=["MicrosoftAdminPortals"], excluded_applications=[], + included_user_actions=[], ), user_conditions=UsersConditions( included_groups=[], @@ -186,7 +186,7 @@ class Test_entra_admin_portals_role_limited_access: ) } - check = entra_admin_portals_role_limited_access() + check = entra_admin_portals_access_restriction() result = check.execute() assert len(result) == 1 assert result[0].status == "FAIL" @@ -212,17 +212,17 @@ class Test_entra_admin_portals_role_limited_access: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_admin_portals_role_limited_access.entra_admin_portals_role_limited_access.entra_client", + "prowler.providers.m365.services.entra.entra_admin_portals_access_restriction.entra_admin_portals_access_restriction.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_admin_portals_role_limited_access.entra_admin_portals_role_limited_access import ( - entra_admin_portals_role_limited_access, + from prowler.providers.m365.services.entra.entra_admin_portals_access_restriction.entra_admin_portals_access_restriction import ( + entra_admin_portals_access_restriction, ) - from prowler.providers.microsoft365.services.entra.entra_service import ( + from prowler.providers.m365.services.entra.entra_service import ( ConditionalAccessPolicy, ) @@ -234,6 +234,7 @@ class Test_entra_admin_portals_role_limited_access: application_conditions=ApplicationsConditions( included_applications=["MicrosoftAdminPortals"], excluded_applications=[], + included_user_actions=[], ), user_conditions=UsersConditions( included_groups=[], @@ -263,7 +264,7 @@ class Test_entra_admin_portals_role_limited_access: ) } - check = entra_admin_portals_role_limited_access() + check = entra_admin_portals_access_restriction() result = check.execute() assert len(result) == 1 assert result[0].status == "PASS" diff --git a/tests/providers/m365/services/entra/entra_admin_users_cloud_only/entra_admin_users_cloud_only_test.py b/tests/providers/m365/services/entra/entra_admin_users_cloud_only/entra_admin_users_cloud_only_test.py new file mode 100644 index 0000000000..3eae3c9517 --- /dev/null +++ b/tests/providers/m365/services/entra/entra_admin_users_cloud_only/entra_admin_users_cloud_only_test.py @@ -0,0 +1,309 @@ +from unittest import mock + +from prowler.providers.m365.services.entra.entra_service import AdminRoles, User +from tests.providers.m365.m365_fixtures import set_mocked_m365_provider + + +class Test_entra_admin_users_cloud_only: + def test_admin_accounts_are_cloud_only(self): + """ + Test when all admin accounts are cloud-only: + The check should PASS because there are no non-cloud-only admin accounts. + """ + entra_client = mock.MagicMock() + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.entra.entra_admin_users_cloud_only.entra_admin_users_cloud_only.entra_client", + new=entra_client, + ), + ): + from prowler.providers.m365.services.entra.entra_admin_users_cloud_only.entra_admin_users_cloud_only import ( + entra_admin_users_cloud_only, + ) + + entra_client.users = { + "user-1": User( + id="user-1", + name="User 1", + directory_roles_ids=[AdminRoles.GLOBAL_ADMINISTRATOR.value], + on_premises_sync_enabled=False, + ), + "user-2": User( + id="user-2", + name="User 2", + directory_roles_ids=[AdminRoles.GLOBAL_ADMINISTRATOR.value], + on_premises_sync_enabled=False, + ), + "user-3": User( + id="user-3", + name="User 3", + directory_roles_ids=[AdminRoles.GLOBAL_ADMINISTRATOR.value], + on_premises_sync_enabled=False, + ), + } + + check = entra_admin_users_cloud_only() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "PASS" + assert result[0].status_extended == ( + "All the users with administrative roles are cloud-only accounts." + ) + assert result[0].resource_id == "cloudOnlyAccount" + assert result[0].location == "global" + assert result[0].resource_name == "Cloud-only account" + assert result[0].resource == {} + + def test_some_admin_accounts_are_not_cloud(self): + """ + Test when some admin accounts are not cloud-only: + The check should FAIL because there are non-cloud-only admin accounts. + """ + entra_client = mock.MagicMock() + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.entra.entra_admin_users_cloud_only.entra_admin_users_cloud_only.entra_client", + new=entra_client, + ), + ): + from prowler.providers.m365.services.entra.entra_admin_users_cloud_only.entra_admin_users_cloud_only import ( + entra_admin_users_cloud_only, + ) + + entra_client.users = { + "user-1": User( + id="user-1", + name="User 1", + directory_roles_ids=[AdminRoles.GLOBAL_ADMINISTRATOR.value], + on_premises_sync_enabled=False, + ), + "user-2": User( + id="user-2", + name="User 2", + directory_roles_ids=[AdminRoles.GLOBAL_ADMINISTRATOR.value], + on_premises_sync_enabled=True, + ), + "user-3": User( + id="user-3", + name="User 3", + directory_roles_ids=[AdminRoles.GLOBAL_ADMINISTRATOR.value], + on_premises_sync_enabled=False, + ), + } + + check = entra_admin_users_cloud_only() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "FAIL" + assert result[0].status_extended == ( + "There are some users with administrative roles that are not cloud-only accounts: user-2" + ) + assert result[0].resource_id == "cloudOnlyAccount" + assert result[0].location == "global" + assert result[0].resource_name == "Cloud-only account" + assert result[0].resource == {} + + def test_all_admin_account_are_not_cloud(self): + """ + Test when all admin accounts are not cloud-only: + The check should FAIL because all admin accounts are non-cloud-only. + """ + entra_client = mock.MagicMock() + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.entra.entra_admin_users_cloud_only.entra_admin_users_cloud_only.entra_client", + new=entra_client, + ), + ): + from prowler.providers.m365.services.entra.entra_admin_users_cloud_only.entra_admin_users_cloud_only import ( + entra_admin_users_cloud_only, + ) + + entra_client.users = { + "user-1": User( + id="user-1", + name="User 1", + directory_roles_ids=[AdminRoles.GLOBAL_ADMINISTRATOR.value], + on_premises_sync_enabled=True, + ), + "user-2": User( + id="user-2", + name="User 2", + directory_roles_ids=[AdminRoles.GLOBAL_ADMINISTRATOR.value], + on_premises_sync_enabled=True, + ), + "user-3": User( + id="user-3", + name="User 3", + directory_roles_ids=[AdminRoles.GLOBAL_ADMINISTRATOR.value], + on_premises_sync_enabled=True, + ), + } + + check = entra_admin_users_cloud_only() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "FAIL" + assert result[0].status_extended == ( + "There are some users with administrative roles that are not cloud-only accounts: user-1, user-2, user-3" + ) + assert result[0].resource_id == "cloudOnlyAccount" + assert result[0].location == "global" + assert result[0].resource_name == "Cloud-only account" + assert result[0].resource == {} + + def test_only_user_accounts_are_not_cloud(self): + """ + Test when only user accounts are not cloud-only: + The check should PASS because there are no non-cloud-only admin accounts. + """ + entra_client = mock.MagicMock() + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.entra.entra_admin_users_cloud_only.entra_admin_users_cloud_only.entra_client", + new=entra_client, + ), + ): + from prowler.providers.m365.services.entra.entra_admin_users_cloud_only.entra_admin_users_cloud_only import ( + entra_admin_users_cloud_only, + ) + + entra_client.users = { + "user-1": User( + id="user-1", + name="User 1", + directory_roles_ids=[AdminRoles.GLOBAL_ADMINISTRATOR.value], + on_premises_sync_enabled=False, + ), + "user-2": User( + id="user-2", + name="User 2", + directory_roles_ids=[AdminRoles.GLOBAL_ADMINISTRATOR.value], + on_premises_sync_enabled=False, + ), + "user-3": User( + id="user-3", + name="User 3", + directory_roles_ids=["user-id-role"], + on_premises_sync_enabled=True, + ), + } + + check = entra_admin_users_cloud_only() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "PASS" + assert result[0].status_extended == ( + "All the users with administrative roles are cloud-only accounts." + ) + assert result[0].resource_id == "cloudOnlyAccount" + assert result[0].location == "global" + assert result[0].resource_name == "Cloud-only account" + assert result[0].resource == {} + + def test_no_admin_accounts(self): + """ + Test when there are no admin accounts: + The check should PASS because there are no non-cloud-only admin accounts. + """ + entra_client = mock.MagicMock() + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.entra.entra_admin_users_cloud_only.entra_admin_users_cloud_only.entra_client", + new=entra_client, + ), + ): + from prowler.providers.m365.services.entra.entra_admin_users_cloud_only.entra_admin_users_cloud_only import ( + entra_admin_users_cloud_only, + ) + + entra_client.users = { + "user-1": User( + id="user-1", + name="User 1", + directory_roles_ids=["user-id-role"], + on_premises_sync_enabled=True, + ), + "user-2": User( + id="user-2", + name="User 2", + directory_roles_ids=["user-id-role"], + on_premises_sync_enabled=False, + ), + "user-3": User( + id="user-3", + name="User 3", + directory_roles_ids=["user-id-role"], + on_premises_sync_enabled=False, + ), + } + + check = entra_admin_users_cloud_only() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "PASS" + assert result[0].status_extended == ( + "All the users with administrative roles are cloud-only accounts." + ) + assert result[0].resource_id == "cloudOnlyAccount" + assert result[0].location == "global" + assert result[0].resource_name == "Cloud-only account" + assert result[0].resource == {} + + def test_no_users(self): + """ + Test when there are no users: + The check should return an empty list of findings. + """ + entra_client = mock.MagicMock() + entra_client.users = {} + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.entra.entra_admin_users_cloud_only.entra_admin_users_cloud_only.entra_client", + new=entra_client, + ), + ): + from prowler.providers.m365.services.entra.entra_admin_users_cloud_only.entra_admin_users_cloud_only import ( + entra_admin_users_cloud_only, + ) + + check = entra_admin_users_cloud_only() + result = check.execute() + + assert len(result) == 0 + assert result == [] diff --git a/tests/providers/microsoft365/services/entra/entra_admin_mfa_enabled_for_administrative_roles/entra_admin_mfa_enabled_for_administrative_roles_test.py b/tests/providers/m365/services/entra/entra_admin_users_mfa_enabled/entra_admin_users_mfa_enabled_test.py similarity index 64% rename from tests/providers/microsoft365/services/entra/entra_admin_mfa_enabled_for_administrative_roles/entra_admin_mfa_enabled_for_administrative_roles_test.py rename to tests/providers/m365/services/entra/entra_admin_users_mfa_enabled/entra_admin_users_mfa_enabled_test.py index ed30be2c7a..b25d48dd2c 100644 --- a/tests/providers/microsoft365/services/entra/entra_admin_mfa_enabled_for_administrative_roles/entra_admin_mfa_enabled_for_administrative_roles_test.py +++ b/tests/providers/m365/services/entra/entra_admin_users_mfa_enabled/entra_admin_users_mfa_enabled_test.py @@ -1,27 +1,24 @@ from unittest import mock from uuid import uuid4 -from prowler.providers.microsoft365.services.entra.entra_service import ( +from prowler.providers.m365.services.entra.entra_service import ( ApplicationsConditions, ConditionalAccessGrantControl, ConditionalAccessPolicy, ConditionalAccessPolicyState, Conditions, - GrantControls, GrantControlOperator, + GrantControls, PersistentBrowser, SessionControls, SignInFrequency, SignInFrequencyInterval, UsersConditions, ) -from tests.providers.microsoft365.microsoft365_fixtures import ( - DOMAIN, - set_mocked_microsoft365_provider, -) +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider -class Test_entra_admin_mfa_enabled_for_administrative_roles: +class Test_entra_admin_users_mfa_enabled: def test_no_conditional_access_policies(self): """No conditional access policies configured: expected FAIL.""" entra_client = mock.MagicMock @@ -31,20 +28,20 @@ class Test_entra_admin_mfa_enabled_for_administrative_roles: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_admin_mfa_enabled_for_administrative_roles.entra_admin_mfa_enabled_for_administrative_roles.entra_client", + "prowler.providers.m365.services.entra.entra_admin_users_mfa_enabled.entra_admin_users_mfa_enabled.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_admin_mfa_enabled_for_administrative_roles.entra_admin_mfa_enabled_for_administrative_roles import ( - entra_admin_mfa_enabled_for_administrative_roles, + from prowler.providers.m365.services.entra.entra_admin_users_mfa_enabled.entra_admin_users_mfa_enabled import ( + entra_admin_users_mfa_enabled, ) entra_client.conditional_access_policies = {} - check = entra_admin_mfa_enabled_for_administrative_roles() + check = entra_admin_users_mfa_enabled() result = check.execute() assert len(result) == 1 @@ -67,15 +64,15 @@ class Test_entra_admin_mfa_enabled_for_administrative_roles: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_admin_mfa_enabled_for_administrative_roles.entra_admin_mfa_enabled_for_administrative_roles.entra_client", + "prowler.providers.m365.services.entra.entra_admin_users_mfa_enabled.entra_admin_users_mfa_enabled.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_admin_mfa_enabled_for_administrative_roles.entra_admin_mfa_enabled_for_administrative_roles import ( - entra_admin_mfa_enabled_for_administrative_roles, + from prowler.providers.m365.services.entra.entra_admin_users_mfa_enabled.entra_admin_users_mfa_enabled import ( + entra_admin_users_mfa_enabled, ) entra_client.conditional_access_policies = { @@ -84,7 +81,9 @@ class Test_entra_admin_mfa_enabled_for_administrative_roles: display_name="Disabled Policy", conditions=Conditions( application_conditions=ApplicationsConditions( - included_applications=["All"], excluded_applications=[] + included_applications=["All"], + excluded_applications=[], + included_user_actions=[], ), user_conditions=UsersConditions( included_groups=[], @@ -114,7 +113,7 @@ class Test_entra_admin_mfa_enabled_for_administrative_roles: ) } - check = entra_admin_mfa_enabled_for_administrative_roles() + check = entra_admin_users_mfa_enabled() result = check.execute() assert len(result) == 1 @@ -141,15 +140,15 @@ class Test_entra_admin_mfa_enabled_for_administrative_roles: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_admin_mfa_enabled_for_administrative_roles.entra_admin_mfa_enabled_for_administrative_roles.entra_client", + "prowler.providers.m365.services.entra.entra_admin_users_mfa_enabled.entra_admin_users_mfa_enabled.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_admin_mfa_enabled_for_administrative_roles.entra_admin_mfa_enabled_for_administrative_roles import ( - entra_admin_mfa_enabled_for_administrative_roles, + from prowler.providers.m365.services.entra.entra_admin_users_mfa_enabled.entra_admin_users_mfa_enabled import ( + entra_admin_users_mfa_enabled, ) entra_client.conditional_access_policies = { @@ -158,7 +157,9 @@ class Test_entra_admin_mfa_enabled_for_administrative_roles: display_name="No Admin Roles Policy", conditions=Conditions( application_conditions=ApplicationsConditions( - included_applications=["All"], excluded_applications=[] + included_applications=["All"], + excluded_applications=[], + included_user_actions=[], ), user_conditions=UsersConditions( included_groups=[], @@ -188,7 +189,7 @@ class Test_entra_admin_mfa_enabled_for_administrative_roles: ) } - check = entra_admin_mfa_enabled_for_administrative_roles() + check = entra_admin_users_mfa_enabled() result = check.execute() assert len(result) == 1 @@ -215,15 +216,15 @@ class Test_entra_admin_mfa_enabled_for_administrative_roles: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_admin_mfa_enabled_for_administrative_roles.entra_admin_mfa_enabled_for_administrative_roles.entra_client", + "prowler.providers.m365.services.entra.entra_admin_users_mfa_enabled.entra_admin_users_mfa_enabled.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_admin_mfa_enabled_for_administrative_roles.entra_admin_mfa_enabled_for_administrative_roles import ( - entra_admin_mfa_enabled_for_administrative_roles, + from prowler.providers.m365.services.entra.entra_admin_users_mfa_enabled.entra_admin_users_mfa_enabled import ( + entra_admin_users_mfa_enabled, ) entra_client.conditional_access_policies = { @@ -234,6 +235,7 @@ class Test_entra_admin_mfa_enabled_for_administrative_roles: application_conditions=ApplicationsConditions( included_applications=["MicrosoftAdminPortals"], excluded_applications=[], + included_user_actions=[], ), user_conditions=UsersConditions( included_groups=[], @@ -263,7 +265,7 @@ class Test_entra_admin_mfa_enabled_for_administrative_roles: ) } - check = entra_admin_mfa_enabled_for_administrative_roles() + check = entra_admin_users_mfa_enabled() result = check.execute() assert len(result) == 1 @@ -295,15 +297,15 @@ class Test_entra_admin_mfa_enabled_for_administrative_roles: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_admin_mfa_enabled_for_administrative_roles.entra_admin_mfa_enabled_for_administrative_roles.entra_client", + "prowler.providers.m365.services.entra.entra_admin_users_mfa_enabled.entra_admin_users_mfa_enabled.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_admin_mfa_enabled_for_administrative_roles.entra_admin_mfa_enabled_for_administrative_roles import ( - entra_admin_mfa_enabled_for_administrative_roles, + from prowler.providers.m365.services.entra.entra_admin_users_mfa_enabled.entra_admin_users_mfa_enabled import ( + entra_admin_users_mfa_enabled, ) entra_client.conditional_access_policies = { @@ -312,7 +314,9 @@ class Test_entra_admin_mfa_enabled_for_administrative_roles: display_name=display_name, conditions=Conditions( application_conditions=ApplicationsConditions( - included_applications=["All"], excluded_applications=[] + included_applications=["All"], + excluded_applications=[], + included_user_actions=[], ), user_conditions=UsersConditions( included_groups=[], @@ -342,7 +346,7 @@ class Test_entra_admin_mfa_enabled_for_administrative_roles: ) } - check = entra_admin_mfa_enabled_for_administrative_roles() + check = entra_admin_users_mfa_enabled() result = check.execute() assert len(result) == 1 @@ -372,15 +376,15 @@ class Test_entra_admin_mfa_enabled_for_administrative_roles: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_admin_mfa_enabled_for_administrative_roles.entra_admin_mfa_enabled_for_administrative_roles.entra_client", + "prowler.providers.m365.services.entra.entra_admin_users_mfa_enabled.entra_admin_users_mfa_enabled.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_admin_mfa_enabled_for_administrative_roles.entra_admin_mfa_enabled_for_administrative_roles import ( - entra_admin_mfa_enabled_for_administrative_roles, + from prowler.providers.m365.services.entra.entra_admin_users_mfa_enabled.entra_admin_users_mfa_enabled import ( + entra_admin_users_mfa_enabled, ) entra_client.conditional_access_policies = { @@ -389,7 +393,9 @@ class Test_entra_admin_mfa_enabled_for_administrative_roles: display_name=display_name, conditions=Conditions( application_conditions=ApplicationsConditions( - included_applications=["All"], excluded_applications=[] + included_applications=["All"], + excluded_applications=[], + included_user_actions=[], ), user_conditions=UsersConditions( included_groups=[], @@ -435,7 +441,7 @@ class Test_entra_admin_mfa_enabled_for_administrative_roles: ) } - check = entra_admin_mfa_enabled_for_administrative_roles() + check = entra_admin_users_mfa_enabled() result = check.execute() assert len(result) == 1 @@ -465,15 +471,15 @@ class Test_entra_admin_mfa_enabled_for_administrative_roles: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_admin_mfa_enabled_for_administrative_roles.entra_admin_mfa_enabled_for_administrative_roles.entra_client", + "prowler.providers.m365.services.entra.entra_admin_users_mfa_enabled.entra_admin_users_mfa_enabled.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_admin_mfa_enabled_for_administrative_roles.entra_admin_mfa_enabled_for_administrative_roles import ( - entra_admin_mfa_enabled_for_administrative_roles, + from prowler.providers.m365.services.entra.entra_admin_users_mfa_enabled.entra_admin_users_mfa_enabled import ( + entra_admin_users_mfa_enabled, ) entra_client.conditional_access_policies = { @@ -482,7 +488,9 @@ class Test_entra_admin_mfa_enabled_for_administrative_roles: display_name=display_name, conditions=Conditions( application_conditions=ApplicationsConditions( - included_applications=["All"], excluded_applications=[] + included_applications=["All"], + excluded_applications=[], + included_user_actions=[], ), user_conditions=UsersConditions( included_groups=[], @@ -527,7 +535,7 @@ class Test_entra_admin_mfa_enabled_for_administrative_roles: ) } - check = entra_admin_mfa_enabled_for_administrative_roles() + check = entra_admin_users_mfa_enabled() result = check.execute() assert len(result) == 1 @@ -537,3 +545,150 @@ class Test_entra_admin_mfa_enabled_for_administrative_roles: assert result[0].resource == {} assert result[0].resource_name == "Conditional Access Policies" assert result[0].resource_id == "conditionalAccessPolicies" + + def test_policy_invalid_and_valid_policy(self): + """ + Valid policy: + - State enabled (ENABLED) + - Applies to administrative roles + - Application conditions include "All" + - MFA is configured in grant_controls + + Expected PASS. + """ + policy_id = str(uuid4()) + policy_id2 = str(uuid4()) + display_name = "Valid MFA Policy" + entra_client = mock.MagicMock + entra_client.audited_tenant = "audited_tenant" + entra_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.entra.entra_admin_users_mfa_enabled.entra_admin_users_mfa_enabled.entra_client", + new=entra_client, + ), + ): + from prowler.providers.m365.services.entra.entra_admin_users_mfa_enabled.entra_admin_users_mfa_enabled import ( + entra_admin_users_mfa_enabled, + ) + + entra_client.conditional_access_policies = { + policy_id: ConditionalAccessPolicy( + id=policy_id, + display_name=display_name, + conditions=Conditions( + application_conditions=ApplicationsConditions( + included_applications=["All"], + excluded_applications=[], + included_user_actions=[], + ), + user_conditions=UsersConditions( + included_groups=[], + excluded_groups=[], + included_users=[], + excluded_users=[], + included_roles=[ + "9b895d92-2cd3-44c7-9d02-a6ac2d5ea5c3", + "c4e39bd9-1100-46d3-8c65-fb160da0071f", + "b0f54661-2d74-4c50-afa3-1ec803f12efe", + "158c047a-c907-4556-b7ef-446551a6b5f7", + "b1be1c3e-b65d-4f19-8427-f6fa0d97feb9", + "29232cdf-9323-42fd-ade2-1d097af3e4de", + "62e90394-69f5-4237-9190-012177145e10", + "f2ef992c-3afb-46b9-b7cf-a126ee74c451", + "729827e3-9c14-49f7-bb1b-9608f156bbb8", + "966707d0-3269-4727-9be2-8c3a10f19b9d", + "7be44c8a-adaf-4e2a-84d6-ab2649e08a13", + "e8611ab8-c189-46e8-94e1-60213ab1f814", + "194ae4cb-b126-40b2-bd5b-6091b380977d", + "f28a1f50-f6e7-4571-818b-6a12f2af6b6c", + "fe930be7-5e62-47db-91af-98c3a49a38b1", + ], + excluded_roles=[], + ), + ), + grant_controls=GrantControls( + built_in_controls=[ConditionalAccessGrantControl.MFA], + operator=GrantControlOperator.AND, + ), + session_controls=SessionControls( + persistent_browser=PersistentBrowser( + is_enabled=False, mode="always" + ), + sign_in_frequency=SignInFrequency( + is_enabled=False, + frequency=None, + type=None, + interval=SignInFrequencyInterval.EVERY_TIME, + ), + ), + state=ConditionalAccessPolicyState.ENABLED_FOR_REPORTING, + ), + policy_id2: ConditionalAccessPolicy( + id=policy_id, + display_name=display_name, + conditions=Conditions( + application_conditions=ApplicationsConditions( + included_applications=["All"], + excluded_applications=[], + included_user_actions=[], + ), + user_conditions=UsersConditions( + included_groups=[], + excluded_groups=[], + included_users=[], + excluded_users=[], + included_roles=[ + "9b895d92-2cd3-44c7-9d02-a6ac2d5ea5c3", + "c4e39bd9-1100-46d3-8c65-fb160da0071f", + "b0f54661-2d74-4c50-afa3-1ec803f12efe", + "158c047a-c907-4556-b7ef-446551a6b5f7", + "b1be1c3e-b65d-4f19-8427-f6fa0d97feb9", + "29232cdf-9323-42fd-ade2-1d097af3e4de", + "62e90394-69f5-4237-9190-012177145e10", + "f2ef992c-3afb-46b9-b7cf-a126ee74c451", + "729827e3-9c14-49f7-bb1b-9608f156bbb8", + "966707d0-3269-4727-9be2-8c3a10f19b9d", + "7be44c8a-adaf-4e2a-84d6-ab2649e08a13", + "e8611ab8-c189-46e8-94e1-60213ab1f814", + "194ae4cb-b126-40b2-bd5b-6091b380977d", + "f28a1f50-f6e7-4571-818b-6a12f2af6b6c", + "fe930be7-5e62-47db-91af-98c3a49a38b1", + ], + excluded_roles=[], + ), + ), + grant_controls=GrantControls( + built_in_controls=[ConditionalAccessGrantControl.MFA], + operator=GrantControlOperator.AND, + ), + session_controls=SessionControls( + persistent_browser=PersistentBrowser( + is_enabled=False, mode="always" + ), + sign_in_frequency=SignInFrequency( + is_enabled=False, + frequency=None, + type=None, + interval=SignInFrequencyInterval.EVERY_TIME, + ), + ), + state=ConditionalAccessPolicyState.ENABLED, + ), + } + + check = entra_admin_users_mfa_enabled() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "PASS" + expected_status_extended = f"Conditional Access Policy '{display_name}' enforces MFA for administrative roles." + assert result[0].status_extended == expected_status_extended + assert result[0].resource == entra_client.conditional_access_policies + assert result[0].resource_name == display_name + assert result[0].resource_id == policy_id diff --git a/tests/providers/m365/services/entra/entra_admin_users_phishing_resistant_mfa_enabled/entra_admin_users_phishing_resistant_mfa_enabled_test.py b/tests/providers/m365/services/entra/entra_admin_users_phishing_resistant_mfa_enabled/entra_admin_users_phishing_resistant_mfa_enabled_test.py new file mode 100644 index 0000000000..aa9ec89bca --- /dev/null +++ b/tests/providers/m365/services/entra/entra_admin_users_phishing_resistant_mfa_enabled/entra_admin_users_phishing_resistant_mfa_enabled_test.py @@ -0,0 +1,335 @@ +from unittest import mock +from uuid import uuid4 + +from prowler.providers.m365.services.entra.entra_service import ( + ApplicationsConditions, + AuthenticationStrength, + ConditionalAccessGrantControl, + ConditionalAccessPolicyState, + Conditions, + GrantControlOperator, + GrantControls, + PersistentBrowser, + SessionControls, + SignInFrequency, + SignInFrequencyInterval, + UsersConditions, +) +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_entra_admin_users_phishing_resistant_mfa_enabled: + def test_entra_no_conditional_access_policies(self): + entra_client = mock.MagicMock + entra_client.audited_tenant = "audited_tenant" + entra_client.audited_domain = DOMAIN + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.entra.entra_admin_users_phishing_resistant_mfa_enabled.entra_admin_users_phishing_resistant_mfa_enabled.entra_client", + new=entra_client, + ), + ): + from prowler.providers.m365.services.entra.entra_admin_users_phishing_resistant_mfa_enabled.entra_admin_users_phishing_resistant_mfa_enabled import ( + entra_admin_users_phishing_resistant_mfa_enabled, + ) + + entra_client.conditional_access_policies = {} + + check = entra_admin_users_phishing_resistant_mfa_enabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "No Conditional Access Policy requires Phishing-resistant MFA strength for admin users." + ) + assert result[0].resource == {} + assert result[0].resource_name == "Conditional Access Policies" + assert result[0].resource_id == "conditionalAccessPolicies" + assert result[0].location == "global" + + def test_entra_phishing_resistant_mfa_strength_disabled(self): + id = str(uuid4()) + display_name = "Test" + entra_client = mock.MagicMock + entra_client.audited_tenant = "audited_tenant" + entra_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.entra.entra_admin_users_phishing_resistant_mfa_enabled.entra_admin_users_phishing_resistant_mfa_enabled.entra_client", + new=entra_client, + ), + ): + from prowler.providers.m365.services.entra.entra_admin_users_phishing_resistant_mfa_enabled.entra_admin_users_phishing_resistant_mfa_enabled import ( + entra_admin_users_phishing_resistant_mfa_enabled, + ) + from prowler.providers.m365.services.entra.entra_service import ( + ConditionalAccessPolicy, + ) + + entra_client.conditional_access_policies = { + id: ConditionalAccessPolicy( + id=id, + display_name=display_name, + conditions=Conditions( + application_conditions=ApplicationsConditions( + included_applications=["All"], + excluded_applications=[], + included_user_actions=[], + ), + user_conditions=UsersConditions( + included_groups=[], + excluded_groups=[], + included_users=["All"], + excluded_users=[], + included_roles=[ + "9b895d92-2cd3-44c7-9d02-a6ac2d5ea5c3", + "c4e39bd9-1100-46d3-8c65-fb160da0071f", + "b0f54661-2d74-4c50-afa3-1ec803f12efe", + "158c047a-c907-4556-b7ef-446551a6b5f7", + "b1be1c3e-b65d-4f19-8427-f6fa0d97feb9", + "29232cdf-9323-42fd-ade2-1d097af3e4de", + "62e90394-69f5-4237-9190-012177145e10", + "f2ef992c-3afb-46b9-b7cf-a126ee74c451", + "729827e3-9c14-49f7-bb1b-9608f156bbb8", + "966707d0-3269-4727-9be2-8c3a10f19b9d", + "7be44c8a-adaf-4e2a-84d6-ab2649e08a13", + "e8611ab8-c189-46e8-94e1-60213ab1f814", + "194ae4cb-b126-40b2-bd5b-6091b380977d", + "f28a1f50-f6e7-4571-818b-6a12f2af6b6c", + "fe930be7-5e62-47db-91af-98c3a49a38b1", + ], + excluded_roles=[], + ), + ), + grant_controls=GrantControls( + built_in_controls=[ConditionalAccessGrantControl.BLOCK], + operator=GrantControlOperator.AND, + authentication_strength=AuthenticationStrength.PHISHING_RESISTANT_MFA, + ), + session_controls=SessionControls( + persistent_browser=PersistentBrowser( + is_enabled=False, mode="always" + ), + sign_in_frequency=SignInFrequency( + is_enabled=False, + frequency=None, + type=None, + interval=SignInFrequencyInterval.EVERY_TIME, + ), + ), + state=ConditionalAccessPolicyState.DISABLED, + ) + } + + check = entra_admin_users_phishing_resistant_mfa_enabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "No Conditional Access Policy requires Phishing-resistant MFA strength for admin users." + ) + assert result[0].resource == {} + assert result[0].resource_name == "Conditional Access Policies" + assert result[0].resource_id == "conditionalAccessPolicies" + assert result[0].location == "global" + + def test_entra_phishing_resistant_mfa_strength_enabled_for_reporting(self): + id = str(uuid4()) + display_name = "Test" + entra_client = mock.MagicMock + entra_client.audited_tenant = "audited_tenant" + entra_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.entra.entra_admin_users_phishing_resistant_mfa_enabled.entra_admin_users_phishing_resistant_mfa_enabled.entra_client", + new=entra_client, + ), + ): + from prowler.providers.m365.services.entra.entra_admin_users_phishing_resistant_mfa_enabled.entra_admin_users_phishing_resistant_mfa_enabled import ( + entra_admin_users_phishing_resistant_mfa_enabled, + ) + from prowler.providers.m365.services.entra.entra_service import ( + ConditionalAccessPolicy, + ) + + entra_client.conditional_access_policies = { + id: ConditionalAccessPolicy( + id=id, + display_name=display_name, + conditions=Conditions( + application_conditions=ApplicationsConditions( + included_applications=["All"], + excluded_applications=[], + included_user_actions=[], + ), + user_conditions=UsersConditions( + included_groups=[], + excluded_groups=[], + included_users=["All"], + excluded_users=[], + included_roles=[ + "9b895d92-2cd3-44c7-9d02-a6ac2d5ea5c3", + "c4e39bd9-1100-46d3-8c65-fb160da0071f", + "b0f54661-2d74-4c50-afa3-1ec803f12efe", + "158c047a-c907-4556-b7ef-446551a6b5f7", + "b1be1c3e-b65d-4f19-8427-f6fa0d97feb9", + "29232cdf-9323-42fd-ade2-1d097af3e4de", + "62e90394-69f5-4237-9190-012177145e10", + "f2ef992c-3afb-46b9-b7cf-a126ee74c451", + "729827e3-9c14-49f7-bb1b-9608f156bbb8", + "966707d0-3269-4727-9be2-8c3a10f19b9d", + "7be44c8a-adaf-4e2a-84d6-ab2649e08a13", + "e8611ab8-c189-46e8-94e1-60213ab1f814", + "194ae4cb-b126-40b2-bd5b-6091b380977d", + "f28a1f50-f6e7-4571-818b-6a12f2af6b6c", + "fe930be7-5e62-47db-91af-98c3a49a38b1", + ], + excluded_roles=[], + ), + ), + grant_controls=GrantControls( + built_in_controls=[ConditionalAccessGrantControl.BLOCK], + operator=GrantControlOperator.AND, + authentication_strength=AuthenticationStrength.PHISHING_RESISTANT_MFA, + ), + session_controls=SessionControls( + persistent_browser=PersistentBrowser( + is_enabled=False, mode="always" + ), + sign_in_frequency=SignInFrequency( + is_enabled=False, + frequency=None, + type=None, + interval=SignInFrequencyInterval.EVERY_TIME, + ), + ), + state=ConditionalAccessPolicyState.ENABLED_FOR_REPORTING, + ) + } + + check = entra_admin_users_phishing_resistant_mfa_enabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == f"Conditional Access Policy '{display_name}' reports Phishing-resistant MFA strength for admin users but does not require it." + ) + assert ( + result[0].resource + == entra_client.conditional_access_policies[id].dict() + ) + assert result[0].resource_name == display_name + assert result[0].resource_id == id + assert result[0].location == "global" + + def test_entra_phishing_resistant_mfa_strength_enabled(self): + id = str(uuid4()) + display_name = "Test" + entra_client = mock.MagicMock + entra_client.audited_tenant = "audited_tenant" + entra_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.entra.entra_admin_users_phishing_resistant_mfa_enabled.entra_admin_users_phishing_resistant_mfa_enabled.entra_client", + new=entra_client, + ), + ): + from prowler.providers.m365.services.entra.entra_admin_users_phishing_resistant_mfa_enabled.entra_admin_users_phishing_resistant_mfa_enabled import ( + entra_admin_users_phishing_resistant_mfa_enabled, + ) + from prowler.providers.m365.services.entra.entra_service import ( + ConditionalAccessPolicy, + ) + + entra_client.conditional_access_policies = { + id: ConditionalAccessPolicy( + id=id, + display_name=display_name, + conditions=Conditions( + application_conditions=ApplicationsConditions( + included_applications=["All"], + excluded_applications=[], + included_user_actions=[], + ), + user_conditions=UsersConditions( + included_groups=[], + excluded_groups=[], + included_users=["All"], + excluded_users=[], + included_roles=[ + "9b895d92-2cd3-44c7-9d02-a6ac2d5ea5c3", + "c4e39bd9-1100-46d3-8c65-fb160da0071f", + "b0f54661-2d74-4c50-afa3-1ec803f12efe", + "158c047a-c907-4556-b7ef-446551a6b5f7", + "b1be1c3e-b65d-4f19-8427-f6fa0d97feb9", + "29232cdf-9323-42fd-ade2-1d097af3e4de", + "62e90394-69f5-4237-9190-012177145e10", + "f2ef992c-3afb-46b9-b7cf-a126ee74c451", + "729827e3-9c14-49f7-bb1b-9608f156bbb8", + "966707d0-3269-4727-9be2-8c3a10f19b9d", + "7be44c8a-adaf-4e2a-84d6-ab2649e08a13", + "e8611ab8-c189-46e8-94e1-60213ab1f814", + "194ae4cb-b126-40b2-bd5b-6091b380977d", + "f28a1f50-f6e7-4571-818b-6a12f2af6b6c", + "fe930be7-5e62-47db-91af-98c3a49a38b1", + ], + excluded_roles=[], + ), + ), + grant_controls=GrantControls( + built_in_controls=[ConditionalAccessGrantControl.BLOCK], + operator=GrantControlOperator.AND, + authentication_strength=AuthenticationStrength.PHISHING_RESISTANT_MFA, + ), + session_controls=SessionControls( + persistent_browser=PersistentBrowser( + is_enabled=False, mode="always" + ), + sign_in_frequency=SignInFrequency( + is_enabled=False, + frequency=None, + type=None, + interval=SignInFrequencyInterval.EVERY_TIME, + ), + ), + state=ConditionalAccessPolicyState.ENABLED, + ) + } + + check = entra_admin_users_phishing_resistant_mfa_enabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == f"Conditional Access Policy '{display_name}' requires Phishing-resistant MFA strength for admin users." + ) + assert ( + result[0].resource + == entra_client.conditional_access_policies[id].dict() + ) + assert result[0].resource_name == display_name + assert result[0].resource_id == id + assert result[0].location == "global" diff --git a/tests/providers/microsoft365/services/entra/entra_admin_users_sign_in_frequency_enabled/entra_admin_users_sign_in_frequency_enabled_test.py b/tests/providers/m365/services/entra/entra_admin_users_sign_in_frequency_enabled/entra_admin_users_sign_in_frequency_enabled_test.py similarity index 85% rename from tests/providers/microsoft365/services/entra/entra_admin_users_sign_in_frequency_enabled/entra_admin_users_sign_in_frequency_enabled_test.py rename to tests/providers/m365/services/entra/entra_admin_users_sign_in_frequency_enabled/entra_admin_users_sign_in_frequency_enabled_test.py index b3458c217d..ecfbf2b771 100644 --- a/tests/providers/microsoft365/services/entra/entra_admin_users_sign_in_frequency_enabled/entra_admin_users_sign_in_frequency_enabled_test.py +++ b/tests/providers/m365/services/entra/entra_admin_users_sign_in_frequency_enabled/entra_admin_users_sign_in_frequency_enabled_test.py @@ -1,7 +1,7 @@ from unittest import mock from uuid import uuid4 -from prowler.providers.microsoft365.services.entra.entra_service import ( +from prowler.providers.m365.services.entra.entra_service import ( ApplicationsConditions, ConditionalAccessPolicyState, Conditions, @@ -14,10 +14,7 @@ from prowler.providers.microsoft365.services.entra.entra_service import ( SignInFrequencyType, UsersConditions, ) -from tests.providers.microsoft365.microsoft365_fixtures import ( - DOMAIN, - set_mocked_microsoft365_provider, -) +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider class Test_entra_admin_users_sign_in_frequency_enabled: @@ -28,14 +25,14 @@ class Test_entra_admin_users_sign_in_frequency_enabled: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_admin_users_sign_in_frequency_enabled.entra_admin_users_sign_in_frequency_enabled.entra_client", + "prowler.providers.m365.services.entra.entra_admin_users_sign_in_frequency_enabled.entra_admin_users_sign_in_frequency_enabled.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_admin_users_sign_in_frequency_enabled.entra_admin_users_sign_in_frequency_enabled import ( + from prowler.providers.m365.services.entra.entra_admin_users_sign_in_frequency_enabled.entra_admin_users_sign_in_frequency_enabled import ( entra_admin_users_sign_in_frequency_enabled, ) @@ -65,17 +62,17 @@ class Test_entra_admin_users_sign_in_frequency_enabled: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_admin_users_sign_in_frequency_enabled.entra_admin_users_sign_in_frequency_enabled.entra_client", + "prowler.providers.m365.services.entra.entra_admin_users_sign_in_frequency_enabled.entra_admin_users_sign_in_frequency_enabled.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_admin_users_sign_in_frequency_enabled.entra_admin_users_sign_in_frequency_enabled import ( + from prowler.providers.m365.services.entra.entra_admin_users_sign_in_frequency_enabled.entra_admin_users_sign_in_frequency_enabled import ( entra_admin_users_sign_in_frequency_enabled, ) - from prowler.providers.microsoft365.services.entra.entra_service import ( + from prowler.providers.m365.services.entra.entra_service import ( ConditionalAccessPolicy, ) @@ -85,7 +82,9 @@ class Test_entra_admin_users_sign_in_frequency_enabled: display_name="Test", conditions=Conditions( application_conditions=ApplicationsConditions( - included_applications=[], excluded_applications=[] + included_applications=[], + excluded_applications=[], + included_user_actions=[], ), user_conditions=UsersConditions( included_groups=[], @@ -138,17 +137,17 @@ class Test_entra_admin_users_sign_in_frequency_enabled: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_admin_users_sign_in_frequency_enabled.entra_admin_users_sign_in_frequency_enabled.entra_client", + "prowler.providers.m365.services.entra.entra_admin_users_sign_in_frequency_enabled.entra_admin_users_sign_in_frequency_enabled.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_admin_users_sign_in_frequency_enabled.entra_admin_users_sign_in_frequency_enabled import ( + from prowler.providers.m365.services.entra.entra_admin_users_sign_in_frequency_enabled.entra_admin_users_sign_in_frequency_enabled import ( entra_admin_users_sign_in_frequency_enabled, ) - from prowler.providers.microsoft365.services.entra.entra_service import ( + from prowler.providers.m365.services.entra.entra_service import ( ConditionalAccessPolicy, ) @@ -159,7 +158,9 @@ class Test_entra_admin_users_sign_in_frequency_enabled: display_name=display_name, conditions=Conditions( application_conditions=ApplicationsConditions( - included_applications=["All"], excluded_applications=[] + included_applications=["All"], + excluded_applications=[], + included_user_actions=[], ), user_conditions=UsersConditions( included_groups=[], @@ -232,17 +233,17 @@ class Test_entra_admin_users_sign_in_frequency_enabled: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_admin_users_sign_in_frequency_enabled.entra_admin_users_sign_in_frequency_enabled.entra_client", + "prowler.providers.m365.services.entra.entra_admin_users_sign_in_frequency_enabled.entra_admin_users_sign_in_frequency_enabled.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_admin_users_sign_in_frequency_enabled.entra_admin_users_sign_in_frequency_enabled import ( + from prowler.providers.m365.services.entra.entra_admin_users_sign_in_frequency_enabled.entra_admin_users_sign_in_frequency_enabled import ( entra_admin_users_sign_in_frequency_enabled, ) - from prowler.providers.microsoft365.services.entra.entra_service import ( + from prowler.providers.m365.services.entra.entra_service import ( ConditionalAccessPolicy, ) @@ -255,7 +256,9 @@ class Test_entra_admin_users_sign_in_frequency_enabled: display_name=display_name, conditions=Conditions( application_conditions=ApplicationsConditions( - included_applications=["All"], excluded_applications=[] + included_applications=["All"], + excluded_applications=[], + included_user_actions=[], ), user_conditions=UsersConditions( included_groups=[], @@ -327,17 +330,17 @@ class Test_entra_admin_users_sign_in_frequency_enabled: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_admin_users_sign_in_frequency_enabled.entra_admin_users_sign_in_frequency_enabled.entra_client", + "prowler.providers.m365.services.entra.entra_admin_users_sign_in_frequency_enabled.entra_admin_users_sign_in_frequency_enabled.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_admin_users_sign_in_frequency_enabled.entra_admin_users_sign_in_frequency_enabled import ( + from prowler.providers.m365.services.entra.entra_admin_users_sign_in_frequency_enabled.entra_admin_users_sign_in_frequency_enabled import ( entra_admin_users_sign_in_frequency_enabled, ) - from prowler.providers.microsoft365.services.entra.entra_service import ( + from prowler.providers.m365.services.entra.entra_service import ( ConditionalAccessPolicy, ) @@ -348,7 +351,9 @@ class Test_entra_admin_users_sign_in_frequency_enabled: display_name=display_name, conditions=Conditions( application_conditions=ApplicationsConditions( - included_applications=["All"], excluded_applications=[] + included_applications=["All"], + excluded_applications=[], + included_user_actions=[], ), user_conditions=UsersConditions( included_groups=[], @@ -420,17 +425,17 @@ class Test_entra_admin_users_sign_in_frequency_enabled: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_admin_users_sign_in_frequency_enabled.entra_admin_users_sign_in_frequency_enabled.entra_client", + "prowler.providers.m365.services.entra.entra_admin_users_sign_in_frequency_enabled.entra_admin_users_sign_in_frequency_enabled.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_admin_users_sign_in_frequency_enabled.entra_admin_users_sign_in_frequency_enabled import ( + from prowler.providers.m365.services.entra.entra_admin_users_sign_in_frequency_enabled.entra_admin_users_sign_in_frequency_enabled import ( entra_admin_users_sign_in_frequency_enabled, ) - from prowler.providers.microsoft365.services.entra.entra_service import ( + from prowler.providers.m365.services.entra.entra_service import ( ConditionalAccessPolicy, ) @@ -441,7 +446,9 @@ class Test_entra_admin_users_sign_in_frequency_enabled: display_name=display_name, conditions=Conditions( application_conditions=ApplicationsConditions( - included_applications=["All"], excluded_applications=[] + included_applications=["All"], + excluded_applications=[], + included_user_actions=[], ), user_conditions=UsersConditions( included_groups=[], @@ -514,17 +521,17 @@ class Test_entra_admin_users_sign_in_frequency_enabled: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_admin_users_sign_in_frequency_enabled.entra_admin_users_sign_in_frequency_enabled.entra_client", + "prowler.providers.m365.services.entra.entra_admin_users_sign_in_frequency_enabled.entra_admin_users_sign_in_frequency_enabled.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_admin_users_sign_in_frequency_enabled.entra_admin_users_sign_in_frequency_enabled import ( + from prowler.providers.m365.services.entra.entra_admin_users_sign_in_frequency_enabled.entra_admin_users_sign_in_frequency_enabled import ( entra_admin_users_sign_in_frequency_enabled, ) - from prowler.providers.microsoft365.services.entra.entra_service import ( + from prowler.providers.m365.services.entra.entra_service import ( ConditionalAccessPolicy, ) @@ -537,7 +544,9 @@ class Test_entra_admin_users_sign_in_frequency_enabled: display_name=display_name, conditions=Conditions( application_conditions=ApplicationsConditions( - included_applications=["All"], excluded_applications=[] + included_applications=["All"], + excluded_applications=[], + included_user_actions=[], ), user_conditions=UsersConditions( included_groups=[], diff --git a/tests/providers/microsoft365/services/entra/entra_dynamic_group_for_guests_created/entra_dynamic_group_for_guests_created_test.py b/tests/providers/m365/services/entra/entra_dynamic_group_for_guests_created/entra_dynamic_group_for_guests_created_test.py similarity index 72% rename from tests/providers/microsoft365/services/entra/entra_dynamic_group_for_guests_created/entra_dynamic_group_for_guests_created_test.py rename to tests/providers/m365/services/entra/entra_dynamic_group_for_guests_created/entra_dynamic_group_for_guests_created_test.py index 4069310f4a..6aa9de8004 100644 --- a/tests/providers/microsoft365/services/entra/entra_dynamic_group_for_guests_created/entra_dynamic_group_for_guests_created_test.py +++ b/tests/providers/m365/services/entra/entra_dynamic_group_for_guests_created/entra_dynamic_group_for_guests_created_test.py @@ -1,9 +1,7 @@ from unittest import mock -from prowler.providers.microsoft365.services.entra.entra_service import Group -from tests.providers.microsoft365.microsoft365_fixtures import ( - set_mocked_microsoft365_provider, -) +from prowler.providers.m365.services.entra.entra_service import Group +from tests.providers.m365.m365_fixtures import set_mocked_m365_provider class Test_entra_dynamic_group_for_guests_created: @@ -18,14 +16,14 @@ class Test_entra_dynamic_group_for_guests_created: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_dynamic_group_for_guests_created.entra_dynamic_group_for_guests_created.entra_client", + "prowler.providers.m365.services.entra.entra_dynamic_group_for_guests_created.entra_dynamic_group_for_guests_created.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_dynamic_group_for_guests_created.entra_dynamic_group_for_guests_created import ( + from prowler.providers.m365.services.entra.entra_dynamic_group_for_guests_created.entra_dynamic_group_for_guests_created import ( entra_dynamic_group_for_guests_created, ) @@ -43,10 +41,10 @@ class Test_entra_dynamic_group_for_guests_created: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_dynamic_group_for_guests_created.entra_dynamic_group_for_guests_created.entra_client", + "prowler.providers.m365.services.entra.entra_dynamic_group_for_guests_created.entra_dynamic_group_for_guests_created.entra_client", new=entra_client, ), ): @@ -59,7 +57,7 @@ class Test_entra_dynamic_group_for_guests_created: ) ] - from prowler.providers.microsoft365.services.entra.entra_dynamic_group_for_guests_created.entra_dynamic_group_for_guests_created import ( + from prowler.providers.m365.services.entra.entra_dynamic_group_for_guests_created.entra_dynamic_group_for_guests_created import ( entra_dynamic_group_for_guests_created, ) @@ -85,10 +83,10 @@ class Test_entra_dynamic_group_for_guests_created: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_dynamic_group_for_guests_created.entra_dynamic_group_for_guests_created.entra_client", + "prowler.providers.m365.services.entra.entra_dynamic_group_for_guests_created.entra_dynamic_group_for_guests_created.entra_client", new=entra_client, ), ): @@ -101,7 +99,7 @@ class Test_entra_dynamic_group_for_guests_created: ) ] - from prowler.providers.microsoft365.services.entra.entra_dynamic_group_for_guests_created.entra_dynamic_group_for_guests_created import ( + from prowler.providers.m365.services.entra.entra_dynamic_group_for_guests_created.entra_dynamic_group_for_guests_created import ( entra_dynamic_group_for_guests_created, ) diff --git a/tests/providers/microsoft365/services/entra/entra_identity_protection_sign_in_risk_enabled/entra_identity_protection_sign_in_risk_enabled_test.py b/tests/providers/m365/services/entra/entra_identity_protection_sign_in_risk_enabled/entra_identity_protection_sign_in_risk_enabled_test.py similarity index 84% rename from tests/providers/microsoft365/services/entra/entra_identity_protection_sign_in_risk_enabled/entra_identity_protection_sign_in_risk_enabled_test.py rename to tests/providers/m365/services/entra/entra_identity_protection_sign_in_risk_enabled/entra_identity_protection_sign_in_risk_enabled_test.py index fd6ff82a91..2bd84694ea 100644 --- a/tests/providers/microsoft365/services/entra/entra_identity_protection_sign_in_risk_enabled/entra_identity_protection_sign_in_risk_enabled_test.py +++ b/tests/providers/m365/services/entra/entra_identity_protection_sign_in_risk_enabled/entra_identity_protection_sign_in_risk_enabled_test.py @@ -1,7 +1,7 @@ from unittest import mock from uuid import uuid4 -from prowler.providers.microsoft365.services.entra.entra_service import ( +from prowler.providers.m365.services.entra.entra_service import ( ApplicationsConditions, ConditionalAccessGrantControl, ConditionalAccessPolicyState, @@ -15,10 +15,7 @@ from prowler.providers.microsoft365.services.entra.entra_service import ( SignInFrequencyInterval, UsersConditions, ) -from tests.providers.microsoft365.microsoft365_fixtures import ( - DOMAIN, - set_mocked_microsoft365_provider, -) +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider class Test_entra_identity_protection_sign_in_risk_enabled: @@ -29,14 +26,14 @@ class Test_entra_identity_protection_sign_in_risk_enabled: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_identity_protection_sign_in_risk_enabled.entra_identity_protection_sign_in_risk_enabled.entra_client", + "prowler.providers.m365.services.entra.entra_identity_protection_sign_in_risk_enabled.entra_identity_protection_sign_in_risk_enabled.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_identity_protection_sign_in_risk_enabled.entra_identity_protection_sign_in_risk_enabled import ( + from prowler.providers.m365.services.entra.entra_identity_protection_sign_in_risk_enabled.entra_identity_protection_sign_in_risk_enabled import ( entra_identity_protection_sign_in_risk_enabled, ) @@ -64,17 +61,17 @@ class Test_entra_identity_protection_sign_in_risk_enabled: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_identity_protection_sign_in_risk_enabled.entra_identity_protection_sign_in_risk_enabled.entra_client", + "prowler.providers.m365.services.entra.entra_identity_protection_sign_in_risk_enabled.entra_identity_protection_sign_in_risk_enabled.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_identity_protection_sign_in_risk_enabled.entra_identity_protection_sign_in_risk_enabled import ( + from prowler.providers.m365.services.entra.entra_identity_protection_sign_in_risk_enabled.entra_identity_protection_sign_in_risk_enabled import ( entra_identity_protection_sign_in_risk_enabled, ) - from prowler.providers.microsoft365.services.entra.entra_service import ( + from prowler.providers.m365.services.entra.entra_service import ( ConditionalAccessPolicy, ) @@ -84,7 +81,9 @@ class Test_entra_identity_protection_sign_in_risk_enabled: display_name="Test", conditions=Conditions( application_conditions=ApplicationsConditions( - included_applications=[], excluded_applications=[] + included_applications=[], + excluded_applications=[], + included_user_actions=[], ), user_conditions=UsersConditions( included_groups=[], @@ -138,17 +137,17 @@ class Test_entra_identity_protection_sign_in_risk_enabled: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_identity_protection_sign_in_risk_enabled.entra_identity_protection_sign_in_risk_enabled.entra_client", + "prowler.providers.m365.services.entra.entra_identity_protection_sign_in_risk_enabled.entra_identity_protection_sign_in_risk_enabled.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_identity_protection_sign_in_risk_enabled.entra_identity_protection_sign_in_risk_enabled import ( + from prowler.providers.m365.services.entra.entra_identity_protection_sign_in_risk_enabled.entra_identity_protection_sign_in_risk_enabled import ( entra_identity_protection_sign_in_risk_enabled, ) - from prowler.providers.microsoft365.services.entra.entra_service import ( + from prowler.providers.m365.services.entra.entra_service import ( ConditionalAccessPolicy, ) @@ -160,6 +159,7 @@ class Test_entra_identity_protection_sign_in_risk_enabled: application_conditions=ApplicationsConditions( included_applications=["All"], excluded_applications=[], + included_user_actions=[], ), user_conditions=UsersConditions( included_groups=[], @@ -220,17 +220,17 @@ class Test_entra_identity_protection_sign_in_risk_enabled: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_identity_protection_sign_in_risk_enabled.entra_identity_protection_sign_in_risk_enabled.entra_client", + "prowler.providers.m365.services.entra.entra_identity_protection_sign_in_risk_enabled.entra_identity_protection_sign_in_risk_enabled.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_identity_protection_sign_in_risk_enabled.entra_identity_protection_sign_in_risk_enabled import ( + from prowler.providers.m365.services.entra.entra_identity_protection_sign_in_risk_enabled.entra_identity_protection_sign_in_risk_enabled import ( entra_identity_protection_sign_in_risk_enabled, ) - from prowler.providers.microsoft365.services.entra.entra_service import ( + from prowler.providers.m365.services.entra.entra_service import ( ConditionalAccessPolicy, ) @@ -242,6 +242,7 @@ class Test_entra_identity_protection_sign_in_risk_enabled: application_conditions=ApplicationsConditions( included_applications=["All"], excluded_applications=[], + included_user_actions=[], ), user_conditions=UsersConditions( included_groups=[], @@ -302,17 +303,17 @@ class Test_entra_identity_protection_sign_in_risk_enabled: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_identity_protection_sign_in_risk_enabled.entra_identity_protection_sign_in_risk_enabled.entra_client", + "prowler.providers.m365.services.entra.entra_identity_protection_sign_in_risk_enabled.entra_identity_protection_sign_in_risk_enabled.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_identity_protection_sign_in_risk_enabled.entra_identity_protection_sign_in_risk_enabled import ( + from prowler.providers.m365.services.entra.entra_identity_protection_sign_in_risk_enabled.entra_identity_protection_sign_in_risk_enabled import ( entra_identity_protection_sign_in_risk_enabled, ) - from prowler.providers.microsoft365.services.entra.entra_service import ( + from prowler.providers.m365.services.entra.entra_service import ( ConditionalAccessPolicy, ) @@ -324,6 +325,7 @@ class Test_entra_identity_protection_sign_in_risk_enabled: application_conditions=ApplicationsConditions( included_applications=["All"], excluded_applications=[], + included_user_actions=[], ), user_conditions=UsersConditions( included_groups=[], diff --git a/tests/providers/microsoft365/services/entra/entra_identity_protection_user_risk_enabled/entra_identity_protection_user_risk_enabled_test.py b/tests/providers/m365/services/entra/entra_identity_protection_user_risk_enabled/entra_identity_protection_user_risk_enabled_test.py similarity index 84% rename from tests/providers/microsoft365/services/entra/entra_identity_protection_user_risk_enabled/entra_identity_protection_user_risk_enabled_test.py rename to tests/providers/m365/services/entra/entra_identity_protection_user_risk_enabled/entra_identity_protection_user_risk_enabled_test.py index e1f7626701..b251199af6 100644 --- a/tests/providers/microsoft365/services/entra/entra_identity_protection_user_risk_enabled/entra_identity_protection_user_risk_enabled_test.py +++ b/tests/providers/m365/services/entra/entra_identity_protection_user_risk_enabled/entra_identity_protection_user_risk_enabled_test.py @@ -1,7 +1,7 @@ from unittest import mock from uuid import uuid4 -from prowler.providers.microsoft365.services.entra.entra_service import ( +from prowler.providers.m365.services.entra.entra_service import ( ApplicationsConditions, ConditionalAccessGrantControl, ConditionalAccessPolicyState, @@ -15,10 +15,7 @@ from prowler.providers.microsoft365.services.entra.entra_service import ( SignInFrequencyInterval, UsersConditions, ) -from tests.providers.microsoft365.microsoft365_fixtures import ( - DOMAIN, - set_mocked_microsoft365_provider, -) +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider class Test_entra_identity_protection_user_risk_enabled: @@ -29,14 +26,14 @@ class Test_entra_identity_protection_user_risk_enabled: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_identity_protection_user_risk_enabled.entra_identity_protection_user_risk_enabled.entra_client", + "prowler.providers.m365.services.entra.entra_identity_protection_user_risk_enabled.entra_identity_protection_user_risk_enabled.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_identity_protection_user_risk_enabled.entra_identity_protection_user_risk_enabled import ( + from prowler.providers.m365.services.entra.entra_identity_protection_user_risk_enabled.entra_identity_protection_user_risk_enabled import ( entra_identity_protection_user_risk_enabled, ) @@ -64,17 +61,17 @@ class Test_entra_identity_protection_user_risk_enabled: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_identity_protection_user_risk_enabled.entra_identity_protection_user_risk_enabled.entra_client", + "prowler.providers.m365.services.entra.entra_identity_protection_user_risk_enabled.entra_identity_protection_user_risk_enabled.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_identity_protection_user_risk_enabled.entra_identity_protection_user_risk_enabled import ( + from prowler.providers.m365.services.entra.entra_identity_protection_user_risk_enabled.entra_identity_protection_user_risk_enabled import ( entra_identity_protection_user_risk_enabled, ) - from prowler.providers.microsoft365.services.entra.entra_service import ( + from prowler.providers.m365.services.entra.entra_service import ( ConditionalAccessPolicy, ) @@ -84,7 +81,9 @@ class Test_entra_identity_protection_user_risk_enabled: display_name="Test", conditions=Conditions( application_conditions=ApplicationsConditions( - included_applications=[], excluded_applications=[] + included_applications=[], + excluded_applications=[], + included_user_actions=[], ), user_conditions=UsersConditions( included_groups=[], @@ -137,17 +136,17 @@ class Test_entra_identity_protection_user_risk_enabled: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_identity_protection_user_risk_enabled.entra_identity_protection_user_risk_enabled.entra_client", + "prowler.providers.m365.services.entra.entra_identity_protection_user_risk_enabled.entra_identity_protection_user_risk_enabled.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_identity_protection_user_risk_enabled.entra_identity_protection_user_risk_enabled import ( + from prowler.providers.m365.services.entra.entra_identity_protection_user_risk_enabled.entra_identity_protection_user_risk_enabled import ( entra_identity_protection_user_risk_enabled, ) - from prowler.providers.microsoft365.services.entra.entra_service import ( + from prowler.providers.m365.services.entra.entra_service import ( ConditionalAccessPolicy, ) @@ -159,6 +158,7 @@ class Test_entra_identity_protection_user_risk_enabled: application_conditions=ApplicationsConditions( included_applications=["All"], excluded_applications=[], + included_user_actions=[], ), user_conditions=UsersConditions( included_groups=[], @@ -218,17 +218,17 @@ class Test_entra_identity_protection_user_risk_enabled: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_identity_protection_user_risk_enabled.entra_identity_protection_user_risk_enabled.entra_client", + "prowler.providers.m365.services.entra.entra_identity_protection_user_risk_enabled.entra_identity_protection_user_risk_enabled.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_identity_protection_user_risk_enabled.entra_identity_protection_user_risk_enabled import ( + from prowler.providers.m365.services.entra.entra_identity_protection_user_risk_enabled.entra_identity_protection_user_risk_enabled import ( entra_identity_protection_user_risk_enabled, ) - from prowler.providers.microsoft365.services.entra.entra_service import ( + from prowler.providers.m365.services.entra.entra_service import ( ConditionalAccessPolicy, ) @@ -240,6 +240,7 @@ class Test_entra_identity_protection_user_risk_enabled: application_conditions=ApplicationsConditions( included_applications=["All"], excluded_applications=[], + included_user_actions=[], ), user_conditions=UsersConditions( included_groups=[], @@ -299,17 +300,17 @@ class Test_entra_identity_protection_user_risk_enabled: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_identity_protection_user_risk_enabled.entra_identity_protection_user_risk_enabled.entra_client", + "prowler.providers.m365.services.entra.entra_identity_protection_user_risk_enabled.entra_identity_protection_user_risk_enabled.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_identity_protection_user_risk_enabled.entra_identity_protection_user_risk_enabled import ( + from prowler.providers.m365.services.entra.entra_identity_protection_user_risk_enabled.entra_identity_protection_user_risk_enabled import ( entra_identity_protection_user_risk_enabled, ) - from prowler.providers.microsoft365.services.entra.entra_service import ( + from prowler.providers.m365.services.entra.entra_service import ( ConditionalAccessPolicy, ) @@ -321,6 +322,7 @@ class Test_entra_identity_protection_user_risk_enabled: application_conditions=ApplicationsConditions( included_applications=["All"], excluded_applications=[], + included_user_actions=[], ), user_conditions=UsersConditions( included_groups=[], diff --git a/tests/providers/m365/services/entra/entra_legacy_authentication_blocked/entra_legacy_authentication_blocked_test.py b/tests/providers/m365/services/entra/entra_legacy_authentication_blocked/entra_legacy_authentication_blocked_test.py new file mode 100644 index 0000000000..b3b1a38550 --- /dev/null +++ b/tests/providers/m365/services/entra/entra_legacy_authentication_blocked/entra_legacy_authentication_blocked_test.py @@ -0,0 +1,305 @@ +from unittest import mock +from uuid import uuid4 + +from prowler.providers.m365.services.entra.entra_service import ( + ApplicationsConditions, + ClientAppType, + ConditionalAccessGrantControl, + ConditionalAccessPolicyState, + Conditions, + GrantControlOperator, + GrantControls, + PersistentBrowser, + SessionControls, + SignInFrequency, + SignInFrequencyInterval, + UsersConditions, +) +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_entra_legacy_authentication_blocked: + def test_entra_no_conditional_access_policies(self): + entra_client = mock.MagicMock + entra_client.audited_tenant = "audited_tenant" + entra_client.audited_domain = DOMAIN + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.entra.entra_legacy_authentication_blocked.entra_legacy_authentication_blocked.entra_client", + new=entra_client, + ), + ): + from prowler.providers.m365.services.entra.entra_legacy_authentication_blocked.entra_legacy_authentication_blocked import ( + entra_legacy_authentication_blocked, + ) + + entra_client.conditional_access_policies = {} + + check = entra_legacy_authentication_blocked() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "No Conditional Access Policy blocks legacy authentication." + ) + assert result[0].resource == {} + assert result[0].resource_name == "Conditional Access Policies" + assert result[0].resource_id == "conditionalAccessPolicies" + assert result[0].location == "global" + + def test_entra_block_legacy_authentication_disabled(self): + id = str(uuid4()) + display_name = "Test" + entra_client = mock.MagicMock + entra_client.audited_tenant = "audited_tenant" + entra_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.entra.entra_legacy_authentication_blocked.entra_legacy_authentication_blocked.entra_client", + new=entra_client, + ), + ): + from prowler.providers.m365.services.entra.entra_legacy_authentication_blocked.entra_legacy_authentication_blocked import ( + entra_legacy_authentication_blocked, + ) + from prowler.providers.m365.services.entra.entra_service import ( + ConditionalAccessPolicy, + ) + + entra_client.conditional_access_policies = { + id: ConditionalAccessPolicy( + id=id, + display_name=display_name, + conditions=Conditions( + application_conditions=ApplicationsConditions( + included_applications=["All"], + excluded_applications=[], + included_user_actions=[], + ), + user_conditions=UsersConditions( + included_groups=[], + excluded_groups=[], + included_users=["All"], + excluded_users=[], + included_roles=[], + excluded_roles=[], + ), + client_app_types=[ + ClientAppType.EXCHANGE_ACTIVE_SYNC, + ClientAppType.OTHER_CLIENTS, + ], + user_risk_levels=[], + ), + grant_controls=GrantControls( + built_in_controls=[ + ConditionalAccessGrantControl.BLOCK, + ], + operator=GrantControlOperator.AND, + ), + session_controls=SessionControls( + persistent_browser=PersistentBrowser( + is_enabled=False, mode="always" + ), + sign_in_frequency=SignInFrequency( + is_enabled=False, + frequency=None, + type=None, + interval=SignInFrequencyInterval.EVERY_TIME, + ), + ), + state=ConditionalAccessPolicyState.DISABLED, + ) + } + + check = entra_legacy_authentication_blocked() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "No Conditional Access Policy blocks legacy authentication." + ) + assert result[0].resource == {} + assert result[0].resource_name == "Conditional Access Policies" + assert result[0].resource_id == "conditionalAccessPolicies" + assert result[0].location == "global" + + def test_entra_block_legacy_authentication_enabled_for_reporting(self): + id = str(uuid4()) + display_name = "Test" + entra_client = mock.MagicMock + entra_client.audited_tenant = "audited_tenant" + entra_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.entra.entra_legacy_authentication_blocked.entra_legacy_authentication_blocked.entra_client", + new=entra_client, + ), + ): + from prowler.providers.m365.services.entra.entra_legacy_authentication_blocked.entra_legacy_authentication_blocked import ( + entra_legacy_authentication_blocked, + ) + from prowler.providers.m365.services.entra.entra_service import ( + ConditionalAccessPolicy, + ) + + entra_client.conditional_access_policies = { + id: ConditionalAccessPolicy( + id=id, + display_name=display_name, + conditions=Conditions( + application_conditions=ApplicationsConditions( + included_applications=["All"], + excluded_applications=[], + included_user_actions=[], + ), + user_conditions=UsersConditions( + included_groups=[], + excluded_groups=[], + included_users=["All"], + excluded_users=[], + included_roles=[], + excluded_roles=[], + ), + client_app_types=[ + ClientAppType.EXCHANGE_ACTIVE_SYNC, + ClientAppType.OTHER_CLIENTS, + ], + user_risk_levels=[], + ), + grant_controls=GrantControls( + built_in_controls=[ + ConditionalAccessGrantControl.BLOCK, + ], + operator=GrantControlOperator.AND, + ), + session_controls=SessionControls( + persistent_browser=PersistentBrowser( + is_enabled=False, mode="always" + ), + sign_in_frequency=SignInFrequency( + is_enabled=False, + frequency=None, + type=None, + interval=SignInFrequencyInterval.EVERY_TIME, + ), + ), + state=ConditionalAccessPolicyState.ENABLED_FOR_REPORTING, + ) + } + + check = entra_legacy_authentication_blocked() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == f"Conditional Access Policy '{display_name}' reports legacy authentication but does not block it." + ) + assert ( + result[0].resource + == entra_client.conditional_access_policies[id].dict() + ) + assert result[0].resource_name == display_name + assert result[0].resource_id == id + assert result[0].location == "global" + + def test_entra_block_legacy_authentication_enabled(self): + id = str(uuid4()) + display_name = "Test" + entra_client = mock.MagicMock + entra_client.audited_tenant = "audited_tenant" + entra_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.entra.entra_legacy_authentication_blocked.entra_legacy_authentication_blocked.entra_client", + new=entra_client, + ), + ): + from prowler.providers.m365.services.entra.entra_legacy_authentication_blocked.entra_legacy_authentication_blocked import ( + entra_legacy_authentication_blocked, + ) + from prowler.providers.m365.services.entra.entra_service import ( + ConditionalAccessPolicy, + ) + + entra_client.conditional_access_policies = { + id: ConditionalAccessPolicy( + id=id, + display_name=display_name, + conditions=Conditions( + application_conditions=ApplicationsConditions( + included_applications=["All"], + excluded_applications=[], + included_user_actions=[], + ), + user_conditions=UsersConditions( + included_groups=[], + excluded_groups=[], + included_users=["All"], + excluded_users=[], + included_roles=[], + excluded_roles=[], + ), + client_app_types=[ + ClientAppType.EXCHANGE_ACTIVE_SYNC, + ClientAppType.OTHER_CLIENTS, + ], + user_risk_levels=[], + ), + grant_controls=GrantControls( + built_in_controls=[ + ConditionalAccessGrantControl.BLOCK, + ], + operator=GrantControlOperator.AND, + ), + session_controls=SessionControls( + persistent_browser=PersistentBrowser( + is_enabled=False, mode="always" + ), + sign_in_frequency=SignInFrequency( + is_enabled=False, + frequency=None, + type=None, + interval=SignInFrequencyInterval.EVERY_TIME, + ), + ), + state=ConditionalAccessPolicyState.ENABLED, + ) + } + + check = entra_legacy_authentication_blocked() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == f"Conditional Access Policy '{display_name}' blocks legacy authentication." + ) + assert ( + result[0].resource + == entra_client.conditional_access_policies[id].dict() + ) + assert result[0].resource_name == display_name + assert result[0].resource_id == id + assert result[0].location == "global" diff --git a/tests/providers/microsoft365/services/entra/entra_managed_device_required_for_authentication/entra_managed_device_required_for_authentication_test.py b/tests/providers/m365/services/entra/entra_managed_device_required_for_authentication/entra_managed_device_required_for_authentication_test.py similarity index 82% rename from tests/providers/microsoft365/services/entra/entra_managed_device_required_for_authentication/entra_managed_device_required_for_authentication_test.py rename to tests/providers/m365/services/entra/entra_managed_device_required_for_authentication/entra_managed_device_required_for_authentication_test.py index 18fa79199b..4f58579208 100644 --- a/tests/providers/microsoft365/services/entra/entra_managed_device_required_for_authentication/entra_managed_device_required_for_authentication_test.py +++ b/tests/providers/m365/services/entra/entra_managed_device_required_for_authentication/entra_managed_device_required_for_authentication_test.py @@ -1,7 +1,7 @@ from unittest import mock from uuid import uuid4 -from prowler.providers.microsoft365.services.entra.entra_service import ( +from prowler.providers.m365.services.entra.entra_service import ( ApplicationsConditions, ConditionalAccessGrantControl, ConditionalAccessPolicyState, @@ -14,10 +14,7 @@ from prowler.providers.microsoft365.services.entra.entra_service import ( SignInFrequencyInterval, UsersConditions, ) -from tests.providers.microsoft365.microsoft365_fixtures import ( - DOMAIN, - set_mocked_microsoft365_provider, -) +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider class Test_entra_managed_device_required_for_authentication: @@ -28,14 +25,14 @@ class Test_entra_managed_device_required_for_authentication: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_managed_device_required_for_authentication.entra_managed_device_required_for_authentication.entra_client", + "prowler.providers.m365.services.entra.entra_managed_device_required_for_authentication.entra_managed_device_required_for_authentication.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_managed_device_required_for_authentication.entra_managed_device_required_for_authentication import ( + from prowler.providers.m365.services.entra.entra_managed_device_required_for_authentication.entra_managed_device_required_for_authentication import ( entra_managed_device_required_for_authentication, ) @@ -63,17 +60,17 @@ class Test_entra_managed_device_required_for_authentication: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_managed_device_required_for_authentication.entra_managed_device_required_for_authentication.entra_client", + "prowler.providers.m365.services.entra.entra_managed_device_required_for_authentication.entra_managed_device_required_for_authentication.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_managed_device_required_for_authentication.entra_managed_device_required_for_authentication import ( + from prowler.providers.m365.services.entra.entra_managed_device_required_for_authentication.entra_managed_device_required_for_authentication import ( entra_managed_device_required_for_authentication, ) - from prowler.providers.microsoft365.services.entra.entra_service import ( + from prowler.providers.m365.services.entra.entra_service import ( ConditionalAccessPolicy, ) @@ -83,7 +80,9 @@ class Test_entra_managed_device_required_for_authentication: display_name="Test", conditions=Conditions( application_conditions=ApplicationsConditions( - included_applications=[], excluded_applications=[] + included_applications=[], + excluded_applications=[], + included_user_actions=[], ), user_conditions=UsersConditions( included_groups=[], @@ -135,17 +134,17 @@ class Test_entra_managed_device_required_for_authentication: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_managed_device_required_for_authentication.entra_managed_device_required_for_authentication.entra_client", + "prowler.providers.m365.services.entra.entra_managed_device_required_for_authentication.entra_managed_device_required_for_authentication.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_managed_device_required_for_authentication.entra_managed_device_required_for_authentication import ( + from prowler.providers.m365.services.entra.entra_managed_device_required_for_authentication.entra_managed_device_required_for_authentication import ( entra_managed_device_required_for_authentication, ) - from prowler.providers.microsoft365.services.entra.entra_service import ( + from prowler.providers.m365.services.entra.entra_service import ( ConditionalAccessPolicy, ) @@ -157,6 +156,7 @@ class Test_entra_managed_device_required_for_authentication: application_conditions=ApplicationsConditions( included_applications=["All"], excluded_applications=[], + included_user_actions=[], ), user_conditions=UsersConditions( included_groups=[], @@ -216,17 +216,17 @@ class Test_entra_managed_device_required_for_authentication: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_managed_device_required_for_authentication.entra_managed_device_required_for_authentication.entra_client", + "prowler.providers.m365.services.entra.entra_managed_device_required_for_authentication.entra_managed_device_required_for_authentication.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_managed_device_required_for_authentication.entra_managed_device_required_for_authentication import ( + from prowler.providers.m365.services.entra.entra_managed_device_required_for_authentication.entra_managed_device_required_for_authentication import ( entra_managed_device_required_for_authentication, ) - from prowler.providers.microsoft365.services.entra.entra_service import ( + from prowler.providers.m365.services.entra.entra_service import ( ConditionalAccessPolicy, ) @@ -238,6 +238,7 @@ class Test_entra_managed_device_required_for_authentication: application_conditions=ApplicationsConditions( included_applications=["All"], excluded_applications=[], + included_user_actions=[], ), user_conditions=UsersConditions( included_groups=[], diff --git a/tests/providers/m365/services/entra/entra_managed_device_required_for_mfa_registration/entra_managed_device_required_for_mfa_registration_test.py b/tests/providers/m365/services/entra/entra_managed_device_required_for_mfa_registration/entra_managed_device_required_for_mfa_registration_test.py new file mode 100644 index 0000000000..a127e9859b --- /dev/null +++ b/tests/providers/m365/services/entra/entra_managed_device_required_for_mfa_registration/entra_managed_device_required_for_mfa_registration_test.py @@ -0,0 +1,290 @@ +from unittest import mock +from uuid import uuid4 + +from prowler.providers.m365.services.entra.entra_service import ( + ApplicationsConditions, + ConditionalAccessGrantControl, + ConditionalAccessPolicyState, + Conditions, + GrantControlOperator, + GrantControls, + PersistentBrowser, + SessionControls, + SignInFrequency, + SignInFrequencyInterval, + UserAction, + UsersConditions, +) +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_entra_managed_device_required_for_mfa_registration: + def test_entra_no_conditional_access_policies(self): + entra_client = mock.MagicMock + entra_client.audited_tenant = "audited_tenant" + entra_client.audited_domain = DOMAIN + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.entra.entra_managed_device_required_for_mfa_registration.entra_managed_device_required_for_mfa_registration.entra_client", + new=entra_client, + ), + ): + from prowler.providers.m365.services.entra.entra_managed_device_required_for_mfa_registration.entra_managed_device_required_for_mfa_registration import ( + entra_managed_device_required_for_mfa_registration, + ) + + entra_client.conditional_access_policies = {} + + check = entra_managed_device_required_for_mfa_registration() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "No Conditional Access Policy requires a managed device for MFA registration." + ) + assert result[0].resource == {} + assert result[0].resource_name == "Conditional Access Policies" + assert result[0].resource_id == "conditionalAccessPolicies" + assert result[0].location == "global" + + def test_entra_managed_device_disabled(self): + id = str(uuid4()) + entra_client = mock.MagicMock + entra_client.audited_tenant = "audited_tenant" + entra_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.entra.entra_managed_device_required_for_mfa_registration.entra_managed_device_required_for_mfa_registration.entra_client", + new=entra_client, + ), + ): + from prowler.providers.m365.services.entra.entra_managed_device_required_for_mfa_registration.entra_managed_device_required_for_mfa_registration import ( + entra_managed_device_required_for_mfa_registration, + ) + from prowler.providers.m365.services.entra.entra_service import ( + ConditionalAccessPolicy, + ) + + entra_client.conditional_access_policies = { + id: ConditionalAccessPolicy( + id=id, + display_name="Test", + conditions=Conditions( + application_conditions=ApplicationsConditions( + included_applications=[], + excluded_applications=[], + included_user_actions=[], + ), + user_conditions=UsersConditions( + included_groups=[], + excluded_groups=[], + included_users=[], + excluded_users=[], + included_roles=[], + excluded_roles=[], + ), + ), + grant_controls=GrantControls( + built_in_controls=[], operator=GrantControlOperator.OR + ), + session_controls=SessionControls( + persistent_browser=PersistentBrowser( + is_enabled=False, mode="always" + ), + sign_in_frequency=SignInFrequency( + is_enabled=False, + frequency=None, + type=None, + interval=SignInFrequencyInterval.TIME_BASED, + ), + ), + state=ConditionalAccessPolicyState.DISABLED, + ) + } + + check = entra_managed_device_required_for_mfa_registration() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "No Conditional Access Policy requires a managed device for MFA registration." + ) + assert result[0].resource == {} + assert result[0].resource_name == "Conditional Access Policies" + assert result[0].resource_id == "conditionalAccessPolicies" + assert result[0].location == "global" + + def test_entra_managed_device_enabled_for_reporting(self): + id = str(uuid4()) + display_name = "Test" + entra_client = mock.MagicMock + entra_client.audited_tenant = "audited_tenant" + entra_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.entra.entra_managed_device_required_for_mfa_registration.entra_managed_device_required_for_mfa_registration.entra_client", + new=entra_client, + ), + ): + from prowler.providers.m365.services.entra.entra_managed_device_required_for_mfa_registration.entra_managed_device_required_for_mfa_registration import ( + entra_managed_device_required_for_mfa_registration, + ) + from prowler.providers.m365.services.entra.entra_service import ( + ConditionalAccessPolicy, + ) + + entra_client.conditional_access_policies = { + id: ConditionalAccessPolicy( + id=id, + display_name=display_name, + conditions=Conditions( + application_conditions=ApplicationsConditions( + included_applications=["All"], + excluded_applications=[], + included_user_actions=[UserAction.REGISTER_SECURITY_INFO], + ), + user_conditions=UsersConditions( + included_groups=[], + excluded_groups=[], + included_users=["All"], + excluded_users=[], + included_roles=[], + excluded_roles=[], + ), + ), + grant_controls=GrantControls( + built_in_controls=[ + ConditionalAccessGrantControl.MFA, + ConditionalAccessGrantControl.DOMAIN_JOINED_DEVICE, + ], + operator=GrantControlOperator.OR, + ), + session_controls=SessionControls( + persistent_browser=PersistentBrowser( + is_enabled=False, mode="always" + ), + sign_in_frequency=SignInFrequency( + is_enabled=False, + frequency=None, + type=None, + interval=SignInFrequencyInterval.TIME_BASED, + ), + ), + state=ConditionalAccessPolicyState.ENABLED_FOR_REPORTING, + ) + } + + check = entra_managed_device_required_for_mfa_registration() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == f"Conditional Access Policy '{display_name}' reports the requirement of a managed device for MFA registration but does not enforce it." + ) + assert ( + result[0].resource + == entra_client.conditional_access_policies[id].dict() + ) + + assert result[0].resource_name == display_name + assert result[0].resource_id == id + assert result[0].location == "global" + + def test_entra_managed_device_enabled(self): + id = str(uuid4()) + display_name = "Test" + entra_client = mock.MagicMock + entra_client.audited_tenant = "audited_tenant" + entra_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.entra.entra_managed_device_required_for_mfa_registration.entra_managed_device_required_for_mfa_registration.entra_client", + new=entra_client, + ), + ): + from prowler.providers.m365.services.entra.entra_managed_device_required_for_mfa_registration.entra_managed_device_required_for_mfa_registration import ( + entra_managed_device_required_for_mfa_registration, + ) + from prowler.providers.m365.services.entra.entra_service import ( + ConditionalAccessPolicy, + ) + + entra_client.conditional_access_policies = { + id: ConditionalAccessPolicy( + id=id, + display_name=display_name, + conditions=Conditions( + application_conditions=ApplicationsConditions( + included_applications=["All"], + excluded_applications=[], + included_user_actions=[UserAction.REGISTER_SECURITY_INFO], + ), + user_conditions=UsersConditions( + included_groups=[], + excluded_groups=[], + included_users=["All"], + excluded_users=[], + included_roles=[], + excluded_roles=[], + ), + ), + grant_controls=GrantControls( + built_in_controls=[ + ConditionalAccessGrantControl.MFA, + ConditionalAccessGrantControl.DOMAIN_JOINED_DEVICE, + ], + operator=GrantControlOperator.OR, + ), + session_controls=SessionControls( + persistent_browser=PersistentBrowser( + is_enabled=False, mode="always" + ), + sign_in_frequency=SignInFrequency( + is_enabled=False, + frequency=None, + type=None, + interval=SignInFrequencyInterval.TIME_BASED, + ), + ), + state=ConditionalAccessPolicyState.ENABLED, + ) + } + + check = entra_managed_device_required_for_mfa_registration() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == f"Conditional Access Policy '{display_name}' does require a managed device for MFA registration." + ) + assert ( + result[0].resource + == entra_client.conditional_access_policies[id].dict() + ) + + assert result[0].resource_name == display_name + assert result[0].resource_id == id + assert result[0].location == "global" diff --git a/tests/providers/microsoft365/services/entra/entra_password_hash_sync_enabled/entra_password_hash_sync_enabled_test.py b/tests/providers/m365/services/entra/entra_password_hash_sync_enabled/entra_password_hash_sync_enabled_test.py similarity index 74% rename from tests/providers/microsoft365/services/entra/entra_password_hash_sync_enabled/entra_password_hash_sync_enabled_test.py rename to tests/providers/m365/services/entra/entra_password_hash_sync_enabled/entra_password_hash_sync_enabled_test.py index bc9e5b3008..d4ec23bac3 100644 --- a/tests/providers/microsoft365/services/entra/entra_password_hash_sync_enabled/entra_password_hash_sync_enabled_test.py +++ b/tests/providers/m365/services/entra/entra_password_hash_sync_enabled/entra_password_hash_sync_enabled_test.py @@ -1,9 +1,7 @@ from unittest import mock -from prowler.providers.microsoft365.services.entra.entra_service import Organization -from tests.providers.microsoft365.microsoft365_fixtures import ( - set_mocked_microsoft365_provider, -) +from prowler.providers.m365.services.entra.entra_service import Organization +from tests.providers.m365.m365_fixtures import set_mocked_m365_provider class Test_entra_password_hash_sync_enabled: @@ -13,14 +11,14 @@ class Test_entra_password_hash_sync_enabled: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_password_hash_sync_enabled.entra_password_hash_sync_enabled.entra_client", + "prowler.providers.m365.services.entra.entra_password_hash_sync_enabled.entra_password_hash_sync_enabled.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_password_hash_sync_enabled.entra_password_hash_sync_enabled import ( + from prowler.providers.m365.services.entra.entra_password_hash_sync_enabled.entra_password_hash_sync_enabled import ( entra_password_hash_sync_enabled, ) @@ -51,14 +49,14 @@ class Test_entra_password_hash_sync_enabled: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_password_hash_sync_enabled.entra_password_hash_sync_enabled.entra_client", + "prowler.providers.m365.services.entra.entra_password_hash_sync_enabled.entra_password_hash_sync_enabled.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_password_hash_sync_enabled.entra_password_hash_sync_enabled import ( + from prowler.providers.m365.services.entra.entra_password_hash_sync_enabled.entra_password_hash_sync_enabled import ( entra_password_hash_sync_enabled, ) @@ -103,14 +101,14 @@ class Test_entra_password_hash_sync_enabled: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_password_hash_sync_enabled.entra_password_hash_sync_enabled.entra_client", + "prowler.providers.m365.services.entra.entra_password_hash_sync_enabled.entra_password_hash_sync_enabled.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_password_hash_sync_enabled.entra_password_hash_sync_enabled import ( + from prowler.providers.m365.services.entra.entra_password_hash_sync_enabled.entra_password_hash_sync_enabled import ( entra_password_hash_sync_enabled, ) @@ -142,14 +140,14 @@ class Test_entra_password_hash_sync_enabled: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_password_hash_sync_enabled.entra_password_hash_sync_enabled.entra_client", + "prowler.providers.m365.services.entra.entra_password_hash_sync_enabled.entra_password_hash_sync_enabled.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_password_hash_sync_enabled.entra_password_hash_sync_enabled import ( + from prowler.providers.m365.services.entra.entra_password_hash_sync_enabled.entra_password_hash_sync_enabled import ( entra_password_hash_sync_enabled, ) diff --git a/tests/providers/microsoft365/services/entra/entra_policy_ensure_default_user_cannot_create_tenants/microsoft365_entra_policy_ensure_default_user_cannot_create_tenants_test.py b/tests/providers/m365/services/entra/entra_policy_ensure_default_user_cannot_create_tenants/microsoft365_entra_policy_ensure_default_user_cannot_create_tenants_test.py similarity index 72% rename from tests/providers/microsoft365/services/entra/entra_policy_ensure_default_user_cannot_create_tenants/microsoft365_entra_policy_ensure_default_user_cannot_create_tenants_test.py rename to tests/providers/m365/services/entra/entra_policy_ensure_default_user_cannot_create_tenants/microsoft365_entra_policy_ensure_default_user_cannot_create_tenants_test.py index 5c615b1da0..0e354e3e90 100644 --- a/tests/providers/microsoft365/services/entra/entra_policy_ensure_default_user_cannot_create_tenants/microsoft365_entra_policy_ensure_default_user_cannot_create_tenants_test.py +++ b/tests/providers/m365/services/entra/entra_policy_ensure_default_user_cannot_create_tenants/microsoft365_entra_policy_ensure_default_user_cannot_create_tenants_test.py @@ -1,13 +1,11 @@ from unittest import mock from uuid import uuid4 -from prowler.providers.microsoft365.services.entra.entra_service import ( +from prowler.providers.m365.services.entra.entra_service import ( AuthorizationPolicy, DefaultUserRolePermissions, ) -from tests.providers.microsoft365.microsoft365_fixtures import ( - set_mocked_microsoft365_provider, -) +from tests.providers.m365.m365_fixtures import set_mocked_m365_provider class Test_entra_policy_ensure_default_user_cannot_create_tenants: @@ -18,14 +16,14 @@ class Test_entra_policy_ensure_default_user_cannot_create_tenants: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_policy_ensure_default_user_cannot_create_tenants.entra_policy_ensure_default_user_cannot_create_tenants.entra_client", + "prowler.providers.m365.services.entra.entra_policy_ensure_default_user_cannot_create_tenants.entra_policy_ensure_default_user_cannot_create_tenants.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_policy_ensure_default_user_cannot_create_tenants.entra_policy_ensure_default_user_cannot_create_tenants import ( + from prowler.providers.m365.services.entra.entra_policy_ensure_default_user_cannot_create_tenants.entra_policy_ensure_default_user_cannot_create_tenants import ( entra_policy_ensure_default_user_cannot_create_tenants, ) @@ -49,14 +47,14 @@ class Test_entra_policy_ensure_default_user_cannot_create_tenants: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_policy_ensure_default_user_cannot_create_tenants.entra_policy_ensure_default_user_cannot_create_tenants.entra_client", + "prowler.providers.m365.services.entra.entra_policy_ensure_default_user_cannot_create_tenants.entra_policy_ensure_default_user_cannot_create_tenants.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_policy_ensure_default_user_cannot_create_tenants.entra_policy_ensure_default_user_cannot_create_tenants import ( + from prowler.providers.m365.services.entra.entra_policy_ensure_default_user_cannot_create_tenants.entra_policy_ensure_default_user_cannot_create_tenants import ( entra_policy_ensure_default_user_cannot_create_tenants, ) @@ -89,14 +87,14 @@ class Test_entra_policy_ensure_default_user_cannot_create_tenants: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_policy_ensure_default_user_cannot_create_tenants.entra_policy_ensure_default_user_cannot_create_tenants.entra_client", + "prowler.providers.m365.services.entra.entra_policy_ensure_default_user_cannot_create_tenants.entra_policy_ensure_default_user_cannot_create_tenants.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_policy_ensure_default_user_cannot_create_tenants.entra_policy_ensure_default_user_cannot_create_tenants import ( + from prowler.providers.m365.services.entra.entra_policy_ensure_default_user_cannot_create_tenants.entra_policy_ensure_default_user_cannot_create_tenants import ( entra_policy_ensure_default_user_cannot_create_tenants, ) diff --git a/tests/providers/m365/services/entra/entra_policy_guest_invite_only_for_admin_roles/microsoft365_entra_policy_guest_invite_only_for_admin_roles_test.py b/tests/providers/m365/services/entra/entra_policy_guest_invite_only_for_admin_roles/microsoft365_entra_policy_guest_invite_only_for_admin_roles_test.py new file mode 100644 index 0000000000..b92e051e68 --- /dev/null +++ b/tests/providers/m365/services/entra/entra_policy_guest_invite_only_for_admin_roles/microsoft365_entra_policy_guest_invite_only_for_admin_roles_test.py @@ -0,0 +1,166 @@ +import mock + +from prowler.providers.m365.services.entra.entra_service import ( + AuthorizationPolicy, + InvitationsFrom, +) +from tests.providers.m365.m365_fixtures import set_mocked_m365_provider + + +class Test_entra_policy_guest_invite_only_for_admin_roles: + def test_no_auth_policy(self): + """ + Test when there is no authorization policy (auth_policy is None): + The check should return a report with FAIL status using default resource values. + """ + entra_client = mock.MagicMock() + entra_client.authorization_policy = None + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.entra.entra_policy_guest_invite_only_for_admin_roles.entra_policy_guest_invite_only_for_admin_roles.entra_client", + new=entra_client, + ), + ): + from prowler.providers.m365.services.entra.entra_policy_guest_invite_only_for_admin_roles.entra_policy_guest_invite_only_for_admin_roles import ( + entra_policy_guest_invite_only_for_admin_roles, + ) + + check = entra_policy_guest_invite_only_for_admin_roles() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "FAIL" + assert result[0].status_extended == ( + "Guest invitations are not restricted to users with specific administrative roles only." + ) + assert result[0].resource_name == "Authorization Policy" + assert result[0].resource_id == "authorizationPolicy" + assert result[0].resource == {} + + def test_auth_policy_fail(self): + """ + Test when an authorization policy exists but guest_invite_settings is not set to a restricted value: + The check should FAIL. + """ + entra_client = mock.MagicMock() + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.entra.entra_policy_guest_invite_only_for_admin_roles.entra_policy_guest_invite_only_for_admin_roles.entra_client", + new=entra_client, + ), + ): + from prowler.providers.m365.services.entra.entra_policy_guest_invite_only_for_admin_roles.entra_policy_guest_invite_only_for_admin_roles import ( + entra_policy_guest_invite_only_for_admin_roles, + ) + + entra_client.authorization_policy = AuthorizationPolicy( + id="policy001", + name="Auth Policy Test", + description="Test policy", + guest_invite_settings=InvitationsFrom.EVERYONE.value, + ) + + check = entra_policy_guest_invite_only_for_admin_roles() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "FAIL" + assert result[0].status_extended == ( + "Guest invitations are not restricted to users with specific administrative roles only." + ) + assert result[0].resource_id == "policy001" + assert result[0].resource_name == "Auth Policy Test" + assert result[0].location == "global" + assert result[0].resource == entra_client.authorization_policy.dict() + + def test_auth_policy_pass_admins_and_guest_inviters(self): + """ + Test when the authorization policy exists and guest_invite_settings is set to + InvitationsFrom.ADMINS_AND_GUEST_INVITERS: the check should PASS. + """ + entra_client = mock.MagicMock() + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.entra.entra_policy_guest_invite_only_for_admin_roles.entra_policy_guest_invite_only_for_admin_roles.entra_client", + new=entra_client, + ), + ): + from prowler.providers.m365.services.entra.entra_policy_guest_invite_only_for_admin_roles.entra_policy_guest_invite_only_for_admin_roles import ( + entra_policy_guest_invite_only_for_admin_roles, + ) + + entra_client.authorization_policy = AuthorizationPolicy( + id="policy002", + name="Auth Policy Restricted", + description="Test policy", + guest_invite_settings=InvitationsFrom.ADMINS_AND_GUEST_INVITERS.value, + ) + + check = entra_policy_guest_invite_only_for_admin_roles() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "PASS" + assert result[0].status_extended == ( + "Guest invitations are restricted to users with specific administrative roles only." + ) + assert result[0].resource_id == "policy002" + assert result[0].resource_name == "Auth Policy Restricted" + assert result[0].location == "global" + assert result[0].resource == entra_client.authorization_policy.dict() + + def test_auth_policy_pass_none(self): + """ + Test when the authorization policy exists and guest_invite_settings is set to + InvitationsFrom.NONE: the check should PASS. + """ + entra_client = mock.MagicMock() + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.entra.entra_policy_guest_invite_only_for_admin_roles.entra_policy_guest_invite_only_for_admin_roles.entra_client", + new=entra_client, + ), + ): + from prowler.providers.m365.services.entra.entra_policy_guest_invite_only_for_admin_roles.entra_policy_guest_invite_only_for_admin_roles import ( + entra_policy_guest_invite_only_for_admin_roles, + ) + + entra_client.authorization_policy = AuthorizationPolicy( + id="policy003", + name="Auth Policy Restricted None", + description="Test policy", + guest_invite_settings=InvitationsFrom.NONE.value, + ) + + check = entra_policy_guest_invite_only_for_admin_roles() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "PASS" + assert result[0].status_extended == ( + "Guest invitations are restricted to users with specific administrative roles only." + ) + assert result[0].resource_id == "policy003" + assert result[0].resource_name == "Auth Policy Restricted None" + assert result[0].location == "global" + assert result[0].resource == entra_client.authorization_policy.dict() diff --git a/tests/providers/m365/services/entra/entra_policy_guest_users_access_restrictions/microsoft365_entra_policy_guest_users_access_restrictions_test.py b/tests/providers/m365/services/entra/entra_policy_guest_users_access_restrictions/microsoft365_entra_policy_guest_users_access_restrictions_test.py new file mode 100644 index 0000000000..7eac966f69 --- /dev/null +++ b/tests/providers/m365/services/entra/entra_policy_guest_users_access_restrictions/microsoft365_entra_policy_guest_users_access_restrictions_test.py @@ -0,0 +1,166 @@ +from unittest import mock + +from prowler.providers.m365.services.entra.entra_service import ( + AuthorizationPolicy, + AuthPolicyRoles, +) +from tests.providers.m365.m365_fixtures import set_mocked_m365_provider + + +class Test_entra_policy_guest_users_access_restrictions: + def test_no_auth_policy(self): + """ + Test when there is no authorization policy (auth_policy is None): + The check should return a report with FAIL status using default resource values. + """ + entra_client = mock.MagicMock() + entra_client.authorization_policy = None + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.entra.entra_policy_guest_users_access_restrictions.entra_policy_guest_users_access_restrictions.entra_client", + new=entra_client, + ), + ): + from prowler.providers.m365.services.entra.entra_policy_guest_users_access_restrictions.entra_policy_guest_users_access_restrictions import ( + entra_policy_guest_users_access_restrictions, + ) + + check = entra_policy_guest_users_access_restrictions() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "FAIL" + assert result[0].status_extended == ( + "Guest user access is not restricted to properties and memberships of their own directory objects" + ) + assert result[0].resource_name == "Authorization Policy" + assert result[0].resource_id == "authorizationPolicy" + assert result[0].location == "global" + + def test_auth_policy_fail(self): + """ + Test when an authorization policy exists but guest_user_role_id does not match + any of the restricted roles: the check should FAIL. + """ + entra_client = mock.MagicMock() + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.entra.entra_policy_guest_users_access_restrictions.entra_policy_guest_users_access_restrictions.entra_client", + new=entra_client, + ), + ): + from prowler.providers.m365.services.entra.entra_policy_guest_users_access_restrictions.entra_policy_guest_users_access_restrictions import ( + entra_policy_guest_users_access_restrictions, + ) + + entra_client.authorization_policy = AuthorizationPolicy( + id="policy123", + name="Auth Policy Test", + description="Test policy", + guest_user_role_id=AuthPolicyRoles.USER.value, + ) + + check = entra_policy_guest_users_access_restrictions() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "FAIL" + assert result[0].resource_id == "policy123" + assert result[0].resource_name == "Auth Policy Test" + assert result[0].location == "global" + assert result[0].status_extended == ( + "Guest user access is not restricted to properties and memberships of their own directory objects" + ) + assert result[0].resource == entra_client.authorization_policy + + def test_auth_policy_pass_restricted(self): + """ + Test when the authorization policy exists and guest_user_role_id is set to + AuthPolicyRoles.GUEST_USER_ACCESS_RESTRICTED: the check should PASS. + """ + entra_client = mock.MagicMock() + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.entra.entra_policy_guest_users_access_restrictions.entra_policy_guest_users_access_restrictions.entra_client", + new=entra_client, + ), + ): + from prowler.providers.m365.services.entra.entra_policy_guest_users_access_restrictions.entra_policy_guest_users_access_restrictions import ( + entra_policy_guest_users_access_restrictions, + ) + + entra_client.authorization_policy = AuthorizationPolicy( + id="policy456", + name="Auth Policy Restricted", + description="Test policy", + guest_user_role_id=AuthPolicyRoles.GUEST_USER_ACCESS_RESTRICTED.value, + ) + + check = entra_policy_guest_users_access_restrictions() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "PASS" + assert result[0].resource_id == "policy456" + assert result[0].resource_name == "Auth Policy Restricted" + assert result[0].location == "global" + assert result[0].status_extended == ( + "Guest user access is restricted to properties and memberships of their own directory objects" + ) + assert result[0].resource == entra_client.authorization_policy + + def test_auth_policy_pass_guest_user(self): + """ + Test when the authorization policy exists and guest_user_role_id is set to + AuthPolicyRoles.GUEST_USER: the check should PASS. + """ + entra_client = mock.MagicMock() + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.entra.entra_policy_guest_users_access_restrictions.entra_policy_guest_users_access_restrictions.entra_client", + new=entra_client, + ), + ): + from prowler.providers.m365.services.entra.entra_policy_guest_users_access_restrictions.entra_policy_guest_users_access_restrictions import ( + entra_policy_guest_users_access_restrictions, + ) + + entra_client.authorization_policy = AuthorizationPolicy( + id="policy789", + name="Auth Policy Guest", + description="Test policy", + guest_user_role_id=AuthPolicyRoles.GUEST_USER.value, + ) + + check = entra_policy_guest_users_access_restrictions() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "PASS" + assert result[0].resource_id == "policy789" + assert result[0].resource_name == "Auth Policy Guest" + assert result[0].location == "global" + assert result[0].status_extended == ( + "Guest user access is restricted to properties and memberships of their own directory objects" + ) + assert result[0].resource == entra_client.authorization_policy diff --git a/tests/providers/m365/services/entra/entra_policy_restricts_user_consent_for_apps/microsoft365_entra_policy_restricts_user_consent_for_apps_test.py b/tests/providers/m365/services/entra/entra_policy_restricts_user_consent_for_apps/microsoft365_entra_policy_restricts_user_consent_for_apps_test.py new file mode 100644 index 0000000000..e31d3b9113 --- /dev/null +++ b/tests/providers/m365/services/entra/entra_policy_restricts_user_consent_for_apps/microsoft365_entra_policy_restricts_user_consent_for_apps_test.py @@ -0,0 +1,148 @@ +from unittest import mock +from uuid import uuid4 + +from prowler.providers.m365.services.entra.entra_service import ( + AuthorizationPolicy, + DefaultUserRolePermissions, +) +from tests.providers.m365.m365_fixtures import set_mocked_m365_provider + + +class Test_entra_policy_restricts_user_consent_for_apps: + def test_entra_empty_policy(self): + """ + Test that the check fails when no authorization policy exists. + + This test mocks the 'entra_client.authorization_policy' as an empty dictionary. + Expected result: The check returns FAIL with the extended message indicating that + Entra allows users to consent apps accessing company data on their behalf. + """ + entra_client = mock.MagicMock + entra_client.authorization_policy = {} + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.entra.entra_policy_restricts_user_consent_for_apps.entra_policy_restricts_user_consent_for_apps.entra_client", + new=entra_client, + ), + ): + from prowler.providers.m365.services.entra.entra_policy_restricts_user_consent_for_apps.entra_policy_restricts_user_consent_for_apps import ( + entra_policy_restricts_user_consent_for_apps, + ) + + check = entra_policy_restricts_user_consent_for_apps() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Entra allows users to consent apps accessing company data on their behalf." + ) + assert result[0].resource == {} + assert result[0].resource_name == "Authorization Policy" + assert result[0].resource_id == "authorizationPolicy" + assert result[0].location == "global" + + def test_entra_policy_allows_user_consent(self): + """ + Test that the check fails when the authorization policy allows user consent. + + This test mocks the 'entra_client.authorization_policy' with a policy that includes + a permission grant policy (e.g., "ManagePermissionGrantsForSelf.microsoft-user-default-legacy") + that allows users to consent apps. + Expected result: The check returns FAIL with the extended message indicating that + Entra allows users to consent apps accessing company data on their behalf. + """ + id = str(uuid4()) + entra_client = mock.MagicMock + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.entra.entra_policy_restricts_user_consent_for_apps.entra_policy_restricts_user_consent_for_apps.entra_client", + new=entra_client, + ), + ): + from prowler.providers.m365.services.entra.entra_policy_restricts_user_consent_for_apps.entra_policy_restricts_user_consent_for_apps import ( + entra_policy_restricts_user_consent_for_apps, + ) + + entra_client.authorization_policy = AuthorizationPolicy( + id=id, + name="Test Policy", + description="Test Policy Description", + default_user_role_permissions=DefaultUserRolePermissions( + permission_grant_policies_assigned=[ + "ManagePermissionGrantsForSelf.microsoft-user-default-legacy" + ] + ), + ) + + check = entra_policy_restricts_user_consent_for_apps() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Entra allows users to consent apps accessing company data on their behalf." + ) + assert result[0].resource == entra_client.authorization_policy.dict() + assert result[0].resource_name == "Test Policy" + assert result[0].resource_id == id + assert result[0].location == "global" + + def test_entra_policy_restricts_user_consent(self): + """ + Test that the check passes when the authorization policy restricts user consent. + + This test mocks the 'entra_client.authorization_policy' with a policy that does not include + any permission grant policy allowing user consent (i.e., it lacks policies containing + "ManagePermissionGrantsForSelf"). + Expected result: The check returns PASS with the extended message indicating that + Entra does not allow users to consent apps accessing company data on their behalf. + """ + id = str(uuid4()) + entra_client = mock.MagicMock + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.entra.entra_policy_restricts_user_consent_for_apps.entra_policy_restricts_user_consent_for_apps.entra_client", + new=entra_client, + ), + ): + from prowler.providers.m365.services.entra.entra_policy_restricts_user_consent_for_apps.entra_policy_restricts_user_consent_for_apps import ( + entra_policy_restricts_user_consent_for_apps, + ) + + entra_client.authorization_policy = AuthorizationPolicy( + id=id, + name="Test Policy", + description="Test Policy Description", + default_user_role_permissions=DefaultUserRolePermissions( + permission_grant_policies_assigned=["SomeOtherPolicy"] + ), + ) + + check = entra_policy_restricts_user_consent_for_apps() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Entra does not allow users to consent apps accessing company data on their behalf." + ) + assert result[0].resource == entra_client.authorization_policy.dict() + assert result[0].resource_name == "Test Policy" + assert result[0].resource_id == id + assert result[0].location == "global" diff --git a/tests/providers/microsoft365/services/entra/entra_thirdparty_integrated_apps_not_allowed/entra_thirdparty_integrated_apps_not_allowed_test.py b/tests/providers/m365/services/entra/entra_thirdparty_integrated_apps_not_allowed/entra_thirdparty_integrated_apps_not_allowed_test.py similarity index 70% rename from tests/providers/microsoft365/services/entra/entra_thirdparty_integrated_apps_not_allowed/entra_thirdparty_integrated_apps_not_allowed_test.py rename to tests/providers/m365/services/entra/entra_thirdparty_integrated_apps_not_allowed/entra_thirdparty_integrated_apps_not_allowed_test.py index 9d0d112b6a..d17644b134 100644 --- a/tests/providers/microsoft365/services/entra/entra_thirdparty_integrated_apps_not_allowed/entra_thirdparty_integrated_apps_not_allowed_test.py +++ b/tests/providers/m365/services/entra/entra_thirdparty_integrated_apps_not_allowed/entra_thirdparty_integrated_apps_not_allowed_test.py @@ -1,13 +1,10 @@ from unittest import mock from uuid import uuid4 -from prowler.providers.microsoft365.services.entra.entra_service import ( +from prowler.providers.m365.services.entra.entra_service import ( DefaultUserRolePermissions, ) -from tests.providers.microsoft365.microsoft365_fixtures import ( - DOMAIN, - set_mocked_microsoft365_provider, -) +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider class Test_entra_thirdparty_integrated_apps_not_allowed: @@ -18,14 +15,14 @@ class Test_entra_thirdparty_integrated_apps_not_allowed: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_thirdparty_integrated_apps_not_allowed.entra_thirdparty_integrated_apps_not_allowed.entra_client", + "prowler.providers.m365.services.entra.entra_thirdparty_integrated_apps_not_allowed.entra_thirdparty_integrated_apps_not_allowed.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_thirdparty_integrated_apps_not_allowed.entra_thirdparty_integrated_apps_not_allowed import ( + from prowler.providers.m365.services.entra.entra_thirdparty_integrated_apps_not_allowed.entra_thirdparty_integrated_apps_not_allowed import ( entra_thirdparty_integrated_apps_not_allowed, ) @@ -44,17 +41,17 @@ class Test_entra_thirdparty_integrated_apps_not_allowed: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_thirdparty_integrated_apps_not_allowed.entra_thirdparty_integrated_apps_not_allowed.entra_client", + "prowler.providers.m365.services.entra.entra_thirdparty_integrated_apps_not_allowed.entra_thirdparty_integrated_apps_not_allowed.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_service import ( + from prowler.providers.m365.services.entra.entra_service import ( AuthorizationPolicy, ) - from prowler.providers.microsoft365.services.entra.entra_thirdparty_integrated_apps_not_allowed.entra_thirdparty_integrated_apps_not_allowed import ( + from prowler.providers.m365.services.entra.entra_thirdparty_integrated_apps_not_allowed.entra_thirdparty_integrated_apps_not_allowed import ( entra_thirdparty_integrated_apps_not_allowed, ) @@ -88,17 +85,17 @@ class Test_entra_thirdparty_integrated_apps_not_allowed: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.entra.entra_thirdparty_integrated_apps_not_allowed.entra_thirdparty_integrated_apps_not_allowed.entra_client", + "prowler.providers.m365.services.entra.entra_thirdparty_integrated_apps_not_allowed.entra_thirdparty_integrated_apps_not_allowed.entra_client", new=entra_client, ), ): - from prowler.providers.microsoft365.services.entra.entra_service import ( + from prowler.providers.m365.services.entra.entra_service import ( AuthorizationPolicy, ) - from prowler.providers.microsoft365.services.entra.entra_thirdparty_integrated_apps_not_allowed.entra_thirdparty_integrated_apps_not_allowed import ( + from prowler.providers.m365.services.entra.entra_thirdparty_integrated_apps_not_allowed.entra_thirdparty_integrated_apps_not_allowed import ( entra_thirdparty_integrated_apps_not_allowed, ) diff --git a/tests/providers/m365/services/entra/entra_users_mfa_capable/entra_users_mfa_capable_test.py b/tests/providers/m365/services/entra/entra_users_mfa_capable/entra_users_mfa_capable_test.py new file mode 100644 index 0000000000..7cfbe5de0d --- /dev/null +++ b/tests/providers/m365/services/entra/entra_users_mfa_capable/entra_users_mfa_capable_test.py @@ -0,0 +1,139 @@ +from unittest import mock +from uuid import uuid4 + +from prowler.providers.m365.services.entra.entra_service import User +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_entra_users_mfa_capable: + def test_user_not_mfa_capable(self): + """User is not MFA capable: expected FAIL.""" + entra_client = mock.MagicMock + entra_client.audited_tenant = "audited_tenant" + entra_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.entra.entra_users_mfa_capable.entra_users_mfa_capable.entra_client", + new=entra_client, + ), + ): + from prowler.providers.m365.services.entra.entra_users_mfa_capable.entra_users_mfa_capable import ( + entra_users_mfa_capable, + ) + + user_id = str(uuid4()) + entra_client.users = { + user_id: User( + id=user_id, + name="Test User", + on_premises_sync_enabled=False, + directory_roles_ids=[], + is_mfa_capable=False, + ) + } + + check = entra_users_mfa_capable() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "FAIL" + assert result[0].status_extended == "User Test User is not MFA capable." + assert result[0].resource == {} + assert result[0].resource_name == "Users" + assert result[0].resource_id == "users" + + def test_user_mfa_capable(self): + """User is MFA capable: expected PASS.""" + entra_client = mock.MagicMock + entra_client.audited_tenant = "audited_tenant" + entra_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.entra.entra_users_mfa_capable.entra_users_mfa_capable.entra_client", + new=entra_client, + ), + ): + from prowler.providers.m365.services.entra.entra_users_mfa_capable.entra_users_mfa_capable import ( + entra_users_mfa_capable, + ) + + user_id = str(uuid4()) + entra_client.users = { + user_id: User( + id=user_id, + name="Test User", + on_premises_sync_enabled=False, + directory_roles_ids=[], + is_mfa_capable=True, + ) + } + + check = entra_users_mfa_capable() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "PASS" + assert result[0].status_extended == "User Test User is MFA capable." + assert result[0].resource == {} + assert result[0].resource_name == "Users" + assert result[0].resource_id == "users" + + def test_multiple_users(self): + """Multiple users with different MFA capabilities: expected mixed results.""" + entra_client = mock.MagicMock + entra_client.audited_tenant = "audited_tenant" + entra_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.entra.entra_users_mfa_capable.entra_users_mfa_capable.entra_client", + new=entra_client, + ), + ): + from prowler.providers.m365.services.entra.entra_users_mfa_capable.entra_users_mfa_capable import ( + entra_users_mfa_capable, + ) + + user1_id = str(uuid4()) + user2_id = str(uuid4()) + entra_client.users = { + user1_id: User( + id=user1_id, + name="Test User 1", + on_premises_sync_enabled=False, + directory_roles_ids=[], + is_mfa_capable=True, + ), + user2_id: User( + id=user2_id, + name="Test User 2", + on_premises_sync_enabled=False, + directory_roles_ids=[], + is_mfa_capable=False, + ), + } + + check = entra_users_mfa_capable() + result = check.execute() + + assert len(result) == 2 + # First user (MFA capable) + assert result[0].status == "PASS" + assert result[0].status_extended == "User Test User 1 is MFA capable." + # Second user (not MFA capable) + assert result[1].status == "FAIL" + assert result[1].status_extended == "User Test User 2 is not MFA capable." diff --git a/tests/providers/m365/services/entra/entra_users_mfa_enabled/entra_users_mfa_enabled_test.py b/tests/providers/m365/services/entra/entra_users_mfa_enabled/entra_users_mfa_enabled_test.py new file mode 100644 index 0000000000..07699fdecf --- /dev/null +++ b/tests/providers/m365/services/entra/entra_users_mfa_enabled/entra_users_mfa_enabled_test.py @@ -0,0 +1,285 @@ +from unittest import mock +from uuid import uuid4 + +from prowler.providers.m365.services.entra.entra_service import ( + ApplicationsConditions, + ConditionalAccessGrantControl, + ConditionalAccessPolicy, + ConditionalAccessPolicyState, + Conditions, + GrantControlOperator, + GrantControls, + PersistentBrowser, + SessionControls, + SignInFrequency, + SignInFrequencyInterval, + UsersConditions, +) +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_entra_users_mfa_enabled: + def test_no_conditional_access_policies(self): + """No conditional access policies configured: expected FAIL.""" + entra_client = mock.MagicMock + entra_client.audited_tenant = "audited_tenant" + entra_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.entra.entra_users_mfa_enabled.entra_users_mfa_enabled.entra_client", + new=entra_client, + ), + ): + from prowler.providers.m365.services.entra.entra_users_mfa_enabled.entra_users_mfa_enabled import ( + entra_users_mfa_enabled, + ) + + entra_client.conditional_access_policies = {} + + check = entra_users_mfa_enabled() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "No Conditional Access Policy enforces MFA for all users." + ) + assert result[0].resource == {} + assert result[0].resource_name == "Conditional Access Policies" + assert result[0].resource_id == "conditionalAccessPolicies" + + def test_policy_disabled(self): + """Policy in DISABLED state: expected to be ignored and return FAIL.""" + policy_id = str(uuid4()) + entra_client = mock.MagicMock + entra_client.audited_tenant = "audited_tenant" + entra_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.entra.entra_users_mfa_enabled.entra_users_mfa_enabled.entra_client", + new=entra_client, + ), + ): + from prowler.providers.m365.services.entra.entra_users_mfa_enabled.entra_users_mfa_enabled import ( + entra_users_mfa_enabled, + ) + + entra_client.conditional_access_policies = { + policy_id: ConditionalAccessPolicy( + id=policy_id, + display_name="Disabled Policy", + conditions=Conditions( + application_conditions=ApplicationsConditions( + included_applications=["All"], + excluded_applications=[], + included_user_actions=[], + ), + user_conditions=UsersConditions( + included_groups=[], + excluded_groups=[], + included_users=["All"], + excluded_users=[], + included_roles=[], + excluded_roles=[], + ), + ), + grant_controls=GrantControls( + built_in_controls=[ConditionalAccessGrantControl.MFA], + operator=GrantControlOperator.AND, + ), + session_controls=SessionControls( + persistent_browser=PersistentBrowser( + is_enabled=False, mode="always" + ), + sign_in_frequency=SignInFrequency( + is_enabled=False, + frequency=None, + type=None, + interval=SignInFrequencyInterval.EVERY_TIME, + ), + ), + state=ConditionalAccessPolicyState.DISABLED, + ) + } + + check = entra_users_mfa_enabled() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "No Conditional Access Policy enforces MFA for all users." + ) + assert result[0].resource == {} + assert result[0].resource_name == "Conditional Access Policies" + assert result[0].resource_id == "conditionalAccessPolicies" + + def test_policy_mfa_enabled_for_report(self): + """ + Valid policy: + - State enabled for reporting only + - Applies to administrative roles via 'All' in included_users + - Application conditions include "All" + - MFA is configured in grant_controls + + Expected FAIL due to is only for reporting. + """ + policy_id = str(uuid4()) + display_name = "Invalid MFA Policy" + entra_client = mock.MagicMock + entra_client.audited_tenant = "audited_tenant" + entra_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.entra.entra_users_mfa_enabled.entra_users_mfa_enabled.entra_client", + new=entra_client, + ), + ): + from prowler.providers.m365.services.entra.entra_users_mfa_enabled.entra_users_mfa_enabled import ( + entra_users_mfa_enabled, + ) + + entra_client.conditional_access_policies = { + policy_id: ConditionalAccessPolicy( + id=policy_id, + display_name=display_name, + conditions=Conditions( + application_conditions=ApplicationsConditions( + included_applications=["All"], + excluded_applications=[], + included_user_actions=[], + ), + user_conditions=UsersConditions( + included_groups=[], + excluded_groups=[], + included_users=["All"], + excluded_users=[], + included_roles=[], + excluded_roles=[], + ), + ), + grant_controls=GrantControls( + built_in_controls=[ConditionalAccessGrantControl.MFA], + operator=GrantControlOperator.AND, + ), + session_controls=SessionControls( + persistent_browser=PersistentBrowser( + is_enabled=False, mode="always" + ), + sign_in_frequency=SignInFrequency( + is_enabled=False, + frequency=None, + type=None, + interval=SignInFrequencyInterval.EVERY_TIME, + ), + ), + state=ConditionalAccessPolicyState.ENABLED_FOR_REPORTING, + ) + } + + check = entra_users_mfa_enabled() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "FAIL" + expected_status_extended = f"Conditional Access Policy '{display_name}' reports MFA requirement for all users but does not enforce it." + assert result[0].status_extended == expected_status_extended + assert result[0].resource == entra_client.conditional_access_policies + assert result[0].resource_name == display_name + assert result[0].resource_id == policy_id + + def test_policy_valid_through_roles(self): + """ + Valid policy: + - State enabled (ENABLED) + - Applies to administrative roles + - Application conditions include "All" + - MFA is configured in grant_controls + + Expected PASS. + """ + policy_id = str(uuid4()) + display_name = "Valid MFA Policy" + entra_client = mock.MagicMock + entra_client.audited_tenant = "audited_tenant" + entra_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.entra.entra_users_mfa_enabled.entra_users_mfa_enabled.entra_client", + new=entra_client, + ), + ): + from prowler.providers.m365.services.entra.entra_users_mfa_enabled.entra_users_mfa_enabled import ( + entra_users_mfa_enabled, + ) + + entra_client.conditional_access_policies = { + policy_id: ConditionalAccessPolicy( + id=policy_id, + display_name=display_name, + conditions=Conditions( + application_conditions=ApplicationsConditions( + included_applications=["All"], + excluded_applications=[], + included_user_actions=[], + ), + user_conditions=UsersConditions( + included_groups=[], + excluded_groups=[], + included_users=["All"], + excluded_users=[], + included_roles=[], + excluded_roles=[], + ), + ), + grant_controls=GrantControls( + built_in_controls=[ConditionalAccessGrantControl.MFA], + operator=GrantControlOperator.AND, + ), + session_controls=SessionControls( + persistent_browser=PersistentBrowser( + is_enabled=False, mode="always" + ), + sign_in_frequency=SignInFrequency( + is_enabled=False, + frequency=None, + type=None, + interval=SignInFrequencyInterval.EVERY_TIME, + ), + ), + state=ConditionalAccessPolicyState.ENABLED, + ) + } + + check = entra_users_mfa_enabled() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "PASS" + expected_status_extended = f"Conditional Access Policy '{display_name}' enforces MFA for all users." + assert result[0].status_extended == expected_status_extended + assert result[0].resource == entra_client.conditional_access_policies + assert result[0].resource_name == display_name + assert result[0].resource_id == policy_id diff --git a/tests/providers/microsoft365/services/entra/microsoft365_entra_service_test.py b/tests/providers/m365/services/entra/microsoft365_entra_service_test.py similarity index 64% rename from tests/providers/microsoft365/services/entra/microsoft365_entra_service_test.py rename to tests/providers/m365/services/entra/microsoft365_entra_service_test.py index 5816d78305..46e92aa1f1 100644 --- a/tests/providers/microsoft365/services/entra/microsoft365_entra_service_test.py +++ b/tests/providers/m365/services/entra/microsoft365_entra_service_test.py @@ -1,10 +1,13 @@ from unittest.mock import patch -from prowler.providers.microsoft365.models import Microsoft365IdentityInfo -from prowler.providers.microsoft365.services.entra.entra_service import ( +from prowler.providers.m365.models import M365IdentityInfo +from prowler.providers.m365.services.entra.entra_service import ( AdminConsentPolicy, + AdminRoles, ApplicationsConditions, + AuthenticationStrength, AuthorizationPolicy, + AuthPolicyRoles, ConditionalAccessGrantControl, ConditionalAccessPolicy, ConditionalAccessPolicyState, @@ -13,18 +16,18 @@ from prowler.providers.microsoft365.services.entra.entra_service import ( Entra, GrantControlOperator, GrantControls, + InvitationsFrom, Organization, PersistentBrowser, SessionControls, SignInFrequency, SignInFrequencyInterval, SignInFrequencyType, + User, + UserAction, UsersConditions, ) -from tests.providers.microsoft365.microsoft365_fixtures import ( - DOMAIN, - set_mocked_microsoft365_provider, -) +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider async def mock_entra_get_authorization_policy(_): @@ -39,19 +42,11 @@ async def mock_entra_get_authorization_policy(_): allowed_to_read_bitlocker_keys_for_owned_device=True, allowed_to_read_other_users=True, ), + guest_invite_settings=InvitationsFrom.ADMINS_AND_GUEST_INVITERS.value, + guest_user_role_id=AuthPolicyRoles.GUEST_USER_ACCESS_RESTRICTED.value, ) -async def mock_entra_get_organization(_): - return [ - Organization( - id="org1", - name="Organization 1", - on_premises_sync_enabled=True, - ) - ] - - async def mock_entra_get_conditional_access_policies(_): return { "id-1": ConditionalAccessPolicy( @@ -61,6 +56,7 @@ async def mock_entra_get_conditional_access_policies(_): application_conditions=ApplicationsConditions( included_applications=["app-1", "app-2"], excluded_applications=["app-3", "app-4"], + included_user_actions=[UserAction.REGISTER_SECURITY_INFO], ), user_conditions=UsersConditions( included_groups=["group-1", "group-2"], @@ -74,6 +70,7 @@ async def mock_entra_get_conditional_access_policies(_): grant_controls=GrantControls( built_in_controls=[ConditionalAccessGrantControl.BLOCK], operator=GrantControlOperator.OR, + authentication_strength=AuthenticationStrength.PHISHING_RESISTANT_MFA, ), session_controls=SessionControls( persistent_browser=PersistentBrowser( @@ -117,21 +114,55 @@ async def mock_entra_get_admin_consent_policy(_): ) +async def mock_entra_get_users(_): + return { + "user-1": User( + id="user-1", + name="User 1", + directory_roles_ids=[AdminRoles.GLOBAL_ADMINISTRATOR.value], + on_premises_sync_enabled=True, + is_mfa_capable=True, + ), + "user-2": User( + id="user-2", + name="User 2", + directory_roles_ids=[AdminRoles.GLOBAL_ADMINISTRATOR.value], + on_premises_sync_enabled=False, + is_mfa_capable=False, + ), + "user-3": User( + id="user-3", + name="User 3", + directory_roles_ids=[AdminRoles.GLOBAL_ADMINISTRATOR.value], + on_premises_sync_enabled=True, + is_mfa_capable=False, + ), + } + + +async def mock_entra_get_organization(_): + return [ + Organization( + id="org1", + name="Organization 1", + on_premises_sync_enabled=True, + ) + ] + + class Test_Entra_Service: def test_get_client(self): admincenter_client = Entra( - set_mocked_microsoft365_provider( - identity=Microsoft365IdentityInfo(tenant_domain=DOMAIN) - ) + set_mocked_m365_provider(identity=M365IdentityInfo(tenant_domain=DOMAIN)) ) assert admincenter_client.client.__class__.__name__ == "GraphServiceClient" @patch( - "prowler.providers.microsoft365.services.entra.entra_service.Entra._get_authorization_policy", + "prowler.providers.m365.services.entra.entra_service.Entra._get_authorization_policy", new=mock_entra_get_authorization_policy, ) def test_get_authorization_policy(self): - entra_client = Entra(set_mocked_microsoft365_provider()) + entra_client = Entra(set_mocked_m365_provider()) assert entra_client.authorization_policy.id == "id-1" assert entra_client.authorization_policy.name == "Name 1" assert entra_client.authorization_policy.description == "Description 1" @@ -145,13 +176,21 @@ class Test_Entra_Service: allowed_to_read_other_users=True, ) ) + assert ( + entra_client.authorization_policy.guest_invite_settings + == InvitationsFrom.ADMINS_AND_GUEST_INVITERS.value + ) + assert ( + entra_client.authorization_policy.guest_user_role_id + == AuthPolicyRoles.GUEST_USER_ACCESS_RESTRICTED.value + ) @patch( - "prowler.providers.microsoft365.services.entra.entra_service.Entra._get_conditional_access_policies", + "prowler.providers.m365.services.entra.entra_service.Entra._get_conditional_access_policies", new=mock_entra_get_conditional_access_policies, ) def test_get_conditional_access_policies(self): - entra_client = Entra(set_mocked_microsoft365_provider()) + entra_client = Entra(set_mocked_m365_provider()) assert entra_client.conditional_access_policies == { "id-1": ConditionalAccessPolicy( id="id-1", @@ -160,6 +199,7 @@ class Test_Entra_Service: application_conditions=ApplicationsConditions( included_applications=["app-1", "app-2"], excluded_applications=["app-3", "app-4"], + included_user_actions=[UserAction.REGISTER_SECURITY_INFO], ), user_conditions=UsersConditions( included_groups=["group-1", "group-2"], @@ -173,6 +213,7 @@ class Test_Entra_Service: grant_controls=GrantControls( built_in_controls=[ConditionalAccessGrantControl.BLOCK], operator=GrantControlOperator.OR, + authentication_strength=AuthenticationStrength.PHISHING_RESISTANT_MFA, ), session_controls=SessionControls( persistent_browser=PersistentBrowser( @@ -191,11 +232,11 @@ class Test_Entra_Service: } @patch( - "prowler.providers.microsoft365.services.entra.entra_service.Entra._get_groups", + "prowler.providers.m365.services.entra.entra_service.Entra._get_groups", new=mock_entra_get_groups, ) def test_get_groups(self): - entra_client = Entra(set_mocked_microsoft365_provider()) + entra_client = Entra(set_mocked_m365_provider()) assert len(entra_client.groups) == 2 assert entra_client.groups[0]["id"] == "id-1" assert entra_client.groups[0]["name"] == "group1" @@ -207,23 +248,52 @@ class Test_Entra_Service: assert entra_client.groups[1]["membershipRule"] == "" @patch( - "prowler.providers.microsoft365.services.entra.entra_service.Entra._get_admin_consent_policy", + "prowler.providers.m365.services.entra.entra_service.Entra._get_admin_consent_policy", new=mock_entra_get_admin_consent_policy, ) def test_get_admin_consent_policy(self): - entra_client = Entra(set_mocked_microsoft365_provider()) + entra_client = Entra(set_mocked_m365_provider()) assert entra_client.admin_consent_policy.admin_consent_enabled assert entra_client.admin_consent_policy.notify_reviewers assert entra_client.admin_consent_policy.email_reminders_to_reviewers is False assert entra_client.admin_consent_policy.duration_in_days == 30 @patch( - "prowler.providers.microsoft365.services.entra.entra_service.Entra._get_organization", + "prowler.providers.m365.services.entra.entra_service.Entra._get_organization", new=mock_entra_get_organization, ) def test_get_organization(self): - entra_client = Entra(set_mocked_microsoft365_provider()) + entra_client = Entra(set_mocked_m365_provider()) assert len(entra_client.organizations) == 1 assert entra_client.organizations[0].id == "org1" assert entra_client.organizations[0].name == "Organization 1" assert entra_client.organizations[0].on_premises_sync_enabled + + @patch( + "prowler.providers.m365.services.entra.entra_service.Entra._get_users", + new=mock_entra_get_users, + ) + def test_get_users(self): + entra_client = Entra(set_mocked_m365_provider()) + assert len(entra_client.users) == 3 + assert entra_client.users["user-1"].id == "user-1" + assert entra_client.users["user-1"].name == "User 1" + assert entra_client.users["user-1"].directory_roles_ids == [ + AdminRoles.GLOBAL_ADMINISTRATOR.value + ] + assert entra_client.users["user-1"].is_mfa_capable + assert entra_client.users["user-1"].on_premises_sync_enabled + assert entra_client.users["user-2"].id == "user-2" + assert entra_client.users["user-2"].name == "User 2" + assert entra_client.users["user-2"].directory_roles_ids == [ + AdminRoles.GLOBAL_ADMINISTRATOR.value + ] + assert not entra_client.users["user-2"].is_mfa_capable + assert not entra_client.users["user-2"].on_premises_sync_enabled + assert entra_client.users["user-3"].id == "user-3" + assert entra_client.users["user-3"].name == "User 3" + assert entra_client.users["user-3"].directory_roles_ids == [ + AdminRoles.GLOBAL_ADMINISTRATOR.value + ] + assert entra_client.users["user-3"].on_premises_sync_enabled + assert not entra_client.users["user-3"].is_mfa_capable diff --git a/tests/providers/m365/services/exchange/exchange_external_email_tagging_enabled/exchange_external_email_tagging_enabled_test.py b/tests/providers/m365/services/exchange/exchange_external_email_tagging_enabled/exchange_external_email_tagging_enabled_test.py new file mode 100644 index 0000000000..557461d935 --- /dev/null +++ b/tests/providers/m365/services/exchange/exchange_external_email_tagging_enabled/exchange_external_email_tagging_enabled_test.py @@ -0,0 +1,173 @@ +from unittest import mock + +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_exchange_external_email_tagging_enabled: + def test_external_tagging_enabled(self): + exchange_client = mock.MagicMock() + exchange_client.audited_tenant = "audited_tenant" + exchange_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.exchange.exchange_external_email_tagging_enabled.exchange_external_email_tagging_enabled.exchange_client", + new=exchange_client, + ), + ): + from prowler.providers.m365.services.exchange.exchange_external_email_tagging_enabled.exchange_external_email_tagging_enabled import ( + exchange_external_email_tagging_enabled, + ) + from prowler.providers.m365.services.exchange.exchange_service import ( + ExternalMailConfig, + ) + + exchange_client.external_mail_config = [ + ExternalMailConfig(identity="Org1", external_mail_tag_enabled=True) + ] + + check = exchange_external_email_tagging_enabled() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "External sender tagging is enabled for Exchange identity Org1." + ) + assert result[0].resource == exchange_client.external_mail_config[0].dict() + assert result[0].resource_name == "Org1" + assert result[0].resource_id == "Org1" + assert result[0].location == "global" + + def test_external_tagging_disabled(self): + exchange_client = mock.MagicMock() + exchange_client.audited_tenant = "audited_tenant" + exchange_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.exchange.exchange_external_email_tagging_enabled.exchange_external_email_tagging_enabled.exchange_client", + new=exchange_client, + ), + ): + from prowler.providers.m365.services.exchange.exchange_external_email_tagging_enabled.exchange_external_email_tagging_enabled import ( + exchange_external_email_tagging_enabled, + ) + from prowler.providers.m365.services.exchange.exchange_service import ( + ExternalMailConfig, + ) + + exchange_client.external_mail_config = [ + ExternalMailConfig(identity="Org2", external_mail_tag_enabled=False) + ] + + check = exchange_external_email_tagging_enabled() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "External sender tagging is disabled for Exchange identity Org2." + ) + assert result[0].resource == exchange_client.external_mail_config[0].dict() + assert result[0].resource_name == "Org2" + assert result[0].resource_id == "Org2" + assert result[0].location == "global" + + def test_multiple_configs_mixed_status(self): + exchange_client = mock.MagicMock() + exchange_client.audited_tenant = "audited_tenant" + exchange_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.exchange.exchange_external_email_tagging_enabled.exchange_external_email_tagging_enabled.exchange_client", + new=exchange_client, + ), + ): + from prowler.providers.m365.services.exchange.exchange_external_email_tagging_enabled.exchange_external_email_tagging_enabled import ( + exchange_external_email_tagging_enabled, + ) + from prowler.providers.m365.services.exchange.exchange_service import ( + ExternalMailConfig, + ) + + exchange_client.external_mail_config = [ + ExternalMailConfig( + identity="OrgEnabled", external_mail_tag_enabled=True + ), + ExternalMailConfig( + identity="OrgDisabled", external_mail_tag_enabled=False + ), + ] + + check = exchange_external_email_tagging_enabled() + result = check.execute() + + assert len(result) == 2 + + assert result[0].status == "PASS" + assert result[0].resource_name == "OrgEnabled" + assert ( + result[0].status_extended + == "External sender tagging is enabled for Exchange identity OrgEnabled." + ) + + assert result[1].status == "FAIL" + assert result[1].resource_name == "OrgDisabled" + assert ( + result[1].status_extended + == "External sender tagging is disabled for Exchange identity OrgDisabled." + ) + + def test_no_mail_configs(self): + exchange_client = mock.MagicMock() + exchange_client.audited_tenant = "audited_tenant" + exchange_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.exchange.exchange_external_email_tagging_enabled.exchange_external_email_tagging_enabled.exchange_client", + new=exchange_client, + ), + ): + from prowler.providers.m365.services.exchange.exchange_external_email_tagging_enabled.exchange_external_email_tagging_enabled import ( + exchange_external_email_tagging_enabled, + ) + + exchange_client.external_mail_config = [] + + check = exchange_external_email_tagging_enabled() + result = check.execute() + + assert len(result) == 0 diff --git a/tests/providers/m365/services/exchange/exchange_mailbox_audit_bypass_disabled/exchange_mailbox_audit_bypass_disabled_test.py b/tests/providers/m365/services/exchange/exchange_mailbox_audit_bypass_disabled/exchange_mailbox_audit_bypass_disabled_test.py new file mode 100644 index 0000000000..66ec06945a --- /dev/null +++ b/tests/providers/m365/services/exchange/exchange_mailbox_audit_bypass_disabled/exchange_mailbox_audit_bypass_disabled_test.py @@ -0,0 +1,175 @@ +from unittest import mock + +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_exchange_mailbox_audit_bypass_disabled: + def test_no_mailboxes(self): + exchange_client = mock.MagicMock() + exchange_client.audited_tenant = "audited_tenant" + exchange_client.audited_domain = DOMAIN + exchange_client.mailboxes_config = [] + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.exchange.exchange_mailbox_audit_bypass_disabled.exchange_mailbox_audit_bypass_disabled.exchange_client", + new=exchange_client, + ), + ): + from prowler.providers.m365.services.exchange.exchange_mailbox_audit_bypass_disabled.exchange_mailbox_audit_bypass_disabled import ( + exchange_mailbox_audit_bypass_disabled, + ) + + check = exchange_mailbox_audit_bypass_disabled() + result = check.execute() + assert len(result) == 0 + + def test_audit_bypass_disabled_and_enabled(self): + exchange_client = mock.MagicMock() + exchange_client.audited_tenant = "audited_tenant" + exchange_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.exchange.exchange_mailbox_audit_bypass_disabled.exchange_mailbox_audit_bypass_disabled.exchange_client", + new=exchange_client, + ), + ): + from prowler.providers.m365.services.exchange.exchange_mailbox_audit_bypass_disabled.exchange_mailbox_audit_bypass_disabled import ( + exchange_mailbox_audit_bypass_disabled, + ) + from prowler.providers.m365.services.exchange.exchange_service import ( + MailboxAuditConfig, + ) + + exchange_client.mailboxes_config = [ + MailboxAuditConfig(name="test", id="test", audit_bypass_enabled=True), + MailboxAuditConfig( + name="test2", id="test2", audit_bypass_enabled=False + ), + ] + + check = exchange_mailbox_audit_bypass_disabled() + result = check.execute() + + assert len(result) == 2 + + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Exchange mailbox auditing is bypassed and not enabled for mailbox: test." + ) + assert result[0].resource == exchange_client.mailboxes_config[0].dict() + assert result[0].resource_name == "test" + assert result[0].resource_id == "test" + assert result[0].location == "global" + + assert result[1].status == "PASS" + assert ( + result[1].status_extended + == "Exchange mailbox auditing is enabled for mailbox: test2." + ) + assert result[1].resource == exchange_client.mailboxes_config[1].dict() + assert result[1].resource_name == "test2" + assert result[1].resource_id == "test2" + assert result[1].location == "global" + + def test_audit_bypass_enabled(self): + exchange_client = mock.MagicMock() + exchange_client.audited_tenant = "audited_tenant" + exchange_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.exchange.exchange_mailbox_audit_bypass_disabled.exchange_mailbox_audit_bypass_disabled.exchange_client", + new=exchange_client, + ), + ): + from prowler.providers.m365.services.exchange.exchange_mailbox_audit_bypass_disabled.exchange_mailbox_audit_bypass_disabled import ( + exchange_mailbox_audit_bypass_disabled, + ) + from prowler.providers.m365.services.exchange.exchange_service import ( + MailboxAuditConfig, + ) + + exchange_client.mailboxes_config = [ + MailboxAuditConfig(name="test", id="test", audit_bypass_enabled=True), + ] + + check = exchange_mailbox_audit_bypass_disabled() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Exchange mailbox auditing is bypassed and not enabled for mailbox: test." + ) + assert result[0].resource == exchange_client.mailboxes_config[0].dict() + assert result[0].resource_name == "test" + assert result[0].resource_id == "test" + assert result[0].location == "global" + + def test_audit_bypass_disabled(self): + exchange_client = mock.MagicMock() + exchange_client.audited_tenant = "audited_tenant" + exchange_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.exchange.exchange_mailbox_audit_bypass_disabled.exchange_mailbox_audit_bypass_disabled.exchange_client", + new=exchange_client, + ), + ): + from prowler.providers.m365.services.exchange.exchange_mailbox_audit_bypass_disabled.exchange_mailbox_audit_bypass_disabled import ( + exchange_mailbox_audit_bypass_disabled, + ) + from prowler.providers.m365.services.exchange.exchange_service import ( + MailboxAuditConfig, + ) + + exchange_client.mailboxes_config = [ + MailboxAuditConfig(name="test", id="test", audit_bypass_enabled=False), + ] + + check = exchange_mailbox_audit_bypass_disabled() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Exchange mailbox auditing is enabled for mailbox: test." + ) + assert result[0].resource == exchange_client.mailboxes_config[0].dict() + assert result[0].resource_name == "test" + assert result[0].resource_id == "test" + assert result[0].location == "global" diff --git a/tests/providers/m365/services/exchange/exchange_mailbox_policy_additional_storage_restricted/exchange_mailbox_policy_additional_storage_restricted_test.py b/tests/providers/m365/services/exchange/exchange_mailbox_policy_additional_storage_restricted/exchange_mailbox_policy_additional_storage_restricted_test.py new file mode 100644 index 0000000000..688d68add6 --- /dev/null +++ b/tests/providers/m365/services/exchange/exchange_mailbox_policy_additional_storage_restricted/exchange_mailbox_policy_additional_storage_restricted_test.py @@ -0,0 +1,118 @@ +from unittest import mock + +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_exchange_mailbox_policy_additional_storage_restricted: + def test_mailbox_policy_restricts_additional_storage(self): + exchange_client = mock.MagicMock() + exchange_client.audited_tenant = "audited_tenant" + exchange_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.exchange.exchange_mailbox_policy_additional_storage_restricted.exchange_mailbox_policy_additional_storage_restricted.exchange_client", + new=exchange_client, + ), + ): + from prowler.providers.m365.services.exchange.exchange_mailbox_policy_additional_storage_restricted.exchange_mailbox_policy_additional_storage_restricted import ( + exchange_mailbox_policy_additional_storage_restricted, + ) + from prowler.providers.m365.services.exchange.exchange_service import ( + MailboxPolicy, + ) + + exchange_client.mailbox_policy = MailboxPolicy( + id="OwaMailboxPolicy-Default", additional_storage_enabled=False + ) + + check = exchange_mailbox_policy_additional_storage_restricted() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Exchange mailbox policy restricts additional storage providers." + ) + assert result[0].resource == exchange_client.mailbox_policy.dict() + assert result[0].resource_name == "Exchange Mailbox Policy" + assert result[0].resource_id == "OwaMailboxPolicy-Default" + assert result[0].location == "global" + + def test_mailbox_policy_allows_additional_storage(self): + exchange_client = mock.MagicMock() + exchange_client.audited_tenant = "audited_tenant" + exchange_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.exchange.exchange_mailbox_policy_additional_storage_restricted.exchange_mailbox_policy_additional_storage_restricted.exchange_client", + new=exchange_client, + ), + ): + from prowler.providers.m365.services.exchange.exchange_mailbox_policy_additional_storage_restricted.exchange_mailbox_policy_additional_storage_restricted import ( + exchange_mailbox_policy_additional_storage_restricted, + ) + from prowler.providers.m365.services.exchange.exchange_service import ( + MailboxPolicy, + ) + + exchange_client.mailbox_policy = MailboxPolicy( + id="OwaMailboxPolicy-Default", additional_storage_enabled=True + ) + + check = exchange_mailbox_policy_additional_storage_restricted() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Exchange mailbox policy allows additional storage providers." + ) + assert result[0].resource == exchange_client.mailbox_policy.dict() + assert result[0].resource_name == "Exchange Mailbox Policy" + assert result[0].resource_id == "OwaMailboxPolicy-Default" + assert result[0].location == "global" + + def test_no_mailbox_policy(self): + exchange_client = mock.MagicMock() + exchange_client.audited_tenant = "audited_tenant" + exchange_client.audited_domain = DOMAIN + exchange_client.mailbox_policy = None + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.exchange.exchange_mailbox_policy_additional_storage_restricted.exchange_mailbox_policy_additional_storage_restricted.exchange_client", + new=exchange_client, + ), + ): + from prowler.providers.m365.services.exchange.exchange_mailbox_policy_additional_storage_restricted.exchange_mailbox_policy_additional_storage_restricted import ( + exchange_mailbox_policy_additional_storage_restricted, + ) + + check = exchange_mailbox_policy_additional_storage_restricted() + result = check.execute() + assert len(result) == 0 diff --git a/tests/providers/m365/services/exchange/exchange_organization_mailbox_auditing_enabled/exchange_organization_mailbox_auditing_enabled_test.py b/tests/providers/m365/services/exchange/exchange_organization_mailbox_auditing_enabled/exchange_organization_mailbox_auditing_enabled_test.py new file mode 100644 index 0000000000..374c8a42c9 --- /dev/null +++ b/tests/providers/m365/services/exchange/exchange_organization_mailbox_auditing_enabled/exchange_organization_mailbox_auditing_enabled_test.py @@ -0,0 +1,130 @@ +from unittest import mock + +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_exchange_organization_mailbox_auditing_enabled: + def test_no_organization(self): + exchange_client = mock.MagicMock() + exchange_client.audited_tenant = "audited_tenant" + exchange_client.audited_domain = DOMAIN + exchange_client.organization_config = None + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.exchange.exchange_organization_mailbox_auditing_enabled.exchange_organization_mailbox_auditing_enabled.exchange_client", + new=exchange_client, + ), + ): + from prowler.providers.m365.services.exchange.exchange_organization_mailbox_auditing_enabled.exchange_organization_mailbox_auditing_enabled import ( + exchange_organization_mailbox_auditing_enabled, + ) + + check = exchange_organization_mailbox_auditing_enabled() + result = check.execute() + assert len(result) == 0 + + def test_audit_log_search_disabled(self): + exchange_client = mock.MagicMock() + exchange_client.audited_tenant = "audited_tenant" + exchange_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.exchange.exchange_organization_mailbox_auditing_enabled.exchange_organization_mailbox_auditing_enabled.exchange_client", + new=exchange_client, + ), + ): + from prowler.providers.m365.services.exchange.exchange_organization_mailbox_auditing_enabled.exchange_organization_mailbox_auditing_enabled import ( + exchange_organization_mailbox_auditing_enabled, + ) + from prowler.providers.m365.services.exchange.exchange_service import ( + Organization, + ) + + exchange_client.organization_config = Organization( + audit_disabled=True, + name="test", + guid="test", + oauth_enabled=True, + mailtips_enabled=True, + mailtips_external_recipient_enabled=True, + mailtips_group_metrics_enabled=True, + mailtips_large_audience_threshold=25, + ) + + check = exchange_organization_mailbox_auditing_enabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Exchange mailbox auditing is not enabled on your organization." + ) + assert result[0].resource == exchange_client.organization_config.dict() + assert result[0].resource_name == "test" + assert result[0].resource_id == "test" + assert result[0].location == "global" + + def test_audit_log_search_enabled(self): + exchange_client = mock.MagicMock() + exchange_client.audited_tenant = "audited_tenant" + exchange_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.exchange.exchange_organization_mailbox_auditing_enabled.exchange_organization_mailbox_auditing_enabled.exchange_client", + new=exchange_client, + ), + ): + from prowler.providers.m365.services.exchange.exchange_organization_mailbox_auditing_enabled.exchange_organization_mailbox_auditing_enabled import ( + exchange_organization_mailbox_auditing_enabled, + ) + from prowler.providers.m365.services.exchange.exchange_service import ( + Organization, + ) + + exchange_client.organization_config = Organization( + audit_disabled=False, + name="test", + guid="test", + oauth_enabled=True, + mailtips_enabled=True, + mailtips_external_recipient_enabled=True, + mailtips_group_metrics_enabled=True, + mailtips_large_audience_threshold=25, + ) + + check = exchange_organization_mailbox_auditing_enabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Exchange mailbox auditing is enabled on your organization." + ) + assert result[0].resource == exchange_client.organization_config.dict() + assert result[0].resource_name == "test" + assert result[0].resource_id == "test" + assert result[0].location == "global" diff --git a/tests/providers/m365/services/exchange/exchange_organization_mailtips_enabled/exchange_organization_mailtips_enabled_test.py b/tests/providers/m365/services/exchange/exchange_organization_mailtips_enabled/exchange_organization_mailtips_enabled_test.py new file mode 100644 index 0000000000..d3355b7f3e --- /dev/null +++ b/tests/providers/m365/services/exchange/exchange_organization_mailtips_enabled/exchange_organization_mailtips_enabled_test.py @@ -0,0 +1,138 @@ +from unittest import mock + +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_exchange_organization_mailtips_enabled: + def test_no_organization(self): + exchange_client = mock.MagicMock() + exchange_client.audited_tenant = "audited_tenant" + exchange_client.audited_domain = DOMAIN + exchange_client.organization_config = None + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.exchange.exchange_organization_mailtips_enabled.exchange_organization_mailtips_enabled.exchange_client", + new=exchange_client, + ), + ): + from prowler.providers.m365.services.exchange.exchange_organization_mailtips_enabled.exchange_organization_mailtips_enabled import ( + exchange_organization_mailtips_enabled, + ) + + check = exchange_organization_mailtips_enabled() + result = check.execute() + assert result == [] + + def test_mailtips_not_fully_enabled(self): + exchange_client = mock.MagicMock() + exchange_client.audited_tenant = "audited_tenant" + exchange_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.exchange.exchange_organization_mailtips_enabled.exchange_organization_mailtips_enabled.exchange_client", + new=exchange_client, + ), + ): + from prowler.providers.m365.services.exchange.exchange_organization_mailtips_enabled.exchange_organization_mailtips_enabled import ( + exchange_organization_mailtips_enabled, + ) + from prowler.providers.m365.services.exchange.exchange_service import ( + Organization, + ) + + exchange_client.audit_config = { + "recommended_mailtips_large_audience_threshold": 25 + } + + exchange_client.organization_config = Organization( + name="test-org", + guid="org-guid", + audit_disabled=False, + oauth_enabled=True, + mailtips_enabled=False, + mailtips_external_recipient_enabled=False, + mailtips_group_metrics_enabled=True, + mailtips_large_audience_threshold=25, + ) + + check = exchange_organization_mailtips_enabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "MailTips are not fully enabled for Exchange Online." + ) + assert result[0].resource_name == "test-org" + assert result[0].resource_id == "org-guid" + assert result[0].location == "global" + assert result[0].resource == exchange_client.organization_config.dict() + + def test_mailtips_fully_enabled(self): + exchange_client = mock.MagicMock() + exchange_client.audited_tenant = "audited_tenant" + exchange_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.exchange.exchange_organization_mailtips_enabled.exchange_organization_mailtips_enabled.exchange_client", + new=exchange_client, + ), + ): + from prowler.providers.m365.services.exchange.exchange_organization_mailtips_enabled.exchange_organization_mailtips_enabled import ( + exchange_organization_mailtips_enabled, + ) + from prowler.providers.m365.services.exchange.exchange_service import ( + Organization, + ) + + exchange_client.audit_config = { + "recommended_mailtips_large_audience_threshold": 25 + } + + exchange_client.organization_config = Organization( + name="test-org", + guid="org-guid", + audit_disabled=False, + oauth_enabled=True, + mailtips_enabled=True, + mailtips_external_recipient_enabled=True, + mailtips_group_metrics_enabled=True, + mailtips_large_audience_threshold=25, + ) + + check = exchange_organization_mailtips_enabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "MailTips are fully enabled for Exchange Online." + ) + assert result[0].resource_name == "test-org" + assert result[0].resource_id == "org-guid" + assert result[0].location == "global" + assert result[0].resource == exchange_client.organization_config.dict() diff --git a/tests/providers/m365/services/exchange/exchange_organization_modern_authentication_enabled/exchange_organization_modern_authentication_enabled_test.py b/tests/providers/m365/services/exchange/exchange_organization_modern_authentication_enabled/exchange_organization_modern_authentication_enabled_test.py new file mode 100644 index 0000000000..419453c397 --- /dev/null +++ b/tests/providers/m365/services/exchange/exchange_organization_modern_authentication_enabled/exchange_organization_modern_authentication_enabled_test.py @@ -0,0 +1,130 @@ +from unittest import mock + +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_exchange_organization_modern_authentication_enabled: + def test_no_organization(self): + exchange_client = mock.MagicMock() + exchange_client.audited_tenant = "audited_tenant" + exchange_client.audited_domain = DOMAIN + exchange_client.organization_config = None + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.exchange.exchange_organization_modern_authentication_enabled.exchange_organization_modern_authentication_enabled.exchange_client", + new=exchange_client, + ), + ): + from prowler.providers.m365.services.exchange.exchange_organization_modern_authentication_enabled.exchange_organization_modern_authentication_enabled import ( + exchange_organization_modern_authentication_enabled, + ) + + check = exchange_organization_modern_authentication_enabled() + result = check.execute() + assert len(result) == 0 + + def test_modern_authentication_disabled(self): + exchange_client = mock.MagicMock() + exchange_client.audited_tenant = "audited_tenant" + exchange_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.exchange.exchange_organization_modern_authentication_enabled.exchange_organization_modern_authentication_enabled.exchange_client", + new=exchange_client, + ), + ): + from prowler.providers.m365.services.exchange.exchange_organization_modern_authentication_enabled.exchange_organization_modern_authentication_enabled import ( + exchange_organization_modern_authentication_enabled, + ) + from prowler.providers.m365.services.exchange.exchange_service import ( + Organization, + ) + + exchange_client.organization_config = Organization( + oauth_enabled=False, + name="test", + guid="test", + audit_disabled=False, + mailtips_enabled=False, + mailtips_external_recipient_enabled=False, + mailtips_group_metrics_enabled=True, + mailtips_large_audience_threshold=25, + ) + + check = exchange_organization_modern_authentication_enabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Modern Authentication is not enabled for Exchange Online." + ) + assert result[0].resource == exchange_client.organization_config.dict() + assert result[0].resource_name == "test" + assert result[0].resource_id == "test" + assert result[0].location == "global" + + def test_modern_authentication_enabled(self): + exchange_client = mock.MagicMock() + exchange_client.audited_tenant = "audited_tenant" + exchange_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.exchange.exchange_organization_modern_authentication_enabled.exchange_organization_modern_authentication_enabled.exchange_client", + new=exchange_client, + ), + ): + from prowler.providers.m365.services.exchange.exchange_organization_modern_authentication_enabled.exchange_organization_modern_authentication_enabled import ( + exchange_organization_modern_authentication_enabled, + ) + from prowler.providers.m365.services.exchange.exchange_service import ( + Organization, + ) + + exchange_client.organization_config = Organization( + oauth_enabled=True, + name="test", + guid="test", + audit_disabled=False, + mailtips_enabled=False, + mailtips_external_recipient_enabled=False, + mailtips_group_metrics_enabled=True, + mailtips_large_audience_threshold=25, + ) + + check = exchange_organization_modern_authentication_enabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Modern Authentication is enabled for Exchange Online." + ) + assert result[0].resource == exchange_client.organization_config.dict() + assert result[0].resource_name == "test" + assert result[0].resource_id == "test" + assert result[0].location == "global" diff --git a/tests/providers/m365/services/exchange/exchange_roles_assignment_policy_addins_disabled/exchange_roles_assignment_policy_addins_disabled_test.py b/tests/providers/m365/services/exchange/exchange_roles_assignment_policy_addins_disabled/exchange_roles_assignment_policy_addins_disabled_test.py new file mode 100644 index 0000000000..1f28ee407f --- /dev/null +++ b/tests/providers/m365/services/exchange/exchange_roles_assignment_policy_addins_disabled/exchange_roles_assignment_policy_addins_disabled_test.py @@ -0,0 +1,129 @@ +from unittest import mock + +from prowler.providers.m365.services.exchange.exchange_service import ( + RoleAssignmentPolicy, +) +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_exchange_roles_assignment_policy_addins_disabled: + def test_no_policies(self): + exchange_client = mock.MagicMock() + exchange_client.audited_tenant = "audited_tenant" + exchange_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online", + ), + mock.patch( + "prowler.providers.m365.services.exchange.exchange_roles_assignment_policy_addins_disabled.exchange_roles_assignment_policy_addins_disabled.exchange_client", + new=exchange_client, + ), + ): + from prowler.providers.m365.services.exchange.exchange_roles_assignment_policy_addins_disabled.exchange_roles_assignment_policy_addins_disabled import ( + exchange_roles_assignment_policy_addins_disabled, + ) + + exchange_client.role_assignment_policies = [] + + check = exchange_roles_assignment_policy_addins_disabled() + result = check.execute() + + assert len(result) == 0 + + def test_policy_with_no_addin_roles(self): + exchange_client = mock.MagicMock() + exchange_client.audited_tenant = "audited_tenant" + exchange_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online", + ), + mock.patch( + "prowler.providers.m365.services.exchange.exchange_roles_assignment_policy_addins_disabled.exchange_roles_assignment_policy_addins_disabled.exchange_client", + new=exchange_client, + ), + ): + from prowler.providers.m365.services.exchange.exchange_roles_assignment_policy_addins_disabled.exchange_roles_assignment_policy_addins_disabled import ( + exchange_roles_assignment_policy_addins_disabled, + ) + + exchange_client.role_assignment_policies = [ + RoleAssignmentPolicy( + name="Policy1", + id="id-policy1", + assigned_roles=["My Base Options", "My Voice Mail"], + ) + ] + + check = exchange_roles_assignment_policy_addins_disabled() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Role assignment policy 'Policy1' does not allow Outlook add-ins." + ) + assert result[0].resource_name == "Policy1" + assert result[0].resource_id == "id-policy1" + assert result[0].location == "global" + assert ( + result[0].resource == exchange_client.role_assignment_policies[0].dict() + ) + + def test_policy_with_addin_roles(self): + exchange_client = mock.MagicMock() + exchange_client.audited_tenant = "audited_tenant" + exchange_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online", + ), + mock.patch( + "prowler.providers.m365.services.exchange.exchange_roles_assignment_policy_addins_disabled.exchange_roles_assignment_policy_addins_disabled.exchange_client", + new=exchange_client, + ), + ): + from prowler.providers.m365.services.exchange.exchange_roles_assignment_policy_addins_disabled.exchange_roles_assignment_policy_addins_disabled import ( + exchange_roles_assignment_policy_addins_disabled, + ) + + exchange_client.role_assignment_policies = [ + RoleAssignmentPolicy( + name="Policy2", + id="id-policy2", + assigned_roles=["My Custom Apps", "My Voice Mail"], + ) + ] + + check = exchange_roles_assignment_policy_addins_disabled() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Role assignment policy 'Policy2' allows Outlook add-ins via roles: My Custom Apps." + ) + assert result[0].resource_name == "Policy2" + assert result[0].resource_id == "id-policy2" + assert result[0].location == "global" + assert ( + result[0].resource == exchange_client.role_assignment_policies[0].dict() + ) diff --git a/tests/providers/m365/services/exchange/exchange_service_test.py b/tests/providers/m365/services/exchange/exchange_service_test.py new file mode 100644 index 0000000000..c3ba2a151e --- /dev/null +++ b/tests/providers/m365/services/exchange/exchange_service_test.py @@ -0,0 +1,407 @@ +from unittest import mock +from unittest.mock import patch + +from prowler.providers.m365.models import M365IdentityInfo +from prowler.providers.m365.services.exchange.exchange_service import ( + Exchange, + ExternalMailConfig, + MailboxAuditConfig, + MailboxAuditProperties, + MailboxPolicy, + Organization, + RoleAssignmentPolicy, + TransportConfig, + TransportRule, +) +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +def mock_exchange_get_organization_config(_): + return Organization( + audit_disabled=True, + name="test", + guid="test", + oauth_enabled=True, + mailtips_enabled=True, + mailtips_external_recipient_enabled=False, + mailtips_group_metrics_enabled=True, + mailtips_large_audience_threshold=25, + ) + + +def mock_exchange_get_mailbox_audit_config(_): + return [ + MailboxAuditConfig(name="test", id="test", audit_bypass_enabled=False), + MailboxAuditConfig(name="test2", id="test2", audit_bypass_enabled=True), + ] + + +def mock_exchange_get_external_mail_config(_): + return [ + ExternalMailConfig( + identity="test", + external_mail_tag_enabled=True, + ), + ExternalMailConfig( + identity="test2", + external_mail_tag_enabled=False, + ), + ] + + +def mock_exchange_get_transport_rules(_): + return [ + TransportRule( + name="test", + scl=-1, + sender_domain_is=["example.com"], + redirect_message_to=None, + ), + TransportRule( + name="test2", + scl=0, + sender_domain_is=["example.com"], + redirect_message_to=["test@example.com"], + ), + ] + + +def mock_exchange_get_transport_config(_): + return TransportConfig( + smtp_auth_disabled=True, + ) + + +def mock_exchange_get_mailbox_policy(_): + return MailboxPolicy( + id="test", + additional_storage_enabled=True, + ) + + +def mock_exchange_get_role_assignment_policies(_): + return [ + RoleAssignmentPolicy( + name="Default Role Assignment Policy", + id="12345678-1234-1234-1234", + assigned_roles=[ + "MyProfileInformation", + "MyDistributionGroupMembership", + "MyRetentionPolicies", + "MyDistributionGroups", + "MyVoiceMail", + ], + ), + RoleAssignmentPolicy( + name="Test Policy", + id="12345678-1234-1234", + assigned_roles=[], + ), + ] + + +def mock_exchange_get_mailbox_audit_properties(_): + return [ + MailboxAuditProperties( + name="User1", + audit_enabled=False, + audit_admin=[ + "Update", + "MoveToDeletedItems", + "SoftDelete", + "HardDelete", + "SendAs", + "SendOnBehalf", + "Create", + "UpdateFolderPermissions", + "UpdateInboxRules", + "UpdateCalendarDelegation", + "ApplyRecord", + "MailItemsAccessed", + "Send", + ], + audit_delegate=[ + "Update", + "MoveToDeletedItems", + "SoftDelete", + "HardDelete", + "SendAs", + "SendOnBehalf", + "Create", + "UpdateFolderPermissions", + "UpdateInboxRules", + "ApplyRecord", + "MailItemsAccessed", + ], + audit_owner=[ + "Update", + "MoveToDeletedItems", + "SoftDelete", + "HardDelete", + "UpdateFolderPermissions", + "UpdateInboxRules", + "UpdateCalendarDelegation", + "ApplyRecord", + "MailItemsAccessed", + "Send", + ], + audit_log_age=90, + identity="test", + ) + ] + + +class Test_Exchange_Service: + def test_get_client(self): + with ( + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + ): + exchange_client = Exchange( + set_mocked_m365_provider( + identity=M365IdentityInfo(tenant_domain=DOMAIN) + ) + ) + assert exchange_client.client.__class__.__name__ == "GraphServiceClient" + assert exchange_client.powershell.__class__.__name__ == "M365PowerShell" + exchange_client.powershell.close() + + @patch( + "prowler.providers.m365.services.exchange.exchange_service.Exchange._get_organization_config", + new=mock_exchange_get_organization_config, + ) + def test_get_organization_config(self): + with ( + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + ): + exchange_client = Exchange( + set_mocked_m365_provider( + identity=M365IdentityInfo(tenant_domain=DOMAIN) + ) + ) + organization_config = exchange_client.organization_config + assert organization_config.name == "test" + assert organization_config.guid == "test" + assert organization_config.audit_disabled is True + assert organization_config.oauth_enabled is True + assert organization_config.mailtips_enabled is True + assert organization_config.mailtips_external_recipient_enabled is False + assert organization_config.mailtips_group_metrics_enabled is True + assert organization_config.mailtips_large_audience_threshold == 25 + + exchange_client.powershell.close() + + @patch( + "prowler.providers.m365.services.exchange.exchange_service.Exchange._get_mailbox_audit_config", + new=mock_exchange_get_mailbox_audit_config, + ) + def test_get_mailbox_audit_config(self): + with ( + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + ): + exchange_client = Exchange( + set_mocked_m365_provider( + identity=M365IdentityInfo(tenant_domain=DOMAIN) + ) + ) + mailbox_audit_config = exchange_client.mailboxes_config + assert len(mailbox_audit_config) == 2 + assert mailbox_audit_config[0].name == "test" + assert mailbox_audit_config[0].id == "test" + assert mailbox_audit_config[0].audit_bypass_enabled is False + assert mailbox_audit_config[1].name == "test2" + assert mailbox_audit_config[1].id == "test2" + assert mailbox_audit_config[1].audit_bypass_enabled is True + + exchange_client.powershell.close() + + @patch( + "prowler.providers.m365.services.exchange.exchange_service.Exchange._get_external_mail_config", + new=mock_exchange_get_external_mail_config, + ) + def test_get_external_mail_config(self): + with ( + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + ): + exchange_client = Exchange( + set_mocked_m365_provider( + identity=M365IdentityInfo(tenant_domain=DOMAIN) + ) + ) + external_mail_config = exchange_client.external_mail_config + assert len(external_mail_config) == 2 + assert external_mail_config[0].identity == "test" + assert external_mail_config[0].external_mail_tag_enabled is True + assert external_mail_config[1].identity == "test2" + assert external_mail_config[1].external_mail_tag_enabled is False + exchange_client.powershell.close() + + @patch( + "prowler.providers.m365.services.exchange.exchange_service.Exchange._get_transport_rules", + new=mock_exchange_get_transport_rules, + ) + def test_get_transport_rules(self): + with ( + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + ): + exchange_client = Exchange( + set_mocked_m365_provider( + identity=M365IdentityInfo(tenant_domain=DOMAIN) + ) + ) + transport_rules = exchange_client.transport_rules + assert len(transport_rules) == 2 + assert transport_rules[0].name == "test" + assert transport_rules[0].scl == -1 + assert transport_rules[0].sender_domain_is == ["example.com"] + assert transport_rules[0].redirect_message_to is None + assert transport_rules[1].name == "test2" + assert transport_rules[1].scl == 0 + assert transport_rules[1].sender_domain_is == ["example.com"] + assert transport_rules[1].redirect_message_to == ["test@example.com"] + + exchange_client.powershell.close() + + @patch( + "prowler.providers.m365.services.exchange.exchange_service.Exchange._get_mailbox_policy", + new=mock_exchange_get_mailbox_policy, + ) + def test_get_mailbox_policy(self): + with ( + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + ): + exchange_client = Exchange( + set_mocked_m365_provider( + identity=M365IdentityInfo(tenant_domain=DOMAIN) + ) + ) + mailbox_policy = exchange_client.mailbox_policy + assert mailbox_policy.id == "test" + assert mailbox_policy.additional_storage_enabled is True + exchange_client.powershell.close() + + @patch( + "prowler.providers.m365.services.exchange.exchange_service.Exchange._get_transport_config", + new=mock_exchange_get_transport_config, + ) + def test_get_transport_config(self): + with ( + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + ): + exchange_client = Exchange( + set_mocked_m365_provider( + identity=M365IdentityInfo(tenant_domain=DOMAIN) + ) + ) + transport_config = exchange_client.transport_config + assert transport_config.smtp_auth_disabled is True + + exchange_client.powershell.close() + + @patch( + "prowler.providers.m365.services.exchange.exchange_service.Exchange._get_mailbox_audit_properties", + new=mock_exchange_get_mailbox_audit_properties, + ) + def test_get_mailbox_audit_properties(self): + with ( + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + ): + exchange_client = Exchange( + set_mocked_m365_provider( + identity=M365IdentityInfo(tenant_domain=DOMAIN) + ) + ) + mailbox_audit_properties = exchange_client.mailbox_audit_properties + assert len(mailbox_audit_properties) == 1 + assert mailbox_audit_properties[0].name == "User1" + assert mailbox_audit_properties[0].audit_enabled is False + assert mailbox_audit_properties[0].audit_admin == [ + "Update", + "MoveToDeletedItems", + "SoftDelete", + "HardDelete", + "SendAs", + "SendOnBehalf", + "Create", + "UpdateFolderPermissions", + "UpdateInboxRules", + "UpdateCalendarDelegation", + "ApplyRecord", + "MailItemsAccessed", + "Send", + ] + assert mailbox_audit_properties[0].audit_delegate == [ + "Update", + "MoveToDeletedItems", + "SoftDelete", + "HardDelete", + "SendAs", + "SendOnBehalf", + "Create", + "UpdateFolderPermissions", + "UpdateInboxRules", + "ApplyRecord", + "MailItemsAccessed", + ] + assert mailbox_audit_properties[0].audit_owner == [ + "Update", + "MoveToDeletedItems", + "SoftDelete", + "HardDelete", + "UpdateFolderPermissions", + "UpdateInboxRules", + "UpdateCalendarDelegation", + "ApplyRecord", + "MailItemsAccessed", + "Send", + ] + assert mailbox_audit_properties[0].audit_log_age == 90 + assert mailbox_audit_properties[0].identity == "test" + exchange_client.powershell.close() + + @patch( + "prowler.providers.m365.services.exchange.exchange_service.Exchange._get_role_assignment_policies", + new=mock_exchange_get_role_assignment_policies, + ) + def test_get_role_assignment_policies(self): + with ( + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + ): + exchange_client = Exchange( + set_mocked_m365_provider( + identity=M365IdentityInfo(tenant_domain=DOMAIN) + ) + ) + role_assignment_policies = exchange_client.role_assignment_policies + assert len(role_assignment_policies) == 2 + assert role_assignment_policies[0].name == "Default Role Assignment Policy" + assert role_assignment_policies[0].id == "12345678-1234-1234-1234" + assert role_assignment_policies[0].assigned_roles == [ + "MyProfileInformation", + "MyDistributionGroupMembership", + "MyRetentionPolicies", + "MyDistributionGroups", + "MyVoiceMail", + ] + assert role_assignment_policies[1].name == "Test Policy" + assert role_assignment_policies[1].id == "12345678-1234-1234" + assert role_assignment_policies[1].assigned_roles == [] + + exchange_client.powershell.close() diff --git a/tests/providers/m365/services/exchange/exchange_transport_config_smtp_auth_disabled/exchange_transport_config_smtp_auth_disabled_test.py b/tests/providers/m365/services/exchange/exchange_transport_config_smtp_auth_disabled/exchange_transport_config_smtp_auth_disabled_test.py new file mode 100644 index 0000000000..b1e904b473 --- /dev/null +++ b/tests/providers/m365/services/exchange/exchange_transport_config_smtp_auth_disabled/exchange_transport_config_smtp_auth_disabled_test.py @@ -0,0 +1,112 @@ +from unittest import mock + +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_exchange_transport_config_smtp_auth_disabled: + def test_no_transport_config(self): + exchange_client = mock.MagicMock() + exchange_client.audited_tenant = "audited_tenant" + exchange_client.audited_domain = DOMAIN + exchange_client.transport_config = None + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.exchange.exchange_transport_config_smtp_auth_disabled.exchange_transport_config_smtp_auth_disabled.exchange_client", + new=exchange_client, + ), + ): + from prowler.providers.m365.services.exchange.exchange_transport_config_smtp_auth_disabled.exchange_transport_config_smtp_auth_disabled import ( + exchange_transport_config_smtp_auth_disabled, + ) + + check = exchange_transport_config_smtp_auth_disabled() + result = check.execute() + assert len(result) == 0 + + def test_smtp_auth_enabled(self): + exchange_client = mock.MagicMock() + exchange_client.audited_tenant = "audited_tenant" + exchange_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.exchange.exchange_transport_config_smtp_auth_disabled.exchange_transport_config_smtp_auth_disabled.exchange_client", + new=exchange_client, + ), + ): + from prowler.providers.m365.services.exchange.exchange_service import ( + TransportConfig, + ) + from prowler.providers.m365.services.exchange.exchange_transport_config_smtp_auth_disabled.exchange_transport_config_smtp_auth_disabled import ( + exchange_transport_config_smtp_auth_disabled, + ) + + exchange_client.transport_config = TransportConfig(smtp_auth_disabled=False) + + check = exchange_transport_config_smtp_auth_disabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "SMTP AUTH is enabled in the Exchange Online Transport Config." + ) + assert result[0].resource == exchange_client.transport_config.dict() + assert result[0].resource_name == "Transport Configuration" + assert result[0].resource_id == "transport_config" + assert result[0].location == "global" + + def test_smtp_auth_disabled(self): + exchange_client = mock.MagicMock() + exchange_client.audited_tenant = "audited_tenant" + exchange_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.exchange.exchange_transport_config_smtp_auth_disabled.exchange_transport_config_smtp_auth_disabled.exchange_client", + new=exchange_client, + ), + ): + from prowler.providers.m365.services.exchange.exchange_service import ( + TransportConfig, + ) + from prowler.providers.m365.services.exchange.exchange_transport_config_smtp_auth_disabled.exchange_transport_config_smtp_auth_disabled import ( + exchange_transport_config_smtp_auth_disabled, + ) + + exchange_client.transport_config = TransportConfig(smtp_auth_disabled=True) + + check = exchange_transport_config_smtp_auth_disabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "SMTP AUTH is disabled in the Exchange Online Transport Config." + ) + assert result[0].resource == exchange_client.transport_config.dict() + assert result[0].resource_name == "Transport Configuration" + assert result[0].resource_id == "transport_config" + assert result[0].location == "global" diff --git a/tests/providers/m365/services/exchange/exchange_transport_rules_mail_forwarding_disabled/exchange_transport_rules_mail_forwarding_disabled_test.py b/tests/providers/m365/services/exchange/exchange_transport_rules_mail_forwarding_disabled/exchange_transport_rules_mail_forwarding_disabled_test.py new file mode 100644 index 0000000000..5523e51e18 --- /dev/null +++ b/tests/providers/m365/services/exchange/exchange_transport_rules_mail_forwarding_disabled/exchange_transport_rules_mail_forwarding_disabled_test.py @@ -0,0 +1,145 @@ +from unittest import mock + +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_exchange_transport_rules_mail_forwarding_disabled: + def test_empty_rule_list(self): + exchange_client = mock.MagicMock() + exchange_client.audited_tenant = "audited_tenant" + exchange_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.exchange.exchange_transport_rules_mail_forwarding_disabled.exchange_transport_rules_mail_forwarding_disabled.exchange_client", + new=exchange_client, + ), + ): + from prowler.providers.m365.services.exchange.exchange_transport_rules_mail_forwarding_disabled.exchange_transport_rules_mail_forwarding_disabled import ( + exchange_transport_rules_mail_forwarding_disabled, + ) + + exchange_client.transport_rules = [] + + check = exchange_transport_rules_mail_forwarding_disabled() + result = check.execute() + + assert len(result) == 0 + + def test_forwarding_disabled(self): + exchange_client = mock.MagicMock() + exchange_client.audited_tenant = "audited_tenant" + exchange_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.exchange.exchange_transport_rules_mail_forwarding_disabled.exchange_transport_rules_mail_forwarding_disabled.exchange_client", + new=exchange_client, + ), + ): + from prowler.providers.m365.services.exchange.exchange_service import ( + TransportRule, + ) + from prowler.providers.m365.services.exchange.exchange_transport_rules_mail_forwarding_disabled.exchange_transport_rules_mail_forwarding_disabled import ( + exchange_transport_rules_mail_forwarding_disabled, + ) + + exchange_client.transport_rules = [ + TransportRule( + name="Rule1", redirect_message_to=[], sender_domain_is=[] + ), + TransportRule( + name="Rule2", redirect_message_to=[], sender_domain_is=[] + ), + ] + + check = exchange_transport_rules_mail_forwarding_disabled() + result = check.execute() + + assert len(result) == 2 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Transport rule Rule1 does not allow forwarding mail to external domains." + ) + assert result[0].resource_name == "Rule1" + assert result[0].resource_id == "ExchangeTransportRule" + assert result[1].status == "PASS" + assert ( + result[1].status_extended + == "Transport rule Rule2 does not allow forwarding mail to external domains." + ) + assert result[1].resource_name == "Rule2" + + def test_forwarding_enabled(self): + exchange_client = mock.MagicMock() + exchange_client.audited_tenant = "audited_tenant" + exchange_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.exchange.exchange_transport_rules_mail_forwarding_disabled.exchange_transport_rules_mail_forwarding_disabled.exchange_client", + new=exchange_client, + ), + ): + from prowler.providers.m365.services.exchange.exchange_service import ( + TransportRule, + ) + from prowler.providers.m365.services.exchange.exchange_transport_rules_mail_forwarding_disabled.exchange_transport_rules_mail_forwarding_disabled import ( + exchange_transport_rules_mail_forwarding_disabled, + ) + + exchange_client.transport_rules = [ + TransportRule( + name="ForwardingRule", + redirect_message_to=["external@example.com"], + sender_domain_is=[], + ), + TransportRule( + name="NoForwardingRule", + redirect_message_to=[], + sender_domain_is=[], + ), + ] + + check = exchange_transport_rules_mail_forwarding_disabled() + result = check.execute() + + assert len(result) == 2 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Transport rule ForwardingRule allows forwarding mail to external domains: external@example.com." + ) + assert result[0].resource_name == "ForwardingRule" + assert result[0].resource_id == "ExchangeTransportRule" + assert result[0].location == "global" + assert result[1].status == "PASS" + assert ( + result[1].status_extended + == "Transport rule NoForwardingRule does not allow forwarding mail to external domains." + ) + assert result[1].resource_name == "NoForwardingRule" + assert result[1].resource_id == "ExchangeTransportRule" + assert result[1].location == "global" diff --git a/tests/providers/m365/services/exchange/exchange_transport_rules_whitelist_disabled/exchange_transport_rules_whitelist_disabled_test.py b/tests/providers/m365/services/exchange/exchange_transport_rules_whitelist_disabled/exchange_transport_rules_whitelist_disabled_test.py new file mode 100644 index 0000000000..daea4fd1de --- /dev/null +++ b/tests/providers/m365/services/exchange/exchange_transport_rules_whitelist_disabled/exchange_transport_rules_whitelist_disabled_test.py @@ -0,0 +1,135 @@ +from unittest import mock + +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_exchange_transport_rules_whitelist_disabled: + def test_no_whitelist_domains(self): + exchange_client = mock.MagicMock() + exchange_client.audited_tenant = "audited_tenant" + exchange_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.exchange.exchange_transport_rules_whitelist_disabled.exchange_transport_rules_whitelist_disabled.exchange_client", + new=exchange_client, + ), + ): + from prowler.providers.m365.services.exchange.exchange_service import ( + TransportRule, + ) + from prowler.providers.m365.services.exchange.exchange_transport_rules_whitelist_disabled.exchange_transport_rules_whitelist_disabled import ( + exchange_transport_rules_whitelist_disabled, + ) + + exchange_client.transport_rules = [ + TransportRule(name="Rule1", scl=0, sender_domain_is=[]), + TransportRule(name="Rule2", scl=0, sender_domain_is=["example.com"]), + ] + + check = exchange_transport_rules_whitelist_disabled() + result = check.execute() + + assert len(result) == 2 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Transport rule Rule1 does not whitelist any domains." + ) + assert result[0].resource_name == "Rule1" + assert result[0].resource_id == "ExchangeTransportRule" + assert result[1].status == "PASS" + assert ( + result[1].status_extended + == "Transport rule Rule2 does not whitelist any domains." + ) + assert result[1].resource_name == "Rule2" + + def test_whitelist_detected(self): + exchange_client = mock.MagicMock() + exchange_client.audited_tenant = "audited_tenant" + exchange_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.exchange.exchange_transport_rules_whitelist_disabled.exchange_transport_rules_whitelist_disabled.exchange_client", + new=exchange_client, + ), + ): + from prowler.providers.m365.services.exchange.exchange_service import ( + TransportRule, + ) + from prowler.providers.m365.services.exchange.exchange_transport_rules_whitelist_disabled.exchange_transport_rules_whitelist_disabled import ( + exchange_transport_rules_whitelist_disabled, + ) + + exchange_client.transport_rules = [ + TransportRule( + name="WhitelistRule", scl=-1, sender_domain_is=["whitelist.com"] + ), + TransportRule(name="NoWhitelistRule", scl=-1, sender_domain_is=[]), + ] + + check = exchange_transport_rules_whitelist_disabled() + result = check.execute() + + assert len(result) == 2 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Transport rule WhitelistRule whitelists domains: whitelist.com." + ) + assert result[0].resource_name == "WhitelistRule" + assert result[0].resource_id == "ExchangeTransportRule" + assert result[0].location == "global" + assert result[1].status == "PASS" + assert ( + result[1].status_extended + == "Transport rule NoWhitelistRule does not whitelist any domains." + ) + assert result[1].resource_name == "NoWhitelistRule" + assert result[1].resource_id == "ExchangeTransportRule" + assert result[1].location == "global" + + def test_empty_rule_list(self): + exchange_client = mock.MagicMock() + exchange_client.audited_tenant = "audited_tenant" + exchange_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.exchange.exchange_transport_rules_whitelist_disabled.exchange_transport_rules_whitelist_disabled.exchange_client", + new=exchange_client, + ), + ): + from prowler.providers.m365.services.exchange.exchange_transport_rules_whitelist_disabled.exchange_transport_rules_whitelist_disabled import ( + exchange_transport_rules_whitelist_disabled, + ) + + exchange_client.transport_rules = [] + + check = exchange_transport_rules_whitelist_disabled() + result = check.execute() + + assert len(result) == 0 diff --git a/tests/providers/m365/services/exchange/exchange_user_mailbox_auditing_enabled/exchange_user_mailbox_auditing_enabled_test.py b/tests/providers/m365/services/exchange/exchange_user_mailbox_auditing_enabled/exchange_user_mailbox_auditing_enabled_test.py new file mode 100644 index 0000000000..f4effc8059 --- /dev/null +++ b/tests/providers/m365/services/exchange/exchange_user_mailbox_auditing_enabled/exchange_user_mailbox_auditing_enabled_test.py @@ -0,0 +1,248 @@ +from unittest import mock + +from prowler.providers.m365.services.exchange.exchange_service import ( + AuditAdmin, + AuditDelegate, + AuditOwner, + MailboxAuditProperties, +) +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_exchange_user_mailbox_auditing_enabled: + def test_no_auditing_mailboxes(self): + exchange_client = mock.MagicMock() + exchange_client.audited_tenant = "audited_tenant" + exchange_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.exchange.exchange_user_mailbox_auditing_enabled.exchange_user_mailbox_auditing_enabled.exchange_client", + new=exchange_client, + ), + ): + from prowler.providers.m365.services.exchange.exchange_user_mailbox_auditing_enabled.exchange_user_mailbox_auditing_enabled import ( + exchange_user_mailbox_auditing_enabled, + ) + + exchange_client.mailbox_audit_properties = [] + + check = exchange_user_mailbox_auditing_enabled() + result = check.execute() + + assert len(result) == 0 + + def test_auditing_fully_configured_and_log_age_valid(self): + exchange_client = mock.MagicMock() + exchange_client.audited_tenant = "audited_tenant" + exchange_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.exchange.exchange_user_mailbox_auditing_enabled.exchange_user_mailbox_auditing_enabled.exchange_client", + new=exchange_client, + ), + ): + from prowler.providers.m365.services.exchange.exchange_user_mailbox_auditing_enabled.exchange_user_mailbox_auditing_enabled import ( + exchange_user_mailbox_auditing_enabled, + ) + + exchange_client.audit_config = {"audit_log_age": 180} + + exchange_client.mailbox_audit_properties = [ + MailboxAuditProperties( + name="User1", + audit_enabled=True, + audit_admin=[e.value for e in AuditAdmin], + audit_delegate=[e.value for e in AuditDelegate], + audit_owner=[e.value for e in AuditOwner], + audit_log_age=180, + identity="User1", + ) + ] + + check = exchange_user_mailbox_auditing_enabled() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Mailbox Audit Properties for Mailbox User1 is enabled with an audit log age of 180 days." + ) + assert result[0].resource_name == "User1" + assert result[0].resource_id == "User1" + assert result[0].location == "global" + assert ( + result[0].resource == exchange_client.mailbox_audit_properties[0].dict() + ) + + def test_audit_enabled_but_incomplete_configuration(self): + exchange_client = mock.MagicMock() + exchange_client.audited_tenant = "audited_tenant" + exchange_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.exchange.exchange_user_mailbox_auditing_enabled.exchange_user_mailbox_auditing_enabled.exchange_client", + new=exchange_client, + ), + ): + from prowler.providers.m365.services.exchange.exchange_user_mailbox_auditing_enabled.exchange_user_mailbox_auditing_enabled import ( + exchange_user_mailbox_auditing_enabled, + ) + + exchange_client.audit_config = {"audit_log_age": 90} + + exchange_client.mailbox_audit_properties = [ + MailboxAuditProperties( + name="User2", + audit_enabled=True, + audit_admin=["SendAs"], + audit_delegate=["Send"], + audit_owner=["Update"], + audit_log_age=180, + identity="User2", + ) + ] + + check = exchange_user_mailbox_auditing_enabled() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Mailbox Audit Properties for Mailbox User2 is enabled but without all audit actions configured." + ) + assert result[0].resource_name == "User2" + assert result[0].resource_id == "User2" + assert result[0].location == "global" + assert ( + result[0].resource == exchange_client.mailbox_audit_properties[0].dict() + ) + + def test_audit_not_enabled(self): + exchange_client = mock.MagicMock() + exchange_client.audited_tenant = "audited_tenant" + exchange_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.exchange.exchange_user_mailbox_auditing_enabled.exchange_user_mailbox_auditing_enabled.exchange_client", + new=exchange_client, + ), + ): + from prowler.providers.m365.services.exchange.exchange_user_mailbox_auditing_enabled.exchange_user_mailbox_auditing_enabled import ( + exchange_user_mailbox_auditing_enabled, + ) + + exchange_client.audit_config = {"audit_log_age": 90} + + exchange_client.mailbox_audit_properties = [ + MailboxAuditProperties( + name="User3", + audit_enabled=False, + audit_admin=[], + audit_delegate=[], + audit_owner=[], + audit_log_age=0, + identity="User3", + ) + ] + + check = exchange_user_mailbox_auditing_enabled() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Mailbox Audit Properties for Mailbox User3 is not enabled." + ) + assert result[0].resource_name == "User3" + assert result[0].resource_id == "User3" + assert result[0].location == "global" + assert ( + result[0].resource == exchange_client.mailbox_audit_properties[0].dict() + ) + + def test_audit_enabled_but_log_age_too_low(self): + exchange_client = mock.MagicMock() + exchange_client.audited_tenant = "audited_tenant" + exchange_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.exchange.exchange_user_mailbox_auditing_enabled.exchange_user_mailbox_auditing_enabled.exchange_client", + new=exchange_client, + ), + ): + from prowler.providers.m365.services.exchange.exchange_user_mailbox_auditing_enabled.exchange_user_mailbox_auditing_enabled import ( + exchange_user_mailbox_auditing_enabled, + ) + + exchange_client.audit_config = {"audit_log_age": 90} + + exchange_client.mailbox_audit_properties = [ + MailboxAuditProperties( + name="User4", + audit_enabled=True, + audit_admin=[e.value for e in AuditAdmin], + audit_delegate=[e.value for e in AuditDelegate], + audit_owner=[e.value for e in AuditOwner], + audit_log_age=30, + identity="User4", + ) + ] + + check = exchange_user_mailbox_auditing_enabled() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Mailbox Audit Properties for Mailbox User4 is enabled but the audit log age is less than 90 days (30 days)." + ) + assert result[0].resource_name == "User4" + assert result[0].resource_id == "User4" + assert result[0].location == "global" + assert ( + result[0].resource == exchange_client.mailbox_audit_properties[0].dict() + ) diff --git a/tests/providers/m365/services/purview/purview_audit_log_search_enabled/purview_audit_log_search_enabled_test.py b/tests/providers/m365/services/purview/purview_audit_log_search_enabled/purview_audit_log_search_enabled_test.py new file mode 100644 index 0000000000..0a4fc78894 --- /dev/null +++ b/tests/providers/m365/services/purview/purview_audit_log_search_enabled/purview_audit_log_search_enabled_test.py @@ -0,0 +1,82 @@ +from unittest import mock + +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_purview_audit_log_search_enabled: + def test_audit_log_search_disabled(self): + purview_client = mock.MagicMock() + purview_client.audited_tenant = "audited_tenant" + purview_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.purview.purview_audit_log_search_enabled.purview_audit_log_search_enabled.purview_client", + new=purview_client, + ), + ): + from prowler.providers.m365.services.purview.purview_audit_log_search_enabled.purview_audit_log_search_enabled import ( + purview_audit_log_search_enabled, + ) + from prowler.providers.m365.services.purview.purview_service import ( + AuditLogConfig, + ) + + purview_client.audit_log_config = AuditLogConfig(audit_log_search=False) + + check = purview_audit_log_search_enabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended == "Purview audit log search is not enabled." + ) + assert result[0].resource == purview_client.audit_log_config.dict() + assert result[0].resource_name == "Purview Settings" + assert result[0].resource_id == "purviewSettings" + assert result[0].location == "global" + purview_client.powershell.close() + + def test_audit_log_search_enabled(self): + purview_client = mock.MagicMock() + purview_client.audited_tenant = "audited_tenant" + purview_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.purview.purview_audit_log_search_enabled.purview_audit_log_search_enabled.purview_client", + new=purview_client, + ), + ): + from prowler.providers.m365.services.purview.purview_audit_log_search_enabled.purview_audit_log_search_enabled import ( + purview_audit_log_search_enabled, + ) + from prowler.providers.m365.services.purview.purview_service import ( + AuditLogConfig, + ) + + purview_client.audit_log_config = AuditLogConfig(audit_log_search=True) + + check = purview_audit_log_search_enabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert result[0].status_extended == "Purview audit log search is enabled." + assert result[0].resource == purview_client.audit_log_config.dict() + assert result[0].resource_name == "Purview Settings" + assert result[0].resource_id == "purviewSettings" + assert result[0].location == "global" diff --git a/tests/providers/m365/services/purview/purview_service_test.py b/tests/providers/m365/services/purview/purview_service_test.py new file mode 100644 index 0000000000..9d1a9f9414 --- /dev/null +++ b/tests/providers/m365/services/purview/purview_service_test.py @@ -0,0 +1,48 @@ +from unittest import mock +from unittest.mock import patch + +from prowler.providers.m365.models import M365IdentityInfo +from prowler.providers.m365.services.purview.purview_service import ( + AuditLogConfig, + Purview, +) +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +def mock_get_audit_log_config(_): + return AuditLogConfig(audit_log_search=True) + + +class Test_Purview_Service: + def test_get_client(self): + with ( + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + ): + purview_client = Purview( + set_mocked_m365_provider( + identity=M365IdentityInfo(tenant_domain=DOMAIN) + ) + ) + assert purview_client.client.__class__.__name__ == "GraphServiceClient" + assert purview_client.powershell.__class__.__name__ == "M365PowerShell" + + @patch( + "prowler.providers.m365.services.purview.purview_service.Purview._get_audit_log_config", + new=mock_get_audit_log_config, + ) + def test_get_settings(self): + with ( + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + ): + purview_client = Purview( + set_mocked_m365_provider( + identity=M365IdentityInfo(tenant_domain=DOMAIN) + ) + ) + assert purview_client.audit_log_config == AuditLogConfig( + audit_log_search=True + ) diff --git a/tests/providers/microsoft365/services/sharepoint/sharepoint_external_sharing_managed/sharepoint_external_sharing_managed_test.py b/tests/providers/m365/services/sharepoint/sharepoint_external_sharing_managed/sharepoint_external_sharing_managed_test.py similarity index 77% rename from tests/providers/microsoft365/services/sharepoint/sharepoint_external_sharing_managed/sharepoint_external_sharing_managed_test.py rename to tests/providers/m365/services/sharepoint/sharepoint_external_sharing_managed/sharepoint_external_sharing_managed_test.py index 35f8a33478..0ba5bd69af 100644 --- a/tests/providers/microsoft365/services/sharepoint/sharepoint_external_sharing_managed/sharepoint_external_sharing_managed_test.py +++ b/tests/providers/m365/services/sharepoint/sharepoint_external_sharing_managed/sharepoint_external_sharing_managed_test.py @@ -1,12 +1,10 @@ +import uuid from unittest import mock -from prowler.providers.microsoft365.services.sharepoint.sharepoint_service import ( +from prowler.providers.m365.services.sharepoint.sharepoint_service import ( SharePointSettings, ) -from tests.providers.microsoft365.microsoft365_fixtures import ( - DOMAIN, - set_mocked_microsoft365_provider, -) +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider class Test_sharepoint_external_sharing_managed: @@ -20,14 +18,14 @@ class Test_sharepoint_external_sharing_managed: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.sharepoint.sharepoint_external_sharing_managed.sharepoint_external_sharing_managed.sharepoint_client", + "prowler.providers.m365.services.sharepoint.sharepoint_external_sharing_managed.sharepoint_external_sharing_managed.sharepoint_client", new=sharepoint_client, ), ): - from prowler.providers.microsoft365.services.sharepoint.sharepoint_external_sharing_managed.sharepoint_external_sharing_managed import ( + from prowler.providers.m365.services.sharepoint.sharepoint_external_sharing_managed.sharepoint_external_sharing_managed import ( sharepoint_external_sharing_managed, ) @@ -38,6 +36,7 @@ class Test_sharepoint_external_sharing_managed: legacyAuth=True, resharingEnabled=False, sharingDomainRestrictionMode="none", + allowedDomainGuidsForSyncApp=[uuid.uuid4()], ) sharepoint_client.tenant_domain = DOMAIN @@ -65,14 +64,14 @@ class Test_sharepoint_external_sharing_managed: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.sharepoint.sharepoint_external_sharing_managed.sharepoint_external_sharing_managed.sharepoint_client", + "prowler.providers.m365.services.sharepoint.sharepoint_external_sharing_managed.sharepoint_external_sharing_managed.sharepoint_client", new=sharepoint_client, ), ): - from prowler.providers.microsoft365.services.sharepoint.sharepoint_external_sharing_managed.sharepoint_external_sharing_managed import ( + from prowler.providers.m365.services.sharepoint.sharepoint_external_sharing_managed.sharepoint_external_sharing_managed import ( sharepoint_external_sharing_managed, ) @@ -83,6 +82,7 @@ class Test_sharepoint_external_sharing_managed: legacyAuth=True, resharingEnabled=False, sharingDomainRestrictionMode="allowList", + allowedDomainGuidsForSyncApp=[uuid.uuid4()], ) sharepoint_client.tenant_domain = DOMAIN @@ -110,14 +110,14 @@ class Test_sharepoint_external_sharing_managed: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.sharepoint.sharepoint_external_sharing_managed.sharepoint_external_sharing_managed.sharepoint_client", + "prowler.providers.m365.services.sharepoint.sharepoint_external_sharing_managed.sharepoint_external_sharing_managed.sharepoint_client", new=sharepoint_client, ), ): - from prowler.providers.microsoft365.services.sharepoint.sharepoint_external_sharing_managed.sharepoint_external_sharing_managed import ( + from prowler.providers.m365.services.sharepoint.sharepoint_external_sharing_managed.sharepoint_external_sharing_managed import ( sharepoint_external_sharing_managed, ) @@ -128,6 +128,7 @@ class Test_sharepoint_external_sharing_managed: legacyAuth=True, resharingEnabled=False, sharingDomainRestrictionMode="blockList", + allowedDomainGuidsForSyncApp=[uuid.uuid4()], ) sharepoint_client.tenant_domain = DOMAIN @@ -155,14 +156,14 @@ class Test_sharepoint_external_sharing_managed: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.sharepoint.sharepoint_external_sharing_managed.sharepoint_external_sharing_managed.sharepoint_client", + "prowler.providers.m365.services.sharepoint.sharepoint_external_sharing_managed.sharepoint_external_sharing_managed.sharepoint_client", new=sharepoint_client, ), ): - from prowler.providers.microsoft365.services.sharepoint.sharepoint_external_sharing_managed.sharepoint_external_sharing_managed import ( + from prowler.providers.m365.services.sharepoint.sharepoint_external_sharing_managed.sharepoint_external_sharing_managed import ( sharepoint_external_sharing_managed, ) @@ -173,6 +174,7 @@ class Test_sharepoint_external_sharing_managed: legacyAuth=True, resharingEnabled=False, sharingDomainRestrictionMode="allowList", + allowedDomainGuidsForSyncApp=[uuid.uuid4()], ) sharepoint_client.tenant_domain = DOMAIN @@ -200,14 +202,14 @@ class Test_sharepoint_external_sharing_managed: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.sharepoint.sharepoint_external_sharing_managed.sharepoint_external_sharing_managed.sharepoint_client", + "prowler.providers.m365.services.sharepoint.sharepoint_external_sharing_managed.sharepoint_external_sharing_managed.sharepoint_client", new=sharepoint_client, ), ): - from prowler.providers.microsoft365.services.sharepoint.sharepoint_external_sharing_managed.sharepoint_external_sharing_managed import ( + from prowler.providers.m365.services.sharepoint.sharepoint_external_sharing_managed.sharepoint_external_sharing_managed import ( sharepoint_external_sharing_managed, ) @@ -218,6 +220,7 @@ class Test_sharepoint_external_sharing_managed: legacyAuth=True, resharingEnabled=False, sharingDomainRestrictionMode="blockList", + allowedDomainGuidsForSyncApp=[uuid.uuid4()], ) sharepoint_client.tenant_domain = DOMAIN @@ -247,14 +250,14 @@ class Test_sharepoint_external_sharing_managed: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.sharepoint.sharepoint_external_sharing_managed.sharepoint_external_sharing_managed.sharepoint_client", + "prowler.providers.m365.services.sharepoint.sharepoint_external_sharing_managed.sharepoint_external_sharing_managed.sharepoint_client", new=sharepoint_client, ), ): - from prowler.providers.microsoft365.services.sharepoint.sharepoint_external_sharing_managed.sharepoint_external_sharing_managed import ( + from prowler.providers.m365.services.sharepoint.sharepoint_external_sharing_managed.sharepoint_external_sharing_managed import ( sharepoint_external_sharing_managed, ) diff --git a/tests/providers/microsoft365/services/sharepoint/sharepoint_external_sharing_restricted/sharepoint_external_sharing_restricted_test.py b/tests/providers/m365/services/sharepoint/sharepoint_external_sharing_restricted/sharepoint_external_sharing_restricted_test.py similarity index 74% rename from tests/providers/microsoft365/services/sharepoint/sharepoint_external_sharing_restricted/sharepoint_external_sharing_restricted_test.py rename to tests/providers/m365/services/sharepoint/sharepoint_external_sharing_restricted/sharepoint_external_sharing_restricted_test.py index 98c749cd79..beb1b4a52a 100644 --- a/tests/providers/microsoft365/services/sharepoint/sharepoint_external_sharing_restricted/sharepoint_external_sharing_restricted_test.py +++ b/tests/providers/m365/services/sharepoint/sharepoint_external_sharing_restricted/sharepoint_external_sharing_restricted_test.py @@ -1,12 +1,10 @@ +import uuid from unittest import mock -from prowler.providers.microsoft365.services.sharepoint.sharepoint_service import ( +from prowler.providers.m365.services.sharepoint.sharepoint_service import ( SharePointSettings, ) -from tests.providers.microsoft365.microsoft365_fixtures import ( - DOMAIN, - set_mocked_microsoft365_provider, -) +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider class Test_sharepoint_external_sharing_restricted: @@ -20,14 +18,14 @@ class Test_sharepoint_external_sharing_restricted: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.sharepoint.sharepoint_external_sharing_restricted.sharepoint_external_sharing_restricted.sharepoint_client", + "prowler.providers.m365.services.sharepoint.sharepoint_external_sharing_restricted.sharepoint_external_sharing_restricted.sharepoint_client", new=sharepoint_client, ), ): - from prowler.providers.microsoft365.services.sharepoint.sharepoint_external_sharing_restricted.sharepoint_external_sharing_restricted import ( + from prowler.providers.m365.services.sharepoint.sharepoint_external_sharing_restricted.sharepoint_external_sharing_restricted import ( sharepoint_external_sharing_restricted, ) @@ -38,6 +36,7 @@ class Test_sharepoint_external_sharing_restricted: sharingDomainRestrictionMode="allowList", resharingEnabled=False, legacyAuth=True, + allowedDomainGuidsForSyncApp=[uuid.uuid4()], ) sharepoint_client.tenant_domain = DOMAIN @@ -63,14 +62,14 @@ class Test_sharepoint_external_sharing_restricted: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.sharepoint.sharepoint_external_sharing_restricted.sharepoint_external_sharing_restricted.sharepoint_client", + "prowler.providers.m365.services.sharepoint.sharepoint_external_sharing_restricted.sharepoint_external_sharing_restricted.sharepoint_client", new=sharepoint_client, ), ): - from prowler.providers.microsoft365.services.sharepoint.sharepoint_external_sharing_restricted.sharepoint_external_sharing_restricted import ( + from prowler.providers.m365.services.sharepoint.sharepoint_external_sharing_restricted.sharepoint_external_sharing_restricted import ( sharepoint_external_sharing_restricted, ) @@ -81,6 +80,7 @@ class Test_sharepoint_external_sharing_restricted: sharingDomainRestrictionMode="allowList", resharingEnabled=False, legacyAuth=True, + allowedDomainGuidsForSyncApp=[uuid.uuid4()], ) sharepoint_client.tenant_domain = DOMAIN @@ -108,14 +108,14 @@ class Test_sharepoint_external_sharing_restricted: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.sharepoint.sharepoint_external_sharing_restricted.sharepoint_external_sharing_restricted.sharepoint_client", + "prowler.providers.m365.services.sharepoint.sharepoint_external_sharing_restricted.sharepoint_external_sharing_restricted.sharepoint_client", new=sharepoint_client, ), ): - from prowler.providers.microsoft365.services.sharepoint.sharepoint_external_sharing_restricted.sharepoint_external_sharing_restricted import ( + from prowler.providers.m365.services.sharepoint.sharepoint_external_sharing_restricted.sharepoint_external_sharing_restricted import ( sharepoint_external_sharing_restricted, ) diff --git a/tests/providers/microsoft365/services/sharepoint/sharepoint_guest_sharing_restricted/sharepoint_guest_sharing_restricted_test.py b/tests/providers/m365/services/sharepoint/sharepoint_guest_sharing_restricted/sharepoint_guest_sharing_restricted_test.py similarity index 74% rename from tests/providers/microsoft365/services/sharepoint/sharepoint_guest_sharing_restricted/sharepoint_guest_sharing_restricted_test.py rename to tests/providers/m365/services/sharepoint/sharepoint_guest_sharing_restricted/sharepoint_guest_sharing_restricted_test.py index 0230f21db3..ba98f79477 100644 --- a/tests/providers/microsoft365/services/sharepoint/sharepoint_guest_sharing_restricted/sharepoint_guest_sharing_restricted_test.py +++ b/tests/providers/m365/services/sharepoint/sharepoint_guest_sharing_restricted/sharepoint_guest_sharing_restricted_test.py @@ -1,12 +1,10 @@ +import uuid from unittest import mock -from prowler.providers.microsoft365.services.sharepoint.sharepoint_service import ( +from prowler.providers.m365.services.sharepoint.sharepoint_service import ( SharePointSettings, ) -from tests.providers.microsoft365.microsoft365_fixtures import ( - DOMAIN, - set_mocked_microsoft365_provider, -) +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider class Test_sharepoint_guest_sharing_restricted: @@ -20,14 +18,14 @@ class Test_sharepoint_guest_sharing_restricted: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.sharepoint.sharepoint_guest_sharing_restricted.sharepoint_guest_sharing_restricted.sharepoint_client", + "prowler.providers.m365.services.sharepoint.sharepoint_guest_sharing_restricted.sharepoint_guest_sharing_restricted.sharepoint_client", new=sharepoint_client, ), ): - from prowler.providers.microsoft365.services.sharepoint.sharepoint_guest_sharing_restricted.sharepoint_guest_sharing_restricted import ( + from prowler.providers.m365.services.sharepoint.sharepoint_guest_sharing_restricted.sharepoint_guest_sharing_restricted import ( sharepoint_guest_sharing_restricted, ) @@ -38,6 +36,7 @@ class Test_sharepoint_guest_sharing_restricted: sharingDomainRestrictionMode="allowList", legacyAuth=True, resharingEnabled=False, + allowedDomainGuidsForSyncApp=[uuid.uuid4()], ) sharepoint_client.tenant_domain = DOMAIN @@ -64,14 +63,14 @@ class Test_sharepoint_guest_sharing_restricted: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.sharepoint.sharepoint_guest_sharing_restricted.sharepoint_guest_sharing_restricted.sharepoint_client", + "prowler.providers.m365.services.sharepoint.sharepoint_guest_sharing_restricted.sharepoint_guest_sharing_restricted.sharepoint_client", new=sharepoint_client, ), ): - from prowler.providers.microsoft365.services.sharepoint.sharepoint_guest_sharing_restricted.sharepoint_guest_sharing_restricted import ( + from prowler.providers.m365.services.sharepoint.sharepoint_guest_sharing_restricted.sharepoint_guest_sharing_restricted import ( sharepoint_guest_sharing_restricted, ) @@ -82,6 +81,7 @@ class Test_sharepoint_guest_sharing_restricted: sharingDomainRestrictionMode="allowList", legacyAuth=True, resharingEnabled=True, + allowedDomainGuidsForSyncApp=[uuid.uuid4()], ) sharepoint_client.tenant_domain = DOMAIN @@ -110,14 +110,14 @@ class Test_sharepoint_guest_sharing_restricted: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.sharepoint.sharepoint_guest_sharing_restricted.sharepoint_guest_sharing_restricted.sharepoint_client", + "prowler.providers.m365.services.sharepoint.sharepoint_guest_sharing_restricted.sharepoint_guest_sharing_restricted.sharepoint_client", new=sharepoint_client, ), ): - from prowler.providers.microsoft365.services.sharepoint.sharepoint_guest_sharing_restricted.sharepoint_guest_sharing_restricted import ( + from prowler.providers.m365.services.sharepoint.sharepoint_guest_sharing_restricted.sharepoint_guest_sharing_restricted import ( sharepoint_guest_sharing_restricted, ) diff --git a/tests/providers/microsoft365/services/sharepoint/sharepoint_modern_authentication_required/sharepoint_modern_authentication_required_test.py b/tests/providers/m365/services/sharepoint/sharepoint_modern_authentication_required/sharepoint_modern_authentication_required_test.py similarity index 73% rename from tests/providers/microsoft365/services/sharepoint/sharepoint_modern_authentication_required/sharepoint_modern_authentication_required_test.py rename to tests/providers/m365/services/sharepoint/sharepoint_modern_authentication_required/sharepoint_modern_authentication_required_test.py index 6e0199e0b2..43753558be 100644 --- a/tests/providers/microsoft365/services/sharepoint/sharepoint_modern_authentication_required/sharepoint_modern_authentication_required_test.py +++ b/tests/providers/m365/services/sharepoint/sharepoint_modern_authentication_required/sharepoint_modern_authentication_required_test.py @@ -1,9 +1,7 @@ +import uuid from unittest import mock -from tests.providers.microsoft365.microsoft365_fixtures import ( - DOMAIN, - set_mocked_microsoft365_provider, -) +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider class Test_sharepoint_modern_authentication_required: @@ -17,17 +15,17 @@ class Test_sharepoint_modern_authentication_required: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.sharepoint.sharepoint_modern_authentication_required.sharepoint_modern_authentication_required.sharepoint_client", + "prowler.providers.m365.services.sharepoint.sharepoint_modern_authentication_required.sharepoint_modern_authentication_required.sharepoint_client", new=sharepoint_client, ), ): - from prowler.providers.microsoft365.services.sharepoint.sharepoint_modern_authentication_required.sharepoint_modern_authentication_required import ( + from prowler.providers.m365.services.sharepoint.sharepoint_modern_authentication_required.sharepoint_modern_authentication_required import ( sharepoint_modern_authentication_required, ) - from prowler.providers.microsoft365.services.sharepoint.sharepoint_service import ( + from prowler.providers.m365.services.sharepoint.sharepoint_service import ( SharePointSettings, ) @@ -38,6 +36,7 @@ class Test_sharepoint_modern_authentication_required: sharingDomainRestrictionMode="allowList", resharingEnabled=False, legacyAuth=False, + allowedDomainGuidsForSyncApp=[uuid.uuid4()], ) sharepoint_client.tenant_domain = DOMAIN @@ -63,17 +62,17 @@ class Test_sharepoint_modern_authentication_required: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.sharepoint.sharepoint_modern_authentication_required.sharepoint_modern_authentication_required.sharepoint_client", + "prowler.providers.m365.services.sharepoint.sharepoint_modern_authentication_required.sharepoint_modern_authentication_required.sharepoint_client", new=sharepoint_client, ), ): - from prowler.providers.microsoft365.services.sharepoint.sharepoint_modern_authentication_required.sharepoint_modern_authentication_required import ( + from prowler.providers.m365.services.sharepoint.sharepoint_modern_authentication_required.sharepoint_modern_authentication_required import ( sharepoint_modern_authentication_required, ) - from prowler.providers.microsoft365.services.sharepoint.sharepoint_service import ( + from prowler.providers.m365.services.sharepoint.sharepoint_service import ( SharePointSettings, ) @@ -84,6 +83,7 @@ class Test_sharepoint_modern_authentication_required: sharingDomainRestrictionMode="allowList", resharingEnabled=False, legacyAuth=True, + allowedDomainGuidsForSyncApp=[uuid.uuid4()], ) sharepoint_client.tenant_domain = DOMAIN @@ -111,14 +111,14 @@ class Test_sharepoint_modern_authentication_required: with ( mock.patch( "prowler.providers.common.provider.Provider.get_global_provider", - return_value=set_mocked_microsoft365_provider(), + return_value=set_mocked_m365_provider(), ), mock.patch( - "prowler.providers.microsoft365.services.sharepoint.sharepoint_modern_authentication_required.sharepoint_modern_authentication_required.sharepoint_client", + "prowler.providers.m365.services.sharepoint.sharepoint_modern_authentication_required.sharepoint_modern_authentication_required.sharepoint_client", new=sharepoint_client, ), ): - from prowler.providers.microsoft365.services.sharepoint.sharepoint_modern_authentication_required.sharepoint_modern_authentication_required import ( + from prowler.providers.m365.services.sharepoint.sharepoint_modern_authentication_required.sharepoint_modern_authentication_required import ( sharepoint_modern_authentication_required, ) diff --git a/tests/providers/m365/services/sharepoint/sharepoint_onedrive_sync_restricted_unmanaged_devices/sharepoint_onedrive_sync_restricted_unmanaged_devices_test.py b/tests/providers/m365/services/sharepoint/sharepoint_onedrive_sync_restricted_unmanaged_devices/sharepoint_onedrive_sync_restricted_unmanaged_devices_test.py new file mode 100644 index 0000000000..0788194f8a --- /dev/null +++ b/tests/providers/m365/services/sharepoint/sharepoint_onedrive_sync_restricted_unmanaged_devices/sharepoint_onedrive_sync_restricted_unmanaged_devices_test.py @@ -0,0 +1,129 @@ +import uuid +from unittest import mock + +from prowler.providers.m365.services.sharepoint.sharepoint_service import ( + SharePointSettings, +) +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_sharepoint_onedrive_sync_restricted_unmanaged_devices: + def test_no_allowed_domain_guids(self): + """ + Test when there are no allowed domain guids for OneDrive sync app + + + """ + sharepoint_client = mock.MagicMock + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.sharepoint.sharepoint_onedrive_sync_restricted_unmanaged_devices.sharepoint_onedrive_sync_restricted_unmanaged_devices.sharepoint_client", + new=sharepoint_client, + ), + ): + from prowler.providers.m365.services.sharepoint.sharepoint_onedrive_sync_restricted_unmanaged_devices.sharepoint_onedrive_sync_restricted_unmanaged_devices import ( + sharepoint_onedrive_sync_restricted_unmanaged_devices, + ) + + sharepoint_client.settings = SharePointSettings( + sharingCapability="ExternalUserSharingOnly", + sharingAllowedDomainList=["allowed-domain.com"], + sharingBlockedDomainList=["blocked-domain.com"], + legacyAuth=True, + resharingEnabled=False, + sharingDomainRestrictionMode="none", + allowedDomainGuidsForSyncApp=[], + ) + sharepoint_client.tenant_domain = DOMAIN + + check = sharepoint_onedrive_sync_restricted_unmanaged_devices() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Microsoft 365 SharePoint allows OneDrive sync to unmanaged devices." + ) + assert result[0].resource_id == DOMAIN + assert result[0].location == "global" + assert result[0].resource_name == "SharePoint Settings" + assert result[0].resource == sharepoint_client.settings.dict() + + def test_allowed_domain_guids(self): + """ + Test when there are allowed domain guids for OneDrive sync app + """ + sharepoint_client = mock.MagicMock + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.sharepoint.sharepoint_onedrive_sync_restricted_unmanaged_devices.sharepoint_onedrive_sync_restricted_unmanaged_devices.sharepoint_client", + new=sharepoint_client, + ), + ): + from prowler.providers.m365.services.sharepoint.sharepoint_onedrive_sync_restricted_unmanaged_devices.sharepoint_onedrive_sync_restricted_unmanaged_devices import ( + sharepoint_onedrive_sync_restricted_unmanaged_devices, + ) + + sharepoint_client.settings = SharePointSettings( + sharingCapability="ExternalUserSharingOnly", + sharingAllowedDomainList=[], + sharingBlockedDomainList=["blocked-domain.com"], + legacyAuth=True, + resharingEnabled=False, + sharingDomainRestrictionMode="allowList", + allowedDomainGuidsForSyncApp=[uuid.uuid4()], + ) + sharepoint_client.tenant_domain = DOMAIN + + check = sharepoint_onedrive_sync_restricted_unmanaged_devices() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Microsoft 365 SharePoint does not allow OneDrive sync to unmanaged devices." + ) + assert result[0].resource_id == DOMAIN + assert result[0].location == "global" + assert result[0].resource_name == "SharePoint Settings" + assert result[0].resource == sharepoint_client.settings.dict() + + def test_empty_settings(self): + """ + Test when sharepoint_client.settings is empty: + The check should return an empty list of findings. + """ + sharepoint_client = mock.MagicMock + sharepoint_client.settings = {} + sharepoint_client.tenant_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.services.sharepoint.sharepoint_onedrive_sync_restricted_unmanaged_devices.sharepoint_onedrive_sync_restricted_unmanaged_devices.sharepoint_client", + new=sharepoint_client, + ), + ): + from prowler.providers.m365.services.sharepoint.sharepoint_onedrive_sync_restricted_unmanaged_devices.sharepoint_onedrive_sync_restricted_unmanaged_devices import ( + sharepoint_onedrive_sync_restricted_unmanaged_devices, + ) + + check = sharepoint_onedrive_sync_restricted_unmanaged_devices() + result = check.execute() + + assert len(result) == 0 diff --git a/tests/providers/microsoft365/services/sharepoint/sharepoint_service_test.py b/tests/providers/m365/services/sharepoint/sharepoint_service_test.py similarity index 62% rename from tests/providers/microsoft365/services/sharepoint/sharepoint_service_test.py rename to tests/providers/m365/services/sharepoint/sharepoint_service_test.py index 06a220f2c8..3b67f06c28 100644 --- a/tests/providers/microsoft365/services/sharepoint/sharepoint_service_test.py +++ b/tests/providers/m365/services/sharepoint/sharepoint_service_test.py @@ -1,14 +1,14 @@ +import uuid from unittest.mock import patch -from prowler.providers.microsoft365.models import Microsoft365IdentityInfo -from prowler.providers.microsoft365.services.sharepoint.sharepoint_service import ( +from prowler.providers.m365.models import M365IdentityInfo +from prowler.providers.m365.services.sharepoint.sharepoint_service import ( SharePoint, SharePointSettings, ) -from tests.providers.microsoft365.microsoft365_fixtures import ( - DOMAIN, - set_mocked_microsoft365_provider, -) +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + +uuid_value = uuid.uuid4() async def mock_sharepoint_get_settings(_): @@ -19,24 +19,23 @@ async def mock_sharepoint_get_settings(_): sharingDomainRestrictionMode="allowList", resharingEnabled=False, legacyAuth=True, + allowedDomainGuidsForSyncApp=[uuid_value], ) @patch( - "prowler.providers.microsoft365.services.sharepoint.sharepoint_service.SharePoint._get_settings", + "prowler.providers.m365.services.sharepoint.sharepoint_service.SharePoint._get_settings", new=mock_sharepoint_get_settings, ) class Test_SharePoint_Service: def test_get_client(self): sharepoint_client = SharePoint( - set_mocked_microsoft365_provider( - identity=Microsoft365IdentityInfo(tenant_domain=DOMAIN) - ) + set_mocked_m365_provider(identity=M365IdentityInfo(tenant_domain=DOMAIN)) ) assert sharepoint_client.client.__class__.__name__ == "GraphServiceClient" def test_get_settings(self): - sharepoint_client = SharePoint(set_mocked_microsoft365_provider()) + sharepoint_client = SharePoint(set_mocked_m365_provider()) settings = sharepoint_client.settings assert settings.sharingCapability == "ExternalUserAndGuestSharing" assert settings.sharingAllowedDomainList == ["allowed-domain.com"] @@ -44,3 +43,5 @@ class Test_SharePoint_Service: assert settings.sharingDomainRestrictionMode == "allowList" assert settings.resharingEnabled is False assert settings.legacyAuth is True + assert settings.allowedDomainGuidsForSyncApp == [uuid_value] + assert len(settings.allowedDomainGuidsForSyncApp) == 1 diff --git a/tests/providers/m365/services/teams/teams_email_sending_to_channel_disabled/teams_email_sending_to_channel_disabled_test.py b/tests/providers/m365/services/teams/teams_email_sending_to_channel_disabled/teams_email_sending_to_channel_disabled_test.py new file mode 100644 index 0000000000..3d1702e5ae --- /dev/null +++ b/tests/providers/m365/services/teams/teams_email_sending_to_channel_disabled/teams_email_sending_to_channel_disabled_test.py @@ -0,0 +1,105 @@ +from unittest import mock + +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_teams_email_sending_to_channel_disabled: + def test_email_sending_to_channel_no_restricted(self): + teams_client = mock.MagicMock() + teams_client.audited_tenant = "audited_tenant" + teams_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_email_sending_to_channel_disabled.teams_email_sending_to_channel_disabled.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_email_sending_to_channel_disabled.teams_email_sending_to_channel_disabled import ( + teams_email_sending_to_channel_disabled, + ) + from prowler.providers.m365.services.teams.teams_service import ( + CloudStorageSettings, + TeamsSettings, + ) + + teams_client.teams_settings = TeamsSettings( + cloud_storage_settings=CloudStorageSettings( + allow_box=True, + allow_drop_box=True, + allow_egnyte=True, + allow_google_drive=True, + allow_share_file=True, + ), + allow_email_into_channel=True, + ) + + check = teams_email_sending_to_channel_disabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Teams users can send emails to channel email addresses." + ) + assert result[0].resource == teams_client.teams_settings.dict() + assert result[0].resource_name == "Teams Settings" + assert result[0].resource_id == "teamsSettings" + assert result[0].location == "global" + + def test_email_sending_to_channel_restricted(self): + teams_client = mock.MagicMock() + teams_client.audited_tenant = "audited_tenant" + teams_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_email_sending_to_channel_disabled.teams_email_sending_to_channel_disabled.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_email_sending_to_channel_disabled.teams_email_sending_to_channel_disabled import ( + teams_email_sending_to_channel_disabled, + ) + from prowler.providers.m365.services.teams.teams_service import ( + CloudStorageSettings, + TeamsSettings, + ) + + teams_client.teams_settings = TeamsSettings( + cloud_storage_settings=CloudStorageSettings( + allow_box=True, + allow_drop_box=True, + allow_egnyte=True, + allow_google_drive=True, + allow_share_file=True, + ), + allow_email_into_channel=False, + ) + + check = teams_email_sending_to_channel_disabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Teams users cannot send emails to channel email addresses." + ) + assert result[0].resource == teams_client.teams_settings.dict() + assert result[0].resource_name == "Teams Settings" + assert result[0].resource_id == "teamsSettings" + assert result[0].location == "global" diff --git a/tests/providers/m365/services/teams/teams_external_domains_restricted/teams_external_domains_restricted_test.py b/tests/providers/m365/services/teams/teams_external_domains_restricted/teams_external_domains_restricted_test.py new file mode 100644 index 0000000000..e85d9fd6bd --- /dev/null +++ b/tests/providers/m365/services/teams/teams_external_domains_restricted/teams_external_domains_restricted_test.py @@ -0,0 +1,106 @@ +from unittest import mock + +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_teams_external_domains_restricted: + def test_no_user_settings(self): + teams_client = mock.MagicMock() + teams_client.audited_tenant = "audited_tenant" + teams_client.audited_domain = DOMAIN + teams_client.user_settings = None + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_external_domains_restricted.teams_external_domains_restricted.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_external_domains_restricted.teams_external_domains_restricted import ( + teams_external_domains_restricted, + ) + + check = teams_external_domains_restricted() + result = check.execute() + assert len(result) == 0 + + def test_external_domains_allowed(self): + teams_client = mock.MagicMock() + teams_client.audited_tenant = "audited_tenant" + teams_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_external_domains_restricted.teams_external_domains_restricted.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_external_domains_restricted.teams_external_domains_restricted import ( + teams_external_domains_restricted, + ) + from prowler.providers.m365.services.teams.teams_service import UserSettings + + teams_client.user_settings = UserSettings( + allow_external_access=True, + ) + + check = teams_external_domains_restricted() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert result[0].status_extended == "Users can access external domains." + assert result[0].resource == teams_client.user_settings.dict() + assert result[0].resource_name == "Teams User Settings" + assert result[0].resource_id == "userSettings" + assert result[0].location == "global" + + def test_external_domains_restricted(self): + teams_client = mock.MagicMock() + teams_client.audited_tenant = "audited_tenant" + teams_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_external_domains_restricted.teams_external_domains_restricted.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_external_domains_restricted.teams_external_domains_restricted import ( + teams_external_domains_restricted, + ) + from prowler.providers.m365.services.teams.teams_service import UserSettings + + teams_client.user_settings = UserSettings( + allow_external_access=False, + ) + + check = teams_external_domains_restricted() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert result[0].status_extended == "Users can not access external domains." + assert result[0].resource == teams_client.user_settings.dict() + assert result[0].resource_name == "Teams User Settings" + assert result[0].resource_id == "userSettings" + assert result[0].location == "global" diff --git a/tests/providers/m365/services/teams/teams_external_file_sharing_restricted/teams_external_file_sharing_restricted_test.py b/tests/providers/m365/services/teams/teams_external_file_sharing_restricted/teams_external_file_sharing_restricted_test.py new file mode 100644 index 0000000000..ea8d35f189 --- /dev/null +++ b/tests/providers/m365/services/teams/teams_external_file_sharing_restricted/teams_external_file_sharing_restricted_test.py @@ -0,0 +1,121 @@ +from unittest import mock + +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_teams_external_file_sharing_restricted: + def test_file_sharing_no_restricted(self): + teams_client = mock.MagicMock() + teams_client.audited_tenant = "audited_tenant" + teams_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_external_file_sharing_restricted.teams_external_file_sharing_restricted.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_external_file_sharing_restricted.teams_external_file_sharing_restricted import ( + teams_external_file_sharing_restricted, + ) + from prowler.providers.m365.services.teams.teams_service import ( + CloudStorageSettings, + TeamsSettings, + ) + + teams_client.teams_settings = TeamsSettings( + cloud_storage_settings=CloudStorageSettings( + allow_box=True, + allow_drop_box=True, + allow_egnyte=True, + allow_google_drive=True, + allow_share_file=True, + ) + ) + + teams_client.audit_config = {"allowed_cloud_storage_services": []} + + check = teams_external_file_sharing_restricted() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "External file sharing is not restricted to only approved cloud storage services." + ) + assert ( + result[0].resource + == teams_client.teams_settings.cloud_storage_settings.dict() + ) + assert result[0].resource_name == "Cloud Storage Settings" + assert result[0].resource_id == "cloudStorageSettings" + assert result[0].location == "global" + + def test_file_sharing_restricted(self): + teams_client = mock.MagicMock() + teams_client.audited_tenant = "audited_tenant" + teams_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_external_file_sharing_restricted.teams_external_file_sharing_restricted.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_external_file_sharing_restricted.teams_external_file_sharing_restricted import ( + teams_external_file_sharing_restricted, + ) + from prowler.providers.m365.services.teams.teams_service import ( + CloudStorageSettings, + TeamsSettings, + ) + + teams_client.teams_settings = TeamsSettings( + cloud_storage_settings=CloudStorageSettings( + allow_box=True, + allow_drop_box=True, + allow_egnyte=False, + allow_google_drive=True, + allow_share_file=True, + ) + ) + + teams_client.audit_config = { + "allowed_cloud_storage_services": [ + "allow_box", + "allow_drop_box", + # "allow_egnyte", + "allow_google_drive", + "allow_share_file", + ] + } + + check = teams_external_file_sharing_restricted() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "External file sharing is restricted to only approved cloud storage services." + ) + assert ( + result[0].resource + == teams_client.teams_settings.cloud_storage_settings.dict() + ) + assert result[0].resource_name == "Cloud Storage Settings" + assert result[0].resource_id == "cloudStorageSettings" + assert result[0].location == "global" diff --git a/tests/providers/m365/services/teams/teams_external_users_cannot_start_conversations/teams_external_users_cannot_start_conversations_test.py b/tests/providers/m365/services/teams/teams_external_users_cannot_start_conversations/teams_external_users_cannot_start_conversations_test.py new file mode 100644 index 0000000000..6b5dd1dff0 --- /dev/null +++ b/tests/providers/m365/services/teams/teams_external_users_cannot_start_conversations/teams_external_users_cannot_start_conversations_test.py @@ -0,0 +1,112 @@ +from unittest import mock + +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_teams_external_users_cannot_start_conversations: + def test_no_user_settings(self): + teams_client = mock.MagicMock() + teams_client.audited_tenant = "audited_tenant" + teams_client.audited_domain = DOMAIN + teams_client.user_settings = None + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_external_users_cannot_start_conversations.teams_external_users_cannot_start_conversations.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_external_users_cannot_start_conversations.teams_external_users_cannot_start_conversations import ( + teams_external_users_cannot_start_conversations, + ) + + check = teams_external_users_cannot_start_conversations() + result = check.execute() + assert len(result) == 0 + + def test_unmanaged_communication_allowed(self): + teams_client = mock.MagicMock() + teams_client.audited_tenant = "audited_tenant" + teams_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_external_users_cannot_start_conversations.teams_external_users_cannot_start_conversations.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_external_users_cannot_start_conversations.teams_external_users_cannot_start_conversations import ( + teams_external_users_cannot_start_conversations, + ) + from prowler.providers.m365.services.teams.teams_service import UserSettings + + teams_client.user_settings = UserSettings( + allow_teams_consumer_inbound=True, + ) + + check = teams_external_users_cannot_start_conversations() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "External Teams users can initiate conversations." + ) + assert result[0].resource == teams_client.user_settings.dict() + assert result[0].resource_name == "Teams User Settings" + assert result[0].resource_id == "userSettings" + assert result[0].location == "global" + + def test_unmanaged_communication_restricted(self): + teams_client = mock.MagicMock() + teams_client.audited_tenant = "audited_tenant" + teams_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_external_users_cannot_start_conversations.teams_external_users_cannot_start_conversations.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_external_users_cannot_start_conversations.teams_external_users_cannot_start_conversations import ( + teams_external_users_cannot_start_conversations, + ) + from prowler.providers.m365.services.teams.teams_service import UserSettings + + teams_client.user_settings = UserSettings( + allow_teams_consumer_inbound=False, + ) + + check = teams_external_users_cannot_start_conversations() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "External Teams users cannot initiate conversations." + ) + assert result[0].resource == teams_client.user_settings.dict() + assert result[0].resource_name == "Teams User Settings" + assert result[0].resource_id == "userSettings" + assert result[0].location == "global" diff --git a/tests/providers/m365/services/teams/teams_meeting_anonymous_user_join_disabled/teams_meeting_anonymous_user_join_disabled_test.py b/tests/providers/m365/services/teams/teams_meeting_anonymous_user_join_disabled/teams_meeting_anonymous_user_join_disabled_test.py new file mode 100644 index 0000000000..899f7514aa --- /dev/null +++ b/tests/providers/m365/services/teams/teams_meeting_anonymous_user_join_disabled/teams_meeting_anonymous_user_join_disabled_test.py @@ -0,0 +1,117 @@ +from unittest import mock + +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_teams_meeting_anonymous_user_join_disabled: + def test_no_global_meeting_policy(self): + teams_client = mock.MagicMock() + teams_client.global_meeting_policy = None + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_meeting_anonymous_user_join_disabled.teams_meeting_anonymous_user_join_disabled.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_meeting_anonymous_user_join_disabled.teams_meeting_anonymous_user_join_disabled import ( + teams_meeting_anonymous_user_join_disabled, + ) + + check = teams_meeting_anonymous_user_join_disabled() + result = check.execute() + assert len(result) == 0 + + def test_anonymous_users_can_join_meetings(self): + teams_client = mock.MagicMock() + teams_client.audited_tenant = "audited_tenant" + teams_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_meeting_anonymous_user_join_disabled.teams_meeting_anonymous_user_join_disabled.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_meeting_anonymous_user_join_disabled.teams_meeting_anonymous_user_join_disabled import ( + teams_meeting_anonymous_user_join_disabled, + ) + from prowler.providers.m365.services.teams.teams_service import ( + GlobalMeetingPolicy, + ) + + teams_client.global_meeting_policy = GlobalMeetingPolicy( + allow_anonymous_users_to_join_meeting=True + ) + + check = teams_meeting_anonymous_user_join_disabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended == "Anonymous Teams users can join meetings." + ) + assert result[0].resource == teams_client.global_meeting_policy.dict() + assert ( + result[0].resource_name + == "Teams Meetings Global (Org-wide default) Policy" + ) + assert result[0].resource_id == "teamsMeetingsGlobalPolicy" + + def test_anonymous_users_cannot_join_meetings(self): + teams_client = mock.MagicMock() + teams_client.audited_tenant = "audited_tenant" + teams_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_meeting_anonymous_user_join_disabled.teams_meeting_anonymous_user_join_disabled.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_meeting_anonymous_user_join_disabled.teams_meeting_anonymous_user_join_disabled import ( + teams_meeting_anonymous_user_join_disabled, + ) + from prowler.providers.m365.services.teams.teams_service import ( + GlobalMeetingPolicy, + ) + + teams_client.global_meeting_policy = GlobalMeetingPolicy( + allow_anonymous_users_to_join_meeting=False + ) + + check = teams_meeting_anonymous_user_join_disabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Anonymous Teams users can not join meetings." + ) + assert result[0].resource == teams_client.global_meeting_policy.dict() + assert ( + result[0].resource_name + == "Teams Meetings Global (Org-wide default) Policy" + ) + assert result[0].resource_id == "teamsMeetingsGlobalPolicy" diff --git a/tests/providers/m365/services/teams/teams_meeting_anonymous_user_start_disabled/teams_meeting_anonymous_user_start_disabled_test.py b/tests/providers/m365/services/teams/teams_meeting_anonymous_user_start_disabled/teams_meeting_anonymous_user_start_disabled_test.py new file mode 100644 index 0000000000..6eda43d319 --- /dev/null +++ b/tests/providers/m365/services/teams/teams_meeting_anonymous_user_start_disabled/teams_meeting_anonymous_user_start_disabled_test.py @@ -0,0 +1,117 @@ +from unittest import mock + +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_teams_meeting_anonymous_user_start_disabled: + def test_no_global_meeting_policy(self): + teams_client = mock.MagicMock() + teams_client.global_meeting_policy = None + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_meeting_anonymous_user_start_disabled.teams_meeting_anonymous_user_start_disabled.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_meeting_anonymous_user_start_disabled.teams_meeting_anonymous_user_start_disabled import ( + teams_meeting_anonymous_user_start_disabled, + ) + + check = teams_meeting_anonymous_user_start_disabled() + result = check.execute() + assert len(result) == 0 + + def test_anonymous_users_can_start_meetings(self): + teams_client = mock.MagicMock() + teams_client.audited_tenant = "audited_tenant" + teams_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_meeting_anonymous_user_start_disabled.teams_meeting_anonymous_user_start_disabled.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_meeting_anonymous_user_start_disabled.teams_meeting_anonymous_user_start_disabled import ( + teams_meeting_anonymous_user_start_disabled, + ) + from prowler.providers.m365.services.teams.teams_service import ( + GlobalMeetingPolicy, + ) + + teams_client.global_meeting_policy = GlobalMeetingPolicy( + allow_anonymous_users_to_start_meeting=True + ) + + check = teams_meeting_anonymous_user_start_disabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended == "Anonymous Teams users can start meetings." + ) + assert result[0].resource == teams_client.global_meeting_policy.dict() + assert ( + result[0].resource_name + == "Teams Meetings Global (Org-wide default) Policy" + ) + assert result[0].resource_id == "teamsMeetingsGlobalPolicy" + + def test_anonymous_users_cannot_start_meetings(self): + teams_client = mock.MagicMock() + teams_client.audited_tenant = "audited_tenant" + teams_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_meeting_anonymous_user_start_disabled.teams_meeting_anonymous_user_start_disabled.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_meeting_anonymous_user_start_disabled.teams_meeting_anonymous_user_start_disabled import ( + teams_meeting_anonymous_user_start_disabled, + ) + from prowler.providers.m365.services.teams.teams_service import ( + GlobalMeetingPolicy, + ) + + teams_client.global_meeting_policy = GlobalMeetingPolicy( + allow_anonymous_users_to_start_meeting=False + ) + + check = teams_meeting_anonymous_user_start_disabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Anonymous Teams users can not start meetings." + ) + assert result[0].resource == teams_client.global_meeting_policy.dict() + assert ( + result[0].resource_name + == "Teams Meetings Global (Org-wide default) Policy" + ) + assert result[0].resource_id == "teamsMeetingsGlobalPolicy" diff --git a/tests/providers/m365/services/teams/teams_meeting_chat_anonymous_users_disabled/teams_meeting_chat_anonymous_users_disabled_test.py b/tests/providers/m365/services/teams/teams_meeting_chat_anonymous_users_disabled/teams_meeting_chat_anonymous_users_disabled_test.py new file mode 100644 index 0000000000..cecc4ea919 --- /dev/null +++ b/tests/providers/m365/services/teams/teams_meeting_chat_anonymous_users_disabled/teams_meeting_chat_anonymous_users_disabled_test.py @@ -0,0 +1,159 @@ +from unittest import mock + +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_teams_meeting_chat_anonymous_users_disabled: + def test_no_global_meeting_policy(self): + teams_client = mock.MagicMock() + teams_client.global_meeting_policy = None + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_meeting_chat_anonymous_users_disabled.teams_meeting_chat_anonymous_users_disabled.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_meeting_chat_anonymous_users_disabled.teams_meeting_chat_anonymous_users_disabled import ( + teams_meeting_chat_anonymous_users_disabled, + ) + + check = teams_meeting_chat_anonymous_users_disabled() + result = check.execute() + assert len(result) == 0 + + def test_meeting_chat_allows_anonymous_users(self): + teams_client = mock.MagicMock() + teams_client.audited_tenant = "audited_tenant" + teams_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_meeting_chat_anonymous_users_disabled.teams_meeting_chat_anonymous_users_disabled.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_meeting_chat_anonymous_users_disabled.teams_meeting_chat_anonymous_users_disabled import ( + teams_meeting_chat_anonymous_users_disabled, + ) + from prowler.providers.m365.services.teams.teams_service import ( + GlobalMeetingPolicy, + ) + + teams_client.global_meeting_policy = GlobalMeetingPolicy( + meeting_chat_enabled_type="EnabledForEveryone" + ) + + check = teams_meeting_chat_anonymous_users_disabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert result[0].status_extended == "Meeting chat allows anonymous users." + assert result[0].resource == teams_client.global_meeting_policy.dict() + assert ( + result[0].resource_name + == "Teams Meetings Global (Org-wide default) Policy" + ) + assert result[0].resource_id == "teamsMeetingsGlobalPolicy" + + def test_meeting_chat_does_not_allow_anonymous_users_enabled_except_anonymous(self): + teams_client = mock.MagicMock() + teams_client.audited_tenant = "audited_tenant" + teams_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_meeting_chat_anonymous_users_disabled.teams_meeting_chat_anonymous_users_disabled.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_meeting_chat_anonymous_users_disabled.teams_meeting_chat_anonymous_users_disabled import ( + teams_meeting_chat_anonymous_users_disabled, + ) + from prowler.providers.m365.services.teams.teams_service import ( + GlobalMeetingPolicy, + ) + + teams_client.global_meeting_policy = GlobalMeetingPolicy( + meeting_chat_enabled_type="EnabledExceptAnonymous" + ) + + check = teams_meeting_chat_anonymous_users_disabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Meeting chat does not allow anonymous users." + ) + assert result[0].resource == teams_client.global_meeting_policy.dict() + assert ( + result[0].resource_name + == "Teams Meetings Global (Org-wide default) Policy" + ) + assert result[0].resource_id == "teamsMeetingsGlobalPolicy" + + def test_meeting_chat_does_not_allow_anonymous_users_enabled_in_meeting_only(self): + teams_client = mock.MagicMock() + teams_client.audited_tenant = "audited_tenant" + teams_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_meeting_chat_anonymous_users_disabled.teams_meeting_chat_anonymous_users_disabled.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_meeting_chat_anonymous_users_disabled.teams_meeting_chat_anonymous_users_disabled import ( + teams_meeting_chat_anonymous_users_disabled, + ) + from prowler.providers.m365.services.teams.teams_service import ( + GlobalMeetingPolicy, + ) + + teams_client.global_meeting_policy = GlobalMeetingPolicy( + meeting_chat_enabled_type="EnabledInMeetingOnlyForAllExceptAnonymous" + ) + + check = teams_meeting_chat_anonymous_users_disabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Meeting chat does not allow anonymous users." + ) + assert result[0].resource == teams_client.global_meeting_policy.dict() + assert ( + result[0].resource_name + == "Teams Meetings Global (Org-wide default) Policy" + ) + assert result[0].resource_id == "teamsMeetingsGlobalPolicy" diff --git a/tests/providers/m365/services/teams/teams_meeting_dial_in_lobby_bypass_disabled/teams_meeting_dial_in_lobby_bypass_disabled_test.py b/tests/providers/m365/services/teams/teams_meeting_dial_in_lobby_bypass_disabled/teams_meeting_dial_in_lobby_bypass_disabled_test.py new file mode 100644 index 0000000000..c5994b6b8e --- /dev/null +++ b/tests/providers/m365/services/teams/teams_meeting_dial_in_lobby_bypass_disabled/teams_meeting_dial_in_lobby_bypass_disabled_test.py @@ -0,0 +1,112 @@ +from unittest import mock + +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_teams_meeting_dial_in_lobby_bypass_disabled: + def test_no_global_meeting_policy(self): + teams_client = mock.MagicMock() + teams_client.global_meeting_policy = None + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_meeting_dial_in_lobby_bypass_disabled.teams_meeting_dial_in_lobby_bypass_disabled.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_meeting_dial_in_lobby_bypass_disabled.teams_meeting_dial_in_lobby_bypass_disabled import ( + teams_meeting_dial_in_lobby_bypass_disabled, + ) + + check = teams_meeting_dial_in_lobby_bypass_disabled() + result = check.execute() + assert len(result) == 0 + + def test_dial_in_users_can_bypass_lobby(self): + teams_client = mock.MagicMock() + teams_client.audited_tenant = "audited_tenant" + teams_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_meeting_dial_in_lobby_bypass_disabled.teams_meeting_dial_in_lobby_bypass_disabled.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_meeting_dial_in_lobby_bypass_disabled.teams_meeting_dial_in_lobby_bypass_disabled import ( + teams_meeting_dial_in_lobby_bypass_disabled, + ) + from prowler.providers.m365.services.teams.teams_service import ( + GlobalMeetingPolicy, + ) + + teams_client.global_meeting_policy = GlobalMeetingPolicy( + allow_pstn_users_to_bypass_lobby=True + ) + + check = teams_meeting_dial_in_lobby_bypass_disabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert result[0].status_extended == "Dial-in users can bypass the lobby." + assert result[0].resource == teams_client.global_meeting_policy.dict() + assert ( + result[0].resource_name + == "Teams Meetings Global (Org-wide default) Policy" + ) + assert result[0].resource_id == "teamsMeetingsGlobalPolicy" + + def test_dial_in_users_cannot_bypass_lobby(self): + teams_client = mock.MagicMock() + teams_client.audited_tenant = "audited_tenant" + teams_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_meeting_dial_in_lobby_bypass_disabled.teams_meeting_dial_in_lobby_bypass_disabled.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_meeting_dial_in_lobby_bypass_disabled.teams_meeting_dial_in_lobby_bypass_disabled import ( + teams_meeting_dial_in_lobby_bypass_disabled, + ) + from prowler.providers.m365.services.teams.teams_service import ( + GlobalMeetingPolicy, + ) + + teams_client.global_meeting_policy = GlobalMeetingPolicy( + allow_pstn_users_to_bypass_lobby=False + ) + + check = teams_meeting_dial_in_lobby_bypass_disabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert result[0].status_extended == "Dial-in users cannot bypass the lobby." + assert result[0].resource == teams_client.global_meeting_policy.dict() + assert ( + result[0].resource_name + == "Teams Meetings Global (Org-wide default) Policy" + ) + assert result[0].resource_id == "teamsMeetingsGlobalPolicy" diff --git a/tests/providers/m365/services/teams/teams_meeting_external_chat_disabled/teams_meeting_external_chat_disabled_test.py b/tests/providers/m365/services/teams/teams_meeting_external_chat_disabled/teams_meeting_external_chat_disabled_test.py new file mode 100644 index 0000000000..69da25e0eb --- /dev/null +++ b/tests/providers/m365/services/teams/teams_meeting_external_chat_disabled/teams_meeting_external_chat_disabled_test.py @@ -0,0 +1,118 @@ +from unittest import mock + +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_teams_meeting_external_chat_disabled: + def test_no_global_meeting_policy(self): + teams_client = mock.MagicMock() + teams_client.global_meeting_policy = None + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_meeting_external_chat_disabled.teams_meeting_external_chat_disabled.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_meeting_external_chat_disabled.teams_meeting_external_chat_disabled import ( + teams_meeting_external_chat_disabled, + ) + + check = teams_meeting_external_chat_disabled() + result = check.execute() + assert len(result) == 0 + + def test_external_chat_enabled(self): + teams_client = mock.MagicMock() + teams_client.audited_tenant = "audited_tenant" + teams_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_meeting_external_chat_disabled.teams_meeting_external_chat_disabled.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_meeting_external_chat_disabled.teams_meeting_external_chat_disabled import ( + teams_meeting_external_chat_disabled, + ) + from prowler.providers.m365.services.teams.teams_service import ( + GlobalMeetingPolicy, + ) + + teams_client.global_meeting_policy = GlobalMeetingPolicy( + allow_external_non_trusted_meeting_chat=True + ) + + check = teams_meeting_external_chat_disabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "External meeting chat is enabled for untrusted organizations." + ) + assert result[0].resource == teams_client.global_meeting_policy.dict() + assert ( + result[0].resource_name + == "Teams Meetings Global (Org-wide default) Policy" + ) + assert result[0].resource_id == "teamsMeetingsGlobalPolicy" + + def test_external_chat_disabled(self): + teams_client = mock.MagicMock() + teams_client.audited_tenant = "audited_tenant" + teams_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_meeting_external_chat_disabled.teams_meeting_external_chat_disabled.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_meeting_external_chat_disabled.teams_meeting_external_chat_disabled import ( + teams_meeting_external_chat_disabled, + ) + from prowler.providers.m365.services.teams.teams_service import ( + GlobalMeetingPolicy, + ) + + teams_client.global_meeting_policy = GlobalMeetingPolicy( + allow_external_non_trusted_meeting_chat=False + ) + + check = teams_meeting_external_chat_disabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "External meeting chat is disabled for untrusted organizations." + ) + assert result[0].resource == teams_client.global_meeting_policy.dict() + assert ( + result[0].resource_name + == "Teams Meetings Global (Org-wide default) Policy" + ) + assert result[0].resource_id == "teamsMeetingsGlobalPolicy" diff --git a/tests/providers/m365/services/teams/teams_meeting_external_control_disabled/teams_meeting_external_control_disabled_test.py b/tests/providers/m365/services/teams/teams_meeting_external_control_disabled/teams_meeting_external_control_disabled_test.py new file mode 100644 index 0000000000..c2a3d783f3 --- /dev/null +++ b/tests/providers/m365/services/teams/teams_meeting_external_control_disabled/teams_meeting_external_control_disabled_test.py @@ -0,0 +1,118 @@ +from unittest import mock + +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_teams_meeting_external_control_disabled: + def test_no_global_meeting_policy(self): + teams_client = mock.MagicMock() + teams_client.global_meeting_policy = None + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_meeting_external_control_disabled.teams_meeting_external_control_disabled.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_meeting_external_control_disabled.teams_meeting_external_control_disabled import ( + teams_meeting_external_control_disabled, + ) + + check = teams_meeting_external_control_disabled() + result = check.execute() + assert len(result) == 0 + + def test_external_participants_can_control(self): + teams_client = mock.MagicMock() + teams_client.audited_tenant = "audited_tenant" + teams_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_meeting_external_control_disabled.teams_meeting_external_control_disabled.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_meeting_external_control_disabled.teams_meeting_external_control_disabled import ( + teams_meeting_external_control_disabled, + ) + from prowler.providers.m365.services.teams.teams_service import ( + GlobalMeetingPolicy, + ) + + teams_client.global_meeting_policy = GlobalMeetingPolicy( + allow_external_participant_give_request_control=True + ) + + check = teams_meeting_external_control_disabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "External participants can give or request control." + ) + assert result[0].resource == teams_client.global_meeting_policy.dict() + assert ( + result[0].resource_name + == "Teams Meetings Global (Org-wide default) Policy" + ) + assert result[0].resource_id == "teamsMeetingsGlobalPolicy" + + def test_external_participants_cannot_control(self): + teams_client = mock.MagicMock() + teams_client.audited_tenant = "audited_tenant" + teams_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_meeting_external_control_disabled.teams_meeting_external_control_disabled.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_meeting_external_control_disabled.teams_meeting_external_control_disabled import ( + teams_meeting_external_control_disabled, + ) + from prowler.providers.m365.services.teams.teams_service import ( + GlobalMeetingPolicy, + ) + + teams_client.global_meeting_policy = GlobalMeetingPolicy( + allow_external_participant_give_request_control=False + ) + + check = teams_meeting_external_control_disabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "External participants cannot give or request control." + ) + assert result[0].resource == teams_client.global_meeting_policy.dict() + assert ( + result[0].resource_name + == "Teams Meetings Global (Org-wide default) Policy" + ) + assert result[0].resource_id == "teamsMeetingsGlobalPolicy" diff --git a/tests/providers/m365/services/teams/teams_meeting_external_lobby_bypass_disabled/teams_meeting_external_lobby_bypass_disabled_test.py b/tests/providers/m365/services/teams/teams_meeting_external_lobby_bypass_disabled/teams_meeting_external_lobby_bypass_disabled_test.py new file mode 100644 index 0000000000..8fe5d384d4 --- /dev/null +++ b/tests/providers/m365/services/teams/teams_meeting_external_lobby_bypass_disabled/teams_meeting_external_lobby_bypass_disabled_test.py @@ -0,0 +1,206 @@ +from unittest import mock + +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_teams_meeting_external_lobby_bypass_disabled: + def test_no_global_meeting_policy(self): + teams_client = mock.MagicMock() + teams_client.global_meeting_policy = None + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_meeting_external_lobby_bypass_disabled.teams_meeting_external_lobby_bypass_disabled.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_meeting_external_lobby_bypass_disabled.teams_meeting_external_lobby_bypass_disabled import ( + teams_meeting_external_lobby_bypass_disabled, + ) + + check = teams_meeting_external_lobby_bypass_disabled() + result = check.execute() + assert len(result) == 0 + + def test_external_users_can_bypass_lobby(self): + teams_client = mock.MagicMock() + teams_client.audited_tenant = "audited_tenant" + teams_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_meeting_external_lobby_bypass_disabled.teams_meeting_external_lobby_bypass_disabled.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_meeting_external_lobby_bypass_disabled.teams_meeting_external_lobby_bypass_disabled import ( + teams_meeting_external_lobby_bypass_disabled, + ) + from prowler.providers.m365.services.teams.teams_service import ( + GlobalMeetingPolicy, + ) + + teams_client.global_meeting_policy = GlobalMeetingPolicy( + allow_external_users_to_bypass_lobby="Everyone" + ) + + check = teams_meeting_external_lobby_bypass_disabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "People outside the organization can bypass the lobby." + ) + assert result[0].resource == teams_client.global_meeting_policy.dict() + assert ( + result[0].resource_name + == "Teams Meetings Global (Org-wide default) Policy" + ) + assert result[0].resource_id == "teamsMeetingsGlobalPolicy" + + def test_only_internal_users_can_bypass_lobby(self): + teams_client = mock.MagicMock() + teams_client.audited_tenant = "audited_tenant" + teams_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_meeting_external_lobby_bypass_disabled.teams_meeting_external_lobby_bypass_disabled.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_meeting_external_lobby_bypass_disabled.teams_meeting_external_lobby_bypass_disabled import ( + teams_meeting_external_lobby_bypass_disabled, + ) + from prowler.providers.m365.services.teams.teams_service import ( + GlobalMeetingPolicy, + ) + + teams_client.global_meeting_policy = GlobalMeetingPolicy( + allow_external_users_to_bypass_lobby="EveryoneInCompanyExcludingGuests" + ) + + check = teams_meeting_external_lobby_bypass_disabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Only people in the organization can bypass the lobby." + ) + assert result[0].resource == teams_client.global_meeting_policy.dict() + assert ( + result[0].resource_name + == "Teams Meetings Global (Org-wide default) Policy" + ) + assert result[0].resource_id == "teamsMeetingsGlobalPolicy" + + def test_organizer_only_can_bypass_lobby(self): + teams_client = mock.MagicMock() + teams_client.audited_tenant = "audited_tenant" + teams_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_meeting_external_lobby_bypass_disabled.teams_meeting_external_lobby_bypass_disabled.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_meeting_external_lobby_bypass_disabled.teams_meeting_external_lobby_bypass_disabled import ( + teams_meeting_external_lobby_bypass_disabled, + ) + from prowler.providers.m365.services.teams.teams_service import ( + GlobalMeetingPolicy, + ) + + teams_client.global_meeting_policy = GlobalMeetingPolicy( + allow_external_users_to_bypass_lobby="OrganizerOnly" + ) + + check = teams_meeting_external_lobby_bypass_disabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Only people in the organization can bypass the lobby." + ) + assert result[0].resource == teams_client.global_meeting_policy.dict() + assert ( + result[0].resource_name + == "Teams Meetings Global (Org-wide default) Policy" + ) + assert result[0].resource_id == "teamsMeetingsGlobalPolicy" + + def test_invited_users_can_bypass_lobby(self): + teams_client = mock.MagicMock() + teams_client.audited_tenant = "audited_tenant" + teams_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_meeting_external_lobby_bypass_disabled.teams_meeting_external_lobby_bypass_disabled.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_meeting_external_lobby_bypass_disabled.teams_meeting_external_lobby_bypass_disabled import ( + teams_meeting_external_lobby_bypass_disabled, + ) + from prowler.providers.m365.services.teams.teams_service import ( + GlobalMeetingPolicy, + ) + + teams_client.global_meeting_policy = GlobalMeetingPolicy( + allow_external_users_to_bypass_lobby="InvitedUsers" + ) + + check = teams_meeting_external_lobby_bypass_disabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Only people in the organization can bypass the lobby." + ) + assert result[0].resource == teams_client.global_meeting_policy.dict() + assert ( + result[0].resource_name + == "Teams Meetings Global (Org-wide default) Policy" + ) + assert result[0].resource_id == "teamsMeetingsGlobalPolicy" diff --git a/tests/providers/m365/services/teams/teams_meeting_presenters_restricted/teams_meeting_presenters_restricted_test.py b/tests/providers/m365/services/teams/teams_meeting_presenters_restricted/teams_meeting_presenters_restricted_test.py new file mode 100644 index 0000000000..5c47f1e445 --- /dev/null +++ b/tests/providers/m365/services/teams/teams_meeting_presenters_restricted/teams_meeting_presenters_restricted_test.py @@ -0,0 +1,118 @@ +from unittest import mock + +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_teams_meeting_presenters_restricted: + def test_no_global_meeting_policy(self): + teams_client = mock.MagicMock() + teams_client.global_meeting_policy = None + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_meeting_presenters_restricted.teams_meeting_presenters_restricted.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_meeting_presenters_restricted.teams_meeting_presenters_restricted import ( + teams_meeting_presenters_restricted, + ) + + check = teams_meeting_presenters_restricted() + result = check.execute() + assert len(result) == 0 + + def test_presenters_not_restricted(self): + teams_client = mock.MagicMock() + teams_client.audited_tenant = "audited_tenant" + teams_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_meeting_presenters_restricted.teams_meeting_presenters_restricted.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_meeting_presenters_restricted.teams_meeting_presenters_restricted import ( + teams_meeting_presenters_restricted, + ) + from prowler.providers.m365.services.teams.teams_service import ( + GlobalMeetingPolicy, + ) + + teams_client.global_meeting_policy = GlobalMeetingPolicy( + designated_presenter_role_mode="EveryoneUserOverride" + ) + + check = teams_meeting_presenters_restricted() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Not only organizers and co-organizers can present." + ) + assert result[0].resource == teams_client.global_meeting_policy.dict() + assert ( + result[0].resource_name + == "Teams Meetings Global (Org-wide default) Policy" + ) + assert result[0].resource_id == "teamsMeetingsGlobalPolicy" + + def test_presenters_restricted(self): + teams_client = mock.MagicMock() + teams_client.audited_tenant = "audited_tenant" + teams_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_meeting_presenters_restricted.teams_meeting_presenters_restricted.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_meeting_presenters_restricted.teams_meeting_presenters_restricted import ( + teams_meeting_presenters_restricted, + ) + from prowler.providers.m365.services.teams.teams_service import ( + GlobalMeetingPolicy, + ) + + teams_client.global_meeting_policy = GlobalMeetingPolicy( + designated_presenter_role_mode="OrganizerOnlyUserOverride" + ) + + check = teams_meeting_presenters_restricted() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Only organizers and co-organizers can present." + ) + assert result[0].resource == teams_client.global_meeting_policy.dict() + assert ( + result[0].resource_name + == "Teams Meetings Global (Org-wide default) Policy" + ) + assert result[0].resource_id == "teamsMeetingsGlobalPolicy" diff --git a/tests/providers/m365/services/teams/teams_meeting_recording_disabled/teams_meeting_recording_disabled_test.py b/tests/providers/m365/services/teams/teams_meeting_recording_disabled/teams_meeting_recording_disabled_test.py new file mode 100644 index 0000000000..617d9ebc49 --- /dev/null +++ b/tests/providers/m365/services/teams/teams_meeting_recording_disabled/teams_meeting_recording_disabled_test.py @@ -0,0 +1,118 @@ +from unittest import mock + +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_teams_meeting_recording_disabled: + def test_no_global_meeting_policy(self): + teams_client = mock.MagicMock() + teams_client.global_meeting_policy = None + teams_client.audited_tenant = "audited_tenant" + teams_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_meeting_recording_disabled.teams_meeting_recording_disabled.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_meeting_recording_disabled.teams_meeting_recording_disabled import ( + teams_meeting_recording_disabled, + ) + + check = teams_meeting_recording_disabled() + result = check.execute() + assert len(result) == 0 + + def test_meeting_recording_enabled(self): + teams_client = mock.MagicMock() + teams_client.audited_tenant = "audited_tenant" + teams_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_meeting_recording_disabled.teams_meeting_recording_disabled.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_meeting_recording_disabled.teams_meeting_recording_disabled import ( + teams_meeting_recording_disabled, + ) + from prowler.providers.m365.services.teams.teams_service import ( + GlobalMeetingPolicy, + ) + + teams_client.global_meeting_policy = GlobalMeetingPolicy( + allow_cloud_recording=True + ) + + check = teams_meeting_recording_disabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended == "Meeting recording is enabled by default." + ) + assert result[0].resource == teams_client.global_meeting_policy.dict() + assert ( + result[0].resource_name + == "Teams Meetings Global (Org-wide default) Policy" + ) + assert result[0].resource_id == "teamsMeetingsGlobalPolicy" + + def test_meeting_recording_disabled(self): + teams_client = mock.MagicMock() + teams_client.audited_tenant = "audited_tenant" + teams_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_meeting_recording_disabled.teams_meeting_recording_disabled.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_meeting_recording_disabled.teams_meeting_recording_disabled import ( + teams_meeting_recording_disabled, + ) + from prowler.providers.m365.services.teams.teams_service import ( + GlobalMeetingPolicy, + ) + + teams_client.global_meeting_policy = GlobalMeetingPolicy( + allow_cloud_recording=False + ) + + check = teams_meeting_recording_disabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended == "Meeting recording is disabled by default." + ) + assert result[0].resource == teams_client.global_meeting_policy.dict() + assert ( + result[0].resource_name + == "Teams Meetings Global (Org-wide default) Policy" + ) + assert result[0].resource_id == "teamsMeetingsGlobalPolicy" diff --git a/tests/providers/m365/services/teams/teams_security_reporting_enabled/teams_security_reporting_enabled_test.py b/tests/providers/m365/services/teams/teams_security_reporting_enabled/teams_security_reporting_enabled_test.py new file mode 100644 index 0000000000..04bcaa0da7 --- /dev/null +++ b/tests/providers/m365/services/teams/teams_security_reporting_enabled/teams_security_reporting_enabled_test.py @@ -0,0 +1,76 @@ +from unittest import mock + +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_teams_security_reporting_enabled: + def test_no_policies(self): + teams_client = mock.MagicMock() + teams_client.global_messaging_policy = None + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_security_reporting_enabled.teams_security_reporting_enabled.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_security_reporting_enabled.teams_security_reporting_enabled import ( + teams_security_reporting_enabled, + ) + + check = teams_security_reporting_enabled() + result = check.execute() + assert len(result) == 0 + + def test_security_reporting_properly_configured(self): + teams_client = mock.MagicMock() + teams_client.audited_tenant = "audited_tenant" + teams_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_exchange_online" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_security_reporting_enabled.teams_security_reporting_enabled.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_security_reporting_enabled.teams_security_reporting_enabled import ( + teams_security_reporting_enabled, + ) + from prowler.providers.m365.services.teams.teams_service import ( + GlobalMessagingPolicy, + ) + + teams_client.global_messaging_policy = GlobalMessagingPolicy( + allow_security_end_user_reporting=True + ) + + check = teams_security_reporting_enabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Security reporting is enabled in Teams messaging policy." + ) + assert result[0].resource_name == "Teams Security Reporting Settings" + assert result[0].resource_id == "teamsSecurityReporting" diff --git a/tests/providers/m365/services/teams/teams_service_test.py b/tests/providers/m365/services/teams/teams_service_test.py new file mode 100644 index 0000000000..717b0b68ee --- /dev/null +++ b/tests/providers/m365/services/teams/teams_service_test.py @@ -0,0 +1,164 @@ +from unittest import mock +from unittest.mock import patch + +from prowler.providers.m365.models import M365IdentityInfo +from prowler.providers.m365.services.teams.teams_service import ( + CloudStorageSettings, + GlobalMeetingPolicy, + GlobalMessagingPolicy, + Teams, + TeamsSettings, + UserSettings, +) +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +def mock_get_teams_client_configuration(_): + return TeamsSettings( + cloud_storage_settings=CloudStorageSettings( + allow_box=False, + allow_drop_box=False, + allow_egnyte=False, + allow_google_drive=False, + allow_share_file=False, + ) + ) + + +def mock_get_global_meeting_policy(_): + return GlobalMeetingPolicy( + allow_anonymous_users_to_join_meeting=False, + allow_anonymous_users_to_start_meeting=False, + allow_external_participant_give_request_control=False, + allow_external_non_trusted_meeting_chat=False, + allow_cloud_recording=False, + designated_presenter_role_mode="EveryoneUserOverride", + allow_external_users_to_bypass_lobby="EveryoneInCompanyExcludingGuests", + allow_pstn_users_to_bypass_lobby=False, + meeting_chat_enabled_type="EnabledExceptAnonymous", + ) + + +def mock_get_global_messaging_policy(_): + return GlobalMessagingPolicy(allow_security_end_user_reporting=True) + + +def mock_get_user_settings(_): + return UserSettings( + allow_external_access=False, + allow_teams_consumer=False, + allow_teams_consumer_inbound=False, + ) + + +class Test_Teams_Service: + def test_get_client(self): + with ( + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + ): + teams_client = Teams( + set_mocked_m365_provider( + identity=M365IdentityInfo(tenant_domain=DOMAIN) + ) + ) + assert teams_client.client.__class__.__name__ == "GraphServiceClient" + assert teams_client.powershell.__class__.__name__ == "M365PowerShell" + teams_client.powershell.close() + + @patch( + "prowler.providers.m365.services.teams.teams_service.Teams._get_teams_client_configuration", + new=mock_get_teams_client_configuration, + ) + def test_get_settings(self): + with ( + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + ): + teams_client = Teams( + set_mocked_m365_provider( + identity=M365IdentityInfo(tenant_domain=DOMAIN) + ) + ) + assert teams_client.teams_settings == TeamsSettings( + cloud_storage_settings=CloudStorageSettings( + allow_box=False, + allow_drop_box=False, + allow_egnyte=False, + allow_google_drive=False, + allow_share_file=False, + ), + allow_email_into_channel=True, + ) + teams_client.powershell.close() + + @patch( + "prowler.providers.m365.services.teams.teams_service.Teams._get_user_settings", + new=mock_get_user_settings, + ) + def test_get_user_settings(self): + with ( + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + ): + teams_client = Teams( + set_mocked_m365_provider( + identity=M365IdentityInfo(tenant_domain=DOMAIN) + ) + ) + assert teams_client.user_settings == UserSettings( + allow_external_access=False, + allow_teams_consumer=False, + allow_teams_consumer_inbound=False, + ) + teams_client.powershell.close() + + @patch( + "prowler.providers.m365.services.teams.teams_service.Teams._get_global_meeting_policy", + new=mock_get_global_meeting_policy, + ) + def test_get_global_meeting_policy(self): + with ( + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + ): + teams_client = Teams( + set_mocked_m365_provider( + identity=M365IdentityInfo(tenant_domain=DOMAIN) + ) + ) + assert teams_client.global_meeting_policy == GlobalMeetingPolicy( + allow_anonymous_users_to_join_meeting=False, + allow_anonymous_users_to_start_meeting=False, + allow_external_participant_give_request_control=False, + allow_external_non_trusted_meeting_chat=False, + allow_cloud_recording=False, + designated_presenter_role_mode="EveryoneUserOverride", + allow_external_users_to_bypass_lobby="EveryoneInCompanyExcludingGuests", + allow_pstn_users_to_bypass_lobby=False, + meeting_chat_enabled_type="EnabledExceptAnonymous", + ) + teams_client.powershell.close() + + @patch( + "prowler.providers.m365.services.teams.teams_service.Teams._get_global_messaging_policy", + new=mock_get_global_messaging_policy, + ) + def test_get_global_messaging_policy(self): + with ( + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + ): + teams_client = Teams( + set_mocked_m365_provider( + identity=M365IdentityInfo(tenant_domain=DOMAIN) + ) + ) + assert teams_client.global_messaging_policy == GlobalMessagingPolicy( + allow_security_end_user_reporting=True + ) diff --git a/tests/providers/m365/services/teams/teams_unmanaged_communication_disabled/teams_unmanaged_communication_disabled_test.py b/tests/providers/m365/services/teams/teams_unmanaged_communication_disabled/teams_unmanaged_communication_disabled_test.py new file mode 100644 index 0000000000..2e46ac8efc --- /dev/null +++ b/tests/providers/m365/services/teams/teams_unmanaged_communication_disabled/teams_unmanaged_communication_disabled_test.py @@ -0,0 +1,112 @@ +from unittest import mock + +from tests.providers.m365.m365_fixtures import DOMAIN, set_mocked_m365_provider + + +class Test_teams_unmanaged_communication_disabled: + def test_no_user_settings(self): + teams_client = mock.MagicMock() + teams_client.audited_tenant = "audited_tenant" + teams_client.audited_domain = DOMAIN + teams_client.user_settings = None + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_unmanaged_communication_disabled.teams_unmanaged_communication_disabled.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_unmanaged_communication_disabled.teams_unmanaged_communication_disabled import ( + teams_unmanaged_communication_disabled, + ) + + check = teams_unmanaged_communication_disabled() + result = check.execute() + assert len(result) == 0 + + def test_unmanaged_communication_allowed(self): + teams_client = mock.MagicMock() + teams_client.audited_tenant = "audited_tenant" + teams_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_unmanaged_communication_disabled.teams_unmanaged_communication_disabled.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_service import UserSettings + from prowler.providers.m365.services.teams.teams_unmanaged_communication_disabled.teams_unmanaged_communication_disabled import ( + teams_unmanaged_communication_disabled, + ) + + teams_client.user_settings = UserSettings( + allow_teams_consumer=True, + ) + + check = teams_unmanaged_communication_disabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + result[0].status_extended + == "Teams users can communicate with unmanaged users." + ) + assert result[0].resource == teams_client.user_settings.dict() + assert result[0].resource_name == "Teams User Settings" + assert result[0].resource_id == "userSettings" + assert result[0].location == "global" + + def test_unmanaged_communication_restricted(self): + teams_client = mock.MagicMock() + teams_client.audited_tenant = "audited_tenant" + teams_client.audited_domain = DOMAIN + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_m365_provider(), + ), + mock.patch( + "prowler.providers.m365.lib.powershell.m365_powershell.M365PowerShell.connect_microsoft_teams" + ), + mock.patch( + "prowler.providers.m365.services.teams.teams_unmanaged_communication_disabled.teams_unmanaged_communication_disabled.teams_client", + new=teams_client, + ), + ): + from prowler.providers.m365.services.teams.teams_service import UserSettings + from prowler.providers.m365.services.teams.teams_unmanaged_communication_disabled.teams_unmanaged_communication_disabled import ( + teams_unmanaged_communication_disabled, + ) + + teams_client.user_settings = UserSettings( + allow_teams_consumer=False, + ) + + check = teams_unmanaged_communication_disabled() + result = check.execute() + assert len(result) == 1 + assert result[0].status == "PASS" + assert ( + result[0].status_extended + == "Teams users cannot communicate with unmanaged users." + ) + assert result[0].resource == teams_client.user_settings.dict() + assert result[0].resource_name == "Teams User Settings" + assert result[0].resource_id == "userSettings" + assert result[0].location == "global" diff --git a/tests/providers/microsoft365/microsoft365_provider_test.py b/tests/providers/microsoft365/microsoft365_provider_test.py deleted file mode 100644 index 7658301e44..0000000000 --- a/tests/providers/microsoft365/microsoft365_provider_test.py +++ /dev/null @@ -1,312 +0,0 @@ -from unittest.mock import patch -from uuid import uuid4 - -import pytest -from azure.core.credentials import AccessToken -from azure.identity import ( - ClientSecretCredential, - DefaultAzureCredential, - InteractiveBrowserCredential, -) -from mock import MagicMock - -from prowler.config.config import ( - default_config_file_path, - default_fixer_config_file_path, - load_and_validate_config_file, -) -from prowler.providers.common.models import Connection -from prowler.providers.microsoft365.exceptions.exceptions import ( - Microsoft365HTTPResponseError, - Microsoft365NoAuthenticationMethodError, -) -from prowler.providers.microsoft365.microsoft365_provider import Microsoft365Provider -from prowler.providers.microsoft365.models import ( - Microsoft365IdentityInfo, - Microsoft365RegionConfig, -) -from tests.providers.microsoft365.microsoft365_fixtures import ( - CLIENT_ID, - CLIENT_SECRET, - DOMAIN, - IDENTITY_ID, - IDENTITY_TYPE, - LOCATION, - TENANT_ID, -) - - -class TestMicrosoft365Provider: - def test_microsoft365_provider(self): - tenant_id = None - client_id = None - client_secret = None - - fixer_config = load_and_validate_config_file( - "microsoft365", default_fixer_config_file_path - ) - azure_region = "Microsoft365Global" - - with ( - patch( - "prowler.providers.microsoft365.microsoft365_provider.Microsoft365Provider.setup_session", - return_value=ClientSecretCredential( - client_id=CLIENT_ID, - tenant_id=TENANT_ID, - client_secret=CLIENT_SECRET, - ), - ), - patch( - "prowler.providers.microsoft365.microsoft365_provider.Microsoft365Provider.setup_identity", - return_value=Microsoft365IdentityInfo( - identity_id=IDENTITY_ID, - identity_type=IDENTITY_TYPE, - tenant_id=TENANT_ID, - tenant_domain=DOMAIN, - location=LOCATION, - ), - ), - ): - microsoft365_provider = Microsoft365Provider( - sp_env_auth=True, - az_cli_auth=False, - browser_auth=False, - tenant_id=tenant_id, - client_id=client_id, - client_secret=client_secret, - region=azure_region, - config_path=default_config_file_path, - fixer_config=fixer_config, - ) - - assert microsoft365_provider.region_config == Microsoft365RegionConfig( - name="Microsoft365Global", - authority=None, - base_url="https://graph.microsoft.com", - credential_scopes=["https://graph.microsoft.com/.default"], - ) - assert microsoft365_provider.identity == Microsoft365IdentityInfo( - identity_id=IDENTITY_ID, - identity_type=IDENTITY_TYPE, - tenant_id=TENANT_ID, - tenant_domain=DOMAIN, - location=LOCATION, - ) - - def test_microsoft365_provider_cli_auth(self): - """Test Microsoft365 Provider initialization with CLI authentication""" - azure_region = "Microsoft365Global" - fixer_config = load_and_validate_config_file( - "microsoft365", default_fixer_config_file_path - ) - - with ( - patch( - "prowler.providers.microsoft365.microsoft365_provider.Microsoft365Provider.setup_session", - return_value=DefaultAzureCredential( - exclude_environment_credential=True, - exclude_cli_credential=False, - exclude_managed_identity_credential=True, - exclude_visual_studio_code_credential=True, - exclude_shared_token_cache_credential=True, - exclude_powershell_credential=True, - exclude_browser_credential=True, - ), - ), - patch( - "prowler.providers.microsoft365.microsoft365_provider.Microsoft365Provider.setup_identity", - return_value=Microsoft365IdentityInfo( - identity_id=IDENTITY_ID, - identity_type="User", - tenant_id=TENANT_ID, - tenant_domain=DOMAIN, - location=LOCATION, - ), - ), - ): - microsoft365_provider = Microsoft365Provider( - sp_env_auth=False, - az_cli_auth=True, - browser_auth=False, - region=azure_region, - config_path=default_config_file_path, - fixer_config=fixer_config, - ) - - assert microsoft365_provider.region_config == Microsoft365RegionConfig( - name="Microsoft365Global", - authority=None, - base_url="https://graph.microsoft.com", - credential_scopes=["https://graph.microsoft.com/.default"], - ) - assert microsoft365_provider.identity == Microsoft365IdentityInfo( - identity_id=IDENTITY_ID, - identity_type="User", - tenant_id=TENANT_ID, - tenant_domain=DOMAIN, - location=LOCATION, - ) - assert isinstance(microsoft365_provider.session, DefaultAzureCredential) - - def test_microsoft365_provider_browser_auth(self): - """Test Microsoft365 Provider initialization with Browser authentication""" - azure_region = "Microsoft365Global" - fixer_config = load_and_validate_config_file( - "microsoft365", default_fixer_config_file_path - ) - - with ( - patch( - "prowler.providers.microsoft365.microsoft365_provider.Microsoft365Provider.setup_session", - return_value=InteractiveBrowserCredential( - tenant_id=TENANT_ID, - ), - ), - patch( - "prowler.providers.microsoft365.microsoft365_provider.Microsoft365Provider.setup_identity", - return_value=Microsoft365IdentityInfo( - identity_id=IDENTITY_ID, - identity_type="User", - tenant_id=TENANT_ID, - tenant_domain=DOMAIN, - location=LOCATION, - ), - ), - ): - microsoft365_provider = Microsoft365Provider( - sp_env_auth=False, - az_cli_auth=False, - browser_auth=True, - tenant_id=TENANT_ID, - region=azure_region, - config_path=default_config_file_path, - fixer_config=fixer_config, - ) - - assert microsoft365_provider.region_config == Microsoft365RegionConfig( - name="Microsoft365Global", - authority=None, - base_url="https://graph.microsoft.com", - credential_scopes=["https://graph.microsoft.com/.default"], - ) - assert microsoft365_provider.identity == Microsoft365IdentityInfo( - identity_id=IDENTITY_ID, - identity_type="User", - tenant_id=TENANT_ID, - tenant_domain=DOMAIN, - location=LOCATION, - ) - assert isinstance( - microsoft365_provider.session, InteractiveBrowserCredential - ) - - def test_test_connection_browser_auth(self): - with ( - patch( - "prowler.providers.microsoft365.microsoft365_provider.DefaultAzureCredential" - ) as mock_default_credential, - patch( - "prowler.providers.microsoft365.microsoft365_provider.Microsoft365Provider.setup_session" - ) as mock_setup_session, - patch( - "prowler.providers.microsoft365.microsoft365_provider.GraphServiceClient" - ) as mock_graph_client, - ): - # Mock the return value of DefaultAzureCredential - mock_credentials = MagicMock() - mock_credentials.get_token.return_value = AccessToken( - token="fake_token", expires_on=9999999999 - ) - mock_default_credential.return_value = mock_credentials - - # Mock setup_session to return a mocked session object - mock_session = MagicMock() - mock_setup_session.return_value = mock_session - - # Mock GraphServiceClient to avoid real API calls - mock_client = MagicMock() - mock_graph_client.return_value = mock_client - - test_connection = Microsoft365Provider.test_connection( - browser_auth=True, - tenant_id=str(uuid4()), - region="Microsoft365Global", - raise_on_exception=False, - ) - - assert isinstance(test_connection, Connection) - assert test_connection.is_connected - assert test_connection.error is None - - def test_test_connection_tenant_id_client_id_client_secret(self): - with ( - patch( - "prowler.providers.microsoft365.microsoft365_provider.Microsoft365Provider.setup_session" - ) as mock_setup_session, - patch( - "prowler.providers.microsoft365.microsoft365_provider.Microsoft365Provider.validate_static_credentials" - ) as mock_validate_static_credentials, - ): - # Mock setup_session to return a mocked session object - mock_session = MagicMock() - mock_setup_session.return_value = mock_session - - # Mock ValidateStaticCredentials to avoid real API calls - mock_validate_static_credentials.return_value = None - - test_connection = Microsoft365Provider.test_connection( - tenant_id=str(uuid4()), - region="Microsoft365Global", - raise_on_exception=False, - client_id=str(uuid4()), - client_secret=str(uuid4()), - ) - - assert isinstance(test_connection, Connection) - assert test_connection.is_connected - assert test_connection.error is None - - def test_test_connection_with_httpresponseerror(self): - with patch( - "prowler.providers.microsoft365.microsoft365_provider.Microsoft365Provider.setup_session" - ) as mock_setup_session: - mock_setup_session.side_effect = Microsoft365HTTPResponseError( - file="test_file", original_exception="Simulated HttpResponseError" - ) - - with pytest.raises(Microsoft365HTTPResponseError) as exception: - Microsoft365Provider.test_connection( - az_cli_auth=True, - raise_on_exception=True, - ) - - assert exception.type == Microsoft365HTTPResponseError - assert ( - exception.value.args[0] - == "[6003] Error in HTTP response from Microsoft365 - Simulated HttpResponseError" - ) - - def test_test_connection_with_exception(self): - with patch( - "prowler.providers.microsoft365.microsoft365_provider.Microsoft365Provider.setup_session" - ) as mock_setup_session: - mock_setup_session.side_effect = Exception("Simulated Exception") - - with pytest.raises(Exception) as exception: - Microsoft365Provider.test_connection( - sp_env_auth=True, - raise_on_exception=True, - ) - - assert exception.type is Exception - assert exception.value.args[0] == "Simulated Exception" - - def test_test_connection_without_any_method(self): - with pytest.raises(Microsoft365NoAuthenticationMethodError) as exception: - Microsoft365Provider.test_connection() - - assert exception.type == Microsoft365NoAuthenticationMethodError - assert ( - "Microsoft365 provider requires at least one authentication method set: [--az-cli-auth | --sp-env-auth | --browser-auth]" - in exception.value.args[0] - ) diff --git a/tests/providers/microsoft365/services/admincenter/admincenter_service_test.py b/tests/providers/microsoft365/services/admincenter/admincenter_service_test.py deleted file mode 100644 index 1aaf11f8f4..0000000000 --- a/tests/providers/microsoft365/services/admincenter/admincenter_service_test.py +++ /dev/null @@ -1,84 +0,0 @@ -from unittest.mock import patch - -from prowler.providers.microsoft365.models import Microsoft365IdentityInfo -from prowler.providers.microsoft365.services.admincenter.admincenter_service import ( - AdminCenter, - DirectoryRole, - Group, - User, -) -from tests.providers.microsoft365.microsoft365_fixtures import ( - DOMAIN, - set_mocked_microsoft365_provider, -) - - -async def mock_admincenter_get_users(_): - return { - "user-1@tenant1.es": User( - id="id-1", - name="User 1", - directory_roles=[], - ), - } - - -async def mock_admincenter_get_directory_roles(_): - return { - "GlobalAdministrator": DirectoryRole( - id="id-directory-role", - name="GlobalAdministrator", - members=[], - ) - } - - -async def mock_admincenter_get_groups(_): - return { - "id-1": Group(id="id-1", name="Test", visibility="Public"), - } - - -@patch( - "prowler.providers.microsoft365.services.admincenter.admincenter_service.AdminCenter._get_users", - new=mock_admincenter_get_users, -) -@patch( - "prowler.providers.microsoft365.services.admincenter.admincenter_service.AdminCenter._get_directory_roles", - new=mock_admincenter_get_directory_roles, -) -@patch( - "prowler.providers.microsoft365.services.admincenter.admincenter_service.AdminCenter._get_groups", - new=mock_admincenter_get_groups, -) -class Test_AdminCenter_Service: - def test_get_client(self): - admincenter_client = AdminCenter( - set_mocked_microsoft365_provider( - identity=Microsoft365IdentityInfo(tenant_domain=DOMAIN) - ) - ) - assert admincenter_client.client.__class__.__name__ == "GraphServiceClient" - - def test_get_users(self): - admincenter_client = AdminCenter(set_mocked_microsoft365_provider()) - assert len(admincenter_client.users) == 1 - assert admincenter_client.users["user-1@tenant1.es"].id == "id-1" - assert admincenter_client.users["user-1@tenant1.es"].name == "User 1" - - def test_get_group_settings(self): - admincenter_client = AdminCenter(set_mocked_microsoft365_provider()) - assert len(admincenter_client.groups) == 1 - assert admincenter_client.groups["id-1"].id == "id-1" - assert admincenter_client.groups["id-1"].name == "Test" - assert admincenter_client.groups["id-1"].visibility == "Public" - - def test_get_directory_roles(self): - admincenter_client = AdminCenter(set_mocked_microsoft365_provider()) - assert ( - admincenter_client.directory_roles["GlobalAdministrator"].id - == "id-directory-role" - ) - assert ( - len(admincenter_client.directory_roles["GlobalAdministrator"].members) == 0 - ) diff --git a/tests/providers/nhn/lib/mutelist/fixtures/nhn_mutelist.yaml b/tests/providers/nhn/lib/mutelist/fixtures/nhn_mutelist.yaml new file mode 100644 index 0000000000..6a4be42b4b --- /dev/null +++ b/tests/providers/nhn/lib/mutelist/fixtures/nhn_mutelist.yaml @@ -0,0 +1,16 @@ +### Account, Check and/or Region can be * to apply for all the cases. +### 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: + "subscription_1": + Checks: + "compute_instance_public_ip": + Regions: + - "*" + Resources: + - "resource_1" + - "resource_2" \ No newline at end of file diff --git a/tests/providers/nhn/lib/mutelist/nhn_mutelist_test.py b/tests/providers/nhn/lib/mutelist/nhn_mutelist_test.py new file mode 100644 index 0000000000..dcdc17b2d9 --- /dev/null +++ b/tests/providers/nhn/lib/mutelist/nhn_mutelist_test.py @@ -0,0 +1,100 @@ +import yaml +from mock import MagicMock + +from prowler.providers.nhn.lib.mutelist.mutelist import NHNMutelist +from tests.lib.outputs.fixtures.fixtures import generate_finding_output + +MUTELIST_FIXTURE_PATH = "tests/providers/nhn/lib/mutelist/fixtures/nhn_mutelist.yaml" + + +class TestNHNMutelist: + def test_get_mutelist_file_from_local_file(self): + mutelist = NHNMutelist(mutelist_path=MUTELIST_FIXTURE_PATH) + + with open(MUTELIST_FIXTURE_PATH) as f: + mutelist_fixture = yaml.safe_load(f)["Mutelist"] + + assert mutelist.mutelist == mutelist_fixture + assert mutelist.mutelist_file_path == MUTELIST_FIXTURE_PATH + + def test_get_mutelist_file_from_local_file_non_existent(self): + mutelist_path = "tests/lib/mutelist/fixtures/not_present" + mutelist = NHNMutelist(mutelist_path=mutelist_path) + + assert mutelist.mutelist == {} + assert mutelist.mutelist_file_path == mutelist_path + + def test_validate_mutelist_not_valid_key(self): + mutelist_path = MUTELIST_FIXTURE_PATH + with open(mutelist_path) as f: + mutelist_fixture = yaml.safe_load(f)["Mutelist"] + + mutelist_fixture["Accounts1"] = mutelist_fixture["Accounts"] + del mutelist_fixture["Accounts"] + + mutelist = NHNMutelist(mutelist_content=mutelist_fixture) + + assert not mutelist.validate_mutelist() + assert mutelist.mutelist == {} + assert mutelist.mutelist_file_path is None + + def test_is_finding_muted(self): + # Mutelist + mutelist_content = { + "Accounts": { + "resource_1": { + "Checks": { + "check_test": { + "Regions": ["*"], + "Resources": ["test_resource"], + } + } + } + } + } + + mutelist = NHNMutelist(mutelist_content=mutelist_content) + + finding = MagicMock() + finding.resource_id = "resource_1" + finding.check_metadata = MagicMock() + finding.check_metadata.CheckID = "check_test" + finding.status = "FAIL" + finding.resource_name = "test_resource" + finding.location = "test_region" + finding.resource_tags = [] + + assert mutelist.is_finding_muted(finding) + + def test_mute_finding(self): + # Mutelist + mutelist_content = { + "Accounts": { + "resource_1": { + "Checks": { + "check_test": { + "Regions": ["*"], + "Resources": ["test_resource"], + } + } + } + } + } + + mutelist = NHNMutelist(mutelist_content=mutelist_content) + + finding_1 = generate_finding_output( + check_id="check_test", + status="FAIL", + account_uid="resource_1", + region="test_region", + resource_uid="test_resource", + resource_tags=[], + muted=False, + ) + + muted_finding = mutelist.mute_finding(finding=finding_1) + + assert muted_finding.status == "MUTED" + assert muted_finding.muted + assert muted_finding.raw["status"] == "FAIL" diff --git a/tests/providers/nhn/nhn_fixtures.py b/tests/providers/nhn/nhn_fixtures.py new file mode 100644 index 0000000000..a8a1fbd53e --- /dev/null +++ b/tests/providers/nhn/nhn_fixtures.py @@ -0,0 +1,29 @@ +from mock import MagicMock + +from prowler.providers.nhn.nhn_provider import NhnProvider + + +def set_mocked_nhn_provider( + username="test_user", + password="test_password", + tenant_id="tenant123", + audit_config=None, + fixer_config=None, +): + """ + Creates a mocked NHN Provider object for testing without real network calls. + """ + provider = MagicMock(spec=NhnProvider) # or just MagicMock() + + provider.type = "nhn" + provider._username = username + provider._password = password + provider._tenant_id = tenant_id + provider._token = "fake_keystone_token" + + provider.session = MagicMock() + + provider.audit_config = audit_config + provider.fixer_config = fixer_config + + return provider diff --git a/tests/providers/nhn/nhn_provider_test.py b/tests/providers/nhn/nhn_provider_test.py new file mode 100644 index 0000000000..dc59ac1347 --- /dev/null +++ b/tests/providers/nhn/nhn_provider_test.py @@ -0,0 +1,157 @@ +import os +from unittest.mock import MagicMock, patch + +import pytest + +from prowler.providers.common.models import Connection +from prowler.providers.nhn.nhn_provider import NhnProvider + + +class TestNhnProvider: + @patch.dict( + os.environ, + { + "NHN_USERNAME": "env_user", + "NHN_PASSWORD": "env_pass", + "NHN_TENANT_ID": "env_tenant", + }, + ) + @patch("prowler.providers.nhn.nhn_provider.load_and_validate_config_file") + @patch("requests.post") + def test_nhn_provider_init_success(self, mock_post, mock_load_config): + """ + Test a successful initialization of NhnProvider + with valid username/password/tenant_id and a Keystone token response = 200. + """ + # 1) Mock load_and_validate_config_file to avoid reading real config file + mock_load_config.return_value = {} + + # 2) Mock the requests.post to simulate a successful token response + mock_response = MagicMock() + mock_response.status_code = 200 + mock_response.json.return_value = { + "access": {"token": {"id": "fake_keystone_token"}} + } + mock_post.return_value = mock_response + + # 3) Create provider + provider = NhnProvider( + username="test_user", + password="test_pass", + tenant_id="test_tenant", + ) + + # 4) Assertions + assert provider._token == "fake_keystone_token" + assert provider.session is not None + assert provider.session.headers["X-Auth-Token"] == "fake_keystone_token" + + @patch.dict(os.environ, {}, clear=True) + @patch( + "prowler.providers.nhn.nhn_provider.load_and_validate_config_file", + return_value={}, + ) + def test_nhn_provider_init_missing_args(self, mock_load_config): + """ + Test initialization when username/password/tenant_id is missing => ValueError + """ + with pytest.raises(ValueError) as exc_info: + NhnProvider(username="", password="secret", tenant_id="tenant") + assert "requires username, password and tenant_id" in str(exc_info.value) + + @patch( + "prowler.providers.nhn.nhn_provider.load_and_validate_config_file", + return_value={}, + ) + @patch("requests.post") + def test_nhn_provider_init_token_fail(self, mock_post, mock_load_config): + """ + Test the case where Keystone token request fails (non-200) + => provider._session remains None + """ + mock_post.return_value.status_code = 401 + mock_post.return_value.text = "Unauthorized" + + with pytest.raises(ValueError) as exc_info: + NhnProvider( + username="test_user", + password="test_pass", + tenant_id="tenant123", + ) + + assert "Failed to get NHN token" in str(exc_info.value) + + @patch("prowler.providers.nhn.nhn_provider.requests") + def test_test_connection_success(self, mock_requests): + """ + Test test_connection static method => success case + """ + # 1) Mock token success + mock_post_response = MagicMock() + mock_post_response.status_code = 200 + mock_post_response.json.return_value = { + "access": {"token": {"id": "fake_keystone_token"}} + } + # 2) Mock /servers success + mock_get_response = MagicMock() + mock_get_response.status_code = 200 + mock_requests.post.return_value = mock_post_response + mock_requests.get.return_value = mock_get_response + + conn = NhnProvider.test_connection( + username="test_user", + password="test_pass", + tenant_id="tenant123", + raise_on_exception=True, + ) + + assert isinstance(conn, Connection) + assert conn.is_connected is True + assert conn.error is None + + @patch("prowler.providers.nhn.nhn_provider.requests") + def test_test_connection_token_fail(self, mock_requests): + """ + Test test_connection => token request fails => returns Connection(error=...) + """ + mock_requests.post.return_value.status_code = 403 + mock_requests.post.return_value.text = "Forbidden" + + conn = NhnProvider.test_connection( + username="bad_user", + password="bad_pass", + tenant_id="tenant123", + raise_on_exception=False, # so we don't raise, we get Connection object + ) + assert conn.is_connected is False + assert conn.error is not None + assert "Failed to get token" in str(conn.error) + + @patch("prowler.providers.nhn.nhn_provider.requests") + def test_test_connection_servers_fail(self, mock_requests): + """ + Test test_connection => token OK, but /servers fails => returns Connection(error=...) + """ + # Keystone token success + mock_post_response = MagicMock() + mock_post_response.status_code = 200 + mock_post_response.json.return_value = { + "access": {"token": {"id": "fake_keystone_token"}} + } + mock_requests.post.return_value = mock_post_response + + # /servers fail + mock_get_response = MagicMock() + mock_get_response.status_code = 500 + mock_get_response.text = "Internal Server Error" + mock_requests.get.return_value = mock_get_response + + conn = NhnProvider.test_connection( + username="test_user", + password="test_pass", + tenant_id="tenant123", + raise_on_exception=False, + ) + assert conn.is_connected is False + assert conn.error is not None + assert "/servers call failed" in str(conn.error) diff --git a/tests/providers/nhn/services/compute/compute_instance_login_user/compute_instance_login_user_test_for_nhn.py b/tests/providers/nhn/services/compute/compute_instance_login_user/compute_instance_login_user_test_for_nhn.py new file mode 100644 index 0000000000..5e545d87c3 --- /dev/null +++ b/tests/providers/nhn/services/compute/compute_instance_login_user/compute_instance_login_user_test_for_nhn.py @@ -0,0 +1,110 @@ +from unittest import mock +from uuid import uuid4 + +from prowler.providers.nhn.services.compute.compute_service import Instance +from tests.providers.nhn.nhn_fixtures import set_mocked_nhn_provider + + +class Test_compute_instance_login_user: + def test_no_instances(self): + # 1) Make a MagicMock for compute_client + compute_client = mock.MagicMock() + compute_client.instances = [] + + # 2) Patch get_global_provider() to return a mocked NHN provider + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_nhn_provider(), + ), + mock.patch( + # patch the 'compute_instance_login_user.compute_client' used in the check code + "prowler.providers.nhn.services.compute.compute_instance_login_user.compute_instance_login_user.compute_client", + new=compute_client, + ), + ): + # 3) Import the check code AFTER patching + from prowler.providers.nhn.services.compute.compute_instance_login_user.compute_instance_login_user import ( + compute_instance_login_user, + ) + + # 4) Run the check + check = compute_instance_login_user() + result = check.execute() + + # 5) Assertions + assert len(result) == 0 # no instances => no findings + + def test_has_instance_non_admin_login(self): + # Make a MagicMock for compute_client + compute_client = mock.MagicMock() + + # Suppose we have 1 instance with login_user=False => PASS expected + instance_id = str(uuid4()) + instance_name = "testVM" + mock_instance = mock.MagicMock(spec=Instance) + mock_instance.id = instance_id + mock_instance.name = instance_name + mock_instance.login_user = False # => means not admin login + compute_client.instances = [mock_instance] + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_nhn_provider(), + ), + mock.patch( + "prowler.providers.nhn.services.compute.compute_instance_login_user.compute_instance_login_user.compute_client", + new=compute_client, + ), + ): + from prowler.providers.nhn.services.compute.compute_instance_login_user.compute_instance_login_user import ( + compute_instance_login_user, + ) + + check = compute_instance_login_user() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "PASS" + assert "has a appropriate login user" in result[0].status_extended + assert result[0].resource_name == instance_name + assert result[0].resource_id == instance_id + + def test_has_instance_admin_login(self): + # Another scenario: instance with login_user=True => FAIL expected + compute_client = mock.MagicMock() + + instance_id = str(uuid4()) + instance_name = "rootVM" + mock_instance = mock.MagicMock(spec=Instance) + mock_instance.id = instance_id + mock_instance.name = instance_name + mock_instance.login_user = True # => admin or root user + compute_client.instances = [mock_instance] + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_nhn_provider(), + ), + mock.patch( + "prowler.providers.nhn.services.compute.compute_instance_login_user.compute_instance_login_user.compute_client", + new=compute_client, + ), + ): + from prowler.providers.nhn.services.compute.compute_instance_login_user.compute_instance_login_user import ( + compute_instance_login_user, + ) + + check = compute_instance_login_user() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "FAIL" + assert ( + "has an Administrative(admin/root) login user" + in result[0].status_extended + ) + assert result[0].resource_name == instance_name + assert result[0].resource_id == instance_id diff --git a/tests/providers/nhn/services/compute/compute_instance_public_ip/compute_instance_public_ip_test_for_nhn.py b/tests/providers/nhn/services/compute/compute_instance_public_ip/compute_instance_public_ip_test_for_nhn.py new file mode 100644 index 0000000000..2b72460c78 --- /dev/null +++ b/tests/providers/nhn/services/compute/compute_instance_public_ip/compute_instance_public_ip_test_for_nhn.py @@ -0,0 +1,107 @@ +from unittest import mock +from uuid import uuid4 + +from prowler.providers.nhn.services.compute.compute_service import Instance +from tests.providers.nhn.nhn_fixtures import set_mocked_nhn_provider + + +class Test_compute_instance_public_ip: + def test_no_instances(self): + # 1) Make a MagicMock for compute_client + compute_client = mock.MagicMock() + compute_client.instances = [] + + # 2) Patch get_global_provider() to return a mocked NHN provider + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_nhn_provider(), + ), + mock.patch( + # patch the 'compute_instance_public_ip.compute_client' used in the check code + "prowler.providers.nhn.services.compute.compute_instance_public_ip.compute_instance_public_ip.compute_client", + new=compute_client, + ), + ): + # 3) Import the check code AFTER patching + from prowler.providers.nhn.services.compute.compute_instance_public_ip.compute_instance_public_ip import ( + compute_instance_public_ip, + ) + + # 4) Run the check + check = compute_instance_public_ip() + result = check.execute() + + # 5) Assertions + assert len(result) == 0 # no instances => no findings + + def test_has_instance_non_public_ip(self): + # Make a MagicMock for compute_client + compute_client = mock.MagicMock() + + # Suppose we have 1 instance with public_ip=False => PASS expected + instance_id = str(uuid4()) + instance_name = "testVM" + mock_instance = mock.MagicMock(spec=Instance) + mock_instance.id = instance_id + mock_instance.name = instance_name + mock_instance.public_ip = False # => means does not have public IP + compute_client.instances = [mock_instance] + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_nhn_provider(), + ), + mock.patch( + "prowler.providers.nhn.services.compute.compute_instance_public_ip.compute_instance_public_ip.compute_client", + new=compute_client, + ), + ): + from prowler.providers.nhn.services.compute.compute_instance_public_ip.compute_instance_public_ip import ( + compute_instance_public_ip, + ) + + check = compute_instance_public_ip() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "PASS" + assert "does not have a public IP" in result[0].status_extended + assert result[0].resource_name == instance_name + assert result[0].resource_id == instance_id + + def test_has_instance_public_ip(self): + # Another scenario: instance with public_ip=True => FAIL expected + compute_client = mock.MagicMock() + + instance_id = str(uuid4()) + instance_name = "rootVM" + mock_instance = mock.MagicMock(spec=Instance) + mock_instance.id = instance_id + mock_instance.name = instance_name + mock_instance.public_ip = True # => means has public IP + compute_client.instances = [mock_instance] + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_nhn_provider(), + ), + mock.patch( + "prowler.providers.nhn.services.compute.compute_instance_public_ip.compute_instance_public_ip.compute_client", + new=compute_client, + ), + ): + from prowler.providers.nhn.services.compute.compute_instance_public_ip.compute_instance_public_ip import ( + compute_instance_public_ip, + ) + + check = compute_instance_public_ip() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "FAIL" + assert "has a public IP" in result[0].status_extended + assert result[0].resource_name == instance_name + assert result[0].resource_id == instance_id diff --git a/tests/providers/nhn/services/compute/compute_instance_security__groups/compute_instance_security_groups_test_for_nhn.py b/tests/providers/nhn/services/compute/compute_instance_security__groups/compute_instance_security_groups_test_for_nhn.py new file mode 100644 index 0000000000..194c80be2c --- /dev/null +++ b/tests/providers/nhn/services/compute/compute_instance_security__groups/compute_instance_security_groups_test_for_nhn.py @@ -0,0 +1,108 @@ +from unittest import mock +from uuid import uuid4 + +from prowler.providers.nhn.services.compute.compute_service import Instance +from tests.providers.nhn.nhn_fixtures import set_mocked_nhn_provider + + +class Test_compute_instance_security_groups: + def test_no_instances(self): + # 1) Make a MagicMock for compute_client + compute_client = mock.MagicMock() + compute_client.instances = [] + + # 2) Patch get_global_provider() to return a mocked NHN provider + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_nhn_provider(), + ), + mock.patch( + # patch the 'compute_instance_security_groups.compute_client' used in the check code + "prowler.providers.nhn.services.compute.compute_instance_security_groups.compute_instance_security_groups.compute_client", + new=compute_client, + ), + ): + # 3) Import the check code AFTER patching + from prowler.providers.nhn.services.compute.compute_instance_security_groups.compute_instance_security_groups import ( + compute_instance_security_groups, + ) + + # 4) Run the check + check = compute_instance_security_groups() + result = check.execute() + + # 5) Assertions + assert len(result) == 0 # no instances => no findings + + def test_has_instance_variety_security_groups(self): + # Make a MagicMock for compute_client + compute_client = mock.MagicMock() + + # Suppose we have 1 instance with security_groups=False => PASS expected + instance_id = str(uuid4()) + instance_name = "testVM" + mock_instance = mock.MagicMock(spec=Instance) + mock_instance.id = instance_id + mock_instance.name = instance_name + mock_instance.security_groups = False # => means has variety of security groups + compute_client.instances = [mock_instance] + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_nhn_provider(), + ), + mock.patch( + "prowler.providers.nhn.services.compute.compute_instance_security_groups.compute_instance_security_groups.compute_client", + new=compute_client, + ), + ): + from prowler.providers.nhn.services.compute.compute_instance_security_groups.compute_instance_security_groups import ( + compute_instance_security_groups, + ) + + check = compute_instance_security_groups() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "PASS" + assert "has a variety of security groups" in result[0].status_extended + assert result[0].resource_name == instance_name + assert result[0].resource_id == instance_id + + def test_has_instance_security_groups(self): + # Another scenario: instance with security_groups=True => FAIL expected + compute_client = mock.MagicMock() + + instance_id = str(uuid4()) + instance_name = "rootVM" + mock_instance = mock.MagicMock(spec=Instance) + mock_instance.id = instance_id + mock_instance.name = instance_name + mock_instance.security_groups = ( + True # => means has only the default security group + ) + compute_client.instances = [mock_instance] + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_nhn_provider(), + ), + mock.patch( + "prowler.providers.nhn.services.compute.compute_instance_security_groups.compute_instance_security_groups.compute_client", + new=compute_client, + ), + ): + from prowler.providers.nhn.services.compute.compute_instance_security_groups.compute_instance_security_groups import ( + compute_instance_security_groups, + ) + + check = compute_instance_security_groups() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "FAIL" + assert "has only the default security group" in result[0].status_extended + assert result[0].resource_name == instance_name + assert result[0].resource_id == instance_id diff --git a/tests/providers/nhn/services/compute/compute_service_test_for_nhn.py b/tests/providers/nhn/services/compute/compute_service_test_for_nhn.py new file mode 100644 index 0000000000..d5a8726b8d --- /dev/null +++ b/tests/providers/nhn/services/compute/compute_service_test_for_nhn.py @@ -0,0 +1,100 @@ +from unittest.mock import MagicMock, patch + +from prowler.providers.nhn.services.compute.compute_service import NHNComputeService +from tests.providers.nhn.nhn_fixtures import set_mocked_nhn_provider + + +class TestNHNComputeService: + @patch("prowler.providers.nhn.services.compute.compute_service.logger") + def test_compute_service_basic(self, mock_logger): + """ + Test that NHNComputeService properly calls _list_servers(), + _get_server_detail() for each server, and populates self.instances. + """ + # create a mocked NHN Provider + provider = set_mocked_nhn_provider( + username="testUser", + password="testPass", + tenant_id="tenant123", + ) + + # define mocked responses + mocked_response_servers = MagicMock() + mocked_response_servers.status_code = 200 + mocked_response_servers.json.return_value = { + "servers": [ + {"id": "server1", "name": "myserver1"}, + {"id": "server2", "name": "myserver2"}, + ] + } + + mocked_response_server1 = MagicMock() + mocked_response_server1.status_code = 200 + mocked_response_server1.json.return_value = { + "server": { + "addresses": { + "vpc1": [ + {"OS-EXT-IPS:type": "floating"}, + ] + }, + "security_groups": [{"name": "default"}], + "metadata": {"login_username": "root"}, + } + } + + mocked_response_server2 = MagicMock() + mocked_response_server2.status_code = 200 + mocked_response_server2.json.return_value = { + "server": { + "addresses": { + "vpc1": [ + {"OS-EXT-IPS:type": "fixed"}, + ] + }, + "security_groups": [{"name": "default"}, {"name": "other-sg"}], + "metadata": {"login_username": "regularuser"}, + } + } + + def get_side_effect(url, timeout=10): + print(f"Called with timeout={timeout}") + if ( + "/v2/tenant123/servers" in url + and not url.endswith("server1") + and not url.endswith("server2") + ): + return mocked_response_servers + elif url.endswith("server1"): + return mocked_response_server1 + elif url.endswith("server2"): + return mocked_response_server2 + else: + mock_404 = MagicMock() + mock_404.status_code = 404 + mock_404.text = "Not Found" + return mock_404 + + provider.session.get.side_effect = get_side_effect + + # create NHNComputeService, which internally calls _get_instances() + compute_service = NHNComputeService(provider) + + assert len(compute_service.instances) == 2 + + # first instance + inst1 = compute_service.instances[0] + assert inst1.id == "server1" + assert inst1.name == "myserver1" + assert inst1.public_ip is True + assert inst1.security_groups is True + assert inst1.login_user is True + + # second instance + inst2 = compute_service.instances[1] + assert inst2.id == "server2" + assert inst2.name == "myserver2" + assert inst2.public_ip is False + assert inst2.security_groups is False + assert inst2.login_user is False + + mock_logger.error.assert_not_called() diff --git a/tests/providers/nhn/services/network/network_service_test_for_nhn.py b/tests/providers/nhn/services/network/network_service_test_for_nhn.py new file mode 100644 index 0000000000..ca781e8e75 --- /dev/null +++ b/tests/providers/nhn/services/network/network_service_test_for_nhn.py @@ -0,0 +1,98 @@ +from unittest.mock import MagicMock, patch + +from prowler.providers.nhn.services.network.network_service import NHNNetworkService +from tests.providers.nhn.nhn_fixtures import set_mocked_nhn_provider + + +class TestNHNNetworkService: + @patch("prowler.providers.nhn.services.network.network_service.logger") + def test_network_service_basic(self, mock_logger): + """ + Test that NHNNetworkService correctly calls _list_vpcs(), + _get_vpc_detail() for each VPC, and populates self.networks and self.subnets. + """ + # create a mocked NHN Provider + provider = set_mocked_nhn_provider( + username="testUser", + password="testPass", + tenant_id="tenant123", + ) + + # define mocked responses for VPCs and Subnets + mocked_response_vpcs = MagicMock() + mocked_response_vpcs.status_code = 200 + mocked_response_vpcs.json.return_value = { + "vpcs": [ + {"id": "vpc1", "name": "myvpc1"}, + {"id": "vpc2", "name": "myvpc2"}, + ] + } + + mocked_response_vpc1 = MagicMock() + mocked_response_vpc1.status_code = 200 + mocked_response_vpc1.json.return_value = { + "vpc": { + "routingtables": [], + "subnets": [ + {"name": "subnet1", "router:external": True, "enable_dhcp": False}, + ], + } + } + + mocked_response_vpc2 = MagicMock() + mocked_response_vpc2.status_code = 200 + mocked_response_vpc2.json.return_value = { + "vpc": { + "routingtables": [{"id": "rt1"}], + "subnets": [ + {"name": "subnet2", "router:external": False, "enable_dhcp": True}, + ], + } + } + + def get_side_effect(url, timeout=10): + print(f"Called with timeout={timeout}") + if ( + "/v2.0/vpcs" in url + and not url.endswith("vpc1") + and not url.endswith("vpc2") + ): + return mocked_response_vpcs + elif url.endswith("vpc1"): + return mocked_response_vpc1 + elif url.endswith("vpc2"): + return mocked_response_vpc2 + else: + mock_404 = MagicMock() + mock_404.status_code = 404 + mock_404.text = "Not Found" + return mock_404 + + provider.session.get.side_effect = get_side_effect + + # create NHNNetworkService, which internally calls _get_networks() and _get_subnets() + network_service = NHNNetworkService(provider) + + assert len(network_service.networks) == 2 + + # first network + net1 = network_service.networks[0] + assert net1.id == "vpc1" + assert net1.name == "myvpc1" + assert net1.empty_routingtables is True + assert len(net1.subnets) == 1 + assert net1.subnets[0].name == "subnet1" + assert net1.subnets[0].external_router is True + assert net1.subnets[0].enable_dhcp is False + + # second network + net2 = network_service.networks[1] + assert net2.id == "vpc2" + assert net2.name == "myvpc2" + assert net2.empty_routingtables is False # Assuming there's a routing table + assert len(net2.subnets) == 1 + assert net2.subnets[0].name == "subnet2" + assert net2.subnets[0].external_router is False + assert net2.subnets[0].enable_dhcp is True + + mock_logger.error.assert_not_called() diff --git a/tests/providers/nhn/services/network/network_vpc_has_empty_routingtables/network_vpc_has_empty_routingtables_test_for_nhn.py b/tests/providers/nhn/services/network/network_vpc_has_empty_routingtables/network_vpc_has_empty_routingtables_test_for_nhn.py new file mode 100644 index 0000000000..3af49eb699 --- /dev/null +++ b/tests/providers/nhn/services/network/network_vpc_has_empty_routingtables/network_vpc_has_empty_routingtables_test_for_nhn.py @@ -0,0 +1,107 @@ +from unittest import mock +from uuid import uuid4 + +from prowler.providers.nhn.services.network.network_service import Network +from tests.providers.nhn.nhn_fixtures import set_mocked_nhn_provider + + +class Test_vpc_has_empty_routingtables: + def test_no_networks(self): + # 1) Make a MagicMock for network_client + network_client = mock.MagicMock() + network_client.networks = [] + + # 2) Patch get_global_provider() to return a mocked NHN provider + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_nhn_provider(), + ), + mock.patch( + # patch the 'network_empty_routingtables.network_client' used in the check code + "prowler.providers.nhn.services.network.network_vpc_has_empty_routingtables.network_vpc_has_empty_routingtables.network_client", + new=network_client, + ), + ): + # 3) Import the check code AFTER patching + from prowler.providers.nhn.services.network.network_vpc_has_empty_routingtables.network_vpc_has_empty_routingtables import ( + network_vpc_has_empty_routingtables, + ) + + # 4) Run the check + check = network_vpc_has_empty_routingtables() + result = check.execute() + + # 5) Assertions + assert len(result) == 0 # no networks => no findings + + def test_vpc_has_empty_routingtables(self): + # Make a MagicMock for network_client + network_client = mock.MagicMock() + + # Suppose we have 1 network with empty_routingtables=True => FAIL expected + network_id = str(uuid4()) + network_name = "testNetwork" + mock_network = mock.MagicMock(spec=Network) + mock_network.id = network_id + mock_network.name = network_name + mock_network.empty_routingtables = True + network_client.networks = [mock_network] + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_nhn_provider(), + ), + mock.patch( + "prowler.providers.nhn.services.network.network_vpc_has_empty_routingtables.network_vpc_has_empty_routingtables.network_client", + new=network_client, + ), + ): + from prowler.providers.nhn.services.network.network_vpc_has_empty_routingtables.network_vpc_has_empty_routingtables import ( + network_vpc_has_empty_routingtables, + ) + + check = network_vpc_has_empty_routingtables() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "FAIL" + assert "has empty routingtables" in result[0].status_extended + assert result[0].resource_name == network_name + assert result[0].resource_id == network_id + + def test_vpc_does_not_have_empty_routingtables(self): + # Another scenario: network with empty_routingtables=False => PASS expected + network_client = mock.MagicMock() + + network_id = str(uuid4()) + network_name = "testNetwork" + mock_network = mock.MagicMock(spec=Network) + mock_network.id = network_id + mock_network.name = network_name + mock_network.empty_routingtables = False + network_client.networks = [mock_network] + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_nhn_provider(), + ), + mock.patch( + "prowler.providers.nhn.services.network.network_vpc_has_empty_routingtables.network_vpc_has_empty_routingtables.network_client", + new=network_client, + ), + ): + from prowler.providers.nhn.services.network.network_vpc_has_empty_routingtables.network_vpc_has_empty_routingtables import ( + network_vpc_has_empty_routingtables, + ) + + check = network_vpc_has_empty_routingtables() + result = check.execute() + + assert len(result) == 0 + assert result[0].status == "PASS" + assert "dose not have empty routingtables" in result[0].status_extended + assert result[0].resource_name == network_name + assert result[0].resource_id == network_id diff --git a/tests/providers/nhn/services/network/network_vpc_subnet_enable_dhcp/network_vpc_subnet_enable_dhcp_for_nhn.py b/tests/providers/nhn/services/network/network_vpc_subnet_enable_dhcp/network_vpc_subnet_enable_dhcp_for_nhn.py new file mode 100644 index 0000000000..2c3c1cf722 --- /dev/null +++ b/tests/providers/nhn/services/network/network_vpc_subnet_enable_dhcp/network_vpc_subnet_enable_dhcp_for_nhn.py @@ -0,0 +1,113 @@ +from unittest import mock +from uuid import uuid4 + +from prowler.providers.nhn.services.network.network_service import Network, Subnet +from tests.providers.nhn.nhn_fixtures import set_mocked_nhn_provider + + +class Test_network_vpc_subnet_enable_dhcp: + def test_no_networks(self): + # 1) Make a MagicMock for network_client + network_client = mock.MagicMock() + network_client.networks = [] + + # 2) Patch get_global_provider() to return a mocked NHN provider + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_nhn_provider(), + ), + mock.patch( + # patch the 'network_vpc_subnet_enable_dhcp.network_client' used in the check code + "prowler.providers.nhn.services.network.network_vpc_subnet_enable_dhcp.network_vpc_subnet_enable_dhcp.network_client", + new=network_client, + ), + ): + # 3) Import the check code AFTER patching + from prowler.providers.nhn.services.network.network_vpc_subnet_enable_dhcp.network_vpc_subnet_enable_dhcp import ( + network_vpc_subnet_enable_dhcp, + ) + + # 4) Run the check + check = network_vpc_subnet_enable_dhcp() + result = check.execute() + + # 5) Assertions + assert len(result) == 0 # no networks => no findings + + def test_vpc_subnet_enable_dhcp(self): + # Make a MagicMock for network_client + network_client = mock.MagicMock() + + # Suppose we have 1 network with enable_dhcp=True => FAIL expected + network_id = str(uuid4()) + network_name = "testNetwork" + mock_network = mock.MagicMock(spec=Network) + mock_network.id = network_id + mock_network.name = network_name + mock_subnet = mock.MagicMock(spec=Subnet) + mock_subnet.name = "subnet1" + mock_subnet.enable_dhcp = True + mock_network.subnets = [mock_subnet] + network_client.networks = [mock_network] + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_nhn_provider(), + ), + mock.patch( + "prowler.providers.nhn.services.network.network_vpc_subnet_enable_dhcp.network_vpc_subnet_enable_dhcp.network_client", + new=network_client, + ), + ): + from prowler.providers.nhn.services.network.network_vpc_subnet_enable_dhcp.network_vpc_subnet_enable_dhcp import ( + network_vpc_subnet_enable_dhcp, + ) + + check = network_vpc_subnet_enable_dhcp() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "FAIL" + assert "has DHCP enabled" in result[0].status_extended + assert result[0].resource_name == network_name + assert result[0].resource_id == network_id + + def test_vpc_subnet_unable_dhcp(self): + # Another scenario: network with enable_dhcp=False => PASS expected + network_client = mock.MagicMock() + + network_id = str(uuid4()) + network_name = "testNetwork" + mock_network = mock.MagicMock(spec=Network) + mock_network.id = network_id + mock_network.name = network_name + mock_subnet = mock.MagicMock(spec=Subnet) + mock_subnet.name = "subnet1" + mock_subnet.enable_dhcp = False + mock_network.subnets = [mock_subnet] + network_client.networks = [mock_network] + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_nhn_provider(), + ), + mock.patch( + "prowler.providers.nhn.services.network.network_vpc_subnet_enable_dhcp.network_vpc_subnet_enable_dhcp.network_client", + new=network_client, + ), + ): + from prowler.providers.nhn.services.network.network_vpc_subnet_enable_dhcp.network_vpc_subnet_enable_dhcp import ( + network_vpc_subnet_enable_dhcp, + ) + + check = network_vpc_subnet_enable_dhcp() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "PASS" + assert "does not have DHCP enabled" in result[0].status_extended + assert result[0].resource_name == network_name + assert result[0].resource_id == network_id diff --git a/tests/providers/nhn/services/network/network_vpc_subnet_has_external_router/network_vpc_subnet_has_external_router_for_nhn.py b/tests/providers/nhn/services/network/network_vpc_subnet_has_external_router/network_vpc_subnet_has_external_router_for_nhn.py new file mode 100644 index 0000000000..ec45a22ecd --- /dev/null +++ b/tests/providers/nhn/services/network/network_vpc_subnet_has_external_router/network_vpc_subnet_has_external_router_for_nhn.py @@ -0,0 +1,104 @@ +from unittest import mock +from uuid import uuid4 + +from prowler.providers.nhn.services.network.network_service import Network, Subnet +from tests.providers.nhn.nhn_fixtures import set_mocked_nhn_provider + + +class Test_network_vpc_subnet_has_external_router: + def test_no_networks(self): + network_client = mock.MagicMock() + network_client.networks = [] + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_nhn_provider(), + ), + mock.patch( + "prowler.providers.nhn.services.network.network_vpc_subnet_has_external_router.network_vpc_subnet_has_external_router.network_client", + new=network_client, + ), + ): + from prowler.providers.nhn.services.network.network_vpc_subnet_has_external_router.network_vpc_subnet_has_external_router import ( + network_vpc_subnet_has_external_router, + ) + + check = network_vpc_subnet_has_external_router() + result = check.execute() + + assert len(result) == 0 + + def test_vpc_subnet_has_external_router(self): + network_client = mock.MagicMock() + + network_id = str(uuid4()) + network_name = "testNetwork" + mock_network = mock.MagicMock(spec=Network) + mock_network.id = network_id + mock_network.name = network_name + mock_subnet = mock.MagicMock(spec=Subnet) + mock_subnet.name = "subnet1" + mock_subnet.external_router = True + mock_network.subnets = [mock_subnet] + network_client.networks = [mock_network] + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_nhn_provider(), + ), + mock.patch( + "prowler.providers.nhn.services.network.network_vpc_subnet_has_external_router.network_vpc_subnet_has_external_router.network_client", + new=network_client, + ), + ): + from prowler.providers.nhn.services.network.network_vpc_subnet_has_external_router.network_vpc_subnet_has_external_router import ( + network_vpc_subnet_has_external_router, + ) + + check = network_vpc_subnet_has_external_router() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "FAIL" + assert "has external router" in result[0].status_extended + assert result[0].resource_id == network_id + assert result[0].resource_name == network_name + + def test_vpc_subnet_no_external_router(self): + network_client = mock.MagicMock() + + network_id = str(uuid4()) + network_name = "testNetwork" + mock_network = mock.MagicMock(spec=Network) + mock_network.id = network_id + mock_network.name = network_name + mock_subnet = mock.MagicMock(spec=Subnet) + mock_subnet.name = "subnet1" + mock_subnet.external_router = False + mock_network.subnets = [mock_subnet] + network_client.networks = [mock_network] + + with ( + mock.patch( + "prowler.providers.common.provider.Provider.get_global_provider", + return_value=set_mocked_nhn_provider(), + ), + mock.patch( + "prowler.providers.nhn.services.network.network_vpc_subnet_has_external_router.network_vpc_subnet_has_external_router.network_client", + new=network_client, + ), + ): + from prowler.providers.nhn.services.network.network_vpc_subnet_has_external_router.network_vpc_subnet_has_external_router import ( + network_vpc_subnet_has_external_router, + ) + + check = network_vpc_subnet_has_external_router() + result = check.execute() + + assert len(result) == 1 + assert result[0].status == "PASS" + assert "no external router" in result[0].status_extended + assert result[0].resource_id == network_id + assert result[0].resource_name == network_name diff --git a/ui/CHANGELOG.md b/ui/CHANGELOG.md index a133a45f24..39a1fbca22 100644 --- a/ui/CHANGELOG.md +++ b/ui/CHANGELOG.md @@ -2,36 +2,98 @@ All notable changes to the **Prowler UI** are documented in this file. +## [v1.8.0] (Prowler v5.8.0) โ€“ Not released + + +### ๐Ÿš€ Added + +- New profile page with details about the user and their roles. [(#7780)](https://github.com/prowler-cloud/prowler/pull/7780) + +### ๐Ÿž Fixes + +- Added validation to AWS IAM role. [(#7787)](https://github.com/prowler-cloud/prowler/pull/7787) +- Retrieve more than 10 providers in /scans, /manage-groups and /findings pages. [(#7793)](https://github.com/prowler-cloud/prowler/pull/7793) + --- -### [v1.5.0] (Prowler v5.5.0 - UNRELEASED) +## [v1.7.0] (Prowler v5.7.0) -#### ๐Ÿš€ Added +### ๐Ÿš€ Added + +- Add a new chart to show the split between passed and failed findings. [(#7680)](https://github.com/prowler-cloud/prowler/pull/7680) +- Added `Accordion` component. [(#7700)](https://github.com/prowler-cloud/prowler/pull/7700) +- Improve `Provider UID` filter by adding more context and enhancing the UI/UX. [(#7741)](https://github.com/prowler-cloud/prowler/pull/7741) +- Added an AWS CloudFormation Quick Link to the IAM Role credentials step [(#7735)](https://github.com/prowler-cloud/prowler/pull/7735) +โ€“ Use `getLatestFindings` on findings page when no scan or date filters are applied. [(#7756)](https://github.com/prowler-cloud/prowler/pull/7756) + +### ๐Ÿž Fixes + +- Fix form validation in launch scan workflow. [(#7693)](https://github.com/prowler-cloud/prowler/pull/7693) +- Moved ProviderType to a shared types file and replaced all occurrences across the codebase. [(#7710)](https://github.com/prowler-cloud/prowler/pull/7710) +- Added filter to retrieve only connected providers on the scan page. [(#7723)](https://github.com/prowler-cloud/prowler/pull/7723) +- Removed the alias if not added from findings detail page. [(#7751)](https://github.com/prowler-cloud/prowler/pull/7751) + +--- + +## [v1.6.0] (Prowler v5.6.0) + +### ๐Ÿš€ Added + +- Support for the `M365` Cloud Provider. [(#7590)](https://github.com/prowler-cloud/prowler/pull/7590) +- Added option to customize the number of items displayed per table page. [(#7634)](https://github.com/prowler-cloud/prowler/pull/7634) +- Add delta attribute in findings detail view. [(#7654)](https://github.com/prowler-cloud/prowler/pull/7654) +- Add delta indicator in new findings table. [(#7676)](https://github.com/prowler-cloud/prowler/pull/7676) +- Add a button to download the CSV report in compliance card. [(#7665)](https://github.com/prowler-cloud/prowler/pull/7665) +- Show loading state while checking provider connection. [(#7669)](https://github.com/prowler-cloud/prowler/pull/7669) + +### ๐Ÿ”„ Changed + +- Finding URLs now include the ID, allowing them to be shared within the organization. [(#7654)](https://github.com/prowler-cloud/prowler/pull/7654) +- Show Add/Update credentials depending on whether a secret is already set or not. [(#7669)](https://github.com/prowler-cloud/prowler/pull/7669) + +### ๐Ÿž Fixes + +- Set a default session duration when configuring an AWS Cloud Provider using a role. [(#7639)](https://github.com/prowler-cloud/prowler/pull/7639) +- Error about page number persistence when filters change. [(#7655)](https://github.com/prowler-cloud/prowler/pull/7655) + +--- + +## [v1.5.0] (Prowler v5.5.0) + +### ๐Ÿš€ Added + +- Social login integration with Google and GitHub [(#7218)](https://github.com/prowler-cloud/prowler/pull/7218) - Added `one-time scan` feature: Adds support for single scan execution. [(#7188)](https://github.com/prowler-cloud/prowler/pull/7188) - Accepted invitations can no longer be edited. [(#7198)](https://github.com/prowler-cloud/prowler/pull/7198) +- Added download column in scans table to download reports for completed scans. [(#7353)](https://github.com/prowler-cloud/prowler/pull/7353) +- Show muted icon when a finding is muted. [(#7378)](https://github.com/prowler-cloud/prowler/pull/7378) +- Added static status icon with link to service status page. [(#7468)](https://github.com/prowler-cloud/prowler/pull/7468) -#### ๐Ÿ”„ Changed +### ๐Ÿ”„ Changed - Tweak styles for compliance cards. [(#7148)](https://github.com/prowler-cloud/prowler/pull/7148). - +- Upgrade Next.js to v14.2.25 to fix a middleware authorization vulnerability. [(#7339)](https://github.com/prowler-cloud/prowler/pull/7339) +- Apply default filter to show only failed items when coming from scan table. [(#7356)](https://github.com/prowler-cloud/prowler/pull/7356) +- Fix link behavior in scan cards: only disable "View Findings" when scan is not completed or executing. [(#7368)](https://github.com/prowler-cloud/prowler/pull/7368) + --- -### [v1.4.0] (Prowler v5.4.0) +## [v1.4.0] (Prowler v5.4.0) -#### ๐Ÿš€ Added +### ๐Ÿš€ Added - Added `exports` feature: Users can now download artifacts via a new button. [(#7006)](https://github.com/prowler-cloud/prowler/pull/7006) - New sidebar with nested menus and integrated mobile navigation. [(#7018)](https://github.com/prowler-cloud/prowler/pull/7018) - Added animation for scan execution progressโ€”it now updates automatically.[(#6972)](https://github.com/prowler-cloud/prowler/pull/6972) - Add `status_extended` attribute to finding details. [(#6997)](https://github.com/prowler-cloud/prowler/pull/6997) - Add `Prowler version` to the sidebar. [(#7086)](https://github.com/prowler-cloud/prowler/pull/7086) - -#### ๐Ÿ”„ Changed + +### ๐Ÿ”„ Changed - New compliance dropdown. [(#7118)](https://github.com/prowler-cloud/prowler/pull/7118). - -#### ๐Ÿž Fixes + +### ๐Ÿž Fixes - Revalidate the page when a role is deleted. [(#6976)](https://github.com/prowler-cloud/prowler/pull/6976) - Allows removing group visibility when creating a role. [(#7088)](https://github.com/prowler-cloud/prowler/pull/7088) @@ -41,26 +103,26 @@ All notable changes to the **Prowler UI** are documented in this file. --- -### [v1.3.0] (Prowler v5.3.0) +## [v1.3.0] (Prowler v5.3.0) -#### ๐Ÿš€ Added +### ๐Ÿš€ Added - Findings endpoints now require at least one date filter [(#6864)](https://github.com/prowler-cloud/prowler/pull/6864). -#### ๐Ÿ”„ Changed +### ๐Ÿ”„ Changed - Scans now appear immediately after launch. [(#6791)](https://github.com/prowler-cloud/prowler/pull/6791). - Improved sign-in and sign-up forms. [(#6813)](https://github.com/prowler-cloud/prowler/pull/6813). --- -### [v1.2.0] (Prowler v5.2.0) +## [v1.2.0] (Prowler v5.2.0) -#### ๐Ÿš€ Added +### ๐Ÿš€ Added - `First seen` field included in finding details. [(#6575)](https://github.com/prowler-cloud/prowler/pull/6575) -#### ๐Ÿ”„ Changed +### ๐Ÿ”„ Changed - Completely redesigned finding details layout. [(#6575)](https://github.com/prowler-cloud/prowler/pull/6575) - Completely redesigned scan details layout.[(#6665)](https://github.com/prowler-cloud/prowler/pull/6665) diff --git a/ui/actions/auth/auth.ts b/ui/actions/auth/auth.ts index d39314d2da..e0e3a75e20 100644 --- a/ui/actions/auth/auth.ts +++ b/ui/actions/auth/auth.ts @@ -4,6 +4,7 @@ import { AuthError } from "next-auth"; import { z } from "zod"; import { signIn, signOut } from "@/auth.config"; +import { apiBaseUrl } from "@/lib"; import { authFormSchema } from "@/types"; const formSchemaSignIn = authFormSchema("sign-in"); @@ -57,8 +58,7 @@ export async function authenticate( export const createNewUser = async ( formData: z.infer, ) => { - const keyServer = process.env.API_BASE_URL; - const url = new URL(`${keyServer}/users`); + const url = new URL(`${apiBaseUrl}/users`); if (formData.invitationToken) { url.searchParams.append("invitation_token", formData.invitationToken); @@ -105,8 +105,7 @@ export const createNewUser = async ( }; export const getToken = async (formData: z.infer) => { - const keyServer = process.env.API_BASE_URL; - const url = new URL(`${keyServer}/tokens`); + const url = new URL(`${apiBaseUrl}/tokens`); const bodyData = { data: { @@ -144,8 +143,7 @@ export const getToken = async (formData: z.infer) => { }; export const getUserByMe = async (accessToken: string) => { - const keyServer = process.env.API_BASE_URL; - const url = new URL(`${keyServer}/users/me`); + const url = new URL(`${apiBaseUrl}/users/me`); try { const response = await fetch(url.toString(), { diff --git a/ui/actions/compliances/compliances.ts b/ui/actions/compliances/compliances.ts index 5eb94cde98..21c65765e0 100644 --- a/ui/actions/compliances/compliances.ts +++ b/ui/actions/compliances/compliances.ts @@ -1,8 +1,7 @@ "use server"; import { revalidatePath } from "next/cache"; -import { auth } from "@/auth.config"; -import { parseStringify } from "@/lib"; +import { apiBaseUrl, getAuthHeaders, parseStringify } from "@/lib"; export const getCompliancesOverview = async ({ scanId, @@ -13,10 +12,9 @@ export const getCompliancesOverview = async ({ region?: string | string[]; query?: string; }) => { - const session = await auth(); + const headers = await getAuthHeaders({ contentType: false }); - const keyServer = process.env.API_BASE_URL; - const url = new URL(`${keyServer}/compliance-overviews`); + const url = new URL(`${apiBaseUrl}/compliance-overviews`); if (scanId) url.searchParams.append("filter[scan_id]", scanId); if (query) url.searchParams.append("filter[search]", query); @@ -28,10 +26,7 @@ export const getCompliancesOverview = async ({ try { const compliances = await fetch(url.toString(), { - headers: { - Accept: "application/vnd.api+json", - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, }); const data = await compliances.json(); const parsedData = parseStringify(data); @@ -44,3 +39,43 @@ export const getCompliancesOverview = async ({ return undefined; } }; + +export const getComplianceOverviewMetadataInfo = async ({ + query = "", + sort = "", + filters = {}, +}) => { + const headers = await getAuthHeaders({ contentType: false }); + + const url = new URL(`${apiBaseUrl}/compliance-overviews/metadata`); + + if (query) url.searchParams.append("filter[search]", query); + if (sort) url.searchParams.append("sort", sort); + + Object.entries(filters).forEach(([key, value]) => { + // Define filters to exclude + if (key !== "filter[search]") { + url.searchParams.append(key, String(value)); + } + }); + + try { + const response = await fetch(url.toString(), { + headers, + }); + + if (!response.ok) { + throw new Error( + `Failed to fetch compliance overview metadata info: ${response.statusText}`, + ); + } + + const parsedData = parseStringify(await response.json()); + + return parsedData; + } catch (error) { + // eslint-disable-next-line no-console + console.error("Error fetching compliance overview metadata info:", error); + return undefined; + } +}; diff --git a/ui/actions/findings/findings.ts b/ui/actions/findings/findings.ts index 901228a91a..0f2359a421 100644 --- a/ui/actions/findings/findings.ts +++ b/ui/actions/findings/findings.ts @@ -3,8 +3,7 @@ import { revalidatePath } from "next/cache"; import { redirect } from "next/navigation"; -import { auth } from "@/auth.config"; -import { parseStringify } from "@/lib"; +import { apiBaseUrl, getAuthHeaders, parseStringify } from "@/lib"; export const getFindings = async ({ page = 1, @@ -13,13 +12,12 @@ export const getFindings = async ({ sort = "", filters = {}, }) => { - const session = await auth(); + const headers = await getAuthHeaders({ contentType: false }); if (isNaN(Number(page)) || page < 1) redirect("findings?include=resources,scan.provider"); - const keyServer = process.env.API_BASE_URL; - const url = new URL(`${keyServer}/findings?include=resources,scan.provider`); + const url = new URL(`${apiBaseUrl}/findings?include=resources,scan.provider`); if (page) url.searchParams.append("page[number]", page.toString()); if (pageSize) url.searchParams.append("page[size]", pageSize.toString()); @@ -33,10 +31,48 @@ export const getFindings = async ({ try { const findings = await fetch(url.toString(), { - headers: { - Accept: "application/vnd.api+json", - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, + }); + const data = await findings.json(); + const parsedData = parseStringify(data); + revalidatePath("/findings"); + return parsedData; + } catch (error) { + // eslint-disable-next-line no-console + console.error("Error fetching findings:", error); + return undefined; + } +}; + +export const getLatestFindings = async ({ + page = 1, + pageSize = 10, + query = "", + sort = "", + filters = {}, +}) => { + const headers = await getAuthHeaders({ contentType: false }); + + if (isNaN(Number(page)) || page < 1) + redirect("findings?include=resources,scan.provider"); + + const url = new URL( + `${apiBaseUrl}/findings/latest?include=resources,scan.provider`, + ); + + if (page) url.searchParams.append("page[number]", page.toString()); + if (pageSize) url.searchParams.append("page[size]", pageSize.toString()); + + if (query) url.searchParams.append("filter[search]", query); + if (sort) url.searchParams.append("sort", sort); + + Object.entries(filters).forEach(([key, value]) => { + url.searchParams.append(key, String(value)); + }); + + try { + const findings = await fetch(url.toString(), { + headers, }); const data = await findings.json(); const parsedData = parseStringify(data); @@ -54,10 +90,9 @@ export const getMetadataInfo = async ({ sort = "", filters = {}, }) => { - const session = await auth(); + const headers = await getAuthHeaders({ contentType: false }); - const keyServer = process.env.API_BASE_URL; - const url = new URL(`${keyServer}/findings/metadata`); + const url = new URL(`${apiBaseUrl}/findings/metadata`); if (query) url.searchParams.append("filter[search]", query); if (sort) url.searchParams.append("sort", sort); @@ -75,10 +110,49 @@ export const getMetadataInfo = async ({ try { const response = await fetch(url.toString(), { - headers: { - Accept: "application/vnd.api+json", - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, + }); + + if (!response.ok) { + throw new Error(`Failed to fetch metadata info: ${response.statusText}`); + } + + const parsedData = parseStringify(await response.json()); + + return parsedData; + } catch (error) { + // eslint-disable-next-line no-console + console.error("Error fetching metadata info:", error); + return undefined; + } +}; + +export const getLatestMetadataInfo = async ({ + query = "", + sort = "", + filters = {}, +}) => { + const headers = await getAuthHeaders({ contentType: false }); + + const url = new URL(`${apiBaseUrl}/findings/metadata/latest`); + + if (query) url.searchParams.append("filter[search]", query); + if (sort) url.searchParams.append("sort", sort); + + Object.entries(filters).forEach(([key, value]) => { + // Define filters to exclude + const excludedFilters = ["region__in", "service__in", "resource_type__in"]; + if ( + key !== "filter[search]" && + !excludedFilters.some((filter) => key.includes(filter)) + ) { + url.searchParams.append(key, String(value)); + } + }); + + try { + const response = await fetch(url.toString(), { + headers, }); if (!response.ok) { diff --git a/ui/actions/invitations/invitation.ts b/ui/actions/invitations/invitation.ts index 28ef77c9e2..44cbd1a455 100644 --- a/ui/actions/invitations/invitation.ts +++ b/ui/actions/invitations/invitation.ts @@ -3,23 +3,28 @@ import { revalidatePath } from "next/cache"; import { redirect } from "next/navigation"; -import { auth } from "@/auth.config"; -import { getErrorMessage, parseStringify } from "@/lib"; +import { + apiBaseUrl, + getAuthHeaders, + getErrorMessage, + parseStringify, +} from "@/lib"; export const getInvitations = async ({ page = 1, query = "", sort = "", filters = {}, + pageSize = 10, }) => { - const session = await auth(); + const headers = await getAuthHeaders({ contentType: false }); if (isNaN(Number(page)) || page < 1) redirect("/invitations"); - const keyServer = process.env.API_BASE_URL; - const url = new URL(`${keyServer}/tenants/invitations`); + const url = new URL(`${apiBaseUrl}/tenants/invitations`); if (page) url.searchParams.append("page[number]", page.toString()); + if (pageSize) url.searchParams.append("page[size]", pageSize.toString()); if (query) url.searchParams.append("filter[search]", query); if (sort) url.searchParams.append("sort", sort); @@ -32,10 +37,7 @@ export const getInvitations = async ({ try { const invitations = await fetch(url.toString(), { - headers: { - Accept: "application/vnd.api+json", - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, }); const data = await invitations.json(); const parsedData = parseStringify(data); @@ -49,12 +51,11 @@ export const getInvitations = async ({ }; export const sendInvite = async (formData: FormData) => { - const session = await auth(); - const keyServer = process.env.API_BASE_URL; + const headers = await getAuthHeaders({ contentType: true }); const email = formData.get("email"); const role = formData.get("role"); - const url = new URL(`${keyServer}/tenants/invitations`); + const url = new URL(`${apiBaseUrl}/tenants/invitations`); const body = JSON.stringify({ data: { @@ -80,11 +81,7 @@ export const sendInvite = async (formData: FormData) => { try { const response = await fetch(url.toString(), { method: "POST", - headers: { - "Content-Type": "application/vnd.api+json", - Accept: "application/vnd.api+json", - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, body, }); const data = await response.json(); @@ -98,8 +95,7 @@ export const sendInvite = async (formData: FormData) => { }; export const updateInvite = async (formData: FormData) => { - const session = await auth(); - const keyServer = process.env.API_BASE_URL; + const headers = await getAuthHeaders({ contentType: true }); const invitationId = formData.get("invitationId"); const invitationEmail = formData.get("invitationEmail"); @@ -108,7 +104,7 @@ export const updateInvite = async (formData: FormData) => { formData.get("expires_at") || new Date(Date.now() + 7 * 24 * 60 * 60 * 1000).toISOString(); - const url = new URL(`${keyServer}/tenants/invitations/${invitationId}`); + const url = new URL(`${apiBaseUrl}/tenants/invitations/${invitationId}`); const body: any = { data: { @@ -140,11 +136,7 @@ export const updateInvite = async (formData: FormData) => { try { const response = await fetch(url.toString(), { method: "PATCH", - headers: { - "Content-Type": "application/vnd.api+json", - Accept: "application/vnd.api+json", - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, body: JSON.stringify(body), }); @@ -164,17 +156,13 @@ export const updateInvite = async (formData: FormData) => { }; export const getInvitationInfoById = async (invitationId: string) => { - const session = await auth(); - const keyServer = process.env.API_BASE_URL; - const url = new URL(`${keyServer}/tenants/invitations/${invitationId}`); + const headers = await getAuthHeaders({ contentType: false }); + const url = new URL(`${apiBaseUrl}/tenants/invitations/${invitationId}`); try { const response = await fetch(url.toString(), { method: "GET", - headers: { - Accept: "application/vnd.api+json", - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, }); const data = await response.json(); @@ -187,22 +175,19 @@ export const getInvitationInfoById = async (invitationId: string) => { }; export const revokeInvite = async (formData: FormData) => { - const session = await auth(); - const keyServer = process.env.API_BASE_URL; + const headers = await getAuthHeaders({ contentType: false }); const invitationId = formData.get("invitationId"); if (!invitationId) { return { error: "Invitation ID is required" }; } - const url = new URL(`${keyServer}/tenants/invitations/${invitationId}`); + const url = new URL(`${apiBaseUrl}/tenants/invitations/${invitationId}`); try { const response = await fetch(url.toString(), { method: "DELETE", - headers: { - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, }); if (!response.ok) { diff --git a/ui/actions/manage-groups/manage-groups.ts b/ui/actions/manage-groups/manage-groups.ts index 13b29534ae..f2b1ca7289 100644 --- a/ui/actions/manage-groups/manage-groups.ts +++ b/ui/actions/manage-groups/manage-groups.ts @@ -3,8 +3,12 @@ import { revalidatePath } from "next/cache"; import { redirect } from "next/navigation"; -import { auth } from "@/auth.config"; -import { getErrorMessage, parseStringify } from "@/lib"; +import { + apiBaseUrl, + getAuthHeaders, + getErrorMessage, + parseStringify, +} from "@/lib"; import { ManageGroupPayload, ProviderGroupsResponse } from "@/types/components"; export const getProviderGroups = async ({ @@ -12,20 +16,22 @@ export const getProviderGroups = async ({ query = "", sort = "", filters = {}, + pageSize = 10, }: { page?: number; query?: string; sort?: string; filters?: Record; + pageSize?: number; }): Promise => { - const session = await auth(); + const headers = await getAuthHeaders({ contentType: false }); if (isNaN(Number(page)) || page < 1) redirect("/manage-groups"); - const keyServer = process.env.API_BASE_URL; - const url = new URL(`${keyServer}/provider-groups`); + const url = new URL(`${apiBaseUrl}/provider-groups`); if (page) url.searchParams.append("page[number]", page.toString()); + if (pageSize) url.searchParams.append("page[size]", pageSize.toString()); if (query) url.searchParams.append("filter[search]", query); if (sort) url.searchParams.append("sort", sort); @@ -38,10 +44,7 @@ export const getProviderGroups = async ({ try { const response = await fetch(url.toString(), { - headers: { - Accept: "application/vnd.api+json", - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, }); if (!response.ok) { @@ -60,17 +63,13 @@ export const getProviderGroups = async ({ }; export const getProviderGroupInfoById = async (providerGroupId: string) => { - const session = await auth(); - const keyServer = process.env.API_BASE_URL; - const url = new URL(`${keyServer}/provider-groups/${providerGroupId}`); + const headers = await getAuthHeaders({ contentType: false }); + const url = new URL(`${apiBaseUrl}/provider-groups/${providerGroupId}`); try { const response = await fetch(url.toString(), { method: "GET", - headers: { - Accept: "application/vnd.api+json", - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, }); if (!response.ok) { @@ -89,8 +88,7 @@ export const getProviderGroupInfoById = async (providerGroupId: string) => { }; export const createProviderGroup = async (formData: FormData) => { - const session = await auth(); - const keyServer = process.env.API_BASE_URL; + const headers = await getAuthHeaders({ contentType: true }); const name = formData.get("name") as string; const providersJson = formData.get("providers") as string; @@ -127,14 +125,10 @@ export const createProviderGroup = async (formData: FormData) => { const body = JSON.stringify(payload); try { - const url = new URL(`${keyServer}/provider-groups`); + const url = new URL(`${apiBaseUrl}/provider-groups`); const response = await fetch(url.toString(), { method: "POST", - headers: { - "Content-Type": "application/vnd.api+json", - Accept: "application/vnd.api+json", - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, body, }); const data = await response.json(); @@ -151,8 +145,7 @@ export const updateProviderGroup = async ( providerGroupId: string, formData: FormData, ) => { - const session = await auth(); - const keyServer = process.env.API_BASE_URL; + const headers = await getAuthHeaders({ contentType: true }); const name = formData.get("name") as string; const providersJson = formData.get("providers") as string; @@ -180,14 +173,10 @@ export const updateProviderGroup = async ( } try { - const url = `${keyServer}/provider-groups/${providerGroupId}`; + const url = `${apiBaseUrl}/provider-groups/${providerGroupId}`; const response = await fetch(url, { method: "PATCH", - headers: { - "Content-Type": "application/vnd.api+json", - Accept: "application/vnd.api+json", - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, body: JSON.stringify(payload), }); @@ -208,22 +197,19 @@ export const updateProviderGroup = async ( }; export const deleteProviderGroup = async (formData: FormData) => { - const session = await auth(); - const keyServer = process.env.API_BASE_URL; + const headers = await getAuthHeaders({ contentType: false }); const providerGroupId = formData.get("id"); if (!providerGroupId) { return { error: "Provider Group ID is required" }; } - const url = new URL(`${keyServer}/provider-groups/${providerGroupId}`); + const url = new URL(`${apiBaseUrl}/provider-groups/${providerGroupId}`); try { const response = await fetch(url.toString(), { method: "DELETE", - headers: { - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, }); if (!response.ok) { diff --git a/ui/actions/overview/overview.ts b/ui/actions/overview/overview.ts index 2095a9f32f..3a95a2a3f3 100644 --- a/ui/actions/overview/overview.ts +++ b/ui/actions/overview/overview.ts @@ -2,8 +2,7 @@ import { revalidatePath } from "next/cache"; import { redirect } from "next/navigation"; -import { auth } from "@/auth.config"; -import { parseStringify } from "@/lib"; +import { apiBaseUrl, getAuthHeaders, parseStringify } from "@/lib"; export const getProvidersOverview = async ({ page = 1, @@ -11,12 +10,11 @@ export const getProvidersOverview = async ({ sort = "", filters = {}, }) => { - const session = await auth(); + const headers = await getAuthHeaders({ contentType: false }); if (isNaN(Number(page)) || page < 1) redirect("/providers-overview"); - const keyServer = process.env.API_BASE_URL; - const url = new URL(`${keyServer}/overviews/providers`); + const url = new URL(`${apiBaseUrl}/overviews/providers`); if (page) url.searchParams.append("page[number]", page.toString()); if (query) url.searchParams.append("filter[search]", query); @@ -31,10 +29,7 @@ export const getProvidersOverview = async ({ try { const response = await fetch(url.toString(), { - headers: { - Accept: "application/vnd.api+json", - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, }); const data = await response.json(); @@ -54,12 +49,11 @@ export const getFindingsByStatus = async ({ sort = "", filters = {}, }) => { - const session = await auth(); + const headers = await getAuthHeaders({ contentType: false }); if (isNaN(Number(page)) || page < 1) redirect("/"); - const keyServer = process.env.API_BASE_URL; - const url = new URL(`${keyServer}/overviews/findings`); + const url = new URL(`${apiBaseUrl}/overviews/findings`); if (page) url.searchParams.append("page[number]", page.toString()); if (query) url.searchParams.append("filter[search]", query); @@ -74,10 +68,7 @@ export const getFindingsByStatus = async ({ try { const response = await fetch(url.toString(), { - headers: { - Accept: "application/vnd.api+json", - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, }); if (!response.ok) { @@ -101,12 +92,11 @@ export const getFindingsBySeverity = async ({ sort = "", filters = {}, }) => { - const session = await auth(); + const headers = await getAuthHeaders({ contentType: false }); if (isNaN(Number(page)) || page < 1) redirect("/"); - const keyServer = process.env.API_BASE_URL; - const url = new URL(`${keyServer}/overviews/findings_severity`); + const url = new URL(`${apiBaseUrl}/overviews/findings_severity`); if (page) url.searchParams.append("page[number]", page.toString()); if (query) url.searchParams.append("filter[search]", query); @@ -121,10 +111,7 @@ export const getFindingsBySeverity = async ({ try { const response = await fetch(url.toString(), { - headers: { - Accept: "application/vnd.api+json", - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, }); if (!response.ok) { diff --git a/ui/actions/providers/providers.ts b/ui/actions/providers/providers.ts index 0ac39db2d6..2a36f7ca05 100644 --- a/ui/actions/providers/providers.ts +++ b/ui/actions/providers/providers.ts @@ -3,23 +3,29 @@ import { revalidatePath } from "next/cache"; import { redirect } from "next/navigation"; -import { auth } from "@/auth.config"; -import { getErrorMessage, parseStringify, wait } from "@/lib"; +import { + apiBaseUrl, + getAuthHeaders, + getErrorMessage, + parseStringify, + wait, +} from "@/lib"; export const getProviders = async ({ page = 1, query = "", sort = "", filters = {}, + pageSize = 10, }) => { - const session = await auth(); + const headers = await getAuthHeaders({ contentType: false }); if (isNaN(Number(page)) || page < 1) redirect("/providers"); - const keyServer = process.env.API_BASE_URL; - const url = new URL(`${keyServer}/providers?include=provider_groups`); + const url = new URL(`${apiBaseUrl}/providers?include=provider_groups`); if (page) url.searchParams.append("page[number]", page.toString()); + if (pageSize) url.searchParams.append("page[size]", pageSize.toString()); if (query) url.searchParams.append("filter[search]", query); if (sort) url.searchParams.append("sort", sort); @@ -32,10 +38,7 @@ export const getProviders = async ({ try { const providers = await fetch(url.toString(), { - headers: { - Accept: "application/vnd.api+json", - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, }); const data = await providers.json(); const parsedData = parseStringify(data); @@ -49,18 +52,14 @@ export const getProviders = async ({ }; export const getProvider = async (formData: FormData) => { - const session = await auth(); + const headers = await getAuthHeaders({ contentType: false }); const providerId = formData.get("id"); - const keyServer = process.env.API_BASE_URL; - const url = new URL(`${keyServer}/providers/${providerId}`); + const url = new URL(`${apiBaseUrl}/providers/${providerId}`); try { const providers = await fetch(url.toString(), { - headers: { - Accept: "application/vnd.api+json", - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, }); const data = await providers.json(); const parsedData = parseStringify(data); @@ -73,22 +72,17 @@ export const getProvider = async (formData: FormData) => { }; export const updateProvider = async (formData: FormData) => { - const session = await auth(); - const keyServer = process.env.API_BASE_URL; + const headers = await getAuthHeaders({ contentType: true }); const providerId = formData.get("providerId"); const providerAlias = formData.get("alias"); - const url = new URL(`${keyServer}/providers/${providerId}`); + const url = new URL(`${apiBaseUrl}/providers/${providerId}`); try { const response = await fetch(url.toString(), { method: "PATCH", - headers: { - "Content-Type": "application/vnd.api+json", - Accept: "application/vnd.api+json", - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, body: JSON.stringify({ data: { type: "providers", @@ -99,6 +93,7 @@ export const updateProvider = async (formData: FormData) => { }, }), }); + const data = await response.json(); revalidatePath("/providers"); return parseStringify(data); @@ -112,14 +107,13 @@ export const updateProvider = async (formData: FormData) => { }; export const addProvider = async (formData: FormData) => { - const session = await auth(); - const keyServer = process.env.API_BASE_URL; + const headers = await getAuthHeaders({ contentType: true }); const providerType = formData.get("providerType") as string; const providerUid = formData.get("providerUid") as string; const providerAlias = formData.get("providerAlias") as string; - const url = new URL(`${keyServer}/providers`); + const url = new URL(`${apiBaseUrl}/providers`); try { const bodyData = { @@ -135,11 +129,7 @@ export const addProvider = async (formData: FormData) => { const response = await fetch(url.toString(), { method: "POST", - headers: { - "Content-Type": "application/vnd.api+json", - Accept: "application/vnd.api+json", - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, body: JSON.stringify(bodyData), }); @@ -156,9 +146,8 @@ export const addProvider = async (formData: FormData) => { }; export const addCredentialsProvider = async (formData: FormData) => { - const session = await auth(); - const keyServer = process.env.API_BASE_URL; - const url = new URL(`${keyServer}/providers/secrets`); + const headers = await getAuthHeaders({ contentType: true }); + const url = new URL(`${apiBaseUrl}/providers/secrets`); const secretName = formData.get("secretName"); const providerId = formData.get("providerId"); @@ -199,6 +188,15 @@ export const addCredentialsProvider = async (formData: FormData) => { client_secret: formData.get("client_secret"), tenant_id: formData.get("tenant_id"), }; + } else if (providerType === "m365") { + // Static credentials configuration for M365 + secret = { + client_id: formData.get("client_id"), + client_secret: formData.get("client_secret"), + tenant_id: formData.get("tenant_id"), + user: formData.get("user"), + encrypted_password: formData.get("encrypted_password"), + }; } else if (providerType === "gcp") { // Static credentials configuration for GCP secret = { @@ -235,11 +233,7 @@ export const addCredentialsProvider = async (formData: FormData) => { try { const response = await fetch(url.toString(), { method: "POST", - headers: { - "Content-Type": "application/vnd.api+json", - Accept: "application/vnd.api+json", - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, body: JSON.stringify(bodyData), }); const data = await response.json(); @@ -258,9 +252,8 @@ export const updateCredentialsProvider = async ( credentialsId: string, formData: FormData, ) => { - const session = await auth(); - const keyServer = process.env.API_BASE_URL; - const url = new URL(`${keyServer}/providers/secrets/${credentialsId}`); + const headers = await getAuthHeaders({ contentType: true }); + const url = new URL(`${apiBaseUrl}/providers/secrets/${credentialsId}`); const secretName = formData.get("secretName"); const providerType = formData.get("providerType"); @@ -298,6 +291,15 @@ export const updateCredentialsProvider = async ( client_secret: formData.get("client_secret"), tenant_id: formData.get("tenant_id"), }; + } else if (providerType === "m365") { + // Static credentials configuration for M365 + secret = { + client_id: formData.get("client_id"), + client_secret: formData.get("client_secret"), + tenant_id: formData.get("tenant_id"), + user: formData.get("user"), + encrypted_password: formData.get("encrypted_password"), + }; } else if (providerType === "gcp") { // Static credentials configuration for GCP secret = { @@ -326,11 +328,7 @@ export const updateCredentialsProvider = async ( try { const response = await fetch(url.toString(), { method: "PATCH", - headers: { - "Content-Type": "application/vnd.api+json", - Accept: "application/vnd.api+json", - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, body: JSON.stringify(bodyData), }); @@ -351,20 +349,16 @@ export const updateCredentialsProvider = async ( }; export const checkConnectionProvider = async (formData: FormData) => { - const session = await auth(); - const keyServer = process.env.API_BASE_URL; + const headers = await getAuthHeaders({ contentType: false }); const providerId = formData.get("providerId"); - const url = new URL(`${keyServer}/providers/${providerId}/connection`); + const url = new URL(`${apiBaseUrl}/providers/${providerId}/connection`); try { const response = await fetch(url.toString(), { method: "POST", - headers: { - Accept: "application/vnd.api+json", - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, }); const data = await response.json(); await wait(2000); @@ -378,21 +372,18 @@ export const checkConnectionProvider = async (formData: FormData) => { }; export const deleteCredentials = async (secretId: string) => { - const session = await auth(); - const keyServer = process.env.API_BASE_URL; + const headers = await getAuthHeaders({ contentType: false }); if (!secretId) { return { error: "Secret ID is required" }; } - const url = new URL(`${keyServer}/providers/secrets/${secretId}`); + const url = new URL(`${apiBaseUrl}/providers/secrets/${secretId}`); try { const response = await fetch(url.toString(), { method: "DELETE", - headers: { - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, }); if (!response.ok) { @@ -421,22 +412,19 @@ export const deleteCredentials = async (secretId: string) => { }; export const deleteProvider = async (formData: FormData) => { - const session = await auth(); - const keyServer = process.env.API_BASE_URL; + const headers = await getAuthHeaders({ contentType: false }); const providerId = formData.get("id"); if (!providerId) { return { error: "Provider ID is required" }; } - const url = new URL(`${keyServer}/providers/${providerId}`); + const url = new URL(`${apiBaseUrl}/providers/${providerId}`); try { const response = await fetch(url.toString(), { method: "DELETE", - headers: { - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, }); if (!response.ok) { diff --git a/ui/actions/roles/roles.ts b/ui/actions/roles/roles.ts index a371fd74ea..d0dd07bd9a 100644 --- a/ui/actions/roles/roles.ts +++ b/ui/actions/roles/roles.ts @@ -3,23 +3,28 @@ import { revalidatePath } from "next/cache"; import { redirect } from "next/navigation"; -import { auth } from "@/auth.config"; -import { getErrorMessage, parseStringify } from "@/lib"; +import { + apiBaseUrl, + getAuthHeaders, + getErrorMessage, + parseStringify, +} from "@/lib"; export const getRoles = async ({ page = 1, query = "", sort = "", filters = {}, + pageSize = 10, }) => { - const session = await auth(); + const headers = await getAuthHeaders({ contentType: false }); if (isNaN(Number(page)) || page < 1) redirect("/roles"); - const keyServer = process.env.API_BASE_URL; - const url = new URL(`${keyServer}/roles`); + const url = new URL(`${apiBaseUrl}/roles`); if (page) url.searchParams.append("page[number]", page.toString()); + if (pageSize) url.searchParams.append("page[size]", pageSize.toString()); if (query) url.searchParams.append("filter[search]", query); if (sort) url.searchParams.append("sort", sort); @@ -31,13 +36,10 @@ export const getRoles = async ({ }); try { - const invitations = await fetch(url.toString(), { - headers: { - Accept: "application/vnd.api+json", - Authorization: `Bearer ${session?.accessToken}`, - }, + const roles = await fetch(url.toString(), { + headers, }); - const data = await invitations.json(); + const data = await roles.json(); const parsedData = parseStringify(data); revalidatePath("/roles"); return parsedData; @@ -49,17 +51,13 @@ export const getRoles = async ({ }; export const getRoleInfoById = async (roleId: string) => { - const session = await auth(); - const keyServer = process.env.API_BASE_URL; - const url = new URL(`${keyServer}/roles/${roleId}`); + const headers = await getAuthHeaders({ contentType: false }); + const url = new URL(`${apiBaseUrl}/roles/${roleId}`); try { const response = await fetch(url.toString(), { method: "GET", - headers: { - Accept: "application/vnd.api+json", - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, }); if (!response.ok) { @@ -75,9 +73,40 @@ export const getRoleInfoById = async (roleId: string) => { } }; +export const getRolesByIds = async (roleIds: string[]) => { + if (!roleIds || roleIds.length === 0) { + return { data: [] }; + } + + const headers = await getAuthHeaders({ contentType: false }); + const url = new URL(`${apiBaseUrl}/roles`); + + // Add filter for role IDs + url.searchParams.append("filter[id__in]", roleIds.join(",")); + // Request all results on a single page with reasonable size + url.searchParams.append("page[size]", "100"); + + try { + const response = await fetch(url.toString(), { + method: "GET", + headers, + }); + + if (!response.ok) { + throw new Error(`Failed to fetch roles: ${response.statusText}`); + } + + const data = await response.json(); + return parseStringify(data); + } catch (error) { + // eslint-disable-next-line no-console + console.error("Error fetching roles by IDs:", error); + return { data: [] }; + } +}; + export const addRole = async (formData: FormData) => { - const session = await auth(); - const keyServer = process.env.API_BASE_URL; + const headers = await getAuthHeaders({ contentType: true }); const name = formData.get("name") as string; const groups = formData.getAll("groups[]") as string[]; @@ -118,14 +147,10 @@ export const addRole = async (formData: FormData) => { const body = JSON.stringify(payload); try { - const url = new URL(`${keyServer}/roles`); + const url = new URL(`${apiBaseUrl}/roles`); const response = await fetch(url.toString(), { method: "POST", - headers: { - "Content-Type": "application/vnd.api+json", - Accept: "application/vnd.api+json", - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, body, }); @@ -142,8 +167,7 @@ export const addRole = async (formData: FormData) => { }; export const updateRole = async (formData: FormData, roleId: string) => { - const session = await auth(); - const keyServer = process.env.API_BASE_URL; + const headers = await getAuthHeaders({ contentType: true }); const name = formData.get("name") as string; const groups = formData.getAll("groups[]") as string[]; @@ -185,14 +209,10 @@ export const updateRole = async (formData: FormData, roleId: string) => { const body = JSON.stringify(payload); try { - const url = new URL(`${keyServer}/roles/${roleId}`); + const url = new URL(`${apiBaseUrl}/roles/${roleId}`); const response = await fetch(url.toString(), { method: "PATCH", - headers: { - "Content-Type": "application/vnd.api+json", - Accept: "application/vnd.api+json", - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, body, }); @@ -209,16 +229,13 @@ export const updateRole = async (formData: FormData, roleId: string) => { }; export const deleteRole = async (roleId: string) => { - const session = await auth(); - const keyServer = process.env.API_BASE_URL; + const headers = await getAuthHeaders({ contentType: false }); - const url = new URL(`${keyServer}/roles/${roleId}`); + const url = new URL(`${apiBaseUrl}/roles/${roleId}`); try { const response = await fetch(url.toString(), { method: "DELETE", - headers: { - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, }); if (!response.ok) { diff --git a/ui/actions/scans/scans.ts b/ui/actions/scans/scans.ts index 954b600a26..39e17a4b42 100644 --- a/ui/actions/scans/scans.ts +++ b/ui/actions/scans/scans.ts @@ -3,23 +3,28 @@ import { revalidatePath } from "next/cache"; import { redirect } from "next/navigation"; -import { auth } from "@/auth.config"; -import { getErrorMessage, parseStringify } from "@/lib"; +import { + apiBaseUrl, + getAuthHeaders, + getErrorMessage, + parseStringify, +} from "@/lib"; export const getScans = async ({ page = 1, query = "", sort = "", filters = {}, + pageSize = 10, }) => { - const session = await auth(); + const headers = await getAuthHeaders({ contentType: false }); if (isNaN(Number(page)) || page < 1) redirect("/scans"); - const keyServer = process.env.API_BASE_URL; - const url = new URL(`${keyServer}/scans`); + const url = new URL(`${apiBaseUrl}/scans`); if (page) url.searchParams.append("page[number]", page.toString()); + if (pageSize) url.searchParams.append("page[size]", pageSize.toString()); if (query) url.searchParams.append("filter[search]", query); if (sort) url.searchParams.append("sort", sort); @@ -32,10 +37,7 @@ export const getScans = async ({ try { const scans = await fetch(url.toString(), { - headers: { - Accept: "application/vnd.api+json", - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, }); const data = await scans.json(); const parsedData = parseStringify(data); @@ -49,20 +51,16 @@ export const getScans = async ({ }; export const getScansByState = async () => { - const session = await auth(); + const headers = await getAuthHeaders({ contentType: false }); - const keyServer = process.env.API_BASE_URL; - const url = new URL(`${keyServer}/scans`); + const url = new URL(`${apiBaseUrl}/scans`); // Request only the necessary fields to optimize the response url.searchParams.append("fields[scans]", "state"); try { const response = await fetch(url.toString(), { - headers: { - Accept: "application/vnd.api+json", - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, }); if (!response.ok) { @@ -85,17 +83,13 @@ export const getScansByState = async () => { }; export const getScan = async (scanId: string) => { - const session = await auth(); + const headers = await getAuthHeaders({ contentType: false }); - const keyServer = process.env.API_BASE_URL; - const url = new URL(`${keyServer}/scans/${scanId}`); + const url = new URL(`${apiBaseUrl}/scans/${scanId}`); try { const scan = await fetch(url.toString(), { - headers: { - Accept: "application/vnd.api+json", - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, }); const data = await scan.json(); const parsedData = parseStringify(data); @@ -109,9 +103,7 @@ export const getScan = async (scanId: string) => { }; export const scanOnDemand = async (formData: FormData) => { - const session = await auth(); - const keyServer = process.env.API_BASE_URL; - + const headers = await getAuthHeaders({ contentType: true }); const providerId = formData.get("providerId"); const scanName = formData.get("scanName") || undefined; @@ -119,7 +111,7 @@ export const scanOnDemand = async (formData: FormData) => { return { error: "Provider ID is required" }; } - const url = new URL(`${keyServer}/scans`); + const url = new URL(`${apiBaseUrl}/scans`); try { const requestBody = { @@ -139,11 +131,7 @@ export const scanOnDemand = async (formData: FormData) => { const response = await fetch(url.toString(), { method: "POST", - headers: { - "Content-Type": "application/vnd.api+json", - Accept: "application/vnd.api+json", - Authorization: `Bearer ${session?.accessToken}`, - }, + headers: headers, body: JSON.stringify(requestBody), }); @@ -168,21 +156,16 @@ export const scanOnDemand = async (formData: FormData) => { }; export const scheduleDaily = async (formData: FormData) => { - const session = await auth(); - const keyServer = process.env.API_BASE_URL; + const headers = await getAuthHeaders({ contentType: true }); const providerId = formData.get("providerId"); - const url = new URL(`${keyServer}/schedules/daily`); + const url = new URL(`${apiBaseUrl}/schedules/daily`); try { const response = await fetch(url.toString(), { method: "POST", - headers: { - "Content-Type": "application/vnd.api+json", - Accept: "application/vnd.api+json", - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, body: JSON.stringify({ data: { type: "daily-schedules", @@ -210,22 +193,17 @@ export const scheduleDaily = async (formData: FormData) => { }; export const updateScan = async (formData: FormData) => { - const session = await auth(); - const keyServer = process.env.API_BASE_URL; + const headers = await getAuthHeaders({ contentType: true }); const scanId = formData.get("scanId"); const scanName = formData.get("scanName"); - const url = new URL(`${keyServer}/scans/${scanId}`); + const url = new URL(`${apiBaseUrl}/scans/${scanId}`); try { const response = await fetch(url.toString(), { method: "PATCH", - headers: { - "Content-Type": "application/vnd.api+json", - Accept: "application/vnd.api+json", - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, body: JSON.stringify({ data: { type: "scans", @@ -249,16 +227,13 @@ export const updateScan = async (formData: FormData) => { }; export const getExportsZip = async (scanId: string) => { - const session = await auth(); + const headers = await getAuthHeaders({ contentType: false }); - const keyServer = process.env.API_BASE_URL; - const url = new URL(`${keyServer}/scans/${scanId}/report`); + const url = new URL(`${apiBaseUrl}/scans/${scanId}/report`); try { const response = await fetch(url.toString(), { - headers: { - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, }); if (!response.ok) { @@ -284,3 +259,42 @@ export const getExportsZip = async (scanId: string) => { }; } }; + +export const getComplianceCsv = async ( + scanId: string, + complianceId: string, +) => { + const headers = await getAuthHeaders({ contentType: false }); + + const url = new URL( + `${apiBaseUrl}/scans/${scanId}/compliance/${complianceId}`, + ); + + try { + const response = await fetch(url.toString(), { + headers, + }); + + if (!response.ok) { + const errorData = await response.json(); + throw new Error( + errorData?.errors?.[0]?.detail || "Failed to fetch compliance report", + ); + } + + // Get the blob data as an array buffer + const arrayBuffer = await response.arrayBuffer(); + // Convert to base64 + const base64 = Buffer.from(arrayBuffer).toString("base64"); + + return { + success: true, + data: base64, + filename: `scan-${scanId}-compliance-${complianceId}.csv`, + }; + } catch (error) { + return { + error: getErrorMessage(error), + }; + } +}; diff --git a/ui/actions/services/index.ts b/ui/actions/services/index.ts deleted file mode 100644 index b2221a94a8..0000000000 --- a/ui/actions/services/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./services"; diff --git a/ui/actions/services/services.ts b/ui/actions/services/services.ts deleted file mode 100644 index cfd295e1cb..0000000000 --- a/ui/actions/services/services.ts +++ /dev/null @@ -1,97 +0,0 @@ -"use server"; - -import { revalidatePath } from "next/cache"; - -import { auth } from "@/auth.config"; - -export const getServices = async () => { - const session = await auth(); - - const keyServer = process.env.API_BASE_URL; - const servicesToFetch = [ - { id: "accessanalyzer", alias: "IAM Access Analyzer" }, - { id: "account", alias: "AWS Account" }, - { id: "acm", alias: "AWS Certificate Manager" }, - { id: "apigateway", alias: "Amazon API Gateway" }, - { id: "apigatewayv2", alias: "Amazon API Gateway V2" }, - { id: "athena", alias: "Amazon Athena" }, - { id: "autoscaling", alias: "Amazon EC2 Auto Scaling" }, - { id: "awslambda", alias: "AWS Lambda" }, - { id: "backup", alias: "AWS Backup" }, - { id: "cloudformation", alias: "AWS CloudFormation" }, - { id: "cloudfront", alias: "Amazon CloudFront" }, - { id: "cloudtrail", alias: "AWS CloudTrail" }, - { id: "cloudwatch", alias: "Amazon CloudWatch" }, - { id: "codeartifact", alias: "AWS CodeArtifact" }, - { id: "codebuild", alias: "AWS CodeBuild" }, - { id: "config", alias: "AWS Config" }, - { id: "dlm", alias: "Amazon Data Lifecycle Manager" }, - { id: "drs", alias: "AWS Data Replication Service" }, - { id: "dynamodb", alias: "Amazon DynamoDB" }, - { id: "ec2", alias: "Amazon EC2" }, - { id: "ecr", alias: "Amazon ECR" }, - { id: "ecs", alias: "Amazon ECS" }, - { id: "efs", alias: "Amazon EFS" }, - { id: "eks", alias: "Amazon EKS" }, - { id: "elasticache", alias: "Amazon ElastiCache" }, - { id: "elb", alias: "Elastic Load Balancing" }, - { id: "elbv2", alias: "Elastic Load Balancing v2" }, - { id: "emr", alias: "Amazon EMR" }, - { id: "fms", alias: "AWS Firewall Manager" }, - { id: "glacier", alias: "Amazon Glacier" }, - { id: "glue", alias: "AWS Glue" }, - { id: "guardduty", alias: "Amazon GuardDuty" }, - { id: "iam", alias: "AWS IAM" }, - { id: "inspector2", alias: "Amazon Inspector" }, - { id: "kms", alias: "AWS KMS" }, - { id: "macie", alias: "Amazon Macie" }, - { id: "networkfirewall", alias: "AWS Network Firewall" }, - { id: "organizations", alias: "AWS Organizations" }, - { id: "rds", alias: "Amazon RDS" }, - { id: "resourceexplorer2", alias: "AWS Resource Groups" }, - { id: "route53", alias: "Amazon Route 53" }, - { id: "s3", alias: "Amazon S3" }, - { id: "secretsmanager", alias: "AWS Secrets Manager" }, - { id: "securityhub", alias: "AWS Security Hub" }, - { id: "sns", alias: "Amazon SNS" }, - { id: "sqs", alias: "Amazon SQS" }, - { id: "ssm", alias: "AWS Systems Manager" }, - { id: "ssmincidents", alias: "AWS Systems Manager Incident Manager" }, - { id: "trustedadvisor", alias: "AWS Trusted Advisor" }, - { id: "vpc", alias: "Amazon VPC" }, - { id: "wafv2", alias: "AWS WAF" }, - { id: "wellarchitected", alias: "AWS Well-Architected Tool" }, - ]; - - const parsedData = []; - - for (const service of servicesToFetch) { - const url = new URL(`${keyServer}/findings`); - url.searchParams.append("filter[service]", service.id); - url.searchParams.append("filter[status]", "FAIL"); - - try { - const response = await fetch(url.toString(), { - headers: { - Accept: "application/vnd.api+json", - Authorization: `Bearer ${session?.accessToken}`, - }, - }); - - const data = await response.json(); - const failFindings = data.meta.pagination.count; - - parsedData.push({ - service_id: service.id, - service_alias: service.alias, - fail_findings: failFindings, - }); - } catch (error) { - // eslint-disable-next-line no-console - console.error(`Error fetching data for service ${service.id}:`, error); - } - } - - revalidatePath("/services"); - return parsedData; -}; diff --git a/ui/actions/task/tasks.ts b/ui/actions/task/tasks.ts index fdf75c7cea..13cff62345 100644 --- a/ui/actions/task/tasks.ts +++ b/ui/actions/task/tasks.ts @@ -1,20 +1,20 @@ "use server"; -import { auth } from "@/auth.config"; -import { getErrorMessage, parseStringify } from "@/lib"; +import { + apiBaseUrl, + getAuthHeaders, + getErrorMessage, + parseStringify, +} from "@/lib"; export const getTask = async (taskId: string) => { - const session = await auth(); + const headers = await getAuthHeaders({ contentType: false }); - const keyServer = process.env.API_BASE_URL; - const url = new URL(`${keyServer}/tasks/${taskId}`); + const url = new URL(`${apiBaseUrl}/tasks/${taskId}`); try { const response = await fetch(url.toString(), { - headers: { - Accept: "application/vnd.api+json", - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, }); const data = await response.json(); return parseStringify(data); diff --git a/ui/actions/users/tenants.ts b/ui/actions/users/tenants.ts new file mode 100644 index 0000000000..0901345852 --- /dev/null +++ b/ui/actions/users/tenants.ts @@ -0,0 +1,28 @@ +import { revalidatePath } from "next/cache"; + +import { apiBaseUrl, getAuthHeaders, parseStringify } from "@/lib/helper"; + +export const getAllTenants = async () => { + const headers = await getAuthHeaders({ contentType: false }); + const url = new URL(`${apiBaseUrl}/tenants`); + + try { + const response = await fetch(url.toString(), { + method: "GET", + headers, + }); + + if (!response.ok) { + throw new Error(`Failed to fetch tenants data: ${response.statusText}`); + } + + const data = await response.json(); + const parsedData = parseStringify(data); + revalidatePath("/profile"); + return parsedData; + } catch (error) { + // eslint-disable-next-line no-console + console.error("Error fetching tenants:", error); + return undefined; + } +}; diff --git a/ui/actions/users/users.ts b/ui/actions/users/users.ts index 4e64023b13..c47c58ebbf 100644 --- a/ui/actions/users/users.ts +++ b/ui/actions/users/users.ts @@ -3,23 +3,28 @@ import { revalidatePath } from "next/cache"; import { redirect } from "next/navigation"; -import { auth } from "@/auth.config"; -import { getErrorMessage, parseStringify } from "@/lib"; +import { + apiBaseUrl, + getAuthHeaders, + getErrorMessage, + parseStringify, +} from "@/lib"; export const getUsers = async ({ page = 1, query = "", sort = "", filters = {}, + pageSize = 10, }) => { - const session = await auth(); + const headers = await getAuthHeaders({ contentType: false }); if (isNaN(Number(page)) || page < 1) redirect("/users?include=roles"); - const keyServer = process.env.API_BASE_URL; - const url = new URL(`${keyServer}/users?include=roles`); + const url = new URL(`${apiBaseUrl}/users?include=roles`); if (page) url.searchParams.append("page[number]", page.toString()); + if (pageSize) url.searchParams.append("page[size]", pageSize.toString()); if (query) url.searchParams.append("filter[search]", query); if (sort) url.searchParams.append("sort", sort); @@ -32,10 +37,7 @@ export const getUsers = async ({ try { const users = await fetch(url.toString(), { - headers: { - Accept: "application/vnd.api+json", - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, }); const data = await users.json(); const parsedData = parseStringify(data); @@ -49,8 +51,7 @@ export const getUsers = async ({ }; export const updateUser = async (formData: FormData) => { - const session = await auth(); - const keyServer = process.env.API_BASE_URL; + const headers = await getAuthHeaders({ contentType: true }); const userId = formData.get("userId") as string; // Ensure userId is a string const userName = formData.get("name") as string | null; @@ -58,7 +59,7 @@ export const updateUser = async (formData: FormData) => { const userEmail = formData.get("email") as string | null; const userCompanyName = formData.get("company_name") as string | null; - const url = new URL(`${keyServer}/users/${userId}`); + const url = new URL(`${apiBaseUrl}/users/${userId}`); // Prepare attributes to send based on changes const attributes: Record = {}; @@ -77,11 +78,7 @@ export const updateUser = async (formData: FormData) => { try { const response = await fetch(url.toString(), { method: "PATCH", - headers: { - "Content-Type": "application/vnd.api+json", - Accept: "application/vnd.api+json", - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, body: JSON.stringify({ data: { type: "users", @@ -104,8 +101,7 @@ export const updateUser = async (formData: FormData) => { }; export const updateUserRole = async (formData: FormData) => { - const session = await auth(); - const keyServer = process.env.API_BASE_URL; + const headers = await getAuthHeaders({ contentType: true }); const userId = formData.get("userId") as string; const roleId = formData.get("roleId") as string; @@ -115,7 +111,7 @@ export const updateUserRole = async (formData: FormData) => { return { error: "userId and roleId are required" }; } - const url = new URL(`${keyServer}/users/${userId}/relationships/roles`); + const url = new URL(`${apiBaseUrl}/users/${userId}/relationships/roles`); const requestBody = { data: [ @@ -129,11 +125,7 @@ export const updateUserRole = async (formData: FormData) => { try { const response = await fetch(url.toString(), { method: "PATCH", - headers: { - "Content-Type": "application/vnd.api+json", - Accept: "application/vnd.api+json", - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, body: JSON.stringify(requestBody), }); @@ -155,22 +147,19 @@ export const updateUserRole = async (formData: FormData) => { }; export const deleteUser = async (formData: FormData) => { - const session = await auth(); - const keyServer = process.env.API_BASE_URL; + const headers = await getAuthHeaders({ contentType: false }); const userId = formData.get("userId"); if (!userId) { return { error: "User ID is required" }; } - const url = new URL(`${keyServer}/users/${userId}`); + const url = new URL(`${apiBaseUrl}/users/${userId}`); try { const response = await fetch(url.toString(), { method: "DELETE", - headers: { - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, }); if (!response.ok) { @@ -195,18 +184,14 @@ export const deleteUser = async (formData: FormData) => { } }; -export const getProfileInfo = async () => { - const session = await auth(); - const keyServer = process.env.API_BASE_URL; - const url = new URL(`${keyServer}/users/me`); +export const getUserInfo = async () => { + const headers = await getAuthHeaders({ contentType: false }); + const url = new URL(`${apiBaseUrl}/users/me?include=roles`); try { const response = await fetch(url.toString(), { method: "GET", - headers: { - Accept: "application/vnd.api+json", - Authorization: `Bearer ${session?.accessToken}`, - }, + headers, }); if (!response.ok) { @@ -223,3 +208,33 @@ export const getProfileInfo = async () => { return undefined; } }; + +export const getUserMemberships = async (userId: string) => { + if (!userId) { + return { data: [] }; + } + + const headers = await getAuthHeaders({ contentType: false }); + const url = new URL(`${apiBaseUrl}/users/${userId}/memberships`); + url.searchParams.append("page[size]", "100"); + + try { + const response = await fetch(url.toString(), { + method: "GET", + headers, + }); + + if (!response.ok) { + throw new Error( + `Failed to fetch user memberships: ${response.statusText}`, + ); + } + + const data = await response.json(); + return parseStringify(data); + } catch (error) { + // eslint-disable-next-line no-console + console.error("Error fetching user memberships:", error); + return { data: [] }; + } +}; diff --git a/ui/app/(auth)/sign-in/page.tsx b/ui/app/(auth)/sign-in/page.tsx index b5bd978029..c36226e61f 100644 --- a/ui/app/(auth)/sign-in/page.tsx +++ b/ui/app/(auth)/sign-in/page.tsx @@ -1,7 +1,22 @@ import { AuthForm } from "@/components/auth/oss"; +import { + getAuthUrl, + isGithubOAuthEnabled, + isGoogleOAuthEnabled, +} from "@/lib/helper"; const SignIn = () => { - return ; + const GOOGLE_AUTH_URL = getAuthUrl("google"); + const GITHUB_AUTH_URL = getAuthUrl("github"); + return ( + + ); }; export default SignIn; diff --git a/ui/app/(auth)/sign-up/page.tsx b/ui/app/(auth)/sign-up/page.tsx index 28149bb200..6dc5c81c87 100644 --- a/ui/app/(auth)/sign-up/page.tsx +++ b/ui/app/(auth)/sign-up/page.tsx @@ -1,4 +1,6 @@ import { AuthForm } from "@/components/auth/oss"; +import { getAuthUrl, isGithubOAuthEnabled } from "@/lib/helper"; +import { isGoogleOAuthEnabled } from "@/lib/helper"; import { SearchParamsProps } from "@/types"; const SignUp = ({ searchParams }: { searchParams: SearchParamsProps }) => { @@ -7,7 +9,19 @@ const SignUp = ({ searchParams }: { searchParams: SearchParamsProps }) => { ? searchParams.invitation_token : null; - return ; + const GOOGLE_AUTH_URL = getAuthUrl("google"); + const GITHUB_AUTH_URL = getAuthUrl("github"); + + return ( + + ); }; export default SignUp; diff --git a/ui/app/(prowler)/compliance/page.tsx b/ui/app/(prowler)/compliance/page.tsx index 68789e6900..e3dab9e762 100644 --- a/ui/app/(prowler)/compliance/page.tsx +++ b/ui/app/(prowler)/compliance/page.tsx @@ -4,7 +4,7 @@ import { Spacer } from "@nextui-org/react"; import { Suspense } from "react"; import { getCompliancesOverview } from "@/actions/compliances"; -import { getMetadataInfo } from "@/actions/findings"; +import { getComplianceOverviewMetadataInfo } from "@/actions/compliances"; import { getProvider } from "@/actions/providers"; import { getScans } from "@/actions/scans"; import { @@ -70,10 +70,10 @@ export default async function Compliance({ searchParams.scanId || expandedScansData[0]?.id || null; const query = (filters["filter[search]"] as string) || ""; - const metadataInfoData = await getMetadataInfo({ + const metadataInfoData = await getComplianceOverviewMetadataInfo({ query, filters: { - "filter[scan]": selectedScanId, + "filter[scan_id]": selectedScanId, }, }); @@ -159,6 +159,7 @@ const SSRComplianceGrid = async ({ framework, version, requirements_status: { passed, total }, + compliance_id, } = attributes; return ( @@ -170,6 +171,8 @@ const SSRComplianceGrid = async ({ totalRequirements={total} prevPassingRequirements={passed} prevTotalRequirements={total} + scanId={scanId} + complianceId={compliance_id} /> ); })} diff --git a/ui/app/(prowler)/findings/page.tsx b/ui/app/(prowler)/findings/page.tsx index 9fa50fc115..f137b451cc 100644 --- a/ui/app/(prowler)/findings/page.tsx +++ b/ui/app/(prowler)/findings/page.tsx @@ -1,8 +1,12 @@ import { Spacer } from "@nextui-org/react"; -import { format, subDays } from "date-fns"; import React, { Suspense } from "react"; -import { getFindings, getMetadataInfo } from "@/actions/findings"; +import { + getFindings, + getLatestFindings, + getLatestMetadataInfo, + getMetadataInfo, +} from "@/actions/findings"; import { getProviders } from "@/actions/providers"; import { getScans } from "@/actions/scans"; import { filterFindings } from "@/components/filters/data-filters"; @@ -13,59 +17,33 @@ import { } from "@/components/findings/table"; import { ContentLayout } from "@/components/ui"; import { DataTable, DataTableFilterCustom } from "@/components/ui/table"; -import { createDict } from "@/lib"; import { - FindingProps, - ProviderProps, - ScanProps, - SearchParamsProps, -} from "@/types/components"; + createDict, + extractFiltersAndQuery, + extractSortAndKey, + hasDateOrScanFilter, +} from "@/lib"; +import { ProviderAccountProps, ProviderProps } from "@/types"; +import { FindingProps, ScanProps, SearchParamsProps } from "@/types/components"; export default async function Findings({ searchParams, }: { searchParams: SearchParamsProps; }) { - const searchParamsKey = JSON.stringify(searchParams || {}); - const sort = searchParams.sort?.toString(); - - // Make sure the sort is correctly encoded - const encodedSort = sort?.replace(/^\+/, ""); - - const twoDaysAgo = format(subDays(new Date(), 2), "yyyy-MM-dd"); + const { searchParamsKey, encodedSort } = extractSortAndKey(searchParams); + const { filters, query } = extractFiltersAndQuery(searchParams); // Check if the searchParams contain any date or scan filter - const hasDateOrScanFilter = Object.keys(searchParams).some( - (key) => key.includes("inserted_at") || key.includes("scan__in"), - ); - - // Default filters for getMetadataInfo - const defaultFilters: Record = hasDateOrScanFilter - ? {} // Do not apply default filters if there are date or scan filters - : { "filter[inserted_at__gte]": twoDaysAgo }; - - // Extract all filter parameters and combine with default filters - const filters: Record = { - ...defaultFilters, - ...Object.fromEntries( - Object.entries(searchParams) - .filter(([key]) => key.startsWith("filter[")) - .map(([key, value]) => [ - key, - Array.isArray(value) ? value.join(",") : value?.toString() || "", - ]), - ), - }; - - const query = filters["filter[search]"] || ""; + const hasDateOrScan = hasDateOrScanFilter(searchParams); const [metadataInfoData, providersData, scansData] = await Promise.all([ - getMetadataInfo({ + (hasDateOrScan ? getMetadataInfo : getLatestMetadataInfo)({ query, sort: encodedSort, filters, }), - getProviders({}), + getProviders({ pageSize: 50 }), getScans({}), ]); @@ -77,14 +55,29 @@ export default async function Findings({ // Get findings data // Extract provider UIDs - const providerUIDs = Array.from( + const providerUIDs: string[] = Array.from( new Set( providersData?.data - ?.map((provider: ProviderProps) => provider.attributes.uid) + ?.map((provider: ProviderProps) => provider.attributes?.uid) .filter(Boolean), ), ); + const providerDetails: Array<{ [uid: string]: ProviderAccountProps }> = + providerUIDs.map((uid) => { + const provider = providersData.data.find( + (p: { attributes: { uid: string } }) => p.attributes?.uid === uid, + ); + + return { + [uid]: { + provider: provider?.attributes?.provider || "", + uid: uid, + alias: provider?.attributes?.alias ?? null, + }, + }; + }); + // Extract scan UUIDs with "completed" state and more than one resource const completedScans = scansData?.data ?.filter( @@ -126,6 +119,7 @@ export default async function Findings({ key: "provider_uid__in", labelCheckboxGroup: "Provider UID", values: providerUIDs, + valueLabelMapping: providerDetails, }, { key: "scan__in", @@ -149,44 +143,26 @@ const SSRDataTable = async ({ searchParams: SearchParamsProps; }) => { const page = parseInt(searchParams.page?.toString() || "1", 10); + const pageSize = parseInt(searchParams.pageSize?.toString() || "10", 10); const defaultSort = "severity,status,-inserted_at"; - const sort = searchParams.sort?.toString() || defaultSort; - // Make sure the sort is correctly encoded - const encodedSort = sort.replace(/^\+/, ""); - - const twoDaysAgo = format(subDays(new Date(), 2), "yyyy-MM-dd"); + const { encodedSort } = extractSortAndKey({ + ...searchParams, + sort: searchParams.sort ?? defaultSort, + }); + const { filters, query } = extractFiltersAndQuery(searchParams); // Check if the searchParams contain any date or scan filter - const hasDateOrScanFilter = Object.keys(searchParams).some( - (key) => key.includes("inserted_at") || key.includes("scan__in"), - ); + const hasDateOrScan = hasDateOrScanFilter(searchParams); - // Default filters for getFindings - const defaultFilters: Record = hasDateOrScanFilter - ? {} // Do not apply default filters if there are date or scan filters - : { "filter[inserted_at__gte]": twoDaysAgo }; + const fetchFindings = hasDateOrScan ? getFindings : getLatestFindings; - const filters: Record = { - ...defaultFilters, - ...Object.fromEntries( - Object.entries(searchParams) - .filter(([key]) => key.startsWith("filter[")) - .map(([key, value]) => [ - key, - Array.isArray(value) ? value.join(",") : value?.toString() || "", - ]), - ), - }; - - const query = filters["filter[search]"] || ""; - - const findingsData = await getFindings({ + const findingsData = await fetchFindings({ query, page, sort: encodedSort, filters, - pageSize: 10, + pageSize, }); // Create dictionaries for resources, scans, and providers diff --git a/ui/app/(prowler)/invitations/page.tsx b/ui/app/(prowler)/invitations/page.tsx index b51a315d15..89a7776b13 100644 --- a/ui/app/(prowler)/invitations/page.tsx +++ b/ui/app/(prowler)/invitations/page.tsx @@ -44,6 +44,7 @@ const SSRDataTable = async ({ }) => { const page = parseInt(searchParams.page?.toString() || "1", 10); const sort = searchParams.sort?.toString(); + const pageSize = parseInt(searchParams.pageSize?.toString() || "10", 10); // Extract all filter parameters const filters = Object.fromEntries( @@ -54,7 +55,13 @@ const SSRDataTable = async ({ const query = (filters["filter[search]"] as string) || ""; // Fetch invitations and roles - const invitationsData = await getInvitations({ query, page, sort, filters }); + const invitationsData = await getInvitations({ + query, + page, + sort, + filters, + pageSize, + }); const rolesData = await getRoles({}); // Create a dictionary for roles by invitation ID diff --git a/ui/app/(prowler)/manage-groups/page.tsx b/ui/app/(prowler)/manage-groups/page.tsx index 62b3c83342..c5e5be9932 100644 --- a/ui/app/(prowler)/manage-groups/page.tsx +++ b/ui/app/(prowler)/manage-groups/page.tsx @@ -58,7 +58,7 @@ export default function ManageGroupsPage({ } const SSRAddGroupForm = async () => { - const providersResponse = await getProviders({}); + const providersResponse = await getProviders({ pageSize: 50 }); const rolesResponse = await getRoles({}); const providersData = @@ -95,7 +95,7 @@ const SSRDataEditGroup = async ({ return
Provider group not found
; } - const providersResponse = await getProviders({}); + const providersResponse = await getProviders({ pageSize: 50 }); const rolesResponse = await getRoles({}); const providersList = @@ -163,6 +163,7 @@ const SSRDataTable = async ({ }) => { const page = parseInt(searchParams.page?.toString() || "1", 10); const sort = searchParams.sort?.toString(); + const pageSize = parseInt(searchParams.pageSize?.toString() || "10", 10); // Convert filters to the correct type const filters: Record = {}; @@ -178,6 +179,7 @@ const SSRDataTable = async ({ page, sort, filters, + pageSize, }); return ( -
-
-
-
- }> - - -
-
-
+
+ }> + +
); } const SSRDataUser = async () => { - const userProfile: UserProfileProps = await getProfileInfo(); + const userProfile = await getUserInfo(); + if (!userProfile?.data) { + return null; + } + + const roleDetails = + userProfile.included?.filter((item: any) => item.type === "roles") || []; + + const roleDetailsMap = roleDetails.reduce( + (acc: Record, role: RoleDetail) => { + acc[role.id] = role; + return acc; + }, + {} as Record, + ); + + const memberships = await getUserMemberships(userProfile.data.id); + const tenants = await getAllTenants(); + + const tenantsMap = tenants?.data?.reduce( + (acc: Record, tenant: TenantDetailData) => { + acc[tenant.id] = tenant; + return acc; + }, + {} as Record, + ); + + const userMembershipIds = + userProfile.data.relationships?.memberships?.data?.map( + (membership: { id: string }) => membership.id, + ) || []; + + const userTenant = tenants?.data?.find((tenant: TenantDetailData) => + tenant.relationships?.memberships?.data?.some( + (membership: { id: string }) => userMembershipIds.includes(membership.id), + ), + ); return ( - <> -

User Info

- - +
+ + + +
); }; diff --git a/ui/app/(prowler)/providers/(set-up-provider)/launch-scan/page.tsx b/ui/app/(prowler)/providers/(set-up-provider)/launch-scan/page.tsx deleted file mode 100644 index cdfba93dbd..0000000000 --- a/ui/app/(prowler)/providers/(set-up-provider)/launch-scan/page.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import { redirect } from "next/navigation"; -import React, { Suspense } from "react"; - -import { getProvider } from "@/actions/providers"; -import { LaunchScanForm } from "@/components/providers/workflow/forms"; -import { SkeletonProviderWorkflow } from "@/components/providers/workflow/skeleton-provider-workflow"; - -interface Props { - searchParams: { type: string; id: string }; -} - -export default async function LaunchScanPage({ searchParams }: Props) { - const providerId = searchParams.id; - - if (!providerId) { - redirect("/providers/connect-account"); - } - - const formData = new FormData(); - formData.append("id", providerId); - - const providerData = await getProvider(formData); - - const isConnected = providerData?.data?.attributes?.connection?.connected; - - if (!isConnected) { - redirect("/providers/connect-account"); - } - - return ( - }> - - - ); -} - -async function SSRLaunchScan({ - searchParams, -}: { - searchParams: { type: string; id: string }; -}) { - const formData = new FormData(); - formData.append("id", searchParams.id); - - const providerData = await getProvider(formData); - - return ( - - ); -} diff --git a/ui/app/(prowler)/providers/page.tsx b/ui/app/(prowler)/providers/page.tsx index bd6b0baeb8..05ce3cf692 100644 --- a/ui/app/(prowler)/providers/page.tsx +++ b/ui/app/(prowler)/providers/page.tsx @@ -50,6 +50,7 @@ const SSRDataTable = async ({ }) => { const page = parseInt(searchParams.page?.toString() || "1", 10); const sort = searchParams.sort?.toString(); + const pageSize = parseInt(searchParams.pageSize?.toString() || "10", 10); // Extract all filter parameters const filters = Object.fromEntries( @@ -59,7 +60,13 @@ const SSRDataTable = async ({ // Extract query from filters const query = (filters["filter[search]"] as string) || ""; - const providersData = await getProviders({ query, page, sort, filters }); + const providersData = await getProviders({ + query, + page, + sort, + filters, + pageSize, + }); const providerGroupDict = providersData?.included diff --git a/ui/app/(prowler)/roles/page.tsx b/ui/app/(prowler)/roles/page.tsx index f0515ea546..d613990d98 100644 --- a/ui/app/(prowler)/roles/page.tsx +++ b/ui/app/(prowler)/roles/page.tsx @@ -41,6 +41,7 @@ const SSRDataTable = async ({ }) => { const page = parseInt(searchParams.page?.toString() || "1", 10); const sort = searchParams.sort?.toString(); + const pageSize = parseInt(searchParams.pageSize?.toString() || "10", 10); // Extract all filter parameters const filters = Object.fromEntries( @@ -50,7 +51,7 @@ const SSRDataTable = async ({ // Extract query from filters const query = (filters["filter[search]"] as string) || ""; - const rolesData = await getRoles({ query, page, sort, filters }); + const rolesData = await getRoles({ query, page, sort, filters, pageSize }); return ( { const page = parseInt(searchParams.page?.toString() || "1", 10); + const pageSize = parseInt(searchParams.pageSize?.toString() || "10", 10); const sort = searchParams.sort?.toString(); // Extract all filter parameters, excluding scanId @@ -120,7 +125,7 @@ const SSRDataTableScans = async ({ const query = (filters["filter[search]"] as string) || ""; // Fetch scans data - const scansData = await getScans({ query, page, sort, filters }); + const scansData = await getScans({ query, page, sort, filters, pageSize }); // Handle expanded scans data const expandedScansData = await Promise.all( diff --git a/ui/app/(prowler)/services/page.tsx b/ui/app/(prowler)/services/page.tsx index 5177ea2310..dc4878cf64 100644 --- a/ui/app/(prowler)/services/page.tsx +++ b/ui/app/(prowler)/services/page.tsx @@ -1,18 +1,10 @@ import { Spacer } from "@nextui-org/react"; -import { Suspense } from "react"; -import { getServices } from "@/actions/services"; import { FilterControls } from "@/components/filters"; -import { ServiceCard, ServiceSkeletonGrid } from "@/components/services"; import { ContentLayout } from "@/components/ui"; -import { SearchParamsProps } from "@/types"; -export default async function Services({ - searchParams, -}: { - searchParams: SearchParamsProps; -}) { - const searchParamsKey = JSON.stringify(searchParams || {}); +export default async function Services() { + // const searchParamsKey = JSON.stringify(searchParams || {}); return ( - }> + {/* }> - + */} ); } - -const SSRServiceGrid = async () => { - const services = await getServices(); - - return ( -
- {services?.map((service: any) => ( - - ))} -
- ); -}; diff --git a/ui/app/(prowler)/users/page.tsx b/ui/app/(prowler)/users/page.tsx index b4a19ac5fc..d6bbe6152f 100644 --- a/ui/app/(prowler)/users/page.tsx +++ b/ui/app/(prowler)/users/page.tsx @@ -41,6 +41,7 @@ const SSRDataTable = async ({ }) => { const page = parseInt(searchParams.page?.toString() || "1", 10); const sort = searchParams.sort?.toString(); + const pageSize = parseInt(searchParams.pageSize?.toString() || "10", 10); // Extract all filter parameters const filters = Object.fromEntries( @@ -50,7 +51,7 @@ const SSRDataTable = async ({ // Extract query from filters const query = (filters["filter[search]"] as string) || ""; - const usersData = await getUsers({ query, page, sort, filters }); + const usersData = await getUsers({ query, page, sort, filters, pageSize }); const rolesData = await getRoles({}); // Create a dictionary for roles by user ID diff --git a/ui/app/api/auth/callback/github/route.ts b/ui/app/api/auth/callback/github/route.ts new file mode 100644 index 0000000000..d913844644 --- /dev/null +++ b/ui/app/api/auth/callback/github/route.ts @@ -0,0 +1,67 @@ +"use server"; + +import { NextResponse } from "next/server"; + +import { signIn } from "@/auth.config"; +import { apiBaseUrl, baseUrl } from "@/lib/helper"; + +export async function GET(req: Request) { + const { searchParams } = new URL(req.url); + + const code = searchParams.get("code"); + + const params = new URLSearchParams(); + params.append("code", code || ""); + + if (!code) { + return NextResponse.json( + { error: "Authorization code is missing" }, + { status: 400 }, + ); + } + + try { + const response = await fetch(`${apiBaseUrl}/tokens/github`, { + method: "POST", + headers: { + "Content-Type": "application/x-www-form-urlencoded", + }, + body: params.toString(), + }); + + if (!response.ok) { + throw new Error("Failed to exchange code for tokens"); + } + + const data = await response.json(); + const { access, refresh } = data.data.attributes; + + try { + const result = await signIn("social-oauth", { + accessToken: access, + refreshToken: refresh, + redirect: false, + callbackUrl: `${baseUrl}/`, + }); + + if (result?.error) { + throw new Error(result.error); + } + + return NextResponse.redirect(new URL("/", baseUrl)); + } catch (error) { + // eslint-disable-next-line no-console + console.error("SignIn error:", error); + return NextResponse.redirect( + new URL("/sign-in?error=AuthenticationFailed", baseUrl), + ); + } + } catch (error) { + // eslint-disable-next-line no-console + console.error("Error in Github callback:", error); + return NextResponse.json( + { error: (error as Error).message }, + { status: 500 }, + ); + } +} diff --git a/ui/app/api/auth/callback/google/route.ts b/ui/app/api/auth/callback/google/route.ts new file mode 100644 index 0000000000..37fea85f00 --- /dev/null +++ b/ui/app/api/auth/callback/google/route.ts @@ -0,0 +1,67 @@ +"use server"; + +import { NextResponse } from "next/server"; + +import { signIn } from "@/auth.config"; +import { apiBaseUrl, baseUrl } from "@/lib/helper"; + +export async function GET(req: Request) { + const { searchParams } = new URL(req.url); + + const code = searchParams.get("code"); + + const params = new URLSearchParams(); + params.append("code", code || ""); + + if (!code) { + return NextResponse.json( + { error: "Authorization code is missing" }, + { status: 400 }, + ); + } + + try { + const response = await fetch(`${apiBaseUrl}/tokens/google`, { + method: "POST", + headers: { + "Content-Type": "application/x-www-form-urlencoded", + }, + body: params.toString(), + }); + + if (!response.ok) { + throw new Error("Failed to exchange code for tokens"); + } + + const data = await response.json(); + const { access, refresh } = data.data.attributes; + + try { + const result = await signIn("social-oauth", { + accessToken: access, + refreshToken: refresh, + redirect: false, + callbackUrl: `${baseUrl}/`, + }); + + if (result?.error) { + throw new Error(result.error); + } + + return NextResponse.redirect(new URL("/", baseUrl)); + } catch (error) { + // eslint-disable-next-line no-console + console.error("SignIn error:", error); + return NextResponse.redirect( + new URL("/sign-in?error=AuthenticationFailed", baseUrl), + ); + } + } catch (error) { + // eslint-disable-next-line no-console + console.error("Error in Google callback:", error); + return NextResponse.json( + { error: (error as Error).message }, + { status: 500 }, + ); + } +} diff --git a/ui/auth.config.ts b/ui/auth.config.ts index 2d5d223938..ed15ed4a38 100644 --- a/ui/auth.config.ts +++ b/ui/auth.config.ts @@ -4,6 +4,7 @@ import Credentials from "next-auth/providers/credentials"; import { z } from "zod"; import { getToken, getUserByMe } from "./actions/auth"; +import { apiBaseUrl } from "./lib"; interface CustomJwtPayload extends JwtPayload { user_id: string; @@ -11,8 +12,7 @@ interface CustomJwtPayload extends JwtPayload { } const refreshAccessToken = async (token: JwtPayload) => { - const keyServer = process.env.API_BASE_URL; - const url = new URL(`${keyServer}/tokens/refresh`); + const url = new URL(`${apiBaseUrl}/tokens/refresh`); const bodyData = { data: { @@ -99,13 +99,48 @@ export const authConfig = { }; }, }), + Credentials({ + id: "social-oauth", + name: "social-oauth", + credentials: { + accessToken: { label: "Access Token", type: "text" }, + refreshToken: { label: "Refresh Token", type: "text" }, + }, + async authorize(credentials) { + const accessToken = credentials?.accessToken; + + if (!accessToken) { + return null; + } + + try { + const userMeResponse = await getUserByMe(accessToken as string); + + const user = { + name: userMeResponse.name, + email: userMeResponse.email, + company: userMeResponse?.company, + dateJoined: userMeResponse.dateJoined, + }; + + return { + ...user, + accessToken: credentials.accessToken, + refreshToken: credentials.refreshToken, + }; + } catch (error) { + // eslint-disable-next-line no-console + console.error("Error in authorize:", error); + return null; + } + }, + }), ], callbacks: { authorized({ auth, request: { nextUrl } }) { const isLoggedIn = !!auth?.user; const isOnDashboard = nextUrl.pathname.startsWith("/"); const isSignUpPage = nextUrl.pathname === "/sign-up"; - //CLOUD API CHANGES // Allow access to sign-up page if (isSignUpPage) return true; diff --git a/ui/components/auth/oss/auth-form.tsx b/ui/components/auth/oss/auth-form.tsx index 38573accd7..375ff7b70b 100644 --- a/ui/components/auth/oss/auth-form.tsx +++ b/ui/components/auth/oss/auth-form.tsx @@ -1,7 +1,8 @@ "use client"; import { zodResolver } from "@hookform/resolvers/zod"; -import { Checkbox, Link } from "@nextui-org/react"; +import { Icon } from "@iconify/react"; +import { Button, Checkbox, Divider, Link, Tooltip } from "@nextui-org/react"; import { useRouter } from "next/navigation"; import { useForm } from "react-hook-form"; import { z } from "zod"; @@ -23,10 +24,18 @@ export const AuthForm = ({ type, invitationToken, isCloudEnv, + googleAuthUrl, + githubAuthUrl, + isGoogleOAuthEnabled, + isGithubOAuthEnabled, }: { type: string; invitationToken?: string | null; isCloudEnv?: boolean; + googleAuthUrl?: string; + githubAuthUrl?: string; + isGoogleOAuthEnabled?: boolean; + isGithubOAuthEnabled?: boolean; }) => { const formSchema = authFormSchema(type); const router = useRouter(); @@ -285,7 +294,7 @@ export const AuthForm = ({ - {/* {type === "sign-in" && ( + {!invitationToken && ( <>
@@ -293,29 +302,79 @@ export const AuthForm = ({
-
} - variant="bordered" + placement="right-start" + shadow="sm" + isDisabled={isGoogleOAuthEnabled} + className="w-96" > - Continue with Google - - + + + + Social Login with Github is not enabled.{" "} + + Read the docs + +
} - variant="bordered" + placement="right-start" + shadow="sm" + isDisabled={isGithubOAuthEnabled} + className="w-96" > - Continue with Github - + + + + - )} */} + )} {type === "sign-in" ? (

Need to create an account?  diff --git a/ui/components/compliance/compliance-card.tsx b/ui/components/compliance/compliance-card.tsx index 55bb064bee..56b6cec402 100644 --- a/ui/components/compliance/compliance-card.tsx +++ b/ui/components/compliance/compliance-card.tsx @@ -1,7 +1,13 @@ +"use client"; + import { Card, CardBody, Progress } from "@nextui-org/react"; import Image from "next/image"; +import { useSearchParams } from "next/navigation"; import React from "react"; +import { DownloadIconButton, toast } from "@/components/ui"; +import { downloadComplianceCsv } from "@/lib/helper"; + import { getComplianceIcon } from "../icons"; interface ComplianceCardProps { @@ -11,6 +17,8 @@ interface ComplianceCardProps { totalRequirements: number; prevPassingRequirements: number; prevTotalRequirements: number; + scanId: string; + complianceId: string; } export const ComplianceCard: React.FC = ({ @@ -18,7 +26,12 @@ export const ComplianceCard: React.FC = ({ version, passingRequirements, totalRequirements, + scanId, + complianceId, }) => { + const searchParams = useSearchParams(); + const hasRegionFilter = searchParams.has("filter[region__in]"); + const formatTitle = (title: string) => { return title.split("-").join(" "); }; @@ -27,6 +40,8 @@ export const ComplianceCard: React.FC = ({ (passingRequirements / totalRequirements) * 100, ); + // Calculates the percentage change in passing requirements compared to the previous scan. + // // const prevRatingPercentage = Math.floor( // (prevPassingRequirements / prevTotalRequirements) * 100, // ); @@ -79,13 +94,22 @@ export const ComplianceCard: React.FC = ({ }} color={getRatingColor(ratingPercentage)} /> -

+
{passingRequirements} / {totalRequirements} Passing Requirements + + + downloadComplianceCsv(scanId, complianceId, toast) + } + textTooltip="Download compliance CSV report" + isDisabled={hasRegionFilter} + /> {/* {getScanChange()} */}
diff --git a/ui/components/compliance/compliance-scan-info.tsx b/ui/components/compliance/compliance-scan-info.tsx index 9cd062259a..c4bff1d7ad 100644 --- a/ui/components/compliance/compliance-scan-info.tsx +++ b/ui/components/compliance/compliance-scan-info.tsx @@ -2,11 +2,11 @@ import { Divider } from "@nextui-org/react"; import React from "react"; import { DateWithTime, EntityInfoShort } from "@/components/ui/entities"; - +import { ProviderType } from "@/types"; interface ComplianceScanInfoProps { scan: { providerInfo: { - provider: "aws" | "azure" | "gcp" | "kubernetes"; + provider: ProviderType; alias?: string; uid?: string; }; diff --git a/ui/components/filters/custom-date-picker.tsx b/ui/components/filters/custom-date-picker.tsx index 7b39d6a6d8..cf2950d7f2 100644 --- a/ui/components/filters/custom-date-picker.tsx +++ b/ui/components/filters/custom-date-picker.tsx @@ -8,12 +8,14 @@ import { } from "@internationalized/date"; import { Button, ButtonGroup, DatePicker } from "@nextui-org/react"; import { useLocale } from "@react-aria/i18n"; -import { useRouter, useSearchParams } from "next/navigation"; +import { useSearchParams } from "next/navigation"; import React, { useCallback, useEffect, useRef } from "react"; +import { useUrlFilters } from "@/hooks/use-url-filters"; + export const CustomDatePicker = () => { - const router = useRouter(); const searchParams = useSearchParams(); + const { updateFilter } = useUrlFilters(); const [value, setValue] = React.useState(() => { const dateParam = searchParams.get("filter[inserted_at]"); @@ -28,15 +30,13 @@ export const CustomDatePicker = () => { const applyDateFilter = useCallback( (date: any) => { - const params = new URLSearchParams(searchParams.toString()); if (date) { - params.set("filter[inserted_at]", date.toString()); + updateFilter("inserted_at", date.toString()); } else { - params.delete("filter[inserted_at]"); + updateFilter("inserted_at", null); } - router.push(`?${params.toString()}`, { scroll: false }); }, - [router, searchParams], + [updateFilter], ); const initialRender = useRef(true); diff --git a/ui/components/filters/custom-provider-inputs.tsx b/ui/components/filters/custom-provider-inputs.tsx index 6587bcb7e7..d16d0d5afd 100644 --- a/ui/components/filters/custom-provider-inputs.tsx +++ b/ui/components/filters/custom-provider-inputs.tsx @@ -5,6 +5,7 @@ import { AzureProviderBadge, GCPProviderBadge, KS8ProviderBadge, + M365ProviderBadge, } from "../icons/providers-badge"; export const CustomProviderInputAWS = () => { @@ -25,6 +26,15 @@ export const CustomProviderInputAzure = () => { ); }; +export const CustomProviderInputM365 = () => { + return ( +
+ +

Microsoft 365

+
+ ); +}; + export const CustomProviderInputGCP = () => { return (
diff --git a/ui/components/filters/custom-region-selection.tsx b/ui/components/filters/custom-region-selection.tsx index adab82823b..6cc4d78c18 100644 --- a/ui/components/filters/custom-region-selection.tsx +++ b/ui/components/filters/custom-region-selection.tsx @@ -4,12 +4,10 @@ import { Select, SelectItem } from "@nextui-org/react"; import { useRouter, useSearchParams } from "next/navigation"; import React, { useCallback, useMemo } from "react"; -import { regions } from "@/lib/helper"; - export const CustomRegionSelection: React.FC = () => { const router = useRouter(); const searchParams = useSearchParams(); - + const region = "none"; // Memoize selected keys based on the URL const selectedKeys = useMemo(() => { const params = searchParams.get("filter[regions]"); @@ -44,9 +42,7 @@ export const CustomRegionSelection: React.FC = () => { applyRegionFilter(Array.from(keys) as string[]) } > - {regions.map((region) => ( - {region.label} - ))} + {region} ); }; diff --git a/ui/components/filters/custom-search-input.tsx b/ui/components/filters/custom-search-input.tsx index 14d23bd812..0048236cc9 100644 --- a/ui/components/filters/custom-search-input.tsx +++ b/ui/components/filters/custom-search-input.tsx @@ -1,26 +1,25 @@ import { Input } from "@nextui-org/react"; import debounce from "lodash.debounce"; import { SearchIcon, XCircle } from "lucide-react"; -import { useRouter, useSearchParams } from "next/navigation"; +import { useSearchParams } from "next/navigation"; import React, { useCallback, useEffect, useState } from "react"; -export const CustomSearchInput: React.FC = () => { - const router = useRouter(); - const searchParams = useSearchParams(); +import { useUrlFilters } from "@/hooks/use-url-filters"; +export const CustomSearchInput: React.FC = () => { + const searchParams = useSearchParams(); + const { updateFilter } = useUrlFilters(); const [searchQuery, setSearchQuery] = useState(""); const applySearch = useCallback( (query: string) => { - const params = new URLSearchParams(searchParams.toString()); if (query) { - params.set("filter[search]", query); + updateFilter("search", query); } else { - params.delete("filter[search]"); + updateFilter("search", null); } - router.push(`?${params.toString()}`, { scroll: false }); }, - [router, searchParams], + [updateFilter], ); const debouncedChangeHandler = useCallback( diff --git a/ui/components/filters/custom-select-provider.tsx b/ui/components/filters/custom-select-provider.tsx index 3be51b5cd1..89bd537745 100644 --- a/ui/components/filters/custom-select-provider.tsx +++ b/ui/components/filters/custom-select-provider.tsx @@ -9,6 +9,7 @@ import { CustomProviderInputAzure, CustomProviderInputGCP, CustomProviderInputKubernetes, + CustomProviderInputM365, } from "./custom-provider-inputs"; const dataInputsProvider = [ @@ -27,6 +28,11 @@ const dataInputsProvider = [ label: "Microsoft Azure", value: , }, + { + key: "m365", + label: "Microsoft 365", + value: , + }, { key: "kubernetes", label: "Kubernetes", @@ -68,6 +74,7 @@ export const CustomSelectProvider: React.FC = () => { placeholder="Select a provider" classNames={{ selectorIcon: "right-2", + label: "!z-0", }} label="Provider" labelPlacement="inside" diff --git a/ui/components/filters/data-filters.ts b/ui/components/filters/data-filters.ts index 36594ec50b..8d712bfb70 100644 --- a/ui/components/filters/data-filters.ts +++ b/ui/components/filters/data-filters.ts @@ -11,7 +11,7 @@ export const filterScans = [ { key: "provider_type__in", labelCheckboxGroup: "Cloud Provider", - values: ["aws", "azure", "gcp", "kubernetes"], + values: ["aws", "azure", "m365", "gcp", "kubernetes"], }, { key: "state__in", @@ -42,7 +42,7 @@ export const filterFindings = [ { key: "status__in", labelCheckboxGroup: "Status", - values: ["PASS", "FAIL", "MANUAL", "MUTED"], + values: ["PASS", "FAIL", "MANUAL"], }, { key: "delta__in", @@ -52,7 +52,7 @@ export const filterFindings = [ { key: "provider_type__in", labelCheckboxGroup: "Cloud Provider", - values: ["aws", "azure", "gcp", "kubernetes"], + values: ["aws", "azure", "m365", "gcp", "kubernetes"], }, // Add more filter categories as needed ]; diff --git a/ui/components/filters/filter-controls.tsx b/ui/components/filters/filter-controls.tsx index 7a41bc37d5..35dddb0b37 100644 --- a/ui/components/filters/filter-controls.tsx +++ b/ui/components/filters/filter-controls.tsx @@ -1,8 +1,9 @@ "use client"; -import { useRouter, useSearchParams } from "next/navigation"; -import React, { useCallback, useEffect, useState } from "react"; +import { useSearchParams } from "next/navigation"; +import React, { useEffect, useState } from "react"; +import { useUrlFilters } from "@/hooks/use-url-filters"; import { FilterControlsProps } from "@/types"; import { CrossIcon } from "../icons"; @@ -24,8 +25,8 @@ export const FilterControls: React.FC = ({ mutedFindings = false, customFilters, }) => { - const router = useRouter(); const searchParams = useSearchParams(); + const { clearAllFilters } = useUrlFilters(); const [showClearButton, setShowClearButton] = useState(false); useEffect(() => { @@ -35,16 +36,6 @@ export const FilterControls: React.FC = ({ setShowClearButton(hasFilters); }, [searchParams]); - const clearAllFilters = useCallback(() => { - const params = new URLSearchParams(searchParams.toString()); - Array.from(params.keys()).forEach((key) => { - if (key.startsWith("filter[") || key === "sort") { - params.delete(key); - } - }); - router.push(`?${params.toString()}`, { scroll: false }); - }, [router, searchParams]); - return (
diff --git a/ui/components/findings/index.ts b/ui/components/findings/index.ts new file mode 100644 index 0000000000..2e2bece9f7 --- /dev/null +++ b/ui/components/findings/index.ts @@ -0,0 +1 @@ +export * from "./muted"; diff --git a/ui/components/findings/muted.tsx b/ui/components/findings/muted.tsx new file mode 100644 index 0000000000..23c1422cf6 --- /dev/null +++ b/ui/components/findings/muted.tsx @@ -0,0 +1,19 @@ +import { Tooltip } from "@nextui-org/react"; + +import { MutedIcon } from "../icons"; + +interface MutedProps { + isMuted: boolean; +} + +export const Muted = ({ isMuted }: MutedProps) => { + if (isMuted === false) return null; + + return ( + +
+ +
+
+ ); +}; diff --git a/ui/components/findings/table/column-findings.tsx b/ui/components/findings/table/column-findings.tsx index f4560f3396..8bfeac0a7f 100644 --- a/ui/components/findings/table/column-findings.tsx +++ b/ui/components/findings/table/column-findings.tsx @@ -12,7 +12,10 @@ import { SeverityBadge, StatusFindingBadge, } from "@/components/ui/table"; -import { FindingProps } from "@/types"; +import { FindingProps, ProviderType } from "@/types"; + +import { Muted } from "../muted"; +import { DeltaIndicator } from "./delta-indicator"; const getFindingsData = (row: { original: FindingProps }) => { return row.original; @@ -42,21 +45,23 @@ const getProviderData = ( ); }; -// const getScanData = ( -// row: { original: FindingProps }, -// field: keyof FindingProps["relationships"]["scan"]["attributes"], -// ) => { -// return ( -// row.original.relationships?.scan?.attributes?.[field] || -// `No ${field} found in scan` -// ); -// }; - const FindingDetailsCell = ({ row }: { row: any }) => { const searchParams = useSearchParams(); const findingId = searchParams.get("id"); const isOpen = findingId === row.original.id; + const handleOpenChange = (open: boolean) => { + const params = new URLSearchParams(searchParams); + + if (open) { + params.set("id", row.original.id); + } else { + params.delete("id"); + } + + window.history.pushState({}, "", `?${params.toString()}`); + }; + return (
{ title="Finding Details" description="View the finding details" defaultOpen={isOpen} + onOpenChange={handleOpenChange} > [] = [ ), cell: ({ row }) => { const { checktitle } = getFindingsMetadata(row); + const { + attributes: { muted }, + } = getFindingsData(row); + const { delta } = row.original.attributes; + return ( -

- {checktitle} -

+
+
+ {(delta === "new" || delta === "changed") && ( + + )} +

+ {checktitle} +

+
+ + + +
); }, }, @@ -124,7 +145,7 @@ export const ColumnFindings: ColumnDef[] = [ attributes: { status }, } = getFindingsData(row); - return ; + return ; }, }, { @@ -169,7 +190,7 @@ export const ColumnFindings: ColumnDef[] = [ const region = getResourceData(row, "region"); return ( -
+
{typeof region === "string" ? region : "Invalid region"}
); @@ -180,7 +201,7 @@ export const ColumnFindings: ColumnDef[] = [ header: "Service", cell: ({ row }) => { const { servicename } = getFindingsMetadata(row); - return

{servicename}

; + return

{servicename}

; }, }, { @@ -194,7 +215,7 @@ export const ColumnFindings: ColumnDef[] = [ return ( <> diff --git a/ui/components/findings/table/data-table-row-details.tsx b/ui/components/findings/table/data-table-row-details.tsx index 9f43d8b165..54f0f96eeb 100644 --- a/ui/components/findings/table/data-table-row-details.tsx +++ b/ui/components/findings/table/data-table-row-details.tsx @@ -1,40 +1,14 @@ "use client"; -// import { usePathname, useRouter, useSearchParams } from "next/navigation"; -// import { useEffect } from "react"; - import { FindingProps } from "@/types/components"; import { FindingDetail } from "./finding-detail"; export const DataTableRowDetails = ({ - // entityId, findingDetails, }: { entityId: string; findingDetails: FindingProps; }) => { - // const router = useRouter(); - // const pathname = usePathname(); - // const searchParams = useSearchParams(); - - // useEffect(() => { - // if (entityId) { - // const params = new URLSearchParams(searchParams.toString()); - // params.set("id", entityId); - // router.push(`${pathname}?${params.toString()}`, { scroll: false }); - // } - - // return () => { - // if (entityId) { - // const cleanupParams = new URLSearchParams(searchParams.toString()); - // cleanupParams.delete("id"); - // router.push(`${pathname}?${cleanupParams.toString()}`, { - // scroll: false, - // }); - // } - // }; - // }, [entityId, pathname, router, searchParams]); - return ; }; diff --git a/ui/components/findings/table/delta-indicator.tsx b/ui/components/findings/table/delta-indicator.tsx new file mode 100644 index 0000000000..86f89b02a6 --- /dev/null +++ b/ui/components/findings/table/delta-indicator.tsx @@ -0,0 +1,46 @@ +import { Tooltip } from "@nextui-org/react"; + +import { CustomButton } from "@/components/ui/custom/custom-button"; +import { cn } from "@/lib/utils"; + +interface DeltaIndicatorProps { + delta: string; +} + +export const DeltaIndicator = ({ delta }: DeltaIndicatorProps) => { + return ( + + + {delta === "new" + ? "New finding." + : "Status changed since the previous scan."} + + + Learn more + +
+ } + > +
+ + ); +}; diff --git a/ui/components/findings/table/finding-detail.tsx b/ui/components/findings/table/finding-detail.tsx index 82706b2afd..e232b2a648 100644 --- a/ui/components/findings/table/finding-detail.tsx +++ b/ui/components/findings/table/finding-detail.tsx @@ -3,14 +3,15 @@ import { Snippet } from "@nextui-org/react"; import Link from "next/link"; +import { CodeSnippet } from "@/components/ui/code-snippet/code-snippet"; import { InfoField } from "@/components/ui/entities"; import { DateWithTime } from "@/components/ui/entities/date-with-time"; -import { - getProviderLogo, - type ProviderType, -} from "@/components/ui/entities/get-provider-logo"; +import { getProviderLogo } from "@/components/ui/entities/get-provider-logo"; import { SeverityBadge } from "@/components/ui/table/severity-badge"; -import { FindingProps } from "@/types"; +import { FindingProps, ProviderType } from "@/types"; + +import { Muted } from "../muted"; +import { DeltaIndicator } from "./delta-indicator"; const renderValue = (value: string | null | undefined) => { return value && value.trim() !== "" ? value : "-"; @@ -66,29 +67,30 @@ export const FindingDetail = ({ {renderValue(attributes.check_metadata.checktitle)}
+
+ -
- {renderValue(attributes.status)} +
+ {renderValue(attributes.status)} +
{/* Check Metadata */}
-
+
-
- {getProviderLogo( - attributes.check_metadata.provider as ProviderType, - )} -
+ {getProviderLogo( + attributes.check_metadata.provider as ProviderType, + )}
{attributes.check_metadata.servicename} @@ -97,21 +99,31 @@ export const FindingDetail = ({ -
- -
- - - {attributes.check_id} - - +
+ + {attributes.delta} +
+ + )}
+ + + + + + + + + {attributes.status === "FAIL" && ( @@ -275,16 +287,12 @@ export const FindingDetail = ({ - - - + {scan.scheduled_at && ( + + + + )}
- - {scan.scheduled_at && ( - - - - )}
{/* Provider Details section */} @@ -299,7 +307,9 @@ export const FindingDetail = ({
- {provider.alias} + {provider.alias && ( + {provider.alias} + )} = ({ }; export const ScheduleIcon: React.FC = ({ - size, + size = 24, height, width, ...props @@ -768,8 +768,9 @@ export const ScheduleIcon: React.FC = ({ return ( = ({ ); +export const ManualIcon: React.FC = ({ + size = 24, + width, + height, + ...props +}) => ( + +); + export const SpinnerIcon: React.FC = ({ size = 24, width, @@ -970,13 +995,54 @@ export const AzureIcon: React.FC = ({ return ( - + + + ); +}; + +export const M365Icon: React.FC = ({ + size = 24, + width, + height, + strokeWidth = 2, + ...props +}) => { + return ( + + + + ); }; @@ -996,7 +1062,58 @@ export const GCPIcon: React.FC = ({ fill="currentColor" {...props} > - + + + ); +}; + +export const MutedIcon: React.FC = ({ + size, + height, + width, + ...props +}) => { + return ( + + ); +}; + +export const KubernetesIcon: React.FC = ({ + size = 24, + width, + height, + ...props +}) => { + return ( + + ); }; diff --git a/ui/components/icons/providers-badge/AWSProviderBadge.tsx b/ui/components/icons/providers-badge/aws-provider-badge.tsx similarity index 100% rename from ui/components/icons/providers-badge/AWSProviderBadge.tsx rename to ui/components/icons/providers-badge/aws-provider-badge.tsx diff --git a/ui/components/icons/providers-badge/AzureProviderBadge.tsx b/ui/components/icons/providers-badge/azure-provider-badge.tsx similarity index 100% rename from ui/components/icons/providers-badge/AzureProviderBadge.tsx rename to ui/components/icons/providers-badge/azure-provider-badge.tsx diff --git a/ui/components/icons/providers-badge/GCPProviderBadge.tsx b/ui/components/icons/providers-badge/gcp-provider-badge.tsx similarity index 100% rename from ui/components/icons/providers-badge/GCPProviderBadge.tsx rename to ui/components/icons/providers-badge/gcp-provider-badge.tsx diff --git a/ui/components/icons/providers-badge/index.ts b/ui/components/icons/providers-badge/index.ts index 8aa68424a0..86641d82ad 100644 --- a/ui/components/icons/providers-badge/index.ts +++ b/ui/components/icons/providers-badge/index.ts @@ -1,4 +1,5 @@ -export * from "./AWSProviderBadge"; -export * from "./AzureProviderBadge"; -export * from "./GCPProviderBadge"; -export * from "./KS8ProviderBadge"; +export * from "./aws-provider-badge"; +export * from "./azure-provider-badge"; +export * from "./gcp-provider-badge"; +export * from "./ks8-provider-badge"; +export * from "./m365-provider-badge"; diff --git a/ui/components/icons/providers-badge/KS8ProviderBadge.tsx b/ui/components/icons/providers-badge/ks8-provider-badge.tsx similarity index 100% rename from ui/components/icons/providers-badge/KS8ProviderBadge.tsx rename to ui/components/icons/providers-badge/ks8-provider-badge.tsx diff --git a/ui/components/icons/providers-badge/m365-provider-badge.tsx b/ui/components/icons/providers-badge/m365-provider-badge.tsx new file mode 100644 index 0000000000..ed5d077dcf --- /dev/null +++ b/ui/components/icons/providers-badge/m365-provider-badge.tsx @@ -0,0 +1,126 @@ +import * as React from "react"; + +import { IconSvgProps } from "@/types"; + +export const M365ProviderBadge: React.FC = ({ + size, + width, + height, + ...props +}) => ( + +); diff --git a/ui/components/overview/new-findings-table/table/column-new-findings-to-date.tsx b/ui/components/overview/new-findings-table/table/column-new-findings-to-date.tsx index 87f2f28784..7d04fa9722 100644 --- a/ui/components/overview/new-findings-table/table/column-new-findings-to-date.tsx +++ b/ui/components/overview/new-findings-table/table/column-new-findings-to-date.tsx @@ -4,11 +4,14 @@ import { ColumnDef } from "@tanstack/react-table"; import { useSearchParams } from "next/navigation"; import { DataTableRowDetails } from "@/components/findings/table"; +import { DeltaIndicator } from "@/components/findings/table/delta-indicator"; import { InfoIcon } from "@/components/icons"; import { DateWithTime, EntityInfoShort } from "@/components/ui/entities"; import { TriggerSheet } from "@/components/ui/sheet"; import { SeverityBadge, StatusFindingBadge } from "@/components/ui/table"; -import { FindingProps } from "@/types"; +import { FindingProps, ProviderType } from "@/types"; + +import { Muted } from "../../../findings/muted"; const getFindingsData = (row: { original: FindingProps }) => { return row.original; @@ -71,10 +74,24 @@ export const ColumnNewFindingsToDate: ColumnDef[] = [ header: "Finding", cell: ({ row }) => { const { checktitle } = getFindingsMetadata(row); + const { + attributes: { muted }, + } = getFindingsData(row); + const { delta } = row.original.attributes; return ( -

- {checktitle} -

+
+
+ {(delta === "new" || delta === "changed") && ( + + )} +

+ {checktitle} +

+
+ + + +
); }, }, @@ -145,7 +162,7 @@ export const ColumnNewFindingsToDate: ColumnDef[] = [ return ( <> diff --git a/ui/components/overview/provider-overview/provider-overview.tsx b/ui/components/overview/provider-overview/provider-overview.tsx index 48333c5fbc..41d518eb8a 100644 --- a/ui/components/overview/provider-overview/provider-overview.tsx +++ b/ui/components/overview/provider-overview/provider-overview.tsx @@ -8,6 +8,7 @@ import { AzureProviderBadge, GCPProviderBadge, KS8ProviderBadge, + M365ProviderBadge, } from "@/components/icons/providers-badge"; import { CustomButton } from "@/components/ui/custom/custom-button"; import { ProviderOverviewProps } from "@/types"; @@ -26,6 +27,8 @@ export const ProvidersOverview = ({ return ; case "azure": return ; + case "m365": + return ; case "gcp": return ; case "kubernetes": @@ -38,6 +41,7 @@ export const ProvidersOverview = ({ const providers = [ { id: "aws", name: "AWS" }, { id: "azure", name: "Azure" }, + { id: "m365", name: "M365" }, { id: "gcp", name: "GCP" }, { id: "kubernetes", name: "Kubernetes" }, ]; diff --git a/ui/components/providers/provider-info.tsx b/ui/components/providers/provider-info.tsx index 9eea6cdf74..8798d68f38 100644 --- a/ui/components/providers/provider-info.tsx +++ b/ui/components/providers/provider-info.tsx @@ -1,11 +1,13 @@ +import { Tooltip } from "@nextui-org/react"; import React from "react"; +import { ProviderType } from "@/types"; + import { ConnectionFalse, ConnectionPending, ConnectionTrue } from "../icons"; import { getProviderLogo } from "../ui/entities"; - interface ProviderInfoProps { connected: boolean | null; - provider: "aws" | "azure" | "gcp" | "kubernetes"; + provider: ProviderType; providerAlias: string; providerUID?: string; } @@ -20,21 +22,27 @@ export const ProviderInfo: React.FC = ({ switch (connected) { case true: return ( -
- -
+ +
+ +
+
); case false: return ( -
- -
+ +
+ +
+
); case null: return ( -
- -
+ +
+ +
+
); default: return ; diff --git a/ui/components/providers/radio-group-provider.tsx b/ui/components/providers/radio-group-provider.tsx index e376e69ff4..ec77a148db 100644 --- a/ui/components/providers/radio-group-provider.tsx +++ b/ui/components/providers/radio-group-provider.tsx @@ -7,9 +7,13 @@ import { z } from "zod"; import { addProviderFormSchema } from "@/types"; -import { AWSProviderBadge, AzureProviderBadge } from "../icons/providers-badge"; -import { GCPProviderBadge } from "../icons/providers-badge/GCPProviderBadge"; -import { KS8ProviderBadge } from "../icons/providers-badge/KS8ProviderBadge"; +import { + AWSProviderBadge, + AzureProviderBadge, + GCPProviderBadge, + KS8ProviderBadge, + M365ProviderBadge, +} from "../icons/providers-badge"; import { CustomRadio } from "../ui/custom"; import { FormMessage } from "../ui/form"; @@ -55,6 +59,12 @@ export const RadioGroupProvider: React.FC = ({ Microsoft Azure
+ +
+ + Microsoft 365 +
+
diff --git a/ui/components/providers/table/column-providers.tsx b/ui/components/providers/table/column-providers.tsx index f31c199920..f16585e34b 100644 --- a/ui/components/providers/table/column-providers.tsx +++ b/ui/components/providers/table/column-providers.tsx @@ -27,7 +27,7 @@ export const ColumnProviders: ColumnDef[] = [ { accessorKey: "account", header: ({ column }) => ( - + ), cell: ({ row }) => { const { @@ -64,7 +64,11 @@ export const ColumnProviders: ColumnDef[] = [ { accessorKey: "uid", header: ({ column }) => ( - + ), cell: ({ row }) => { const { diff --git a/ui/components/providers/table/data-table-row-actions.tsx b/ui/components/providers/table/data-table-row-actions.tsx index 3a7cfc37f1..b56f96f88a 100644 --- a/ui/components/providers/table/data-table-row-actions.tsx +++ b/ui/components/providers/table/data-table-row-actions.tsx @@ -37,6 +37,7 @@ export function DataTableRowActions({ const router = useRouter(); const [isEditOpen, setIsEditOpen] = useState(false); const [isDeleteOpen, setIsDeleteOpen] = useState(false); + const [loading, setLoading] = useState(false); const providerId = (row.original as { id: string }).id; const providerType = (row.original as any).attributes?.provider; const providerAlias = (row.original as any).attributes?.alias; @@ -44,11 +45,15 @@ export function DataTableRowActions({ (row.original as any).relationships?.secret?.data?.id || null; const handleTestConnection = async () => { + setLoading(true); const formData = new FormData(); formData.append("providerId", providerId); await checkConnectionProvider(formData); + setLoading(false); }; + const hasSecret = (row.original as any).relationships?.secret?.data; + return ( <> ({ - + } onPress={() => router.push( - `/providers/update-credentials?type=${providerType}&id=${providerId}${providerSecretId ? `&secretId=${providerSecretId}` : ""}`, + `/providers/${hasSecret ? "update" : "add"}-credentials?type=${providerType}&id=${providerId}${providerSecretId ? `&secretId=${providerSecretId}` : ""}`, ) } + closeOnSelect={true} > - Update Credentials + {hasSecret ? "Update Credentials" : "Add Credentials"} } onPress={handleTestConnection} + isDisabled={!hasSecret || loading} + closeOnSelect={false} > - Test Connection + {loading ? "Testing..." : "Test Connection"} ({ textValue="Edit Provider" startContent={} onPress={() => setIsEditOpen(true)} + closeOnSelect={true} > Edit Provider Alias @@ -133,6 +147,7 @@ export function DataTableRowActions({ /> } onPress={() => setIsDeleteOpen(true)} + closeOnSelect={true} > Delete Provider diff --git a/ui/components/providers/workflow/credentials-role-helper.tsx b/ui/components/providers/workflow/credentials-role-helper.tsx index 896fd657a7..855a3e6fab 100644 --- a/ui/components/providers/workflow/credentials-role-helper.tsx +++ b/ui/components/providers/workflow/credentials-role-helper.tsx @@ -1,9 +1,11 @@ "use client"; import { Snippet } from "@nextui-org/react"; -import Link from "next/link"; import { useSession } from "next-auth/react"; +import { CustomButton } from "@/components/ui/custom"; +import { getAWSCredentialsTemplateLinks } from "@/lib"; + export const CredentialsRoleHelper = () => { const { data: session } = useSession(); @@ -12,24 +14,50 @@ export const CredentialsRoleHelper = () => {

A new read-only IAM role must be manually created. +

+ + + Use the following AWS CloudFormation Quick Link to deploy the IAM Role + + +
+
+ + or + +
+
+

Use one of the following templates to create the IAM role:

+
- CloudFormation Template - - + Terraform Code - +
+

The External ID will also be required:

diff --git a/ui/components/providers/workflow/forms/connect-account-form.tsx b/ui/components/providers/workflow/forms/connect-account-form.tsx index 5866189627..a33ebd786b 100644 --- a/ui/components/providers/workflow/forms/connect-account-form.tsx +++ b/ui/components/providers/workflow/forms/connect-account-form.tsx @@ -9,17 +9,13 @@ import * as z from "zod"; import { useToast } from "@/components/ui"; import { CustomButton, CustomInput } from "@/components/ui/custom"; -import { - getProviderLogo, - getProviderName, - ProviderType, -} from "@/components/ui/entities"; import { Form } from "@/components/ui/form"; +import { ProviderType } from "@/types"; import { addProvider } from "../../../../actions/providers/providers"; import { addProviderFormSchema, ApiError } from "../../../../types"; import { RadioGroupProvider } from "../../radio-group-provider"; - +import { ProviderTitleDocs } from "../provider-title-docs"; export type FormValues = z.infer; // Helper function for labels and placeholders @@ -28,22 +24,27 @@ const getProviderFieldDetails = (providerType?: string) => { case "aws": return { label: "Account ID", - placeholder: "123456...", + placeholder: "e.g. 123456789012", }; case "gcp": return { label: "Project ID", - placeholder: "project_id...", + placeholder: "e.g. my-gcp-project", }; case "azure": return { label: "Subscription ID", - placeholder: "fc94207a-d396-4a14-a7fd-12a...", + placeholder: "e.g. fc94207a-d396-4a14-a7fd-12ab34cd56ef", }; case "kubernetes": return { label: "Kubernetes Context", - placeholder: "context_name....", + placeholder: "e.g. my-cluster-context", + }; + case "m365": + return { + label: "Domain ID", + placeholder: "e.g. your-domain.onmicrosoft.com", }; default: return { @@ -170,14 +171,7 @@ export const ConnectAccountForm = () => { {/* Step 2: UID, alias, and credentials (if AWS) */} {prevStep === 2 && ( <> -
- {providerType && getProviderLogo(providerType as ProviderType)} - - {providerType - ? getProviderName(providerType as ProviderType) - : "Unknown Provider"} - -
+ >; - -interface LaunchScanFormProps { - searchParams: { type: string; id: string }; - providerData: { - data: { - type: string; - id: string; - attributes: ProviderProps["attributes"]; - }; - }; -} - -export const LaunchScanForm = ({ - searchParams, - providerData, -}: LaunchScanFormProps) => { - const providerType = searchParams.type; - const providerId = searchParams.id; - - const [apiErrorMessage, setApiErrorMessage] = useState(null); - const router = useRouter(); - - const formSchema = launchScanFormSchema(); - - const form = useForm({ - resolver: zodResolver(formSchema), - defaultValues: { - providerId, - providerType, - scannerArgs: { - checksToExecute: [], - }, - }, - }); - - // const isLoading = form.formState.isSubmitting; - - const onSubmitClient = async (values: FormValues) => { - const formData = new FormData(); - formData.append("providerId", values.providerId); - - // Generate default scan name using provider type and current date - const date = new Date(); - const month = (date.getMonth() + 1).toString().padStart(2, "0"); - const day = date.getDate().toString().padStart(2, "0"); - const year = date.getFullYear(); - const defaultScanName = `${providerType}:${month}/${day}/${year}`; - - formData.append("scanName", defaultScanName); - - try { - const data = await scanOnDemand(formData); - - if (data.error) { - setApiErrorMessage(data.error); - form.setError("providerId", { - type: "server", - message: data.error, - }); - } else { - router.push("/scans"); - } - } catch (error) { - form.setError("providerId", { - type: "server", - message: "An unexpected error occurred. Please try again.", - }); - } - }; - - return ( -
- -
-
Scan started
-
- The scan has just started. From now on, a new scan will be launched - every 24 hours, starting from this moment. -
-
- - {apiErrorMessage && ( -
-

{apiErrorMessage.toLowerCase()}

-
- )} - - - - - - - {/*
- } - isDisabled={true} - > - Schedule - - } - > - {isLoading ? <>Loading : Start now} - -
*/} -
- } - > - Go to Scans - -
- - - ); -}; diff --git a/ui/components/providers/workflow/forms/test-connection-form.tsx b/ui/components/providers/workflow/forms/test-connection-form.tsx index 57dfb2cf42..6fdc6e2215 100644 --- a/ui/components/providers/workflow/forms/test-connection-form.tsx +++ b/ui/components/providers/workflow/forms/test-connection-form.tsx @@ -20,6 +20,7 @@ import { useToast } from "@/components/ui"; import { CustomButton } from "@/components/ui/custom"; import { Form } from "@/components/ui/form"; import { checkTaskStatus } from "@/lib/helper"; +import { ProviderType } from "@/types"; import { ApiError, testConnectionFormSchema } from "@/types"; import { ProviderInfo } from "../.."; @@ -41,7 +42,7 @@ export const TestConnectionForm = ({ connected: boolean | null; last_checked_at: string | null; }; - provider: "aws" | "azure" | "gcp" | "kubernetes"; + provider: ProviderType; alias: string; scanner_args: Record; }; @@ -280,7 +281,7 @@ export const TestConnectionForm = ({ wrapper: "checkbox-update", }} > - Run a one-time scan (disable daily schedule). + Run a single scan (no recurring schedule). )} diff --git a/ui/components/providers/workflow/forms/update-via-credentials-form.tsx b/ui/components/providers/workflow/forms/update-via-credentials-form.tsx index c327965591..9c751eb399 100644 --- a/ui/components/providers/workflow/forms/update-via-credentials-form.tsx +++ b/ui/components/providers/workflow/forms/update-via-credentials-form.tsx @@ -1,6 +1,7 @@ "use client"; import { zodResolver } from "@hookform/resolvers/zod"; +import { Divider } from "@nextui-org/react"; import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react"; import { useRouter, useSearchParams } from "next/navigation"; import { Control, useForm } from "react-hook-form"; @@ -9,10 +10,8 @@ import * as z from "zod"; import { updateCredentialsProvider } from "@/actions/providers/providers"; import { useToast } from "@/components/ui"; import { CustomButton } from "@/components/ui/custom"; -import { getProviderLogo } from "@/components/ui/entities"; -import { getProviderName } from "@/components/ui/entities"; -import { ProviderType } from "@/components/ui/entities"; import { Form } from "@/components/ui/form"; +import { ProviderType } from "@/types"; import { addCredentialsFormSchema, ApiError, @@ -20,12 +19,15 @@ import { AzureCredentials, GCPCredentials, KubernetesCredentials, + M365Credentials, } from "@/types"; +import { ProviderTitleDocs } from "../provider-title-docs"; import { AWScredentialsForm } from "./via-credentials/aws-credentials-form"; import { AzureCredentialsForm } from "./via-credentials/azure-credentials-form"; import { GCPcredentialsForm } from "./via-credentials/gcp-credentials-form"; import { KubernetesCredentialsForm } from "./via-credentials/k8s-credentials-form"; +import { M365CredentialsForm } from "./via-credentials/m365-credentials-form"; type CredentialsFormSchema = z.infer< ReturnType @@ -35,6 +37,7 @@ type CredentialsFormSchema = z.infer< type FormType = CredentialsFormSchema & AWSCredentials & AzureCredentials & + M365Credentials & GCPCredentials & KubernetesCredentials; @@ -77,17 +80,25 @@ export const UpdateViaCredentialsForm = ({ client_secret: "", tenant_id: "", } - : providerType === "gcp" + : providerType === "m365" ? { client_id: "", client_secret: "", - refresh_token: "", + tenant_id: "", + user: "", + encrypted_password: "", } - : providerType === "kubernetes" + : providerType === "gcp" ? { - kubeconfig_content: "", + client_id: "", + client_secret: "", + refresh_token: "", } - : {}), + : providerType === "kubernetes" + ? { + kubeconfig_content: "", + } + : {}), }, }); @@ -136,6 +147,18 @@ export const UpdateViaCredentialsForm = ({ message: errorMessage, }); break; + case "/data/attributes/secret/user": + form.setError("user", { + type: "server", + message: errorMessage, + }); + break; + case "/data/attributes/secret/encrypted_password": + form.setError("encrypted_password", { + type: "server", + message: errorMessage, + }); + break; case "/data/attributes/secret/tenant_id": form.setError("tenant_id", { type: "server", @@ -178,14 +201,9 @@ export const UpdateViaCredentialsForm = ({ -
- {providerType && getProviderLogo(providerType as ProviderType)} - - {providerType - ? getProviderName(providerType as ProviderType) - : "Unknown Provider"} - -
+ + + {providerType === "aws" && ( } /> )} + {providerType === "m365" && ( + } + /> + )} {providerType === "gcp" && ( } diff --git a/ui/components/providers/workflow/forms/update-via-role-form.tsx b/ui/components/providers/workflow/forms/update-via-role-form.tsx index 85e00e3cb1..c0d9c24917 100644 --- a/ui/components/providers/workflow/forms/update-via-role-form.tsx +++ b/ui/components/providers/workflow/forms/update-via-role-form.tsx @@ -54,7 +54,7 @@ export const UpdateViaRoleForm = ({ aws_secret_access_key: "", aws_session_token: "", role_session_name: "", - session_duration: 3600, + session_duration: "3600", }), }, }); diff --git a/ui/components/providers/workflow/forms/via-credentials-form.tsx b/ui/components/providers/workflow/forms/via-credentials-form.tsx index 6c0bd0fe37..38b3a98a86 100644 --- a/ui/components/providers/workflow/forms/via-credentials-form.tsx +++ b/ui/components/providers/workflow/forms/via-credentials-form.tsx @@ -1,6 +1,7 @@ "use client"; import { zodResolver } from "@hookform/resolvers/zod"; +import { Divider } from "@nextui-org/divider"; import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react"; import { useRouter, useSearchParams } from "next/navigation"; import { Control, useForm } from "react-hook-form"; @@ -9,10 +10,8 @@ import * as z from "zod"; import { addCredentialsProvider } from "@/actions/providers/providers"; import { useToast } from "@/components/ui"; import { CustomButton } from "@/components/ui/custom"; -import { getProviderLogo } from "@/components/ui/entities"; -import { getProviderName } from "@/components/ui/entities"; -import { ProviderType } from "@/components/ui/entities"; import { Form } from "@/components/ui/form"; +import { ProviderType } from "@/types"; import { addCredentialsFormSchema, ApiError, @@ -20,12 +19,15 @@ import { AzureCredentials, GCPCredentials, KubernetesCredentials, + M365Credentials, } from "@/types"; +import { ProviderTitleDocs } from "../provider-title-docs"; import { AWScredentialsForm } from "./via-credentials/aws-credentials-form"; import { AzureCredentialsForm } from "./via-credentials/azure-credentials-form"; import { GCPcredentialsForm } from "./via-credentials/gcp-credentials-form"; import { KubernetesCredentialsForm } from "./via-credentials/k8s-credentials-form"; +import { M365CredentialsForm } from "./via-credentials/m365-credentials-form"; type CredentialsFormSchema = z.infer< ReturnType @@ -36,7 +38,8 @@ type FormType = CredentialsFormSchema & AWSCredentials & AzureCredentials & GCPCredentials & - KubernetesCredentials; + KubernetesCredentials & + M365Credentials; export const ViaCredentialsForm = ({ searchParams, @@ -76,17 +79,25 @@ export const ViaCredentialsForm = ({ client_secret: "", tenant_id: "", } - : providerType === "gcp" + : providerType === "m365" ? { client_id: "", client_secret: "", - refresh_token: "", + tenant_id: "", + user: "", + encrypted_password: "", } - : providerType === "kubernetes" + : providerType === "gcp" ? { - kubeconfig_content: "", + client_id: "", + client_secret: "", + refresh_token: "", } - : {}), + : providerType === "kubernetes" + ? { + kubeconfig_content: "", + } + : {}), }, }); @@ -135,6 +146,18 @@ export const ViaCredentialsForm = ({ message: errorMessage, }); break; + case "/data/attributes/secret/user": + form.setError("user", { + type: "server", + message: errorMessage, + }); + break; + case "/data/attributes/secret/encrypted_password": + form.setError("encrypted_password", { + type: "server", + message: errorMessage, + }); + break; case "/data/attributes/secret/tenant_id": form.setError("tenant_id", { type: "server", @@ -177,14 +200,9 @@ export const ViaCredentialsForm = ({ -
- {providerType && getProviderLogo(providerType as ProviderType)} - - {providerType - ? getProviderName(providerType as ProviderType) - : "Unknown Provider"} - -
+ + + {providerType === "aws" && ( } /> )} + {providerType === "m365" && ( + } + /> + )} {providerType === "gcp" && ( } diff --git a/ui/components/providers/workflow/forms/via-credentials/aws-credentials-form.tsx b/ui/components/providers/workflow/forms/via-credentials/aws-credentials-form.tsx index dd889a9333..a85ee1d049 100644 --- a/ui/components/providers/workflow/forms/via-credentials/aws-credentials-form.tsx +++ b/ui/components/providers/workflow/forms/via-credentials/aws-credentials-form.tsx @@ -10,11 +10,11 @@ export const AWScredentialsForm = ({ }) => { return ( <> -
-
+
+
Connect via Credentials
-
+
Please provide the information for your AWS credentials.
diff --git a/ui/components/providers/workflow/forms/via-credentials/azure-credentials-form.tsx b/ui/components/providers/workflow/forms/via-credentials/azure-credentials-form.tsx index b78642b8d2..47a9bb6fa4 100644 --- a/ui/components/providers/workflow/forms/via-credentials/azure-credentials-form.tsx +++ b/ui/components/providers/workflow/forms/via-credentials/azure-credentials-form.tsx @@ -10,11 +10,11 @@ export const AzureCredentialsForm = ({ }) => { return ( <> -
-
+
+
Connect via Credentials
-
+
Please provide the information for your Azure credentials.
diff --git a/ui/components/providers/workflow/forms/via-credentials/gcp-credentials-form.tsx b/ui/components/providers/workflow/forms/via-credentials/gcp-credentials-form.tsx index 784f173f49..3e3ecefb6b 100644 --- a/ui/components/providers/workflow/forms/via-credentials/gcp-credentials-form.tsx +++ b/ui/components/providers/workflow/forms/via-credentials/gcp-credentials-form.tsx @@ -10,11 +10,11 @@ export const GCPcredentialsForm = ({ }) => { return ( <> -
-
+
+
Connect via Credentials
-
+
Please provide the information for your GCP credentials.
diff --git a/ui/components/providers/workflow/forms/via-credentials/index.ts b/ui/components/providers/workflow/forms/via-credentials/index.ts index d3198a1d0e..88bf5587f0 100644 --- a/ui/components/providers/workflow/forms/via-credentials/index.ts +++ b/ui/components/providers/workflow/forms/via-credentials/index.ts @@ -2,3 +2,4 @@ export * from "./aws-credentials-form"; export * from "./azure-credentials-form"; export * from "./gcp-credentials-form"; export * from "./k8s-credentials-form"; +export * from "./m365-credentials-form"; diff --git a/ui/components/providers/workflow/forms/via-credentials/k8s-credentials-form.tsx b/ui/components/providers/workflow/forms/via-credentials/k8s-credentials-form.tsx index 3e6caeca88..f589afb8f4 100644 --- a/ui/components/providers/workflow/forms/via-credentials/k8s-credentials-form.tsx +++ b/ui/components/providers/workflow/forms/via-credentials/k8s-credentials-form.tsx @@ -10,11 +10,11 @@ export const KubernetesCredentialsForm = ({ }) => { return ( <> -
-
+
+
Connect via Credentials
-
+
Please provide the kubeconfig content for your Kubernetes credentials.
diff --git a/ui/components/providers/workflow/forms/via-credentials/m365-credentials-form.tsx b/ui/components/providers/workflow/forms/via-credentials/m365-credentials-form.tsx new file mode 100644 index 0000000000..1ba6024ffc --- /dev/null +++ b/ui/components/providers/workflow/forms/via-credentials/m365-credentials-form.tsx @@ -0,0 +1,78 @@ +import { Control } from "react-hook-form"; + +import { CustomInput } from "@/components/ui/custom"; +import { M365Credentials } from "@/types"; + +export const M365CredentialsForm = ({ + control, +}: { + control: Control; +}) => { + return ( + <> +
+
+ Connect via Credentials +
+
+ Please provide the information for your Microsoft 365 credentials. +
+
+ + + + + + + ); +}; diff --git a/ui/components/providers/workflow/forms/via-role-form.tsx b/ui/components/providers/workflow/forms/via-role-form.tsx index 917f049c7c..3bed8d3af7 100644 --- a/ui/components/providers/workflow/forms/via-role-form.tsx +++ b/ui/components/providers/workflow/forms/via-role-form.tsx @@ -59,7 +59,7 @@ export const ViaRoleForm = ({ aws_secret_access_key: "", aws_session_token: "", role_session_name: "", - session_duration: 3600, + session_duration: "3600", } : {}), }, diff --git a/ui/components/providers/workflow/forms/via-role/aws-role-form.tsx b/ui/components/providers/workflow/forms/via-role/aws-role-form.tsx index 318c463958..c9994284d9 100644 --- a/ui/components/providers/workflow/forms/via-role/aws-role-form.tsx +++ b/ui/components/providers/workflow/forms/via-role/aws-role-form.tsx @@ -1,4 +1,4 @@ -import { Select, SelectItem, Spacer } from "@nextui-org/react"; +import { Divider, Select, SelectItem, Spacer } from "@nextui-org/react"; import { Control, UseFormSetValue, useWatch } from "react-hook-form"; import { CustomInput } from "@/components/ui/custom"; @@ -23,11 +23,11 @@ export const AWSCredentialsRoleForm = ({ return ( <> -
-
+
+
Connect assuming IAM Role
-
+
Please provide the information for your AWS credentials.
@@ -89,10 +89,11 @@ export const AWSCredentialsRoleForm = ({ /> )} + + Assume Role - Assume Role { + return ( +
+
+ {providerType && getProviderLogo(providerType as ProviderType)} + + {providerType + ? getProviderName(providerType as ProviderType) + : "Unknown Provider"} + +
+
+

+ {getProviderHelpText(providerType as string).text} +

+ + Read the docs + +
+
+ ); +}; diff --git a/ui/components/providers/workflow/workflow-add-provider.tsx b/ui/components/providers/workflow/workflow-add-provider.tsx index abc5c0b78f..edad4beed8 100644 --- a/ui/components/providers/workflow/workflow-add-provider.tsx +++ b/ui/components/providers/workflow/workflow-add-provider.tsx @@ -8,21 +8,21 @@ import { VerticalSteps } from "./vertical-steps"; const steps = [ { - title: "Add your cloud provider", + title: "Choose your Cloud Provider", description: - "Select the cloud provider for the account to connect and specify whether to use an IAM role or credentials for access.", + "Select the cloud provider you wish to connect and specify your preferred authentication method from the supported options.", href: "/providers/connect-account", }, { - title: "Add credentials to your cloud provider", + title: "Enter Authentication Details", description: - "Provide the credentials required to connect to the cloud provider.", + "Provide the necessary credentials to establish a secure connection to your selected cloud provider.", href: "/providers/add-credentials", }, { - title: "Check connection and launch scan", + title: "Verify Connection & Start Scan", description: - "Verify the connection to ensure that the provided credentials are valid for accessing the cloud provider and initiating a scan.", + "Ensure your credentials are correct and start scanning your cloud environment.", href: "/providers/test-connection", }, ]; @@ -39,11 +39,11 @@ export const WorkflowAddProvider = () => { return (

- Add a cloud provider + Add a Cloud Provider

- Complete the steps to configure the cloud provider, enabling the launch - of the first scan once completed. + Complete these steps to configure your cloud provider and initiate your + first scan.

{ - const formSchema = onDemandScanFormSchema(); - const form = useForm>({ + const formSchema = z.object({ + ...onDemandScanFormSchema().shape, + scanName: z + .string() + .min(3, "Must have at least 3 characters") + .or(z.literal("")) + .optional(), + }); + + const form = useForm({ resolver: zodResolver(formSchema), defaultValues: { providerId: "", @@ -77,25 +85,25 @@ export const LaunchScanWorkflow = ({
-
-
- -
- - {form.watch("providerId") && ( - <> +
+ +
+ + {form.watch("providerId") && ( + <> +
-
- } - > - {isLoading ? <>Loading : Start now} - - form.reset()} - className="w-fit border-gray-200 bg-transparent" - ariaLabel="Clear form" - variant="bordered" - size="sm" - radius="sm" - > - Cancel - -
+ } + > + {isLoading ? <>Loading : Start now} + + form.reset()} + className="w-fit border-gray-200 bg-transparent" + ariaLabel="Clear form" + variant="bordered" + size="sm" + radius="sm" + > + Cancel +
- - )} - - {/* +
+ + )} +
+ {/*
{form.watch("providerId") && ( @@ -169,7 +176,6 @@ export const LaunchScanWorkflow = ({ )}
*/} -
); diff --git a/ui/components/scans/link-to-findings-from-scan.tsx b/ui/components/scans/link-to-findings-from-scan.tsx index e20996c54b..6f94773cee 100644 --- a/ui/components/scans/link-to-findings-from-scan.tsx +++ b/ui/components/scans/link-to-findings-from-scan.tsx @@ -4,16 +4,21 @@ import { CustomButton } from "@/components/ui/custom"; interface LinkToFindingsProps { scanId?: string; + isDisabled?: boolean; } -export const LinkToFindingsFromScan = ({ scanId }: LinkToFindingsProps) => { +export const LinkToFindingsFromScan = ({ + scanId, + isDisabled, +}: LinkToFindingsProps) => { return ( See Findings diff --git a/ui/components/scans/table/scan-detail.tsx b/ui/components/scans/table/scan-detail.tsx index 2db2bb20fc..f45662b9db 100644 --- a/ui/components/scans/table/scan-detail.tsx +++ b/ui/components/scans/table/scan-detail.tsx @@ -89,7 +89,7 @@ export const ScanDetail = ({ - {renderValue(taskDetails?.attributes.task_args.scan_id)} + {scanDetails.id} diff --git a/ui/components/scans/table/scans/column-get-scans.tsx b/ui/components/scans/table/scans/column-get-scans.tsx index 6fbbcdcc3e..9082618eb8 100644 --- a/ui/components/scans/table/scans/column-get-scans.tsx +++ b/ui/components/scans/table/scans/column-get-scans.tsx @@ -1,15 +1,19 @@ "use client"; +import { Tooltip } from "@nextui-org/react"; import { ColumnDef } from "@tanstack/react-table"; import { useSearchParams } from "next/navigation"; import { InfoIcon } from "@/components/icons"; +import { DownloadIconButton, toast } from "@/components/ui"; import { DateWithTime, EntityInfoShort } from "@/components/ui/entities"; import { TriggerSheet } from "@/components/ui/sheet"; import { DataTableColumnHeader, StatusBadge } from "@/components/ui/table"; -import { ScanProps } from "@/types"; +import { downloadScanZip } from "@/lib/helper"; +import { ProviderType, ScanProps } from "@/types"; import { LinkToFindingsFromScan } from "../../link-to-findings-from-scan"; +import { TriggerIcon } from "../../trigger-icon"; import { DataTableRowActions } from "./data-table-row-actions"; import { DataTableRowDetails } from "./data-table-row-details"; @@ -56,7 +60,7 @@ export const ColumnGetScans: ColumnDef[] = [ return ( @@ -101,9 +105,44 @@ export const ColumnGetScans: ColumnDef[] = [ header: "Findings", cell: ({ row }) => { const { id } = getScanData(row); - return ; + const scanState = row.original.attributes?.state; + return ( + + ); }, }, + { + id: "download", + header: () => ( +
+

Download

+ +
+ +
+
+
+ ), + cell: ({ row }) => { + const scanId = row.original.id; + const scanState = row.original.attributes?.state; + + return ( + downloadScanZip(scanId, toast)} + isDisabled={scanState !== "completed"} + /> + ); + }, + }, + // { // accessorKey: "scanner_args", // header: "Scanner Args", @@ -121,7 +160,11 @@ export const ColumnGetScans: ColumnDef[] = [ const { attributes: { unique_resource_count }, } = getScanData(row); - return

{unique_resource_count}

; + return ( +
+ {unique_resource_count} +
+ ); }, }, { @@ -163,7 +206,11 @@ export const ColumnGetScans: ColumnDef[] = [ const { attributes: { trigger }, } = getScanData(row); - return

{trigger}

; + return ( +
+ +
+ ); }, }, { @@ -179,8 +226,13 @@ export const ColumnGetScans: ColumnDef[] = [ if (!name || name.length === 0) { return -; } - - return {name}; + return ( +
+ + {name === "Daily scheduled scan" ? "scheduled scan" : name} + +
+ ); }, }, { diff --git a/ui/components/scans/table/scans/data-table-row-actions.tsx b/ui/components/scans/table/scans/data-table-row-actions.tsx index 46c1111bd3..ad61a174e8 100644 --- a/ui/components/scans/table/scans/data-table-row-actions.tsx +++ b/ui/components/scans/table/scans/data-table-row-actions.tsx @@ -16,10 +16,10 @@ import { Row } from "@tanstack/react-table"; import { DownloadIcon } from "lucide-react"; import { useState } from "react"; -import { getExportsZip } from "@/actions/scans"; import { VerticalDotsIcon } from "@/components/icons"; import { useToast } from "@/components/ui"; import { CustomAlertModal } from "@/components/ui/custom"; +import { downloadScanZip } from "@/lib/helper"; import { EditScanForm } from "../../forms"; @@ -38,41 +38,6 @@ export function DataTableRowActions({ const scanName = (row.original as any).attributes?.name; const scanState = (row.original as any).attributes?.state; - const handleExportZip = async () => { - const result = await getExportsZip(scanId); - - if (result?.success && result?.data) { - // Convert base64 to blob - const binaryString = window.atob(result.data); - const bytes = new Uint8Array(binaryString.length); - for (let i = 0; i < binaryString.length; i++) { - bytes[i] = binaryString.charCodeAt(i); - } - const blob = new Blob([bytes], { type: "application/zip" }); - - // Create download link - const url = window.URL.createObjectURL(blob); - const a = document.createElement("a"); - a.href = url; - a.download = result.filename; - document.body.appendChild(a); - a.click(); - document.body.removeChild(a); - window.URL.revokeObjectURL(url); - - toast({ - title: "Download Complete", - description: "Your scan report has been downloaded successfully.", - }); - } else if (result?.error) { - toast({ - variant: "destructive", - title: "Download Failed", - description: result.error, - }); - } - }; - return ( <> ({ color="default" variant="flat" > - + } - onPress={handleExportZip} + onPress={() => downloadScanZip(scanId, toast)} isDisabled={scanState !== "completed"} > Download .zip diff --git a/ui/components/scans/trigger-icon.tsx b/ui/components/scans/trigger-icon.tsx new file mode 100644 index 0000000000..4176a1e5da --- /dev/null +++ b/ui/components/scans/trigger-icon.tsx @@ -0,0 +1,25 @@ +import { Tooltip } from "@nextui-org/react"; + +import { ManualIcon, ScheduleIcon } from "@/components/icons"; + +interface TriggerIconProps { + trigger: "scheduled" | "manual"; + iconSize?: number; +} + +export function TriggerIcon({ trigger, iconSize = 24 }: TriggerIconProps) { + return ( + +
+ {trigger === "scheduled" ? ( + + ) : ( + + )} +
+
+ ); +} diff --git a/ui/components/ui/accordion/Accordion.tsx b/ui/components/ui/accordion/Accordion.tsx new file mode 100644 index 0000000000..aa029a121c --- /dev/null +++ b/ui/components/ui/accordion/Accordion.tsx @@ -0,0 +1,109 @@ +"use client"; + +import { + Accordion as NextUIAccordion, + AccordionItem, + Selection, +} from "@nextui-org/react"; +import { ChevronDown } from "lucide-react"; +import React, { ReactNode, useCallback, useState } from "react"; + +import { cn } from "@/lib/utils"; + +export interface AccordionItemProps { + key: string; + title: ReactNode; + subtitle?: ReactNode; + content: ReactNode; + items?: AccordionItemProps[]; + isDisabled?: boolean; +} + +export interface AccordionProps { + items: AccordionItemProps[]; + variant?: "light" | "shadow" | "bordered" | "splitted"; + className?: string; + defaultExpandedKeys?: string[]; + selectionMode?: "single" | "multiple"; + isCompact?: boolean; + showDivider?: boolean; +} + +const AccordionContent = ({ + content, + items, +}: { + content: ReactNode; + items?: AccordionItemProps[]; +}) => { + return ( +
+ {content} + {items && items.length > 0 && ( +
+ +
+ )} +
+ ); +}; + +export const Accordion = ({ + items, + variant = "light", + className, + defaultExpandedKeys = [], + selectionMode = "single", + isCompact = false, + showDivider = true, +}: AccordionProps) => { + const [expandedKeys, setExpandedKeys] = useState( + new Set(defaultExpandedKeys), + ); + + const handleSelectionChange = useCallback((keys: Selection) => { + setExpandedKeys(keys); + }, []); + + return ( + + {items.map((item, index) => ( + } + classNames={{ + base: index === 0 || index === 1 ? "my-2" : "my-1", + title: "text-sm font-medium", + subtitle: "text-xs text-gray-500", + trigger: + "p-2 rounded-lg data-[hover=true]:bg-gray-50 dark:data-[hover=true]:bg-gray-800/50", + content: "p-2", + }} + > + + + ))} + + ); +}; + +Accordion.displayName = "Accordion"; diff --git a/ui/components/ui/chart/horizontal-split-chart.tsx b/ui/components/ui/chart/horizontal-split-chart.tsx new file mode 100644 index 0000000000..b3b4c783a3 --- /dev/null +++ b/ui/components/ui/chart/horizontal-split-chart.tsx @@ -0,0 +1,241 @@ +"use client"; + +import { Tooltip } from "@nextui-org/react"; +import * as React from "react"; +import { useEffect, useState } from "react"; + +import { cn } from "@/lib/utils"; + +interface HorizontalSplitBarProps { + /** + * First value (left) + */ + valueA: number; + /** + * Second value (right) + */ + valueB: number; + /** + * Additional CSS classes for the main container + */ + className?: string; + /** + * Color for value A (Tailwind classes) + * @default "bg-system-success" + */ + colorA?: string; + /** + * Color for value B (Tailwind classes) + * @default "bg-system-error" + */ + colorB?: string; + /** + * Value format suffix (like "%", "$", etc.) + * Will be appended to the values when displayed + * @example "%" + */ + valueSuffix?: string; + /** + * Bar height + * @default "h-4" + */ + barHeight?: string; + /** + * Color for the empty state (when both values are 0) + * @default "bg-gray-300" + */ + emptyColor?: string; + /** + * Text to display when there is no data + * @default "No data available" + */ + emptyText?: string; + /** + * Minimum width for small values (in pixels) + * @default 25 + */ + minBarWidth?: number; + /** + * Custom tooltip content for value A (optional) + * If not provided, the formatted value will be used + */ + tooltipContentA?: string; + /** + * Custom tooltip content for value B (optional) + * If not provided, the formatted value will be used + */ + tooltipContentB?: string; + /** + * Text color for labels + * @default "text-gray-700" + */ + labelColor?: string; +} + +/** + * Horizontal split bar chart component that displays two values + * with bars growing from a central separator. + * + * @example + * ```tsx + * + * ``` + */ +export const HorizontalSplitBar = ({ + valueA, + valueB, + className, + colorA = "bg-system-success", + colorB = "bg-system-error", + valueSuffix = "", + barHeight = "h-4", + emptyColor = "bg-gray-300", + emptyText = "No data available", + minBarWidth = 25, + tooltipContentA, + tooltipContentB, + labelColor = "text-gray-700", +}: HorizontalSplitBarProps) => { + // Reference to the container to measure its width + const containerRef = React.useRef(null); + const [maxContainerWidth, setMaxContainerWidth] = useState(0); + + // Effect to measure the container width + useEffect(() => { + if (containerRef.current) { + const updateWidth = () => { + const containerWidth = containerRef.current?.clientWidth || 0; + setMaxContainerWidth(containerWidth); + }; + + updateWidth(); + + window.addEventListener("resize", updateWidth); + return () => window.removeEventListener("resize", updateWidth); + } + }, []); + + // Ensure values are positive + const valA = Math.max(0, valueA); + const valB = Math.max(0, valueB); + + const hasNoData = valA === 0 && valB === 0; + const formattedValueA = `${valA}${valueSuffix}`; + const formattedValueB = `${valB}${valueSuffix}`; + + if (hasNoData) { + return ( +
+
+
+ + {emptyText} + +
+
+
+ ); + } + + const availableWidth = Math.max(0, maxContainerWidth); + const halfWidth = availableWidth / 2; + const separatorWidth = 1; + + let rawWidthA = valA; + let rawWidthB = valB; + + // Determine if we need to scale to fit in available space + const maxSideWidth = halfWidth - separatorWidth / 2; + const needsScaling = rawWidthA > maxSideWidth || rawWidthB > maxSideWidth; + + if (needsScaling) { + // Calculate scale factor based on the largest value + const maxRawWidth = Math.max(rawWidthA, rawWidthB); + const scaleFactor = maxSideWidth / maxRawWidth; + + // Apply the scale factor to both sides + rawWidthA = rawWidthA * scaleFactor; + rawWidthB = rawWidthB * scaleFactor; + } + + // Apply minimum width if needed + const barWidthA = Math.max(rawWidthA, valA > 0 ? minBarWidth : 0); + const barWidthB = Math.max(rawWidthB, valB > 0 ? minBarWidth : 0); + + return ( +
+
+
+ {/* Left label */} +
+ {valA > 0 ? formattedValueA : "0"} +
+ {/* Left bar */} + {valA > 0 && ( + +
+ + )} +
+ + {/* Central separator */} +
+ +
+ {/* Right bar */} + {valB > 0 && ( + +
+ + )} + {/* Right label */} +
+ {valB > 0 ? formattedValueB : "0"} +
+
+
+
+ ); +}; + +export default HorizontalSplitBar; diff --git a/ui/components/ui/code-snippet/code-snippet.tsx b/ui/components/ui/code-snippet/code-snippet.tsx new file mode 100644 index 0000000000..d2415d4fa9 --- /dev/null +++ b/ui/components/ui/code-snippet/code-snippet.tsx @@ -0,0 +1,13 @@ +import { Snippet } from "@nextui-org/react"; + +export const CodeSnippet = ({ value }: { value: string }) => ( + + {value} + +); diff --git a/ui/components/ui/content-layout/content-layout.tsx b/ui/components/ui/content-layout/content-layout.tsx index b073c1c477..f1fdb13a57 100644 --- a/ui/components/ui/content-layout/content-layout.tsx +++ b/ui/components/ui/content-layout/content-layout.tsx @@ -1,6 +1,6 @@ import { Suspense, use } from "react"; -import { getProfileInfo } from "@/actions/users/users"; +import { getUserInfo } from "@/actions/users/users"; import { Navbar } from "../nav-bar/navbar"; import { SkeletonContentLayout } from "./skeleton-content-layout"; @@ -11,7 +11,7 @@ interface ContentLayoutProps { } export function ContentLayout({ title, icon, children }: ContentLayoutProps) { - const user = use(getProfileInfo()); + const user = use(getUserInfo()); return ( <> diff --git a/ui/components/ui/custom/custom-dropdown-filter.tsx b/ui/components/ui/custom/custom-dropdown-filter.tsx index 8fc213f75f..ee18bab9bc 100644 --- a/ui/components/ui/custom/custom-dropdown-filter.tsx +++ b/ui/components/ui/custom/custom-dropdown-filter.tsx @@ -11,12 +11,15 @@ import { ScrollShadow, } from "@nextui-org/react"; import { XCircle } from "lucide-react"; -import { useRouter, useSearchParams } from "next/navigation"; +import { useSearchParams } from "next/navigation"; import React, { useCallback, useEffect, useMemo, useState } from "react"; import { PlusCircleIcon } from "@/components/icons"; +import { useUrlFilters } from "@/hooks/use-url-filters"; import { CustomDropdownFilterProps } from "@/types"; +import { EntityInfoShort } from "../entities"; + const filterSelectedClass = "inline-flex items-center border py-1 text-xs transition-colors border-transparent bg-default-500 text-secondary-foreground hover:bg-default-500/80 rounded-md px-2 font-normal"; @@ -24,8 +27,8 @@ export const CustomDropdownFilter: React.FC = ({ filter, onFilterChange, }) => { - const router = useRouter(); const searchParams = useSearchParams(); + const { clearFilter } = useUrlFilters(); const [groupSelected, setGroupSelected] = useState(new Set()); const [pendingClearFilter, setPendingClearFilter] = useState( null, @@ -114,13 +117,11 @@ export const CustomDropdownFilter: React.FC = ({ // Execute the update in the router after the render useEffect(() => { - if (pendingClearFilter) { - const params = new URLSearchParams(searchParams.toString()); - params.delete(`filter[${pendingClearFilter}]`); - router.push(`?${params.toString()}`, { scroll: false }); + if (pendingClearFilter && filter) { + clearFilter(pendingClearFilter); setPendingClearFilter(null); // Reset the state } - }, [pendingClearFilter, searchParams, router]); + }, [pendingClearFilter, clearFilter, filter]); return (
@@ -193,18 +194,35 @@ export const CustomDropdownFilter: React.FC = ({ hideScrollBar className="flex max-h-96 max-w-56 flex-col gap-y-2 py-2" > - {memoizedFilterValues.map((value) => ( - - {value} - - ))} + {memoizedFilterValues.map((value) => { + // Find the corresponding entity from valueLabelMapping + const matchingEntry = filter.valueLabelMapping?.find( + (entry) => entry[value], + ); + const entity = matchingEntry?.[value]; + + return ( + + {entity ? ( + + ) : ( + value + )} + + ); + })}
diff --git a/ui/components/ui/custom/custom-input.tsx b/ui/components/ui/custom/custom-input.tsx index 3979c459f3..5b76ef6fda 100644 --- a/ui/components/ui/custom/custom-input.tsx +++ b/ui/components/ui/custom/custom-input.tsx @@ -120,7 +120,7 @@ export const CustomInput = ({ /> {showFormMessage && ( - + )} )} diff --git a/ui/components/ui/download-icon-button/download-icon-button.tsx b/ui/components/ui/download-icon-button/download-icon-button.tsx new file mode 100644 index 0000000000..364ae0fe39 --- /dev/null +++ b/ui/components/ui/download-icon-button/download-icon-button.tsx @@ -0,0 +1,40 @@ +"use client"; + +import { Tooltip } from "@nextui-org/react"; +import { DownloadIcon } from "lucide-react"; + +import { CustomButton } from "../custom/custom-button"; + +interface DownloadIconButtonProps { + paramId: string; + onDownload: (paramId: string) => void; + ariaLabel?: string; + isDisabled?: boolean; + textTooltip?: string; +} + +export const DownloadIconButton = ({ + paramId, + onDownload, + ariaLabel = "Download report", + isDisabled, + textTooltip = "Download report", +}: DownloadIconButtonProps) => { + return ( +
+ + onDownload(paramId)} + className="p-0 text-default-500 hover:text-primary disabled:opacity-30" + isIconOnly + ariaLabel={ariaLabel} + size="sm" + > + + + +
+ ); +}; diff --git a/ui/components/ui/entities/date-with-time.tsx b/ui/components/ui/entities/date-with-time.tsx index 17600762c1..e04c3e1cb6 100644 --- a/ui/components/ui/entities/date-with-time.tsx +++ b/ui/components/ui/entities/date-with-time.tsx @@ -23,7 +23,7 @@ export const DateWithTime: React.FC = ({ } const formattedDate = format(date, "MMM dd, yyyy"); - const formattedTime = format(date, "p 'UTC'"); + const formattedTime = format(date, "p"); return (
@@ -32,7 +32,7 @@ export const DateWithTime: React.FC = ({ > {formattedDate} {showTime && ( - {formattedTime} + {formattedTime} )}
diff --git a/ui/components/ui/entities/entity-info-short.tsx b/ui/components/ui/entities/entity-info-short.tsx index fcfbe84ae2..c1c957642b 100644 --- a/ui/components/ui/entities/entity-info-short.tsx +++ b/ui/components/ui/entities/entity-info-short.tsx @@ -1,10 +1,12 @@ import React from "react"; +import { ProviderType } from "@/types"; + import { getProviderLogo } from "./get-provider-logo"; import { SnippetId } from "./snippet-id"; interface EntityInfoProps { - cloudProvider: "aws" | "azure" | "gcp" | "kubernetes"; + cloudProvider: ProviderType; entityAlias?: string; entityId?: string; hideCopyButton?: boolean; diff --git a/ui/components/ui/entities/get-provider-logo.tsx b/ui/components/ui/entities/get-provider-logo.tsx index e4bf4d0a62..17ab559988 100644 --- a/ui/components/ui/entities/get-provider-logo.tsx +++ b/ui/components/ui/entities/get-provider-logo.tsx @@ -5,9 +5,9 @@ import { AzureProviderBadge, GCPProviderBadge, KS8ProviderBadge, + M365ProviderBadge, } from "@/components/icons/providers-badge"; - -export type ProviderType = "aws" | "azure" | "gcp" | "kubernetes"; +import { ProviderType } from "@/types"; export const getProviderLogo = (provider: ProviderType) => { switch (provider) { @@ -19,6 +19,8 @@ export const getProviderLogo = (provider: ProviderType) => { return ; case "kubernetes": return ; + case "m365": + return ; default: return null; } @@ -34,6 +36,8 @@ export const getProviderName = (provider: ProviderType): string => { return "Google Cloud Platform"; case "kubernetes": return "Kubernetes"; + case "m365": + return "Microsoft 365"; default: return "Unknown Provider"; } diff --git a/ui/components/ui/entities/info-field.tsx b/ui/components/ui/entities/info-field.tsx index 6be2b9e486..0607efdf7b 100644 --- a/ui/components/ui/entities/info-field.tsx +++ b/ui/components/ui/entities/info-field.tsx @@ -1,39 +1,55 @@ +import { Tooltip } from "@nextui-org/react"; import clsx from "clsx"; +import { InfoIcon } from "lucide-react"; interface InfoFieldProps { label: string; children: React.ReactNode; variant?: "default" | "simple"; className?: string; + tooltipContent?: string; } + +
+ +
+
; + export const InfoField = ({ label, children, variant = "default", + tooltipContent, className, }: InfoFieldProps) => { - if (variant === "simple") { - return ( -
- - {label} - -
- {children} -
-
- ); - } - return (
- {label} + + {label} + {tooltipContent && ( + +
+ +
+
+ )} +
-
- {children} -
+ + {variant === "simple" ? ( +
+ {children} +
+ ) : ( +
+ {children} +
+ )}
); }; diff --git a/ui/components/ui/index.ts b/ui/components/ui/index.ts index e9675ed837..6fb4555d80 100644 --- a/ui/components/ui/index.ts +++ b/ui/components/ui/index.ts @@ -1,9 +1,11 @@ +export * from "./accordion/Accordion"; export * from "./action-card/ActionCard"; export * from "./alert/Alert"; export * from "./alert-dialog/AlertDialog"; export * from "./chart/Chart"; export * from "./content-layout/content-layout"; export * from "./dialog/dialog"; +export * from "./download-icon-button/download-icon-button"; export * from "./dropdown/Dropdown"; export * from "./headers/navigation-header"; export * from "./label/Label"; diff --git a/ui/components/ui/sheet/trigger-sheet.tsx b/ui/components/ui/sheet/trigger-sheet.tsx index 5d5fc45ce6..3a5e233c1d 100644 --- a/ui/components/ui/sheet/trigger-sheet.tsx +++ b/ui/components/ui/sheet/trigger-sheet.tsx @@ -13,6 +13,7 @@ interface TriggerSheetProps { description: string; children: React.ReactNode; defaultOpen?: boolean; + onOpenChange?: (open: boolean) => void; } export function TriggerSheet({ @@ -21,9 +22,10 @@ export function TriggerSheet({ description, children, defaultOpen = false, + onOpenChange, }: TriggerSheetProps) { return ( - + {triggerComponent} diff --git a/ui/components/ui/sidebar/menu.tsx b/ui/components/ui/sidebar/menu.tsx index 154dd65684..f8c1188f10 100644 --- a/ui/components/ui/sidebar/menu.tsx +++ b/ui/components/ui/sidebar/menu.tsx @@ -1,11 +1,12 @@ "use client"; +import { Divider } from "@nextui-org/react"; import { Ellipsis, LogOut } from "lucide-react"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { logOut } from "@/actions/auth"; -import { AddIcon } from "@/components/icons"; +import { AddIcon, InfoIcon } from "@/components/icons"; import { CollapseMenuButton } from "@/components/ui/sidebar/collapse-menu-button"; import { Tooltip, @@ -167,9 +168,25 @@ export const Menu = ({ isOpen }: { isOpen: boolean }) => {
- - {process.env.NEXT_PUBLIC_PROWLER_RELEASE_VERSION} - +
+ {process.env.NEXT_PUBLIC_PROWLER_RELEASE_VERSION} + {process.env.NEXT_PUBLIC_IS_CLOUD_ENV === "true" && ( + <> + + + + + Service Status + + + + )} +
); }; diff --git a/ui/components/ui/table/data-table-filter-custom.tsx b/ui/components/ui/table/data-table-filter-custom.tsx index 3ef0c0d330..655297659c 100644 --- a/ui/components/ui/table/data-table-filter-custom.tsx +++ b/ui/components/ui/table/data-table-filter-custom.tsx @@ -1,11 +1,11 @@ "use client"; -import { useRouter, useSearchParams } from "next/navigation"; import React, { useState } from "react"; import { useCallback } from "react"; import { CustomFilterIcon } from "@/components/icons"; import { CustomButton, CustomDropdownFilter } from "@/components/ui/custom"; +import { useUrlFilters } from "@/hooks/use-url-filters"; import { FilterOption } from "@/types"; export interface DataTableFilterCustomProps { @@ -17,24 +17,14 @@ export const DataTableFilterCustom = ({ filters, defaultOpen = false, }: DataTableFilterCustomProps) => { - const router = useRouter(); - const searchParams = useSearchParams(); + const { updateFilter } = useUrlFilters(); const [showFilters, setShowFilters] = useState(defaultOpen); const pushDropdownFilter = useCallback( (key: string, values: string[]) => { - const params = new URLSearchParams(searchParams); - const filterKey = `filter[${key}]`; - - if (values.length === 0) { - params.delete(filterKey); - } else { - params.set(filterKey, values.join(",")); - } - - router.push(`?${params.toString()}`); + updateFilter(key, values.length > 0 ? values : null); }, - [router, searchParams], + [updateFilter], ); return ( diff --git a/ui/components/ui/table/data-table-pagination.tsx b/ui/components/ui/table/data-table-pagination.tsx index c81e272100..a7773925e9 100644 --- a/ui/components/ui/table/data-table-pagination.tsx +++ b/ui/components/ui/table/data-table-pagination.tsx @@ -7,23 +7,36 @@ import { DoubleArrowRightIcon, } from "@radix-ui/react-icons"; import Link from "next/link"; -import { usePathname, useSearchParams } from "next/navigation"; +import { usePathname, useRouter, useSearchParams } from "next/navigation"; +import { useState } from "react"; import { getPaginationInfo } from "@/lib"; import { MetaDataProps } from "@/types"; +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from "../select/Select"; + interface DataTablePaginationProps { - pageSizeOptions?: number[]; metadata?: MetaDataProps; } export function DataTablePagination({ metadata }: DataTablePaginationProps) { const pathname = usePathname(); const searchParams = useSearchParams(); + const router = useRouter(); + const initialPageSize = searchParams.get("pageSize") ?? "10"; + + const [selectedPageSize, setSelectedPageSize] = useState(initialPageSize); if (!metadata) return null; - const { currentPage, totalPages, totalEntries } = getPaginationInfo(metadata); + const { currentPage, totalPages, totalEntries, itemsPerPageOptions } = + getPaginationInfo(metadata); const createPageUrl = (pageNumber: number | string) => { const params = new URLSearchParams(searchParams); @@ -44,6 +57,38 @@ export function DataTablePagination({ metadata }: DataTablePaginationProps) { {totalEntries} entries in Total.
+ {/* Rows per page selector */} +
+

Rows per page

+ +
Page {currentPage} of {totalPages}
diff --git a/ui/components/ui/table/data-table.tsx b/ui/components/ui/table/data-table.tsx index 4577f1bf08..b759e4316d 100644 --- a/ui/components/ui/table/data-table.tsx +++ b/ui/components/ui/table/data-table.tsx @@ -48,6 +48,7 @@ export function DataTable({ getSortedRowModel: getSortedRowModel(), onColumnFiltersChange: setColumnFilters, getFilteredRowModel: getFilteredRowModel(), + manualPagination: true, state: { sorting, columnFilters, diff --git a/ui/components/ui/table/severity-badge.tsx b/ui/components/ui/table/severity-badge.tsx index d15c8a098a..3c03b8d99b 100644 --- a/ui/components/ui/table/severity-badge.tsx +++ b/ui/components/ui/table/severity-badge.tsx @@ -45,7 +45,7 @@ export const SeverityBadge = ({ severity }: { severity: Severity }) => { color={color} endContent={getSeverityIcon(severity)} > - {severity} + {severity} ); }; diff --git a/ui/components/ui/table/status-finding-badge.tsx b/ui/components/ui/table/status-finding-badge.tsx index 3dfc6e2613..b9532d3b5d 100644 --- a/ui/components/ui/table/status-finding-badge.tsx +++ b/ui/components/ui/table/status-finding-badge.tsx @@ -25,13 +25,15 @@ export const StatusFindingBadge = ({ return ( - {status} + + {status.charAt(0).toUpperCase() + status.slice(1).toLowerCase()} + ); }; diff --git a/ui/components/ui/user-nav/user-nav.tsx b/ui/components/ui/user-nav/user-nav.tsx index b5023a9ece..58ff0b9abf 100644 --- a/ui/components/ui/user-nav/user-nav.tsx +++ b/ui/components/ui/user-nav/user-nav.tsx @@ -77,7 +77,7 @@ export const UserNav = ({ user }: { user?: UserProfileProps }) => { - + Account diff --git a/ui/components/users/profile/index.ts b/ui/components/users/profile/index.ts index 07aeca9b89..02cdd56c9d 100644 --- a/ui/components/users/profile/index.ts +++ b/ui/components/users/profile/index.ts @@ -1,2 +1,5 @@ -export * from "./skeleton-user-info"; -export * from "./user-info"; +export * from "./membership-item"; +export * from "./memberships-card"; +export * from "./role-item"; +export * from "./roles-card"; +export * from "./user-basic-info-card"; diff --git a/ui/components/users/profile/membership-item.tsx b/ui/components/users/profile/membership-item.tsx new file mode 100644 index 0000000000..f9d28a9f7d --- /dev/null +++ b/ui/components/users/profile/membership-item.tsx @@ -0,0 +1,27 @@ +import { Chip } from "@nextui-org/react"; + +import { DateWithTime } from "@/components/ui/entities"; +import { MembershipDetailData } from "@/types/users/users"; + +export const MembershipItem = ({ + membership, + tenantName, +}: { + membership: MembershipDetailData; + tenantName: string; +}) => ( +
+
+
+ + {membership.attributes.role} + +

{tenantName}

+
+
+
+ Joined on: + +
+
+); diff --git a/ui/components/users/profile/memberships-card.tsx b/ui/components/users/profile/memberships-card.tsx new file mode 100644 index 0000000000..c752882156 --- /dev/null +++ b/ui/components/users/profile/memberships-card.tsx @@ -0,0 +1,44 @@ +import { Card, CardBody, CardHeader } from "@nextui-org/react"; + +import { MembershipDetailData, TenantDetailData } from "@/types/users/users"; + +import { MembershipItem } from "./membership-item"; + +export const MembershipsCard = ({ + memberships, + tenantsMap, +}: { + memberships: MembershipDetailData[]; + tenantsMap: Record; +}) => { + return ( + + +
+

Organizations

+

+ Organizations this user is associated with +

+
+
+ + {memberships.length === 0 ? ( +
No memberships found.
+ ) : ( +
+ {memberships.map((membership) => ( + + ))} +
+ )} +
+
+ ); +}; diff --git a/ui/components/users/profile/role-item.tsx b/ui/components/users/profile/role-item.tsx new file mode 100644 index 0000000000..27c056843c --- /dev/null +++ b/ui/components/users/profile/role-item.tsx @@ -0,0 +1,94 @@ +"use client"; + +import { Chip } from "@nextui-org/react"; +import { Ban, Check } from "lucide-react"; +import { useState } from "react"; + +import { CustomButton } from "@/components/ui/custom/custom-button"; +import { getRolePermissions } from "@/lib/permissions"; +import { RoleData, RoleDetail } from "@/types/users/users"; + +interface PermissionItemProps { + enabled: boolean; + label: string; +} + +export const PermissionIcon = ({ enabled }: { enabled: boolean }) => ( + + {enabled ? : } + +); + +const PermissionItem = ({ enabled, label }: PermissionItemProps) => ( +
+ + {label} +
+); + +export const RoleItem = ({ + role, + roleDetail, +}: { + role: RoleData; + roleDetail?: RoleDetail; +}) => { + const [isExpanded, setIsExpanded] = useState(false); + + if (!roleDetail) { + return ( + + {role.id} + + ); + } + + const { attributes } = roleDetail; + const roleName = attributes?.name || role.id; + const permissionState = attributes?.permission_state || ""; + const detailsId = `role-details-${role.id}`; + + const permissions = getRolePermissions(attributes); + + return ( +
+
+
+ + {roleName} + + + {permissionState} + +
+ + setIsExpanded(!isExpanded)} + className="text-blue-500" + color="transparent" + size="sm" + > + {isExpanded ? "Hide details" : "Show details"} + +
+ + {isExpanded && ( +
+
+ {permissions.map(({ key, label, enabled }) => ( + + ))} +
+
+ )} +
+ ); +}; diff --git a/ui/components/users/profile/roles-card.tsx b/ui/components/users/profile/roles-card.tsx new file mode 100644 index 0000000000..5135c41528 --- /dev/null +++ b/ui/components/users/profile/roles-card.tsx @@ -0,0 +1,41 @@ +import { Card, CardBody, CardHeader } from "@nextui-org/react"; + +import { RoleData, RoleDetail } from "@/types/users/users"; + +import { RoleItem } from "./role-item"; + +export const RolesCard = ({ + roles, + roleDetails, +}: { + roles: RoleData[]; + roleDetails: Record; +}) => { + return ( + + +
+

Active roles

+

+ Roles assigned to this user account +

+
+
+ + {roles.length === 0 ? ( +
No roles assigned.
+ ) : ( +
+ {roles.map((role) => ( + + ))} +
+ )} +
+
+ ); +}; diff --git a/ui/components/users/profile/skeleton-user-info.tsx b/ui/components/users/profile/skeleton-user-info.tsx index 6bd52c322e..fec5f68f19 100644 --- a/ui/components/users/profile/skeleton-user-info.tsx +++ b/ui/components/users/profile/skeleton-user-info.tsx @@ -1,64 +1,82 @@ -import { Card, CardBody, CardHeader, Skeleton } from "@nextui-org/react"; +import { Card, CardBody, Skeleton } from "@nextui-org/react"; export const SkeletonUserInfo = () => { - const rows = 4; - return ( - - - -
-
-
- -
- {/* Header Skeleton */} -
- -
-
- -
-
- -
-
- -
-
-
- - {/* Row Skeletons */} - {Array.from({ length: rows }).map((_, index) => ( -
- {/* Provider Name */} -
- -
-
- -
-
-
- {/* Percent Passing */} - -
-
- {/* Failing Checks */} - -
-
- {/* Total Resources */} - -
+
+ {/* User Information */} + + +
+ {/* Name */} +
+

Name:

+ +
- ))} -
-
-
+ {/* Email */} +
+

Email:

+ +
+
+
+ {/* Company */} +
+

Company:

+ +
+
+
+ {/* Date Joined */} +
+

+ Date Joined: +

+ +
+
+
+ {/* Tenant ID */} +
+

+ Tenant ID: +

+ +
+
+
+
+ + + + {/* Roles */} + + +

Roles

+
+ {[1, 2, 3].map((i) => ( + +
+
+ ))} +
+
+
+ + {/* Memberships */} + + +

Memberships

+
+ {[1, 2].map((i) => ( + +
+
+ ))} +
+
+
+
); }; diff --git a/ui/components/users/profile/user-basic-info-card.tsx b/ui/components/users/profile/user-basic-info-card.tsx new file mode 100644 index 0000000000..5c4ea0bbbd --- /dev/null +++ b/ui/components/users/profile/user-basic-info-card.tsx @@ -0,0 +1,90 @@ +"use client"; + +import { Card, CardBody, Divider, Tooltip } from "@nextui-org/react"; +import { CircleUserRound } from "lucide-react"; +import { useState } from "react"; + +import { CopyIcon, DoneIcon } from "@/components/icons"; +import { CustomButton } from "@/components/ui/custom/custom-button"; +import { DateWithTime } from "@/components/ui/entities"; +import { UserDataWithRoles } from "@/types/users/users"; + +const TenantIdCopy = ({ id }: { id: string }) => { + const [copied, setCopied] = useState(false); + + const handleCopyTenantId = () => { + navigator.clipboard.writeText(id); + setCopied(true); + setTimeout(() => setCopied(false), 2000); + }; + + return ( +
+

+ Active organization ID: +

+
+ + + + {id} + + {copied ? ( + + ) : ( + + )} + + +
+
+ ); +}; + +export const UserBasicInfoCard = ({ + user, + tenantId, +}: { + user: UserDataWithRoles; + tenantId: string; +}) => { + const { name, email, company_name, date_joined } = user.attributes; + + return ( + + +
+ +
+

Name:

+ {name} +
+
+

Email:

+ {email} +
+
+

Company:

+ {company_name} +
+
+

+ Date Joined: +

+ + + +
+ + +
+
+
+ ); +}; diff --git a/ui/components/users/profile/user-info.tsx b/ui/components/users/profile/user-info.tsx deleted file mode 100644 index ac44770a04..0000000000 --- a/ui/components/users/profile/user-info.tsx +++ /dev/null @@ -1,77 +0,0 @@ -"use client"; - -import { Card, CardBody } from "@nextui-org/react"; - -import { DateWithTime } from "@/components/ui/entities"; -import { UserProfileProps } from "@/types"; - -export const UserInfo = ({ - user, -}: { - user: UserProfileProps["data"] | null; -}) => { - if (!user || !user.attributes) { - return ( - - -
-
-

Name:

- - -
-
-

Email:

- - -
-
-

Company:

- - -
-
-

- Date Joined: -

- - -
-
-
- Unable to load user information. -
- Please check your API connection. -
-
-
- ); - } - - const { name, email, company_name, date_joined } = user.attributes; - - return ( - - -
-
-

Name:

- {name} -
-
-

Email:

- {email} -
-
-

Company:

- {company_name} -
-
-

- Date Joined: -

- - - -
-
-
-
- ); -}; diff --git a/ui/hooks/use-url-filters.ts b/ui/hooks/use-url-filters.ts new file mode 100644 index 0000000000..c29de37327 --- /dev/null +++ b/ui/hooks/use-url-filters.ts @@ -0,0 +1,68 @@ +"use client"; + +import { usePathname, useRouter, useSearchParams } from "next/navigation"; +import { useCallback } from "react"; + +/** + * Custom hook to handle URL filters and automatically reset + * pagination when filters change. + */ +export const useUrlFilters = () => { + const router = useRouter(); + const searchParams = useSearchParams(); + const pathname = usePathname(); + + const updateFilter = useCallback( + (key: string, value: string | string[] | null) => { + const params = new URLSearchParams(searchParams.toString()); + + // Always reset page to 1 when a filter is applied + params.set("page", "1"); + + const filterKey = key.startsWith("filter[") ? key : `filter[${key}]`; + + if (value === null || (Array.isArray(value) && value.length === 0)) { + params.delete(filterKey); + } else if (Array.isArray(value)) { + params.set(filterKey, value.join(",")); + } else { + params.set(filterKey, value); + } + + router.push(`${pathname}?${params.toString()}`, { scroll: false }); + }, + [router, searchParams, pathname], + ); + + const clearFilter = useCallback( + (key: string) => { + const params = new URLSearchParams(searchParams.toString()); + const filterKey = key.startsWith("filter[") ? key : `filter[${key}]`; + + params.delete(filterKey); + params.set("page", "1"); + + router.push(`${pathname}?${params.toString()}`, { scroll: false }); + }, + [router, searchParams, pathname], + ); + + const clearAllFilters = useCallback(() => { + const params = new URLSearchParams(searchParams.toString()); + Array.from(params.keys()).forEach((key) => { + if (key.startsWith("filter[") || key === "sort") { + params.delete(key); + } + }); + + params.delete("page"); + + router.push(`${pathname}?${params.toString()}`, { scroll: false }); + }, [router, searchParams, pathname]); + + return { + updateFilter, + clearFilter, + clearAllFilters, + }; +}; diff --git a/ui/lib/external-urls.ts b/ui/lib/external-urls.ts new file mode 100644 index 0000000000..cea7a694ae --- /dev/null +++ b/ui/lib/external-urls.ts @@ -0,0 +1,45 @@ +export const getProviderHelpText = (provider: string) => { + switch (provider) { + case "aws": + return { + text: "Need help connecting your AWS account?", + link: "https://goto.prowler.com/provider-aws", + }; + case "azure": + return { + text: "Need help connecting your Azure subscription?", + link: "https://goto.prowler.com/provider-azure", + }; + case "m365": + return { + text: "Need help connecting your Microsoft 365 account?", + link: "https://goto.prowler.com/provider-m365", + }; + case "gcp": + return { + text: "Need help connecting your GCP project?", + link: "https://goto.prowler.com/provider-gcp", + }; + case "kubernetes": + return { + text: "Need help connecting your Kubernetes cluster?", + link: "https://goto.prowler.com/provider-k8s", + }; + default: + return { + text: "How to setup a provider?", + link: "https://goto.prowler.com/provider-help", + }; + } +}; + +export const getAWSCredentialsTemplateLinks = () => { + return { + cloudformation: + "https://github.com/prowler-cloud/prowler/blob/master/permissions/templates/cloudformation/prowler-scan-role.yml", + cloudformationQuickLink: + "https://us-east-1.console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/quickcreate?templateURL=https%3A%2F%2Fprowler-cloud-public.s3.eu-west-1.amazonaws.com%2Fpermissions%2Ftemplates%2Faws%2Fcloudformation%2Fprowler-scan-role.yml&stackName=ProwlerScanRole¶m_ExternalId=", + terraform: + "https://github.com/prowler-cloud/prowler/blob/master/permissions/templates/terraform/main.tf", + }; +}; diff --git a/ui/lib/helper-filters.ts b/ui/lib/helper-filters.ts new file mode 100644 index 0000000000..fe17185746 --- /dev/null +++ b/ui/lib/helper-filters.ts @@ -0,0 +1,46 @@ +/** + * Extracts normalized filters and search query from the URL search params. + * Used Server Side Rendering (SSR). There is a hook (useUrlFilters) for client side. + */ +export const extractFiltersAndQuery = ( + searchParams: Record, +) => { + const filters: Record = { + ...Object.fromEntries( + Object.entries(searchParams) + .filter(([key]) => key.startsWith("filter[")) + .map(([key, value]) => [ + key, + Array.isArray(value) ? value.join(",") : value?.toString() || "", + ]), + ), + }; + + const query = filters["filter[search]"] || ""; + return { filters, query }; +}; + +/** + * Returns true if there are any scan or inserted_at filters in the search params. + * Used to determine whether to call the full findings endpoint. + */ +export const hasDateOrScanFilter = (searchParams: Record) => + Object.keys(searchParams).some( + (key) => key.includes("inserted_at") || key.includes("scan__in"), + ); + +/** + * Encodes sort strings by removing leading "+" symbols. + */ +export const encodeSort = (sort?: string) => sort?.replace(/^\+/, "") || ""; + +/** + * Extracts the sort string and the stable key to use in Suspense boundaries. + */ +export const extractSortAndKey = (searchParams: Record) => { + const searchParamsKey = JSON.stringify(searchParams || {}); + const rawSort = searchParams.sort?.toString(); + const encodedSort = encodeSort(rawSort); + + return { searchParamsKey, rawSort, encodedSort }; +}; diff --git a/ui/lib/helper.ts b/ui/lib/helper.ts index 66a0e413f9..db664e2a18 100644 --- a/ui/lib/helper.ts +++ b/ui/lib/helper.ts @@ -1,5 +1,140 @@ +import { getComplianceCsv, getExportsZip } from "@/actions/scans"; import { getTask } from "@/actions/task"; -import { MetaDataProps, PermissionInfo } from "@/types"; +import { auth } from "@/auth.config"; +import { useToast } from "@/components/ui"; +import { AuthSocialProvider, MetaDataProps, PermissionInfo } from "@/types"; + +export const baseUrl = process.env.AUTH_URL || "http://localhost:3000"; +export const apiBaseUrl = process.env.API_BASE_URL; + +export const getAuthHeaders = async (options?: { contentType?: boolean }) => { + const session = await auth(); + + const headers: Record = { + Accept: "application/vnd.api+json", + Authorization: `Bearer ${session?.accessToken}`, + }; + + if (options?.contentType) { + headers["Content-Type"] = "application/vnd.api+json"; + } + + return headers; +}; + +export const getAuthUrl = (provider: AuthSocialProvider) => { + const config = { + google: { + baseUrl: "https://accounts.google.com/o/oauth2/v2/auth", + params: { + redirect_uri: process.env.SOCIAL_GOOGLE_OAUTH_CALLBACK_URL, + prompt: "consent", + response_type: "code", + client_id: process.env.SOCIAL_GOOGLE_OAUTH_CLIENT_ID, + scope: "openid email profile", + access_type: "offline", + }, + }, + github: { + baseUrl: "https://github.com/login/oauth/authorize", + params: { + client_id: process.env.SOCIAL_GITHUB_OAUTH_CLIENT_ID, + redirect_uri: process.env.SOCIAL_GITHUB_OAUTH_CALLBACK_URL, + scope: "user:email", + }, + }, + }; + + const { baseUrl, params } = config[provider]; + const url = new URL(baseUrl); + + Object.entries(params).forEach(([key, value]) => { + url.searchParams.set(key, value || ""); + }); + + return url.toString(); +}; + +export const downloadScanZip = async ( + scanId: string, + toast: ReturnType["toast"], +) => { + const result = await getExportsZip(scanId); + + if (result?.success && result?.data) { + const binaryString = window.atob(result.data); + const bytes = new Uint8Array(binaryString.length); + for (let i = 0; i < binaryString.length; i++) { + bytes[i] = binaryString.charCodeAt(i); + } + const blob = new Blob([bytes], { type: "application/zip" }); + + const url = window.URL.createObjectURL(blob); + const a = document.createElement("a"); + a.href = url; + a.download = result.filename; + document.body.appendChild(a); + a.click(); + document.body.removeChild(a); + window.URL.revokeObjectURL(url); + + toast({ + title: "Download Complete", + description: "Your scan report has been downloaded successfully.", + }); + } else if (result?.error) { + toast({ + variant: "destructive", + title: "Download Failed", + description: result.error, + }); + } +}; + +export const downloadComplianceCsv = async ( + scanId: string, + complianceId: string, + toast: ReturnType["toast"], +) => { + const result = await getComplianceCsv(scanId, complianceId); + + if (result?.success && result?.data) { + const binaryString = window.atob(result.data); + const bytes = new Uint8Array(binaryString.length); + for (let i = 0; i < binaryString.length; i++) { + bytes[i] = binaryString.charCodeAt(i); + } + const blob = new Blob([bytes], { type: "text/csv" }); + + const url = window.URL.createObjectURL(blob); + const a = document.createElement("a"); + a.href = url; + a.download = result.filename; + document.body.appendChild(a); + a.click(); + document.body.removeChild(a); + window.URL.revokeObjectURL(url); + + toast({ + title: "Download Complete", + description: "The compliance report has been downloaded successfully.", + }); + } else if (result?.error) { + toast({ + variant: "destructive", + title: "Download Failed", + description: result.error, + }); + } +}; + +export const isGoogleOAuthEnabled = + !!process.env.SOCIAL_GOOGLE_OAUTH_CLIENT_ID && + !!process.env.SOCIAL_GOOGLE_OAUTH_CLIENT_SECRET; + +export const isGithubOAuthEnabled = + !!process.env.SOCIAL_GITHUB_OAUTH_CLIENT_ID && + !!process.env.SOCIAL_GITHUB_OAUTH_CLIENT_SECRET; export async function checkTaskStatus( taskId: string, @@ -63,8 +198,11 @@ export const getPaginationInfo = (metadata: MetaDataProps) => { const currentPage = metadata?.pagination.page ?? "1"; const totalPages = metadata?.pagination.pages; const totalEntries = metadata?.pagination.count; + const itemsPerPageOptions = metadata?.pagination.itemsPerPage ?? [ + 10, 20, 30, 50, 100, + ]; - return { currentPage, totalPages, totalEntries }; + return { currentPage, totalPages, totalEntries, itemsPerPageOptions }; }; export function encryptKey(passkey: string) { @@ -90,100 +228,6 @@ export const getErrorMessage = async (error: unknown): Promise => { return message; }; -export const regions = [ - // AWS Regions (ordered by usage) - { key: "us-east-1", label: "AWS - US East 1" }, - { key: "us-west-1", label: "AWS - US West 1" }, - { key: "us-west-2", label: "AWS - US West 2" }, - { key: "eu-west-1", label: "AWS - EU West 1" }, - { key: "eu-central-1", label: "AWS - EU Central 1" }, - { key: "ap-southeast-1", label: "AWS - AP Southeast 1" }, - { key: "ap-northeast-1", label: "AWS - AP Northeast 1" }, - { key: "ap-southeast-2", label: "AWS - AP Southeast 2" }, - { key: "ca-central-1", label: "AWS - CA Central 1" }, - { key: "sa-east-1", label: "AWS - SA East 1" }, - { key: "af-south-1", label: "AWS - AF South 1" }, - { key: "ap-east-1", label: "AWS - AP East 1" }, - { key: "ap-northeast-2", label: "AWS - AP Northeast 2" }, - { key: "ap-northeast-3", label: "AWS - AP Northeast 3" }, - { key: "ap-south-1", label: "AWS - AP South 1" }, - { key: "ap-south-2", label: "AWS - AP South 2" }, - { key: "ap-southeast-3", label: "AWS - AP Southeast 3" }, - { key: "ap-southeast-4", label: "AWS - AP Southeast 4" }, - { key: "ca-west-1", label: "AWS - CA West 1" }, - { key: "eu-central-2", label: "AWS - EU Central 2" }, - { key: "eu-north-1", label: "AWS - EU North 1" }, - { key: "eu-south-1", label: "AWS - EU South 1" }, - { key: "eu-south-2", label: "AWS - EU South 2" }, - { key: "eu-west-2", label: "AWS - EU West 2" }, - { key: "eu-west-3", label: "AWS - EU West 3" }, - { key: "il-central-1", label: "AWS - IL Central 1" }, - { key: "me-central-1", label: "AWS - ME Central 1" }, - { key: "me-south-1", label: "AWS - ME South 1" }, - - // Azure Regions (ordered by usage) - { key: "eastus", label: "Azure - East US" }, - { key: "eastus2", label: "Azure - East US 2" }, - { key: "westeurope", label: "Azure - West Europe" }, - { key: "southeastasia", label: "Azure - Southeast Asia" }, - { key: "uksouth", label: "Azure - UK South" }, - { key: "northeurope", label: "Azure - North Europe" }, - { key: "centralus", label: "Azure - Central US" }, - { key: "westus2", label: "Azure - West US 2" }, - { key: "southcentralus", label: "Azure - South Central US" }, - { key: "australiaeast", label: "Azure - Australia East" }, - { key: "canadacentral", label: "Azure - Canada Central" }, - { key: "japaneast", label: "Azure - Japan East" }, - { key: "koreacentral", label: "Azure - Korea Central" }, - { key: "southafricanorth", label: "Azure - South Africa North" }, - { key: "brazilsouth", label: "Azure - Brazil South" }, - { key: "francecentral", label: "Azure - France Central" }, - { key: "germanywestcentral", label: "Azure - Germany West Central" }, - { key: "switzerlandnorth", label: "Azure - Switzerland North" }, - { key: "uaenorth", label: "Azure - UAE North" }, - // Remaining Azure Regions (less frequently used) - { key: "westus", label: "Azure - West US" }, - { key: "northcentralus", label: "Azure - North Central US" }, - { key: "australiasoutheast", label: "Azure - Australia Southeast" }, - { key: "southindia", label: "Azure - South India" }, - { key: "westindia", label: "Azure - West India" }, - { key: "canadaeast", label: "Azure - Canada East" }, - { key: "francesouth", label: "Azure - France South" }, - { key: "norwayeast", label: "Azure - Norway East" }, - { key: "switzerlandwest", label: "Azure - Switzerland West" }, - { key: "ukwest", label: "Azure - UK West" }, - { key: "uaecentral", label: "Azure - UAE Central" }, - { key: "brazilsoutheast", label: "Azure - Brazil Southeast" }, - - // GCP Regions (ordered by usage) - { key: "us-central1", label: "GCP - US Central (Iowa)" }, - { key: "us-east1", label: "GCP - US East (South Carolina)" }, - { key: "us-west1", label: "GCP - US West (Oregon)" }, - { key: "europe-west1", label: "GCP - Europe West (Belgium)" }, - { key: "asia-east1", label: "GCP - Asia East (Taiwan)" }, - { key: "asia-northeast1", label: "GCP - Asia Northeast (Tokyo)" }, - { key: "europe-west2", label: "GCP - Europe West (London)" }, - { key: "europe-west3", label: "GCP - Europe West (Frankfurt)" }, - { key: "europe-west4", label: "GCP - Europe West (Netherlands)" }, - { key: "asia-southeast1", label: "GCP - Asia Southeast (Singapore)" }, - { key: "australia-southeast1", label: "GCP - Australia Southeast (Sydney)" }, - { - key: "northamerica-northeast1", - label: "GCP - North America Northeast (Montreal)", - }, - // Remaining GCP Regions - { key: "asia-east2", label: "GCP - Asia East (Hong Kong)" }, - { key: "asia-northeast2", label: "GCP - Asia Northeast (Osaka)" }, - { key: "asia-northeast3", label: "GCP - Asia Northeast (Seoul)" }, - { key: "asia-south1", label: "GCP - Asia South (Mumbai)" }, - { key: "asia-southeast2", label: "GCP - Asia Southeast (Jakarta)" }, - { key: "europe-north1", label: "GCP - Europe North (Finland)" }, - { key: "europe-west6", label: "GCP - Europe West (Zurich)" }, - { key: "southamerica-east1", label: "GCP - South America East (Sรฃo Paulo)" }, - { key: "us-west2", label: "GCP - US West (Los Angeles)" }, - { key: "us-east4", label: "GCP - US East (Northern Virginia)" }, -]; - export const permissionFormFields: PermissionInfo[] = [ { field: "manage_users", diff --git a/ui/lib/index.ts b/ui/lib/index.ts index 6560f7b5a9..6e17065079 100644 --- a/ui/lib/index.ts +++ b/ui/lib/index.ts @@ -1,3 +1,5 @@ +export * from "./external-urls"; export * from "./helper"; +export * from "./helper-filters"; export * from "./menu-list"; export * from "./utils"; diff --git a/ui/lib/menu-list.ts b/ui/lib/menu-list.ts index bae5330fe0..a6c02d6a3a 100644 --- a/ui/lib/menu-list.ts +++ b/ui/lib/menu-list.ts @@ -3,7 +3,6 @@ import { AlertCircle, Bookmark, - Boxes, CloudCog, Group, LayoutGrid, @@ -26,6 +25,8 @@ import { CircleHelpIcon, DocIcon, GCPIcon, + KubernetesIcon, + M365Icon, SupportIcon, } from "@/components/icons/Icons"; import { GroupProps } from "@/types"; @@ -94,6 +95,11 @@ export const getMenuList = (pathname: string): GroupProps[] => { label: "Microsoft Azure", icon: AzureIcon, }, + { + href: "/findings?filter[status__in]=FAIL&filter[severity__in]=critical%2Chigh%2Cmedium&filter[provider_type__in]=m365&sort=severity,-inserted_at", + label: "Microsoft 365", + icon: M365Icon, + }, { href: "/findings?filter[status__in]=FAIL&filter[severity__in]=critical%2Chigh%2Cmedium&filter[provider_type__in]=gcp&sort=severity,-inserted_at", label: "Google Cloud", @@ -102,7 +108,7 @@ export const getMenuList = (pathname: string): GroupProps[] => { { href: "/findings?filter[status__in]=FAIL&filter[severity__in]=critical%2Chigh%2Cmedium&filter[provider_type__in]=kubernetes&sort=severity,-inserted_at", label: "Kubernetes", - icon: Boxes, + icon: KubernetesIcon, }, ], defaultOpen: false, diff --git a/ui/lib/permissions.ts b/ui/lib/permissions.ts new file mode 100644 index 0000000000..6e0862637d --- /dev/null +++ b/ui/lib/permissions.ts @@ -0,0 +1,44 @@ +import { RolePermissionAttributes } from "@/types/users/users"; + +/** + * Get the permissions for a user role + * @param attributes - The attributes of the user role + * @returns The permissions for the user role + */ +export const getRolePermissions = (attributes: RolePermissionAttributes) => { + const permissions = [ + { + key: "manage_users", + label: "Manage Users", + enabled: attributes.manage_users, + }, + { + key: "manage_account", + label: "Manage Account", + enabled: attributes.manage_account, + }, + { + key: "manage_providers", + label: "Manage Providers", + enabled: attributes.manage_providers, + }, + { + key: "manage_scans", + label: "Manage Scans", + enabled: attributes.manage_scans, + }, + + { + key: "manage_integrations", + label: "Manage Integrations", + enabled: attributes.manage_integrations, + }, + { + key: "unlimited_visibility", + label: "Unlimited Visibility", + enabled: attributes.unlimited_visibility, + }, + ]; + + return permissions; +}; diff --git a/ui/next.config.js b/ui/next.config.js index b9f289635e..2f71bd229c 100644 --- a/ui/next.config.js +++ b/ui/next.config.js @@ -1,4 +1,40 @@ /** @type {import('next').NextConfig} */ + +// HTTP Security Headers +// 'unsafe-eval' is configured under `script-src` because it is required by NextJS for development mode +const cspHeader = ` + img-src 'self'; + font-src 'self'; + style-src 'self' 'unsafe-inline'; + script-src 'self' 'unsafe-inline' 'unsafe-eval' https://js.stripe.com; + connect-src 'self' https://api.iconify.design https://api.simplesvg.com https://api.unisvg.com https://js.stripe.com; + frame-src 'self' https://js.stripe.com/; + frame-ancestors 'none'; + default-src 'self' +` + module.exports = { + poweredByHeader: false, output: "standalone", + async headers() { + return [ + { + source: '/(.*)', + headers: [ + { + key: 'Content-Security-Policy', + value: cspHeader.replace(/\n/g, ''), + }, + { + key: 'X-Content-Type-Options', + value: 'nosniff', + }, + { + key: 'Referrer-Policy', + value: 'strict-origin-when-cross-origin', + }, + ], + }, + ] + } }; diff --git a/ui/package-lock.json b/ui/package-lock.json index 9e8848a1d0..b00fb5b597 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -36,18 +36,18 @@ "jose": "^5.9.3", "jwt-decode": "^4.0.0", "lucide-react": "^0.471.0", - "next": "^14.2.22", + "next": "^14.2.26", "next-auth": "^5.0.0-beta.25", "next-themes": "^0.2.1", "radix-ui": "^1.1.3", "react": "^18.3.1", "react-dom": "^18.3.1", "react-hook-form": "^7.52.2", - "recharts": "^2.13.0-alpha.4", + "recharts": "^2.15.2", "server-only": "^0.0.1", "shadcn-ui": "^0.2.3", "sharp": "^0.33.5", - "tailwind-merge": "^2.5.3", + "tailwind-merge": "^3.2.0", "tailwindcss-animate": "^1.0.7", "uuid": "^11.0.5", "zod": "^3.23.8", @@ -240,9 +240,10 @@ } }, "node_modules/@babel/runtime": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.7.tgz", - "integrity": "sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw==", + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.27.0.tgz", + "integrity": "sha512-VtPOkrdPHZsKc/clNqyi9WUA8TINkZ4cGk63UUE3u4pmB2k+ZMQRDuIOagv8UVd6j7k0T3+RRIb7beKTebNbcw==", + "license": "MIT", "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -985,9 +986,10 @@ } }, "node_modules/@next/env": { - "version": "14.2.22", - "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.22.tgz", - "integrity": "sha512-EQ6y1QeNQglNmNIXvwP/Bb+lf7n9WtgcWvtoFsHquVLCJUuxRs+6SfZ5EK0/EqkkLex4RrDySvKgKNN7PXip7Q==" + "version": "14.2.27", + "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.27.tgz", + "integrity": "sha512-VLGHu7aBMK0rmSEPjx6qb4njGYfEfN5HpeYV32II1dNZZvPxqa+RfWVgPf4q6hmicavceAGeQneTxofx7Zm/yw==", + "license": "MIT" }, "node_modules/@next/eslint-plugin-next": { "version": "14.2.23", @@ -1000,12 +1002,13 @@ } }, "node_modules/@next/swc-darwin-arm64": { - "version": "14.2.22", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.22.tgz", - "integrity": "sha512-HUaLiehovgnqY4TMBZJ3pDaOsTE1spIXeR10pWgdQVPYqDGQmHJBj3h3V6yC0uuo/RoY2GC0YBFRkOX3dI9WVQ==", + "version": "14.2.27", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.27.tgz", + "integrity": "sha512-WKJsKqY1f8NkwcfVbUtoTjJ5e8Q2kEFhjM7tVFA3jqesetBR2EegUTed1Ov7lZebQ7XRrphAg665egiCLc9+Iw==", "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "darwin" @@ -1015,12 +1018,13 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "14.2.22", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.22.tgz", - "integrity": "sha512-ApVDANousaAGrosWvxoGdLT0uvLBUC+srqOcpXuyfglA40cP2LBFaGmBjhgpxYk5z4xmunzqQvcIgXawTzo2uQ==", + "version": "14.2.27", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.27.tgz", + "integrity": "sha512-fsXAM07rt7FQ/dpPFk+YZ8LVQ48xP37KzPFAwdQFmVzNLgizdUyNSg9zwu7l0ziMtHFBofYgBXayg9qAxIhorQ==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "darwin" @@ -1030,12 +1034,13 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "14.2.22", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.22.tgz", - "integrity": "sha512-3O2J99Bk9aM+d4CGn9eEayJXHuH9QLx0BctvWyuUGtJ3/mH6lkfAPRI4FidmHMBQBB4UcvLMfNf8vF0NZT7iKw==", + "version": "14.2.27", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.27.tgz", + "integrity": "sha512-yMIvV5nTOk4p0TDhd9DU6QswEm8YjZnr1o9ZI7A6jh25JHvPsIvjgyTVSlnrGFKlNNtOOJCIv5mwVU7+4VZvsg==", "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "linux" @@ -1045,12 +1050,13 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "14.2.22", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.22.tgz", - "integrity": "sha512-H/hqfRz75yy60y5Eg7DxYfbmHMjv60Dsa6IWHzpJSz4MRkZNy5eDnEW9wyts9bkxwbOVZNPHeb3NkqanP+nGPg==", + "version": "14.2.27", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.27.tgz", + "integrity": "sha512-gpOtTwE9GUkp+VNPwTYFn1fN1UINQTulbgO8UJzBgi77g/+T+yQxfBsKUy2H96aKjoMT/AYfn3yyomNXXVoZZg==", "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "linux" @@ -1060,12 +1066,13 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "14.2.22", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.22.tgz", - "integrity": "sha512-LckLwlCLcGR1hlI5eiJymR8zSHPsuruuwaZ3H2uudr25+Dpzo6cRFjp/3OR5UYJt8LSwlXv9mmY4oI2QynwpqQ==", + "version": "14.2.27", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.27.tgz", + "integrity": "sha512-b7bogYfYyutEhyDST5qpBkmVENZz1mVOO2632KerJjwWgr2cdycAPU33VmpTVvTs/fT8+oeoUuZ31aQV6cUhpw==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "linux" @@ -1075,12 +1082,13 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "14.2.22", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.22.tgz", - "integrity": "sha512-qGUutzmh0PoFU0fCSu0XYpOfT7ydBZgDfcETIeft46abPqP+dmePhwRGLhFKwZWxNWQCPprH26TjaTxM0Nv8mw==", + "version": "14.2.27", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.27.tgz", + "integrity": "sha512-yGZX038wBDSRJ7tbZ6OFZtCUvLXZDVpw9rEgNUK/0PL++65hENaiMXhxJtupeCFqzHdMuJwrCnEW29saF4NmEw==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "linux" @@ -1090,12 +1098,13 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "14.2.22", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.22.tgz", - "integrity": "sha512-K6MwucMWmIvMb9GlvT0haYsfIPxfQD8yXqxwFy4uLFMeXIb2TcVYQimxkaFZv86I7sn1NOZnpOaVk5eaxThGIw==", + "version": "14.2.27", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.27.tgz", + "integrity": "sha512-yRY9RzPpk+Jex4DthdKja8C3evh6jB+22AeVd6yTbcnGAFGXQWJTs6DfEcEfeFpqIEcIGbWYq7pinz6vRv7tJA==", "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "win32" @@ -1105,12 +1114,13 @@ } }, "node_modules/@next/swc-win32-ia32-msvc": { - "version": "14.2.22", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.22.tgz", - "integrity": "sha512-5IhDDTPEbzPR31ZzqHe90LnNe7BlJUZvC4sA1thPJV6oN5WmtWjZ0bOYfNsyZx00FJt7gggNs6SrsX0UEIcIpA==", + "version": "14.2.27", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.27.tgz", + "integrity": "sha512-VSqDGpoKoUgkE2Ba4/89ZchktDOwPhKy3HgQgTf3gOhK/ZEibujLJN4qzp3rSIadn4cXUID3PmuEEM6uRPA7nQ==", "cpu": [ "ia32" ], + "license": "MIT", "optional": true, "os": [ "win32" @@ -1120,12 +1130,13 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "14.2.22", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.22.tgz", - "integrity": "sha512-nvRaB1PyG4scn9/qNzlkwEwLzuoPH3Gjp7Q/pLuwUgOTt1oPMlnCI3A3rgkt+eZnU71emOiEv/mR201HoURPGg==", + "version": "14.2.27", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.27.tgz", + "integrity": "sha512-bK46G4uS5SVlq88FnxyupRuuaCfHPtB/7heBRAZCiHD9GdVktadjiQPCzlXWTKgv6pJxP8bE7J9GGDwodtn9Mw==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "win32" @@ -9409,6 +9420,7 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz", "integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==", + "license": "MIT", "dependencies": { "@babel/runtime": "^7.8.7", "csstype": "^3.0.2" @@ -10391,9 +10403,10 @@ "dev": true }, "node_modules/fast-equals": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/fast-equals/-/fast-equals-5.0.1.tgz", - "integrity": "sha512-WF1Wi8PwwSY7/6Kx0vKXtw8RwuSGoM1bvDaJbu7MxDlR1vovZjIAKrnzyrThgAjm6JDTu0fVgWXDlMGspodfoQ==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/fast-equals/-/fast-equals-5.2.2.tgz", + "integrity": "sha512-V7/RktU11J3I36Nwq2JnZEM7tNm17eBJz+u25qdxBZeCKiX6BkVSZQjwWIr+IobgnZy+ag73tTZgZi7tr0LrBw==", + "license": "MIT", "engines": { "node": ">=6.0.0" } @@ -12226,11 +12239,12 @@ "dev": true }, "node_modules/next": { - "version": "14.2.22", - "resolved": "https://registry.npmjs.org/next/-/next-14.2.22.tgz", - "integrity": "sha512-Ps2caobQ9hlEhscLPiPm3J3SYhfwfpMqzsoCMZGWxt9jBRK9hoBZj2A37i8joKhsyth2EuVKDVJCTF5/H4iEDw==", + "version": "14.2.27", + "resolved": "https://registry.npmjs.org/next/-/next-14.2.27.tgz", + "integrity": "sha512-xmTsnu6rbXVaupRmU2k3BHVpQp7kK+/Ge9XYZlwXQNS2IPP/U9ToDoO6tTSzZIV36fmDBnwKqBUd7KuFXTi0Mw==", + "license": "MIT", "dependencies": { - "@next/env": "14.2.22", + "@next/env": "14.2.27", "@swc/helpers": "0.5.5", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001579", @@ -12245,15 +12259,15 @@ "node": ">=18.17.0" }, "optionalDependencies": { - "@next/swc-darwin-arm64": "14.2.22", - "@next/swc-darwin-x64": "14.2.22", - "@next/swc-linux-arm64-gnu": "14.2.22", - "@next/swc-linux-arm64-musl": "14.2.22", - "@next/swc-linux-x64-gnu": "14.2.22", - "@next/swc-linux-x64-musl": "14.2.22", - "@next/swc-win32-arm64-msvc": "14.2.22", - "@next/swc-win32-ia32-msvc": "14.2.22", - "@next/swc-win32-x64-msvc": "14.2.22" + "@next/swc-darwin-arm64": "14.2.27", + "@next/swc-darwin-x64": "14.2.27", + "@next/swc-linux-arm64-gnu": "14.2.27", + "@next/swc-linux-arm64-musl": "14.2.27", + "@next/swc-linux-x64-gnu": "14.2.27", + "@next/swc-linux-x64-musl": "14.2.27", + "@next/swc-win32-arm64-msvc": "14.2.27", + "@next/swc-win32-ia32-msvc": "14.2.27", + "@next/swc-win32-x64-msvc": "14.2.27" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", @@ -13351,17 +13365,18 @@ } }, "node_modules/react-smooth": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/react-smooth/-/react-smooth-4.0.1.tgz", - "integrity": "sha512-OE4hm7XqR0jNOq3Qmk9mFLyd6p2+j6bvbPJ7qlB7+oo0eNcL2l7WQzG6MBnT3EXY6xzkLMUBec3AfewJdA0J8w==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/react-smooth/-/react-smooth-4.0.4.tgz", + "integrity": "sha512-gnGKTpYwqL0Iii09gHobNolvX4Kiq4PKx6eWBCYYix+8cdw+cGo3do906l1NBPKkSWx1DghC1dlWG9L2uGd61Q==", + "license": "MIT", "dependencies": { "fast-equals": "^5.0.1", "prop-types": "^15.8.1", "react-transition-group": "^4.4.5" }, "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "node_modules/react-style-singleton": { @@ -13407,6 +13422,7 @@ "version": "4.4.5", "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz", "integrity": "sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==", + "license": "BSD-3-Clause", "dependencies": { "@babel/runtime": "^7.5.5", "dom-helpers": "^5.0.1", @@ -13451,15 +13467,16 @@ } }, "node_modules/recharts": { - "version": "2.13.0-alpha.4", - "resolved": "https://registry.npmjs.org/recharts/-/recharts-2.13.0-alpha.4.tgz", - "integrity": "sha512-K9naL6F7pEcDYJE6yFQASSCQecSLPP0JagnvQ9hPtA/aHgsxsnIOjouLP5yrFZehxzfCkV5TEORr7/uNtSr7Qw==", + "version": "2.15.3", + "resolved": "https://registry.npmjs.org/recharts/-/recharts-2.15.3.tgz", + "integrity": "sha512-EdOPzTwcFSuqtvkDoaM5ws/Km1+WTAO2eizL7rqiG0V2UVhTnz0m7J2i0CjVPUCdEkZImaWvXLbZDS2H5t6GFQ==", + "license": "MIT", "dependencies": { "clsx": "^2.0.0", "eventemitter3": "^4.0.1", "lodash": "^4.17.21", "react-is": "^18.3.1", - "react-smooth": "^4.0.0", + "react-smooth": "^4.0.4", "recharts-scale": "^0.4.4", "tiny-invariant": "^1.3.1", "victory-vendor": "^36.6.8" @@ -13468,8 +13485,8 @@ "node": ">=14" }, "peerDependencies": { - "react": "^16.0.0 || ^17.0.0 || ^18.0.0", - "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0" + "react": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "node_modules/recharts-scale": { @@ -14458,9 +14475,9 @@ } }, "node_modules/tailwind-merge": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-2.5.3.tgz", - "integrity": "sha512-d9ZolCAIzom1nf/5p4LdD5zvjmgSxY0BGgdSvmXIoMYAiPdAW/dSpP7joCDYFY7r/HkEa2qmPtkgsu0xjQeQtw==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-3.3.0.tgz", + "integrity": "sha512-fyW/pEfcQSiigd5SNn0nApUOxx0zB/dm6UDU/rEwc2c3sX2smWUNbapHv+QRqLGVp9GWX3THIa7MUGPo+YkDzQ==", "license": "MIT", "funding": { "type": "github", diff --git a/ui/package.json b/ui/package.json index 2a7f862873..5d16567d19 100644 --- a/ui/package.json +++ b/ui/package.json @@ -28,18 +28,18 @@ "jose": "^5.9.3", "jwt-decode": "^4.0.0", "lucide-react": "^0.471.0", - "next": "^14.2.22", + "next": "^14.2.26", "next-auth": "^5.0.0-beta.25", "next-themes": "^0.2.1", "radix-ui": "^1.1.3", "react": "^18.3.1", "react-dom": "^18.3.1", "react-hook-form": "^7.52.2", - "recharts": "^2.13.0-alpha.4", + "recharts": "^2.15.2", "server-only": "^0.0.1", "shadcn-ui": "^0.2.3", "sharp": "^0.33.5", - "tailwind-merge": "^2.5.3", + "tailwind-merge": "^3.2.0", "tailwindcss-animate": "^1.0.7", "uuid": "^11.0.5", "zod": "^3.23.8", diff --git a/ui/types/authFormSchema.ts b/ui/types/authFormSchema.ts index 58737a1f8a..e08c14ea53 100644 --- a/ui/types/authFormSchema.ts +++ b/ui/types/authFormSchema.ts @@ -1,5 +1,7 @@ import { z } from "zod"; +export type AuthSocialProvider = "google" | "github"; + export const authFormSchema = (type: string) => z .object({ diff --git a/ui/types/components.ts b/ui/types/components.ts index 342e4d401f..e45913efc7 100644 --- a/ui/types/components.ts +++ b/ui/types/components.ts @@ -1,6 +1,8 @@ import { LucideIcon } from "lucide-react"; import { SVGProps } from "react"; +import { ProviderType } from "./providers"; + export type IconSvgProps = SVGProps & { size?: number; }; @@ -45,7 +47,7 @@ export interface CollapseMenuButtonProps { export interface SelectScanComplianceDataProps { scans: (ScanProps & { providerInfo: { - provider: "aws" | "azure" | "gcp" | "kubernetes"; + provider: ProviderType; uid: string; alias: string; }; @@ -174,27 +176,6 @@ export interface FindingsSeverityOverview { }; } -export interface ProviderOverviewProps { - data: { - type: "provider-overviews"; - id: "aws" | "gcp" | "azure" | "kubernetes"; - attributes: { - findings: { - pass: number; - fail: number; - manual: number; - total: number; - }; - resources: { - total: number; - }; - }; - }[]; - meta: { - version: string; - }; -} - export interface TaskDetails { attributes: { state: string; @@ -238,6 +219,16 @@ export type AzureCredentials = { providerId: string; }; +export type M365Credentials = { + client_id: string; + client_secret: string; + tenant_id: string; + user: string; + encrypted_password: string; + secretName: string; + providerId: string; +}; + export type GCPCredentials = { client_id: string; client_secret: string; @@ -256,7 +247,8 @@ export type CredentialsFormSchema = | AWSCredentials | AzureCredentials | GCPCredentials - | KubernetesCredentials; + | KubernetesCredentials + | M365Credentials; export interface SearchParamsProps { [key: string]: string | string[] | undefined; @@ -498,51 +490,6 @@ export interface UserProps { }[]; } -export interface ProviderProps { - id: string; - type: "providers"; - attributes: { - provider: "aws" | "azure" | "gcp" | "kubernetes"; - uid: string; - alias: string; - status: "completed" | "pending" | "cancelled"; - resources: number; - connection: { - connected: boolean; - last_checked_at: string; - }; - scanner_args: { - only_logs: boolean; - excluded_checks: string[]; - aws_retries_max_attempts: number; - }; - inserted_at: string; - updated_at: string; - created_by: { - object: string; - id: string; - }; - }; - relationships: { - secret: { - data: { - type: string; - id: string; - } | null; - }; - provider_groups: { - meta: { - count: number; - }; - data: Array<{ - type: string; - id: string; - }>; - }; - }; - groupNames?: string[]; -} - export interface ScanProps { type: "scans"; id: string; @@ -585,7 +532,7 @@ export interface ScanProps { }; }; providerInfo?: { - provider: "aws" | "azure" | "gcp" | "kubernetes"; + provider: ProviderType; uid: string; alias: string; }; @@ -597,10 +544,11 @@ export interface FindingProps { attributes: { uid: string; delta: "new" | "changed" | null; - status: "PASS" | "FAIL" | "MANUAL" | "MUTED"; + status: "PASS" | "FAIL" | "MANUAL"; status_extended: string; severity: "informational" | "low" | "medium" | "high" | "critical"; check_id: string; + muted: boolean; check_metadata: { risk: string; notes: string; @@ -743,6 +691,7 @@ export interface MetaDataProps { page: number; pages: number; count: number; + itemsPerPage?: Array; }; version: string; } diff --git a/ui/types/filters.ts b/ui/types/filters.ts index 944706f7aa..a8fb78dde9 100644 --- a/ui/types/filters.ts +++ b/ui/types/filters.ts @@ -1,7 +1,10 @@ +import { ProviderAccountProps } from "./providers"; + export interface FilterOption { key: string; labelCheckboxGroup: string; values: string[]; + valueLabelMapping?: Array<{ [uid: string]: ProviderAccountProps }>; } export interface CustomDropdownFilterProps { diff --git a/ui/types/formSchemas.ts b/ui/types/formSchemas.ts index e23d47eb55..b0c64dfa24 100644 --- a/ui/types/formSchemas.ts +++ b/ui/types/formSchemas.ts @@ -63,7 +63,7 @@ export const awsCredentialsTypeSchema = z.object({ export const addProviderFormSchema = z .object({ - providerType: z.enum(["aws", "azure", "gcp", "kubernetes"], { + providerType: z.enum(["aws", "azure", "gcp", "kubernetes", "m365"], { required_error: "Please select a provider type", }), }) @@ -80,6 +80,12 @@ export const addProviderFormSchema = z providerUid: z.string(), awsCredentialsType: z.string().optional(), }), + z.object({ + providerType: z.literal("m365"), + providerAlias: z.string(), + providerUid: z.string(), + awsCredentialsType: z.string().optional(), + }), z.object({ providerType: z.literal("gcp"), providerAlias: z.string(), @@ -128,7 +134,19 @@ export const addCredentialsFormSchema = (providerType: string) => .string() .nonempty("Kubeconfig Content is required"), } - : {}), + : providerType === "m365" + ? { + client_id: z.string().nonempty("Client ID is required"), + client_secret: z + .string() + .nonempty("Client Secret is required"), + tenant_id: z.string().nonempty("Tenant ID is required"), + user: z.string().nonempty("User is required"), + encrypted_password: z + .string() + .nonempty("Encrypted Password is required"), + } + : {}), }); export const addCredentialsRoleFormSchema = (providerType: string) => @@ -137,12 +155,12 @@ export const addCredentialsRoleFormSchema = (providerType: string) => .object({ providerId: z.string(), providerType: z.string(), - role_arn: z.string().optional(), + role_arn: z.string().nonempty("AWS Role ARN is required"), external_id: z.string().optional(), aws_access_key_id: z.string().optional(), aws_secret_access_key: z.string().optional(), aws_session_token: z.string().optional(), - session_duration: z.number().optional(), + session_duration: z.string().optional(), role_session_name: z.string().optional(), credentials_type: z.string().optional(), }) diff --git a/ui/types/index.ts b/ui/types/index.ts index c247bc2080..e35a2815da 100644 --- a/ui/types/index.ts +++ b/ui/types/index.ts @@ -2,3 +2,4 @@ export * from "./authFormSchema"; export * from "./components"; export * from "./filters"; export * from "./formSchemas"; +export * from "./providers"; diff --git a/ui/types/providers.ts b/ui/types/providers.ts new file mode 100644 index 0000000000..6bac15262c --- /dev/null +++ b/ui/types/providers.ts @@ -0,0 +1,73 @@ +export type ProviderType = "aws" | "azure" | "m365" | "gcp" | "kubernetes"; + +export interface ProviderProps { + id: string; + type: "providers"; + attributes: { + provider: ProviderType; + uid: string; + alias: string; + status: "completed" | "pending" | "cancelled"; + resources: number; + connection: { + connected: boolean; + last_checked_at: string; + }; + scanner_args: { + only_logs: boolean; + excluded_checks: string[]; + aws_retries_max_attempts: number; + }; + inserted_at: string; + updated_at: string; + created_by: { + object: string; + id: string; + }; + }; + relationships: { + secret: { + data: { + type: string; + id: string; + } | null; + }; + provider_groups: { + meta: { + count: number; + }; + data: Array<{ + type: string; + id: string; + }>; + }; + }; + groupNames?: string[]; +} + +export interface ProviderAccountProps { + provider: ProviderType; + uid: string; + alias: string; +} + +export interface ProviderOverviewProps { + data: { + type: "provider-overviews"; + id: ProviderType; + attributes: { + findings: { + pass: number; + fail: number; + manual: number; + total: number; + }; + resources: { + total: number; + }; + }; + }[]; + meta: { + version: string; + }; +} diff --git a/ui/types/users/users.ts b/ui/types/users/users.ts index 61a92ae70e..993f1bf286 100644 --- a/ui/types/users/users.ts +++ b/ui/types/users/users.ts @@ -5,7 +5,7 @@ export interface UserAttributes { date_joined: string; } -export interface Membership { +export interface MembershipData { type: string; id: string; } @@ -17,7 +17,7 @@ export interface MembershipMeta { export interface UserRelationships { memberships: { meta: MembershipMeta; - data: Membership[]; + data: MembershipData[]; }; } @@ -50,3 +50,100 @@ export interface TokenData { export interface SignInResponse { data: TokenData; } + +export interface RoleData { + type: "roles"; + id: string; +} + +export type PermissionKey = + | "manage_users" + | "manage_account" + | "manage_providers" + | "manage_scans" + | "manage_integrations" + | "unlimited_visibility"; + +export type RolePermissionAttributes = Pick< + RoleDetail["attributes"], + PermissionKey +>; + +export interface RoleDetail { + id: string; + type: "roles"; + attributes: { + name: string; + manage_users: boolean; + manage_account: boolean; + manage_providers: boolean; + manage_scans: boolean; + manage_integrations: boolean; + unlimited_visibility: boolean; + permission_state?: string; + inserted_at?: string; + updated_at?: string; + }; +} + +export interface MembershipDetailData { + id: string; + type: "memberships"; + attributes: { + role: string; + date_joined: string; + [key: string]: any; + }; + relationships: { + tenant: { + data: { + type: string; + id: string; + }; + }; + [key: string]: any; + }; +} + +export interface UserDataWithRoles + extends Omit { + attributes: UserAttributes & { + role?: { + name: string; + }; + }; + relationships: { + memberships: UserRelationships["memberships"]; + roles?: { + meta: { + count: number; + }; + data: RoleData[]; + }; + }; +} + +export interface UserInfoProps { + user: UserDataWithRoles | null; + roleDetails?: RoleDetail[]; + membershipDetails?: MembershipDetailData[]; +} + +export interface TenantDetailData { + type: string; + id: string; + attributes: { + name: string; + }; + relationships: { + memberships: { + meta: { + count: number; + }; + data: Array<{ + type: string; + id: string; + }>; + }; + }; +} diff --git a/util/generate_compliance_json_from_csv_for_cis10_github.py b/util/generate_compliance_json_from_csv_for_cis10_github.py new file mode 100644 index 0000000000..3297c70640 --- /dev/null +++ b/util/generate_compliance_json_from_csv_for_cis10_github.py @@ -0,0 +1,40 @@ +import csv +import json +import sys + +# Convert a CSV file following the CIS 1.0 GitHub benchmark into a Prowler v3.0 Compliance JSON file +# CSV fields: +# Id, Title,Checks,Attributes_Section,Attributes_Level,Attributes_AssessmentStatus,Attributes_Description,Attributes_RationalStatement,Attributes_ImpactStatement,Attributes_RemediationProcedure,Attributes_AuditProcedure,Attributes_AdditionalInformation,Attributes_References + +# get the CSV filename to convert from +file_name = sys.argv[1] + +# read the CSV file rows and use the column fields to form the Prowler compliance JSON file 'cis_1.0_github.json' +output = {"Framework": "CIS-GitHub", "Version": "1.5", "Requirements": []} +with open(file_name, newline="", encoding="utf-8") as f: + reader = csv.reader(f, delimiter=",") + for row in reader: + attribute = { + "Section": row[3], + "Profile": row[4], + "AssessmentStatus": row[5], + "Description": row[6], + "RationaleStatement": row[7], + "ImpactStatement": row[8], + "RemediationProcedure": row[9], + "AuditProcedure": row[10], + "AdditionalInformation": row[11], + "References": row[12], + } + output["Requirements"].append( + { + "Id": row[0], + "Description": row[1], + "Checks": list(map(str.strip, row[2].split(","))), + "Attributes": [attribute], + } + ) + +# Write the output Prowler compliance JSON file 'cis_1.0_github.json' locally +with open("cis_1.0_github.json", "w", encoding="utf-8") as outfile: + json.dump(output, outfile, indent=4, ensure_ascii=False) diff --git a/util/generate_compliance_json_from_csv_for_cis40_microsoft365.py b/util/generate_compliance_json_from_csv_for_cis40_microsoft365.py index c6ba8c101f..ee806f0e90 100644 --- a/util/generate_compliance_json_from_csv_for_cis40_microsoft365.py +++ b/util/generate_compliance_json_from_csv_for_cis40_microsoft365.py @@ -2,9 +2,9 @@ import csv import json import sys -# Convert a CSV file following the CIS 4.0 Microsoft365 Benchmark into a Prowler v3.0 Compliance JSON file +# Convert a CSV file following the CIS 4.0 M365 Benchmark into a Prowler v3.0 Compliance JSON file # CSV fields: -# Section #,Recommendation #,Profile,Title,Assessment Status,Description,Rationale Statement,Impact Statement,Remediation Procedure,Audit Procedure,Additional Information,CIS Controls,CIS Safeguards 1 (v8),CIS Safeguards 2 (v8),CIS Safeguards 3 (v8),v8 IG1,v8 IG2,v8 IG3,CIS Safeguards 1 (v7),CIS Safeguards 2 (v7),CIS Safeguards 3 (v7),v7 IG1,v7 IG2,v7 IG3,References,Default Value +# Section #;Recommendation #;Profile;Title;Assessment Status;Description;Rationale Statement;Impact Statement;Remediation Procedure;Audit Procedure;Additional Information;CIS Controls;CIS Safeguards 1 (v8);CIS Safeguards 2 (v8);CIS Safeguards 3 (v8);v8 IG1;v8 IG2;v8 IG3;CIS Safeguards 1 (v7);CIS Safeguards 2 (v7);CIS Safeguards 3 (v7);v7 IG1;v7 IG2;v7 IG3;References;Default Value # Get the CSV filename to convert from file_name = sys.argv[1] @@ -15,7 +15,7 @@ output = {"Framework": "CIS", "Version": "4.0", "Requirements": []} # Open the CSV file and read the rows try: with open(file_name, newline="", encoding="utf-8") as f: - reader = csv.reader(f, delimiter=",") + reader = csv.reader(f, delimiter=";") next(reader) # Skip the header row for row in reader: attribute = { @@ -29,6 +29,7 @@ try: "AuditProcedure": row[9], "AdditionalInformation": row[10], "References": row[24], + "DefaultValue": row[25], } if row[4] != "": output["Requirements"].append( @@ -42,7 +43,7 @@ try: except UnicodeDecodeError: # If there is an error reading the file with the default encoding, try with ISO-8859-1 with open(file_name, newline="", encoding="ISO-8859-1") as f: - reader = csv.reader(f, delimiter=",") + reader = csv.reader(f, delimiter=";") next(reader) # Skip the header row for row in reader: attribute = { @@ -56,6 +57,7 @@ except UnicodeDecodeError: "AuditProcedure": row[9], "AdditionalInformation": row[10], "References": row[24], + "DefaultValue": row[25], } if row[4] != "": output["Requirements"].append( @@ -68,7 +70,7 @@ except UnicodeDecodeError: ) # Save the output JSON file -with open("cis_4.0_microsoft365.json", "w", encoding="utf-8") as outfile: +with open("cis_4.0_m365.json", "w", encoding="utf-8") as outfile: json.dump(output, outfile, indent=4, ensure_ascii=False) print("Archivo JSON generado exitosamente.") diff --git a/util/generate_compliance_json_from_csv_threatscore.py b/util/generate_compliance_json_from_csv_threatscore.py new file mode 100644 index 0000000000..47865d0c8d --- /dev/null +++ b/util/generate_compliance_json_from_csv_threatscore.py @@ -0,0 +1,36 @@ +import csv +import json +import sys + +# Convert a CSV file following the ThreatScore CSV format into a Prowler Compliance JSON file +# CSV fields: +# Id, Title, Description, Section, SubSection, AttributeDescription, AdditionalInformation, LevelOfRisk, Checks + +# get the CSV filename to convert from +file_name = sys.argv[1] + +# read the CSV file rows and use the column fields to form the Prowler compliance JSON file 'prowler_threatscore_aws.json' +output = {"Framework": "ProwlerThreatScore", "Version": "1.0", "Requirements": []} +with open(file_name, newline="", encoding="utf-8") as f: + reader = csv.reader(f, delimiter=",") + for row in reader: + attribute = { + "Title": row[1], + "Section": row[3], + "SubSection": row[4], + "AttributeDescription": row[5], + "AdditionalInformation": row[6], + "LevelOfRisk": row[7], + } + output["Requirements"].append( + { + "Id": row[0], + "Description": row[2], + "Checks": list(map(str.strip, row[8].split(","))), + "Attributes": [attribute], + } + ) + +# Write the output Prowler compliance JSON file 'prowler_threatscore_aws.json' locally +with open("prowler_threatscore_azure.json", "w", encoding="utf-8") as outfile: + json.dump(output, outfile, indent=4, ensure_ascii=False) diff --git a/util/get_prowler_threatscore_from_generic_output.py b/util/get_prowler_threatscore_from_generic_output.py new file mode 100644 index 0000000000..d3cd53a6b6 --- /dev/null +++ b/util/get_prowler_threatscore_from_generic_output.py @@ -0,0 +1,52 @@ +import csv +import json +import sys + +file_name_output = sys.argv[1] # It is the output CSV file +file_name_compliance = sys.argv[2] # It is the compliance JSON file + + +number_of_findings_per_pillar = {} +score_per_pillar = {} +# Read the compliance JSON file +with open(file_name_compliance, "r") as file: + data = json.load(file) + +# Read the output CSV file +with open(file_name_output, "r") as file: + reader = csv.reader(file, delimiter=";") + headers = next(reader) + if "CHECK_ID" in headers: + check_id_index = headers.index("CHECK_ID") + if "STATUS" in headers: + status_index = headers.index("STATUS") + if "MUTED" in headers: + muted_index = headers.index("MUTED") + for row in reader: + for requirement in data["Requirements"]: + # Take the column that contains the CHECK_ID + if row[check_id_index] in requirement["Checks"]: + if ( + requirement["Attributes"][0]["Section"] + not in number_of_findings_per_pillar.keys() + ): + number_of_findings_per_pillar[ + requirement["Attributes"][0]["Section"] + ] = 0 + if ( + requirement["Attributes"][0]["Section"] + not in score_per_pillar.keys() + ): + score_per_pillar[requirement["Attributes"][0]["Section"]] = 0 + if row[status_index] == "FAIL" and row[muted_index] != "TRUE": + number_of_findings_per_pillar[ + requirement["Attributes"][0]["Section"] + ] += 1 + score_per_pillar[ + requirement["Attributes"][0]["Section"] + ] += requirement["Attributes"][0]["LevelOfRisk"] + +for key, value in number_of_findings_per_pillar.items(): + print("Pillar:", key) + print("Score:", score_per_pillar[key] / value) + print("--------------------------------") diff --git a/util/replicate_pypi_package.py b/util/replicate_pypi_package.py index f1bb552f3a..3abbdcd751 100644 --- a/util/replicate_pypi_package.py +++ b/util/replicate_pypi_package.py @@ -2,7 +2,7 @@ import toml data = toml.load("pyproject.toml") # Modify field -data["tool"]["poetry"]["name"] = "prowler-cloud" +data["project"]["name"] = "prowler-cloud" # To use the dump function, you need to open the file in 'write' mode f = open("pyproject.toml", "w")