Skip to main content

Snyk

Snyk is an application scanning tool used for scanning, prioritizing, and fixing security vulnerabilities in your organization's application, projects, or source code. You can bring code, component, and project data from Snyk into Brinqa to track and manage your open-source dependencies, construct a unified view of your attack surface, and strengthen your cybersecurity posture.

This document details the information you must provide for the connector to authenticate with Snyk and how to obtain that information from Snyk. See create a data integration for step-by-step instructions on setting up the integration.

Required connection settings

When setting up a data integration, select Snyk from the Connector drop-down. If you cannot find the connector in the drop-down, make sure that you have installed it first. You must provide the following information to authenticate Snyk with Brinqa:

  • API URL: The Snyk API URL. The default URL is https://api.snyk.io.

  • API Token: The access token associated with the Snyk account, which must have permissions to log in to the API server and return data.

Obtain a Snyk API token

For the Snyk connector to use the Snyk API, you must provide an API token. To generate an API token, follow these steps.

  1. Log in to your organization's Snyk account.

  2. Click the account drop-down and then click Account settings.

    Snyk account settings

  3. Under Account Settings, click General.

  4. Under Auth Token, click the KEY field. You can also click Revoke and Regenerate on the same page to create a new API token to replace an existing one.

    Snyk API token

    Your new API token displays. You can not view the token again after this. Copy and save it to a secure location.

note

If you do not have the permissions to create an API token, contact your Snyk administrator. For additional information, see Snyk documentation.

Additional settings

The Snyk connector contains additional options for specific configuration:

  • Sync only active projects and findings for these projects: Retrieves only active projects and their associated findings. Any findings linked to inactive projects are excluded from the imported data. This option can help streamline your data integration and keep your focus on only active and relevant security concerns.

    Important

    Due to limitation of the Snyk API filters, this option doesn't apply to Static code findings. If you need to purge your static code findings, please contact Brinqa Support. Brinqa and Snyk are working together to resolve this issue.

  • Page size: The maximum number of records to get per API request. The default setting is 100. It is not recommended to go over 100.

  • Parallel requests: The maximum number of parallel API requests. The default setting is 4.

  • Maximum retries: The maximum number of times that the integration attempts to connect to the Snyk API before giving up and reporting a failure. The default setting is 5.

Types of data to retrieve

The Snyk connector can retrieve the following types of data from the Snyk API:

Table 1: Data retrieved from Snyk

Connector ObjectRequiredMaps to Data Model
Code RepositoryNoCode Repository
CollectionNoNot mapped
ComponentYesPackage
IgnoreNoMapped to attributes in Open Source Finding and Static Code Finding
Open Source IssueYesOpen Source Finding
Open Source Issue DefinitionYesOpen Source Finding Definition
ProjectYesCode Project
Static Code IssueYesStatic Code Finding
Static Code Issue DefinitionYesStatic Code Finding Definition
ViolationYesViolation
Violation DefinitionYesViolation Definition
info

For detailed steps on how to view the data retrieved from Snyk in the Brinqa Platform, see How to view your data.

Attribute mappings

Expand the sections below to view the mappings between the source and the Brinqa data model attributes.

Code Repository

Table 2: Code Repository attribute mappings

Source Field NameMaps to Attribute
categoriescategories
lastCapturedlastCaptured
target.attributes.created_atsourceCreatedDate
target.attributes.is_privateLocal variable
target.attributes.urlLocal variable
target.iduid, name
target.relationships.integration.data.attributes.integration_typeLocal variable
target.relationships.integration.data.idLocal variable
Component

Table 3: Component attribute mappings

Source Field NameMaps to Attribute
categoriescategories
dependency.firstPublishedDatefirstSeen
dependency.isDeprecatedoutdated
dependency.latestVersionlatestVersion
dependency.latestVersionPublishedDatelastSeen
dependency.licenses.titlelicenses
dependency.namedescription, name, uid
dependency.projects.idprojects
dependency.typecategories
dependency.versioncurrentVersion
Open Source Issue

Table 4: Open Source Issue attribute mappings

