Benign powershell Download

PSComplexity 0.5.1

PowerShell reads a whole filePowerShell writes file with Set-Content
SHA-25628177884d2a92cab5ad2772dc7ca558a4cbe6a456b8d51301d42148176054c70

Evidence

PowerShell serializes objects as JSON Report.ps1 · lines 62–65
62:37… unt
63 # Cast, because Measure-Object returns a double and ConvertTo-Json then writes 9.0
64 # where the schema and every reader expect 9. The averages stay real numbers.
65 maxCyclomatic …
PowerShell HTTP/HTTPS URL literal Report.ps1 · lines 174–179
174:87… on points: each if/elseif, switch clause, loop, catch, trap, ternary and each -and/-or. It is a count of paths, not of how hard the code is to follow.' }
175 helpUri = 'https://github.com/Fortigi/PSComplexity#the-two-metrics'
176 }
177 [ordered]@{
178 id = 'PSCxCognitive'
179 name …
PowerShell writes file with Set-Content Report.ps1 · lines 346–351
346:21… erwise leave the run green and the artefact absent.
347 $json | Set-Content -LiteralPath $Path -Encoding utf8 -ErrorAction Stop
348}
349
350function Read-PSCxDocument {
351 # A JSON document off disk, or a throw …
PowerShell reads file content Report.ps1 · lines 366–371
366:53… Leaf)) {
367 throw "No such file: $Path"
368 }
369 $text = Get-Content -LiteralPath $Path -Raw -ErrorAction Stop
370 # An empty file parses to $null rather than failing, and $null would then be read as a
371 # document wit …
PowerShell contains a line over 1000 characters PSComplexity.psd1 · lines 19–22
19:102… ', 'maintainability', 'lint', 'ci')
20 LicenseUri = 'https://github.com/Fortigi/PSComplexity/blob/main/LICENSE'
21 ProjectUri = 'https://github.com/Fortigi/PSComplexity'
22 ReleaseNotes = '0.5.1: **Scanning is about 30% faster, and no score moves.** Measured over a 235-file repository holding 259,144 AST nodes: **9,737ms to 6,872ms wall, 12,723ms to 9,152ms CPU**, interleaved over three pairs each time. Output is byte-identical -- 1,317 units, every `-Detailed` contribution row included -- and the mutant surface the self-gate measures is unchanged at 572 candidates, which is the check that makes "no score moves" mean something rather than sound reassuring. Nearly all of it was one line. Building the per-file AST index called a PowerShell function **once per node**, and a function with `[CmdletBinding()]` and mandatory parameters costs about 9us to invoke: 2,437ms against 62ms fo …

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.