Update logic for AS04 check in EIDSCA and format of cmdlet header#1584
Update logic for AS04 check in EIDSCA and format of cmdlet header#1584
Conversation
- Updated function definitions in multiple scripts to remove hidden characters. - Improved documentation formatting in the @templateps1.txt and various test scripts. - Adjusted logic in Test-MtEidscaAS04.ps1 to use select-object for unique values.
Up to standards ✅🟢 Issues
|
Deploying maester with
|
| Latest commit: |
d516680
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c8b5699a.maester.pages.dev |
| Branch Preview URL: | https://tnh-eidscaas04.maester.pages.dev |
|
@SamErde: There have been some updates to
Several changes which has been made directly in Maester has been updated in the original source of EIDSCA now. Could you please review the PR and the described changes? |
…fined in EIDSCA schema now
There was a problem hiding this comment.
Pull request overview
This PR updates the EIDSCA test suite and its generator/templates by removing hidden characters from function declarations, adjusting formatting in generated headers/docs, and updating the AS04 check to account for multiple includeTargets values.
Changes:
- Remove hidden BOM/zero-width characters from many EIDSCA internal test function headers and reformat cmdlet help headers.
- Update EIDSCA.AS04 logic/docs to treat
.includeTargets.isUsableForSignInas potentially multi-valued (viaSelect-Object -Unique). - Adjust the EIDSCA test-generation script formatting/regexes and update how it emits the
BeforeDiscoveryblock.
Reviewed changes
Copilot reviewed 49 out of 50 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| website/docs/tests/eidsca/EIDSCA.AS04.md | Updates AS04 docs “Setting” field to reflect uniqueness handling. |
| tests/EIDSCA/Test-EIDSCA.Generated.Tests.ps1 | Updates generated EIDSCA Pester tests (discovery + AS04 comment snippet). |
| powershell/public/eidsca/Test-MtEidscaControl.ps1 | Re-formats comment-based help header placement/format. |
| powershell/internal/eidsca/Test-MtEidscaST09.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/Test-MtEidscaST08.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/Test-MtEidscaPR06.ps1 | Removes hidden character + tweaks “not set” detection logic. |
| powershell/internal/eidsca/Test-MtEidscaPR05.ps1 | Removes hidden character + tweaks “not set” detection logic. |
| powershell/internal/eidsca/Test-MtEidscaPR03.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/Test-MtEidscaPR02.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/Test-MtEidscaPR01.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/Test-MtEidscaCR04.ps1 | Removes hidden character + tweaks “not set” detection logic. |
| powershell/internal/eidsca/Test-MtEidscaCR03.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/Test-MtEidscaCR02.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/Test-MtEidscaCR01.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/Test-MtEidscaCP04.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/Test-MtEidscaCP03.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/Test-MtEidscaCP01.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/Test-MtEidscaAV01.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/Test-MtEidscaAT02.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/Test-MtEidscaAT01.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/Test-MtEidscaAS04.ps1 | Updates AS04 logic/docs to use Select-Object -Unique for multi-target values. |
| powershell/internal/eidsca/Test-MtEidscaAS04.md | Updates AS04 markdown “Test script” snippet to reflect uniqueness handling. |
| powershell/internal/eidsca/Test-MtEidscaAP14.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/Test-MtEidscaAP10.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/Test-MtEidscaAP09.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/Test-MtEidscaAP08.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/Test-MtEidscaAP07.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/Test-MtEidscaAP06.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/Test-MtEidscaAP05.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/Test-MtEidscaAP04.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/Test-MtEidscaAP01.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/Test-MtEidscaAM10.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/Test-MtEidscaAM09.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/Test-MtEidscaAM07.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/Test-MtEidscaAM06.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/Test-MtEidscaAM04.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/Test-MtEidscaAM03.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/Test-MtEidscaAM02.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/Test-MtEidscaAM01.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/Test-MtEidscaAG03.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/Test-MtEidscaAG02.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/Test-MtEidscaAG01.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/Test-MtEidscaAF06.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/Test-MtEidscaAF05.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/Test-MtEidscaAF04.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/Test-MtEidscaAF03.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/Test-MtEidscaAF02.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/Test-MtEidscaAF01.ps1 | Removes hidden character before function keyword. |
| powershell/internal/eidsca/@templateps1.txt | Re-formats template help text indentation (but still contains BOM). |
| build/eidsca/Update-EidscaTests.ps1 | Updates generator formatting, MITRE/title regex, and emitted BeforeDiscovery header. |
Comments suppressed due to low confidence (1)
build/eidsca/Update-EidscaTests.ps1:75
- In
GetRecommendedValueMarkdown, the numeric-comparison branch (theStartsWith('>')/StartsWith('<')block) references$RecommendedValuewhen composing the markdown, but that variable isn’t defined in this function. This causes missing/incorrect markdown for numeric recommended values. Please use the parameter ($RecommendedValueMarkdown) or extract the numeric portion before composing the string.
if ($RecommendedValueMarkdown -like "@('*,*')") {
$RecommendedValueMarkdown = $RecommendedValueMarkdown -replace "@\(", "" -replace "\)", ""
return "$RecommendedValueMarkdown"
} elseif ($RecommendedValueMarkdown.StartsWith(">") -or $RecommendedValueMarkdown.StartsWith("<")) {
$RecommendedValueText = (GetCompareOperator($RecommendedValueMarkdown)).Text
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
SamErde
left a comment
There was a problem hiding this comment.
It looks like a copy/paste issue added the text select-object -unique in several places unintentionally. See examples at:
- https://github.com/maester365/maester/pull/1584/changes#diff-97e08097528d09052791d4bbd4480671aa09ceeb4c40d57f6215f194a241ff37R8
- https://github.com/maester365/maester/pull/1584/changes#diff-5a0f63b198f6cafb7165585953ad4038d75cc90cbe314399c16c168fcd92a994R12
- https://github.com/maester365/maester/pull/1584/changes#diff-5a0f63b198f6cafb7165585953ad4038d75cc90cbe314399c16c168fcd92a994R17
- https://github.com/maester365/maester/pull/1584/changes#diff-5a0f63b198f6cafb7165585953ad4038d75cc90cbe314399c16c168fcd92a994R29
- https://github.com/maester365/maester/pull/1584/changes#diff-ac2284571e3aae689fd018ff91ec6b49cacd63e5e32d9ac84e512cf65f047612R372
- https://github.com/maester365/maester/pull/1584/changes#diff-46e8663646817d19a3a47ab43dfeee21289c39612d91a18941af0e81293e1702R27
Fix 1: GetPortalDeepLinkMarkdown - $uri -> $portalDeepLink (Update-EidscaTests.ps1:296) Fix 2: Add try/catch around discovery block (Update-EidscaTests.ps1:495-502) Fix 3: Remove BOM from @templateps1.txt Fix 4: Handle pipeline in %CurrentValue% - template code line (@templateps1.txt:26-28) Fix 5: Handle pipeline in %CurrentValue% - doc/comment contexts (@template.md, @templateps1.txt, test template) Fix 6: Remove BOM from @Test-MtEidscaControl.txt Verify all source file changes are consistent Regenerate output files by running Update-EidscaTests.ps1
Description
Contribution Checklist
Before submitting this PR, please confirm you have completed the following:
/powershell/tests/pester.ps1on your local system.Join us at the Maester repository discussions 💬 or Entra Discord 🧑💻 for more help and conversations!