PSRule.Rules.Azure icon indicating copy to clipboard operation
PSRule.Rules.Azure copied to clipboard

[FEATURE] Detect help links from exported policies

Open BernieWhite opened this issue 1 year ago • 0 comments

Your suggestion

When exporting policies as rules, currently there is no standard practise or property for providing a help link.

Currently many built-in policy initiatives provide a link to Azure docs as part of their description.

We should implement a pattern that makes it easy for customers to define their policies linking to documentation but also have built-in features just work where they are configured.

We should implement the logic find a help URL by:

  1. If a policy definition has a link metadata property with a https:// URL then include this as the help link.
  2. If a policy definition has a https:// URL at the end of the description property include this as the help link.
  3. If a policy initiative has a link metadata property with a https:// URL then include this as the help link.
  4. If a policy initiative has a https:// URL at the end of the description property include this as the help link.
  5. If no links are found use configuration from the AZURE_POLICY_DEFAULT_URL option.

Alternatives

None available.

Additional context

Related to #2482

BernieWhite avatar Jan 30 '24 13:01 BernieWhite