create_code_finding
¶
create_code_finding(
environment_id: EnvironmentId,
ocsf_document: object,
*,
config_overrides: Optional[ContinuumClientConfig] = None,
client_token: Optional[FindingClientToken] = None,
) -> CreateCodeFindingOutput
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.
Parameters:
-
environment_id(EnvironmentId) –The environment to ingest the finding into.
-
ocsf_document(object) –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.
-
client_token(Optional[FindingClientToken], default:None) –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.
Raises:
-
AccessDeniedException–The request is not authorized. Verify that your credentials and request signature are valid and that you have permission to perform this action.
-
ConflictException–The request could not be completed due to a conflict with the current state of the resource.
-
InternalServerException–The request couldn't be processed because of an internal server issue. Try again later. If the problem persists, contact AWS Support.
-
ResourceNotFoundException–The specified resource was not found. Verify that the resource identifier is correct and that the resource exists.
-
ThrottlingException–The request was denied due to request throttling.
-
UnknownServiceError–The service returned an error code this client does not model.