apicheats.dev github/llms.txt Raw .md
PATCH

PATCH /orgs/{org}/code-security/configurations/{configuration_id} — GitHub API

GitHub token (required); https://api.github.com

GitHub API

Update a code security configuration

Base URL
https://api.github.com
Auth
Authorization: Bearer <GITHUB_API_KEY>
Last verified
2026-10-20 · upstream hash matched
Actions Try in browser→
Agents: curl -H "Accept: text/markdown" this URL
→ 375 tokens · Vary: Accept

Critical gotchas

GitHub recommends an Accept: application/vnd.github+json header and an explicit X-GitHub-Api-Version header.

Fine-grained tokens only authorize repositories and permissions selected when the token is created.

cURL

curl -X PATCH 'https://api.github.com/orgs/example-org/code-security/configurations/10' \  -H "Authorization: Bearer $GITHUB_TOKEN" \  -H 'Accept: application/vnd.github+json' \  -H 'X-GitHub-Api-Version: 2026-03-10' \  -H 'Content-Type: application/json' \  -d '{}'

Parameters

Name In Type Required Description
org path string Yes The organization name. The name is not case sensitive.
configuration_id path integer Yes The unique identifier of the code security configuration.
name body string No The name of the code security configuration. Must be unique within the organization.
description body string No A description of the code security configuration
advanced_security body string No 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.
code_security body string No The enablement status of GitHub Code Security features.
dependency_graph body string No The enablement status of Dependency Graph
dependency_graph_autosubmit_action body string No The enablement status of Automatic dependency submission
dependency_graph_autosubmit_action_options body object No Feature options for Automatic dependency submission
dependabot_alerts body string No The enablement status of Dependabot alerts
dependabot_security_updates body string No The enablement status of Dependabot security updates
dependabot_delegated_alert_dismissal body string No The enablement status of Dependabot delegated alert dismissal. Requires Dependabot alerts to be enabled.
code_scanning_default_setup body string No The enablement status of code scanning default setup
code_scanning_default_setup_options body object No Feature options for code scanning default setup
code_scanning_options body object No Security Configuration feature options for code scanning
code_scanning_delegated_alert_dismissal body string No The enablement status of code scanning delegated alert dismissal
secret_protection body string No The enablement status of GitHub Secret Protection features.
secret_scanning body string No The enablement status of secret scanning
secret_scanning_push_protection body string No The enablement status of secret scanning push protection
secret_scanning_delegated_bypass body string No The enablement status of secret scanning delegated bypass
secret_scanning_delegated_bypass_options body object No Feature options for secret scanning delegated bypass
secret_scanning_validity_checks body string No The enablement status of secret scanning validity checks
secret_scanning_non_provider_patterns body string No The enablement status of secret scanning non-provider patterns
secret_scanning_generic_secrets body string No The enablement status of Copilot secret scanning
secret_scanning_delegated_alert_dismissal body string No The enablement status of secret scanning delegated alert dismissal
secret_scanning_extended_metadata body string No The enablement status of secret scanning extended metadata
private_vulnerability_reporting body string No The enablement status of private vulnerability reporting
enforcement body string No The enforcement status for a security configuration

Response 200 OK

{
  "id": 0,
  "name": "string",
  "target_type": "global",
  "description": "string",
  "advanced_security": "enabled",
  "dependency_graph": "enabled",
  "dependency_graph_autosubmit_action": "enabled",
  "dependency_graph_autosubmit_action_options": {
    "labeled_runners": true
  },
  "dependabot_alerts": "enabled",
  "dependabot_security_updates": "enabled",
  "dependabot_delegated_alert_dismissal": "enabled",
  "code_scanning_options": {
    "allow_advanced": true
  },
  "code_scanning_default_setup": "enabled",
  "code_scanning_default_setup_options": {
    "runner_type": "standard",
    "runner_label": "string"
  },
  "code_scanning_delegated_alert_dismissal": "enabled",
  "secret_scanning": "enabled",
  "secret_scanning_push_protection": "enabled",
  "secret_scanning_delegated_bypass": "enabled",
  "secret_scanning_delegated_bypass_options": {
    "reviewers": [
      {
        "reviewer_id": 0,
        "reviewer_type": "TEAM",
        "mode": "ALWAYS",
        "security_configuration_id": 0
      }
    ]
  },
  "secret_scanning_validity_checks": "enabled",
  "secret_scanning_non_provider_patterns": "enabled",
  "secret_scanning_generic_secrets": "enabled",
  "secret_scanning_delegated_alert_dismissal": "enabled",
  "secret_scanning_extended_metadata": "enabled",
  "private_vulnerability_reporting": "enabled",
  "enforcement": "enforced",
  "url": "https://example.com",
  "html_url": "https://example.com",
  "created_at": "2026-09-03T00:00:00Z",
  "updated_at": "2026-09-03T00:00:00Z"
}
Get a free GitHub API key → sponsored

Affiliate link - we may earn a commission, at no extra cost to you.