Change log#
See upgrade notes for helpful information when upgrading from previous versions.
Experimental features:
- Baseline groups allow you to use a friendly name to reference baselines. See baselines for more information.
- Functions within YAML and JSON expressions can be used to perform manipulation prior to testing a condition. See functions for more information.
- Sub-selectors within YAML and JSON expressions can be used to filter rules and list properties. See sub-selectors for more information.
-
Processing of changes files only within a pipeline. See creating your pipeline for more information.
Unreleased#
- Engineering:
- Bump YamlDotNet to v16.1.3. #1874
v3.0.0-B0275 (pre-release)#
What's changed since pre-release v3.0.0-B0267:
- New features:
- Allow CLI upgrade command to upgrade a single module by @BernieWhite.
#2551
- A single or specific modules can be upgraded by name when using
module upgrade
. - By default, all modules are upgraded.
- A single or specific modules can be upgraded by name when using
- Allow CLI to install pre-release modules by @BernieWhite.
#2550
- Add and upgrade pre-release modules with
--prerelease
. - Pre-release modules will be restored from the lock file with
module restore
.
- Add and upgrade pre-release modules with
- Allow CLI upgrade command to upgrade a single module by @BernieWhite.
#2551
- General improvements:
- Breaking change: Empty version comparison only accepts stable versions by default by @BernieWhite.
#2557
version
andapiVersion
assertions only accept stable versions by default for all cases.- Pre-release versions can be accepted by setting
includePrerelease
totrue
.
- Breaking change: Empty version comparison only accepts stable versions by default by @BernieWhite.
#2557
- Bug fixes:
- Fixed CLI upgrade uses pre-release module by @BernieWhite. #2549
v3.0.0-B0267 (pre-release)#
What's changed since pre-release v3.0.0-B0203:
- New features:
- Added option to configure the severity level that PSRule will break the pipeline at by @BernieWhite.
#1508
- Previously only rules with the severity level
Error
would break the pipeline. - With this update rules with the severity level
Error
that fail will break the pipeline by default. - The
Execution.Break
option can be set toNever
,OnError
,OnWarning
, orOnInformation
. - If a rule fails with a severity level equal or higher than the configured level the pipeline will break.
- Previously only rules with the severity level
- Added option to configure the severity level that PSRule will break the pipeline at by @BernieWhite.
#1508
- General improvements:
- Breaking change: Improve scope handling for correctly handling cases with multiple module by @BernieWhite.
#1215
- As a result of this change:
- The
binding
property can no longer be used within baselines. - Custom inline script blocks can no longer be used for custom binding.
- The
- Use module configuration or workspace to configure binding options instead.
- As a result of this change:
- Added support for native logging within emitters by @BernieWhite. #1837
- Breaking change: Improve scope handling for correctly handling cases with multiple module by @BernieWhite.
#1215
- Engineering:
- Bump xunit to v2.9.0. #1869
- Bump xunit.runner.visualstudio to v2.8.2. #1869
- Bump System.Drawing.Common to v8.0.8. #1887
- Bump YamlDotNet to v15.3.0. #1856
- Bump Microsoft.CodeAnalysis.Common to v4.10.0. #1854
- Bump Pester to v5.6.1. #1872
- Bump PSScriptAnalyzer to v1.22.0. #1858
- Bump BenchmarkDotNet from 0.13.12 to 0.14.0. #1886
- Bug fixes:
- Fixed CLI exception the term Find-Module is not recognized by @BernieWhite. #1860
- Fixed aggregation of reasons with
$Assert.AnyOf()
by @BernieWhite. #1829 - Added
Problem
to validate sets ofOutputOutcome
by @nightroman #2542
v3.0.0-B0203 (pre-release)#
What's changed since pre-release v3.0.0-B0198:
- New features:
- Breaking change: Simplify handling of inputs from files using emitters by @BernieWhite.
#1179
- Files are automatically read from input paths and emitted as objects to the pipeline.
- Emitter interface can be used to implement custom file readers and expansion of custom file types.
- The
File
andDetect
input formats are no longer required and have been removed. - Processing files and objects with rules is no longer recommended, and disabled by default.
- The
Input.FileObjects
can be set totrue
to enable processing of files as objects with rules.
- Breaking change: Simplify handling of inputs from files using emitters by @BernieWhite.
#1179
- Bug fixes:
- Fixed reason reported for
startsWith
by @BernieWhite. #1818 - Fixes CSV output of multiple lines by @BernieWhite. #1627
- Fixed reason reported for
v3.0.0-B0198 (pre-release)#
What's changed since pre-release v3.0.0-B0153:
- Engineering:
- Bug fixes:
- Fixed discovery of installed modules in CLI by @BernieWhite. #1779
- Fixed for git head in tests by @BernieWhite. #1801
v3.0.0-B0153 (pre-release)#
What's changed since pre-release v3.0.0-B0151:
- Bug fixes:
- Fixes null references for CLI module handling by @BernieWhite. #1746
v3.0.0-B0151 (pre-release)#
What's changed since pre-release v3.0.0-B0141:
- General improvements:
- Improved support for packaging with Visual Studio Code by @BernieWhite. #1755
- Engineering:
- Breaking change: Bump development tools to .NET 8.0 SDK by @BernieWhite.
#1673
- Running PSRule from PowerShell 7.x is supported on 7.4 and above.
- Running PSRule from Windows PowerShell 5.1 is still supported but deprecated and will be removed in PSRule v4.
- Breaking change: Bump development tools to .NET 8.0 SDK by @BernieWhite.
#1673
- Bug fixes:
- Fixed CLI null reference when include module is undefined by @BernieWhite. #1746
v3.0.0-B0141 (pre-release)#
What's changed since pre-release v3.0.0-B0137:
- General improvements:
- SARIF output has been improved to include effective configuration from a run by @BernieWhite. #1739
- SARIF output has been improved to include file hashes for source files from a run by @BernieWhite. #1740
- Added support to allow disabling PowerShell features that can be run from a repository by @BernieWhite.
#1742
- Added the
Execution.RestrictScriptSource
option to disable running scripts from a repository.
- Added the
- Engineering:
- Bump YamlDotNet to v15.1.0. #1737
v3.0.0-B0137 (pre-release)#
What's changed since pre-release v3.0.0-B0122:
- General improvements:
- Breaking change: Moved the
restore
command to a sub-command ofmodule
by @BernieWhite. #1730- The functionality of the
restore
command is now available asmodule restore
.
- The functionality of the
- Added CLI commands to list and report status of locked modules by @BernieWhite.
#1729
- Added
module init
sub-command to initialize the lock file from configured options. - Added
module list
sub-command to list locked and unlocked modules associated with the workspace. - Added
version
property to the lock file schema to support versioning of the lock file.
- Added
- Breaking change: Moved the
- Engineering:
v3.0.0-B0122 (pre-release)#
What's changed since pre-release v3.0.0-B0093:
- General improvements:
- Breaking change: Renamed
analyze
CLI command torun
by @BernieWhite. #1713 - Added
--outcome
argument for CLI to support filtering output by @bernieWhite. #1706
- Breaking change: Renamed
- Engineering:
v3.0.0-B0093 (pre-release)#
What's changed since pre-release v3.0.0-B0084:
- Engineering:
- Bug fixes:
- Fixed CLI IndexOutOfRangeException with lock file by @BernieWhite. #1676
v3.0.0-B0084 (pre-release)#
What's changed since release v2.9.0:
- New features:
- Added lock file support when using CLI and related tools by @BernieWhite.
#1660
- The lock file used used during analysis and when installing modules to select a specific version.
- Added lock file support when using CLI and related tools by @BernieWhite.
#1660
- General improvements:
- Breaking change: Switch to use SHA-512 for generating unbound objects by @BernieWhite.
#1155
- Objects that have no bound name will automatically be assigned a name based on the SHA-512 hash of the object.
- Previously a SHA-1 hash was used, however this is no longer considered secure.
- The name for unbound objects that are suppressed will change as a result.
- Additionally the hash can be changed by setting the
Execution.HashAlgorithm
option. - See upgrade notes for details.
- Breaking change: Removed deprecated execution options by @BernieWhite. #1457
- Breaking change: Removed deprecated object properties by @BernieWhite. #1601
- Expanded support for
FileHeader
assertion by @BernieWhite. #1521- Added support for
.bicepparam
,.tsp
,.tsx
,.editorconfig
,.ipynb
, and.toml
files.
- Added support for
- Breaking change: Switch to use SHA-512 for generating unbound objects by @BernieWhite.
#1155
- Engineering:
- Breaking change: Bump development tools to .NET 7.0 SDK by @BernieWhite.
#1631
- Running PSRule from PowerShell 7.x is supported on 7.3 and above.
- Running PSRule from Windows PowerShell 5.1 is still supported but deprecated and will be removed in PSRule v4.
- Bump Microsoft.CodeAnalysis.NetAnalyzers to v7.0.4. #1602
- Bump Microsoft.CodeAnalysis.Common to v4.7.0. #1593
- Bump YamlDotNet to v13.7.1. #1647
- Bump xunit to v2.5.3. #1648
- Bump xunit.runner.visualstudio to v2.5.3. #1644
- Bump BenchmarkDotNet to v0.13.10. #1654
- Bump BenchmarkDotNet.Diagnostics.Windows to v0.13.10. #1654
- Breaking change: Bump development tools to .NET 7.0 SDK by @BernieWhite.
#1631