Continuum / Client / create_code_finding
create_code_finding¶
- Continuum.Client.create_code_finding(**kwargs)¶
Ingests a customer-supplied security finding into an environment. Continuum validates the document synchronously against the required overlay fields for the declared format; invalid documents are rejected with a ValidationException. The maximum accepted document size is 256 KB. The environment must have a source configured, and the finding must identify a code location so Continuum can tie it to a repository in the environment’s build. Continuum assigns a findingId and stores the verbatim document. When no successful build yet contains the finding’s repository, the finding stays SUBMITTED until the next successful build; if that build does not contain it either, the finding is DISCARDED with discardReason SOURCE_REPO_NOT_FOUND.
See also: AWS API Documentation
Request Syntax
response = client.create_code_finding( environmentId='string', ocsfDocument={...}|[...]|123|123.4|'string'|True|None, clientToken='string' )
- Parameters:
environmentId (string) –
[REQUIRED]
The environment to ingest the finding into.
ocsfDocument (document) –
[REQUIRED]
The OCSF finding document to ingest, verbatim. Must declare a class_uid Continuum supports (2002 Vulnerability Finding, or 2007 Application Security Posture Finding) and validate against the vendored OCSF JSON Schema for that class, including the Continuum overlay requirements that finding_info.uid be present and that vulnerabilities[0].affected_code[0].file identify the code location. With several repositories in the environment, the file path must begin with the repository name. Maximum size 256 KB. Stored verbatim and normalized into the typed Finding members returned by GetCodeFinding. GetCodeFinding does not return the document itself.
clientToken (string) –
Caller-provided idempotency token. A retry with the same token and an identical finding document replays the original result; the same token with different content is rejected.
This field is autopopulated if not provided.
- Return type:
dict
- Returns:
Response Syntax
{ 'findingId': 'string', 'findingArn': 'string', 'title': 'string', 'status': 'SUBMITTED'|'VALIDATING'|'CONFIRMED'|'DISCARDED', 'createdAt': datetime(2015, 1, 1) }
Response Structure
(dict) –
Contains the identifier, ARN, title, and initial status of the newly ingested finding.
findingId (string) –
The unique identifier assigned to the finding.
findingArn (string) –
The ARN of the ingested finding.
title (string) –
The title extracted from the submitted document. Always populated at ingestion.
status (string) –
The finding’s current lifecycle status – SUBMITTED for a newly ingested finding, or the finding’s present status when an idempotent retry replays an already-processed finding.
createdAt (datetime) –
The timestamp when the finding was ingested.
Exceptions