Azure / ResourceModules

This repository includes a CI platform for and collection of mature and curated Bicep modules. The platform supports both ARM and Bicep and can be leveraged using GitHub actions as well as Azure DevOps pipelines.
https://aka.ms/carml
MIT License
725 stars 459 forks source link

[Feature Request]: Define a 'secure-by-default' baseline for CARML #2176

Open AlexanderSehr opened 1 year ago

AlexanderSehr commented 1 year ago

Description

The modules we provide in CARML provide quite a lot of functionlity - including security features such as private endpoint support and 'secure' default values like TLS1.2. In the past we did a sweep of the modules of that time and applied as many rules as possible of the following 2 sources

However, ever since more module were added and it wasn't always clear what the 'secure-by-default' recommendation should be.

For example: Should we always set all values to the most secure value, even if that means that the module's deployment will require more effort by the user? An example could be to remove empty default values for private endpoints - essentially enforcing them - unless a user provides an explicit empty value as a parameter.

Looking at this from a more abstract level, this would mean: All modules can only be deployed with all security features enforced - and we need to describe how to (and the user have to make an effort to) deploy them in a less secure way.

Naturally this isn't a straight forward topic - especially as the user experience in this case may suffer.

Let's use this issue to keep the topic on the agenda and track the conversation.

eriqua commented 1 year ago

Adding a couple of thoughts:

Note: related to #1703

rahalan commented 1 year ago

Security for CARML needs to be written down in the WIKI, as it is for technical restrictions not possible, to "just make the modules secure". @AlexanderSehr will have the lead, but needs help!

rahalan commented 1 year ago

Without making a final decision yet, work should for now go into usage of PSRule and creating secure test files per module.

AlexanderSehr commented 1 year ago

Linked to discussion #1295