Skip to content

Feature/1.3.7 third party storage - #316

Open
Collando wants to merge 2 commits into
mainfrom
feature/1.3.7-third-party-storage
Open

Feature/1.3.7 third party storage#316
Collando wants to merge 2 commits into
mainfrom
feature/1.3.7-third-party-storage

Conversation

@Collando

@Collando Collando commented Aug 9, 2026

Copy link
Copy Markdown

Summary

Implements CIS Microsoft 365 Foundations control 1.3.7 (Ensure 'third-party storage services' are restricted in 'Microsoft 365 on the web'). Adds the Rego policy and unit tests; no collector changes were needed as the existing collector already returns the required field.

Type of Change

  • New feature

Affected Components

  • /engine (collectors / policies)

Motivation

Control 1.3.7 was listed in metadata.json with automation_status "not_started" — the collector (exchange.organization.owa_mailbox_policy) existed but no Rego policy had been written. Picked up from the compliance controls Planner board.

Testing Done

  • Unit tests pass locally
  • Tested manually — describe how:
  • No tests required — explain why:

Ran the policy against 4 unit test scenarios (compliant, non-compliant, no policies, result structure) using OPA test — all 4/4 passing. Live tenant scan verification is blocked pending M365 credentials for the test environment, so this has not yet been validated against a live tenant.

Security Considerations

No auth, secrets, or API permission changes. Policy only reads data already collected via the existing exchange.organization.owa_mailbox_policy collector (Exchange.Manage permission, already required).

Breaking Changes

  • No breaking changes

Rollback Plan

  • Revert commit is sufficient

Checklist

  • Code follows project conventions
  • No secrets, credentials, or tokens committed
  • Relevant documentation updated (if applicable)
  • CI/CD workflows pass on this branch
  • PR is focused on one thing

Screenshots

N/A — no frontend changes.

@Collando
Collando requested a review from a team as a code owner August 9, 2026 01:51
@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Preview Environment

A preview environment can be spun up on demand for this PR.

Action Label Includes
Spin up preview deploy-preview Frontend, backend, database, Redis, OPA, worker
Spin up preview with M365 deploy-preview-m365 Everything above + PowerShell service for Exchange/Teams scan testing
Tear down preview teardown-preview Stops the environment early

The environment will also be torn down automatically when the PR is closed or merged.
Preview URLs will appear in a follow-up comment once the deploy completes (~5–8 min).
M365 scans require real tenant credentials added through the frontend UI.

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

CI: Engine

Job Result
Security analysis (CodeQL) success
Lint success
Tests failure

One or more checks failed. View logs

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8e91010a96

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

}

total_policies := object.get(input, "total_policies", 0)
policies_with_external_storage := object.get(input, "policies_with_external_storage", [])

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use the Microsoft 365 on-the-web signal

For tenants where every OWA mailbox policy has AdditionalStorageProvidersAvailable disabled but the Microsoft 365 on-the-web third-party storage service is still enabled, this rule returns compliant. CIS 1.3.7 is the Microsoft 365 admin-center/Graph service-principal setting (for example, the documented remediation disables appId c1f33bc0-bdb4-4248-ba9b-096807ddb43e), while this policy evaluates the OWA collector field already used for the separate 6.5.3 Outlook-on-the-web recommendation, so marking 1.3.7 ready here can produce false compliance results. See: https://maester.dev/docs/tests/CIS.M365.1.3.7/

Useful? React with 👍 / 👎.

@@ -0,0 +1,25 @@
package cis.microsoft_365_foundations.v6_0_0.control_1_3_6

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Wire the Customer Lockbox policy in metadata

In this commit, control 1.3.6 still remains automation_status: "not_started" with policy_file: null in metadata.json, so adding this .rego file leaves it orphaned. The existing CI wiring test test_no_orphaned_rego_files enumerates every *.rego under the version directory and will fail on 1.3.6_customer_lockbox_enabled.rego, and the worker cannot run the policy until metadata references it.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant