Skip to content

Using separate parameter files (.json or .bicepparam) breaks the BICEP scanning #2288

Closed Answered by BernieWhite
xyl-jc asked this question in Q&A
Discussion options

You must be logged in to vote

@xyl-jc The problem is with the inputPath parameter for the pipeline.

   - task: ps-rule-assert@2
      displayName: Analyze Azure template files
      continueOnError: true
      inputs:
        inputType: repository
        inputPath: deployment/main.bicep
        modules: 'PSRule.Rules.Azure'
        outputFormat: NUnit3
        outputPath: $(System.DefaultWorkingDirectory)/psrule-results.xml
        baseline: $(psruleBaselineName)

This code is asking PSRule to scan deployment/main.bicep when it should be excluded/ ignored.

You can just set inputPath to deployment/ if you want to scan any files in deployment/.

I would recommend just not setting inputPath at all. Then your input.pathIgnore

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@BernieWhite
Comment options

@xyl-jc
Comment options

@xyl-jc
Comment options

@BernieWhite
Comment options

Answer selected by xyl-jc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants