Prompt file imported from Azure/Microsoft.AVS.Management (
.github/prompts/pr-review.prompt.md). Copyright stays with the author.
Review the current code changes against the AVS scripting guidelines and PR checklist. Use #tool:get_changed_files to find modified files, then analyze each one.
Check the full guidelines in docs/README.md and the PR checklist in CONTRIBUTING.md.
Checklist
For each changed .psm1 / .ps1 file, verify:
Structure
- Every exported function has
[CmdletBinding()] - Every exported function has
[AVSAttribute(timeout)]with timeout ≤ 60 min - Functions follow
Verb-Nounnaming per PowerShell guidelines - Parameters use only supported types:
String,Double,Boolean,Int32,PSCredential,SecureString - No dynamic or conditional parameters
Security
- All
Stringparameters sanitized withLimit-WildcardsandCodeInjectionCharactersif involved in raw shell operations - Names validated with
Test-AVSProtectedObjectNamebefore create/delete of policies, roles, users - Secrets use
SecureString/PSCredential— never logged or echoed - No calls to
Connect-VIServerorConnect-SsoAdminServer - No elevation of
cloudadminsprivileges - Appliance deployments use
[AVSSecureFolder]for restricted access
Error Handling
- Prerequisites validated before making changes (fail early)
- Changes tracked for rollback on partial failure
- Error messages include the failing entity and context
-
-ErrorAction Stopused for fatal errors
Output
- No unintended pipeline output (captured with
Out-Nullor variables) -
$NamedOutputsused correctly (max 32KB, set withSet-Variable -Scope Global) - No child processes spawned
Documentation & Manifest
- Functions have comment-based help (
.SYNOPSIS,.DESCRIPTION,.PARAMETER) - New functions added to
Export-ModuleMemberandFunctionsToExportin manifest - Module version bumped following semver
Tests
- Pester tests exist for new/modified functions
- The 1ES SDL PSScriptAnalyzer check passes with no errors
Report findings grouped by severity: Blocking (must fix), Warning (should fix), Info (suggestion).
