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

# Get a scan's attack paths

> One attack path per file an Analyze agent tested: its result, the files it opened, and a summary once it finishes. The summary's `steps` and `verdict` are inline markdown; its other fields are plain text. Live while the scan runs; empty for scans that never reported coverage.



## OpenAPI

````yaml /api-reference/openapi.json get /scans/{id}/attack-paths
openapi: 3.1.0
info:
  title: Gecko Security API
  version: 1.5.0
  description: >-
    Programmatic access to scans, vulnerabilities, repositories, schedules,
    integrations, and scanner image releases. Authenticate with an API key via
    the `X-API-Key` header or `Authorization: Bearer <key>`.
servers:
  - url: https://app.gecko.security/api/v1
security:
  - ApiKeyHeader: []
  - BearerAuth: []
paths:
  /scans/{id}/attack-paths:
    get:
      summary: Get a scan's attack paths
      description: >-
        One attack path per file an Analyze agent tested: its result, the files
        it opened, and a summary once it finishes. The summary's `steps` and
        `verdict` are inline markdown; its other fields are plain text. Live
        while the scan runs; empty for scans that never reported coverage.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Attack paths
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScanAttackPaths'
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Authorization error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ScanAttackPaths:
      $schema: https://json-schema.org/draft/2020-12/schema
      type: object
      properties:
        object:
          type: string
          const: scan_attack_paths
        scan_id:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        updated_at:
          type:
            - string
            - 'null'
        files_total:
          type: integer
          minimum: 0
          maximum: 9007199254740991
        counts:
          type: object
          propertyNames:
            type: string
            enum:
              - testing
              - vulnerable
              - clean
              - inconclusive
              - failed
          additionalProperties:
            type: integer
            minimum: 0
            maximum: 9007199254740991
          required:
            - testing
            - vulnerable
            - clean
            - inconclusive
            - failed
        attack_paths:
          type: array
          items:
            type: object
            properties:
              file:
                type: string
              state:
                type: string
                enum:
                  - testing
                  - vulnerable
                  - clean
                  - inconclusive
                  - failed
              summary:
                anyOf:
                  - type: object
                    properties:
                      title:
                        type: string
                        maxLength: 160
                      entry_point:
                        type: string
                        maxLength: 200
                      target:
                        type: string
                        maxLength: 200
                      steps:
                        maxItems: 5
                        type: array
                        items:
                          type: string
                          maxLength: 200
                      verdict:
                        type: string
                        maxLength: 400
                    required:
                      - title
                      - entry_point
                      - target
                      - steps
                      - verdict
                    additionalProperties: false
                  - type: 'null'
              files_opened:
                type: array
                items:
                  type: string
              tool_calls:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              findings:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              started_at:
                type: string
              ended_at:
                type:
                  - string
                  - 'null'
            required:
              - file
              - state
              - summary
              - files_opened
              - tool_calls
              - findings
              - started_at
              - ended_at
            additionalProperties: false
      required:
        - object
        - scan_id
        - updated_at
        - files_total
        - counts
        - attack_paths
      additionalProperties: false
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
            code:
              type: string
            message:
              type: string
            param:
              type: string
            doc_url:
              type: string
            request_id:
              type: string
          required:
            - type
            - code
            - message
            - doc_url
            - request_id
      required:
        - error
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
    BearerAuth:
      type: http
      scheme: bearer

````

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