microsoft / microsoft/PSRule

Investigate Input.IgnoreObjectSource bug

Open
#1,753 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug feature: input
Dominant language
C#
Stars
474
Forks
65
Avg merge
22h 25m
Merged PRs (30d)
26

Description

Description of the issue

The option Input.IgnoreObjectSource is not working correcting with the following options:

input:
  # By default, objects read from file using inputPath will be skipped if the file path has been ignored.
  # When set to true, additionally objects with a source path that has been ignored will be skipped.
  ignoreObjectSource: true
  
  # By default, PSRule will process all files within an input path.
  ignoreUnchangedPath: true

  pathIgnore:
    # Ignore other files in the repository.
    - '**'

    # Include deployment files.
    - '!deployments/**/*.bicepparam'
    - '!deployments/**/main.bicep'

Expected behaviour

All files should be ignored except *.bicepparam and main.bicep files.

Module in use and version:

  • Module: PSRule
  • Version: 2.9.0

Additional context

Related to Azure/PSRule.Rules.Azure#2678

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the YAML input configuration shown, using PSRule version 2.9.0 and the deployment paths described. Trace how Input.IgnoreObjectSource, ignoreUnchangedPath, and pathIgnore are applied, then verify that only *.bicepparam and main.bicep files are processed while all other files are skipped.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, powershell
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.