Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 8, 2026

Review comment on PR #747 questioned whether /16 CIDR ranges should be flagged as "overly permissive" given the logic uses <= 16. The original documentation was ambiguous about this design decision.

Changes Reviewed

  • Enhanced function documentation (lines 44-49): Added .DESCRIPTION section explicitly stating that /16 itself (65,536 IPs) is intentionally included as overly permissive, along with broader ranges like /15, /14, etc.
  • Clarified .OUTPUTS section: More detailed True/False conditions showing exact threshold behavior

The updated documentation removes ambiguity about the design decision—/16 ranges ARE intentionally treated as overly permissive per the <= 16 logic.

function Test-IsBroadCidr {
    <#
    .SYNOPSIS
        Checks if a CIDR range is overly permissive (/16 or broader).
    .DESCRIPTION
        CIDR ranges with prefix length <= 16 are treated as overly permissive.
        This includes /16 itself (65,536 IPs) and any broader ranges such as /15, /14, etc.
    .OUTPUTS
        System.Boolean
        True  - CIDR prefix length <= 16
        False - CIDR prefix length > 16 or invalid format
    #>
    param([string]$Cidr)
    if ($Cidr -match '/(\d+)$') { return ([int]$matches[1] -le 16) }
    return $false
}

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI self-assigned this Jan 8, 2026
Copilot AI changed the title [WIP] Update Entra Private Access Application segments based on feedback Confirm documentation updates for Test-IsBroadCidr function Jan 8, 2026
Copilot AI requested a review from aahmed-spec January 8, 2026 05:32
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.

2 participants