Analysis run

A `Run` is an analysis done against your codebase.

Use this to check the results of a specific analysis run — whether triggered by a push, PR, or manual run. You can look up a run by its UID or the commit SHA.

run

Query: run fetch the details of a single run using either the runUid identifier or commitOid.

Arguments

FieldTypeDescription
runUidUUIDUID of the Analysis Run you want to get.
commitOidStringCommit OID of the Analysis Run you want to get.

Sample Request

query {
  run(runUid:"0613332b-436a-429b-95e3-6e01d72208b3") {
    id
    createdAt
    branchName
    baseOid
    finishedAt
  }
}

or,

query {
  run(commitOid:"6df7f08b029abbf25905abf1bc79fde72934045b") {
    id
    createdAt
    branchName
    baseOid
    finishedAt
  }
}

Sample Response

{
  "data": {
    "run": {
      "id": "QW5hbHlzaXNadW46eHpkZ3Zi",
      "createdAt": "2019-01-07T20:52:19.491314+00:00",
      "branchName": "foobar",
      "finishedAt": "2019-01-07T20:52:34.677357+00:00"
    }
  }
}

Objects

AnalysisRun

FieldTypeDescription
createdAtDateTime!The time at which the Run was created.
branchNameStringThe branch name against which the analysis was run.
baseOidStringThe commit ID which acts as the root for the Analysis. All issues introduced in the code before this commit are ignored by DeepSource.
commitOidStringThe commit ID on which the Analysis is run.
finishedAtDateTimeThe time at which the Run completed.
repositoryRepository!The repository on which the Analysis has run.
idID!The ID of the object.
runUidUUID!UID of this AnalysisRun.
statusAnalysisRunStatus!The current status of the run.
summaryAnalysisRunSummary!Summary of the analysis run.
changesetStatsChangesetStatsStatistics pertaining to the changeset (of a commit or PR) in the analysis run.
updatedAtDateTime!Time when the analysis run was last modified.
reportCardRunReportThe report card for this analysis run.
scaChecksSCACheckConnectionSCA checks in the analysis run.
offsetIntNumber of items to skip from the beginning of the result set.
beforeStringReturns items before this cursor.
afterStringReturns items after this cursor.
firstIntReturns the first N items.
lastIntReturns the last N items.
checksCheckConnection!Analyzer checks in the analysis run.
offsetIntNumber of items to skip from the beginning of the result set.
beforeStringReturns items before this cursor.
afterStringReturns items after this cursor.
firstIntReturns the first N items.
lastIntReturns the last N items.

AnalysisRunConnection

FieldTypeDescription
pageInfoPageInfo!Pagination data for this connection.
edges[AnalysisRunEdge]!Contains the nodes in this connection.
totalCountIntThe total number of analysis runs in the connection.

AnalysisRunEdge

A Relay edge containing a AnalysisRun and its cursor.

FieldTypeDescription
nodeAnalysisRunThe item at the end of the edge.
cursorString!A cursor for use in pagination.

AnalysisRunSummary

FieldTypeDescription
occurrencesIntroducedIntNumber of issues introduced during this analysis run, between the `baseOid` and the `commitOid`
occurrencesResolvedIntNumber of issues marked as resolved in this analysis run
occurrencesSuppressedIntNumber of issues marked as suppressed in this analysis run.
occurrenceDistributionByAnalyzerOccurrenceDistributionByAnalyzerNumber of issues raised per analyzer.
occurrenceDistributionByCategory[OccurrenceDistributionByCategory]Number of issues raised per issue category.
vulnerabilitiesIntroducedIntNumber of vulnerabilities introduced in this analysis run.

OccurrenceDistributionByAnalyzer

FieldTypeDescription
analyzerShortcodeString!Shortcode of the analyzer.
introducedInt!Number of issues detected by the analyzer.

OccurrenceDistributionByCategory

FieldTypeDescription
categoryIssueCategory!Category of the issue.
introducedInt!Number of issues detected that belong to this category.

ChangesetStats

Statistics pertaining to the changeset (of a commit or PR), as analyzed by an AnalysisRun.

