Skip to content

MSFT rules update to include filter - #1364

Merged
aperez-worklytics merged 4 commits into
rc-v0.6.9from
msft_users_filter
Jul 31, 2026
Merged

MSFT rules update to include filter#1364
aperez-worklytics merged 4 commits into
rc-v0.6.9from
msft_users_filter

Conversation

@aperez-worklytics

@aperez-worklytics aperez-worklytics commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Two things added in all MSFT rules:

Fixes

paste links to issues/tasks in project management

Features

Psoxy rules update

Logistics

paste links to issues/tasks in project management

Change implications

  • dependencies added/changed? no
  • something important to note in future release notes?
    • NOTE in CHANGELOG.md anything that will show up in terraform plan/apply that isn't
      obviously a no-op? no
    • breaking changes? if in module/example that is NOT marked alpha, requires major version
      change no

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates Microsoft 365 sanitizer rules to support Graph “advanced query” usage by allowing the $filter query param (for directory listing partitioning) and explicitly allowlisting the ConsistencyLevel request header so it can be forwarded when required by Graph APIs.

Changes:

  • Allow $filter for MSFT directory listing endpoints (Java rules + YAML rule definitions).
  • Allowlist ConsistencyLevel as an allowed request header for relevant MSFT endpoints.
  • Update MSFT rules tests/examples to include $filter-based user enumeration scenarios.

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
java/core/src/test/java/co/worklytics/psoxy/rules/msft/OneDriveTests.java Adds an invocation example using $filter for /users enumeration.
java/core/src/test/java/co/worklytics/psoxy/rules/msft/OneDrive_NoAppIds_Tests.java Mirrors $filter invocation example for the no-app-ids OneDrive ruleset.
java/core/src/test/java/co/worklytics/psoxy/rules/msft/EntraIDTests.java Reworks the $filter test to validate sanitization rather than blocking.
java/core/src/main/java/co/worklytics/psoxy/rules/msft/PrebuiltSanitizerRules.java Allows $filter for Entra ID users endpoints and allowlists ConsistencyLevel header across several MSFT endpoints.
docs/sources/microsoft-365/outlook-mail/outlook-mail.yaml Adds $filter and allowlists ConsistencyLevel header for applicable endpoints.
docs/sources/microsoft-365/outlook-mail/outlook-mail_no-app-ids.yaml Same as above for no-app-ids variant.
docs/sources/microsoft-365/outlook-mail/outlook-mail_no-app-ids_no-groups.yaml Same as above for no-app-ids/no-groups variant.
docs/sources/microsoft-365/outlook-cal/outlook-cal.yaml Adds $filter and allowlists ConsistencyLevel header.
docs/sources/microsoft-365/outlook-cal/outlook-cal_no-app-ids.yaml Same as above for no-app-ids variant.
docs/sources/microsoft-365/outlook-cal/outlook-cal_no-app-ids_no-groups.yaml Same as above for no-app-ids/no-groups variant.
docs/sources/microsoft-365/msft-teams/msft-teams.yaml Allowlists ConsistencyLevel header and adds $filter where needed.
docs/sources/microsoft-365/msft-teams/msft-teams_no-userIds.yaml Same as above for no-userIds variant.
docs/sources/microsoft-365/msft-onedrive/msft-onedrive.yaml Adds $filter (users) and allowlists ConsistencyLevel header for select endpoints.
docs/sources/microsoft-365/msft-onedrive/msft-onedrive_no-app-ids.yaml Same as above for no-app-ids variant.
docs/sources/microsoft-365/msft-copilot/msft-copilot.yaml Adds $filter and allowlists ConsistencyLevel header.
docs/sources/microsoft-365/msft-copilot/msft-copilot_no-userIds.yaml Same as above for no-userIds variant.
docs/sources/microsoft-365/entra-id/entra-id.yaml Adds $filter and allowlists ConsistencyLevel header.
docs/sources/microsoft-365/entra-id/entra-id_no-app-ids.yaml Same as above for no-app-ids variant.
docs/sources/microsoft-365/entra-id/entra-id_no-app-ids_no-orig.yaml Same as above for no-app-ids/no-orig variant.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +72 to +79
allowedQueryParams:
- "$top"
- "$select"
- "$skiptoken"
- "$orderby"
- "$count"
allowedRequestHeaders:
- "ConsistencyLevel"
Comment on lines +75 to +82
allowedQueryParams:
- "$top"
- "$select"
- "$skiptoken"
- "$orderby"
- "$count"
allowedRequestHeaders:
- "ConsistencyLevel"
Comment on lines 90 to 94
static final Endpoint ENTRA_ID_USERS = Endpoint.builder()
.pathRegex(ENTRA_ID_REGEX_USERS)
.allowedQueryParams(List.of("$top", "$select", "$skiptoken", "$orderBy", "$count"))
.allowedQueryParams(List.of("$top", "$select", "$skiptoken", "$orderBy", "$count", "$filter"))
.allowedRequestHeaders(CONSISTENCY_LEVEL_HEADER)
.transforms(USER_TRANSFORMS)
@aperez-worklytics
aperez-worklytics merged commit c0c4def into rc-v0.6.9 Jul 31, 2026
121 checks passed
@aperez-worklytics
aperez-worklytics deleted the msft_users_filter branch July 31, 2026 11:53
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.

3 participants