Skip to content

Network - 27001 - TLS inspection bypass policies are regularly reviewed to prevent security protection gaps#892

Open
praneeth-0000 wants to merge 3 commits intomainfrom
Feature-27001
Open

Network - 27001 - TLS inspection bypass policies are regularly reviewed to prevent security protection gaps#892
praneeth-0000 wants to merge 3 commits intomainfrom
Feature-27001

Conversation

@praneeth-0000
Copy link
Collaborator

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new test (Test-Assessment.27001) for Global Secure Access that validates TLS inspection bypass policies are regularly reviewed to prevent security protection gaps. The test checks whether TLS inspection policies containing custom bypass rules have been reviewed (modified) within the last 90 days, as stale bypass rules can create security blind spots.

Changes:

  • New PowerShell test function that queries TLS inspection policies via Microsoft Graph beta API, filters custom bypass rules (excluding auto-created system rules), and reports policies not modified in over 90 days
  • Markdown documentation explaining the security rationale and providing remediation guidance
  • Test metadata indicating Medium risk level, Medium implementation cost, and requires Entra Premium Internet Access license

Reviewed changes

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

File Description
src/powershell/tests/Test-Assessment.27001.ps1 Implements the test logic to retrieve TLS inspection policies and their rules, filter custom bypass rules, calculate days since last modification, and generate pass/fail results with detailed markdown reporting
src/powershell/tests/Test-Assessment.27001.md Provides security context explaining why regular review of TLS bypass rules is critical and lists remediation steps including links to Microsoft Learn documentation

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

@praneeth-0000 praneeth-0000 marked this pull request as draft February 13, 2026 03:59
@praneeth-0000 praneeth-0000 marked this pull request as ready for review February 13, 2026 06:43
@praneeth-0000 praneeth-0000 requested a review from merill February 13, 2026 07:12
@praneeth-0000 praneeth-0000 added the ready for review PR is ready for review and merging label Feb 13, 2026
Copy link
Collaborator

@alexandair alexandair left a comment

Choose a reason for hiding this comment

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

@praneeth-0000 Please, address my feedback.

Current Behavior: The Invoke-ZtGraphRequest call is wrapped in a try/catch block that logs a warning. If the call fails (e.g., due to 403 Forbidden or API outage), $tlsInspectionPolicies remains $null. The subsequent check if (-not $tlsInspectionPolicies ...) then causes the test to return SkippedBecause NotApplicable.

Problem: This masks actual errors (like missing permissions) as "Not Applicable," which falsely implies the feature is not in use. "Not Applicable" should only be returned when the API successfully returns 0 items.

Remediation: Use the variable $errorMsg to capture the exception in the catch block. In the Assessment Logic, check if $errorMsg is populated. If it is, fail the test or report the error explicitly, rather than skipping it.

Suggestion: Check if networkAccess/tlsInspectionPolicies?$expand=policyRules is supported to fetch all data in one query, reducing execution time and API throttling risk.

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

Labels

ready for review PR is ready for review and merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants