{"command":{"effect":"read","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Lists code scanning alerts for the default branch for all eligible repositories in an organization. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see \"[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization).\"\n\nThe authenticated user must be an owner or security manager for the organization to use this endpoint.\n\nOAuth app tokens and personal access tokens (classic) need the `security_events` or `repo`s cope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.","properties":{"path":{"type":"object","properties":{"org":{"type":"string","description":"The organization name. The name is not case sensitive."}},"required":["org"],"additionalProperties":false},"query":{"type":"object","properties":{"tool_name":{"$ref":"#/definitions/code-scanning-analysis-tool-name","description":"The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both."},"tool_guid":{"$ref":"#/definitions/code-scanning-analysis-tool-guid","description":"The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both."},"before":{"type":"string","description":"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":{"type":"string","description":"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).\""},"page":{"type":"integer","default":1,"description":"The page number of the results to fetch. 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).\""},"per_page":{"type":"integer","default":30,"description":"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).\""},"direction":{"type":"string","enum":["asc","desc"],"default":"desc","description":"The direction to sort the results by."},"state":{"$ref":"#/definitions/code-scanning-alert-state-query","description":"If specified, only code scanning alerts with this state will be returned."},"sort":{"type":"string","enum":["created","updated"],"default":"created","description":"The property by which to sort the results."},"severity":{"$ref":"#/definitions/code-scanning-alert-severity","description":"If specified, only code scanning alerts with this severity will be returned."},"assignees":{"type":"string","description":"Filter alerts by assignees. Provide a comma-separated list of user handles (e.g., `octocat` or `octocat,hubot`).\nUse `*` to list alerts with at least one assignee or `none` to list alerts with no assignees.\n"}},"required":[],"additionalProperties":false}},"required":["path"],"additionalProperties":false,"definitions":{"code-scanning-analysis-tool-name":{"type":"string","description":"The name of the tool used to generate the code scanning analysis."},"code-scanning-analysis-tool-guid":{"type":["string","null"],"description":"The GUID of the tool used to generate the code scanning analysis, if provided in the uploaded SARIF data."},"code-scanning-alert-state-query":{"type":"string","description":"State of a code scanning alert.","enum":["open","closed","dismissed","fixed"]},"code-scanning-alert-severity":{"type":"string","description":"Severity of a code scanning alert.","enum":["critical","high","medium","low","warning","note","error"]}}},"name":"List code scanning alerts for an organization","id":"github.code-scanning.list-alerts-for-org","example":{"path":{"org":"example"}},"maxRequests":1,"summary":false}}