Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion scripts/main.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[CmdletBinding()]
param()

$PSStyle.OutputRendering = 'Ansi'
Install-PSResource -Repository PSGallery -TrustRepository -Name Net
Install-PSResource -Repository PSGallery -TrustRepository -Name PublicIP
Copy link

Copilot AI Oct 4, 2025

Choose a reason for hiding this comment

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

Installing modules without version pinning poses security risks. Consider specifying exact versions or version ranges to ensure reproducible builds and prevent potential supply chain attacks.

Suggested change
Install-PSResource -Repository PSGallery -TrustRepository -Name PublicIP
Install-PSResource -Repository PSGallery -TrustRepository -Name PublicIP -RequiredVersion 2.1.0

Copilot uses AI. Check for mistakes.
Comment on lines +4 to +5
Copy link

Copilot AI Oct 4, 2025

Choose a reason for hiding this comment

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

Module installation commands lack error handling. If installation fails, subsequent Get-NetIPConfiguration and Get-PublicIP commands will fail. Consider adding try-catch blocks or conditional checks.

Copilot uses AI. Check for mistakes.
Import-Module "$PSScriptRoot/Helpers.psm1"

$CONTEXT_GITHUB = $env:CONTEXT_GITHUB | ConvertFrom-Json -Depth 100
Expand Down Expand Up @@ -69,6 +70,15 @@ LogGroup 'Context: [INPUTS]' {
$env:CONTEXT_INPUTS
}

LogGroup 'Network Info' {
Get-NetIPConfiguration
}

LogGroup 'Public IP Info' {
Get-PublicIP
}
Comment thread
MariusStorhaug marked this conversation as resolved.


LogGroup "File system at [$pwd]" {
Get-ChildItem -Path . -Force | Select-Object -ExpandProperty FullName | Sort-Object
}
Expand Down