id: censys
name: Censys
version: 1.0.0
description: "Censys Search (API v2) — host (IP) details from internet-wide scanning: open services/ports, software, certificates and location, plus a Censys Search Language host query. API ID + secret (Basic) authentication; stdlib-only, no extra Python dependencies."
changelog: "1.0.0 — Initial release: host lookup by IP and host search."
category: enrichment

config_schema:
  properties:
    api_id:
      type: string
      description: "Censys API ID"
    api_secret:
      type: string
      description: "Censys API secret"
      x-soar-sensitive: true
  required:
    - api_id
    - api_secret

commands:
  - id: host
    name: censys-host
    description: "Get the current view of a host by IP (services, ports, software, certificates, location)."
    risk: read
    inputs_schema:
      properties:
        ip: { type: string, description: "IP address" }
      required: [ip]
    outputs_schema: { properties: {} }
  - id: host_search
    name: censys-host-search
    description: "Search hosts with a Censys Search Language query (e.g. services.service_name: HTTP and location.country: France)."
    risk: read
    inputs_schema:
      properties:
        query: { type: string, description: "Censys Search Language query" }
        per_page: { type: number, description: "Results per page (default 50, max 100)" }
        cursor: { type: string, description: "Pagination cursor for the next page" }
      required: [query]
    outputs_schema: { properties: {} }

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