microsoft / PSRule

Validate infrastructure as code (IaC) and objects using PowerShell rules.

Home Page:https://microsoft.github.io/PSRule/v2/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow disabling PowerShell features that can be run from a repository

BernieWhite opened this issue · comments

Provide an option to disable PowerShell-based rules and conventions from being run from the current repository.

This allows customers to harden security within their DevOps pipelines.

Expose an option (Execution.RestrictScriptSource) to:

  • Unrestricted - Allow running of PowerShell rules and conventions from the workspace and installed modules.
  • ModuleOnly - Allow running of PowerShell rules and conventions from installed modules only.
  • DisablePowerShell - Do not allow running of any PowerShell rules and conventions, only YAML and JSON based rules and resources will be allowed.

This will allow customers additional options above the existing Execution.LanguageMode option.