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

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

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

GitHub API

Get 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
→ 242 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?per_page=30&before=example-before&after=example-after' \  -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.
per_page query integer No The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
before query string No A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
after query string No A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."

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.