id: malwarebazaar
name: MalwareBazaar
version: 1.0.0
description: "MalwareBazaar by abuse.ch (API v1) — malware sample intelligence: look up a sample by hash, list recent samples, and query samples by tag or signature. Auth-Key authentication; stdlib-only, no extra Python dependencies."
changelog: "1.0.0 — Initial release: sample info by hash, recent samples, tag info, signature info."
category: enrichment

# Per-instance configuration. abuse.ch requires an Auth-Key header.
config_schema:
  properties:
    auth_key:
      type: string
      description: "abuse.ch Auth-Key"
      x-soar-sensitive: true
  required:
    - auth_key

commands:
  - id: get_info
    name: malwarebazaar-get-info
    description: "Look up a sample by hash (MD5, SHA-1, or SHA-256)."
    risk: read
    inputs_schema:
      properties:
        hash: { type: string, description: "Sample hash" }
      required: [hash]
    outputs_schema: { properties: {} }
  - id: get_recent
    name: malwarebazaar-get-recent
    description: "List recently submitted samples."
    risk: read
    inputs_schema:
      properties:
        selector: { type: string, description: "'time' (last hour) or '100' (last 100) — default 100" }
      required: []
    outputs_schema: { properties: {} }
  - id: get_taginfo
    name: malwarebazaar-get-taginfo
    description: "List samples tagged with a given tag."
    risk: read
    inputs_schema:
      properties:
        tag: { type: string, description: "Tag (e.g. Emotet)" }
        limit: { type: number, description: "Max samples (default 50)" }
      required: [tag]
    outputs_schema: { properties: {} }
  - id: get_siginfo
    name: malwarebazaar-get-siginfo
    description: "List samples for a given malware signature/family."
    risk: read
    inputs_schema:
      properties:
        signature: { type: string, description: "Signature/family (e.g. TrickBot)" }
        limit: { type: number, description: "Max samples (default 50)" }
      required: [signature]
    outputs_schema: { properties: {} }

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