diff --git a/content/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale.md b/content/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale.md index 03a5060818..095c2e91fa 100644 --- a/content/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale.md +++ b/content/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale.md @@ -35,6 +35,10 @@ You can easily enable and manage {% data variables.product.company_short %}'s se Each repository can only have one {% data variables.product.prodname_security_configuration %} applied to it. To find out how you should get started with {% data variables.product.prodname_security_configurations %}, see "[AUTOTITLE](/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/choosing-a-security-configuration-for-your-repositories)." +{% ifversion security-configurations-api %} +You can also create and manage security configurations using the REST API. For more information, see "[AUTOTITLE](/rest/code-security/configurations)." +{% endif %} + ## About {% data variables.product.prodname_global_settings %} While {% data variables.product.prodname_security_configurations %} determine repository-level security settings, {% data variables.product.prodname_global_settings %} determine your organization-level security settings, which are then inherited by all repositories. With {% data variables.product.prodname_global_settings %}, you can customize how security features analyze your organization, as well as create security managers with permission to manage security alerts and settings across your organization. diff --git a/content/rest/code-security/configurations.md b/content/rest/code-security/configurations.md new file mode 100644 index 0000000000..cc3a6537db --- /dev/null +++ b/content/rest/code-security/configurations.md @@ -0,0 +1,13 @@ +--- +title: Configurations +intro: Use the REST API to create and manage security configurations for your organization. +versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖 + fpt: '*' + ghec: '*' +topics: + - API +autogenerated: rest +allowTitleToDifferFromFilename: true +--- + + diff --git a/content/rest/code-security/index.md b/content/rest/code-security/index.md new file mode 100644 index 0000000000..43977e33b4 --- /dev/null +++ b/content/rest/code-security/index.md @@ -0,0 +1,14 @@ +--- +title: Code security settings +intro: Use the REST API to create and manage security configurations for your organization. +topics: + - API +autogenerated: rest +allowTitleToDifferFromFilename: true +children: + - /configurations +versions: + fpt: '*' + ghec: '*' +--- + diff --git a/content/rest/index.md b/content/rest/index.md index 23bb8fc8f2..6322d88ce4 100644 --- a/content/rest/index.md +++ b/content/rest/index.md @@ -1,7 +1,9 @@ --- title: GitHub REST API documentation shortTitle: REST API -intro: 'Create integrations, retrieve data, and automate your workflows with the {% data variables.product.prodname_dotcom %} REST API.' +intro: >- + Create integrations, retrieve data, and automate your workflows with the {% + data variables.product.prodname_dotcom %} REST API. introLinks: overview: /rest/about-the-rest-api/about-the-rest-api quickstart: /rest/quickstart @@ -47,6 +49,7 @@ children: - /checks - /classroom - /code-scanning + - /code-security - /codes-of-conduct - /codespaces - /collaborators diff --git a/data/features/security-configurations-api.yml b/data/features/security-configurations-api.yml new file mode 100644 index 0000000000..c37ffbe73d --- /dev/null +++ b/data/features/security-configurations-api.yml @@ -0,0 +1,5 @@ +# Reference: #14635 +# Documentation for security configurations API +versions: + fpt: '*' + ghec: '*' diff --git a/src/github-apps/data/fpt-2022-11-28/fine-grained-pat-permissions.json b/src/github-apps/data/fpt-2022-11-28/fine-grained-pat-permissions.json index 7761c34c37..8ff7fd0abd 100644 --- a/src/github-apps/data/fpt-2022-11-28/fine-grained-pat-permissions.json +++ b/src/github-apps/data/fpt-2022-11-28/fine-grained-pat-permissions.json @@ -162,6 +162,87 @@ "additional-permissions": false, "access": "write" }, + { + "category": "code-security", + "slug": "get-code-security-configurations-for-an-organization", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations", + "additional-permissions": false, + "access": "write" + }, + { + "category": "code-security", + "slug": "create-a-code-security-configuration", + "subcategory": "configurations", + "verb": "post", + "requestPath": "/orgs/{org}/code-security/configurations", + "additional-permissions": false, + "access": "write" + }, + { + "category": "code-security", + "slug": "get-default-code-security-configurations", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations/defaults", + "additional-permissions": false, + "access": "write" + }, + { + "category": "code-security", + "slug": "get-a-code-security-configuration", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}", + "additional-permissions": false, + "access": "write" + }, + { + "category": "code-security", + "slug": "update-a-code-security-configuration", + "subcategory": "configurations", + "verb": "patch", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}", + "additional-permissions": false, + "access": "write" + }, + { + "category": "code-security", + "slug": "delete-a-code-security-configuration", + "subcategory": "configurations", + "verb": "delete", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}", + "additional-permissions": false, + "access": "write" + }, + { + "category": "code-security", + "slug": "attach-a-configuration-to-repositories", + "subcategory": "configurations", + "verb": "post", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}/attach", + "additional-permissions": false, + "access": "write" + }, + { + "category": "code-security", + "slug": "set-a-code-security-configuration-as-a-default-for-an-organization", + "subcategory": "configurations", + "verb": "put", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}/defaults", + "additional-permissions": false, + "access": "write" + }, + { + "category": "code-security", + "slug": "get-repositories-associated-with-a-code-security-configuration", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}/repositories", + "additional-permissions": false, + "access": "write" + }, { "category": "copilot", "slug": "get-copilot-seat-information-and-settings-for-an-organization", diff --git a/src/github-apps/data/fpt-2022-11-28/fine-grained-pat.json b/src/github-apps/data/fpt-2022-11-28/fine-grained-pat.json index ece7165175..b9e9728f9e 100644 --- a/src/github-apps/data/fpt-2022-11-28/fine-grained-pat.json +++ b/src/github-apps/data/fpt-2022-11-28/fine-grained-pat.json @@ -1389,6 +1389,62 @@ "requestPath": "/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}" } ], + "code-security": [ + { + "slug": "get-code-security-configurations-for-an-organization", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations" + }, + { + "slug": "create-a-code-security-configuration", + "subcategory": "configurations", + "verb": "post", + "requestPath": "/orgs/{org}/code-security/configurations" + }, + { + "slug": "get-default-code-security-configurations", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations/defaults" + }, + { + "slug": "get-a-code-security-configuration", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}" + }, + { + "slug": "update-a-code-security-configuration", + "subcategory": "configurations", + "verb": "patch", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}" + }, + { + "slug": "delete-a-code-security-configuration", + "subcategory": "configurations", + "verb": "delete", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}" + }, + { + "slug": "attach-a-configuration-to-repositories", + "subcategory": "configurations", + "verb": "post", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}/attach" + }, + { + "slug": "set-a-code-security-configuration-as-a-default-for-an-organization", + "subcategory": "configurations", + "verb": "put", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}/defaults" + }, + { + "slug": "get-repositories-associated-with-a-code-security-configuration", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}/repositories" + } + ], "codes-of-conduct": [ { "slug": "get-all-codes-of-conduct", diff --git a/src/github-apps/data/fpt-2022-11-28/server-to-server-permissions.json b/src/github-apps/data/fpt-2022-11-28/server-to-server-permissions.json index d9abb9f44a..197f31cf71 100644 --- a/src/github-apps/data/fpt-2022-11-28/server-to-server-permissions.json +++ b/src/github-apps/data/fpt-2022-11-28/server-to-server-permissions.json @@ -218,6 +218,105 @@ "server-to-server": true, "additional-permissions": false }, + { + "category": "code-security", + "slug": "get-code-security-configurations-for-an-organization", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations", + "access": "write", + "user-to-server": true, + "server-to-server": true, + "additional-permissions": false + }, + { + "category": "code-security", + "slug": "create-a-code-security-configuration", + "subcategory": "configurations", + "verb": "post", + "requestPath": "/orgs/{org}/code-security/configurations", + "access": "write", + "user-to-server": true, + "server-to-server": true, + "additional-permissions": false + }, + { + "category": "code-security", + "slug": "get-default-code-security-configurations", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations/defaults", + "access": "write", + "user-to-server": true, + "server-to-server": true, + "additional-permissions": false + }, + { + "category": "code-security", + "slug": "get-a-code-security-configuration", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}", + "access": "write", + "user-to-server": true, + "server-to-server": true, + "additional-permissions": false + }, + { + "category": "code-security", + "slug": "update-a-code-security-configuration", + "subcategory": "configurations", + "verb": "patch", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}", + "access": "write", + "user-to-server": true, + "server-to-server": true, + "additional-permissions": false + }, + { + "category": "code-security", + "slug": "delete-a-code-security-configuration", + "subcategory": "configurations", + "verb": "delete", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}", + "access": "write", + "user-to-server": true, + "server-to-server": true, + "additional-permissions": false + }, + { + "category": "code-security", + "slug": "attach-a-configuration-to-repositories", + "subcategory": "configurations", + "verb": "post", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}/attach", + "access": "write", + "user-to-server": true, + "server-to-server": true, + "additional-permissions": false + }, + { + "category": "code-security", + "slug": "set-a-code-security-configuration-as-a-default-for-an-organization", + "subcategory": "configurations", + "verb": "put", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}/defaults", + "access": "write", + "user-to-server": true, + "server-to-server": true, + "additional-permissions": false + }, + { + "category": "code-security", + "slug": "get-repositories-associated-with-a-code-security-configuration", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}/repositories", + "access": "write", + "user-to-server": true, + "server-to-server": true, + "additional-permissions": false + }, { "category": "copilot", "slug": "get-copilot-seat-information-and-settings-for-an-organization", diff --git a/src/github-apps/data/fpt-2022-11-28/server-to-server-rest.json b/src/github-apps/data/fpt-2022-11-28/server-to-server-rest.json index b61cbb14fa..1bd79772e2 100644 --- a/src/github-apps/data/fpt-2022-11-28/server-to-server-rest.json +++ b/src/github-apps/data/fpt-2022-11-28/server-to-server-rest.json @@ -1285,6 +1285,62 @@ "requestPath": "/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}" } ], + "code-security": [ + { + "slug": "get-code-security-configurations-for-an-organization", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations" + }, + { + "slug": "create-a-code-security-configuration", + "subcategory": "configurations", + "verb": "post", + "requestPath": "/orgs/{org}/code-security/configurations" + }, + { + "slug": "get-default-code-security-configurations", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations/defaults" + }, + { + "slug": "get-a-code-security-configuration", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}" + }, + { + "slug": "update-a-code-security-configuration", + "subcategory": "configurations", + "verb": "patch", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}" + }, + { + "slug": "delete-a-code-security-configuration", + "subcategory": "configurations", + "verb": "delete", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}" + }, + { + "slug": "attach-a-configuration-to-repositories", + "subcategory": "configurations", + "verb": "post", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}/attach" + }, + { + "slug": "set-a-code-security-configuration-as-a-default-for-an-organization", + "subcategory": "configurations", + "verb": "put", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}/defaults" + }, + { + "slug": "get-repositories-associated-with-a-code-security-configuration", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}/repositories" + } + ], "codes-of-conduct": [ { "slug": "get-all-codes-of-conduct", diff --git a/src/github-apps/data/fpt-2022-11-28/user-to-server-rest.json b/src/github-apps/data/fpt-2022-11-28/user-to-server-rest.json index ece7165175..b9e9728f9e 100644 --- a/src/github-apps/data/fpt-2022-11-28/user-to-server-rest.json +++ b/src/github-apps/data/fpt-2022-11-28/user-to-server-rest.json @@ -1389,6 +1389,62 @@ "requestPath": "/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}" } ], + "code-security": [ + { + "slug": "get-code-security-configurations-for-an-organization", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations" + }, + { + "slug": "create-a-code-security-configuration", + "subcategory": "configurations", + "verb": "post", + "requestPath": "/orgs/{org}/code-security/configurations" + }, + { + "slug": "get-default-code-security-configurations", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations/defaults" + }, + { + "slug": "get-a-code-security-configuration", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}" + }, + { + "slug": "update-a-code-security-configuration", + "subcategory": "configurations", + "verb": "patch", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}" + }, + { + "slug": "delete-a-code-security-configuration", + "subcategory": "configurations", + "verb": "delete", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}" + }, + { + "slug": "attach-a-configuration-to-repositories", + "subcategory": "configurations", + "verb": "post", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}/attach" + }, + { + "slug": "set-a-code-security-configuration-as-a-default-for-an-organization", + "subcategory": "configurations", + "verb": "put", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}/defaults" + }, + { + "slug": "get-repositories-associated-with-a-code-security-configuration", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}/repositories" + } + ], "codes-of-conduct": [ { "slug": "get-all-codes-of-conduct", diff --git a/src/github-apps/data/ghec-2022-11-28/fine-grained-pat-permissions.json b/src/github-apps/data/ghec-2022-11-28/fine-grained-pat-permissions.json index 8c218aeae0..6301077bbf 100644 --- a/src/github-apps/data/ghec-2022-11-28/fine-grained-pat-permissions.json +++ b/src/github-apps/data/ghec-2022-11-28/fine-grained-pat-permissions.json @@ -378,6 +378,87 @@ "additional-permissions": false, "access": "read" }, + { + "category": "code-security", + "slug": "get-code-security-configurations-for-an-organization", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations", + "additional-permissions": false, + "access": "write" + }, + { + "category": "code-security", + "slug": "create-a-code-security-configuration", + "subcategory": "configurations", + "verb": "post", + "requestPath": "/orgs/{org}/code-security/configurations", + "additional-permissions": false, + "access": "write" + }, + { + "category": "code-security", + "slug": "get-default-code-security-configurations", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations/defaults", + "additional-permissions": false, + "access": "write" + }, + { + "category": "code-security", + "slug": "get-a-code-security-configuration", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}", + "additional-permissions": false, + "access": "write" + }, + { + "category": "code-security", + "slug": "update-a-code-security-configuration", + "subcategory": "configurations", + "verb": "patch", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}", + "additional-permissions": false, + "access": "write" + }, + { + "category": "code-security", + "slug": "delete-a-code-security-configuration", + "subcategory": "configurations", + "verb": "delete", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}", + "additional-permissions": false, + "access": "write" + }, + { + "category": "code-security", + "slug": "attach-a-configuration-to-repositories", + "subcategory": "configurations", + "verb": "post", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}/attach", + "additional-permissions": false, + "access": "write" + }, + { + "category": "code-security", + "slug": "set-a-code-security-configuration-as-a-default-for-an-organization", + "subcategory": "configurations", + "verb": "put", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}/defaults", + "additional-permissions": false, + "access": "write" + }, + { + "category": "code-security", + "slug": "get-repositories-associated-with-a-code-security-configuration", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}/repositories", + "additional-permissions": false, + "access": "write" + }, { "category": "copilot", "slug": "get-copilot-seat-information-and-settings-for-an-organization", diff --git a/src/github-apps/data/ghec-2022-11-28/fine-grained-pat.json b/src/github-apps/data/ghec-2022-11-28/fine-grained-pat.json index 228bae6262..7a207426ff 100644 --- a/src/github-apps/data/ghec-2022-11-28/fine-grained-pat.json +++ b/src/github-apps/data/ghec-2022-11-28/fine-grained-pat.json @@ -1505,6 +1505,62 @@ "requestPath": "/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}" } ], + "code-security": [ + { + "slug": "get-code-security-configurations-for-an-organization", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations" + }, + { + "slug": "create-a-code-security-configuration", + "subcategory": "configurations", + "verb": "post", + "requestPath": "/orgs/{org}/code-security/configurations" + }, + { + "slug": "get-default-code-security-configurations", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations/defaults" + }, + { + "slug": "get-a-code-security-configuration", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}" + }, + { + "slug": "update-a-code-security-configuration", + "subcategory": "configurations", + "verb": "patch", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}" + }, + { + "slug": "delete-a-code-security-configuration", + "subcategory": "configurations", + "verb": "delete", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}" + }, + { + "slug": "attach-a-configuration-to-repositories", + "subcategory": "configurations", + "verb": "post", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}/attach" + }, + { + "slug": "set-a-code-security-configuration-as-a-default-for-an-organization", + "subcategory": "configurations", + "verb": "put", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}/defaults" + }, + { + "slug": "get-repositories-associated-with-a-code-security-configuration", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}/repositories" + } + ], "codes-of-conduct": [ { "slug": "get-all-codes-of-conduct", diff --git a/src/github-apps/data/ghec-2022-11-28/server-to-server-permissions.json b/src/github-apps/data/ghec-2022-11-28/server-to-server-permissions.json index 84c9180c73..faba725ae3 100644 --- a/src/github-apps/data/ghec-2022-11-28/server-to-server-permissions.json +++ b/src/github-apps/data/ghec-2022-11-28/server-to-server-permissions.json @@ -526,6 +526,105 @@ "server-to-server": true, "additional-permissions": false }, + { + "category": "code-security", + "slug": "get-code-security-configurations-for-an-organization", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations", + "access": "write", + "user-to-server": true, + "server-to-server": true, + "additional-permissions": false + }, + { + "category": "code-security", + "slug": "create-a-code-security-configuration", + "subcategory": "configurations", + "verb": "post", + "requestPath": "/orgs/{org}/code-security/configurations", + "access": "write", + "user-to-server": true, + "server-to-server": true, + "additional-permissions": false + }, + { + "category": "code-security", + "slug": "get-default-code-security-configurations", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations/defaults", + "access": "write", + "user-to-server": true, + "server-to-server": true, + "additional-permissions": false + }, + { + "category": "code-security", + "slug": "get-a-code-security-configuration", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}", + "access": "write", + "user-to-server": true, + "server-to-server": true, + "additional-permissions": false + }, + { + "category": "code-security", + "slug": "update-a-code-security-configuration", + "subcategory": "configurations", + "verb": "patch", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}", + "access": "write", + "user-to-server": true, + "server-to-server": true, + "additional-permissions": false + }, + { + "category": "code-security", + "slug": "delete-a-code-security-configuration", + "subcategory": "configurations", + "verb": "delete", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}", + "access": "write", + "user-to-server": true, + "server-to-server": true, + "additional-permissions": false + }, + { + "category": "code-security", + "slug": "attach-a-configuration-to-repositories", + "subcategory": "configurations", + "verb": "post", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}/attach", + "access": "write", + "user-to-server": true, + "server-to-server": true, + "additional-permissions": false + }, + { + "category": "code-security", + "slug": "set-a-code-security-configuration-as-a-default-for-an-organization", + "subcategory": "configurations", + "verb": "put", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}/defaults", + "access": "write", + "user-to-server": true, + "server-to-server": true, + "additional-permissions": false + }, + { + "category": "code-security", + "slug": "get-repositories-associated-with-a-code-security-configuration", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}/repositories", + "access": "write", + "user-to-server": true, + "server-to-server": true, + "additional-permissions": false + }, { "category": "copilot", "slug": "get-copilot-seat-information-and-settings-for-an-organization", diff --git a/src/github-apps/data/ghec-2022-11-28/server-to-server-rest.json b/src/github-apps/data/ghec-2022-11-28/server-to-server-rest.json index 5fc6d73e3a..c29c06a662 100644 --- a/src/github-apps/data/ghec-2022-11-28/server-to-server-rest.json +++ b/src/github-apps/data/ghec-2022-11-28/server-to-server-rest.json @@ -1401,6 +1401,62 @@ "requestPath": "/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}" } ], + "code-security": [ + { + "slug": "get-code-security-configurations-for-an-organization", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations" + }, + { + "slug": "create-a-code-security-configuration", + "subcategory": "configurations", + "verb": "post", + "requestPath": "/orgs/{org}/code-security/configurations" + }, + { + "slug": "get-default-code-security-configurations", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations/defaults" + }, + { + "slug": "get-a-code-security-configuration", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}" + }, + { + "slug": "update-a-code-security-configuration", + "subcategory": "configurations", + "verb": "patch", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}" + }, + { + "slug": "delete-a-code-security-configuration", + "subcategory": "configurations", + "verb": "delete", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}" + }, + { + "slug": "attach-a-configuration-to-repositories", + "subcategory": "configurations", + "verb": "post", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}/attach" + }, + { + "slug": "set-a-code-security-configuration-as-a-default-for-an-organization", + "subcategory": "configurations", + "verb": "put", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}/defaults" + }, + { + "slug": "get-repositories-associated-with-a-code-security-configuration", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}/repositories" + } + ], "codes-of-conduct": [ { "slug": "get-all-codes-of-conduct", diff --git a/src/github-apps/data/ghec-2022-11-28/user-to-server-rest.json b/src/github-apps/data/ghec-2022-11-28/user-to-server-rest.json index 228bae6262..7a207426ff 100644 --- a/src/github-apps/data/ghec-2022-11-28/user-to-server-rest.json +++ b/src/github-apps/data/ghec-2022-11-28/user-to-server-rest.json @@ -1505,6 +1505,62 @@ "requestPath": "/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}" } ], + "code-security": [ + { + "slug": "get-code-security-configurations-for-an-organization", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations" + }, + { + "slug": "create-a-code-security-configuration", + "subcategory": "configurations", + "verb": "post", + "requestPath": "/orgs/{org}/code-security/configurations" + }, + { + "slug": "get-default-code-security-configurations", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations/defaults" + }, + { + "slug": "get-a-code-security-configuration", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}" + }, + { + "slug": "update-a-code-security-configuration", + "subcategory": "configurations", + "verb": "patch", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}" + }, + { + "slug": "delete-a-code-security-configuration", + "subcategory": "configurations", + "verb": "delete", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}" + }, + { + "slug": "attach-a-configuration-to-repositories", + "subcategory": "configurations", + "verb": "post", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}/attach" + }, + { + "slug": "set-a-code-security-configuration-as-a-default-for-an-organization", + "subcategory": "configurations", + "verb": "put", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}/defaults" + }, + { + "slug": "get-repositories-associated-with-a-code-security-configuration", + "subcategory": "configurations", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}/repositories" + } + ], "codes-of-conduct": [ { "slug": "get-all-codes-of-conduct", diff --git a/src/github-apps/lib/config.json b/src/github-apps/lib/config.json index 0c8a953801..6f952c2d99 100644 --- a/src/github-apps/lib/config.json +++ b/src/github-apps/lib/config.json @@ -60,5 +60,5 @@ "2022-11-28" ] }, - "sha": "2dc8532a8ee49bb46d623aeeb8e533f7120e16f8" + "sha": "5343bf7e3ea2d5fe927db9f1c508f5b23461d4fa" } \ No newline at end of file diff --git a/src/rest/data/fpt-2022-11-28/schema.json b/src/rest/data/fpt-2022-11-28/schema.json index 145c57bb3e..021cd579c8 100644 --- a/src/rest/data/fpt-2022-11-28/schema.json +++ b/src/rest/data/fpt-2022-11-28/schema.json @@ -153559,6 +153559,2510 @@ } ] }, + "code-security": { + "configurations": [ + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations", + "title": "Get code security configurations for an organization", + "category": "code-security", + "subcategory": "configurations", + "parameters": [ + { + "name": "org", + "description": "
The organization name. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "target_type", + "in": "query", + "description": "The target type of the code security configuration
", + "required": false, + "schema": { + "type": "string", + "enum": [ + "global", + "all" + ], + "default": "all" + } + }, + { + "name": "per_page", + "in": "query", + "description": "'The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"'
", + "required": false, + "schema": { + "type": "integer", + "default": 30 + } + }, + { + "name": "before", + "description": "A cursor, as given in the Link header. If specified, the query only searches for results before this cursor. For more information, see \"Using pagination in the REST API.\"
", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "after", + "description": "A cursor, as given in the Link header. If specified, the query only searches for results after this cursor. For more information, see \"Using pagination in the REST API.\"
", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "bodyParameters": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Administration\" organization permissions": "write" + } + ] + }, + "codeExamples": [ + { + "key": "default", + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "org": "ORG" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Response
", + "example": [ + { + "id": 17, + "target_type": "global", + "name": "GitHub recommended", + "description": "Suggested settings for Dependabot, secret scanning, and code scanning.", + "advanced_security": "enabled", + "dependency_graph": "enabled", + "dependabot_alerts": "enabled", + "dependabot_security_updates": "not_set", + "code_scanning_default_setup": "enabled", + "secret_scanning": "enabled", + "secret_scanning_push_protection": "enabled", + "private_vulnerability_reporting": "enabled", + "url": "https://api.github.com/orgs/octo-org/code-security/configurations/17", + "html_url": "https://github.com/organizations/octo-org/settings/security_products/configurations/view", + "created_at": "2023-12-04T15:58:07Z", + "updated_at": "2023-12-04T15:58:07Z" + }, + { + "id": 1326, + "target_type": "organization", + "name": "High risk settings", + "description": "This is a code security configuration for octo-org high risk repositories", + "advanced_security": "enabled", + "dependency_graph": "enabled", + "dependabot_alerts": "enabled", + "dependabot_security_updates": "enabled", + "code_scanning_default_setup": "enabled", + "secret_scanning": "enabled", + "secret_scanning_push_protection": "enabled", + "private_vulnerability_reporting": "enabled", + "url": "https://api.github.com/orgs/octo-org/code-security/configurations/1326", + "html_url": "https://github.com/organizations/octo-org/settings/security_products/configurations/edit/1326", + "created_at": "2024-05-10T00:00:00Z", + "updated_at": "2024-05-10T00:00:00Z" + } + ], + "schema": { + "type": "array", + "items": { + "type": "object", + "description": "A code security configuration", + "properties": { + "id": { + "type": "integer", + "description": "The ID of the code security configuration" + }, + "name": { + "type": "string", + "description": "The name of the code security configuration. Must be unique within the organization." + }, + "target_type": { + "type": "string", + "description": "The type of the code security configuration.", + "enum": [ + "global", + "organization" + ] + }, + "description": { + "type": "string", + "description": "A description of the code security configuration" + }, + "advanced_security": { + "type": "string", + "description": "The enablement status of GitHub Advanced Security", + "enum": [ + "enabled", + "disabled" + ] + }, + "dependency_graph": { + "type": "string", + "description": "The enablement status of Dependency Graph", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "dependabot_alerts": { + "type": "string", + "description": "The enablement status of Dependabot alerts", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "dependabot_security_updates": { + "type": "string", + "description": "The enablement status of Dependabot security updates", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "code_scanning_default_setup": { + "type": "string", + "description": "The enablement status of code scanning default setup", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "secret_scanning": { + "type": "string", + "description": "The enablement status of secret scanning", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "secret_scanning_push_protection": { + "type": "string", + "description": "The enablement status of secret scanning push protection", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "private_vulnerability_reporting": { + "type": "string", + "description": "The enablement status of private vulnerability reporting", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "url": { + "type": "string", + "format": "uri", + "description": "The URL of the configuration" + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The URL of the configuration" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + ], + "previews": [], + "descriptionHTML": "Lists all code security configurations available in an organization.
\nThe authenticated user must be an administrator or security manager for the organization to use this endpoint.
\nOAuth app tokens and personal access tokens (classic) need the write:org scope to use this endpoint.
OK
" + }, + { + "httpStatusCode": "403", + "description": "Forbidden
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + } + ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "post", + "requestPath": "/orgs/{org}/code-security/configurations", + "title": "Create a code security configuration", + "category": "code-security", + "subcategory": "configurations", + "parameters": [ + { + "name": "org", + "description": "The organization name. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "bodyParameters": [ + { + "type": "string", + "name": "name", + "in": "body", + "description": "The name of the code security configuration. Must be unique within the organization.
", + "isRequired": true + }, + { + "type": "string", + "name": "description", + "in": "body", + "description": "A description of the code security configuration
", + "isRequired": true + }, + { + "type": "string", + "name": "advanced_security", + "in": "body", + "description": "The enablement status of GitHub Advanced Security
", + "enum": [ + "enabled", + "disabled" + ], + "default": "disabled" + }, + { + "type": "string", + "name": "dependency_graph", + "in": "body", + "description": "The enablement status of Dependency Graph
", + "enum": [ + "enabled", + "disabled", + "not_set" + ], + "default": "enabled" + }, + { + "type": "string", + "name": "dependabot_alerts", + "in": "body", + "description": "The enablement status of Dependabot alerts
", + "enum": [ + "enabled", + "disabled", + "not_set" + ], + "default": "disabled" + }, + { + "type": "string", + "name": "dependabot_security_updates", + "in": "body", + "description": "The enablement status of Dependabot security updates
", + "enum": [ + "enabled", + "disabled", + "not_set" + ], + "default": "disabled" + }, + { + "type": "string", + "name": "code_scanning_default_setup", + "in": "body", + "description": "The enablement status of code scanning default setup
", + "enum": [ + "enabled", + "disabled", + "not_set" + ], + "default": "disabled" + }, + { + "type": "string", + "name": "secret_scanning", + "in": "body", + "description": "The enablement status of secret scanning
", + "enum": [ + "enabled", + "disabled", + "not_set" + ], + "default": "disabled" + }, + { + "type": "string", + "name": "secret_scanning_push_protection", + "in": "body", + "description": "The enablement status of secret scanning push protection
", + "enum": [ + "enabled", + "disabled", + "not_set" + ], + "default": "disabled" + }, + { + "type": "string", + "name": "private_vulnerability_reporting", + "in": "body", + "description": "The enablement status of private vulnerability reporting
", + "enum": [ + "enabled", + "disabled", + "not_set" + ], + "default": "disabled" + } + ], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Administration\" organization permissions": "write" + } + ] + }, + "codeExamples": [ + { + "key": "default", + "request": { + "contentType": "application/json", + "description": "Example for a code security configuration", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "name": "octo-org recommended settings", + "description": "This is a code security configuration for octo-org", + "advanced_security": "enabled", + "dependabot_alerts": "enabled", + "dependabot_security_updates": "not_set", + "secret_scanning": "enabled" + }, + "parameters": { + "org": "ORG" + } + }, + "response": { + "statusCode": "201", + "contentType": "application/json", + "description": "Successfully created code security configuration
", + "example": { + "id": 1325, + "target_type": "organization", + "name": "octo-org recommended settings", + "description": "This is a code security configuration for octo-org", + "advanced_security": "enabled", + "dependency_graph": "enabled", + "dependabot_alerts": "enabled", + "dependabot_security_updates": "not_set", + "code_scanning_default_setup": "disabled", + "secret_scanning": "enabled", + "secret_scanning_push_protection": "disabled", + "private_vulnerability_reporting": "disabled", + "url": "https://api.github.com/orgs/octo-org/code-security/configurations/1325", + "html_url": "https://github.com/organizations/octo-org/settings/security_products/configurations/edit/1325", + "created_at": "2024-05-01T00:00:00Z", + "updated_at": "2024-05-01T00:00:00Z" + }, + "schema": { + "type": "object", + "description": "A code security configuration", + "properties": { + "id": { + "type": "integer", + "description": "The ID of the code security configuration" + }, + "name": { + "type": "string", + "description": "The name of the code security configuration. Must be unique within the organization." + }, + "target_type": { + "type": "string", + "description": "The type of the code security configuration.", + "enum": [ + "global", + "organization" + ] + }, + "description": { + "type": "string", + "description": "A description of the code security configuration" + }, + "advanced_security": { + "type": "string", + "description": "The enablement status of GitHub Advanced Security", + "enum": [ + "enabled", + "disabled" + ] + }, + "dependency_graph": { + "type": "string", + "description": "The enablement status of Dependency Graph", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "dependabot_alerts": { + "type": "string", + "description": "The enablement status of Dependabot alerts", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "dependabot_security_updates": { + "type": "string", + "description": "The enablement status of Dependabot security updates", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "code_scanning_default_setup": { + "type": "string", + "description": "The enablement status of code scanning default setup", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "secret_scanning": { + "type": "string", + "description": "The enablement status of secret scanning", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "secret_scanning_push_protection": { + "type": "string", + "description": "The enablement status of secret scanning push protection", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "private_vulnerability_reporting": { + "type": "string", + "description": "The enablement status of private vulnerability reporting", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "url": { + "type": "string", + "format": "uri", + "description": "The URL of the configuration" + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The URL of the configuration" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + } + } + ], + "previews": [], + "descriptionHTML": "Creates a code security configuration in an organization.
\nThe authenticated user must be an administrator or security manager for the organization to use this endpoint.
\nOAuth app tokens and personal access tokens (classic) need the write:org scope to use this endpoint.
Successfully created code security configuration
" + } + ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations/defaults", + "title": "Get default code security configurations", + "category": "code-security", + "subcategory": "configurations", + "parameters": [ + { + "name": "org", + "description": "The organization name. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "bodyParameters": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Administration\" organization permissions": "write" + } + ] + }, + "codeExamples": [ + { + "key": "default", + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "org": "ORG" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Response
", + "example": [ + { + "default_for_new_repos": "public", + "configuration": { + "id": 1325, + "target_type": "organization", + "name": "octo-org recommended settings", + "description": "This is a code security configuration for octo-org", + "advanced_security": "enabled", + "dependency_graph": "enabled", + "dependabot_alerts": "enabled", + "dependabot_security_updates": "not_set", + "code_scanning_default_setup": "enabled", + "secret_scanning": "enabled", + "secret_scanning_push_protection": "enabled", + "private_vulnerability_reporting": "enabled", + "url": "https://api.github.com/orgs/octo-org/code-security/configurations/1325", + "html_url": "https://github.com/organizations/octo-org/settings/security_products/configurations/edit/1325", + "created_at": "2024-05-01T00:00:00Z", + "updated_at": "2024-05-01T00:00:00Z" + } + }, + { + "default_for_new_repos": "private_and_internal", + "configuration": { + "id": 17, + "target_type": "global", + "name": "GitHub recommended", + "description": "Suggested settings for Dependabot, secret scanning, and code scanning.", + "advanced_security": "enabled", + "dependency_graph": "enabled", + "dependabot_alerts": "enabled", + "dependabot_security_updates": "not_set", + "code_scanning_default_setup": "enabled", + "secret_scanning": "enabled", + "secret_scanning_push_protection": "enabled", + "private_vulnerability_reporting": "enabled", + "url": "https://api.github.com/orgs/octo-org/code-security/configurations/17", + "html_url": "https://github.com/organizations/octo-org/settings/security_products/configurations/view", + "created_at": "2023-12-04T15:58:07Z", + "updated_at": "2023-12-04T15:58:07Z" + } + } + ], + "schema": { + "type": "array", + "description": "A list of default code security configurations", + "items": { + "type": "object", + "properties": { + "default_for_new_repos": { + "enum": [ + "public", + "private_and_internal", + "all" + ], + "description": "The visibility of newly created repositories for which the code security configuration will be applied to by default" + }, + "configuration": { + "type": "object", + "description": "A code security configuration", + "properties": { + "id": { + "type": "integer", + "description": "The ID of the code security configuration" + }, + "name": { + "type": "string", + "description": "The name of the code security configuration. Must be unique within the organization." + }, + "target_type": { + "type": "string", + "description": "The type of the code security configuration.", + "enum": [ + "global", + "organization" + ] + }, + "description": { + "type": "string", + "description": "A description of the code security configuration" + }, + "advanced_security": { + "type": "string", + "description": "The enablement status of GitHub Advanced Security", + "enum": [ + "enabled", + "disabled" + ] + }, + "dependency_graph": { + "type": "string", + "description": "The enablement status of Dependency Graph", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "dependabot_alerts": { + "type": "string", + "description": "The enablement status of Dependabot alerts", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "dependabot_security_updates": { + "type": "string", + "description": "The enablement status of Dependabot security updates", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "code_scanning_default_setup": { + "type": "string", + "description": "The enablement status of code scanning default setup", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "secret_scanning": { + "type": "string", + "description": "The enablement status of secret scanning", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "secret_scanning_push_protection": { + "type": "string", + "description": "The enablement status of secret scanning push protection", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "private_vulnerability_reporting": { + "type": "string", + "description": "The enablement status of private vulnerability reporting", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "url": { + "type": "string", + "format": "uri", + "description": "The URL of the configuration" + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The URL of the configuration" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + } + ], + "previews": [], + "descriptionHTML": "Lists the default code security configurations for an organization.
\nThe authenticated user must be an administrator or security manager for the organization to use this endpoint.
\nOAuth app tokens and personal access tokens (classic) need the write:org scope to use this endpoint.
OK
" + }, + { + "httpStatusCode": "304", + "description": "Not modified
" + }, + { + "httpStatusCode": "403", + "description": "Forbidden
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + } + ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}", + "title": "Get a code security configuration", + "category": "code-security", + "subcategory": "configurations", + "parameters": [ + { + "name": "org", + "description": "The organization name. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "configuration_id", + "description": "The unique identifier of the code security configuration.
", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "bodyParameters": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Administration\" organization permissions": "write" + } + ] + }, + "codeExamples": [ + { + "key": "default", + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "org": "ORG", + "configuration_id": "CONFIGURATION_ID" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Response
", + "example": { + "id": 1325, + "target_type": "organization", + "name": "octo-org recommended settings", + "description": "This is a code security configuration for octo-org", + "advanced_security": "enabled", + "dependency_graph": "enabled", + "dependabot_alerts": "enabled", + "dependabot_security_updates": "not_set", + "code_scanning_default_setup": "disabled", + "secret_scanning": "enabled", + "secret_scanning_push_protection": "disabled", + "private_vulnerability_reporting": "disabled", + "url": "https://api.github.com/orgs/octo-org/code-security/configurations/1325", + "html_url": "https://github.com/organizations/octo-org/settings/security_products/configurations/edit/1325", + "created_at": "2024-05-01T00:00:00Z", + "updated_at": "2024-05-01T00:00:00Z" + }, + "schema": { + "type": "object", + "description": "A code security configuration", + "properties": { + "id": { + "type": "integer", + "description": "The ID of the code security configuration" + }, + "name": { + "type": "string", + "description": "The name of the code security configuration. Must be unique within the organization." + }, + "target_type": { + "type": "string", + "description": "The type of the code security configuration.", + "enum": [ + "global", + "organization" + ] + }, + "description": { + "type": "string", + "description": "A description of the code security configuration" + }, + "advanced_security": { + "type": "string", + "description": "The enablement status of GitHub Advanced Security", + "enum": [ + "enabled", + "disabled" + ] + }, + "dependency_graph": { + "type": "string", + "description": "The enablement status of Dependency Graph", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "dependabot_alerts": { + "type": "string", + "description": "The enablement status of Dependabot alerts", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "dependabot_security_updates": { + "type": "string", + "description": "The enablement status of Dependabot security updates", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "code_scanning_default_setup": { + "type": "string", + "description": "The enablement status of code scanning default setup", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "secret_scanning": { + "type": "string", + "description": "The enablement status of secret scanning", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "secret_scanning_push_protection": { + "type": "string", + "description": "The enablement status of secret scanning push protection", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "private_vulnerability_reporting": { + "type": "string", + "description": "The enablement status of private vulnerability reporting", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "url": { + "type": "string", + "format": "uri", + "description": "The URL of the configuration" + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The URL of the configuration" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + } + } + ], + "previews": [], + "descriptionHTML": "Gets a code security configuration available in an organization.
\nThe authenticated user must be an administrator or security manager for the organization to use this endpoint.
\nOAuth app tokens and personal access tokens (classic) need the write:org scope to use this endpoint.
OK
" + }, + { + "httpStatusCode": "304", + "description": "Not modified
" + }, + { + "httpStatusCode": "403", + "description": "Forbidden
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + } + ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "patch", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}", + "title": "Update a code security configuration", + "category": "code-security", + "subcategory": "configurations", + "parameters": [ + { + "name": "org", + "description": "The organization name. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "configuration_id", + "description": "The unique identifier of the code security configuration.
", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "bodyParameters": [ + { + "type": "string", + "name": "name", + "in": "body", + "description": "The name of the code security configuration. Must be unique within the organization.
" + }, + { + "type": "string", + "name": "description", + "in": "body", + "description": "A description of the code security configuration
" + }, + { + "type": "string", + "name": "advanced_security", + "in": "body", + "description": "The enablement status of GitHub Advanced Security
", + "enum": [ + "enabled", + "disabled" + ] + }, + { + "type": "string", + "name": "dependency_graph", + "in": "body", + "description": "The enablement status of Dependency Graph
", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + { + "type": "string", + "name": "dependabot_alerts", + "in": "body", + "description": "The enablement status of Dependabot alerts
", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + { + "type": "string", + "name": "dependabot_security_updates", + "in": "body", + "description": "The enablement status of Dependabot security updates
", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + { + "type": "string", + "name": "code_scanning_default_setup", + "in": "body", + "description": "The enablement status of code scanning default setup
", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + { + "type": "string", + "name": "secret_scanning", + "in": "body", + "description": "The enablement status of secret scanning
", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + { + "type": "string", + "name": "secret_scanning_push_protection", + "in": "body", + "description": "The enablement status of secret scanning push protection
", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + { + "type": "string", + "name": "private_vulnerability_reporting", + "in": "body", + "description": "The enablement status of private vulnerability reporting
", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + } + ], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Administration\" organization permissions": "write" + } + ] + }, + "codeExamples": [ + { + "key": "default", + "request": { + "contentType": "application/json", + "description": "Example for updating a code security configuration", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "name": "octo-org recommended settings v2", + "secret_scanning": "disabled", + "code_scanning_default_setup": "enabled" + }, + "parameters": { + "org": "ORG", + "configuration_id": "CONFIGURATION_ID" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Response when a configuration is updated
", + "example": { + "id": 1325, + "target_type": "organization", + "name": "octo-org recommended settings v2", + "description": "This is a code security configuration for octo-org", + "advanced_security": "enabled", + "dependency_graph": "enabled", + "dependabot_alerts": "enabled", + "dependabot_security_updates": "not_set", + "code_scanning_default_setup": "enabled", + "secret_scanning": "disabled", + "secret_scanning_push_protection": "disabled", + "private_vulnerability_reporting": "disabled", + "url": "https://api.github.com/orgs/octo-org/code-security/configurations/1325", + "html_url": "https://github.com/organizations/octo-org/settings/security_products/configurations/edit/1325", + "created_at": "2024-05-01T00:00:00Z", + "updated_at": "2024-05-01T00:00:00Z" + }, + "schema": { + "type": "object", + "description": "A code security configuration", + "properties": { + "id": { + "type": "integer", + "description": "The ID of the code security configuration" + }, + "name": { + "type": "string", + "description": "The name of the code security configuration. Must be unique within the organization." + }, + "target_type": { + "type": "string", + "description": "The type of the code security configuration.", + "enum": [ + "global", + "organization" + ] + }, + "description": { + "type": "string", + "description": "A description of the code security configuration" + }, + "advanced_security": { + "type": "string", + "description": "The enablement status of GitHub Advanced Security", + "enum": [ + "enabled", + "disabled" + ] + }, + "dependency_graph": { + "type": "string", + "description": "The enablement status of Dependency Graph", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "dependabot_alerts": { + "type": "string", + "description": "The enablement status of Dependabot alerts", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "dependabot_security_updates": { + "type": "string", + "description": "The enablement status of Dependabot security updates", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "code_scanning_default_setup": { + "type": "string", + "description": "The enablement status of code scanning default setup", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "secret_scanning": { + "type": "string", + "description": "The enablement status of secret scanning", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "secret_scanning_push_protection": { + "type": "string", + "description": "The enablement status of secret scanning push protection", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "private_vulnerability_reporting": { + "type": "string", + "description": "The enablement status of private vulnerability reporting", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "url": { + "type": "string", + "format": "uri", + "description": "The URL of the configuration" + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The URL of the configuration" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + } + } + ], + "previews": [], + "descriptionHTML": "Updates a code security configuration in an organization.
\nThe authenticated user must be an administrator or security manager for the organization to use this endpoint.
\nOAuth app tokens and personal access tokens (classic) need the write:org scope to use this endpoint.
Response when a configuration is updated
" + }, + { + "httpStatusCode": "204", + "description": "Response when no new updates are made
" + } + ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "delete", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}", + "title": "Delete a code security configuration", + "category": "code-security", + "subcategory": "configurations", + "parameters": [ + { + "name": "org", + "description": "The organization name. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "configuration_id", + "description": "The unique identifier of the code security configuration.
", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "bodyParameters": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Administration\" organization permissions": "write" + } + ] + }, + "codeExamples": [ + { + "key": "default", + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "org": "ORG", + "configuration_id": "CONFIGURATION_ID" + } + }, + "response": { + "statusCode": "204", + "description": "A header with no content is returned.
" + } + } + ], + "previews": [], + "descriptionHTML": "Deletes the desired code security configuration from an organization.\nRepositories attached to the configuration will retain their settings but will no longer be associated with\nthe configuration.
\nThe authenticated user must be an administrator or security manager for the organization to use this endpoint.
\nOAuth app tokens and personal access tokens (classic) need the write:org scope to use this endpoint.
A header with no content is returned.
" + }, + { + "httpStatusCode": "400", + "description": "Bad Request
" + }, + { + "httpStatusCode": "403", + "description": "Forbidden
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + }, + { + "httpStatusCode": "409", + "description": "Conflict
" + } + ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "post", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}/attach", + "title": "Attach a configuration to repositories", + "category": "code-security", + "subcategory": "configurations", + "parameters": [ + { + "name": "org", + "description": "The organization name. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "configuration_id", + "description": "The unique identifier of the code security configuration.
", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "bodyParameters": [ + { + "type": "string", + "name": "scope", + "in": "body", + "description": "The type of repositories to attach the configuration to. selected means the configuration will be attached to only the repositories specified by selected_repository_ids
An array of repository IDs to attach the configuration to. You can only provide a list of repository ids when the scope is set to selected.
Accepted
", + "example": null, + "schema": { + "type": "object" + } + } + } + ], + "previews": [], + "descriptionHTML": "Attach a code security configuration to a set of repositories. If the repositories specified are already attached to a configuration, they will be re-attached to the provided configuration.
\nIf insufficient GHAS licenses are available to attach the configuration to a repository, only free features will be enabled.
\nThe authenticated user must be an administrator or security manager for the organization to use this endpoint.
\nOAuth app tokens and personal access tokens (classic) need the write:org scope to use this endpoint.
Accepted
" + } + ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "put", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}/defaults", + "title": "Set a code security configuration as a default for an organization", + "category": "code-security", + "subcategory": "configurations", + "parameters": [ + { + "name": "org", + "description": "The organization name. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "configuration_id", + "description": "The unique identifier of the code security configuration.
", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "bodyParameters": [ + { + "type": "string", + "name": "default_for_new_repos", + "in": "body", + "description": "Specify which types of repository this security configuration should be applied to by default.
", + "enum": [ + "all", + "none", + "private_and_internal", + "public" + ] + } + ], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Administration\" organization permissions": "write" + } + ] + }, + "codeExamples": [ + { + "key": "default", + "request": { + "contentType": "application/json", + "description": "Set this configuration to be enabled by default on all new repositories.", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "default_for_new_repos": "all" + }, + "parameters": { + "org": "ORG", + "configuration_id": "CONFIGURATION_ID" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Default successfully changed.
", + "example": { + "default_for_new_repos": "all", + "configuration": { + "value": { + "id": 1325, + "target_type": "organization", + "name": "octo-org recommended settings", + "description": "This is a code security configuration for octo-org", + "advanced_security": "enabled", + "dependency_graph": "enabled", + "dependabot_alerts": "enabled", + "dependabot_security_updates": "not_set", + "code_scanning_default_setup": "disabled", + "secret_scanning": "enabled", + "secret_scanning_push_protection": "disabled", + "private_vulnerability_reporting": "disabled", + "url": "https://api.github.com/orgs/octo-org/code-security/configurations/1325", + "html_url": "https://github.com/organizations/octo-org/settings/security_products/configurations/edit/1325", + "created_at": "2024-05-01T00:00:00Z", + "updated_at": "2024-05-01T00:00:00Z" + } + } + }, + "schema": { + "type": "object", + "properties": { + "default_for_new_repos": { + "type": "string", + "description": "Specifies which types of repository this security configuration is applied to by default.", + "enum": [ + "all", + "none", + "private_and_internal", + "public" + ] + }, + "configuration": { + "type": "object", + "description": "A code security configuration", + "properties": { + "id": { + "type": "integer", + "description": "The ID of the code security configuration" + }, + "name": { + "type": "string", + "description": "The name of the code security configuration. Must be unique within the organization." + }, + "target_type": { + "type": "string", + "description": "The type of the code security configuration.", + "enum": [ + "global", + "organization" + ] + }, + "description": { + "type": "string", + "description": "A description of the code security configuration" + }, + "advanced_security": { + "type": "string", + "description": "The enablement status of GitHub Advanced Security", + "enum": [ + "enabled", + "disabled" + ] + }, + "dependency_graph": { + "type": "string", + "description": "The enablement status of Dependency Graph", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "dependabot_alerts": { + "type": "string", + "description": "The enablement status of Dependabot alerts", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "dependabot_security_updates": { + "type": "string", + "description": "The enablement status of Dependabot security updates", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "code_scanning_default_setup": { + "type": "string", + "description": "The enablement status of code scanning default setup", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "secret_scanning": { + "type": "string", + "description": "The enablement status of secret scanning", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "secret_scanning_push_protection": { + "type": "string", + "description": "The enablement status of secret scanning push protection", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "private_vulnerability_reporting": { + "type": "string", + "description": "The enablement status of private vulnerability reporting", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "url": { + "type": "string", + "format": "uri", + "description": "The URL of the configuration" + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The URL of the configuration" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + ], + "previews": [], + "descriptionHTML": "Sets a code security configuration as a default to be applied to new repositories in your organization.
\nThis configuration will be applied to the matching repository type (all, none, public, private and internal) by default when they are created.
\nThe authenticated user must be an administrator or security manager for the organization to use this endpoint.
\nOAuth app tokens and personal access tokens (classic) need the write:org scope to use this endpoint.
Default successfully changed.
" + }, + { + "httpStatusCode": "403", + "description": "Forbidden
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + } + ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}/repositories", + "title": "Get repositories associated with a code security configuration", + "category": "code-security", + "subcategory": "configurations", + "parameters": [ + { + "name": "org", + "description": "The organization name. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "configuration_id", + "description": "The unique identifier of the code security configuration.
", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "per_page", + "description": "The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"
", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 30 + } + }, + { + "name": "before", + "description": "A cursor, as given in the Link header. If specified, the query only searches for results before this cursor. For more information, see \"Using pagination in the REST API.\"
", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "after", + "description": "A cursor, as given in the Link header. If specified, the query only searches for results after this cursor. For more information, see \"Using pagination in the REST API.\"
", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "status", + "description": "A comma-separated list of statuses. If specified, only repositories with these attachment statuses will be returned.
\nCan be: all, attached, attaching, detached, enforced, failed, updating
Example of code security configuration repositories
", + "example": [ + { + "status": "attached", + "repository": { + "value": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "https://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "https://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "https://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "https://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "https://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "https://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "https://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "https://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "https://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "https://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "https://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "https://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "https://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "https://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "https://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "https://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "https://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "https://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "https://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "https://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "https://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "https://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "https://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "https://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "https://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks" + } + } + } + ], + "schema": { + "type": "array", + "items": { + "type": "object", + "description": "Repositories associated with a code security configuration and attachment status", + "properties": { + "status": { + "type": "string", + "description": "The attachment status of the code security configuration on the repository.", + "enum": [ + "attached", + "attaching", + "detached", + "enforced", + "failed", + "updating" + ] + }, + "repository": { + "title": "Simple Repository", + "description": "A GitHub repository.", + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "A unique identifier of the repository.", + "examples": [ + 1296269 + ] + }, + "node_id": { + "type": "string", + "description": "The GraphQL identifier of the repository.", + "examples": [ + "MDEwOlJlcG9zaXRvcnkxMjk2MjY5" + ] + }, + "name": { + "type": "string", + "description": "The name of the repository.", + "examples": [ + "Hello-World" + ] + }, + "full_name": { + "type": "string", + "description": "The full, globally unique, name of the repository.", + "examples": [ + "octocat/Hello-World" + ] + }, + "owner": { + "title": "Simple User", + "description": "A GitHub user.", + "type": "object", + "properties": { + "name": { + "type": [ + "string", + "null" + ] + }, + "email": { + "type": [ + "string", + "null" + ] + }, + "login": { + "type": "string", + "examples": [ + "octocat" + ] + }, + "id": { + "type": "integer", + "examples": [ + 1 + ] + }, + "node_id": { + "type": "string", + "examples": [ + "MDQ6VXNlcjE=" + ] + }, + "avatar_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/images/error/octocat_happy.gif" + ] + }, + "gravatar_id": { + "type": [ + "string", + "null" + ], + "examples": [ + "41d064eb2195891e12d0413f63227ea7" + ] + }, + "url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat" + ] + }, + "html_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/octocat" + ] + }, + "followers_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/followers" + ] + }, + "following_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/following{/other_user}" + ] + }, + "gists_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/gists{/gist_id}" + ] + }, + "starred_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/starred{/owner}{/repo}" + ] + }, + "subscriptions_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/subscriptions" + ] + }, + "organizations_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/orgs" + ] + }, + "repos_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/repos" + ] + }, + "events_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/events{/privacy}" + ] + }, + "received_events_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/received_events" + ] + }, + "type": { + "type": "string", + "examples": [ + "User" + ] + }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { + "type": "string", + "examples": [ + "\"2020-07-09T00:17:55Z\"" + ] + } + }, + "required": [ + "avatar_url", + "events_url", + "followers_url", + "following_url", + "gists_url", + "gravatar_id", + "html_url", + "id", + "node_id", + "login", + "organizations_url", + "received_events_url", + "repos_url", + "site_admin", + "starred_url", + "subscriptions_url", + "type", + "url" + ] + }, + "private": { + "type": "boolean", + "description": "Whether the repository is private." + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The URL to view the repository on GitHub.com.", + "examples": [ + "https://github.com/octocat/Hello-World" + ] + }, + "description": { + "type": [ + "string", + "null" + ], + "description": "The repository description.", + "examples": [ + "This your first repo!" + ] + }, + "fork": { + "type": "boolean", + "description": "Whether the repository is a fork." + }, + "url": { + "type": "string", + "format": "uri", + "description": "The URL to get more information about the repository from the GitHub API.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World" + ] + }, + "archive_url": { + "type": "string", + "description": "A template for the API URL to download the repository as an archive.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}" + ] + }, + "assignees_url": { + "type": "string", + "description": "A template for the API URL to list the available assignees for issues in the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/assignees{/user}" + ] + }, + "blobs_url": { + "type": "string", + "description": "A template for the API URL to create or retrieve a raw Git blob in the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}" + ] + }, + "branches_url": { + "type": "string", + "description": "A template for the API URL to get information about branches in the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/branches{/branch}" + ] + }, + "collaborators_url": { + "type": "string", + "description": "A template for the API URL to get information about collaborators of the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}" + ] + }, + "comments_url": { + "type": "string", + "description": "A template for the API URL to get information about comments on the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/comments{/number}" + ] + }, + "commits_url": { + "type": "string", + "description": "A template for the API URL to get information about commits on the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/commits{/sha}" + ] + }, + "compare_url": { + "type": "string", + "description": "A template for the API URL to compare two commits or refs.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}" + ] + }, + "contents_url": { + "type": "string", + "description": "A template for the API URL to get the contents of the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/contents/{+path}" + ] + }, + "contributors_url": { + "type": "string", + "format": "uri", + "description": "A template for the API URL to list the contributors to the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/contributors" + ] + }, + "deployments_url": { + "type": "string", + "format": "uri", + "description": "The API URL to list the deployments of the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/deployments" + ] + }, + "downloads_url": { + "type": "string", + "format": "uri", + "description": "The API URL to list the downloads on the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/downloads" + ] + }, + "events_url": { + "type": "string", + "format": "uri", + "description": "The API URL to list the events of the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/events" + ] + }, + "forks_url": { + "type": "string", + "format": "uri", + "description": "The API URL to list the forks of the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/forks" + ] + }, + "git_commits_url": { + "type": "string", + "description": "A template for the API URL to get information about Git commits of the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}" + ] + }, + "git_refs_url": { + "type": "string", + "description": "A template for the API URL to get information about Git refs of the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}" + ] + }, + "git_tags_url": { + "type": "string", + "description": "A template for the API URL to get information about Git tags of the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}" + ] + }, + "issue_comment_url": { + "type": "string", + "description": "A template for the API URL to get information about issue comments on the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}" + ] + }, + "issue_events_url": { + "type": "string", + "description": "A template for the API URL to get information about issue events on the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/issues/events{/number}" + ] + }, + "issues_url": { + "type": "string", + "description": "A template for the API URL to get information about issues on the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/issues{/number}" + ] + }, + "keys_url": { + "type": "string", + "description": "A template for the API URL to get information about deploy keys on the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/keys{/key_id}" + ] + }, + "labels_url": { + "type": "string", + "description": "A template for the API URL to get information about labels of the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/labels{/name}" + ] + }, + "languages_url": { + "type": "string", + "format": "uri", + "description": "The API URL to get information about the languages of the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/languages" + ] + }, + "merges_url": { + "type": "string", + "format": "uri", + "description": "The API URL to merge branches in the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/merges" + ] + }, + "milestones_url": { + "type": "string", + "description": "A template for the API URL to get information about milestones of the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/milestones{/number}" + ] + }, + "notifications_url": { + "type": "string", + "description": "A template for the API URL to get information about notifications on the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}" + ] + }, + "pulls_url": { + "type": "string", + "description": "A template for the API URL to get information about pull requests on the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/pulls{/number}" + ] + }, + "releases_url": { + "type": "string", + "description": "A template for the API URL to get information about releases on the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/releases{/id}" + ] + }, + "stargazers_url": { + "type": "string", + "format": "uri", + "description": "The API URL to list the stargazers on the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/stargazers" + ] + }, + "statuses_url": { + "type": "string", + "description": "A template for the API URL to get information about statuses of a commit.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/statuses/{sha}" + ] + }, + "subscribers_url": { + "type": "string", + "format": "uri", + "description": "The API URL to list the subscribers on the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/subscribers" + ] + }, + "subscription_url": { + "type": "string", + "format": "uri", + "description": "The API URL to subscribe to notifications for this repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/subscription" + ] + }, + "tags_url": { + "type": "string", + "format": "uri", + "description": "The API URL to get information about tags on the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/tags" + ] + }, + "teams_url": { + "type": "string", + "format": "uri", + "description": "The API URL to list the teams on the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/teams" + ] + }, + "trees_url": { + "type": "string", + "description": "A template for the API URL to create or retrieve a raw Git tree of the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}" + ] + }, + "hooks_url": { + "type": "string", + "format": "uri", + "description": "The API URL to list the hooks on the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/hooks" + ] + } + }, + "required": [ + "archive_url", + "assignees_url", + "blobs_url", + "branches_url", + "collaborators_url", + "comments_url", + "commits_url", + "compare_url", + "contents_url", + "contributors_url", + "deployments_url", + "description", + "downloads_url", + "events_url", + "fork", + "forks_url", + "full_name", + "git_commits_url", + "git_refs_url", + "git_tags_url", + "hooks_url", + "html_url", + "id", + "node_id", + "issue_comment_url", + "issue_events_url", + "issues_url", + "keys_url", + "labels_url", + "languages_url", + "merges_url", + "milestones_url", + "name", + "notifications_url", + "owner", + "private", + "pulls_url", + "releases_url", + "stargazers_url", + "statuses_url", + "subscribers_url", + "subscription_url", + "tags_url", + "teams_url", + "trees_url", + "url" + ] + } + } + } + } + } + } + ], + "previews": [], + "descriptionHTML": "Lists the repositories associated with a code security configuration in an organization.
\nThe authenticated user must be an administrator or security manager for the organization to use this endpoint.
\nOAuth app tokens and personal access tokens (classic) need the write:org scope to use this endpoint.
OK
" + }, + { + "httpStatusCode": "403", + "description": "Forbidden
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + } + ] + } + ] + }, "codes-of-conduct": { "codes-of-conduct": [ { diff --git a/src/rest/data/ghec-2022-11-28/schema.json b/src/rest/data/ghec-2022-11-28/schema.json index d9036e4c88..62e2bd5543 100644 --- a/src/rest/data/ghec-2022-11-28/schema.json +++ b/src/rest/data/ghec-2022-11-28/schema.json @@ -164846,6 +164846,2510 @@ } ] }, + "code-security": { + "configurations": [ + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations", + "title": "Get code security configurations for an organization", + "category": "code-security", + "subcategory": "configurations", + "parameters": [ + { + "name": "org", + "description": "The organization name. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "target_type", + "in": "query", + "description": "The target type of the code security configuration
", + "required": false, + "schema": { + "type": "string", + "enum": [ + "global", + "all" + ], + "default": "all" + } + }, + { + "name": "per_page", + "in": "query", + "description": "'The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"'
", + "required": false, + "schema": { + "type": "integer", + "default": 30 + } + }, + { + "name": "before", + "description": "A cursor, as given in the Link header. If specified, the query only searches for results before this cursor. For more information, see \"Using pagination in the REST API.\"
", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "after", + "description": "A cursor, as given in the Link header. If specified, the query only searches for results after this cursor. For more information, see \"Using pagination in the REST API.\"
", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "bodyParameters": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Administration\" organization permissions": "write" + } + ] + }, + "codeExamples": [ + { + "key": "default", + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "org": "ORG" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Response
", + "example": [ + { + "id": 17, + "target_type": "global", + "name": "GitHub recommended", + "description": "Suggested settings for Dependabot, secret scanning, and code scanning.", + "advanced_security": "enabled", + "dependency_graph": "enabled", + "dependabot_alerts": "enabled", + "dependabot_security_updates": "not_set", + "code_scanning_default_setup": "enabled", + "secret_scanning": "enabled", + "secret_scanning_push_protection": "enabled", + "private_vulnerability_reporting": "enabled", + "url": "https://api.github.com/orgs/octo-org/code-security/configurations/17", + "html_url": "https://github.com/organizations/octo-org/settings/security_products/configurations/view", + "created_at": "2023-12-04T15:58:07Z", + "updated_at": "2023-12-04T15:58:07Z" + }, + { + "id": 1326, + "target_type": "organization", + "name": "High risk settings", + "description": "This is a code security configuration for octo-org high risk repositories", + "advanced_security": "enabled", + "dependency_graph": "enabled", + "dependabot_alerts": "enabled", + "dependabot_security_updates": "enabled", + "code_scanning_default_setup": "enabled", + "secret_scanning": "enabled", + "secret_scanning_push_protection": "enabled", + "private_vulnerability_reporting": "enabled", + "url": "https://api.github.com/orgs/octo-org/code-security/configurations/1326", + "html_url": "https://github.com/organizations/octo-org/settings/security_products/configurations/edit/1326", + "created_at": "2024-05-10T00:00:00Z", + "updated_at": "2024-05-10T00:00:00Z" + } + ], + "schema": { + "type": "array", + "items": { + "type": "object", + "description": "A code security configuration", + "properties": { + "id": { + "type": "integer", + "description": "The ID of the code security configuration" + }, + "name": { + "type": "string", + "description": "The name of the code security configuration. Must be unique within the organization." + }, + "target_type": { + "type": "string", + "description": "The type of the code security configuration.", + "enum": [ + "global", + "organization" + ] + }, + "description": { + "type": "string", + "description": "A description of the code security configuration" + }, + "advanced_security": { + "type": "string", + "description": "The enablement status of GitHub Advanced Security", + "enum": [ + "enabled", + "disabled" + ] + }, + "dependency_graph": { + "type": "string", + "description": "The enablement status of Dependency Graph", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "dependabot_alerts": { + "type": "string", + "description": "The enablement status of Dependabot alerts", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "dependabot_security_updates": { + "type": "string", + "description": "The enablement status of Dependabot security updates", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "code_scanning_default_setup": { + "type": "string", + "description": "The enablement status of code scanning default setup", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "secret_scanning": { + "type": "string", + "description": "The enablement status of secret scanning", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "secret_scanning_push_protection": { + "type": "string", + "description": "The enablement status of secret scanning push protection", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "private_vulnerability_reporting": { + "type": "string", + "description": "The enablement status of private vulnerability reporting", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "url": { + "type": "string", + "format": "uri", + "description": "The URL of the configuration" + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The URL of the configuration" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + ], + "previews": [], + "descriptionHTML": "Lists all code security configurations available in an organization.
\nThe authenticated user must be an administrator or security manager for the organization to use this endpoint.
\nOAuth app tokens and personal access tokens (classic) need the write:org scope to use this endpoint.
OK
" + }, + { + "httpStatusCode": "403", + "description": "Forbidden
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + } + ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "post", + "requestPath": "/orgs/{org}/code-security/configurations", + "title": "Create a code security configuration", + "category": "code-security", + "subcategory": "configurations", + "parameters": [ + { + "name": "org", + "description": "The organization name. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "bodyParameters": [ + { + "type": "string", + "name": "name", + "in": "body", + "description": "The name of the code security configuration. Must be unique within the organization.
", + "isRequired": true + }, + { + "type": "string", + "name": "description", + "in": "body", + "description": "A description of the code security configuration
", + "isRequired": true + }, + { + "type": "string", + "name": "advanced_security", + "in": "body", + "description": "The enablement status of GitHub Advanced Security
", + "enum": [ + "enabled", + "disabled" + ], + "default": "disabled" + }, + { + "type": "string", + "name": "dependency_graph", + "in": "body", + "description": "The enablement status of Dependency Graph
", + "enum": [ + "enabled", + "disabled", + "not_set" + ], + "default": "enabled" + }, + { + "type": "string", + "name": "dependabot_alerts", + "in": "body", + "description": "The enablement status of Dependabot alerts
", + "enum": [ + "enabled", + "disabled", + "not_set" + ], + "default": "disabled" + }, + { + "type": "string", + "name": "dependabot_security_updates", + "in": "body", + "description": "The enablement status of Dependabot security updates
", + "enum": [ + "enabled", + "disabled", + "not_set" + ], + "default": "disabled" + }, + { + "type": "string", + "name": "code_scanning_default_setup", + "in": "body", + "description": "The enablement status of code scanning default setup
", + "enum": [ + "enabled", + "disabled", + "not_set" + ], + "default": "disabled" + }, + { + "type": "string", + "name": "secret_scanning", + "in": "body", + "description": "The enablement status of secret scanning
", + "enum": [ + "enabled", + "disabled", + "not_set" + ], + "default": "disabled" + }, + { + "type": "string", + "name": "secret_scanning_push_protection", + "in": "body", + "description": "The enablement status of secret scanning push protection
", + "enum": [ + "enabled", + "disabled", + "not_set" + ], + "default": "disabled" + }, + { + "type": "string", + "name": "private_vulnerability_reporting", + "in": "body", + "description": "The enablement status of private vulnerability reporting
", + "enum": [ + "enabled", + "disabled", + "not_set" + ], + "default": "disabled" + } + ], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Administration\" organization permissions": "write" + } + ] + }, + "codeExamples": [ + { + "key": "default", + "request": { + "contentType": "application/json", + "description": "Example for a code security configuration", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "name": "octo-org recommended settings", + "description": "This is a code security configuration for octo-org", + "advanced_security": "enabled", + "dependabot_alerts": "enabled", + "dependabot_security_updates": "not_set", + "secret_scanning": "enabled" + }, + "parameters": { + "org": "ORG" + } + }, + "response": { + "statusCode": "201", + "contentType": "application/json", + "description": "Successfully created code security configuration
", + "example": { + "id": 1325, + "target_type": "organization", + "name": "octo-org recommended settings", + "description": "This is a code security configuration for octo-org", + "advanced_security": "enabled", + "dependency_graph": "enabled", + "dependabot_alerts": "enabled", + "dependabot_security_updates": "not_set", + "code_scanning_default_setup": "disabled", + "secret_scanning": "enabled", + "secret_scanning_push_protection": "disabled", + "private_vulnerability_reporting": "disabled", + "url": "https://api.github.com/orgs/octo-org/code-security/configurations/1325", + "html_url": "https://github.com/organizations/octo-org/settings/security_products/configurations/edit/1325", + "created_at": "2024-05-01T00:00:00Z", + "updated_at": "2024-05-01T00:00:00Z" + }, + "schema": { + "type": "object", + "description": "A code security configuration", + "properties": { + "id": { + "type": "integer", + "description": "The ID of the code security configuration" + }, + "name": { + "type": "string", + "description": "The name of the code security configuration. Must be unique within the organization." + }, + "target_type": { + "type": "string", + "description": "The type of the code security configuration.", + "enum": [ + "global", + "organization" + ] + }, + "description": { + "type": "string", + "description": "A description of the code security configuration" + }, + "advanced_security": { + "type": "string", + "description": "The enablement status of GitHub Advanced Security", + "enum": [ + "enabled", + "disabled" + ] + }, + "dependency_graph": { + "type": "string", + "description": "The enablement status of Dependency Graph", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "dependabot_alerts": { + "type": "string", + "description": "The enablement status of Dependabot alerts", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "dependabot_security_updates": { + "type": "string", + "description": "The enablement status of Dependabot security updates", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "code_scanning_default_setup": { + "type": "string", + "description": "The enablement status of code scanning default setup", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "secret_scanning": { + "type": "string", + "description": "The enablement status of secret scanning", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "secret_scanning_push_protection": { + "type": "string", + "description": "The enablement status of secret scanning push protection", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "private_vulnerability_reporting": { + "type": "string", + "description": "The enablement status of private vulnerability reporting", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "url": { + "type": "string", + "format": "uri", + "description": "The URL of the configuration" + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The URL of the configuration" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + } + } + ], + "previews": [], + "descriptionHTML": "Creates a code security configuration in an organization.
\nThe authenticated user must be an administrator or security manager for the organization to use this endpoint.
\nOAuth app tokens and personal access tokens (classic) need the write:org scope to use this endpoint.
Successfully created code security configuration
" + } + ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations/defaults", + "title": "Get default code security configurations", + "category": "code-security", + "subcategory": "configurations", + "parameters": [ + { + "name": "org", + "description": "The organization name. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "bodyParameters": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Administration\" organization permissions": "write" + } + ] + }, + "codeExamples": [ + { + "key": "default", + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "org": "ORG" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Response
", + "example": [ + { + "default_for_new_repos": "public", + "configuration": { + "id": 1325, + "target_type": "organization", + "name": "octo-org recommended settings", + "description": "This is a code security configuration for octo-org", + "advanced_security": "enabled", + "dependency_graph": "enabled", + "dependabot_alerts": "enabled", + "dependabot_security_updates": "not_set", + "code_scanning_default_setup": "enabled", + "secret_scanning": "enabled", + "secret_scanning_push_protection": "enabled", + "private_vulnerability_reporting": "enabled", + "url": "https://api.github.com/orgs/octo-org/code-security/configurations/1325", + "html_url": "https://github.com/organizations/octo-org/settings/security_products/configurations/edit/1325", + "created_at": "2024-05-01T00:00:00Z", + "updated_at": "2024-05-01T00:00:00Z" + } + }, + { + "default_for_new_repos": "private_and_internal", + "configuration": { + "id": 17, + "target_type": "global", + "name": "GitHub recommended", + "description": "Suggested settings for Dependabot, secret scanning, and code scanning.", + "advanced_security": "enabled", + "dependency_graph": "enabled", + "dependabot_alerts": "enabled", + "dependabot_security_updates": "not_set", + "code_scanning_default_setup": "enabled", + "secret_scanning": "enabled", + "secret_scanning_push_protection": "enabled", + "private_vulnerability_reporting": "enabled", + "url": "https://api.github.com/orgs/octo-org/code-security/configurations/17", + "html_url": "https://github.com/organizations/octo-org/settings/security_products/configurations/view", + "created_at": "2023-12-04T15:58:07Z", + "updated_at": "2023-12-04T15:58:07Z" + } + } + ], + "schema": { + "type": "array", + "description": "A list of default code security configurations", + "items": { + "type": "object", + "properties": { + "default_for_new_repos": { + "enum": [ + "public", + "private_and_internal", + "all" + ], + "description": "The visibility of newly created repositories for which the code security configuration will be applied to by default" + }, + "configuration": { + "type": "object", + "description": "A code security configuration", + "properties": { + "id": { + "type": "integer", + "description": "The ID of the code security configuration" + }, + "name": { + "type": "string", + "description": "The name of the code security configuration. Must be unique within the organization." + }, + "target_type": { + "type": "string", + "description": "The type of the code security configuration.", + "enum": [ + "global", + "organization" + ] + }, + "description": { + "type": "string", + "description": "A description of the code security configuration" + }, + "advanced_security": { + "type": "string", + "description": "The enablement status of GitHub Advanced Security", + "enum": [ + "enabled", + "disabled" + ] + }, + "dependency_graph": { + "type": "string", + "description": "The enablement status of Dependency Graph", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "dependabot_alerts": { + "type": "string", + "description": "The enablement status of Dependabot alerts", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "dependabot_security_updates": { + "type": "string", + "description": "The enablement status of Dependabot security updates", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "code_scanning_default_setup": { + "type": "string", + "description": "The enablement status of code scanning default setup", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "secret_scanning": { + "type": "string", + "description": "The enablement status of secret scanning", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "secret_scanning_push_protection": { + "type": "string", + "description": "The enablement status of secret scanning push protection", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "private_vulnerability_reporting": { + "type": "string", + "description": "The enablement status of private vulnerability reporting", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "url": { + "type": "string", + "format": "uri", + "description": "The URL of the configuration" + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The URL of the configuration" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + } + ], + "previews": [], + "descriptionHTML": "Lists the default code security configurations for an organization.
\nThe authenticated user must be an administrator or security manager for the organization to use this endpoint.
\nOAuth app tokens and personal access tokens (classic) need the write:org scope to use this endpoint.
OK
" + }, + { + "httpStatusCode": "304", + "description": "Not modified
" + }, + { + "httpStatusCode": "403", + "description": "Forbidden
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + } + ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}", + "title": "Get a code security configuration", + "category": "code-security", + "subcategory": "configurations", + "parameters": [ + { + "name": "org", + "description": "The organization name. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "configuration_id", + "description": "The unique identifier of the code security configuration.
", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "bodyParameters": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Administration\" organization permissions": "write" + } + ] + }, + "codeExamples": [ + { + "key": "default", + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "org": "ORG", + "configuration_id": "CONFIGURATION_ID" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Response
", + "example": { + "id": 1325, + "target_type": "organization", + "name": "octo-org recommended settings", + "description": "This is a code security configuration for octo-org", + "advanced_security": "enabled", + "dependency_graph": "enabled", + "dependabot_alerts": "enabled", + "dependabot_security_updates": "not_set", + "code_scanning_default_setup": "disabled", + "secret_scanning": "enabled", + "secret_scanning_push_protection": "disabled", + "private_vulnerability_reporting": "disabled", + "url": "https://api.github.com/orgs/octo-org/code-security/configurations/1325", + "html_url": "https://github.com/organizations/octo-org/settings/security_products/configurations/edit/1325", + "created_at": "2024-05-01T00:00:00Z", + "updated_at": "2024-05-01T00:00:00Z" + }, + "schema": { + "type": "object", + "description": "A code security configuration", + "properties": { + "id": { + "type": "integer", + "description": "The ID of the code security configuration" + }, + "name": { + "type": "string", + "description": "The name of the code security configuration. Must be unique within the organization." + }, + "target_type": { + "type": "string", + "description": "The type of the code security configuration.", + "enum": [ + "global", + "organization" + ] + }, + "description": { + "type": "string", + "description": "A description of the code security configuration" + }, + "advanced_security": { + "type": "string", + "description": "The enablement status of GitHub Advanced Security", + "enum": [ + "enabled", + "disabled" + ] + }, + "dependency_graph": { + "type": "string", + "description": "The enablement status of Dependency Graph", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "dependabot_alerts": { + "type": "string", + "description": "The enablement status of Dependabot alerts", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "dependabot_security_updates": { + "type": "string", + "description": "The enablement status of Dependabot security updates", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "code_scanning_default_setup": { + "type": "string", + "description": "The enablement status of code scanning default setup", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "secret_scanning": { + "type": "string", + "description": "The enablement status of secret scanning", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "secret_scanning_push_protection": { + "type": "string", + "description": "The enablement status of secret scanning push protection", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "private_vulnerability_reporting": { + "type": "string", + "description": "The enablement status of private vulnerability reporting", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "url": { + "type": "string", + "format": "uri", + "description": "The URL of the configuration" + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The URL of the configuration" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + } + } + ], + "previews": [], + "descriptionHTML": "Gets a code security configuration available in an organization.
\nThe authenticated user must be an administrator or security manager for the organization to use this endpoint.
\nOAuth app tokens and personal access tokens (classic) need the write:org scope to use this endpoint.
OK
" + }, + { + "httpStatusCode": "304", + "description": "Not modified
" + }, + { + "httpStatusCode": "403", + "description": "Forbidden
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + } + ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "patch", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}", + "title": "Update a code security configuration", + "category": "code-security", + "subcategory": "configurations", + "parameters": [ + { + "name": "org", + "description": "The organization name. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "configuration_id", + "description": "The unique identifier of the code security configuration.
", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "bodyParameters": [ + { + "type": "string", + "name": "name", + "in": "body", + "description": "The name of the code security configuration. Must be unique within the organization.
" + }, + { + "type": "string", + "name": "description", + "in": "body", + "description": "A description of the code security configuration
" + }, + { + "type": "string", + "name": "advanced_security", + "in": "body", + "description": "The enablement status of GitHub Advanced Security
", + "enum": [ + "enabled", + "disabled" + ] + }, + { + "type": "string", + "name": "dependency_graph", + "in": "body", + "description": "The enablement status of Dependency Graph
", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + { + "type": "string", + "name": "dependabot_alerts", + "in": "body", + "description": "The enablement status of Dependabot alerts
", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + { + "type": "string", + "name": "dependabot_security_updates", + "in": "body", + "description": "The enablement status of Dependabot security updates
", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + { + "type": "string", + "name": "code_scanning_default_setup", + "in": "body", + "description": "The enablement status of code scanning default setup
", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + { + "type": "string", + "name": "secret_scanning", + "in": "body", + "description": "The enablement status of secret scanning
", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + { + "type": "string", + "name": "secret_scanning_push_protection", + "in": "body", + "description": "The enablement status of secret scanning push protection
", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + { + "type": "string", + "name": "private_vulnerability_reporting", + "in": "body", + "description": "The enablement status of private vulnerability reporting
", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + } + ], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Administration\" organization permissions": "write" + } + ] + }, + "codeExamples": [ + { + "key": "default", + "request": { + "contentType": "application/json", + "description": "Example for updating a code security configuration", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "name": "octo-org recommended settings v2", + "secret_scanning": "disabled", + "code_scanning_default_setup": "enabled" + }, + "parameters": { + "org": "ORG", + "configuration_id": "CONFIGURATION_ID" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Response when a configuration is updated
", + "example": { + "id": 1325, + "target_type": "organization", + "name": "octo-org recommended settings v2", + "description": "This is a code security configuration for octo-org", + "advanced_security": "enabled", + "dependency_graph": "enabled", + "dependabot_alerts": "enabled", + "dependabot_security_updates": "not_set", + "code_scanning_default_setup": "enabled", + "secret_scanning": "disabled", + "secret_scanning_push_protection": "disabled", + "private_vulnerability_reporting": "disabled", + "url": "https://api.github.com/orgs/octo-org/code-security/configurations/1325", + "html_url": "https://github.com/organizations/octo-org/settings/security_products/configurations/edit/1325", + "created_at": "2024-05-01T00:00:00Z", + "updated_at": "2024-05-01T00:00:00Z" + }, + "schema": { + "type": "object", + "description": "A code security configuration", + "properties": { + "id": { + "type": "integer", + "description": "The ID of the code security configuration" + }, + "name": { + "type": "string", + "description": "The name of the code security configuration. Must be unique within the organization." + }, + "target_type": { + "type": "string", + "description": "The type of the code security configuration.", + "enum": [ + "global", + "organization" + ] + }, + "description": { + "type": "string", + "description": "A description of the code security configuration" + }, + "advanced_security": { + "type": "string", + "description": "The enablement status of GitHub Advanced Security", + "enum": [ + "enabled", + "disabled" + ] + }, + "dependency_graph": { + "type": "string", + "description": "The enablement status of Dependency Graph", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "dependabot_alerts": { + "type": "string", + "description": "The enablement status of Dependabot alerts", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "dependabot_security_updates": { + "type": "string", + "description": "The enablement status of Dependabot security updates", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "code_scanning_default_setup": { + "type": "string", + "description": "The enablement status of code scanning default setup", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "secret_scanning": { + "type": "string", + "description": "The enablement status of secret scanning", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "secret_scanning_push_protection": { + "type": "string", + "description": "The enablement status of secret scanning push protection", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "private_vulnerability_reporting": { + "type": "string", + "description": "The enablement status of private vulnerability reporting", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "url": { + "type": "string", + "format": "uri", + "description": "The URL of the configuration" + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The URL of the configuration" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + } + } + ], + "previews": [], + "descriptionHTML": "Updates a code security configuration in an organization.
\nThe authenticated user must be an administrator or security manager for the organization to use this endpoint.
\nOAuth app tokens and personal access tokens (classic) need the write:org scope to use this endpoint.
Response when a configuration is updated
" + }, + { + "httpStatusCode": "204", + "description": "Response when no new updates are made
" + } + ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "delete", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}", + "title": "Delete a code security configuration", + "category": "code-security", + "subcategory": "configurations", + "parameters": [ + { + "name": "org", + "description": "The organization name. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "configuration_id", + "description": "The unique identifier of the code security configuration.
", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "bodyParameters": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Administration\" organization permissions": "write" + } + ] + }, + "codeExamples": [ + { + "key": "default", + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "org": "ORG", + "configuration_id": "CONFIGURATION_ID" + } + }, + "response": { + "statusCode": "204", + "description": "A header with no content is returned.
" + } + } + ], + "previews": [], + "descriptionHTML": "Deletes the desired code security configuration from an organization.\nRepositories attached to the configuration will retain their settings but will no longer be associated with\nthe configuration.
\nThe authenticated user must be an administrator or security manager for the organization to use this endpoint.
\nOAuth app tokens and personal access tokens (classic) need the write:org scope to use this endpoint.
A header with no content is returned.
" + }, + { + "httpStatusCode": "400", + "description": "Bad Request
" + }, + { + "httpStatusCode": "403", + "description": "Forbidden
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + }, + { + "httpStatusCode": "409", + "description": "Conflict
" + } + ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "post", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}/attach", + "title": "Attach a configuration to repositories", + "category": "code-security", + "subcategory": "configurations", + "parameters": [ + { + "name": "org", + "description": "The organization name. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "configuration_id", + "description": "The unique identifier of the code security configuration.
", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "bodyParameters": [ + { + "type": "string", + "name": "scope", + "in": "body", + "description": "The type of repositories to attach the configuration to. selected means the configuration will be attached to only the repositories specified by selected_repository_ids
An array of repository IDs to attach the configuration to. You can only provide a list of repository ids when the scope is set to selected.
Accepted
", + "example": null, + "schema": { + "type": "object" + } + } + } + ], + "previews": [], + "descriptionHTML": "Attach a code security configuration to a set of repositories. If the repositories specified are already attached to a configuration, they will be re-attached to the provided configuration.
\nIf insufficient GHAS licenses are available to attach the configuration to a repository, only free features will be enabled.
\nThe authenticated user must be an administrator or security manager for the organization to use this endpoint.
\nOAuth app tokens and personal access tokens (classic) need the write:org scope to use this endpoint.
Accepted
" + } + ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "put", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}/defaults", + "title": "Set a code security configuration as a default for an organization", + "category": "code-security", + "subcategory": "configurations", + "parameters": [ + { + "name": "org", + "description": "The organization name. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "configuration_id", + "description": "The unique identifier of the code security configuration.
", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "bodyParameters": [ + { + "type": "string", + "name": "default_for_new_repos", + "in": "body", + "description": "Specify which types of repository this security configuration should be applied to by default.
", + "enum": [ + "all", + "none", + "private_and_internal", + "public" + ] + } + ], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Administration\" organization permissions": "write" + } + ] + }, + "codeExamples": [ + { + "key": "default", + "request": { + "contentType": "application/json", + "description": "Set this configuration to be enabled by default on all new repositories.", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "default_for_new_repos": "all" + }, + "parameters": { + "org": "ORG", + "configuration_id": "CONFIGURATION_ID" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Default successfully changed.
", + "example": { + "default_for_new_repos": "all", + "configuration": { + "value": { + "id": 1325, + "target_type": "organization", + "name": "octo-org recommended settings", + "description": "This is a code security configuration for octo-org", + "advanced_security": "enabled", + "dependency_graph": "enabled", + "dependabot_alerts": "enabled", + "dependabot_security_updates": "not_set", + "code_scanning_default_setup": "disabled", + "secret_scanning": "enabled", + "secret_scanning_push_protection": "disabled", + "private_vulnerability_reporting": "disabled", + "url": "https://api.github.com/orgs/octo-org/code-security/configurations/1325", + "html_url": "https://github.com/organizations/octo-org/settings/security_products/configurations/edit/1325", + "created_at": "2024-05-01T00:00:00Z", + "updated_at": "2024-05-01T00:00:00Z" + } + } + }, + "schema": { + "type": "object", + "properties": { + "default_for_new_repos": { + "type": "string", + "description": "Specifies which types of repository this security configuration is applied to by default.", + "enum": [ + "all", + "none", + "private_and_internal", + "public" + ] + }, + "configuration": { + "type": "object", + "description": "A code security configuration", + "properties": { + "id": { + "type": "integer", + "description": "The ID of the code security configuration" + }, + "name": { + "type": "string", + "description": "The name of the code security configuration. Must be unique within the organization." + }, + "target_type": { + "type": "string", + "description": "The type of the code security configuration.", + "enum": [ + "global", + "organization" + ] + }, + "description": { + "type": "string", + "description": "A description of the code security configuration" + }, + "advanced_security": { + "type": "string", + "description": "The enablement status of GitHub Advanced Security", + "enum": [ + "enabled", + "disabled" + ] + }, + "dependency_graph": { + "type": "string", + "description": "The enablement status of Dependency Graph", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "dependabot_alerts": { + "type": "string", + "description": "The enablement status of Dependabot alerts", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "dependabot_security_updates": { + "type": "string", + "description": "The enablement status of Dependabot security updates", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "code_scanning_default_setup": { + "type": "string", + "description": "The enablement status of code scanning default setup", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "secret_scanning": { + "type": "string", + "description": "The enablement status of secret scanning", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "secret_scanning_push_protection": { + "type": "string", + "description": "The enablement status of secret scanning push protection", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "private_vulnerability_reporting": { + "type": "string", + "description": "The enablement status of private vulnerability reporting", + "enum": [ + "enabled", + "disabled", + "not_set" + ] + }, + "url": { + "type": "string", + "format": "uri", + "description": "The URL of the configuration" + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The URL of the configuration" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + ], + "previews": [], + "descriptionHTML": "Sets a code security configuration as a default to be applied to new repositories in your organization.
\nThis configuration will be applied to the matching repository type (all, none, public, private and internal) by default when they are created.
\nThe authenticated user must be an administrator or security manager for the organization to use this endpoint.
\nOAuth app tokens and personal access tokens (classic) need the write:org scope to use this endpoint.
Default successfully changed.
" + }, + { + "httpStatusCode": "403", + "description": "Forbidden
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + } + ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/orgs/{org}/code-security/configurations/{configuration_id}/repositories", + "title": "Get repositories associated with a code security configuration", + "category": "code-security", + "subcategory": "configurations", + "parameters": [ + { + "name": "org", + "description": "The organization name. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "configuration_id", + "description": "The unique identifier of the code security configuration.
", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "per_page", + "description": "The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"
", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 30 + } + }, + { + "name": "before", + "description": "A cursor, as given in the Link header. If specified, the query only searches for results before this cursor. For more information, see \"Using pagination in the REST API.\"
", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "after", + "description": "A cursor, as given in the Link header. If specified, the query only searches for results after this cursor. For more information, see \"Using pagination in the REST API.\"
", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "status", + "description": "A comma-separated list of statuses. If specified, only repositories with these attachment statuses will be returned.
\nCan be: all, attached, attaching, detached, enforced, failed, updating
Example of code security configuration repositories
", + "example": [ + { + "status": "attached", + "repository": { + "value": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "https://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "https://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "https://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "https://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "https://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "https://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "https://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "https://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "https://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "https://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "https://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "https://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "https://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "https://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "https://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "https://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "https://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "https://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "https://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "https://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "https://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "https://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "https://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "https://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "https://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks" + } + } + } + ], + "schema": { + "type": "array", + "items": { + "type": "object", + "description": "Repositories associated with a code security configuration and attachment status", + "properties": { + "status": { + "type": "string", + "description": "The attachment status of the code security configuration on the repository.", + "enum": [ + "attached", + "attaching", + "detached", + "enforced", + "failed", + "updating" + ] + }, + "repository": { + "title": "Simple Repository", + "description": "A GitHub repository.", + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "A unique identifier of the repository.", + "examples": [ + 1296269 + ] + }, + "node_id": { + "type": "string", + "description": "The GraphQL identifier of the repository.", + "examples": [ + "MDEwOlJlcG9zaXRvcnkxMjk2MjY5" + ] + }, + "name": { + "type": "string", + "description": "The name of the repository.", + "examples": [ + "Hello-World" + ] + }, + "full_name": { + "type": "string", + "description": "The full, globally unique, name of the repository.", + "examples": [ + "octocat/Hello-World" + ] + }, + "owner": { + "title": "Simple User", + "description": "A GitHub user.", + "type": "object", + "properties": { + "name": { + "type": [ + "string", + "null" + ] + }, + "email": { + "type": [ + "string", + "null" + ] + }, + "login": { + "type": "string", + "examples": [ + "octocat" + ] + }, + "id": { + "type": "integer", + "examples": [ + 1 + ] + }, + "node_id": { + "type": "string", + "examples": [ + "MDQ6VXNlcjE=" + ] + }, + "avatar_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/images/error/octocat_happy.gif" + ] + }, + "gravatar_id": { + "type": [ + "string", + "null" + ], + "examples": [ + "41d064eb2195891e12d0413f63227ea7" + ] + }, + "url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat" + ] + }, + "html_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/octocat" + ] + }, + "followers_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/followers" + ] + }, + "following_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/following{/other_user}" + ] + }, + "gists_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/gists{/gist_id}" + ] + }, + "starred_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/starred{/owner}{/repo}" + ] + }, + "subscriptions_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/subscriptions" + ] + }, + "organizations_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/orgs" + ] + }, + "repos_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/repos" + ] + }, + "events_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/events{/privacy}" + ] + }, + "received_events_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/received_events" + ] + }, + "type": { + "type": "string", + "examples": [ + "User" + ] + }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { + "type": "string", + "examples": [ + "\"2020-07-09T00:17:55Z\"" + ] + } + }, + "required": [ + "avatar_url", + "events_url", + "followers_url", + "following_url", + "gists_url", + "gravatar_id", + "html_url", + "id", + "node_id", + "login", + "organizations_url", + "received_events_url", + "repos_url", + "site_admin", + "starred_url", + "subscriptions_url", + "type", + "url" + ] + }, + "private": { + "type": "boolean", + "description": "Whether the repository is private." + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The URL to view the repository on GitHub.com.", + "examples": [ + "https://github.com/octocat/Hello-World" + ] + }, + "description": { + "type": [ + "string", + "null" + ], + "description": "The repository description.", + "examples": [ + "This your first repo!" + ] + }, + "fork": { + "type": "boolean", + "description": "Whether the repository is a fork." + }, + "url": { + "type": "string", + "format": "uri", + "description": "The URL to get more information about the repository from the GitHub API.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World" + ] + }, + "archive_url": { + "type": "string", + "description": "A template for the API URL to download the repository as an archive.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}" + ] + }, + "assignees_url": { + "type": "string", + "description": "A template for the API URL to list the available assignees for issues in the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/assignees{/user}" + ] + }, + "blobs_url": { + "type": "string", + "description": "A template for the API URL to create or retrieve a raw Git blob in the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}" + ] + }, + "branches_url": { + "type": "string", + "description": "A template for the API URL to get information about branches in the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/branches{/branch}" + ] + }, + "collaborators_url": { + "type": "string", + "description": "A template for the API URL to get information about collaborators of the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}" + ] + }, + "comments_url": { + "type": "string", + "description": "A template for the API URL to get information about comments on the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/comments{/number}" + ] + }, + "commits_url": { + "type": "string", + "description": "A template for the API URL to get information about commits on the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/commits{/sha}" + ] + }, + "compare_url": { + "type": "string", + "description": "A template for the API URL to compare two commits or refs.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}" + ] + }, + "contents_url": { + "type": "string", + "description": "A template for the API URL to get the contents of the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/contents/{+path}" + ] + }, + "contributors_url": { + "type": "string", + "format": "uri", + "description": "A template for the API URL to list the contributors to the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/contributors" + ] + }, + "deployments_url": { + "type": "string", + "format": "uri", + "description": "The API URL to list the deployments of the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/deployments" + ] + }, + "downloads_url": { + "type": "string", + "format": "uri", + "description": "The API URL to list the downloads on the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/downloads" + ] + }, + "events_url": { + "type": "string", + "format": "uri", + "description": "The API URL to list the events of the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/events" + ] + }, + "forks_url": { + "type": "string", + "format": "uri", + "description": "The API URL to list the forks of the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/forks" + ] + }, + "git_commits_url": { + "type": "string", + "description": "A template for the API URL to get information about Git commits of the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}" + ] + }, + "git_refs_url": { + "type": "string", + "description": "A template for the API URL to get information about Git refs of the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}" + ] + }, + "git_tags_url": { + "type": "string", + "description": "A template for the API URL to get information about Git tags of the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}" + ] + }, + "issue_comment_url": { + "type": "string", + "description": "A template for the API URL to get information about issue comments on the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}" + ] + }, + "issue_events_url": { + "type": "string", + "description": "A template for the API URL to get information about issue events on the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/issues/events{/number}" + ] + }, + "issues_url": { + "type": "string", + "description": "A template for the API URL to get information about issues on the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/issues{/number}" + ] + }, + "keys_url": { + "type": "string", + "description": "A template for the API URL to get information about deploy keys on the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/keys{/key_id}" + ] + }, + "labels_url": { + "type": "string", + "description": "A template for the API URL to get information about labels of the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/labels{/name}" + ] + }, + "languages_url": { + "type": "string", + "format": "uri", + "description": "The API URL to get information about the languages of the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/languages" + ] + }, + "merges_url": { + "type": "string", + "format": "uri", + "description": "The API URL to merge branches in the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/merges" + ] + }, + "milestones_url": { + "type": "string", + "description": "A template for the API URL to get information about milestones of the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/milestones{/number}" + ] + }, + "notifications_url": { + "type": "string", + "description": "A template for the API URL to get information about notifications on the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}" + ] + }, + "pulls_url": { + "type": "string", + "description": "A template for the API URL to get information about pull requests on the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/pulls{/number}" + ] + }, + "releases_url": { + "type": "string", + "description": "A template for the API URL to get information about releases on the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/releases{/id}" + ] + }, + "stargazers_url": { + "type": "string", + "format": "uri", + "description": "The API URL to list the stargazers on the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/stargazers" + ] + }, + "statuses_url": { + "type": "string", + "description": "A template for the API URL to get information about statuses of a commit.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/statuses/{sha}" + ] + }, + "subscribers_url": { + "type": "string", + "format": "uri", + "description": "The API URL to list the subscribers on the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/subscribers" + ] + }, + "subscription_url": { + "type": "string", + "format": "uri", + "description": "The API URL to subscribe to notifications for this repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/subscription" + ] + }, + "tags_url": { + "type": "string", + "format": "uri", + "description": "The API URL to get information about tags on the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/tags" + ] + }, + "teams_url": { + "type": "string", + "format": "uri", + "description": "The API URL to list the teams on the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/teams" + ] + }, + "trees_url": { + "type": "string", + "description": "A template for the API URL to create or retrieve a raw Git tree of the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}" + ] + }, + "hooks_url": { + "type": "string", + "format": "uri", + "description": "The API URL to list the hooks on the repository.", + "examples": [ + "https://api.github.com/repos/octocat/Hello-World/hooks" + ] + } + }, + "required": [ + "archive_url", + "assignees_url", + "blobs_url", + "branches_url", + "collaborators_url", + "comments_url", + "commits_url", + "compare_url", + "contents_url", + "contributors_url", + "deployments_url", + "description", + "downloads_url", + "events_url", + "fork", + "forks_url", + "full_name", + "git_commits_url", + "git_refs_url", + "git_tags_url", + "hooks_url", + "html_url", + "id", + "node_id", + "issue_comment_url", + "issue_events_url", + "issues_url", + "keys_url", + "labels_url", + "languages_url", + "merges_url", + "milestones_url", + "name", + "notifications_url", + "owner", + "private", + "pulls_url", + "releases_url", + "stargazers_url", + "statuses_url", + "subscribers_url", + "subscription_url", + "tags_url", + "teams_url", + "trees_url", + "url" + ] + } + } + } + } + } + } + ], + "previews": [], + "descriptionHTML": "Lists the repositories associated with a code security configuration in an organization.
\nThe authenticated user must be an administrator or security manager for the organization to use this endpoint.
\nOAuth app tokens and personal access tokens (classic) need the write:org scope to use this endpoint.
OK
" + }, + { + "httpStatusCode": "403", + "description": "Forbidden
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + } + ] + } + ] + }, "codes-of-conduct": { "codes-of-conduct": [ { diff --git a/src/rest/lib/config.json b/src/rest/lib/config.json index 7a1ad1dc25..335e8ea538 100644 --- a/src/rest/lib/config.json +++ b/src/rest/lib/config.json @@ -47,5 +47,5 @@ ] } }, - "sha": "2dc8532a8ee49bb46d623aeeb8e533f7120e16f8" + "sha": "5343bf7e3ea2d5fe927db9f1c508f5b23461d4fa" } \ No newline at end of file diff --git a/src/webhooks/lib/config.json b/src/webhooks/lib/config.json index 831af1d489..2b6e7e5942 100644 --- a/src/webhooks/lib/config.json +++ b/src/webhooks/lib/config.json @@ -1,3 +1,3 @@ { - "sha": "2dc8532a8ee49bb46d623aeeb8e533f7120e16f8" + "sha": "5343bf7e3ea2d5fe927db9f1c508f5b23461d4fa" } \ No newline at end of file