Skip to main content
POST
Get a URL to upload a code archive (.zip, .7z or .tar.gz) to, then pentest it as a repo with source upload
Returns a signed URL for uploading a .zip, .7z or .tar.gz source archive.
Scope required: write. Role: member or above.
  1. Call this endpoint with the archive’s file_name.
  2. PUT the file to upload_url, with the Content-Type header set to the returned content_type.
  3. Add { "source": "upload", "archive_id": "<id>" } to repos when you create a pentest draft.
To assess part of the archive, set include_paths or exclude_paths on its entry in repos. You can use the same uploaded archive.
Some self-hosted deployments return 400 because they don’t support API uploads. In that case, upload the archive through the Hacktron web app.

Authorizations

X-Api-Key
string
header
required

Body

application/json
file_name
string
required

Original filename (e.g. "my-project.zip")

Example:

"my-project.zip"

name
string

Display name (defaults to filename)

Response

201 - application/json
id
string
required

Archive ID

upload_url
string
required

Signed GCS upload URL (PUT)

content_type
string
required

Content-Type to use in the PUT request

Example:

"application/zip"