Skip to main content

Semgrep

Semgrep is an application security platform that integrates static code analysis (SAST) and software composition analysis (SCA) to detect vulnerabilities across your organization's code repositories. You can bring code project, static code finding, and open source finding data from Semgrep into Brinqa to gain a unified view of your attack surface, thus strengthening your cybersecurity posture.

This document details the information you must provide for the connector to authenticate with Semgrep and how to obtain that information from Semgrep. 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 Semgrep from the Connector dropdown. If you cannot find the connector in the dropdown, make sure that you have installed it first. You must provide the following information to authenticate Semgrep with Brinqa:

  • API URL: The Semgrep API URL. The default URL is https://semgrep.dev.

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

    note

    The Semgrep account must be a Team or Enterprise tier account in order for the Semgrep connector to make API calls and return data.

Create a Semgrep access token

For the Semgrep connector to use the Semgrep Web API, you must provide an access token. Semgrep does not allow retrieving the access token for an existing user, therefore, you must generate a new access token instead. To do so, follow these steps:

  1. Log in to the Semgrep application at https://semgrep.dev/login.

  2. Navigate to Settings and click Tokens.

  3. Click API tokens and then click Create new token.

  4. The Create a token window appears with the new token. Give the token a name or leave it as is.

    You cannot view the token after this. Copy the access token (Secrets value) and save it to a secure location.

  5. Under Token scopes, select Web API. This ensures that the Semgrep connector pulls information from the Semgrep Web API.

  6. Click Save.

    Semgrep access token user interface

note

The above steps describe the minimum requirements for the Semgrep connector to work properly with Brinqa. For additional information, see Semgrep documentation.

The connector authenticates using a static API access token with a Bearer scheme. All API requests include the token in the Authorization header as Bearer <access-token>. Semgrep API tokens do not expire — they remain valid until revoked.

Additional settings

The Semgrep connector contains additional options for specific configuration:

  • Parallel requests: The maximum number of parallel API requests. The default setting is the lesser of 4 or the number of available processors.

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

Types of data to retrieve

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

Table 1: Data retrieved from Semgrep

Connector ObjectRequiredMaps to Data Model
Code ProjectYesCode Project
Open Source FindingYesOpen Source Finding
Open Source Finding DefinitionYesOpen Source Finding Definition
Static Code FindingYesStatic Code Finding
Static Code Finding DefinitionYesStatic Code Finding Definition
info

The Semgrep connector does not currently support operation options for the types of data it retrieves.

For detailed steps on how to view the data retrieved from Semgrep 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 Project

Table 2: Code Project attribute mappings

Source Field NameSDM Attribute
Generated (set to "Code Repository")CATEGORIES
Project.default_branchDEFAULT_BRANCH
Generated (sync capture timestamp)LAST_CAPTURED
Project.latest_scan_atLAST_SCANNED
Project.nameNAME
Project.primary_branchPRIMARY_BRANCH
Project.idPROJECT_ID
Project.created_atSOURCE_CREATED_DATE
Generated (set to "active")STATUS
Project.tagsTAGS
Project.nameUID
Project.urlURL
Open Source Finding

Table 3: Open Source Finding attribute mappings

Source Field NameSDM Attribute
ScaFinding.confidenceCONFIDENCE
ScaFinding.created_atCREATED_AT
ScaFinding.location.end_columnEND_COLUMN
ScaFinding.location.end_lineEND_LINE
ScaFinding.external_ticket.external_slugEXTERNAL_TICKET_SLUG
ScaFinding.external_ticket.idEXTERNAL_TICKET_ID
ScaFinding.external_ticket.linked_issue_idsEXTERNAL_TICKET_LINKED_IDS
ScaFinding.external_ticket.urlEXTERNAL_TICKET_URL
ScaFinding.relevant_sinceFIRST_FOUND
ScaFinding.first_seen_scan_idFIRST_SEEN_SCAN_ID
ScaFinding.found_dependency.ecosystemFOUND_DEP_ECOSYSTEM
ScaFinding.found_dependency.lockfile_line_urlFOUND_DEP_LOCKFILE_LINE_URL
ScaFinding.found_dependency.packageFOUND_DEP_PACKAGE
ScaFinding.found_dependency.transitivityFOUND_DEP_TRANSITIVITY
ScaFinding.found_dependency.versionFOUND_DEP_VERSION
ScaFinding.is_maliciousIS_MALICIOUS
Generated (sync capture timestamp)LAST_CAPTURED
ScaFinding.triaged_atLAST_FIXED
ScaFinding.line_of_code_urlLINE_OF_CODE_URL
ScaFinding.match_based_idMATCH_BASED_ID
ScaFinding.locationPATH
ScaFinding.statusPROVIDER_STATUS
ScaFinding.reachable_conditionREACHABLE_CONDITION
ScaFinding.reachabilityREACHABILITY
ScaFinding.repository.urlREPOSITORY_URL
ScaFinding.review_comments[].external_discussion_idREVIEW_COMMENT_DISCUSSION_IDS
ScaFinding.review_comments[].external_note_idREVIEW_COMMENT_NOTE_IDS
ScaFinding.rule.messageRULE_MESSAGE
ScaFinding.rule_nameRULE_NAME
ScaFinding.refSOURCE_REF
ScaFinding.statusSOURCE_STATUS
ScaFinding.location.columnSTART_COLUMN
ScaFinding.location.lineSTART_LINE
ScaFinding.stateSTATE
ScaFinding.state_updated_atSTATE_UPDATED_AT
ScaFinding.syntactic_idSYNTACTIC_ID
ScaFinding.repository.nameTARGETS
ScaFinding.triage_commentTRIAGED_COMMENT
ScaFinding.triaged_atTRIAGED_AT
ScaFinding.triage_reasonTRIAGE_REASON
ScaFinding.triage_stateTRIAGE_STATE
ScaFinding.rule.nameTYPE
ScaFinding.idUID
ScaFinding.usageUSAGE
Open Source Finding Definition