Source Field NameMaps to Attribute
group.attributes.nametags
group.idtags
issueMetadataObject.attributes.created_atfirstFound
issueMetadataObject.attributes.updated_atlastFound
openSourceIssue.getIssue.issueData.cveIdstype
openSourceIssue.getIssue.issueData.descriptionresults
openSourceIssue.getIssue.issueData.cwestype
openSourceIssue.getIssue.issueData.severitytype
openSourceIssue.getIssue.issueData.titletype
openSourceIssue.getIssue.pkgNametargets
openSourceIssue.getIssue.pkgVersionstargets
openSourceIssue.getIssue.idLocal variable
openSourceIssue.getIssue.isIgnoredLocal variable
openSourceIssue.getIssue.isMaliciousPackageLocal variable
openSourceIssue.getIssue.isPatchedLocal variable
openSourceIssue.getIssue.priority.scoreLocal variable
openSourceIssue.getProjectIdtargets, Local variable
openSourceIssue.getTickets.idLocal variable
openSourceIssue.getTickets.keyLocal variable
org.attributes.nametags
org.attributes.slugtags
org.idtags
pathspath
projectIssue.getIssue.iduid
projectIssue.getProjectIduid
ProviderStatusstatus, statusCategory, sourceStatus, providerStatus
Open Source Issue Definition

Table 5: Open Source Issue Definition attribute mappings

Source Field NameMaps to Attribute
issueData.CVSSv3cvssV3Vector
issueData.cvssScorecvssV3BaseScore
issueData.descriptiondescription, references, recommendation, exploits
issueData.disclosureTimedisclosedDate
issueData.exploitMaturityexploitMaturity
issueData.identifiers.get("CVE")cveIds, cveRecords
issueData.identifiers.get("CWE")cweIds, weaknesses
issueData.languagelanguages
issueData.publicationTimepublishedDate
issueData.severityseverity, sourceSeverity, severityScore
issueData.semveraffected
issueData.urlreferences
issueObject.fixInfo.fixedInLocal variable
issueObject.fixInfo.isFixablefixable
issueObject.fixInfo.isPartiallyFixablepartiallyFixable
issueObject.fixInfo.isPatchablepatchAvailable
issueObject.fixInfo.isUpgradableupgradeable
issueObject.issueData.titlename
openSourceIssue.getIssue.issueData.titleuid
openSourceIssue.getIssue.issueData.severityseverity, sourceSeverity, severityScore
openSourceIssue.getIssue.issueData.descriptiondescription, references, recommendation, exploits
openSourceIssue.getIssue.issueData.cveIdscveIds, cveRecords
openSourceIssue.getIssue.issueData.cwescweIds, weaknesses
Project

Table 6: Project attribute mappings

Source Field NameMaps to Attribute
categoriescategories
group.attributes.nameLocal variable
group.idLocal variable
nowlastCaptured
org.attributes.nameLocal variable
org.attributes.slugLocal variable
org.idLocal variable
project.attributes.business_criticalityLocal variable
project.attributes.environmentLocal variable
project.attributes.lifecycleLocal variable
project.attributes.namename, description
project.attributes.originLocal variable
project.attributes.settings.recurring_tests.frequencyLocal variable
project.attributes.statusstatus
project.attributes.typecategories, description
project.iduid
project.meta.latestIssueCounts.updatedAtlastAssessed
project.relationships.target.data.idLocal variable
tagstags
userObject.attributes.usernameowner
userObject.attributes.username (project.relationships.owner)Local variable
userObject.attributes.username (project.relationships.importer)Local variable
Static Code Issue

Table 7: Static Code Issue attribute mappings

Source Field NameMaps to Attribute
attributes.fingerprintLocal variable
attributes.fingerprintVersionLocal variable
attributes.priorityScoreLocal variable
attributes.priorityScoreFactorsLocal variable
attributes.primaryFilePathfileName
group.attributes.nametags, Local variable
group.idtags, Local variable
issueDetailsObject.attributes.ignoredstatus, Local variable
issueObject.attributes.created_atfirstFound
issueObject.attributes.keyLocal variable
issueObject.attributes.risk.score.valueLocal variable
issueObject.attributes.statusstatus, statusCategory, sourceStatus, providerStatus
issueObject.attributes.titletype
issueObject.attributes.updated_atlastFound
issueObject.iduid
issueObject.relationships.scan_item.data.idLocal variable
issueObject.relationships.scan_item.idtargets
org.attributes.nametags, Local variable
org.attributes.slugtags, Local variable
org.idtags, Local variable
primaryRegion.endColumncodeSnippet
primaryRegion.endLinecodeSnippet
primaryRegion.startColumncodeSnippet
primaryRegion.startLinecodeSnippet
staticCodeIssue.getTickets.idLocal variable
staticCodeIssue.getTickets.keyLocal variable
Static Code Issue Definition

