{ "name": "UploadSarifCodeScanningResults", "fully_qualified_name": "GithubApi.UploadSarifCodeScanningResults@0.1.0", "description": "Upload SARIF data to GitHub for code scanning results.\n\nThis tool uploads SARIF data from a code scanning analysis to a GitHub repository. Use appropriate access tokens for private or public repositories. Uploaded results appear in pull requests or the repository's security tab, depending on the reference used. SARIF data must be compressed and encoded before uploading.", "toolkit": { "name": "ArcadeGithubApi", "description": null, "version": "0.1.0" }, "input": { "parameters": [ { "name": "repository_owner", "required": true, "description": "The account owner of the repository on GitHub, not case sensitive.", "value_schema": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The account owner of the repository. The name is not case sensitive." }, "inferrable": true, "http_endpoint_parameter_name": "owner" }, { "name": "repository_name", "required": true, "description": "The name of the repository. It is not case sensitive and identifies where the SARIF data will be uploaded.", "value_schema": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The name of the repository. The name is not case sensitive." }, "inferrable": true, "http_endpoint_parameter_name": "repo" }, { "name": "commit_sha", "required": true, "description": "The SHA of the commit associated with the uploaded analysis. This links the SARIF data to a specific point in the repository's history.", "value_schema": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The SHA of the commit to which the analysis you are uploading relates." }, "inferrable": true, "http_endpoint_parameter_name": "commit_sha" }, { "name": "git_reference", "required": true, "description": "The full Git reference. Format: `refs/heads/`, `refs/pull//merge`, or `refs/pull//head`.", "value_schema": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The full Git reference, formatted as `refs/heads/`,\n`refs/pull//merge`, or `refs/pull//head`." }, "inferrable": true, "http_endpoint_parameter_name": "ref" }, { "name": "base64_compressed_sarif_data", "required": true, "description": "A Base64-encoded string of the SARIF file compressed using gzip. Ensure proper encoding before upload.", "value_schema": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "A Base64 string representing the SARIF file to upload. You must first compress your SARIF file using [`gzip`](http://www.gnu.org/software/gzip/manual/gzip.html) and then translate the contents of the file into a Base64 encoding string. For more information, see \"[SARIF support for code scanning](https://docs.github.com/enterprise-server@3.8/code-security/secure-coding/sarif-support-for-code-scanning).\"" }, "inferrable": true, "http_endpoint_parameter_name": "sarif" }, { "name": "base_directory_for_analysis", "required": false, "description": "The base directory used in the analysis as it appears in the SARIF file to map file paths correctly.", "value_schema": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The base directory used in the analysis, as it appears in the SARIF file.\nThis property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository." }, "inferrable": true, "http_endpoint_parameter_name": "checkout_uri" }, { "name": "analysis_start_time", "required": false, "description": "The timestamp when the analysis run began, in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.", "value_schema": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The time that the analysis run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`." }, "inferrable": true, "http_endpoint_parameter_name": "started_at" }, { "name": "tool_name", "required": false, "description": "Specifies the tool name used for generating the code scanning analysis. Defaults to 'API' if not provided. Supports filtering by tool GUID in alerts operations.", "value_schema": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The name of the tool used to generate the code scanning analysis. If this parameter is not used, the tool name defaults to \"API\". If the uploaded SARIF contains a tool GUID, this will be available for filtering using the `tool_guid` parameter of operations such as `GET /repos/{owner}/{repo}/code-scanning/alerts`." }, "inferrable": true, "http_endpoint_parameter_name": "tool_name" } ] }, "output": { "description": "Response from the API endpoint 'code-scanning/upload-sarif'.", "available_modes": [ "value", "error", "null" ], "value_schema": { "val_type": "json", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": null } }, "requirements": { "authorization": { "provider_id": "arcade-github", "provider_type": "oauth2", "id": null, "oauth2": null }, "secrets": [ { "key": "GIT_SERVER_URL" } ], "metadata": null }, "deprecation_message": null, "metadata": { "object_type": "api_wrapper_tool", "version": "1.1.0", "description": "Tools that enable LLMs to interact directly with the GitHub API." }, "http_endpoint": { "metadata": { "object_type": "http_endpoint", "version": "1.2.0", "description": "" }, "url": "{git_server_url}/api/v3/repos/{owner}/{repo}/code-scanning/sarifs", "http_method": "POST", "headers": {}, "parameters": [ { "name": "owner", "tool_parameter_name": "repository_owner", "description": "The account owner of the repository. The name is not case sensitive.", "value_schema": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The account owner of the repository. The name is not case sensitive." }, "accepted_as": "path", "required": true, "deprecated": false, "default": null, "documentation_urls": [] }, { "name": "repo", "tool_parameter_name": "repository_name", "description": "The name of the repository. The name is not case sensitive.", "value_schema": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The name of the repository. The name is not case sensitive." }, "accepted_as": "path", "required": true, "deprecated": false, "default": null, "documentation_urls": [] }, { "name": "checkout_uri", "tool_parameter_name": "base_directory_for_analysis", "description": "The base directory used in the analysis, as it appears in the SARIF file.\nThis property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository.", "value_schema": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The base directory used in the analysis, as it appears in the SARIF file.\nThis property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository." }, "accepted_as": "body", "required": false, "deprecated": false, "default": null, "documentation_urls": [] }, { "name": "commit_sha", "tool_parameter_name": "commit_sha", "description": "The SHA of the commit to which the analysis you are uploading relates.", "value_schema": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The SHA of the commit to which the analysis you are uploading relates." }, "accepted_as": "body", "required": true, "deprecated": false, "default": null, "documentation_urls": [] }, { "name": "ref", "tool_parameter_name": "git_reference", "description": "The full Git reference, formatted as `refs/heads/`,\n`refs/pull//merge`, or `refs/pull//head`.", "value_schema": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The full Git reference, formatted as `refs/heads/`,\n`refs/pull//merge`, or `refs/pull//head`." }, "accepted_as": "body", "required": true, "deprecated": false, "default": null, "documentation_urls": [] }, { "name": "sarif", "tool_parameter_name": "base64_compressed_sarif_data", "description": "A Base64 string representing the SARIF file to upload. You must first compress your SARIF file using [`gzip`](http://www.gnu.org/software/gzip/manual/gzip.html) and then translate the contents of the file into a Base64 encoding string. For more information, see \"[SARIF support for code scanning](https://docs.github.com/enterprise-server@3.8/code-security/secure-coding/sarif-support-for-code-scanning).\"", "value_schema": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "A Base64 string representing the SARIF file to upload. You must first compress your SARIF file using [`gzip`](http://www.gnu.org/software/gzip/manual/gzip.html) and then translate the contents of the file into a Base64 encoding string. For more information, see \"[SARIF support for code scanning](https://docs.github.com/enterprise-server@3.8/code-security/secure-coding/sarif-support-for-code-scanning).\"" }, "accepted_as": "body", "required": true, "deprecated": false, "default": null, "documentation_urls": [] }, { "name": "started_at", "tool_parameter_name": "analysis_start_time", "description": "The time that the analysis run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.", "value_schema": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The time that the analysis run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`." }, "accepted_as": "body", "required": false, "deprecated": false, "default": null, "documentation_urls": [] }, { "name": "tool_name", "tool_parameter_name": "tool_name", "description": "The name of the tool used to generate the code scanning analysis. If this parameter is not used, the tool name defaults to \"API\". If the uploaded SARIF contains a tool GUID, this will be available for filtering using the `tool_guid` parameter of operations such as `GET /repos/{owner}/{repo}/code-scanning/alerts`.", "value_schema": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The name of the tool used to generate the code scanning analysis. If this parameter is not used, the tool name defaults to \"API\". If the uploaded SARIF contains a tool GUID, this will be available for filtering using the `tool_guid` parameter of operations such as `GET /repos/{owner}/{repo}/code-scanning/alerts`." }, "accepted_as": "body", "required": false, "deprecated": false, "default": null, "documentation_urls": [] } ], "documentation_urls": [], "secrets": [ { "arcade_key": "GIT_SERVER_URL", "parameter_name": "git_server_url", "accepted_as": "path", "formatted_value": null, "description": "", "is_auth_token": false }, { "arcade_key": "auth_token", "parameter_name": "Authorization", "accepted_as": "header", "formatted_value": "Bearer {authorization}", "description": "The OAuth token to use for authentication.", "is_auth_token": true } ], "request_body_spec": "{\n \"content\": {\n \"application/json\": {\n \"examples\": {\n \"default\": {\n \"value\": {\n \"commit_sha\": \"4b6472266afd7b471e86085a6659e8c7f2b119da\",\n \"ref\": \"refs/heads/master\",\n \"sarif\": \"H4sICMLGdF4AA2V4YW1wbGUuc2FyaWYAvVjdbts2FL7PUxDCijaA/CM7iRNfLkPXYgHSNstumlzQ0pHFVCI1korjFgH2ONtr7Ul2KFmy/mOn6QIkjsjDw0/nfN85NL8dEGL9pNwAImqRObECrWM1H40kXQ2XTAfJIlEgXcE1cD10RTQSVDE10K4aKSqZP1AxuKOIKg1ydJU60jSfSh8Hk6EzHA/vlOCWbfa7B6kYPpj90rlsWCZcmbHP5Bs+4oAWIjQD2SMOeJLh2vIQDnIaQerqXHjw8YIgxohybxAyDsS4cAPKsp03K4RcUs6+Up2D+JXpd8mibKIQN9fM/aMCdbyBujGSSQgVxJtx5qX2d2qUcIweQhEuDQf3GBO6CKHkogx/N3MVCKl/AeVKFuf4y5ubsMGDTj1ep+5I7sgmLIpxtU38hLtmMRGSuCFVyip5eKzs5ydh+LztVL6f2m6oih1BkYiuyQIIJWodxVpERPj4sEiWBNNH8EWT0DMG8EAjzKVHXCrB4FkPu/F64NMk1OeC+2yZSNoBOoR7CC0EzYWGbm+xFDFIzbI011+cLjfZtyJkmMZfumAh02uL3NpV2y+MZ6RA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ZN/KGWzZ+pn///evv7OOf4iIBv3oY9L/l1wiJ9p0Tc+F1zZnOE9NxXWEus6IQhr5pMfoqxi8WPsuu0azsns4UC6WzNzHIzbeEx4P/AJ3SefgcFAAA\"\n }\n }\n },\n \"schema\": {\n \"properties\": {\n \"checkout_uri\": {\n \"description\": \"The base directory used in the analysis, as it appears in the SARIF file.\\nThis property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository.\",\n \"example\": \"file:///github/workspace/\",\n \"format\": \"uri\",\n \"type\": \"string\"\n },\n \"commit_sha\": {\n \"description\": \"The SHA of the commit to which the analysis you are uploading relates.\",\n \"maxLength\": 40,\n \"minLength\": 40,\n \"pattern\": \"^[0-9a-fA-F]+$\",\n \"type\": \"string\"\n },\n \"ref\": {\n \"description\": \"The full Git reference, formatted as `refs/heads/`,\\n`refs/pull//merge`, or `refs/pull//head`.\",\n \"type\": \"string\"\n },\n \"sarif\": {\n \"description\": \"A Base64 string representing the SARIF file to upload. You must first compress your SARIF file using [`gzip`](http://www.gnu.org/software/gzip/manual/gzip.html) and then translate the contents of the file into a Base64 encoding string. For more information, see \\\"[SARIF support for code scanning](https://docs.github.com/enterprise-server@3.8/code-security/secure-coding/sarif-support-for-code-scanning).\\\"\",\n \"type\": \"string\"\n },\n \"started_at\": {\n \"description\": \"The time that the analysis run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.\",\n \"format\": \"date-time\",\n \"type\": \"string\"\n },\n \"tool_name\": {\n \"description\": \"The name of the tool used to generate the code scanning analysis. If this parameter is not used, the tool name defaults to \\\"API\\\". If the uploaded SARIF contains a tool GUID, this will be available for filtering using the `tool_guid` parameter of operations such as `GET /repos/{owner}/{repo}/code-scanning/alerts`.\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"commit_sha\",\n \"ref\",\n \"sarif\"\n ],\n \"type\": \"object\"\n }\n }\n },\n \"required\": true\n}", "use_request_body_schema_mode": false, "validate_request_body_schema": false } }