TMAegis

Plugin

Cài đặt, cấu hình và viết plugin.

Plugin chạy sau khi quét và nhận báo cáo JSON qua đầu vào chuẩn. Dùng chúng để gửi thông báo, mở ticket hoặc đẩy lên SIEM.

Cài đặt và bật

shell
tmaegis plugin install github.com/tmaegis/plugin-slack-notify   # file, URL or GitHub release
tmaegis plugin install ./my-plugin.wasm --sha256 <digest>       # pin the digest
tmaegis plugin list
tmaegis scan --auto-detect --plugin slack,jira

Plugin được tìm trong thư mục plugin (mặc định ./plugins, dùng --plugin-dir để đổi). Bật chúng vĩnh viễn trong config.yaml tại plugins.enabled.

Tự viết plugin

Plugin thực thi là một tệp có tên tmaegis-plugin-<name> (bất kỳ ngôn ngữ nào). Nó đọc báo cáo quét JSON từ stdin và đọc thiết lập từ các biến môi trường.

shell
#!/usr/bin/env sh
# TMAegis notifier plugin: posts a scan summary somewhere.
set -eu
PAYLOAD=$(cat)
FAILED=$(printf '%s' "$PAYLOAD" | grep -o '"failed_count":[0-9]*' | head -n1 | cut -d: -f2)
echo "failed controls: ${FAILED:-0}"

Plugin WebAssembly chạy trong sandbox (wazero) và không có quyền truy cập máy chủ trừ khi được cấp.

Các plugin có sẵn

  • jiraChính thứcLoại: executable

    TMAegis ITSM plugin: opens one Jira issue per failed critical/high control.

    plugins/tmaegis-plugin-jira.py

  • notify-webhookChính thứcLoại: executable

    Sample TMAegis Executable Plugin

    plugins/tmaegis-plugin-notify-webhook.sh

  • slackChính thứcLoại: executable

    TMAegis notifier plugin: posts a scan summary to a Slack incoming webhook.

    plugins/tmaegis-plugin-slack.sh

  • telegramChính thứcLoại: executable

    TMAegis notifier plugin: sends a scan summary to a Telegram chat.

    plugins/tmaegis-plugin-telegram.sh

  • pci-dss-v4Cộng đồngLoại: wasm

    Maps findings to PCI DSS v4.0 requirements. Community plugin: contributions welcome.

    github.com/tmaegis/plugin-pci-dss

Chỉnh sửa trang này trên GitHub