Skip to main content

Integrate GeekWala into Your Workflow

Integrate GeekWala into your CI/CD pipeline with our REST API

API Playground

Test API endpoints directly in your browser. Enter your API token for live requests, or try with mock data to explore the API responses.

API Playground

Get all projects for the authenticated user

GET
/api/v1/projects

Required ability: project:read

No token provided - will show sample response data

curl -X GET "https://www.geekwala.com/api/v1/projects" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"

Authentication

Secure API access with token-based authentication.

API Access Requirements

  • • Pro & Trial: Full API access
  • • Free: Read-only tokens (project:read, scan:read)
  • • API tokens require authenticated Bearer tokens with abilities

Creating API Tokens

1. Navigate to Automation → API Tokens

2. Click "Create New Token"

3. Provide a descriptive name (e.g., "GitHub Actions", "Jenkins Pipeline")

4. Select token abilities (permissions):

project:read

List and view projects

project:write

Create, update, delete projects

scan:read

View scan results

scan:write

Trigger new scans

5. Set expiration: 30 days, 90 days, 1 year, or no expiry

6. Click Create and copy the token immediately (shown only once)

Using API Tokens

Include the token in the Authorization header of all API requests:

curl -H "Authorization: Bearer YOUR_API_TOKEN" \
  https://www.geekwala.com/api/v1/projects

Security Best Practices

  • • Store tokens as environment variables or CI/CD secrets (never commit to version control)
  • • Use minimal abilities required for each integration
  • • Set expiration dates for tokens used in temporary workflows
  • • Rotate tokens periodically (every 90 days recommended)

API Endpoints

Complete REST API reference for projects and scans.

Base URL

https://www.geekwala.com/api/v1

Pagination

List endpoints support pagination with query parameters:

Offset Pagination (scan lists)

  • • page - Page number (default: 1)
  • • per_page - Items per page (default: 50, max: 100)
GET /api/v1/projects/{project}/scans?page=2&per_page=50

Cursor Pagination (scan results)

Scan results use cursor-based pagination for efficient large result sets. Use the cursor value from the links.next URL to fetch subsequent pages.

  • • per_page - Items per page (default: 100, max: 500)
  • • cursor - Pagination cursor from previous response
GET /api/v1/scans/{id}/results?per_page=100&cursor=eyJpZCI6MTAwfQ

Project Endpoints

MethodEndpoint
GET/projectsList all projectsproject:read
GET/projects/{project}Get a specific projectproject:read
POST/projectsCreate a projectproject:write
PUT/projects/{project}Update a projectproject:write
DELETE/projects/{project}Delete a projectproject:write
POST/projects/{project}/dependenciesAdd packages to projectproject:write

Scan Endpoints

MethodEndpoint
GET/projects/{project}/scansList scans for a projectscan:read
GET/scans/{id}Get a specific scanscan:read
GET/scans/{id}/resultsGet scan resultsscan:read
POST/vulnerability-scan/runRun a vulnerability scanscan:write
POST/projects/{project}/scansTrigger a new scanscan:write

Vulnerability Endpoints

MethodEndpoint
GET/vulnerabilities/{vulnerabilityId}Get full vulnerability details (EPSS, KEV, references)scan:read
GET/vulnerabilities/{vulnerabilityId}/headerGet lightweight header (summary + aliases)scan:read
POST/vulnerabilities/headersBatch fetch headers for multiple vulnerabilitiesscan:read

Rate Limits

API throttling policies for fair usage.

Pro & Trial

Read: 240 req/min

Write: 30 req/min

Free

Read: 120 req/min

Write: 15 req/min

Rate Limit Headers

X-RateLimit-Limit: 120
X-RateLimit-Remaining: 115
X-RateLimit-Reset: 1609459200

Handling 429 Responses

When you exceed the rate limit, the API returns HTTP 429 with a Retry-After header.

async function apiCallWithRetry(url, options, maxRetries = 3) {
  for (let i = 0; i < maxRetries; i++) {
    const response = await fetch(url, options);
    if (response.status !== 429) return response;

    const retryAfter = response.headers.get('Retry-After');
    await new Promise(resolve =>
      setTimeout(resolve, (retryAfter || (i + 1)) * 1000)
    );
  }
  throw new Error('Max retries exceeded');
}

CI/CD Integration

Gate PRs and pushes on dependency vulnerabilities in any CI pipeline. Use our official GitHub Action for the best experience, or call the REST API directly on GitLab CI, Jenkins, or any other platform.

GitHub Actions (Recommended)

The official Geekwala/security-scan-action scans your dependencies for vulnerabilities enriched with EPSS and CISA KEV data. It auto-detects your manifest or lockfile from the repo root, so the only input it requires is an API token.

name: Security Scan
on: [push, pull_request]

