azsk / ADOScanner-docs

Welcome to the documentation of ADO Security Scanner!
MIT License
64 stars 14 forks source link

How to apply same custom org-policy to all projects in my organization? #31

Closed abrignola closed 8 months ago

abrignola commented 3 years ago

From the docs I understand the only way to get the custom org-policy is to create a Git repository in my project and to upload the files there.

There's also the following note in the docs

Note: We will be treating PROJECT as a boundary to customize scanner behavior. Any customizations made will apply strictly only to the project (and its components) where the org-policy endpoint resides. We will be interchangeably using the terms 'org' and 'project'.

How can I apply the same custom policy to all projects in my organization without having to create a repo in each individual project?

v-dpardeshi commented 8 months ago

Apologies for the inactivity on this thread. Yes, we can do that using the 'PolicyProject' parameter with your project name where the orgpolicy you have set up. Run the command as follows: Get-AzSKADOSecurityStatus -OrganizationName "Organization_name" -PolicyProject "Name of the project hosting organization policy with which the scan should run."