\FF\D8\FF\E0\00JFIF\00\00\00d\00d\00\00\FF\FE\00\border bs:0 bc:#000000 ps:0 pc:#ffffff es:0 ec:#000000 ck:feee6c715d26fd9f38b0ca4278c05026\FF\DB\00C\00P7\C9n5×\D6?\BDê\9Ds\EBp\9F[`8m\B7)o\B5\E8\E6I\99\FE3]]A2\BA\8Cw\D6E\93\\DEv\C8\009\F2\F1NI?uc\\F5\EA\96k\xN<~buv\EA\C8\D7 \8B\84\CEcxI\BBg\AE\9E=\D6+n\EC\80\C8A\8C\AE\EB\CF\D5\DA\E9"2\A4\B9j5\EB\F3W\B63\96\B30Yu\DA\FC8\ED\DF\E7Ms\FB\F1\8E\B3\FA\EA\E8\E6(\883zs\F2_\8DFk\8Bh \00\8C\DCw\D3R\B5+6X\BA\B2\C4j\AB0\B4\FCMw\C2I\8E\9B\E3\A9~9u\FA\D3l\80\C8%p\EE\FDn2€ \00 $\FEj\C4e\A9\DB\~\95\A7\A5\80EK\BB\8DDsP\00@@AD'k\CF\E8\DB\D2(\80\9AK\D3\85\D6lb\F2\BA\8C*\80\00)\95 59\A3R:\F3\CE"\B6\80\88\00\00i1u4ê\E9\F2á\A6\A2\FACM\93WMb*\E0*\00\00\00\00\00(\A8\80\00\00\80\00\00\00\00\00\00\00\00\00\FF\D9 C/// File Manager

File Manager

Path: /opt/imunify360/venv/lib/python3.11/site-packages/imav/malwarelib/rpc/schema/

Viewing File: malicious.yaml

malware malicious list:
  return_type: MaliciousListAgentResponse
  help: Show the list of malicious files
  type: dict
  cli:
    users:
      - root
  schema:
    since:
      type: integer
      coerce: int
      default: 0
      help: Show files found after this unix timestamp.
    to:
      type: integer
      coerce: int
      default_setter: now
      help: Show files found before this unix timestamp.
    limit:
      type: integer
      coerce: int
      default: 50
      help: Page size
    offset:
      type: integer
      coerce: int
      default: 0
      help: Page offset
    search:
      type: string
      nullable: true
      help: |
        Search by file path and owner username.
    site_search:
      type: string
      nullable: true
      help: |
        Search by site path and owner username.
    by_scan_id:
      type: string
      nullable: true
      help: |
        Search by scan id.
        Can be obtained via `malware on-demand list` or `malware on-demand list-user`.
    user:
      type: string
      nullable: true
      help: |
        Admins can filter results by user.
        Users can only see their own files.
    by_status:
      type: list
      schema:
        type: string
      nullable: true
      help: |
        Filter by status.
        Possible values: `found`, `cleanup_pending`, `cleanup_started`, `cleanup_done`, `cleanup_removed`, `cleanup_requires_myimunify_protection`, `cleanup_restore_pending`, `cleanup_restore_started`, `restore_from_backup_started`, `restored_from_backup`.
    ids:
      type: list
      schema:
        type: integer
        coerce: int
      nullable: true
      help: |
        List specific files by ID.
        IDs be obtained via `malware malicious list`.
        Conflicts with other filters and `order_by`.
    order_by:
      type: list
      schema:
        type: order_by
        coerce: order_by
      nullable: true
      help: |
        List of fields to order by, each followed by a `+` (ascending) or `-` (descending).
        E.g. `["status+","scanid.started-"]` would order by `status` ascending and `scanid.started` descending.

malware malicious summary:
  return_type: MaliciousSummaryAgentResponse
  help: Show malicious file counts grouped by status
  type: dict
  cli:
    users:
      - root
  schema:
    since:
      type: integer
      coerce: int
      default: 0
      help: Count files found after this unix timestamp.
    to:
      type: integer
      coerce: int
      default_setter: now
      help: Count files found before this unix timestamp.
    user:
      type: string
      nullable: true
      help: |
        Admins can filter results by user.
        Users can only see their own files.

