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

Guid validation #425

Closed
wants to merge 6 commits into from
Closed

Conversation

Joshua-Donovan
Copy link
Collaborator

Re-adding to pull request list after accidentally deleting this one.

New workflow step to validate the policy definition GUID/UUID and checks for conflicts with existing Built-In Policy Definition names.

Updates since last Pull Request:

  • Added a check for if the file is in the "Scripts/" or ".github/workflows" directories. If so, the result will be successful and have an exempt directory message.

Requirements:

  • secrets.GH_SEARCH_TOKEN
  • Requires a GitHub PAT to authenticate with GitHub search API.
  • PAT does not need any permissions, it just needs to be a valid GitHub PAT.

@aschabus
Copy link
Collaborator

@Joshua-Donovan wouldn't it be possible to check the GUID against https://www.azadvertizer.net/azpolicyadvertizer-comma.csv for uniqueness. In this case we wouldn't need any permissions or access tokens. The csv file is updated daily against Azure (built-in), ALZ, AMBA and Community Policies.

@Joshua-Donovan
Copy link
Collaborator Author

@Joshua-Donovan wouldn't it be possible to check the GUID against https://www.azadvertizer.net/azpolicyadvertizer-comma.csv for uniqueness. In this case we wouldn't need any permissions or access tokens. The csv file is updated daily against Azure (built-in), ALZ, AMBA and Community Policies.

@aschabus I can play with that possibility, but that does add a dependency on an external resource that using the GitHub search functionality does not.

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

Successfully merging this pull request may close these issues.

Validate in the pipeline that policy id is not equal to any built-in policies
2 participants