experius/module-sansecreport

提供 Sansec eComscan 报告的管理面板接口

1.0.3 2021-12-22 17:20 UTC

This package is auto-updated.

Last update: 2024-09-22 23:12:11 UTC


README

``experius/module-sansecreport``

主要功能

提供 Sansec eComscan 报告的管理面板接口。

Picture

安装

* = 在生产环境中请使用 --keep-generated 选项

类型 1:Zip 文件

  • 解压 zip 文件到 app/code/Experius
  • 通过运行 php bin/magento module:enable Experius_SansecReport 启用模块
  • 通过运行 php bin/magento setup:upgrade 应用数据库更新
  • 通过运行 php bin/magento cache:flush 清理缓存

类型 2:Composer

  • 将模块添加到 composer 仓库,例如
    • 私有仓库 repo.magento.com
    • 公共仓库 packagist.org
    • 公共 GitHub 仓库作为 vcs
  • 通过运行 composer config repositories.repo.magento.com composer https://repo.magento.com/ 将 composer 仓库添加到配置中
  • 通过运行 composer require experius/module-sansecreport 安装模块 composer
  • 通过运行 php bin/magento module:enable Experius_SansecReport 启用模块
  • 通过运行 php bin/magento setup:upgrade 应用数据库更新
  • 通过运行 php bin/magento cache:flush 清理缓存

配置

为了配置 eComscan 以将报告发布到您的 Magento 安装,需要两个步骤

  • 通过 Magento 创建一个新的集成承载令牌
    • 系统 -> 扩展 -> 集成
    • 添加新集成
    • 将名称填写为 sansec,并在页面底部填写您的当前管理员密码
    • API 选项卡下,选择 资源访问 自定义。勾选 SansecReports 字段
    • 保存并激活
    • 复制 访问令牌
  • 更改您的 Sansec Cron 以添加 POST 调用(将 EXAMPLEBEARERTOKEN 替换为您复制的 访问令牌,并将域名更改为您的 Magento 商店)
    • 添加 --format=json | ifne curl -k -H 'Content-Type: application/json' -H 'Authorization: Bearer <bearerToken>' -d@- -X POST <magentowebshopdomain>/rest/V1/experius-sansecreport/sansecreports
    • 示例完整 Cron: ~/bin/ecomscan -k <key> --report <your_email> --new-only --format=json --slack <webhookurl> <store_path> | ifne curl -k -H 'Content-Type: application/json' -H 'Authorization: Bearer <bearerToken>' -d@- -X POST <magentowebshopdomain>/rest/V1/experius-sansecreport/sansecreports