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

Wording Improvements for Unique ID GitHub Action #477

Open
Joshua-Donovan opened this issue Sep 18, 2024 · 1 comment
Open

Wording Improvements for Unique ID GitHub Action #477

Joshua-Donovan opened this issue Sep 18, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@Joshua-Donovan
Copy link
Collaborator

Joshua-Donovan commented Sep 18, 2024

The last improvement to switch sources to check policy ids has introduced existing Community Policies that can be validated.

Issue:

  • Community Policies will be caught by the unique id check and be mislabeled in the error as a built-in.

Improvement:

  • Identify a distinction in the check and output a different error for Community and built-in Azure Policy Definitions to avoid confusion.

(optional) improviement:

  • Try to identify a way to provide a link to the existing Azure Policy Definition that was matched in the output.

if [ ! -z "$filteredResponse" ]; then
echo ""
echo ""
echo ' \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/////////////////////////////////'
echo ' | |'
echo ' | - VALIDATION FAILED - |'
echo ' | Policy name exists as a Built-In Azure Policy Definition |'
echo ' | |'
echo ' \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/////////////////////////////////'
echo ""
echo " This: ${policyName} == built-in: $(echo $filteredResponse | jq -r '.n')"
echo ""
echo ' Conflicting Built-In Policy Definition Details:'
echo " Name: $(echo $filteredResponse | jq -r '.n')"
echo " Display Name: $(echo $filteredResponse | jq -r '.def' | jq -r '.displayName')"
echo " Description: $(echo $filteredResponse | jq -r '.def' | jq -r '.description')"
echo ""
echo ' \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/////////////////////////////////'
echo ' | |'
echo ' | - NEXT STEPS - |'
echo ' | Please change the policy name to a unique GUID |'
echo ' | Please do not submit only slightly altered built-in policies |'
echo ' | |'
echo ' | What is a GUID? https://www.rfc-editor.org/rfc/rfc4122 |'
echo ' | Make a new GUID in PowerShell: https://aka.ms/new-guid |'
echo ' | |'
echo ' \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/////////////////////////////////'
echo ""
echo ""
exit 1

@Joshua-Donovan Joshua-Donovan added the enhancement New feature or request label Sep 18, 2024
@Joshua-Donovan Joshua-Donovan self-assigned this Sep 18, 2024
@Joshua-Donovan
Copy link
Collaborator Author

Additionally, Landing Zone policies exist in the data source so we will need to account for those as well.

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

No branches or pull requests

1 participant