security-scan

Audits PowerShell scripts for safe execution policies and destructive commands.

Updated Mar 19, 2026
One-click install
npx skills add https://github.com/espensev/ai-skills --skill security-scan-espensev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: security-scan
Source: https://github.com/espensev/ai-skills/tree/main/gemini-skills/skills/security-scan
Command: npx skills add https://github.com/espensev/ai-skills --skill security-scan-espensev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Protect protected workspaces by auditing PowerShell automation scripts for safe execution policies and forbidding destructive commands.

Core Features & Use Cases

  • Verifies execution policy adherence and read-only boundaries during script runs.
  • Detects potentially destructive commands like Remove-Item, Set-Content, Move-Item, git clean, or git reset and flags INVALID scripts.
  • Provides safe defaults and integration with Verify-ReadOnly.ps1 for reliable validation.

Quick Start

Run security-scan to audit PowerShell scripts and enforce read-only safeguards against destructive commands.

Frequently Asked Questions about security-scan

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit PowerShell scripts for destructive commands before execution?

To audit PowerShell scripts for destructive commands, you run a security scan that checks for operations like Remove-Item, Set-Content, Move-Item, git clean, or git reset. It flags these scripts as INVALID to enforce safe execution policies and maintain read-only boundaries.

What is a read-only guardrail in PowerShell automation?

A read-only guardrail in PowerShell automation is a pre-flight policy validation check that ensures scripts operate within safe execution boundaries. It prevents destructive commands from running in protected paths, satisfying requirements for non-destructive testing and repository maintenance.

How do I enforce execution policy adherence for workstation automation scripts?

Enforcing execution policy adherence for workstation automation scripts requires applying pre-flight checks and policy validation. This process verifies that the script respects read-only boundaries and provides safe defaults to ensure reliable, non-destructive validation.

Does PowerShell script safety scanning work with protected git worktrees?

Yes, PowerShell script safety scanning works with protected git worktrees by applying explicit guards against dangerous commands. It validates execution policies and prevents destructive git operations like git clean or git reset within those protected paths.

What are the limitations of non-destructive testing for PowerShell scripts?

The limitations of non-destructive testing for PowerShell scripts involve relying on predefined safe defaults and explicit guards against known dangerous commands. It focuses on policy validation and read-only enforcement rather than catching novel or dynamically generated malicious code.