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

# Realizar el triaje masivo de hallazgos

> Previsualiza o aplica un cambio de estado basado en reglas a un máximo de 5.000 hallazgos SAST o SCA accesibles. Las acciones de riesgo aceptado que alcanzan el umbral de aprobación de la empresa devuelven 202 y permanecen pendientes hasta que otro administrador de la empresa las aprueba.



## OpenAPI

````yaml /es/api-reference/openapi.json patch /triage/findings
openapi: 3.0.0
info:
  title: API de Corgea
  version: 1.0.0
  description: >-
    API para interactuar con las funciones de escaneo y gestión de
    vulnerabilidades de Corgea
servers:
  - url: https://www.corgea.app/api/v1
    description: Servidor de producción
security:
  - CorgeaToken: []
  - BearerAuth: []
paths:
  /triage/findings:
    patch:
      tags:
        - Triaje
      summary: Realizar el triaje masivo de hallazgos
      description: >-
        Previsualiza o aplica un cambio de estado basado en reglas a un máximo
        de 5.000 hallazgos SAST o SCA accesibles. Las acciones de riesgo
        aceptado que alcanzan el umbral de aprobación de la empresa devuelven
        202 y permanecen pendientes hasta que otro administrador de la empresa
        las aprueba.
      operationId: EsBulkTriageFindings
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EsBulkTriageRequest'
      responses:
        '200':
          description: Acción previsualizada o aplicada
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EsTriageActionResponse'
        '202':
          description: Acción creada y pendiente de aprobación
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EsTriageActionResponse'
        '400':
          description: Solicitud no válida o coincidencia con más de 5.000 hallazgos
        '403':
          description: >-
            El token no tiene permiso para cambiar el estado de uno o más tipos
            de hallazgo seleccionados
components:
  schemas:
    EsBulkTriageRequest:
      type: object
      required:
        - target_status
        - justification
        - rule
      additionalProperties: false
      properties:
        target_status:
          type: string
          enum:
            - open
            - fixed
            - false_positive
            - accepted_risk
            - duplicate
            - fix_in_progress
          description: >-
            fix_in_progress solo está disponible cuando finding_types contiene
            únicamente sast.
        justification:
          type: string
          minLength: 1
        apply:
          type: boolean
          default: true
          description: >-
            Establécelo en false para crear una vista previa sin cambiar los
            hallazgos.
        expiry_date:
          type: string
          format: date-time
          nullable: true
          description: Fecha y hora de expiración futura, solo para acciones accepted_risk.
        rule:
          $ref: '#/components/schemas/EsBulkTriageRule'
    EsTriageActionResponse:
      type: object
      properties:
        status:
          type: string
          example: ok
        action:
          $ref: '#/components/schemas/EsTriageAction'
    EsBulkTriageRule:
      type: object
      additionalProperties: false
      description: >-
        Selecciona un ámbito con company_wide, project_ids o team_ids. Los
        filtros usan match para combinar los criterios aplicables; los filtros
        CWE se aplican a SAST y los filtros CVE y de alcanzabilidad a SCA.
      properties:
        company_wide:
          type: boolean
          default: false
        project_ids:
          type: array
          uniqueItems: true
          items:
            type: integer
        team_ids:
          type: array
          uniqueItems: true
          items:
            type: integer
        finding_types:
          type: array
          minItems: 1
          default:
            - sast
            - sca
          items:
            type: string
            enum:
              - sast
              - sca
        cwes:
          type: array
          items:
            type: string
            example: CWE-79
        cves:
          type: array
          items:
            type: string
            example: CVE-2026-1000
        path_patterns:
          type: array
          items:
            type: string
            example: tests/**
        severities:
          type: array
          items:
            type: string
            enum:
              - LO
              - ME
              - HI
              - CR
              - LOW
              - MEDIUM
              - HIGH
              - CRITICAL
        reachability:
          type: string
          nullable: true
          enum:
            - 'true'
            - 'false'
            - unsure
        match:
          type: string
          enum:
            - all
            - any
          default: all
    EsTriageAction:
      type: object
      properties:
        id:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - preview
            - pending_approval
            - applied
            - rejected
            - failed
        source:
          type: string
          enum:
            - api
            - cli
            - cxone
        target_status:
          type: string
        justification:
          type: string
        accepted_risk_expiry_date:
          type: string
          format: date-time
          nullable: true
        rule:
          type: object
        source_metadata:
          type: object
        requires_approval:
          type: boolean
        requested_by:
          type: integer
          nullable: true
        approved_by:
          type: integer
          nullable: true
        rejected_by:
          type: integer
          nullable: true
        created_at:
          type: string
          format: date-time
        reviewed_at:
          type: string
          format: date-time
          nullable: true
        applied_at:
          type: string
          format: date-time
          nullable: true
        counts:
          type: object
          properties:
            matched:
              type: integer
            unmatched:
              type: integer
            ambiguous:
              type: integer
            applied:
              type: integer
            conflicts:
              type: integer
  securitySchemes:
    CorgeaToken:
      type: apiKey
      in: header
      name: CORGEA-TOKEN
      description: Clave de API para la autenticación
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Token de acceso OAuth2 (JWT) en el encabezado Authorization

````