REST API - Pentests

Change a pentest that has not started. Changing its repositories clears the estimate.

Changed on
patch/pentests/{id}

Request

  • Base URL
    https://api.hacktron.ai/v1
  • URL
    https://api.hacktron.ai/v1/pentests/{id}
  • Auth
    API key in header X-Api-Key

Path parameters

idstring required

Request body

target_urlsstring[]

Target URLs (pentest only)

custom_contextstring

Custom context (pentest only)

application_idstring

iva application this scan targets (group of repos)

Example request

{
  "repos": [
    {
      "include_paths": [
        "services/gateway/**"
      ],
      "exclude_paths": [
        "**/tests/**",
        "vendor/",
        "*.md"
      ],
      "url": "https://github.com/owner/repo"
    }
  ]
}

Response

scan_idstring uuid required

Stable pentest id; task_id changes when it starts

status'pending' | 'running' | 'completed' | 'failed' | 'stopped' | 'cancelled' | 'skipped' | 'pending_verification' | 'pending_triage' | 'draft' | 'estimating' | 'estimated' required
target_urlsstring[] required
custom_contextstring nullable required
application_idstring uuid nullable required
cost_estimation_idstring uuid nullable required
triage_enabledboolean nullable required
credits_usednumber nullable required

Example response

{
  "repos": [
    {
      "include_paths": [
        "services/gateway/**"
      ],
      "exclude_paths": [
        "**/tests/**",
        "vendor/",
        "*.md"
      ],
      "url": "https://github.com/owner/repo"
    }
  ]
}

Changes