Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQ] AZR-000302 #364

Open
skynetsysadmin opened this issue Jun 7, 2024 · 2 comments
Open

[FEATURE REQ] AZR-000302 #364

skynetsysadmin opened this issue Jun 7, 2024 · 2 comments
Labels
enhancement New feature or request 🔍 needs-triage

Comments

@skynetsysadmin
Copy link

Please describe the feature or suggestion.

When the WAF Mode in BICEP or the ARM Template uses a conditional statement, it's flagging it as an error. Here is an example, in the development environment we set the mode to detection, but in all other environments we set to prevention.

"mode": "[if(equals(toLower(parameters('environment')), 'dev'), 'Detection', 'Prevention')]"

But, the templateanalyzer tool flags it as an error since it's not a fixed value of 'Prevention'. AZR-000302: Azure.AppGwWAF.PreventionMode.

Alternatively, if there was a way to ignore the rule I suppose that would be a stop gap.

Thanks

Additional context

No response

@VeraBE
Copy link
Contributor

VeraBE commented Jun 7, 2024

Is this rule also flagging your template if you specify the parameters file that has the environment variable not set to dev? I believe TemplateAnalyzer should resolve the if properly

@skynetsysadmin
Copy link
Author

We are using the Microsoft Security DevOps extension to run the templateanalyzer tool. I'll need to research how to invoke the '-p' option via that extension. Thanks for the tip!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 🔍 needs-triage
Projects
None yet
Development

No branches or pull requests

2 participants