Table 4: Open Source Finding Definition attribute mappings

Source Field NameSDM Attribute
ScaFinding.categoriesCATEGORIES
ScaFinding.vulnerability_identifierCVE_IDS
ScaFinding.vulnerability_identifierCVE_RECORDS
ScaFinding.rule.cwe_namesCWE_IDS
ScaFinding.rule.messageDESCRIPTION
ScaFinding.epss_score.percentileEPSS_PERCENTILE
ScaFinding.epss_score.scoreEPSS_SCORE
ScaFinding.fix_recommendations[]FIX_RECOMMENDATIONS
Generated (sync capture timestamp)LAST_CAPTURED
ScaFinding.rule.nameNAME
ScaFinding.rule.owasp_namesOWASP_CATEGORIES
ScaFinding.rule.message or ScaFinding.fix_recommendations[]RECOMMENDATION
ScaFinding.rule.categoryRULE_CATEGORY
ScaFinding.rule.confidenceRULE_CONFIDENCE
ScaFinding.rule.subcategoriesRULE_SUBCATEGORIES
ScaFinding.severitySEVERITY
ScaFinding.severitySEVERITY_SCORE
ScaFinding.severitySOURCE_SEVERITY
ScaFinding.rule.subcategoriesTAGS
ScaFinding.rule.nameUID
ScaFinding.rule.vulnerability_classesVULNERABILITY_CLASSES
ScaFinding.rule.cwe_namesWEAKNESSES
Static Code Finding

Table 5: Static Code Finding attribute mappings

Source Field NameSDM Attribute
SastFinding.assistant.autofix.explanationASSISTANT_AUTOFIX_EXPLANATION
SastFinding.assistant.autofix.fix_codeASSISTANT_AUTOFIX_CODE
SastFinding.assistant.autotriage.reasonASSISTANT_AUTOTRIAGE_REASON
SastFinding.assistant.autotriage.verdictASSISTANT_AUTOTRIAGE_VERDICT
SastFinding.assistant.component.riskASSISTANT_COMPONENT_RISK
SastFinding.assistant.component.tagASSISTANT_COMPONENT_TAG
SastFinding.assistant.guidance.instructionsASSISTANT_GUIDANCE_INSTRUCTIONS
SastFinding.assistant.guidance.summaryASSISTANT_GUIDANCE_SUMMARY
SastFinding.assistant.rule_explanation.explanationASSISTANT_RULE_EXPLANATION
SastFinding.assistant.rule_explanation.summaryASSISTANT_RULE_EXPLANATION_SUMMARY
SastFinding.click_to_fix_failures[].created_atCLICK_TO_FIX_FAILURE_DATES
SastFinding.click_to_fix_failures[].reasonCLICK_TO_FIX_FAILURE_REASONS
SastFinding.click_to_fix_prs[].created_atCLICK_TO_FIX_PR_DATES
SastFinding.click_to_fix_prs[].urlCLICK_TO_FIX_PR_URLS
SastFinding.confidenceCONFIDENCE
SastFinding.created_atCREATED_AT
SastFinding.location.end_columnEND_COLUMN
SastFinding.location.end_lineEND_LINE
SastFinding.external_ticket.external_slugEXTERNAL_TICKET_SLUG
SastFinding.external_ticket.idEXTERNAL_TICKET_ID
SastFinding.external_ticket.linked_issue_idsEXTERNAL_TICKET_LINKED_IDS
SastFinding.external_ticket.urlEXTERNAL_TICKET_URL
SastFinding.relevant_sinceFIRST_FOUND
SastFinding.first_seen_scan_idFIRST_SEEN_SCAN_ID
Generated (sync capture timestamp)LAST_CAPTURED
SastFinding.triaged_atLAST_FIXED
SastFinding.line_of_code_urlLINE_OF_CODE_URL
SastFinding.match_based_idMATCH_BASED_ID
SastFinding.locationPATH
SastFinding.statusPROVIDER_STATUS
SastFinding.repository.urlREPOSITORY_URL
SastFinding.review_comments[].external_discussion_idREVIEW_COMMENT_DISCUSSION_IDS
SastFinding.review_comments[].external_note_idREVIEW_COMMENT_NOTE_IDS
SastFinding.rule.messageRULE_MESSAGE
SastFinding.rule_nameRULE_NAME
SastFinding.refSOURCE_REF
SastFinding.statusSOURCE_STATUS
SastFinding.sourcing_policySOURCING_POLICY
SastFinding.location.columnSTART_COLUMN
SastFinding.location.lineSTART_LINE
SastFinding.stateSTATE
SastFinding.state_updated_atSTATE_UPDATED_AT
SastFinding.syntactic_idSYNTACTIC_ID
SastFinding.repository.nameTARGETS
SastFinding.triage_commentTRIAGED_COMMENT
SastFinding.triaged_atTRIAGED_AT
SastFinding.triage_reasonTRIAGE_REASON
SastFinding.triage_stateTRIAGE_STATE
SastFinding.rule.nameTYPE
SastFinding.idUID
Static Code Finding Definition

