Skip to content

Task 'PSRule analysis' version 2 (ps-rule-assert@2) is dependent on a Node version (16) that is end-of-life #1197

@paul-towler

Description

@paul-towler

Description of the issue

The PSRule analysis task in an Azure DevOps pipeline fails with a warning indicating that the task 'ps-rule-assert@2' depends on Node version 16, which is end-of-life. This prevents the pipeline from running successfully and requires an updated version of the task to support a newer Node version.

Configuration

Yaml configuration of the extension.

requires:
  # Require a minimum of PSRule for Azure v1.30.2
  PSRule.Rules.Azure: ">=1.32.1"
  PSRule.Rules.CAF: ">=0.3.0"

configuration:
  # Enable Bicep CLI checks.
  AZURE_BICEP_CHECK_TOOL: true

  # Enable automatic expansion of param files
  AZURE_PARAMETER_FILE_EXPANSION: true

  # Enable automatic expansion of bicep source files.
  AZURE_BICEP_FILE_EXPANSION: true

  # Configures the number of seconds to wait for build Bicep files.
  AZURE_BICEP_FILE_EXPANSION_TIMEOUT: 20

execution:
  # Ignore warnings for resources and objects that don't have any rules.
  unprocessedObject: Ignore

input:
  pathIgnore:
    - "**/bicepconfig.json"
    - "*.yaml"
    - "*.yml"
    - "*.md"
    - "*.ps1"

    # Exclude Bicep module files.
    - "*.bicep"

    # Exclude JSON module files.
    - "*.json"

    # Include bicep files from modules.
    - "!modules/**/.tests/*.bicep"

include:
  module:
  - PSRule.Rules.Azure
  - PSRule.Rules.CAF

rule:
  # Enable custom rules that don't exist in the baseline
  includeLocal: true
  exclude:
    # Ignore the following rules for all resources

    # Tags - Policy Configures Tags
    - Azure.Resource.UseTags

    # Application Gateway
    # Rules are configured, but still fails
    - Azure.AppGwWAF.RuleGroups

    # Automation Accounts - Policy Configures Logs
    - Azure.Automation.AuditLogs
    - Azure.Automation.PlatformLogs

    # Gives false positive when testing Key Vault
    - Azure.Deployment.SecureParameter

    # Key Vaults - Policy Configures Logs
    - Azure.KeyVault.Logs

    # Log Analytics - Replication not support in 'br/public:avm/res/operational-insights/workspace:0.11.2'
    - Azure.Log.Replication
    
    # Networking
    - Azure.VNET.PrivateSubnet
    # Even though the Subnet Name matches the requirements (https://github.com/Azure/PSRule.Rules.Azure/blob/main/docs/en/rules/Azure.VNET.SubnetNaming.md) 
    # Test still fails as of 21/07/2025
    - Azure.VNET.SubnetNaming

output:
  culture: ["en-AU"]

Expected behaviour

The PSRule analysis task should execute without warnings about deprecated dependencies, using a supported Node version to ensure compatibility and successful pipeline execution.

Error output

Capture any error messages.

[warning]Task 'PSRule analysis' version 2 (ps-rule-assert@2) is dependent on a Node version (16) that is end-of-life. Contact the extension owner for an updated version of the task. Task maintainers should review Node upgrade guidance: https://aka.ms/node-runner-guidance

Task in use and version:

  • Task: ps-rule-assert
  • Version: [e.g. 2.100.1]

Additional context

The issue arises when running the PSRule task in an Azure DevOps pipeline running Ubuntu 24.04. The warning suggests that the task relies on an outdated Node.js version (16), which is no longer supported. The task needs to be updated by the extension owner to use a supported Node version to resolve this issue. The provided link offers guidance for task maintainers to upgrade the Node version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions