azsk / DevOpsKit-docs

MIT License
496 stars 207 forks source link

skipped files error the azure devops pipeline #383

Open LeonB87 opened 3 years ago

LeonB87 commented 3 years ago

Hi,

Were implementing the az DevopsKit to validate our ARM templates in the pipeline. I'm pointing the Module to a folder containing all our ARM-Templates.

image

There are a few templates which are not supported yet. unfortunately, this causes the pipeline to fail completely.

##[error]One or more files were skipped during the scan. Either the files are invalid as ARM templates or those resource types are currently not supported by this command. image

I've tried adding the "FailTaskIfNoControlsScanned" environmental variable to prevent it from failing, but that doesn't seem to apply.

image

Is there a way to prevent it from failing besides excluding those files? If not, then that would be a feature-request :-)

Regards, Léon

ritika-msft commented 3 years ago

Hi Leon,

You can use "exclude files" input in the Arm Template checker. You need to pass name of the files (comma separated) you want to exclude in "Exclude Files" input as shown in image below. Please refer to this https://github.com/azsk/DevOpsKit-docs/blob/master/03-Security-In-CICD/Readme.md#exclude-files-from-scan for detailed steps on how to use "exclude files".

image

Thanks, Ritika