v1

latestOpenAPI 3.0.02026-07-249055687.1 KB
diff-scans

Create diff scan from repository HEAD full-scan

Create a diff scan between the repository's current HEAD full scan and a new full scan from uploaded manifest files. Returns metadata about the diff scan. Once the diff scan is created, fetch the diff scan from the api_url URL to get the contents of the diff.

The maximum number of files you can upload at a time is 10000 and each file can be no bigger than 268 MB.

This endpoint consumes 1 unit of your quota.

This endpoint requires the following org token scopes: - repo:list

  • diff-scans:create
  • full-scans:create
post/orgs/{org_slug}/diff-scans/from-repo/{repo_slug}

Path parameters

org_slugstring required

The slug of the organization

repo_slugstring required

The slug of the repository

Query parameters

descriptionstring

A description of the diff scan. This will be used in the diff report and can be used to provide context for the changes made.

external_hrefstring

An external URL to associate with the diff scan. This can be a link to a pull request, issue, or any other relevant resource.

branchstring

The branch name to associate the new full-scan with. Branch names must follow Git branch name rules: be 1–255 characters long; cannot be exactly @; cannot begin or end with /, ., or .lock; cannot contain "//", "..", or "@{"; and cannot include control characters, spaces, or any of ~^:?*[.

commit_messagestring

The commit message to associate the new full-scan with.

commit_hashstring

The commit hash to associate the full-scan with.

pull_requestinteger

The pull request number to associate the new full-scan with.

committersstring

The committers to associate the new full-scan with. Set query more than once to set multiple committers.

integration_type'api' | 'github' | 'gitlab' | 'bitbucket' | 'azure' | 'web'

The integration type to associate the new full-scan with. Defaults to "api" if omitted.

integration_org_slugstring

The integration org slug to associate the new full-scan with. If omitted, the Socket org name will be used. This is used to generate links and badges.

mergeboolean

Set to true when running a diff between a merged commit and its parent commit in the same branch. Set to false when running diffs in an open PR between unmerged commits.

workspacestring

The workspace of the repository.

Response

The details of the new full scan and diff scan between the two scans.

unmatchedAfterFilesstring[] required