code-scan

Mark Code Scan Finding Treated

Record that this hardcoded string became a key (Developer+).

IDEMPOTENT: re-marking an already-treated finding with the SAME (namespace, key) returns the existing row untouched — treated_at does not move, so a client retry cannot rewrite when the decision was taken. An unknown finding_id is a 404, never a silent create. When namespace is given and the key does not exist there, the request is refused 422 — treated may not point at a key that does not exist.

post/v1/projects/{project_id}/code-scan/findings/{finding_id}/treated

Request

  • Base URL: https://api.sonenta.dev
  • URL: https://api.sonenta.dev/v1/projects/{project_id}/code-scan/findings/{finding_id}/treated
  • Auth: none declared

Path parameters

project_idstring required
finding_idstring required

Request body

keystring required

The key name this string became.

namespacestring nullable

Namespace slug of the key. When given, the key MUST exist as an active key of that namespace on this project (else 422) — so treated points at a real key. Omit for the legacy behaviour (records the key string with no check).

Response

Successful Response

uuidstring required
fingerprintstring required
filestring required
lineinteger required
columninteger nullable
stringstring required
statusstring required
categorystring

Scanner classification: keyless / key_default / unknown. unknown for findings recorded before the field existed.

sourcestring nullable

Where the text lives: attribute | element | null. Display only. null for findings recorded before the field existed, or when the scan omitted it.

source_namestring nullable

Attribute name or tag/component name (e.g. placeholder, button, Foo.Bar); null when unknown. Display only.

suggested_namespacestring nullable
treated_keystring nullable
treated_namespacestring nullable

Namespace of the treated key, when it was validated at treat time.

treated_atstring date-time nullable
first_seen_scan_idstring required
last_seen_scan_idstring required
first_seen_atstring date-time nullable
last_seen_atstring date-time nullable

Changes

No recorded changes to this operation across all 1 revision of this API.