Table 8: Static Code Issue Definition attribute mappings

Source Field NameMaps to Attribute
issueDetailsObject.attributes.cwecweIds, weaknesses
issueObject.attributes.title.severity.cwestype, uid
issueDetailsObject.attributes.severityseverity, sourceSeverity, severityScore
staticCodeIssue.getIssueObject.attributes.titlename, description
staticCodeIssue.getIssueObject.typecategories
Violation

Table 9: Violation attribute mappings

Source Field NameMaps to Attribute
attackVectorLocal variable
attackComplexityLocal variable
availabilityImpactLocal variable
businessCriticalityLocal variable
confidentialityImpactLocal variable
daysSincePublishedLocal variable
exploitMaturityLocal variable
integrityImpactLocal variable
isMaliciousLocal variable
packagePopularityScoreLocal variable
pathspath
privilegesRequiredLocal variable
providerUrgencyLocal variable
scopeLocal variable
socialTrendsLocal variable
transitiveDependencyLocal variable
userInteractionLocal variable
projectIssue.getIssue.iduid
projectIssue.getProjectIduid
group.idtags
group.attributes.nametags
org.idtags
org.attributes.nametags
org.attributes.slugtags
issueMetadataObject.attributes.created_atfirstFound
issueMetadataObject.attributes.updated_atlastFound
ProviderStatusstatus, statusCategory, sourceStatus, providerStatus
Violation Definition

Table 10: Violation Definition attribute mappings

Source Field NameMaps to Attribute
issueData.CVSSv3cvssV3Vector
issueData.cvssScorecvssV3BaseScore
issueData.descriptiondescription, references, recommendation, exploits
issueData.disclosureTimedisclosedDate
issueData.exploitMaturityexploitMaturity
issueData.identifiers.get("CVE")cveIds, cveRecords
issueData.identifiers.get("CWE")cweIds, weaknesses
issueData.languagelanguages
issueData.publicationTimepublishedDate
issueData.severityseverity, sourceSeverity, severityScore
issueData.semveraffected
issueData.urlreferences
issueObject.fixInfo.fixedInLocal variable
issueObject.fixInfo.isFixablefixable
issueObject.fixInfo.isPartiallyFixablepartiallyFixable
issueObject.fixInfo.isPatchablepatchAvailable
issueObject.fixInfo.isUpgradableupgradeable
issueObject.issueData.titlename
openSourceIssue.getIssue.issueData.titleuid
openSourceIssue.getIssue.issueData.severityseverity, sourceSeverity, severityScore
openSourceIssue.getIssue.issueData.descriptiondescription, references, recommendation, exploits
openSourceIssue.getIssue.issueData.cveIdscveIds, cveRecords
openSourceIssue.getIssue.issueData.cwescweIds, weaknesses
note

Local variable indicates that the field is processed within a specific context, such as a particular workflow or calculation. Unlike other attributes, local variables aren't mapped to the unified data models. They only exist on the source data model.

Operation options

The Snyk connector supports the following operation options. See connector operation options for information about how to apply them.

Table 11: Snyk connector operation options

