Skip to main content

Constructor

Parameters

Returns

CodeScansClient

Methods

getCodeScanMetrics()

Get aggregated code scan metrics for the organization. Returns scan, finding, and remediation-PR metrics for code scans created within the specified time range.

Parameters

Request-specific configuration.

Returns

CodeScanMetricsResponse

getCodeScanProfile()

Get a code scan profile by ID. Returns the profile’s metadata, visibility (org-owned or shared account-wide), and all of its guidance fields. Returns 404 when the profile does not exist or is not visible to the organization.

Parameters

Request-specific configuration.

Returns

CodeScanProfileDetailResponse

listCodeScanFindings()

List code scan findings for the organization. Findings are returned newest first. Optionally filter by scan_id, repo_name, severity, and status (severity and status accept multiple values); results are paginated with an opaque cursor (after / first).

Parameters

Request-specific configuration.

Returns

CodeScanFindingResponsePaginatedResponseCodeScanFindingResponse

listCodeScanProfiles()

List code scan profiles for the organization. Returns profile summaries (without guidance) newest first, including both org-owned and account-shared profiles. Results are paginated with an opaque cursor (after / first).

Parameters

Request-specific configuration.

Returns

CodeScanProfileSummaryResponsePaginatedResponseCodeScanProfileSummaryResponse

listCodeScans()

List code scans for the organization. Scans are returned newest first. Optionally filter by repo_name and creation time (time_after / time_before); results are paginated with an opaque cursor (after / first).

Parameters

Request-specific configuration.

Returns

CodeScanResponsePaginatedResponseCodeScanResponse

remediateCodeScanFinding()

Launch a Devin session to remediate a code scan finding. The session analyzes the vulnerable code, implements a fix, and opens a pull request. The session is attributed to the calling principal (the service user or PAT that made the request). Returns 409 if the finding already has a remediation session.

Parameters

Request-specific configuration.

Returns

RemediateFindingResponse

startCodeScan()

Start a new code scan on a repository in the organization. The scan is enqueued and launched asynchronously by the scan dispatcher. The scan is attributed to the calling principal (the service user or PAT that made the request). Returns 409 when the organization’s scan backlog is at capacity.

Parameters

Request-specific configuration.

Returns

CodeScanResponse