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

GET /enterprises/{enterprise}/code-security/configurations/defaults — GitHub API

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

GitHub API

Get default code security configurations for an enterprise

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
→ 166 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 GET 'https://api.github.com/enterprises/example-enterprise/code-security/configurations/defaults' \  -H "Authorization: Bearer $GITHUB_TOKEN" \  -H 'Accept: application/vnd.github+json' \  -H 'X-GitHub-Api-Version: 2026-03-10'

Parameters

Name In Type Required Description
enterprise path string Yes The slug version of the enterprise name.

Response 200 OK

[
  {
    "default_for_new_repos": "public",
    "configuration": {
      "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": "[recursive or deeply nested schema]",
            "reviewer_type": "[recursive or deeply nested schema]",
            "mode": "[recursive or deeply nested schema]",
            "security_configuration_id": "[recursive or deeply nested schema]"
          }
        ]
      },
      "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.