List issues
const url = 'https://api.devsecure.io/v1/issues?limit=50&sort=-created_at&latest_only=true';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.devsecure.io/v1/issues?limit=50&sort=-created_at&latest_only=true' \ --header 'Authorization: Bearer <token>'Issues (findings) across the workspace. By default only issues from the latest scan of each repository or target are included (latest_only=true), as in the dashboard.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Page size (1-200).
Page size (1-200).
Scanner tool name, e.g. semgrep.
Scanner tool name, e.g. semgrep.
Only issues from the latest scan of each repository or target, as in the dashboard.
Only issues from the latest scan of each repository or target, as in the dashboard.
Responses
Section titled “Responses”OK.
object
object
True when this issue recurred after being marked a false positive.
object
Example
{ "data": [ { "title": "SQL injection in query builder", "severity": "critical", "status": "open", "scanner": "semgrep", "cwe": 89, "cve": "CVE-2024-12345", "file_path": "app/db/query.py", "scan_type": "code", "repository": { "id": "repo_3f9a0c2d4b1e8f7a6c5d4e3f", "provider": "github", "name": "acme/payments-api" } } ]}Headers
Section titled “Headers”Identifies the request; quote it to support.
Requests allowed per window.
Requests left in the window.
Seconds until the window resets.
Whether another page follows.
The request is not valid (validation_error, invalid_cursor).
object
Example
{ "error": { "code": "validation_error", "message": "The request is not valid.", "request_id": "req_3f0c2a9d5b6e4f7a8c1d2e3f4a5b6c7d" }}Headers
Section titled “Headers”Identifies the request; quote it to support.
Missing, unknown, expired or revoked credential (invalid_credentials).
object
Example
{ "error": { "code": "invalid_credentials", "message": "The credential is missing, invalid, expired or revoked.", "request_id": "req_3f0c2a9d5b6e4f7a8c1d2e3f4a5b6c7d" }}Headers
Section titled “Headers”Identifies the request; quote it to support.
The credential may not do this (insufficient_scope, permission_denied, plan_not_allowed, quota_exceeded, target_not_authorized).
object
Example
{ "error": { "code": "insufficient_scope", "message": "The credential does not have the scope this operation needs.", "request_id": "req_3f0c2a9d5b6e4f7a8c1d2e3f4a5b6c7d" }}Headers
Section titled “Headers”Identifies the request; quote it to support.
Too many requests (rate_limited).
object
Example
{ "error": { "code": "rate_limited", "message": "Too many requests. Retry after the time in Retry-After.", "request_id": "req_3f0c2a9d5b6e4f7a8c1d2e3f4a5b6c7d" }}Headers
Section titled “Headers”Identifies the request; quote it to support.
Requests allowed per window.
Requests left in the window.
Seconds until the window resets.
Seconds to wait before retrying.
Unexpected error (internal_error). Quote the request id to support.
object
Example
{ "error": { "code": "internal_error", "message": "Something went wrong on our side.", "request_id": "req_3f0c2a9d5b6e4f7a8c1d2e3f4a5b6c7d" }}Headers
Section titled “Headers”Identifies the request; quote it to support.