POWERSHELL 7.4+ SCRIPT REVIEW

Check PowerShell
scripts before
you run them.

PSRafScan reviews AI-generated and manually written PowerShell scripts for parser errors and defined static findings, including unsafe operations, hidden failures, and terminal-paste traps.

Cross-platform on Windows, macOS, and Linux · MIT licensed · No external PowerShell module dependencies

58Active rules
67Self-test definitions
2Intended-use modes
0External PowerShell modules

PSRafScan v0.2.0-alpha1 · Runs on PowerShell 7.4 or later

ANALYSIS MODEL

Two analysis layers.
One clear decision.

Catch syntax errors, find risky or fragile patterns, and get clear guidance for the next revision.

01PARSE

Native parser

PowerShell parser findings identify syntax errors and source locations.

02INSPECT

PSRafScan rules

PSRafScan-owned rules inspect defined safety, correctness, portability, and context patterns.

03IMPROVE

Clear findings

PlainText or JSON results explain what was found, why it matters, and how to improve the script.

Read the complete analysis model

INTENDED USE

Review the script for how it will be used.

A PowerShell script that works well as a saved file can fail when pasted into a live terminal. PSRafScan applies the right checks based on intended use.

SAVED SCRIPT

Ps1File

For source intended to remain a saved .ps1 file.

PASTE-SENSITIVE

TerminalPaste

For source intended to be entered directly in a live PowerShell terminal.

Choose the intended-use mode

REPRESENTATIVE FINDINGS

See what a rule asks you to review.

These examples show how PSRafScan calls attention to hidden errors, destructive file operations, and document markup mixed into executable code.

WarningErrorHandling

SilentErrorAction

Calls attention to -ErrorAction SilentlyContinue when a failure may be hidden.

ErrorFileSystemSafety

RecursiveForceDelete

Calls attention to Remove-Item with both -Recurse and -Force when -WhatIf is absent.

ErrorPasteSafety

MarkdownCodeFence

Finds raw Markdown fence lines that do not belong in executable PowerShell.

Search the complete rule catalog

You can create your own rules and rule self-tests with the included templates, then use the first-party authoring guide to define metadata, trigger and non-trigger cases, expected findings, and lifecycle checks.

Create your own rules and rule self-tests

GUIDED OR DIRECT

Choose the workflow that fits the review.

Run RSX alone for the guided terminal workflow, or provide an existing path and explicit review settings in one command.

GUIDED TERMINAL WORKFLOW

RSX

Choose input, intended use, threshold, report format, and destination through the current guided sequence.

Follow the guided workflow →
DIRECT COMMAND

RSX -Path ./script.ps1 -IntendedUse Ps1File -FailOn Warning

Supply the file, intended use, threshold, and report settings directly for a repeatable review.

Run a scan →
GENERATED CODE

Save, scan, revise, compare, and rescan.

Keep the original response, make focused changes, and compare the revision before testing it in an appropriate environment.

Review AI-generated PowerShell →

START ACCURATELY

Go from requirements to your first report.

Use the documentation for installation, commands, reports, rules, and practical review workflows.