jobs:
  scan:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      security-events: write # required for upload-sarif

    steps:
      - uses: actions/checkout@v4

      - name: GeekWala Security Scan
        uses: Geekwala/security-scan-action@v1
        id: scan
        with:
          api-token: ${{ secrets.GEEKWALA_TOKEN }}
          severity-threshold: high
          sarif-file: geekwala.sarif

      - name: Upload SARIF to GitHub
        uses: github/codeql-action/upload-sarif@v3
        if: always()
        with:
          sarif_file: ${{ steps.scan.outputs.sarif-file }}

severity-threshold gates the step itself (none|low|medium|high|critical); omit it and CRITICAL findings still fail the step (the legacy fail-on-critical input defaults to true); set none to skip the severity gate and rely on the Security tab / PR annotations instead. fail-on-kev and epss-threshold gate on exploitation signals instead of raw severity. if: always() on the upload step lets the report reach the Security tab even when the scan step fails the job.

Action Inputs & Outputs

InputRequiredDescription
api-tokenyesAPI token with the scan:write ability — always source from a secret, never hardcode.
file-pathnoDependency file to scan. Auto-detected from the repo root when omitted; set explicitly for monorepos.
severity-thresholdnoMinimum severity that fails the run (none|low|medium|high|critical). Unset falls back to the legacy fail-on-critical input (default true), so CRITICAL findings still fail the run; none is report-only.
fail-on-kevnoFail if any finding is in the CISA KEV catalog. Defaults to false.
epss-thresholdnoFail if any finding's EPSS score is at or above this value (0.0-1.0).
sarif-filenoPath to write a SARIF report to, for GitHub Code Scanning.

Outputs include scan-status (PASS|FAIL|ERROR), has-vulnerabilities, per-severity counts such as critical-count and high-count, and sarif-file (path to the generated SARIF report, for upload-sarif).

Monorepo Support

The action auto-detects a dependency file at the repo root. In a monorepo that is usually the wrong one, so point file-path at the lockfile you actually want scanned:

- uses: Geekwala/security-scan-action@v1
  with:
    api-token: ${{ secrets.GEEKWALA_TOKEN }}
    file-path: packages/api/package-lock.json

Add one step per package to scan several workspaces in the same job.

Supported Dependency Files

The action parses these client-side today:

npm: package.json, package-lock.json
Python: requirements.txt (exact == pins)
PHP: composer.json, composer.lock
Go: go.mod
Rust: Cargo.toml
Ruby: Gemfile.lock
.NET: packages.lock.json, *.csproj

GeekWala also recognizes yarn.lock, pnpm-lock.yaml, Pipfile.lock, poetry.lock, pom.xml, go.sum, and Cargo.lock, but the action doesn't parse them client-side yet — upload those via the GeekWala dashboard in the meantime.

GitLab CI

No native GitLab template or CLI package is published yet — call the REST API directly from your .gitlab-ci.yml script. Set GEEKWALA_TOKEN and GEEKWALA_PROJECT_ID in CI/CD Variables (masked). This works today even where GitLab's own native dependency scanning is gated behind the Ultimate tier.

vulnerability_scan:
  stage: test
  script:
    - |
      curl -sf -X POST "https://www.geekwala.com/api/v1/projects/$GEEKWALA_PROJECT_ID/scans" \
        -H "Authorization: Bearer $GEEKWALA_TOKEN" \
        -H "Content-Type: application/json"
  # See the API Endpoints reference above for polling GET /scans/{id}/results and building your
  # own severity gate from the response; allow_failure: true works for non-blocking scans.

Jenkins Pipeline

Add the token as a Jenkins credential (e.g. geekwala-token) and call the REST API via a sh step — no CLI package is published yet, so curl is all you need.

pipeline {
  agent any
  environment {
    GEEKWALA_TOKEN = credentials('geekwala-token')
    GEEKWALA_PROJECT_ID = '123'
  }
  stages {
    stage('Vulnerability Scan') {
      steps {
        sh '''
          curl -sf -X POST "https://www.geekwala.com/api/v1/projects/$GEEKWALA_PROJECT_ID/scans" \
            -H "Authorization: Bearer $GEEKWALA_TOKEN" \
            -H "Content-Type: application/json"
        '''
      }
    }
  }
}

See the API Endpoints reference above for polling GET /scans/{id}/results and failing the stage on a severity threshold from the response — curl -f only fails the step on an HTTP error, not on findings.

Best Practices

  • • GitHub? Use the official Geekwala/security-scan-action for the best experience
  • • Other CI? Call the REST API directly — no geekwala CLI package is published yet
  • • Store API tokens as CI secrets/masked variables (never commit to version control)
  • • Use a dedicated token with only scan:write + project:write abilities
  • • Start with severity-threshold: none to assess baseline, then enforce a threshold once the backlog is triaged
  • • Upload the SARIF output with if: always() so findings still reach the Security tab on a failing run

MCP Server for AI Coding Assistants

The same API tokens also authenticate GeekWala's hosted Model Context Protocol (MCP) server, so Claude Code, Cursor, and VS Code can check a package version, scan a manifest, or look up a CVE while they work. The server is read-only and needs a token with the scan:read ability.

Endpoint, copy-paste setup for each client, and the per-minute and daily limits for each plan are on the MCP server setup page.