{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Creates a code security configuration in an organization.\n\nThe authenticated user must be an administrator or security manager for the organization to use this endpoint.\n\nOAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint.","properties":{"path":{"type":"object","properties":{"org":{"type":"string","description":"The organization name. The name is not case sensitive."}},"required":["org"],"additionalProperties":false},"body":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the code security configuration. Must be unique within the organization."},"description":{"type":"string","description":"A description of the code security configuration","maxLength":255},"advanced_security":{"type":"string","description":"The enablement status of GitHub Advanced Security features. `enabled` will enable both Code Security and Secret Protection features.\n\n> [!WARNING]\n> `code_security` and `secret_protection` are deprecated values for this field. Prefer the individual `code_security` and `secret_protection` fields to set the status of these features.\n","enum":["enabled","disabled","code_security","secret_protection"],"default":"disabled"},"code_security":{"type":"string","description":"The enablement status of GitHub Code Security features.","enum":["enabled","disabled","not_set"]},"dependency_graph":{"type":"string","description":"The enablement status of Dependency Graph","enum":["enabled","disabled","not_set"],"default":"enabled"},"dependency_graph_autosubmit_action":{"type":"string","description":"The enablement status of Automatic dependency submission","enum":["enabled","disabled","not_set"],"default":"disabled"},"dependency_graph_autosubmit_action_options":{"type":"object","description":"Feature options for Automatic dependency submission","properties":{"labeled_runners":{"type":"boolean","description":"Whether to use runners labeled with 'dependency-submission' or standard GitHub runners.","default":false}}},"dependabot_alerts":{"type":"string","description":"The enablement status of Dependabot alerts","enum":["enabled","disabled","not_set"],"default":"disabled"},"dependabot_reachability":{"type":"string","description":"The enablement status of reachability analysis for Dependabot. Only available for organizations with access to reachability analysis.\nRequires Dependabot alerts to be enabled when set to `enabled`. Must be `disabled` when Dependabot alerts is `disabled`.\n`not_set` leaves existing repository settings unchanged.","enum":["enabled","disabled","not_set"],"default":"disabled"},"dependabot_security_updates":{"type":"string","description":"The enablement status of Dependabot security updates","enum":["enabled","disabled","not_set"],"default":"disabled"},"dependabot_delegated_alert_dismissal":{"type":"string","description":"The enablement status of Dependabot delegated alert dismissal. Requires Dependabot alerts to be enabled.","enum":["enabled","disabled","not_set"],"default":"disabled"},"code_scanning_options":{"$ref":"#/definitions/code-scanning-options"},"code_scanning_default_setup":{"type":"string","description":"The enablement status of code scanning default setup","enum":["enabled","disabled","not_set"],"default":"disabled"},"code_scanning_default_setup_options":{"$ref":"#/definitions/code-scanning-default-setup-options"},"code_scanning_delegated_alert_dismissal":{"type":"string","description":"The enablement status of code scanning delegated alert dismissal","enum":["enabled","disabled","not_set"],"default":"not_set"},"secret_protection":{"type":"string","description":"The enablement status of GitHub Secret Protection features.","enum":["enabled","disabled","not_set"]},"secret_scanning":{"type":"string","description":"The enablement status of secret scanning","enum":["enabled","disabled","not_set"],"default":"disabled"},"secret_scanning_push_protection":{"type":"string","description":"The enablement status of secret scanning push protection","enum":["enabled","disabled","not_set"],"default":"disabled"},"secret_scanning_delegated_bypass":{"type":"string","description":"The enablement status of secret scanning delegated bypass","enum":["enabled","disabled","not_set"],"default":"disabled"},"secret_scanning_delegated_bypass_options":{"type":"object","description":"Feature options for secret scanning delegated bypass","properties":{"reviewers":{"type":"array","description":"The bypass reviewers for secret scanning delegated bypass","items":{"type":"object","required":["reviewer_id","reviewer_type"],"properties":{"reviewer_id":{"type":"integer","description":"The ID of the team or role selected as a bypass reviewer"},"reviewer_type":{"type":"string","description":"The type of the bypass reviewer","enum":["TEAM","ROLE"]},"mode":{"type":"string","description":"The bypass mode for the reviewer","enum":["ALWAYS","EXEMPT"],"default":"ALWAYS"}}}}}},"secret_scanning_validity_checks":{"type":"string","description":"The enablement status of secret scanning validity checks","enum":["enabled","disabled","not_set"],"default":"disabled"},"secret_scanning_non_provider_patterns":{"type":"string","description":"The enablement status of secret scanning non provider patterns","enum":["enabled","disabled","not_set"],"default":"disabled"},"secret_scanning_generic_secrets":{"type":"string","description":"The enablement status of Copilot secret scanning","enum":["enabled","disabled","not_set"],"default":"disabled"},"secret_scanning_generic_secrets_push_protection":{"type":"string","description":"The enablement status of generic secrets push protection","enum":["enabled","disabled","not_set"],"default":"disabled"},"secret_scanning_delegated_alert_dismissal":{"type":"string","description":"The enablement status of secret scanning delegated alert dismissal","enum":["enabled","disabled","not_set"]},"secret_scanning_extended_metadata":{"type":"string","description":"The enablement status of secret scanning extended metadata","enum":["enabled","disabled","not_set"]},"private_vulnerability_reporting":{"type":"string","description":"The enablement status of private vulnerability reporting","enum":["enabled","disabled","not_set"],"default":"disabled"},"enforcement":{"type":"string","description":"The enforcement status for a security configuration","enum":["enforced","unenforced"],"default":"enforced"}},"required":["name"],"examples":[{"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"}]}},"required":["path","body"],"additionalProperties":false,"definitions":{"code-scanning-options":{"type":["object","null"],"description":"Security Configuration feature options for code scanning","properties":{"allow_advanced":{"type":["boolean","null"],"description":"Whether to allow repos which use advanced setup"}}},"code-scanning-default-setup-options":{"type":["object","null"],"description":"Feature options for code scanning default setup","properties":{"runner_type":{"type":"string","enum":["standard","labeled","not_set"],"description":"Whether to use labeled runners or standard GitHub runners."},"runner_label":{"type":["string","null"],"description":"The label of the runner to use for code scanning default setup when runner_type is 'labeled'."}}}}},"name":"Create a code security configuration","id":"github.code-security.create-configuration","example":{"path":{"org":"example"},"body":{"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"}},"maxRequests":1,"summary":false}}