Connector ObjectOptionAll Possible ValuesDescriptionExample
ComponentexcludeOrgAny organization assigned to a Snyk project.Used to retrieve a list of Snyk projects while excluding the projects that belong to a specific organization.Key: excludeOrg Value: myTeam. This key and value combination retrieves all projects and excludes those from the myTeam organization.
project or projectIdAny Snyk project ID.Filters Snyk projects by the specified project ID.Key: projectId Value: 12345. This key and value combination only retrieves projects associated with the Snyk project 12345.
Open Source IssueincludeJiraTicketstrueRetrieve Snyk related Jira tickets for open source issues.Key: includeJiraTickets Value: true. This key and value combination retrieves Snyk related Jira tickets for open source issues.
includePathstrueInclude information about the paths where issues were found in the data.Key: includePaths Value: true. This key and value combination retrieves information about the paths where issues reside in the data.
severitieslow, medium, high, or criticalA comma-separated list of severity levels. Retrieves open source issues based on the specified severity level.Key: severities Value: critical,high. This key and value combination only retrieves open source issues with a critical or high severity level.
Open Source Issue DefinitionincludeJiraTicketstrueRetrieve Snyk related Jira tickets for open source issue definitions.Key: includeJiraTickets Value: true. This key and value combination retrieves Snyk related Jira tickets for open source issue definitions.
includePathstrueInclude information about the paths where issue definitions were found in the data.Key: includePaths Value: true. This key and value combination retrieves information about the paths where issue definitions reside in the data.
severitieslow, medium, high, or criticalA comma-separated list of severity levels. Retrieves issues based on the specified severity level.Key: severities Value: high,medium. This key and value combination only retrieves issues with a high or medium severity level.
typesvuln or licenseRetrieves issues based on whether they are classified as a vulnerability or license issue.Key: types Value: vuln. This key and value combination only retrieves issues that classified as vulnerabilities.
ProjectexcludeOrgAny organization assigned to a Snyk project.Used to retrieve a list of Snyk projects while excluding the projects that belong to a specific organization.Key: excludeOrg Value: myTeam. This key and value combination retrieves all projects and excludes those from the myTeam organization.
project or projectIdAny Snyk project ID.Filters Snyk projects by the specified project ID.Key: projectId Value: 12345. This key and value combination only retrieves projects associated with the Snyk project 12345.
Static Code IssueincludeJiraTicketstrueRetrieve Snyk related Jira tickets for static code issues.Key: includeJiraTickets Value: true. This key and value combination retrieves Snyk related Jira tickets for static code issues.
includePathstrueInclude information about the paths where issues were found in the data.Key: includePaths Value: true. This key and value combination retrieves information about the paths where issues reside in the data.
severitieslow, medium, high, or criticalA comma-separated list of severity levels. Retrieves static code issues based on the specified severity level.Key: severities Value: critical. This key and value combination only retrieves static code issues with a critical severity level.
Static Code Issue DefinitionincludeJiraTicketstrueRetrieve Snyk related Jira tickets for static code issue definitions.Key: includeJiraTickets Value: true. This key and value combination retrieves Snyk related Jira tickets for static code issue definitions.
includePathstrueInclude information about the paths where issues were found in the data.Key: includePaths Value: true. This key and value combination retrieves information about the paths where issues reside in the data.
severitieslow, medium, high, or criticalA comma-separated list of severity levels. Retrieves static code issue definitions based on the specified severity level.Key: severities Value: critical,high. This key and value combination only retrieves static code issue definitions with a critical or high severity level.
ViolationincludeJiraTicketstrueRetrieve Snyk related Jira tickets for violations.Key: includeJiraTickets Value: true. This key and value combination retrieves Snyk related Jira tickets for violations.
includePathstrueInclude information about the paths where violations were found in the data.Key: includePaths Value: true. This key and value combination retrieves information about the paths where violations reside in the data.
Violation DefinitionincludeJiraTicketstrueRetrieve Snyk related Jira tickets for violation definitions.Key: includeJiraTickets Value: true. This key and value combination retrieves Snyk related Jira tickets for violation definitions.
includePathstrueInclude information about the paths where violation definitions were found in the data.Key: includePaths Value: true. This key and value combination retrieves information about the paths where violation definitions reside in the data.
note

The option keys and values are case-sensitive as they are shown in this documentation.

APIs

The Snyk connector uses the Snyk API v1 and Snyk REST API. Specifically, it uses the following endpoints:

Table 12: Snyk API Endpoints