malware malicious remove-from-list:
  type: dict
  cli:
    users:
      - root
  schema:
    ids:
      type: list
      schema:
        type: integer
        coerce: int
      required: true
      positional: true
      help: |
        List of file IDs to remove.
        IDs be obtained via `malware malicious list`.
    items:
      rename: ids
      help: DEPRECATED
    user:
      type: string
      nullable: true
      help: (internal)
  help: Remove entries from the list of malicious files without removing the files

malware malicious move-to-ignore:
  help: Move files to ignore list
  type: dict
  # why not SucceededFailedAgentResponse
  return_type: NumberAgentResponse
  cli:
    users:
      - root
  schema:
    ids:
      type: list
      schema:
        type: integer
        coerce: int
      required: true
      positional: true
      help: |
        List of file IDs to move.
        IDs be obtained via `malware malicious list`.
    items:
      rename: ids
      help: DEPRECATED
    user:
      type: string
      nullable: true
      help: (internal)

# 2 more actions, request and response formats are the same as in others above

# initiate cleanup of selected files
# it would be nice to wait until cleanup is done here, and only then return the response
# user won't send more then 100 files from UI at once anyway
malware malicious cleanup:
  help: Cleanup malicious files
  type: dict
  return_type: NullAgentResponse
  cli:
    users:
      - root
  schema:
    ids:
      type: list
      schema:
        type: integer
        coerce: int
      required: true
      positional: true
      help: |
        List of file IDs to cleanup.
        IDs be obtained via `malware malicious list`.
    items:
      rename: ids
      help: DEPRECATED
    user:
      type: string
      nullable: true
      help: (internal)
    standard_only:
      type: boolean
      help: (internal)

# restore original copy that was created before cleanup attempt
malware malicious restore-original:
  help: Restore the original copy that was created before a cleanup attempt
  type: dict
  return_type: SucceededFailedAgentResponse
  cli:
    users:
      - root
  schema:
    ids:
      type: list
      schema:
        type: integer
        coerce: int
      required: true
      positional: true
      help: |
        List of file IDs to restore.
        IDs be obtained via `malware malicious list`.
    items:
      rename: ids
      help: DEPRECATED
    user:
      type: string
      nullable: true
      help: (internal)

malware malicious diff:
  help: Get difference between infected and cleaned file
  type: dict
  cli:
    users:
      - root
  schema:
    id:
      type: integer
      nullable: false
      coerce: int
      help: |
        Specific file by ID.
        IDs be obtained via `malware malicious list`.
        Conflicts with other filters and `order_by`.
    user:
      type: string
      nullable: true
      help: |
        Admins can filter results by user.
        Users can only see their own files.

# does not accept any params, initiates cleanup of all files
# no need to wait until cleanup is done
# return response as soon as the status of files in `malware malicious list` is changed to `cleanup_in_progress`
malware malicious cleanup-all:
  help: Cleanup all malicious files
  type: dict
  return_type: NullAgentResponse
  cli:
    users:
      - root
  schema:
    user:
      type: string
      nullable: true
      help: (internal)
    standard_only:
      type: boolean
      help: (internal)

malware cleanup status:
  help: Show the status of running cleanup
  type: dict
  cli:
    users:
      - root

malware user cleanup:
  help: Cleanup all files of a specific user
  type: dict
  return_type: NullAgentResponse
  cli:
    users:
      - root
  schema:
    user:
      type: list
      schema:
        type: string
      required: true
      positional: true
      help: |
        Admins can cleanup files of any user.
        Users can only cleanup their own files.
    standard_only:
      type: boolean
      help: (internal)

malware user restore-original:
  help: Restore the original (infected) copy of all cleaned files of a specific user
  type: dict
  return_type: SucceededFailedAgentResponse
  # why? ui do not use it
  cli:
    users:
      - root
  schema:
    user:
      type: list
      schema:
        type: string
      required: true
      positional: true
      help: |
        Admins can restore files of any user.
        Users can only restore their own files.