repository
Query:repository Fetch the details of one of your repositories.
Arguments
| Field | Type | Description |
|---|---|---|
| name | String! | The name of the repository to lookup. |
| login | String! | The login or username of the account under which the repository exists. |
| vcsProvider | VCSProvider! | VCS Provider of the account. |
Sample Request
Sample Response
SCA Queries
Fetching Repository Targets
Query to list all SCA targets configured for a repository.Fetching Dependency Vulnerabilities
Query to list all dependency vulnerability occurrences in a repository.Fetching a Specific Vulnerability Occurrence
Query to fetch details of a specific vulnerability occurrence by ID.Fetching a Specific Repository Target
Query to fetch details of a specific repository target by ID.regenerateRepositoryDSN
Mutation:regenerateRepositoryDSN Regenerate a repository’s DSN.
Arguments
| Field | Type | Description |
|---|---|---|
| input | RegenerateRepositoryDSNInput! | Input for RegenerateRepositoryDSN mutation. |
Sample Request
Sample Response
updateRepositoryDefaultBranch
Mutation:updateRepositoryDefaultBranch Update a repository’s default branch for baseline. If the repository is activated, this action will trigger a new analysis. Only available to users with WRITE permission on the repository.
Arguments
| Field | Type | Description |
|---|---|---|
| input | UpdateRepositoryDefaultBranchInput! | Input for UpdateRepositoryDefaultBranch mutation |
Sample Request
Sample Response
updateRepositoryIssueCategorySetting
Mutation:updateRepositoryIssueCategorySetting Update a repository’s issue configuration (also known as quality gates). Only users with WRITE permission on the repository can trigger this mutation.
Arguments
| Field | Type | Description |
|---|---|---|
| input | UpdateRepositoryIssueCategorySettingInput! | Input for UpdateRepositoryIssueCategorySetting mutation. |
Sample Request
Sample Response
updateRepositoryMetricSetting
Mutation:updateRepositoryMetricSetting Update a repository’s metric quality gates configuration. Only users with WRITE permission on the repository can trigger this mutation.
Arguments
| Field | Type | Description |
|---|---|---|
| input | UpdateRepositoryMetricSettingInput! | Input for updateRepositoryMetricSetting mutation. |
Sample Request
Sample Response
activateRepository
Mutation:activateRepositoryActivate analysis on a repository. Only users with WRITE permission on the repository can trigger this mutation.
Arguments
| Field | Type | Description |
|---|---|---|
| input | ActivateRepositoryInput! | Input for activateRepository mutation. |
Sample Request
Sample Response
deactivateRepository
Mutation:deactivateRepositoryDeactivate analysis on a repository. Only users with WRITE permission on the repository can trigger this mutation.
Arguments
| Field | Type | Description |
|---|---|---|
| input | DeactivateRepositoryInput! | Input for deactivateRepository mutation. |
Sample Request
Sample Response
Objects
Repository
| Field | Type | Description |
|---|---|---|
| id | ID! | The ID of the object. |
| name | String! | The name of this repository. |
| vcsProvider | VCSProvider! | VCS Provider of the repository. |
| vcsUrl | String! | URL of the repository on the VCS. |
| latestCommitOid | String | Object ID of the latest commit on the default branch. |
| isPrivate | Boolean! | Repository visibility on the VCS provider. |
| isActivated | Boolean! | Repository activation status. |
| configJson | JSON | The `.deepsource.toml` config of the repository represented as a JSON object. |
| defaultBranch | String | The default base branch of the repository on DeepSource. |
| dsn | String | The DSN value for this repository. |
| account | Account! | The account under which this repository exists. |
| analysisRuns | AnalysisRunConnection | Past analysis runs for the repository |
| offset | Int | |
| before | String | |
| after | String | |
| first | Int | |
| last | Int | |
| enabledAnalyzers | AnalyzerConnection | The analyzers enabled in this repository. |
| offset | Int | |
| before | String | |
| after | String | |
| first | Int | |
| last | Int | |
| issues | RepositoryIssueConnection | Get all issues raised in the default branch of this repository. Specifying a path would only return those issues whose occurrences are present in the file at path. |
| path | String | Show issues for this path only. |
| offset | Int | |
| before | String | |
| after | String | |
| first | Int | |
| last | Int | |
| ignoreRules | IgnoreRuleConnection | List of `IgnoreRule`s that exist for the repository. |
| issueShortcode | String | Filter by an `Issue` shortcode. |
| filePath | String | Filter by a specific file’s path. |
| offset | Int | |
| before | String | |
| after | String | |
| first | Int | |
| last | Int | |
| dependencyVulnerabilityOccurrences | VulnerabilityOccurrenceConnection | List of dependency vulnerability occurrences in the default branch. |
| offset | Int | |
| before | String | |
| after | String | |
| first | Int | |
| last | Int | |
| dependencyVulnerabilityOccurrence | VulnerabilityOccurrence! | Get a dependency vulnerability occurrence by its ID. |
| id | ID! | The ID of the vulnerability occurrence. |
| target | RepositoryTarget! | Get a specific repository target. |
| id | ID! | The ID of the repository target. |
| targets | RepositoryTargetConnection! | List of repository targets for this repository. |
| offset | Int | |
| before | String | |
| after | String | |
| first | Int | |
| last | Int | |
| report | Report! | A report associated with this repository. |
| key | ReportKey! | The key of the report to fetch. |
| metrics | [RepositoryMetric!]! | List of all DeepSource metrics. |
| shortcodeIn | [MetricShortcode] | List of metric shortcodes to filter on. |
| issueCategorySettings | [IssueCategorySetting!]! | Issue categories quality gates configuration for the repository. |
| issuePrioritySettings | [IssuePrioritySetting!]! | Issue priority quality gates configuration for the repository. |
| metricSettings | [MetricSetting!]! | Metric quality gates configuration for the repository. |
| allowAutofixAi | Boolean! | Whether the account has allowed Autofix AI to run on private repositories. |
| useLegacyAutofix | Boolean! | Whether to use the legacy autofix engine. |
RepositoryIssue
| Field | Type | Description |
|---|---|---|
| id | ID! | The ID of the object. |
| issue | Issue! | Definition of the issue that has been raised. |
| occurrences | OccurrenceConnection | All occurrences of this issue in the default branch. |
| offset | Int | |
| before | String | |
| after | String | |
| first | Int | |
| last | Int | |
| repository | Repository! | The repository for which this issue has been raised. |
RepositoryIssueConnection
| Field | Type | Description |
|---|---|---|
| pageInfo | PageInfo! | Pagination data for this connection. |
| edges | RepositoryIssueEdge! | Contains the nodes in this connection. |
| totalCount | Int |
RepositoryIssueEdge
A Relay edge containing aRepositoryIssue and its cursor.
| Field | Type | Description |
|---|---|---|
| node | RepositoryIssue | The item at the end of the edge. |
| cursor | String! | A cursor for use in pagination. |
RepositoryConnection
| Field | Type | Description |
|---|---|---|
| pageInfo | PageInfo! | Pagination data for this connection. |
| edges | [RepositoryEdge]! | Contains the nodes in this connection. |
| totalCount | Int |
RepositoryEdge
A Relay edge containing aRepository and its cursor.
| Field | Type | Description |
|---|---|---|
| node | Repository | The item at the end of the edge. |
| cursor | String! | A cursor for use in pagination. |
RegenerateRepositoryDSNInput
Input for theregenerateRepositoryDSN mutation.
| Field | Type | Description |
|---|---|---|
| repositoryId | ID! | GraphQL node ID of the repository. |
RegenerateRepositoryDSNPayload
Payload for theregenerateRepositoryDSN mutation.
| Field | Type | Description |
|---|---|---|
| dsn | String! | The new DSN for the repository. |
UpdateRepositoryDefaultBranchInput
Input for theupdateRepositoryDefaultBranch mutation.
UpdateRepositoryDefaultBranchPayload
Payload for theupdateRepositoryDefaultBranch mutation.
| Field | Type | Description |
|---|---|---|
| ok | Boolean! | Whether the operation was successful. |
| repository | Repository! | Repository type. |
UpdateRepositoryIssueCategorySettingInput
Input for theupdateRepositoryIssueCategorySetting mutation.
| Field | Type | Description |
|---|---|---|
| repositoryId | ID! | The repository’s ID. |
| issueCategory | IssueCategory! | The issue category you want to update. |
| isReported | Boolean! | Whether issues of a given category are enabled for reporting in the repository. |
| canFailCheck | Boolean! | Whether to fail checks when occurrence(s) of issues of a given category is found in the repository, an issue category can only be marked to fail a check if it is enabled for reporting. |
UpdateRepositoryIssueCategorySettingPayload
Paylod for theupdateRepositoryIssueCategorySetting mutation.
| Field | Type | Description |
|---|---|---|
| ok | Boolean! | Whether the operation was successful. |
UpdateRepositoryMetricSettingInput
Input for theupdateRepositoryMetricSetting mutation.
| Field | Type | Description |
|---|---|---|
| repositoryId | ID! | The repository’s ID. |
| metricShortcode | MetricShortcode! | The shortcode of the metric you want to update. |
| isReported | Boolean! | Whether the metric is enabled for reporting in the repository. |
| isThresholdEnforced | Boolean! | Whether to fail checks when the metric does not meet the threshold. |
UpdateRepositoryMetricSettingPayload
Payload for theupdateRepositoryMetricSetting mutation.
| Field | Type | Description |
|---|---|---|
| ok | Boolean! | Whether the operation was successful. |
ActivateRepositoryInput
Input for theactivateRepository mutation.
| Field | Type | Description |
|---|---|---|
| repositoryId | ID! | GraphQL node ID of the repository. |
ActivateRepositoryPayload
Payload for theactivateRepository mutation.
| Field | Type | Description |
|---|---|---|
| ok | Boolean! | Whether the operation was successful. |
DeactivateRepositoryInput
Input for thedeactivateRepository mutation.
| Field | Type | Description |
|---|---|---|
| repositoryId | ID! | GraphQL node ID of the repository. |
DeactivateRepositoryPayload
Payload for thedeactivateRepository mutation.
| Field | Type | Description |
|---|---|---|
| ok | Boolean! | Whether the operation was successful. |
VulnerabilityOccurrence
Represents an occurrence of a vulnerability in a specific package version within a repository.| Field | Type | Description |
|---|---|---|
| id | ID! | The ID of the object. |
| reachability | VulnerabilityOccurrenceReachability! | The reachability of the vulnerability occurrence. |
| fixability | VulnerabilityOccurrenceFixability! | The fixability of the vulnerability occurrence. |
| vulnerability | Vulnerability! | The vulnerability details. |
| package | Package! | The package associated with the vulnerability occurrence. |
| packageVersion | PackageVersion! | The package version associated with the vulnerability occurrence. |
VulnerabilityOccurrenceConnection
| Field | Type | Description |
|---|---|---|
| pageInfo | PageInfo! | Pagination data for this connection. |
| edges | [VulnerabilityOccurrenceEdge]! | Contains the nodes in this connection. |
| totalCount | Int |
VulnerabilityOccurrenceEdge
A Relay edge containing aVulnerabilityOccurrence and its cursor.
| Field | Type | Description |
|---|---|---|
| node | VulnerabilityOccurrence | The item at the end of the edge. |
| cursor | String! | A cursor for use in pagination. |
Vulnerability
Details about a security vulnerability.| Field | Type | Description |
|---|---|---|
| id | ID! | The ID of the object. |
| identifier | String! | The identifier of the vulnerability (e.g., CVE). |
| aliases | [String!]! | The aliases of the vulnerability. |
| summary | String | The summary of the vulnerability. |
| details | String | The detailed description of the vulnerability. |
| severity | VulnerabilitySeverity | Overall implied severity. |
| cvssV2Vector | String | CVSS v2 vector. |
| cvssV2BaseScore | Float | CVSS v2 base score. |
| cvssV2Severity | VulnerabilitySeverity | Severity based on the CVSSv2 base score. |
| cvssV3Vector | String | CVSS v3 vector. |
| cvssV3BaseScore | Float | CVSS v3 base score. |
| cvssV3Severity | VulnerabilitySeverity | Severity based on the CVSSv3 base score. |
| cvssV4Vector | String | CVSS v4 vector. |
| cvssV4BaseScore | Float | CVSS v4 base score. |
| cvssV4Severity | VulnerabilitySeverity | Severity based on the CVSSv4 base score. |
| epssScore | Float | The EPSS score of the vulnerability. |
| epssPercentile | Float | The EPSS percentile of the vulnerability. |
| introducedVersions | [String]! | Versions in which the vulnerability was introduced. |
| fixedVersions | [String]! | Versions in which the vulnerability was fixed. |
| referenceUrls | [String]! | Reference URLs for the vulnerability. |
| publishedAt | DateTime! | The time when the vulnerability was published. |
| updatedAt | DateTime! | The time when the vulnerability was updated. |
| withdrawnAt | DateTime | The time when the vulnerability was withdrawn. |
RepositoryTarget
A Software Composition Analysis (SCA) target in a repository. Represents a manifest/lockfile pair for dependency scanning.| Field | Type | Description |
|---|---|---|
| id | ID! | The ID of the object. |
| ecosystem | Ecosystem! | The ecosystem of the target. |
| packageManager | PackageManager! | The package manager of the target. |
| manifestPath | String | Path to the manifest file. |
| lockfilePath | String! | Path to the lockfile. |
| source | RepositoryTargetSource! | The source of the target. |
| isActivated | Boolean! | Whether the target is activated. |
RepositoryTargetConnection
| Field | Type | Description |
|---|---|---|
| pageInfo | PageInfo! | Pagination data for this connection. |
| edges | [RepositoryTargetEdge]! | Contains the nodes in this connection. |
| totalCount | Int |
RepositoryTargetEdge
A Relay edge containing aRepositoryTarget and its cursor.
| Field | Type | Description |
|---|---|---|
| node | RepositoryTarget | The item at the end of the edge. |
| cursor | String! | A cursor for use in pagination. |
Package
Represents a software package in a specific ecosystem.PackageVersion
Represents a specific version of a package.| Field | Type | Description |
|---|---|---|
| id | ID! | The ID of the object. |
| version | String! | Version of the package. |
| versionType | PackageVersionType | The type of the package version. |