Connector ObjectAPI Endpoints
Code RepositoryGET /rest/orgs
GET /rest/orgs/{orgId}/targets
CollectionGET rest/groups
GET rest/groups/{groupId}/orgs
GET rest/orgs/{orgId}/collections
ComponentGET rest/groups
GET rest/groups/{groupId}/orgs
GET /api/v1/org/{orgId}/dependencies
IgnoreGET rest/orgs
GET rest/orgs/{orgId}/projects
GET /api/v1/org/{orgId}/project/{projectId}/ignores
Open Source IssueGET rest/groups
GET rest/groups/{groupId}/orgs
GET rest/orgs/{orgId}/projects
GET api/v1/org/{orgId}/project/{projectId}/jira-issues
GET api/v1/org/{orgId}/project/{projectId}/aggregated-issues
GET api/v1/org/{orgId}/project/{projectId}/issue/{issueId}/paths
Open Source Issue DefinitionGET rest/groups
GET rest/groups/{groupId}/orgs
GET rest/orgs/{orgId}/projects
GET api/v1/org/{orgId}/project/{projectId}/jira-issues
GET api/v1/org/{orgId}/project/{projectId}/aggregated-issues
GET api/v1/org/{orgId}/project/{projectId}/issue/{issueId}/paths
ProjectGET rest/groups
GET rest/groups/{groupId}/orgs
GET rest/orgs/{orgId}/projects
Static Code IssueGET rest/groups
GET rest/groups/{groupId}/orgs
GET rest/orgs/{orgId}/projects
GET api/v1/org/{orgId}/project/{projectId}/jira-issues
GET rest/orgs/{orgId}/issues
Static Code Issue DefinitionGET rest/groups
GET rest/groups/{groupId}/orgs
GET rest/orgs/{orgId}/projects
GET api/v1/org/{orgId}/project/{projectId}/jira-issues
GET rest/orgs/{orgId}/issues
ViolationGET rest/groups
GET rest/groups/{groupId}/orgs
GET rest/orgs/{orgId}/projects
GET api/v1/org/{orgId}/project/{projectId}/jira-issues
GET api/v1/org/{orgId}/project/{projectId}/aggregated-issues
GET api/v1/org/{orgId}/project/{projectId}/issue/{issueId}/paths
Violation DefinitionGET rest/groups
GET rest/groups/{groupId}/orgs
GET rest/orgs/{orgId}/projects
GET api/v1/org/{orgId}/project/{projectId}/jira-issues
GET api/v1/org/{orgId}/project/{projectId}/aggregated-issues
GET api/v1/org/{orgId}/project/{projectId}/issue/{issueId}/paths
note

The Snyk API is only available with Enterprise plans. See Snyk documentation for more information.

Changelog

The Snyk connector has undergone the following changes:

3.0.18

  • Added the JIRA_IDS and JIRA_KEYS attributes to the Static Code Issue object.

3.0.17

  • Added support for Data lifecycle management to the Code Repository, Collection, Component, Open Source Issue, Project, Static Code Issue, and Violation objects.

3.0.16

  • Fixed an issue where the IGNORED_BY, REASON, and REASON_TYPE attributes on the Ignore object were returning blank values.

3.0.15

  • Added the Code Repository connector object and established a relationship between the Code Project and Code Repository objects.

3.0.14

  • Changed the MALICIOUS_PACKAGE attribute type on the Open Source Issue object from string to boolean.

3.0.13

  • Added group information in each connector object.

  • Added Collection to the list of connector objects retrieved.

  • Added the PROJECT_ID attribute to the Static Code Issue object.

3.0.12

  • Added the RISK_SCORE attribute to the Static Code Issue object.

  • Added the following attributes to the Open Source Issue object:

    • ATTACK_COMPLEXITY
    • ATTACK_VECTOR
    • AVAILABILITY_IMPACT
    • BUSINESS_CRITICALITY
    • CONFIDENTIALITY_IMPACT
    • DAYS_SINCE_PUBLISHED
    • EPSS_SCORE
    • EXPLOIT_MATURITY
    • INTEGRITY_IMPACT
    • MALICIOUS
    • PACKAGE_POPULARITY_SCORE
    • PRIVILEGES_REQUIRED
    • PROVIDER_URGENCY
    • REACHABLE
    • SCOPE
    • SOCIAL_TRENDS
    • TRANSITIVE_DEPENDENCY
    • USER_INTERACTION

3.0.11

  • Fixed an issue where the Static Code Issue sync was not retrieving all static code issues.

3.0.10

  • Added the LAST_ASSESSED attribute in the Project object to store the last tested date from Snyk.

3.0.9

  • Added a new operation option in the Open Source Issue object to retrieve Snyk-related Jira tickets: includeJiraTickets.

3.0.8

  • Added logging for the Open Source Issue object.

  • Improved performance by parallelizing project streams when syncing Open Source Issue and Static Code Issue objects.

  • Updated dependencies.

3.0.7

  • Added ORG-level attributes, such as ORG_ID, ORG_NAME, as source attributes.

  • Added COMPONENT and PROJECT_ID to the Open Source Finding object as source attributes.

3.0.6

  • Implemented a different approach for managing the STATUS_CATEGORY attribute in findings, as it is not provided in the data retrieved from Snyk.

3.0.5

  • Switched to Snyk REST API (formerly Snyk API v3) to retrieve static code issues.

3.0.4

  • Migrated to new Organization and Project API endpoints.

  • Added a configuration to retrieve only active projects by default and findings associated with active projects.

3.0.3

  • Switched to Snyk API v3 since Snyk API v1 has been deprecated.

3.0.2

  • Started using UID as the identifier instead of name.

3.0.0