Custom Sources

Create custom source declaration

Declare a custom security source 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/customSources/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 source declaration

descriptionstring required

Natural language description the scanner uses to identify this source in code. Should describe the data entry point, its package/class, and why it receives untrusted data.

globPatternstring

Glob pattern for files this source applies to

repositoryIdsstring[]

Optional. Repository IDs to restrict this source 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 source only to repositories carrying those tags.

tagIdsstring[]

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

Response

Source 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.