> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scanoss.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get potential security issues associated with a single component
This is the current method that accepts ComponentRequest for enhanced component identification
Replaces the deprecated GetIssues method for single component queries



## OpenAPI

````yaml /api-reference/semgrep-openapi.json get /v2/semgrep/issues/component
openapi: 3.0.0
info:
  title: SCANOSS Semgrep Service
  version: '2.0'
  contact:
    name: scanoss-semgrep
    url: https://github.com/scanoss/semgrep
    email: support@scanoss.com
servers: []
security: []
tags:
  - name: Semgrep
paths:
  /v2/semgrep/issues/component:
    get:
      tags:
        - Semgrep
      summary: >-
        Get potential security issues associated with a single component

        This is the current method that accepts ComponentRequest for enhanced
        component identification

        Replaces the deprecated GetIssues method for single component queries
      operationId: Semgrep_GetComponentIssues
      parameters:
        - name: purl
          description: Package URL identifying the component to analyze.
          in: query
          required: true
          schema:
            type: string
        - name: requirement
          description: >-
            Version constraint for component resolution when PURL lacks explicit
            version.
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2ComponentIssueResponse'
        '404':
          description: Returned when the resource does not exist.
          content:
            application/json:
              schema:
                type: string
                format: string
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
components:
  schemas:
    v2ComponentIssueResponse:
      type: object
      example:
        component:
          purl: pkg:maven/org.apache.commons/commons-lang3
          version: 3.12.0
          requirement: 3.12.0
          files:
            - fileMD5: a1b2c3d4e5f6
              path: src/main/java/org/apache/commons/lang3/StringUtils.java
              issues:
                - ruleID: java.lang.security.audit.sql-injection.sql-injection
                  from: '284'
                  to: '286'
                  severity: ERROR
        status:
          status: SUCCESS
          message: Security analysis completed successfully
      properties:
        component:
          $ref: '#/components/schemas/v2ComponentIssueInfo'
        status:
          $ref: '#/components/schemas/v2StatusResponse'
      description: >-
        *

        Component issue response data (JSON payload)

        Contains security issues detected by Semgrep analysis for a single
        component.

        This is the current response format that replaces the deprecated
        SemgrepResponse.
    rpcStatus:
      type: object
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/protobufAny'
    v2ComponentIssueInfo:
      type: object
      properties:
        purl:
          type: string
          title: The Package URL string identifying the component
        version:
          type: string
          title: Version of the component being analyzed
        requirement:
          type: string
          title: Version requirement specification (e.g., ">=1.0.0", "~2.1.0")
        files:
          type: array
          items:
            $ref: '#/components/schemas/v2File'
          title: List of files containing security issues in this component
      title: Information about a component and its security issues
    v2StatusResponse:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/v2StatusCode'
        message:
          type: string
          title: Status message
        db:
          $ref: '#/components/schemas/StatusResponseDB'
        server:
          $ref: '#/components/schemas/StatusResponseServer'
      description: Detailed response details.
    protobufAny:
      type: object
      properties:
        '@type':
          type: string
      additionalProperties: {}
    v2File:
      type: object
      properties:
        fileMD5:
          type: string
          title: MD5 hash of the file content for integrity verification
        path:
          type: string
          title: Relative path of the file within the component
        issues:
          type: array
          items:
            $ref: '#/components/schemas/v2Issue'
          title: List of security issues found in this file
      title: File containing security issues detected by Semgrep
    v2StatusCode:
      type: string
      enum:
        - UNSPECIFIED
        - SUCCESS
        - SUCCEEDED_WITH_WARNINGS
        - WARNING
        - FAILED
      default: UNSPECIFIED
      description: Status code Enum.
    StatusResponseDB:
      type: object
      properties:
        schema_version:
          type: string
          title: Semantic schema version (e.g., 'v1.0.0')
        created_at:
          type: string
          title: When this DB was built (ISO 8601 format)
      description: Database version information.
    StatusResponseServer:
      type: object
      properties:
        version:
          type: string
          title: Semantic version (e.g., 'v1.0.0')
      description: Server information.
    v2Issue:
      type: object
      properties:
        ruleID:
          type: string
          title: Unique identifier for the Semgrep rule that detected this issue
        from:
          type: string
          title: Starting line number where the issue was detected
        to:
          type: string
          title: Ending line number where the issue was detected
        severity:
          type: string
          title: >-
            Severity level of the security issue (e.g., "ERROR", "WARNING",
            "INFO")
      title: Security issue information detected by Semgrep analysis

````