provider code-security POST /orgs/{org}/code-security/configurations
@utdk/github /orgs/{org}/code-security/configurations
Create a code security configuration
Creates a code security configuration in an organization. The authenticated user must be an administrator or security manager for the organization to use this endpoint. OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint.
org path required
The organization name. The name is not case sensitive.
string

Try it

Authentication
Configure credentials for GitHub v3 REST API
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.

Saved automatically to browser storage.

codeSecurity.createConfiguration
POST/orgs/{org}/code-security/configurations
Creates a code security configuration in an organization. The authenticated user must be an administrator or security manager for the organization to use this endpoint. OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint.

Parameters

required

The organization name. The name is not case sensitive.

Input

required

The name of the code security configuration. Must be unique within the organization.

required

A description of the code security configuration

The enablement status of GitHub Advanced Security features. `enabled` will enable both Code Security and Secret Protection features. > [!WARNING] > `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.

The enablement status of GitHub Code Security features.

The enablement status of Dependency Graph

The enablement status of Automatic dependency submission

Feature options for Automatic dependency submission

The enablement status of Dependabot alerts

The enablement status of Dependabot security updates

The enablement status of Dependabot delegated alert dismissal. Requires Dependabot alerts to be enabled.

Security Configuration feature options for code scanning

The enablement status of code scanning default setup

Feature options for code scanning default setup

The enablement status of code scanning delegated alert dismissal

The enablement status of GitHub Secret Protection features.

The enablement status of secret scanning

The enablement status of secret scanning push protection

The enablement status of secret scanning delegated bypass

Feature options for secret scanning delegated bypass

The enablement status of secret scanning validity checks

The enablement status of secret scanning non provider patterns

The enablement status of Copilot secret scanning

The enablement status of secret scanning delegated alert dismissal

The enablement status of secret scanning extended metadata

The enablement status of private vulnerability reporting

The enforcement status for a security configuration

Enter a gateway URL above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import github from '@utdk/github';

await github.codeSecurity.createConfiguration({
  "advanced_security": "disabled",
  "dependency_graph": "enabled",
  "dependency_graph_autosubmit_action": "disabled",
  "dependabot_alerts": "disabled",
  "dependabot_security_updates": "disabled",
  "dependabot_delegated_alert_dismissal": "disabled",
  "code_scanning_default_setup": "disabled",
  "code_scanning_delegated_alert_dismissal": "not_set",
  "secret_scanning": "disabled",
  "secret_scanning_push_protection": "disabled",
  "secret_scanning_delegated_bypass": "disabled",
  "secret_scanning_validity_checks": "disabled",
  "secret_scanning_non_provider_patterns": "disabled",
  "secret_scanning_generic_secrets": "disabled",
  "private_vulnerability_reporting": "disabled",
  "enforcement": "enforced"
})