Skip to main content
POST
/
attestations
/
{org}
/
{flow_name}
/
trail
/
{trail_name}
/
snyk
Attest Snyk scan
curl --request POST \
  --url https://app.kosli.com/api/v2/attestations/{org}/{flow_name}/trail/{trail_name}/snyk \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'data_json={
  "attestation_name": "<string>",
  "snyk_results": {
    "tool": {
      "name": "<string>",
      "version": "<string>"
    },
    "results": [
      {
        "low_count": 123,
        "medium_count": 123,
        "high_count": 123,
        "low": [
          {
            "id": "<string>",
            "message": "<string>",
            "locations": [],
            "priority_score": 123
          }
        ],
        "medium": [
          {
            "id": "<string>",
            "message": "<string>",
            "locations": [],
            "priority_score": 123
          }
        ],
        "high": [
          {
            "id": "<string>",
            "message": "<string>",
            "locations": [],
            "priority_score": 123
          }
        ]
      }
    ],
    "schema_version": 1
  },
  "origin_url": "<string>",
  "description": "<string>",
  "artifact_fingerprint": "<string>",
  "target_artifacts": [
    "<string>"
  ],
  "git_commit_info": {
    "sha1": "<string>",
    "message": "<string>",
    "author": "<string>",
    "author_username": "<string>",
    "branch": "<string>",
    "timestamp": 123,
    "url": "<string>",
    "parents": [
      "<string>"
    ]
  },
  "repo_info": {
    "name": "<string>",
    "url": "<string>",
    "id": "<string>",
    "description": "<string>",
    "provider": "github"
  },
  "external_urls": {},
  "annotations": {},
  "user_data": {}
}' \
  --form 'attachment_file=<string>'

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

flow_name
string
required
trail_name
string
required
org
string
required

Body

multipart/form-data
data_json
SnykAttestationPostInput · object
required

Attestation data in JSON format

Example:
{
  "attestation_name": "snyk",
  "git_commit_info": {
    "author": "Jon Smith <jon@smith.com>",
    "branch": "main",
    "message": "adding glorious commit",
    "sha1": "ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6",
    "timestamp": 1750923680,
    "url": "https://github.com/org/repo/commit/ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6"
  },
  "snyk_results": {
    "results": [
      {
        "high": [],
        "high_count": 0,
        "low": [],
        "low_count": 0,
        "medium": [],
        "medium_count": 0
      }
    ],
    "schema_version": 1,
    "tool": { "name": "SnykCode", "version": "1.0.0" }
  },
  "user_data": {}
}
attachment_file
string | null

Optional attachment file (max size: 10MB)

Response

Creation Success

Last modified on April 7, 2026