{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/github/main/json-schema/github-code-scanning-organization-alert-items-schema.json", "title": "code-scanning-organization-alert-items", "x-generated": "2026-10-03", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/github-code-scanning-api-openapi.yml#/components/schemas/code-scanning-organization-alert-items", "type": "object", "properties": { "number": { "$ref": "#/$defs/alert-number" }, "created_at": { "$ref": "#/$defs/alert-created-at" }, "updated_at": { "$ref": "#/$defs/alert-updated-at" }, "url": { "$ref": "#/$defs/alert-url" }, "html_url": { "$ref": "#/$defs/alert-html-url" }, "instances_url": { "$ref": "#/$defs/alert-instances-url" }, "state": { "$ref": "#/$defs/code-scanning-alert-state" }, "fixed_at": { "$ref": "#/$defs/alert-fixed-at" }, "dismissed_by": { "$ref": "#/$defs/nullable-simple-user" }, "dismissed_at": { "$ref": "#/$defs/alert-dismissed-at" }, "dismissed_reason": { "$ref": "#/$defs/code-scanning-alert-dismissed-reason" }, "dismissed_comment": { "$ref": "#/$defs/code-scanning-alert-dismissed-comment" }, "rule": { "$ref": "#/$defs/code-scanning-alert-rule-summary" }, "tool": { "$ref": "#/$defs/code-scanning-analysis-tool" }, "most_recent_instance": { "$ref": "#/$defs/code-scanning-alert-instance" }, "repository": { "$ref": "#/$defs/simple-repository" } }, "required": [ "number", "created_at", "url", "html_url", "instances_url", "state", "dismissed_by", "dismissed_at", "dismissed_reason", "rule", "tool", "most_recent_instance", "repository" ], "$defs": { "alert-created-at": { "type": "string", "description": "The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.", "format": "date-time", "readOnly": true }, "alert-dismissed-at": { "type": [ "string", "null" ], "description": "The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.", "format": "date-time", "readOnly": true }, "alert-fixed-at": { "type": [ "string", "null" ], "description": "The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.", "format": "date-time", "readOnly": true }, "alert-html-url": { "type": "string", "description": "The GitHub URL of the alert resource.", "format": "uri", "readOnly": true }, "alert-instances-url": { "type": "string", "description": "The REST API URL for fetching the list of instances for an alert.", "format": "uri", "readOnly": true }, "alert-number": { "type": "integer", "description": "The security alert number.", "readOnly": true }, "alert-updated-at": { "type": "string", "description": "The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.", "format": "date-time", "readOnly": true }, "alert-url": { "type": "string", "description": "The REST API URL of the alert resource.", "format": "uri", "readOnly": true }, "code-scanning-alert-classification": { "type": [ "string", "null" ], "description": "A classification of the file. For example to identify it as generated.", "enum": [ "source", "generated", "test", "library" ] }, "code-scanning-alert-dismissed-comment": { "type": [ "string", "null" ], "description": "The dismissal comment associated with the dismissal of the alert.", "maxLength": 280 }, "code-scanning-alert-dismissed-reason": { "type": [ "string", "null" ], "description": "**Required when the state is dismissed.** The reason for dismissing or closing the alert.", "enum": [ null, "false positive", "won't fix", "used in tests" ] }, "code-scanning-alert-environment": { "type": "string", "description": "Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed." }, "code-scanning-alert-instance": { "type": "object", "properties": { "ref": { "$ref": "#/$defs/code-scanning-ref" }, "analysis_key": { "$ref": "#/$defs/code-scanning-analysis-analysis-key" }, "environment": { "$ref": "#/$defs/code-scanning-alert-environment" }, "category": { "$ref": "#/$defs/code-scanning-analysis-category" }, "state": { "$ref": "#/$defs/code-scanning-alert-state" }, "commit_sha": { "type": "string" }, "message": { "type": "object", "properties": { "text": { "type": "string" } } }, "location": { "$ref": "#/$defs/code-scanning-alert-location" }, "html_url": { "type": "string" }, "classifications": { "type": "array", "description": "Classifications that have been applied to the file that triggered the alert.\nFor example identifying it as documentation, or a generated file.", "items": { "$ref": "#/$defs/code-scanning-alert-classification" } } } }, "code-scanning-alert-location": { "type": "object", "description": "Describe a region within a file for the alert.", "properties": { "path": { "type": "string" }, "start_line": { "type": "integer" }, "end_line": { "type": "integer" }, "start_column": { "type": "integer" }, "end_column": { "type": "integer" } } }, "code-scanning-alert-rule-summary": { "type": "object", "properties": { "id": { "type": [ "string", "null" ], "description": "A unique identifier for the rule used to detect the alert." }, "name": { "type": "string", "description": "The name of the rule used to detect the alert." }, "tags": { "type": [ "array", "null" ], "description": "A set of tags applicable for the rule.", "items": { "type": "string" } }, "severity": { "type": [ "string", "null" ], "description": "The severity of the alert.", "enum": [ "none", "note", "warning", "error" ] }, "security_severity_level": { "type": [ "string", "null" ], "description": "The security severity of the alert.", "enum": [ "low", "medium", "high", "critical" ] }, "description": { "type": "string", "description": "A short description of the rule used to detect the alert." } } }, "code-scanning-alert-state": { "type": "string", "description": "State of a code scanning alert.", "enum": [ "open", "dismissed", "fixed" ] }, "code-scanning-analysis-analysis-key": { "type": "string", "description": "Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name." }, "code-scanning-analysis-category": { "type": "string", "description": "Identifies the configuration under which the analysis was executed. Used to distinguish between multiple analyses for the same tool and commit, but performed on different languages or different parts of the code." }, "code-scanning-analysis-tool": { "type": "object", "properties": { "name": { "$ref": "#/$defs/code-scanning-analysis-tool-name" }, "version": { "$ref": "#/$defs/code-scanning-analysis-tool-version" }, "guid": { "$ref": "#/$defs/code-scanning-analysis-tool-guid" } } }, "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-analysis-tool-name": { "type": "string", "description": "The name of the tool used to generate the code scanning analysis." }, "code-scanning-analysis-tool-version": { "type": [ "string", "null" ], "description": "The version of the tool used to generate the code scanning analysis." }, "code-scanning-ref": { "type": "string", "description": "The Git reference, formatted as `refs/pull//merge`, `refs/pull//head`,\n`refs/heads/` or simply ``." }, "nullable-simple-user": { "title": "Simple User", "description": "A GitHub user.", "type": [ "object", "null" ], "properties": { "name": { "type": [ "string", "null" ] }, "email": { "type": [ "string", "null" ] }, "login": { "type": "string" }, "id": { "type": "integer" }, "node_id": { "type": "string" }, "avatar_url": { "type": "string", "format": "uri" }, "gravatar_id": { "type": [ "string", "null" ] }, "url": { "type": "string", "format": "uri" }, "html_url": { "type": "string", "format": "uri" }, "followers_url": { "type": "string", "format": "uri" }, "following_url": { "type": "string" }, "gists_url": { "type": "string" }, "starred_url": { "type": "string" }, "subscriptions_url": { "type": "string", "format": "uri" }, "organizations_url": { "type": "string", "format": "uri" }, "repos_url": { "type": "string", "format": "uri" }, "events_url": { "type": "string" }, "received_events_url": { "type": "string", "format": "uri" }, "type": { "type": "string" }, "site_admin": { "type": "boolean" }, "starred_at": { "type": "string" } }, "required": [ "avatar_url", "events_url", "followers_url", "following_url", "gists_url", "gravatar_id", "html_url", "id", "node_id", "login", "organizations_url", "received_events_url", "repos_url", "site_admin", "starred_url", "subscriptions_url", "type", "url" ] }, "simple-repository": { "title": "Simple Repository", "description": "A GitHub repository.", "type": "object", "properties": { "id": { "type": "integer", "description": "A unique identifier of the repository." }, "node_id": { "type": "string", "description": "The GraphQL identifier of the repository." }, "name": { "type": "string", "description": "The name of the repository." }, "full_name": { "type": "string", "description": "The full, globally unique, name of the repository." }, "owner": { "$ref": "#/$defs/simple-user" }, "private": { "type": "boolean", "description": "Whether the repository is private." }, "html_url": { "type": "string", "format": "uri", "description": "The URL to view the repository on GitHub.com." }, "description": { "type": [ "string", "null" ], "description": "The repository description." }, "fork": { "type": "boolean", "description": "Whether the repository is a fork." }, "url": { "type": "string", "format": "uri", "description": "The URL to get more information about the repository from the GitHub API." }, "archive_url": { "type": "string", "description": "A template for the API URL to download the repository as an archive." }, "assignees_url": { "type": "string", "description": "A template for the API URL to list the available assignees for issues in the repository." }, "blobs_url": { "type": "string", "description": "A template for the API URL to create or retrieve a raw Git blob in the repository." }, "branches_url": { "type": "string", "description": "A template for the API URL to get information about branches in the repository." }, "collaborators_url": { "type": "string", "description": "A template for the API URL to get information about collaborators of the repository." }, "comments_url": { "type": "string", "description": "A template for the API URL to get information about comments on the repository." }, "commits_url": { "type": "string", "description": "A template for the API URL to get information about commits on the repository." }, "compare_url": { "type": "string", "description": "A template for the API URL to compare two commits or refs." }, "contents_url": { "type": "string", "description": "A template for the API URL to get the contents of the repository." }, "contributors_url": { "type": "string", "format": "uri", "description": "A template for the API URL to list the contributors to the repository." }, "deployments_url": { "type": "string", "format": "uri", "description": "The API URL to list the deployments of the repository." }, "downloads_url": { "type": "string", "format": "uri", "description": "The API URL to list the downloads on the repository." }, "events_url": { "type": "string", "format": "uri", "description": "The API URL to list the events of the repository." }, "forks_url": { "type": "string", "format": "uri", "description": "The API URL to list the forks of the repository." }, "git_commits_url": { "type": "string", "description": "A template for the API URL to get information about Git commits of the repository." }, "git_refs_url": { "type": "string", "description": "A template for the API URL to get information about Git refs of the repository." }, "git_tags_url": { "type": "string", "description": "A template for the API URL to get information about Git tags of the repository." }, "issue_comment_url": { "type": "string", "description": "A template for the API URL to get information about issue comments on the repository." }, "issue_events_url": { "type": "string", "description": "A template for the API URL to get information about issue events on the repository." }, "issues_url": { "type": "string", "description": "A template for the API URL to get information about issues on the repository." }, "keys_url": { "type": "string", "description": "A template for the API URL to get information about deploy keys on the repository." }, "labels_url": { "type": "string", "description": "A template for the API URL to get information about labels of the repository." }, "languages_url": { "type": "string", "format": "uri", "description": "The API URL to get information about the languages of the repository." }, "merges_url": { "type": "string", "format": "uri", "description": "The API URL to merge branches in the repository." }, "milestones_url": { "type": "string", "description": "A template for the API URL to get information about milestones of the repository." }, "notifications_url": { "type": "string", "description": "A template for the API URL to get information about notifications on the repository." }, "pulls_url": { "type": "string", "description": "A template for the API URL to get information about pull requests on the repository." }, "releases_url": { "type": "string", "description": "A template for the API URL to get information about releases on the repository." }, "stargazers_url": { "type": "string", "format": "uri", "description": "The API URL to list the stargazers on the repository." }, "statuses_url": { "type": "string", "description": "A template for the API URL to get information about statuses of a commit." }, "subscribers_url": { "type": "string", "format": "uri", "description": "The API URL to list the subscribers on the repository." }, "subscription_url": { "type": "string", "format": "uri", "description": "The API URL to subscribe to notifications for this repository." }, "tags_url": { "type": "string", "format": "uri", "description": "The API URL to get information about tags on the repository." }, "teams_url": { "type": "string", "format": "uri", "description": "The API URL to list the teams on the repository." }, "trees_url": { "type": "string", "description": "A template for the API URL to create or retrieve a raw Git tree of the repository." }, "hooks_url": { "type": "string", "format": "uri", "description": "The API URL to list the hooks on the repository." } }, "required": [ "archive_url", "assignees_url", "blobs_url", "branches_url", "collaborators_url", "comments_url", "commits_url", "compare_url", "contents_url", "contributors_url", "deployments_url", "description", "downloads_url", "events_url", "fork", "forks_url", "full_name", "git_commits_url", "git_refs_url", "git_tags_url", "hooks_url", "html_url", "id", "node_id", "issue_comment_url", "issue_events_url", "issues_url", "keys_url", "labels_url", "languages_url", "merges_url", "milestones_url", "name", "notifications_url", "owner", "private", "pulls_url", "releases_url", "stargazers_url", "statuses_url", "subscribers_url", "subscription_url", "tags_url", "teams_url", "trees_url", "url" ] }, "simple-user": { "title": "Simple User", "description": "A GitHub user.", "type": "object", "properties": { "name": { "type": [ "string", "null" ] }, "email": { "type": [ "string", "null" ] }, "login": { "type": "string" }, "id": { "type": "integer" }, "node_id": { "type": "string" }, "avatar_url": { "type": "string", "format": "uri" }, "gravatar_id": { "type": [ "string", "null" ] }, "url": { "type": "string", "format": "uri" }, "html_url": { "type": "string", "format": "uri" }, "followers_url": { "type": "string", "format": "uri" }, "following_url": { "type": "string" }, "gists_url": { "type": "string" }, "starred_url": { "type": "string" }, "subscriptions_url": { "type": "string", "format": "uri" }, "organizations_url": { "type": "string", "format": "uri" }, "repos_url": { "type": "string", "format": "uri" }, "events_url": { "type": "string" }, "received_events_url": { "type": "string", "format": "uri" }, "type": { "type": "string" }, "site_admin": { "type": "boolean" }, "starred_at": { "type": "string" } }, "required": [ "avatar_url", "events_url", "followers_url", "following_url", "gists_url", "gravatar_id", "html_url", "id", "node_id", "login", "organizations_url", "received_events_url", "repos_url", "site_admin", "starred_url", "subscriptions_url", "type", "url" ] } } }