Custom Sinks

Create custom sink declaration

Declare a custom security sink that the scanner should recognize. The description is validated by an LLM guard before persisting. Only name and description are required. Applies org-wide by default; pass repositoryIds to restrict to specific repos.

post/api/v2/customSinks/create

Request

  • Base URL
    https://zeropath.com
  • Auth
    API key in header X-ZeroPath-API-Token-Id and API key in header X-ZeroPath-API-Token-Secret

Request body

organizationIdstring
namestring required

Name for the custom sink declaration

descriptionstring required

Natural language description the scanner uses to identify this sink in code. Should describe the security-sensitive operation, its package/class, and why it should be treated as a sink (e.g. SQL execution, command execution, file writes).

globPatternstring

Glob pattern for files this sink applies to

repositoryIdsstring[]

Optional. Repository IDs to restrict this sink to. When omitted (and no scope is given), applies to ALL repositories in the organization.

scope'allRepositories' | 'repositories' | 'tags'

Optional explicit scope. Use tags with tagIds to apply the sink only to repositories carrying those tags.

tagIdsstring[]

Optional. Tag IDs to associate with this sink; with scope tags they define where it applies.

Response

Sink declaration created successfully

idstring required
namestring required
descriptionstring required
globPatternstring required
enabledboolean required
repositoryIdsstring[] required
scope'allRepositories' | 'repositories' | 'tags' required

Where the declaration applies: every repository, the listed repositories, or repositories carrying its tags.

createdAtstring date-time required
updatedAtstring date-time required

Changes

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