FieldTypeDescription
linesChangesetStatsCounts!Stats for number of lines in the changeset.
branchesChangesetStatsCounts!Stats for number of branches in the changeset.
conditionsChangesetStatsCounts!Stats for number of conditions in the changeset.

ChangesetStatsCounts

Overall and newly added number of lines (or branches or conditions) in a changeset. Note: 0 depicts no lines (or branches or conditions) were found whereas None depicts the information is not available.

FieldTypeDescription
overallIntOverall number of lines (or branches or conditions) across the repository.
overallCoveredIntOverall number of lines (or branches or conditions) that are covered across the repository.
newIntNewly added number of lines (or branches or conditions) in the changeset.
newCoveredIntNewly added number of lines (or branches or conditions) that are covered in the changeset.

RunReport

Report card generated for an analysis run.

FieldTypeDescription
idID!The ID of the object.
createdAtDateTime!Time when the report was created.
modifiedAtDateTime!Time when the report was last modified.
statusRunReportStatus!Current status of the report.
securityRunReportDimensionSecurity dimension score.
reliabilityRunReportDimensionReliability dimension score.
complexityRunReportDimensionComplexity dimension score.
hygieneRunReportDimensionCode hygiene dimension score.
coverageRunReportCoverageTest coverage metrics.
aggregateRunReportAggregateAggregate score across all dimensions.
metaRunReportMetadataAnalysis run metadata.
focusAreaRunReportFocusAreaSuggested focus area for improvement.

RunReportDimension

A dimension evaluated in a run report card.

FieldTypeDescription
gradeRunReportGrade!Letter grade (A, B, C, or D).
scoreInt!Numeric score (0-100).
issuesCountInt!Number of issues in this dimension.
summaryStringHuman-readable summary of the dimension.

RunReportCoverage

Code coverage metrics for an analysis run.

FieldTypeDescription
gradeRunReportGradeLetter grade (A, B, C, or D).
scoreIntNumeric coverage score (0-100).
lineCoverageFloatPercentage of lines covered by tests.
branchCoverageFloatPercentage of branches covered by tests.

RunReportAggregate

Aggregate code quality score across all dimensions.

FieldTypeDescription
gradeRunReportGrade!Overall letter grade (A, B, C, or D).
scoreInt!Overall numeric score (0-100).

RunReportMetadata

Metadata for a run report.

FieldTypeDescription
linesChangedInt!Number of lines analyzed.
filesChangedInt!Number of files analyzed.
cappedBoolean!Whether the aggregate grade was capped due to critical or security issues.
capReasonStringReason for grade capping.

RunReportFocusArea

Suggested area to focus on for code quality improvement.

FieldTypeDescription
dimensionStringThe dimension to focus on improving.
actionStringRecommended action to take.

SCACheck

A single SCA (Software Composition Analysis) check as part of an analysis run.

FieldTypeDescription
idID!The ID of the object.
sequenceInt!Sequence number of the SCA check in the analysis run.
statusSCACheckStatus!The current status of the SCA check.
targetRepositoryTargetThe repository target for which this SCA check was performed.
createdAtDateTime!Time when the SCA check was created.
updatedAtDateTime!Time when the SCA check was last modified.
finishedAtDateTimeTime when the SCA check finished.
summarySCACheckSummary!Summary of the SCA check.
vulnerabilityOccurrencesVulnerabilityOccurrenceConnectionVulnerability occurrences found in the SCA check.

SCACheckSummary

Summary of an SCA check.

FieldTypeDescription
vulnerabilitiesIntroducedIntNumber of vulnerabilities introduced in the SCA check.

SCACheckConnection

FieldTypeDescription
pageInfoPageInfo!Pagination data for this connection.
edges[SCACheckEdge]!Contains the nodes in this connection.
totalCountIntTotal number of items in the connection.

SCACheckEdge

A Relay edge containing a SCACheck and its cursor.

FieldTypeDescription
nodeSCACheckThe item at the end of the edge.
cursorString!A cursor for use in pagination.

On this page