PSRule.Rules.Azure how to scan only a certain path in repository? #1584
-
I was looking how to specify in the workflow which repository path to assest and found that you have the option args: but can't find any documentatie about it. So have the following in my iac.yml file: # Analyze Azure resources using PSRule for Azure
- name: Analyze Azure template files
uses: microsoft/[email protected]
with:
modules: "PSRule.Rules.Azure"
args: |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 12 replies
-
already found it, I think # Analyze Azure resources using PSRule for Azure
- name: Analyze Azure template files
uses: microsoft/[email protected]
with:
modules: "PSRule.Rules.Azure"
inputType: inputPath
inputPath: '${{ github.workspace }}\Azure\Templates\ALZ\IAC\'
|
Beta Was this translation helpful? Give feedback.
-
Getting now a error that the assertions failed but not the reason for it |
Beta Was this translation helpful? Give feedback.
-
@oxbo-andre @aavdberg You can find the available options for the GitHub Action over here: https://github.com/microsoft/ps-rule There is two possible options that will probably be of interest:
Note: PSRule for Azure will not work with Even if you use the default I hope that helps. |
Beta Was this translation helpful? Give feedback.
-
This output is from a other workflow where I check the root of the repository with the following: analyze-arm.yml: # Analyze Azure resources using PSRule for Azure
- name: Analyze Azure template files
uses: microsoft/[email protected]
with:
modules: "PSRule.Rules.Azure" But when I define the inputPath in the iac.yml: # Analyze Azure resources using PSRule for Azure
- name: Analyze Azure template files
uses: microsoft/[email protected]
with:
modules: "PSRule.Rules.Azure"
inputType: repository
inputPath: '${{ github.workspace }}/Azure/Templates/ALZ/IAC/**'
prerelease: true |
Beta Was this translation helpful? Give feedback.
-
found the problem it's a not full path that you have to fill in but also not a ./ but /Azure/Templates/ALZ/IAC/** |
Beta Was this translation helpful? Give feedback.
found the problem
it's a not full path that you have to fill in but also not a ./ but /Azure/Templates/ALZ/IAC/**