Analysis

Dismiss Findings

Changed on

Dismisses one or many findings of a repository in a single call, exactly like the Dismiss action in the dashboard: dismissed findings leave the active lists and the Hotlist and move to the repository's Dismissed tab, where they can be restored. Group findings by repository and scanner and send each group as one request.

post/api/analysis/findings/dismiss

Request

  • Base URL
    https://api.codeant.ai
  • URL
    https://api.codeant.ai/api/analysis/findings/dismiss
  • Auth
    none declared

Request body

platform'github' | 'gitlab' | 'bitbucket' | 'azure_devops' required

Git platform of the organization

orgstring required

Organization / workspace slug

repostring required

Repository full name the findings belong to

github_base_urlstring

Self-hosted instance URL (also gitlab_base_url / bitbucket_base_url / azure_devops_base_url). Defaults to the cloud host.

analysis_type'sast' | 'sca' | 'secrets' | 'iac' required

Scanner the findings come from. raw.analysis_type from the Hotlist API maps directly (security is accepted as an alias of sast).

dismiss_keysstring[] required

Finding identifiers to dismiss — one request dismisses any number of findings in one repo. Take them verbatim from raw.dismiss_key of the Hotlist API (/api/security/hotlist/findings), or build them from the per-repo results:

  • sca — package@version dismisses every advisory of the package; package@version::<manifest relative_path>::<cve_id> dismisses one advisory.
  • sast — <file_path>||::||<context_code_block>||::||<test_id>.
  • secrets — <file_path>||::||<hashed_secret>:occurrence:<n>||::||<type> (n is the 0-based index among identical secrets in that file).
  • iac — <file_path>||::||<check_id>||::||<start_line>-<end_line>.
reasonstring

Shown as the dismissal reason in the dashboard.

commentstring

Free-text note stored with the dismissal.

dismissed_bystring

Attribution recorded on the dismissal; defaults to api.

Example request

{
  "repo": "owner/repository",
  "github_base_url": "https://github.com",
  "dismiss_keys": [
    "cross-spawn@7.0.3::package-lock.json::CVE-2024-21538",
    "lodash@4.17.20"
  ],
  "reason": "This alert is inaccurate or incorrect",
  "dismissed_by": "sec-automation@example.com"
}

Response

Findings dismissed

statusstring
dismissedinteger

Number of dismiss keys written.

Example response

{
  "status": "success",
  "dismissed": 2
}

Changes