Skip to content

Aikido Executor

Category: AI-Driven Security Testing Script: aikido.py Integration: REST API (OAuth2) Faraday Plugin: Raw JSON Website: https://aikido.dev/

Description

Imports open issues from Aikido Security into Faraday, with the affected file, line, package, CVEs and CWEs of each finding. Optionally it also imports Aikido's inventory of code repositories, cloud accounts and attack-surface domains (with their subdomains) as informational records.

Prerequisites

  • An Aikido account with access to the public REST API
  • An Aikido API client (client ID AIK_CLIENT_... and secret AIK_SECRET_...), created in Aikido under Settings > API Keys
  • Network access from the agent to the Aikido API (https://app.aikido.dev by default)
  • The Python requests package installed in the agent environment

Configuration

Environment Variables (Setup)

Variable Required Description
AIKIDO_CLIENT_ID Yes Aikido API client ID (starts with AIK_CLIENT_)
AIKIDO_CLIENT_SECRET Yes Aikido API client secret (starts with AIK_SECRET_)

These variables are also accepted as execution arguments, so a single run can override them.

Execution Arguments

Parameter Type Mandatory Description
AIKIDO_API_URL string No Aikido API base URL (default: https://app.aikido.dev)
AIKIDO_MODE string No Comma-separated list of what to import: issues, repositories, cloud, domains (default: issues)
AIKIDO_ISSUE_TYPE string No Import only one issue type, e.g. sast, iac, secret, open_source, cloud, container, mobile or dast (default: all types)
AIKIDO_PAGE_SIZE integer No Records per API page (default: 100)
AIKIDO_MAX_PAGES integer No Maximum number of pages read per endpoint (default: 50)
AIKIDO_SEVERITY_MIN string No Minimum issue severity to import: info, low, medium, high or critical (default: medium)

YAML Configuration Example

executors:
  aikido:
    repo_executor: aikido.py
    max_size: 65536
    varenvs:
      AIKIDO_CLIENT_ID: "AIK_CLIENT_<client_id>"
      AIKIDO_CLIENT_SECRET: "AIK_SECRET_<client_secret>"
    params:
      AIKIDO_API_URL:
        mandatory: false
        type: string
        base: string
      AIKIDO_MODE:
        mandatory: false
        type: string
        base: string
      AIKIDO_ISSUE_TYPE:
        mandatory: false
        type: string
        base: string
      AIKIDO_PAGE_SIZE:
        mandatory: false
        type: integer
        base: integer
      AIKIDO_MAX_PAGES:
        mandatory: false
        type: integer
        base: integer
      AIKIDO_SEVERITY_MIN:
        mandatory: false
        type: string
        base: string

How It Works

  1. Exchanges the client ID and secret for an access token at {AIKIDO_API_URL}/api/oauth/token (OAuth2 client credentials)
  2. For each mode in AIKIDO_MODE, reads the matching endpoint page by page:
    • issues: open issues from /api/public/v1/issues/export, filtered by AIKIDO_ISSUE_TYPE
    • repositories: monitored code repositories from /api/public/v1/repositories/code
    • cloud: connected cloud accounts from /api/public/v1/clouds
    • domains: attack-surface domains from /api/public/v1/domains and the subdomains of each one
  3. Maps each issue to a vulnerability named [AGENT] <rule> — <file:line | package@version | domain>:
    • Severity: Aikido's severity name, or its score (9+ critical, 7+ high, 4+ medium, above 0 low). Issues below AIKIDO_SEVERITY_MIN are skipped.
    • Description: file and lines, package and versions, attack surface, type, language, exploitability, SLA and first detection date
    • References: CVE, CWEs, Aikido rule and group IDs
  4. Maps each repository, cloud account, domain and subdomain to an info inventory vulnerability
  5. Groups the vulnerabilities by asset (see Notes) and removes duplicates

Notes

  • Aikido assets have no IP address. Each asset (code repository, container repository, cloud account, domain or VM) becomes its own host with IP 0.0.0.0 and the asset name as hostname. URL schemes are stripped from domain names.
  • Issues that are not tied to any asset are grouped under a host with IP agent:aikido:global and hostname agent-aikido.
  • Only open issues are imported.
  • On a 429 response the executor waits 30 seconds and retries, up to 3 times per page.
  • An invalid AIKIDO_MODE value stops the run. An unknown AIKIDO_SEVERITY_MIN value falls back to medium.
  • The shared agent parameters (AGENT_CONFIG_* tags and severity filters) are not applied by this executor. Use AIKIDO_SEVERITY_MIN to filter by severity.