You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Shared Write-SecurityLog function created in SecurityHelpers.psm1 (scripts/security/Modules/)
CIHelpers.psm1 exists with CI platform detection and annotation functions
Remaining:
Test-DependencyPinning.ps1 still contains local Write-PinningLog function (~25 lines)
Test-SHAStaleness.ps1 still contains local Write-SecurityLog function (~25 lines)
Neither script imports the shared module or uses the consolidated function
No Write-ScriptLog equivalent added to LintingHelpers.psm1 as originally proposed
Issue Description
Multiple PowerShell scripts define nearly identical logging functions that support GitHub Actions, Azure DevOps, and console output formats. Write-PinningLog in scripts/security/Test-DependencyPinning.ps1 and Write-SecurityLog in scripts/security/Test-SHAStaleness.ps1 share the same structure and should be consolidated into a single shared function in scripts/linting/Modules/LintingHelpers.psm1.
Note
Partial Completion Status (assessed 2026-02-13)
Completed:
Write-SecurityLogfunction created inSecurityHelpers.psm1(scripts/security/Modules/)CIHelpers.psm1exists with CI platform detection and annotation functionsRemaining:
Test-DependencyPinning.ps1still contains localWrite-PinningLogfunction (~25 lines)Test-SHAStaleness.ps1still contains localWrite-SecurityLogfunction (~25 lines)Write-ScriptLogequivalent added toLintingHelpers.psm1as originally proposedIssue Description
Multiple PowerShell scripts define nearly identical logging functions that support GitHub Actions, Azure DevOps, and console output formats.
Write-PinningLoginscripts/security/Test-DependencyPinning.ps1andWrite-SecurityLoginscripts/security/Test-SHAStaleness.ps1share the same structure and should be consolidated into a single shared function inscripts/linting/Modules/LintingHelpers.psm1.Additional Context
Current duplication:
Test-DependencyPinning.ps1:Write-PinningLog(~25 lines)Test-SHAStaleness.ps1:Write-SecurityLog(~25 lines)Recommended approach:
Write-ScriptLogtoLintingHelpers.psm1with-Level(Info/Warning/Error/Debug) and-OutputFormat(github/azdo/console) parametersTesting:
npm run pesterto verify existing tests pass