Table 6: Static Code Finding Definition attribute mappings

Source Field NameSDM Attribute
SastFinding.rule.categoryCATEGORIES
SastFinding.rule.cwe_namesCWE_IDS
SastFinding.rule.messageDESCRIPTION
Generated (sync capture timestamp)LAST_CAPTURED
SastFinding.rule.nameNAME
SastFinding.rule.owasp_namesOWASP_CATEGORIES
SastFinding.rule.messageRECOMMENDATION
SastFinding.rule.categoryRULE_CATEGORY
SastFinding.rule.confidenceRULE_CONFIDENCE
SastFinding.rule.subcategoriesRULE_SUBCATEGORIES
SastFinding.severitySEVERITY
SastFinding.severitySEVERITY_SCORE
SastFinding.severitySOURCE_SEVERITY
SastFinding.rule.subcategoriesTAGS
SastFinding.rule.nameUID
SastFinding.rule.vulnerability_classesVULNERABILITY_CLASSES
SastFinding.rule.cwe_namesWEAKNESSES

APIs

The Semgrep connector uses the Semgrep REST API (v1). Specifically, it uses the following endpoints:

Table 7: Semgrep API Endpoints

Connector ObjectAPI Endpoint
Code ProjectGET /api/v1/deployments/{slug}/projects
Open Source FindingGET /api/v1/deployments/{slug}/findings?issue_type=sca
Open Source Finding DefinitionGET /api/v1/deployments/{slug}/findings?issue_type=sca
Static Code FindingGET /api/v1/deployments/{slug}/findings?issue_type=sast
Static Code Finding DefinitionGET /api/v1/deployments/{slug}/findings?issue_type=sast

Changelog

The Semgrep connector has undergone the following changes:

Table 8: Semgrep connector changelog

VersionDescriptionDate Published
3.0.7Restored spaces in object type names for Static Code Finding, Static Code Finding Definition, Open Source Finding, and Open Source Finding Definition. The spaces were inadvertently removed in v3.0.5, which caused the platform to generate differently-cased table names and created duplicate models during synchronization. Migration required: purge the duplicate tables created by v3.0.5/v3.0.6 (the lowercased variants without spaces) and perform a re-sync to repopulate the original tables.May 12th, 2026
3.0.4- Moved REACHABILITY and found dependency attributes from the Open Source Finding Definition to the Open Source Finding object.
- Moved assistant autotriage and component attributes from the Static Code Finding Definition to the Static Code Finding object.
February 11th, 2026
3.0.3Added new attributes for SAST and SCA findings in Open Source Finding, Open Source Finding Definition, Static Code Finding, and Static Code Finding Definition objects, including but not limited to FIX_RECOMMENDATIONS, REACHABLE_CONDITION, and REACHABILITY.February 4th, 2026
3.0.2- The connector now retrieves the Open Source Finding and Open Source Finding Definition objects from Semgrep, adding support for ingesting SCA findings.
- Updated several mappings on the Static Code Finding and Static Code Finding Definition objects.
September 26th, 2025
3.0.1- Fixed data type mismatches.
- Code cleanup and general maintenance.
August 29th, 2025
3.0.0Initial Integration+ release.January 23rd, 2023