Skip to content

Consolidate cross-product maintainer skills - #5

Closed
Cj-Scott wants to merge 1 commit into
mainfrom
cj-scott-review-defender-plan-alignment
Closed

Cj-Scott wants to merge 1 commit into
mainfrom
cj-scott-review-defender-plan-alignment

Conversation

@Cj-Scott

@Cj-Scott Cj-Scott commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Promote API and cmdlet integration guidance into a universal maintainer skill.
  • Add a universal HTML/JSON evidence-reporting contract with redaction, retries, and readback requirements.
  • Make tenant identity and {TenantDomain} encryption-rights handling universal.
  • Reconcile imported Purview skills with shared routing, templates, and engineering contracts.

Validation

  • git diff --check passed.
  • Targeted merger-file and reference checks passed.
  • scripts/verify-internal.ps1 could not run because the environment lacks a working PowerShell 7 runtime; Windows PowerShell 5.1 is rejected by the script.

assistance: agentic-cli
type: refactor
agent-tool: copilot-cli
agent-model: gpt-5.6-luna
work-item: AB#n/a

…ations

- Introduced Connect-DefenderServices.ps1 for establishing Defender service connections and verifying tenant scope.
- Added DefenderRunLog.ps1 for structured logging of Defender deployments, including JSON output and sensitive data protection.
- Implemented Invoke-WithTransientRetry.ps1 to handle transient errors during API operations with retry logic.
- Created Setup-DefenderForBusiness.ps1, Setup-DefenderForCloudApps.ps1, Setup-DefenderPreflight.ps1, Setup-MdeAdvanced.ps1, Setup-MdoEopBaseline.ps1 for various Defender setup operations with logging.
- Developed Write-DefenderHtmlReport.ps1 to generate HTML reports from logging entries, enhancing visibility into deployment outcomes.
@Cj-Scott
Cj-Scott requested review from a team and a lite review from Copilot August 5, 2026 15:28

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.

🟡 Changes recommended

There are confirmed noninteractive-mode correctness and evidence redaction gaps (plus retry/logging contract mismatches) that should be addressed before approval.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Pull request overview

This PR introduces a new Defender product scaffold alongside existing Purview automation, aiming to align cross-product engineering contracts (preflight/readiness checks, structured evidence logging/reporting, retry boundaries) and to extend repository verification to validate the Defender scaffold.

Changes:

  • Add a new Products/Defender/ product boundary with an orchestrator, config contract, run-log (JSON) + HTML evidence reporting, connection helpers, and placeholder setup modules.
  • Extend scripts/verify.ps1 to validate the Defender scaffold contract and exercise a logger/report redaction fixture.
  • Update CHANGELOG.md (Unreleased) and ignore .impeccable/ in .gitignore.
File summaries
File Description
scripts/verify.ps1 Adds Defender scaffold contract checks + a JSON/HTML logging fixture assertion.
Products/Defender/Deploy-DefenderBestPractice.ps1 New Defender orchestrator: config contract validation, safety gates, module runner, report generation.
Products/Defender/Config/DefenderConfig.psd1 Defines Defender config schema (BP items, license capability metadata, API readiness, report paths).
Products/Defender/Modules/Connect-DefenderServices.ps1 Graph connection + tenant identity verification + Graph request wrapper.
Products/Defender/Modules/DefenderRunLog.ps1 New structured run log with redaction and JSON persistence.
Products/Defender/Modules/Invoke-WithTransientRetry.ps1 New retry boundary for transient API/cmdlet operations.
Products/Defender/Modules/Write-DefenderHtmlReport.ps1 New HTML evidence report renderer with encoding + identity masking.
Products/Defender/Modules/Setup-DefenderPreflight.ps1 Read-only preflight (API readiness + license inventory + guided-only dispositions).
Products/Defender/Modules/Setup-MdoEopBaseline.ps1 Placeholder module emitting run-log entry (no enforcement yet).
Products/Defender/Modules/Setup-DefenderForBusiness.ps1 Placeholder module emitting run-log entry (no enforcement yet).
Products/Defender/Modules/Setup-MdeAdvanced.ps1 Placeholder module emitting run-log entry (no enforcement yet).
Products/Defender/Modules/Setup-DefenderForCloudApps.ps1 Placeholder module emitting run-log entry (no enforcement yet).
CHANGELOG.md Adds Unreleased notes documenting the Defender foundation + redaction/safety stance.
.gitignore Ignores .impeccable/.
Review details
  • Files reviewed: 13/14 changed files
  • Comments generated: 5
  • Review effort level: Lite

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

Comment on lines +39 to +41
else {
Connect-MgGraph -Scopes $Scopes -NoWelcome -ErrorAction Stop
}
Comment on lines +88 to +90
Add-DefenderRunLogEntry -Module 'Setup-DefenderPreflight' `
-Action 'ApiCapability' -Status 'Succeeded' `
-Detail "Graph context available. AuthenticationType=$($graphContext.AuthType); Account=$($graphContext.Account)."
Comment on lines +111 to +113
if (-not $Context) {
throw 'F6 requires orchestrator context for Graph authentication.'
}
NonInteractive = $NonInteractive
ConnectGraph = $true
}
$connection = & $connectScript @connectArgs
Comment on lines +16 to +30
try {
return & $Action
}
catch {
$status = Get-DefenderHttpStatusCode -ErrorRecord $_
$transient = $status -in @(408, 429, 500, 502, 503, 504)
if (-not $transient -or $attempt -eq $MaxAttempts) {
throw
}

Add-DefenderRunLogEntry -Module 'Invoke-WithTransientRetry' `
-Action $Description -Status 'Retried' -Attempt $attempt `
-HttpStatusCode $status -Detail $_.Exception.Message
Start-Sleep -Seconds ([math]::Min(30, [math]::Pow(2, $attempt)))
}
@Cj-Scott

Cj-Scott commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator Author

Closing this public-repository PR; development will continue in the private repository until publication is approved.

@Cj-Scott Cj-Scott closed this Aug 5, 2026
@Cj-Scott
Cj-Scott deleted the cj-scott-review-defender-plan-alignment branch August 5, 2026 15:52
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