id: greynoise
name: GreyNoise
version: 1.0.0
description: "GreyNoise (API v2/v3) — tell internet background-noise scanners from targeted activity: IP context and quick classification, RIOT common-business-service lookup, GNQL query and stats, and IP scan timeline. API-key authentication; stdlib-only, no extra Python dependencies."
changelog: "1.0.0 — Initial release: IP context, quick check, RIOT, GNQL query and stats, and IP timeline."
category: enrichment

config_schema:
  properties:
    api_key:
      type: string
      description: "GreyNoise API key"
      x-soar-sensitive: true
  required:
    - api_key

commands:
  - id: ip_context
    name: greynoise-ip-context
    description: "Full GreyNoise context for an IP (classification, actor, tags, metadata)."
    risk: read
    inputs_schema:
      properties:
        ip: { type: string, description: "IP address" }
      required: [ip]
    outputs_schema: { properties: {} }
  - id: ip_quick_check
    name: greynoise-ip-quick-check
    description: "Quick noise/RIOT classification for an IP (lightweight)."
    risk: read
    inputs_schema:
      properties:
        ip: { type: string, description: "IP address" }
      required: [ip]
    outputs_schema: { properties: {} }
  - id: riot
    name: greynoise-riot
    description: "RIOT lookup — is the IP a known common business service (e.g. Google DNS, Office365)?"
    risk: read
    inputs_schema:
      properties:
        ip: { type: string, description: "IP address" }
      required: [ip]
    outputs_schema: { properties: {} }
  - id: query
    name: greynoise-query
    description: "Run a GNQL (GreyNoise Query Language) query and return matching IPs."
    risk: read
    inputs_schema:
      properties:
        query: { type: string, description: "GNQL query string" }
        size: { type: number, description: "Maximum results (default 50)" }
        scroll: { type: string, description: "Scroll token for the next page" }
      required: [query]
    outputs_schema: { properties: {} }
  - id: stats
    name: greynoise-stats
    description: "Aggregate statistics for a GNQL query (counts by classification, org, tag, …)."
    risk: read
    inputs_schema:
      properties:
        query: { type: string, description: "GNQL query string" }
        count: { type: number, description: "Number of top aggregations to return" }
      required: [query]
    outputs_schema: { properties: {} }
  - id: timeline
    name: greynoise-timeline
    description: "Daily scan-activity timeline for an IP."
    risk: read
    inputs_schema:
      properties:
        ip: { type: string, description: "IP address" }
        days: { type: number, description: "Number of days of history (default 30)" }
      required: [ip]
    outputs_schema: { properties: {} }

  - id: test_connection
    name: greynoise-test-connection
    description: "Verify the API key (used by the Test button)."
    risk: read
    inputs_schema:
      properties: {}
      required: []
    outputs_schema: { properties: {} }
