{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Attach a code security configuration to a set of repositories. If the repositories specified are already attached to a configuration, they will be re-attached to the provided configuration.\n\nIf insufficient GHAS licenses are available to attach the configuration to a repository, only free features will be enabled.\n\nThe authenticated user must be an administrator or security manager for the organization to use this endpoint.\n\nDirectly applying an enterprise-enforced configuration also requires permission to manage the enterprise's code security settings. Without it, the request returns `403` and no repositories change.\n\nWhen applying a different configuration, repositories with active enterprise-enforced attachments are skipped unless the authenticated user can manage the enterprise's code security settings; the remaining repositories are updated. The request still returns `202` if every repository is skipped.\n\nOAuth app tokens and classic PATs require the `write:org` scope. Directly applying an enterprise-enforced configuration also requires `admin:enterprise` and is not supported by fine-grained PATs or GitHub App access tokens.","properties":{"path":{"type":"object","properties":{"org":{"type":"string","description":"The organization name. The name is not case sensitive."},"configuration_id":{"type":"integer","description":"The unique identifier of the code security configuration."}},"required":["org","configuration_id"],"additionalProperties":false},"body":{"type":"object","additionalProperties":false,"properties":{"scope":{"type":"string","description":"The type of repositories to attach the configuration to. `selected` means the configuration will be attached to only the repositories specified by `selected_repository_ids`","enum":["all","all_without_configurations","public","private_or_internal","selected"]},"selected_repository_ids":{"type":"array","description":"An array of repository IDs to attach the configuration to. You can only provide a list of repository ids when the `scope` is set to `selected`.","items":{"type":"integer","description":"Unique identifier of the repository."}}},"required":["scope"],"examples":[{"scope":"selected","selected_repository_ids":[32,91]}]}},"required":["path","body"],"additionalProperties":false},"name":"Attach a configuration to repositories","id":"github.code-security.attach-configuration","example":{"path":{"org":"example","configuration_id":1},"body":{"scope":"selected","selected_repository_ids":[32,91]}},"maxRequests":1,"summary":false}}