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

# SCAの検出一覧を取得

> ソフトウェア構成分析（SCA）の検出一覧を取得します スキャンIDを指定しない場合、条件に一致する処理済みスキャンのうち、PRに属さずプロジェクト全体を対象とする最新スキャンを優先します。該当しなければ、条件に一致する最新スキャンを使用します。/detectionsまたは/detections/code-qualityでscan_typeを明示すると、その種類の最新スキャンを選択します。

以前の名前である`/api/v1/issues/sca`でも引き続き利用でき、パラメーターとレスポンスは同じです。



## OpenAPI

````yaml /ja/api-reference/openapi.json get /detections/sca
openapi: 3.0.0
info:
  title: Corgea API
  version: 1.0.0
  description: Corgeaのスキャン機能および脆弱性管理機能を操作するためのAPI
servers:
  - url: https://www.corgea.app/api/v1
    description: 本番サーバー
  - url: https://eu.corgea.app/api/v1
    description: EU本番サーバー
security:
  - CorgeaToken: []
  - BearerAuth: []
paths:
  /detections/sca:
    get:
      tags:
        - 検出
        - SCA
      summary: SCAの検出一覧を取得
      description: >-
        ソフトウェア構成分析（SCA）の検出一覧を取得します
        スキャンIDを指定しない場合、条件に一致する処理済みスキャンのうち、PRに属さずプロジェクト全体を対象とする最新スキャンを優先します。該当しなければ、条件に一致する最新スキャンを使用します。/detectionsまたは/detections/code-qualityでscan_typeを明示すると、その種類の最新スキャンを選択します。


        以前の名前である`/api/v1/issues/sca`でも引き続き利用でき、パラメーターとレスポンスは同じです。
      operationId: listScaIssues
      parameters:
        - name: project
          in: query
          required: false
          schema:
            type: string
          description: プロジェクト名でSCA問題を絞り込みます
        - name: repo
          in: query
          required: false
          schema:
            type: string
          description: リポジトリURLでSCA問題を絞り込みます
        - name: branch
          in: query
          required: false
          schema:
            type: string
          description: ブランチ名でSCA問題を絞り込みます
        - name: page
          in: query
          required: false
          schema:
            type: integer
            default: 1
          description: ページネーションのページ番号
        - name: page_size
          in: query
          required: false
          schema:
            type: integer
            default: 20
            maximum: 50
          description: 1ページあたりの結果件数
        - name: severity
          in: query
          required: false
          schema:
            type: string
          description: '重大度で絞り込みます（カンマ区切り）。有効な値: CRITICAL、HIGH、MEDIUM、LOW'
          example: CRITICAL,HIGH
        - name: package
          in: query
          required: false
          schema:
            type: string
          description: パッケージ名で絞り込みます（部分一致）
          example: lodash
        - name: ecosystem
          in: query
          required: false
          schema:
            type: string
          description: パッケージエコシステムで絞り込みます（大文字と小文字を区別しません）
          example: npm
        - name: cve
          in: query
          required: false
          schema:
            type: string
          description: CVE識別子で絞り込みます（部分一致）
          example: CVE-2021
        - name: path
          in: query
          required: false
          schema:
            type: string
          description: ファイルパスで絞り込みます（部分一致）
          example: package.json
        - name: has_fix
          in: query
          required: false
          schema:
            type: boolean
          description: 修正の有無で絞り込みます（true/false）
          example: true
        - name: reachability
          in: query
          required: false
          schema:
            type: string
            enum:
              - not_direct_dependency
              - pending
              - vulnerable_usage_reachable
              - vulnerable_usage_unreachable
              - dead_dependency
          description: 依存関係の到達可能性ステータスでSCA問題を絞り込みます
          example: vulnerable_usage_reachable
        - name: include_reachability
          in: query
          required: false
          schema:
            type: boolean
            default: false
          description: 各SCA問題に依存関係の到達可能性ステータスと説明を含めます。
        - name: sort_by
          in: query
          required: false
          schema:
            type: string
            enum:
              - created_at
              - '-created_at'
              - severity
              - '-severity'
              - package
              - '-package'
              - ecosystem
              - '-ecosystem'
          description: フィールドで結果を並べ替えます（降順の場合は先頭に「-」を付けます）
          example: '-severity'
        - name: status
          in: query
          required: false
          schema:
            type: string
          description: >-
            トリアージのステータスで絞り込みます（カンマ区切り）。有効な値:
            open、fixed、false_positive、accepted_risk、duplicate
          example: open
        - name: package_exact
          in: query
          required: false
          schema:
            type: string
          description: >-
            パッケージ名の完全一致で絞り込みます。packageとは異なり、値を含むだけのパッケージには一致しません（lodashはlodash.mergeに一致しません）。そのため、パッケージグループの詳細を確認する場合に使用できます。
          example: lodash
        - name: search
          in: query
          required: false
          schema:
            type: string
          description: パッケージ名、CVE識別子、概要、詳細、パス、分類を対象にフリーテキストで検索します
          example: lodash
      responses:
        '200':
          description: SCA問題を正常に取得したか、プロジェクトが見つかりません
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      status:
                        type: string
                        example: ok
                      page:
                        type: integer
                      total_pages:
                        type: integer
                      total_issues:
                        type: integer
                      issues:
                        type: array
                        items:
                          $ref: '#/components/schemas/SCAIssue'
                  - type: object
                    properties:
                      status:
                        type: string
                        example: no_project_found
        '403':
          description: 権限がありません
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Permission denied
components:
  schemas:
    SCAIssue:
      type: object
      properties:
        finding_id:
          type: string
          format: uuid
          nullable: true
          description: >-
            この問題が検出として属するファインディングのID。再スキャンを経ても変わりません。ファインディングが導入される前に取り込まれた問題ではnullです。
        id:
          type: string
          format: uuid
        created_at:
          type: string
          format: date-time
        description:
          type: string
        details:
          type: string
        severity:
          type: string
          nullable: true
          enum:
            - CRITICAL
            - HIGH
            - MEDIUM
            - LOW
          description: 依存関係スキャナーが報告した重大度で、通常は大文字です。値は大文字と小文字を区別せずに比較してください。
        cvss_score:
          type: number
          nullable: true
        classification:
          type: string
          nullable: true
          description: malicious などの脅威の分類で、重大度とは別の値です。問題に分類がない場合はnullです。
        cve:
          type: string
          description: 利用可能な場合はCVE識別子
        package:
          type: object
          properties:
            name:
              type: string
            version:
              type: string
            ecosystem:
              type: string
            fix_version:
              type: string
              description: 脆弱性を修正するバージョン
        location:
          type: object
          properties:
            path:
              type: string
              description: 脆弱なパッケージを含むファイルのパス
        reachability:
          $ref: '#/components/schemas/SCAReachability'
    SCAReachability:
      type: object
      properties:
        status:
          type: string
          enum:
            - not_direct_dependency
            - pending
            - vulnerable_usage_reachable
            - vulnerable_usage_unreachable
            - dead_dependency
            - not_applicable
          description: 到達可能性の状態です。not_applicableは、コンテナの問題を個別に取得した場合にのみ返されます。
        description:
          type: string
  securitySchemes:
    CorgeaToken:
      type: apiKey
      in: header
      name: CORGEA-TOKEN
      description: 認証用のAPIキー 無効なユーザーのAPIトークンは拒否されます。
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Authorizationヘッダーで使用するOAuth2アクセストークン（JWT）

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.