Skip to content

Conversation

Romanitho
Copy link
Owner

No description provided.

Copy link
Contributor

github-actions bot commented Aug 8, 2025

🦙 MegaLinter status: ⚠️ WARNING

Descriptor Linter Files Fixed Errors Warnings Elapsed time
⚠️ COPYPASTE jscpd yes 3 no 2.14s
⚠️ MARKDOWN markdownlint 2 0 2 0 0.81s
✅ MARKDOWN markdown-link-check 2 0 0 5.09s
✅ MARKDOWN markdown-table-formatter 2 0 0 0 0.25s
✅ POWERSHELL powershell 4 0 0 8.38s
✅ POWERSHELL powershell_formatter 4 0 0 5.87s
⚠️ REPOSITORY checkov yes 3 no 12.76s
⚠️ REPOSITORY devskim yes 1 8 1.38s
✅ REPOSITORY dustilock yes no no 0.01s
✅ REPOSITORY gitleaks yes no no 0.57s
✅ REPOSITORY git_diff yes no no 0.01s
✅ REPOSITORY grype yes no no 24.09s
✅ REPOSITORY kics yes no no 1.61s
✅ REPOSITORY secretlint yes no no 0.49s
✅ REPOSITORY syft yes no no 1.13s
✅ REPOSITORY trivy yes no no 5.26s
✅ REPOSITORY trivy-sbom yes no no 0.1s
✅ REPOSITORY trufflehog yes no no 2.24s
⚠️ SPELL cspell 7 27 0 4.83s
✅ SPELL lychee 2 0 0 0.7s

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

Copy link
Contributor

@Copilot 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 version information to ADMX filenames and removes installation reporting functionality. The main purpose is to make ADMX policy template versions more explicit in release artifacts.

Key changes:

  • Dynamic versioning of ADMX zip files based on the version specified in the ADMX file
  • Removal of GitHub installation counter functionality
  • Minor documentation formatting improvements

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
WAU-MSI_Actions.ps1 Removes installation counter reporting functionality
README.md Updates documentation formatting and GPO list configuration explanation
Sources/Policies/README.md Changes example formatting from dashes to blockquotes
.github/workflows/GitFlow_Nightly-builds.yml Implements dynamic ADMX zip naming with version extraction
.github/workflows/GitFlow_Make-Release-and-Sync-to-Dev.yml Implements dynamic ADMX zip naming with version extraction

Compress-Archive -Path .\Sources\Policies\ADMX -DestinationPath .\WAU_ADMX.zip -Force
$admxPath = ".\Sources\Policies\ADMX\WAU.admx"
try {
(Get-Content $admxPath -Raw -ErrorAction Stop) -match 'revision="([\d\.]+)"' | Out-Null
Copy link
Preview

Copilot AI Aug 9, 2025

Choose a reason for hiding this comment

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

The regex pattern should escape the dot character properly. The current pattern [\d\.]+ allows dots anywhere in the version string, but version numbers typically follow semantic versioning patterns. Consider using a more specific pattern like ([0-9]+(?:\.[0-9]+)*) to match proper version formats.

Suggested change
(Get-Content $admxPath -Raw -ErrorAction Stop) -match 'revision="([\d\.]+)"' | Out-Null
(Get-Content $admxPath -Raw -ErrorAction Stop) -match 'revision="([0-9]+(?:\.[0-9]+)*)"' | Out-Null

Copilot uses AI. Check for mistakes.

Compress-Archive -Path .\Sources\Policies\ADMX -DestinationPath .\WAU_ADMX.zip -Force
$admxPath = ".\Sources\Policies\ADMX\WAU.admx"
try {
(Get-Content $admxPath -Raw -ErrorAction Stop) -match 'revision="([\d\.]+)"' | Out-Null
Copy link
Preview

Copilot AI Aug 9, 2025

Choose a reason for hiding this comment

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

The regex pattern should escape the dot character properly. The current pattern [\d\.]+ allows dots anywhere in the version string, but version numbers typically follow semantic versioning patterns. Consider using a more specific pattern like ([0-9]+(?:\.[0-9]+)*) to match proper version formats.

Suggested change
(Get-Content $admxPath -Raw -ErrorAction Stop) -match 'revision="([\d\.]+)"' | Out-Null
(Get-Content $admxPath -Raw -ErrorAction Stop) -match 'revision="([0-9]+(?:\.[0-9]+)*)"' | Out-Null

Copilot uses AI. Check for mistakes.

Comment on lines +163 to +165
(Get-Content $admxPath -Raw -ErrorAction Stop) -match 'revision="([\d\.]+)"' | Out-Null
$ADMXversion = $matches[1]
$admxZip = "WAU_ADMX_$($ADMXversion).zip"
Copy link
Preview

Copilot AI Aug 9, 2025

Choose a reason for hiding this comment

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

The regex match result is not being validated. If the match fails, $matches[1] on line 164 will be undefined, potentially causing an error. Consider checking if the match was successful before accessing $matches[1].

Suggested change
(Get-Content $admxPath -Raw -ErrorAction Stop) -match 'revision="([\d\.]+)"' | Out-Null
$ADMXversion = $matches[1]
$admxZip = "WAU_ADMX_$($ADMXversion).zip"
$admxContent = Get-Content $admxPath -Raw -ErrorAction Stop
if ($admxContent -match 'revision="([\d\.]+)"') {
$ADMXversion = $matches[1]
$admxZip = "WAU_ADMX_$($ADMXversion).zip"
} else {
throw "Could not find revision in ADMX file."
}

Copilot uses AI. Check for mistakes.

@Romanitho Romanitho merged commit b1388ac into develop Aug 9, 2025
2 checks passed
@Romanitho Romanitho deleted the feature/admx_version branch August 9, 2025 13:41
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.

1 participant