Skip to main content
POST
/
integrations
/
github-container-registry
/
organization
/
{organizationId}
/
pat
Store a Personal Access Token (PAT) for ghcr.io
curl --request POST \
  --url https://api-eu.cybedefend.com/integrations/github-container-registry/organization/{organizationId}/pat \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "pat": "ghp"
}'
{
  "success": true,
  "message": "PAT stored and validated successfully",
  "status": {
    "valid": true,
    "scopes": [
      "read:packages",
      "repo"
    ],
    "hasPackagesReadScope": true,
    "githubUsername": "my-github-user",
    "expiresAt": "2025-12-31T23:59:59Z",
    "validatedAt": "2025-01-16T12:00:00Z",
    "errorMessage": "Token expired"
  }
}

Authorizations

x-api-key
string
header
required

API Key for authentication. You can generate an API key from your personal settings.

Path Parameters

organizationId
string<uuid>
required

CybeDefend organization ID

Example:

"550e8400-e29b-41d4-a716-446655440000"

Body

application/json

PAT to store

pat
string
required

Personal Access Token with read:packages scope. Required for scanning private/internal packages.

Example:

"ghp"

Response

PAT stored and validated successfully

success
boolean
required

Whether the PAT was stored successfully

Example:

true

message
string
required

Message describing the result

Example:

"PAT stored and validated successfully"

status
object

Validation result (if validation was performed)