Skip to content

fix: resolve all 17 PSScriptAnalyzer code scanning findings - #343

Merged
blindzero merged 1 commit into
mainfrom
claude/wonderful-bell-1u0xjp
Oct 31, 2026
Merged

blindzero merged 1 commit into
mainfrom
claude/wonderful-bell-1u0xjp

Conversation

@blindzero

Copy link
Copy Markdown
Owner

Summary

Resolves all 17 open GitHub Code Scanning alerts raised by PSScriptAnalyzer across three provider files.

Motivation

The CI lint step flags these findings as warnings. With FailOnSeverity=Warning they would break the build, and the GitHub Code Scanning dashboard shows 17 open alerts. Fixing them keeps the codebase clean and the alert list empty.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Refactoring / internal improvement

Changes

  • New-IdleEntraIDAdapter.ps1: remove aligned whitespace before =; replace empty catch { } blocks with catch { $var = $null } (same runtime behaviour, satisfies PSAvoidUsingEmptyCatchBlock)
  • New-IdleEntraIDIdentityProvider.ps1: remove alignment spacing in $groupOperations/$administrativeUnitResults declarations (two occurrences); refactor multi-line -or expression into a single line via $kindIsEmpty helper to eliminate continuation-line indentation findings
  • New-IdleEntraConnectDirectorySyncProvider.ps1: extract inline script blocks passed as arguments to InvokeRemoteCommand into named variables ($syncScript, $schedulerScript) so PSScriptAnalyzer can verify their indentation consistently

Testing

  • Unit tests — Invoke-IdlePesterTests.ps1: 904 passed, 0 failed
  • Contract tests
  • Manual testing

How to test & review

Run locally:

pwsh -NoProfile -File ./tools/Invoke-IdleScriptAnalyzer.ps1
pwsh -NoProfile -File ./tools/Invoke-IdlePesterTests.ps1

Both should report zero findings / zero failures.

Checklist

  • Code follows STYLEGUIDE.md
  • Tests added or updated
  • Documentation updated
  • No UI/auth logic added to IdLE.Core
  • No breaking changes without discussion

Related Issues

No related issue — these are pure linting fixes surfaced by GitHub Code Scanning.



Generated by Claude Code

- New-IdleEntraIDAdapter.ps1: fix aligned-assignment whitespace and replace
  empty catch blocks with explicit null assignments to satisfy
  PSAvoidUsingEmptyCatchBlock without changing behaviour
- New-IdleEntraIDIdentityProvider.ps1: remove alignment spacing before = in
  groupOperations/administrativeUnitResults declarations; refactor multi-line
  -or expression to single-line via $kindIsEmpty helper to fix
  PSUseConsistentIndentation on continuation lines
- New-IdleEntraConnectDirectorySyncProvider.ps1: extract inline script blocks
  passed as arguments to InvokeRemoteCommand into named variables so that
  PSScriptAnalyzer can consistently verify their indentation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GwCt3MWjHysJWoaP4Nrzrk
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-31T21:59:43.647881Z b6f0953 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@claude

claude Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Verdict: PASS

Behaviour-preserving lint fixes (whitespace, explicit $null in catch blocks, extracted script blocks, single-line -or expressions) with no security, architecture or contract impact.

Findings: none.

@github-actions

Copy link
Copy Markdown

Code Coverage Report

Overall Project 74.45% 🍏

There is no coverage information present for the Files changed

@blindzero
blindzero merged commit 31b794b into main Oct 31, 2026
6 checks passed
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