category: Utilities provider: GitHub commonfields: id: LGTM version: -1 configuration: - defaultvalue: https://lgtm.com/api/v1.0 display: Server URL (e.g. https://lgtm.com/api/v1.0) name: url required: true type: 0 - display: API Key name: api_key required: true type: 4 - display: Trust any certificate (not secure) name: insecure type: 8 required: false - display: Use system proxy settings name: proxy type: 8 required: false description: An Integration with LGTM API display: LGTM name: LGTM script: commands: - arguments: - description: The URL of the repository to analyze. LGTM tests this against the [repository providers](https://lgtm.com/admin/help/adding-repository-providers) defined for the system. If it doesn't match any of them, the request fails. name: repository required: true - description: Optional, a [language code](https://lgtm.com/help/lgtm/analysis-faqs#which-languages-are-supported) to specify which language to analyze. To request the analysis of more than one language, specify a query meter for each language. By default, LGTM tries to analyze all supported languages. isArray: true name: language - description: The analysis mode of the new project. When set to `full` all commits of the project are analyzed; when set to `sparse` the latest commit of the project is analyzed periodically; when set to `upload`, no automatic analysis is performed, instead externally-generated databases should be uploaded. For new projects the default value is `full`. The `mode` meter cannot be used to change the analysis mode of existing projects. Therefore, for existing projects, it should either be left blank or set to match the analysis mode of the project. name: mode - description: Required when `mode=upload`, specify the identifier of the commit used to generate the database. name: commit - description: Optional when `mode=upload`, specify the date and time of the commit used to generate the database; defaults to the current time. name: date - description: 'Optional, any [labels](https://lgtm.com/admin/help/defining-worker-labels) required by workers to analyze this project. To specify more than one label, repeat the query meter. ' isArray: true name: worker-label description: Add a project to LGTM name: lgtm-add-project - arguments: - description: The analysis identifier. name: analysis-id required: true - description: The desired version of the SARIF format. Currently supported versions are `1.0.0`, `2.0.0`, and `2.1.0`. name: sarif-version - description: Set `true` to include results in files that are excluded from the output by default. This includes results in test code and generated files. For more information, see [File classification](https://lgtm.com/help/lgtm/file-classification). name: excluded-files description: Get detailed alert information name: lgtm-get-alerts outputs: - contextPath: LGTM.alerts.runs.results.ruleId description: LGTM Alerts by Rule ID type: Unknown - contextPath: LGTM.alerts.runs.results.partialFingerprints.primaryLocationLineHash description: LGTM Alert location by line hash type: Unknown - arguments: - description: The analysis identifier. name: analysis-id required: true description: Get analysis summary name: lgtm-get-analysis outputs: - contextPath: LGTM.analysis_summary.id description: The analysis identifier. type: String - contextPath: LGTM.analysis_summary.commit-id description: The commit identifier. The commit identifier is included only if the same commit was successfully analyzed for all languages. A detailed eakdown of which commit was analyzed for each language is provided in the `languages` property. type: String - contextPath: LGTM.analysis_summary.languages.language description: The short name for the language. type: String - contextPath: LGTM.analysis_summary.languages.status description: The status of the analysis of this language. type: String - contextPath: LGTM.analysis_summary.languages.alerts description: The number of alerts for this language. type: Number - contextPath: LGTM.analysis_summary.languages.lines description: The number of lines of code for this language. type: Number - contextPath: LGTM.analysis_summary.languages.commit-id description: The latest successfully analyzed commit for the language. All statistics refer to this commit. type: String - contextPath: LGTM.analysis_summary.languages.commit-date description: The time of the commit. type: String - contextPath: LGTM.analysis_summary.languages.analysis-date description: The time the commit was analyzed. type: String - contextPath: LGTM.analysis_summary.log-url description: A page on LGTM to view the logs for this analysis. type: String - contextPath: LGTM.analysis_summary.results-url description: A page on LGTM to view the results of this analysis. type: String - arguments: - description: The numeric project identifier. name: project-id required: true - description: The identifier of a specific commit. Alternatively, use `latest` for the most recent analyzed commit. name: commit-id required: true description: Get analysis summary for a specific commit name: lgtm-get-analysis-for-commit outputs: - contextPath: LGTM.analysis_summary.id description: The analysis identifier. type: String - contextPath: LGTM.analysis_summary.commit-id description: The commit identifier. The commit identifier is included only if the same commit was successfully analyzed for all languages. A detailed eakdown of which commit was analyzed for each language is provided in the `languages` property. type: String - contextPath: LGTM.analysis_summary.languages.language description: The short name for the language. type: String - contextPath: LGTM.analysis_summary.languages.status description: The status of the analysis of this language. type: String - contextPath: LGTM.analysis_summary.languages.alerts description: The number of alerts for this language. type: Number - contextPath: LGTM.analysis_summary.languages.lines description: The number of lines of code for this language. type: Number - contextPath: LGTM.analysis_summary.languages.commit-id description: The latest successfully analyzed commit for the language. All statistics refer to this commit. type: String - contextPath: LGTM.analysis_summary.languages.commit-date description: The time of the commit. type: String - contextPath: LGTM.analysis_summary.languages.analysis-date description: The time the commit was analyzed. type: String - contextPath: LGTM.analysis_summary.log-url description: A page on LGTM to view the logs for this analysis. type: String - contextPath: LGTM.analysis_summary.results-url description: A page on LGTM to view the results of this analysis. type: String - arguments: - description: The identifier for the review (from the `task-result-url`). name: review-id required: true description: Get results of code review name: lgtm-get-code-review outputs: - contextPath: LGTM.code_review_result.id description: The identifier for the review. type: String - contextPath: LGTM.code_review_result.results-url description: A page on LGTM to view the status and results of this code review. type: String - contextPath: LGTM.code_review_result.status description: The status of the code review. type: String - contextPath: LGTM.code_review_result.status-message description: A summary of the current status of the code review. type: String - contextPath: LGTM.code_review_result.languages.language description: The language analyzed. type: String - contextPath: LGTM.code_review_result.languages.status description: The status for analysis of this language. type: String - contextPath: LGTM.code_review_result.languages.status-message description: The current state of analysis of this langauge. When available, a summary of analysis results. type: String - contextPath: LGTM.code_review_result.languages.new description: The total number of alerts introduced by the patch for this language. type: Number - contextPath: LGTM.code_review_result.languages.fixed description: The total number of alerts fixed by the patch for this language. type: Number - contextPath: LGTM.code_review_result.languages.alerts.new description: The number of alerts introduced by the patch for this query. type: Number - contextPath: LGTM.code_review_result.languages.alerts.fixed description: The number of alerts fixed by the patch for this query. type: Number - arguments: - description: The numeric project identifier name: project-id required: true description: Get project by numeric identifier name: lgtm-get-project outputs: - contextPath: LGTM.project_details.languages.grade description: The grade of the code for this language. type: String - contextPath: LGTM.project_details.id description: LGTM Project id type: Unknown - contextPath: LGTM.project_details.name description: LGTM Project name type: Unknown - arguments: - description: The first part of the URL identifier of a project, which represents the repository host. name: provider required: true - description: The second part of the URL identifier of a project, the organization. name: org required: true - description: The third part of the URL identifier of a project, the repository name. name: name required: true description: Get project by URL identifier name: lgtm-get-project-by-url-identifier outputs: - contextPath: LGTM.project_details.languages.grade description: The grade of the code for this language. type: String - contextPath: LGTM.project_details.id description: LGTM Project id type: Unknown - contextPath: LGTM.project_details.name description: LGTM Project name type: Unknown - arguments: - description: The numeric project identifier name: project-id required: true - description: 'The type of project configuration to retrieve. If this meter isn''t specified, the request retrieves the effective configuration. That is, the configuration that is actually applied to the project, which may be from: the repository the administrator-set, project configuration the global configuration. If you do specify this value, it must be one of: `repository` to retrieve the configuration specified by a YAML file in the repository. A 404 status is returned if there is no repository configuration. `administrator` to retrieve the administrator-set, project configuration. A 404 status is returned if there is no administrator configuration.' name: source description: Get configuration for a project identified by numeric identifier name: lgtm-get-project-config - arguments: - description: The maximum number of projects to return in each response (1-100). name: limit - description: An opaque identifier generated by the API. name: start description: List projects name: lgtm-get-projects outputs: - contextPath: LGTM.project-list.data.id description: The numeric identifier of the project. type: Number - contextPath: LGTM.project-list.data.url-identifier description: The URL identifier of the project. type: String - contextPath: LGTM.project-list.data.name description: The display name of the project. type: String - contextPath: LGTM.project-list.data.url description: The full URL of the project on LGTM. type: String - contextPath: LGTM.project-list.nextPageUrl description: The URL to retrieve the next page of projects. Omitted if there is no next page. type: String - description: Version information name: lgtm-get-version outputs: - contextPath: LGTM.version.apiVersion description: The version number of the API. type: String - arguments: - description: The numeric project identifier. name: project-id required: true - description: The identifier of the commit to analyze. name: commit required: true - description: The language codes of the languages to analyze. For a list of available languages, see [Supported languages](https://lgtm.com/help/lgtm/analysis-faqs#which-languages-are-supported). To specify more than one language, this meter can be repeated. If no language is specified, all the project's languages will be analyzed. isArray: true name: language description: Run analysis of a specific commit name: lgtm-request-analysis outputs: - contextPath: LGTM.analysis.id description: LGTM request id type: Unknown - contextPath: LGTM.analysis.status description: LGTM analysis status type: Unknown - contextPath: LGTM.analysis_request.task-result.id description: LGTM analysis task id type: Unknown - contextPath: LGTM.analysis_request.task-result.commit-id description: LGTM analysis commit id type: Unknown - arguments: - description: The numeric project identifier. name: project-id required: true - description: The identifier for the base commit. name: base required: true - description: Your reference number for the code review. name: external-id required: true - description: The callback URL for LGTM to post to on completion of the review. When the code review is complete, the API sends an HTTP POST request to the callback URL with the result of the code review in the request body. The code review results in the request body are identical to the results accessed through the [`/codereviews/{review-id}`](https://lgtm.com/help/lgtm/api/api-v1#opIdgetCodeReview) end-point. If you specify a `callback-secret`, the request also includes an `x-lgtm-signature` header with a digital signature of the request's contents. name: callback-url - description: The `callback-secret` is used to compute a signature which is included in the `x-lgtm-signature` header of the callback response. The receiver of the callback can check the validity of the response by computing the signature using HMAC-SHA1 and verifying that it matches the `x-lgtm-signature` header value. The HMAC algorithm requires byte sequences as inputs for both the secret and the message. The callback secret string must be converted to bytes using UTF-8 encoding. The response body should ideally be read as a plain byte sequence. Conversion to, for example a JSON object, and back to a byte sequence might change the formatting, and would invalidate the signature. name: callback-secret - description: Entry ID of the Patch File , you can use git diff --binary to generate patch file name: patch-entry-id required: true description: Run code review for a patch name: lgtm-request-review outputs: - contextPath: LGTM.code_review_request.id description: LGTM Code Review request id type: Unknown - contextPath: LGTM.code_review_request.status description: LGTM Code Review request status type: Unknown - contextPath: LGTM.code_review_request.task-result.id description: LGTM Code Review request task id type: Unknown - arguments: - description: The [language](https://lgtm.com/help/lgtm/analysis-faqs#which-languages-are-supported) you want to analyze. name: language required: true - description: The identifier of the project to analyze. Either `project-id` or `projects-list` must be specified. isArray: true name: project-id required: true - description: The CodeQL query stored in an XSOAR list name: query-list required: true description: Run a CodeQL query on one or more projects name: lgtm-create-query-job outputs: - contextPath: LGTM.Queries.task-result.id description: Query ID type: Unknown - arguments: - description: The identifier of the query job, from the `task-result` given in the response to the initial `POST /queryjobs` request. name: queryjob-id required: true description: Get the status of a query job name: lgtm-get-query-job outputs: - contextPath: LGTM.queryjob.id description: The identifier for the QueryJob. type: String - arguments: - description: The identifier of the query job, from the `task-result` given in the response to the initial `POST /queryjobs` request. name: queryjob-id required: true - description: The identifier for the project. name: project-id required: true - description: Start point for the page of results. name: start - description: The maximum number of results to display (less than 100). name: limit - description: Include results that are not part of the source tree. These results are filtered out by default. name: nofilter description: Fetch the results of a query job for a specific project name: lgtm-get-query-job-results-for-project outputs: - contextPath: LGTM.queryjob-project-results.data.line description: LGTM Query Job Project Data Line type: Number - contextPath: LGTM.queryjob-project-results.data.file description: LGTM Query Job Project Data File type: String - contextPath: LGTM.queryjob-project-results.data.value description: LGTM Query Job Project Data Value type: String - contextPath: LGTM.queryjob-project-results.data.url description: LGTM Query Job Project Data URL type: String - contextPath: LGTM.queryjob-project-results.next description: URL for retrieving the next part of the results (if applicable). type: String - contextPath: LGTM.queryjob_project_results.project.id description: Project ID type: Unknown - arguments: - description: The identifier of the query job, from the `task-result` given in the response to the initial `POST /queryjobs` request. name: queryjob-id required: true description: Provide a summary of results for the projects in the query job name: lgtm-get-query-job-results-overview outputs: - contextPath: LGTM.queryjob-results-overview.data.status description: Describes whether the query was sucessfully executed against the project. type: String - contextPath: LGTM.queryjob-results-overview.data.total description: Number of results returned by the query. This is oken down further into `internal` and `external` results. Only applies if `status` is `success`. type: Number - contextPath: LGTM.queryjob-results-overview.data.internal description: Number of results that refer to elements within the source tree. Only applies if `status` is `success`. type: Number - contextPath: LGTM.queryjob-results-overview.data.external description: Number of results that refer to elements outside the source tree (e.g., li aries). Only applies if `status` is `success`. type: Number - contextPath: LGTM.queryjob-results-overview.data.error description: Error message. Only applies if `status` is `error`. type: String - contextPath: LGTM.queryjob-results-overview.next description: LGTM Query Job Results Overview Next type: String dockerimage: demisto/python3:3.12.8.3296088 runonce: false script: '-' subtype: python3 type: python tests: - No tests (auto formatted) fromversion: 6.0.0