Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@moksa/emdash-shop

Latest version: v0.1.8

Overview

Last scanned
1 Dec 2026
Published
1 Dec 2026
npm package Publisher: moksa
5 Versions
309 Downloads

Scan summary

@moksa/emdash-shop was last scanned on 1 Dec 2026 at version 0.1.8. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 5 versions; the latest 2 were published within 3 days (29 Nov – 1 Dec 2026).
  • Findings: No rules fired in version 0.1.8.
  • Downloads: 309 downloads.

Versions

5 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.1.8 LATEST 1 Dec 2026 No rules fired
0.1.7 29 Nov 2026 No rules fired
0.1.6 25 Oct 2026 No rules fired
0.1.3 25 Oct 2026 Not shown
0.1.2 25 Oct 2026 Not shown

No rules fired in 0.1.8

Findings

Findings for v0.1.8. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.1.8; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@moksa/emdash-shop

EmDash 網站整合套件:讓沙盒商店外掛(moksa-*)在你的 EmDash 網站上組成一個完整的商店。

沙盒外掛彼此不能直接呼叫,也碰不到瀏覽器與其他外掛的資料。這個套件是受信任的那一半,負責:

  • 外掛之間的匯流排:事件(訂單成立、付款、出貨、退款……)、回報、重試。
  • 商店頁面(/shop、購物車、結帳、會員、訂單頁……)與 Store API(/api/shop/v1/*),資料來自 moksa-commerce-core。
  • 金流、物流、電子發票的回呼網址(/api/shop/gw/<provider>/<action>),轉給對應的外掛。
  • 結帳時的協調:運送方式、發票、點數與優惠、付款方式。
  • Cookie 同意、Meta 像素與 GA4、商品摘要網址。
  • WooCommerce 搬家的下載與寫入工作。

架構說明見 repo 的 docs/site.md 與 docs/overview.md。

需求

  • EmDash 1.3 以上(emdash)、Astro 7.3 以上(astro);沙盒版另需 @emdash-cms/sandbox-workerd 0.9 以上(選用的 peer dependency,自架版不需要)。

自架版:不用沙盒、外掛在網站程序內執行時,改用分類包 @moksa/commerce-pack-core(含本套件)與 @moksa/commerce-pack-tw-payments 等,安裝步驟見 @moksa/commerce-pack-core 的 README(repo 的 docs/selfhost.md)。本套件在兩種模式下相同。

  • Node.js 伺服器輸出(output: "server",例如 @astrojs/node)。
  • 一個資料庫(SQLite 即可)與媒體儲存。

本套件不使用 zod,相依只有 @moksa/sandbox-kit(與外掛共用的簽章、雜湊與合約)與 qrcode-generator(優惠券 QR code)。

安裝

1. 安裝套件
npm install @moksa/emdash-shop @moksa/sandbox-kit @emdash-cms/sandbox-workerd workerd

套件已發布到 npm(MIT)。要測試本 repo 尚未發布的修改時,可以改用 npm pack ./plugins/sandbox-kit ./packages/emdash-shop 產生的打包檔安裝。

workerd(沙盒外掛的執行環境):

  • npm 11 預設不執行套件的安裝腳本。看到「install scripts not yet covered by allowScripts」時,允許 workerd 的安裝腳本再重建:

    npm install-scripts approve workerd
    npm rebuild workerd
  • Windows 開發機:workerd 套件在 Windows 只放 JS 轉接檔,沙盒執行環境需要的 node_modules/workerd/bin/workerd.exe 不存在,要從平台套件複製過去(Linux/Docker 不需要):

    copy node_modules\@cloudflare\workerd-windows-64\bin\workerd.exe node_modules\workerd\bin\workerd.exe

    沒有這個檔案時,伺服器啟動會顯示「Plugin sandbox is configured but not available」,商店頁面回應「商店暫時無法使用」。

2. astro.config 加一行
import node from "@astrojs/node";
import { defineConfig } from "astro/config";
import emdash, { local } from "emdash/astro";
import { sqlite } from "emdash/db";
import moksaShop, { sandboxRunner } from "@moksa/emdash-shop";

export default defineConfig({
    output: "server",
    adapter: node({ mode: "standalone" }),
    integrations: [
        emdash({
            database: sqlite({ url: "file:./data/data.db" }),
            storage: local({ directory: "./data/uploads", baseUrl: "/_emdash/api/media/file" }),
            // 沙盒外掛的執行環境(啟動等待時間較長的 workerd)
            sandboxRunner: sandboxRunner(),
        }),
        moksaShop({ layout: "./src/layouts/Base.astro" }),
    ],
});

layout 是包住商店頁面的網站版型,必須接受 title、description、robots 三個 props,並輸出預設 slot。

在版型中加上 Cookie 同意與追蹤(沒有安裝 moksa-marketing 時不會輸出任何東西):

---
import ShopHead from "@moksa/emdash-shop/components/ShopHead.astro";
import ShopBodyEnd from "@moksa/emdash-shop/components/ShopBodyEnd.astro";
---
<html>
    <head>
        …
        <ShopHead />
    </head>
    <body>
        <slot />
        <ShopBodyEnd />
    </body>
</html>
3. 建立商品集合

商品資料存在 EmDash 的 products 集合與 product_cat 分類。套件附上 seed:

npx emdash seed node_modules/@moksa/emdash-shop/seed.json

已經有網站的話也可以重新套用,它只會新增缺少的欄位。

4. 從 registry 安裝外掛

在 EmDash 後台的「外掛」頁,從 registry 安裝需要的外掛。發布者是 moksaweb.com。

外掛 用途 必要
moksa-commerce-core 商品販售、購物車、結帳、訂單、庫存 必要
至少一個金流外掛 moksa-ecpay、moksa-newebpay、moksa-payuni、moksa-smilepay、moksa-paynow、moksa-pchomepay、moksa-tappay、moksa-shopline、moksa-line(LINE Pay) 必要
moksa-amego 光貿電子發票 選用
moksa-commerce-loyalty 會員點數、購物金、等級 選用
moksa-commerce-affiliate 推廣分潤 選用
moksa-commerce-sales 預約、團購、代購、喊單 選用
moksa-commerce-retention 購物車提醒、加購推薦、商品 CSV 選用
moksa-commerce-engagement 評價、收藏、貨到通知 選用
moksa-commerce-notify 訂單通知信(訂單成立、繳費資訊、付款、出貨、到店、取消、退款、發票)、寄信紀錄與重寄 建議
moksa-commerce-documents 出貨單、揀貨單、訂單明細(瀏覽器列印或存成 PDF;列印頁 /shop/documents/print 由本套件提供,訂單在列印當下向 core 讀取) 建議
moksa-commerce-subscriptions 定期定額:訂閱方案、首期結帳、手動續訂與催繳、綁卡自動扣款(綠界站內付 2.0)、會員中心的我的訂閱(通知信經 moksa-commerce-notify 寄出) 選用
moksa-commerce-returns 退貨申請(我的帳戶的申請頁 /shop/account/returns/new、照片上傳與退貨單列印由本套件提供) 選用
moksa-commerce-downloads 數位商品下載(下載頁 /shop/download/…、/shop/downloads/… 與檔案串流由本套件提供) 選用
moksa-commerce-api 整合 API:ERP、POS、倉儲用的 API 金鑰與 Webhook(API 網址 /api/shop/integration/v1 與 Webhook 傳送由本套件提供) 選用
moksa-line LINE 登入、通知、LINE Pay 選用
moksa-assistant 客服與 AI 回覆 選用
moksa-marketing 商品摘要、Meta 像素、GA4、Cookie 同意 選用
moksa-woocommerce 從 WooCommerce 搬家 選用

套件會自動偵測:只有已安裝且啟用的外掛會參與(每 30 秒重新確認一次)。沒有安裝的外掛不會收到事件,它的付款方式也不會出現在結帳頁。

5. 環境變數
變數 說明
MOKSA_BUS_SECRET 必要。至少 32 個字元的隨機字串,網站與外掛之間簽章用的主金鑰。產生方式:node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"。更換後要重新執行第 6 步。
EMDASH_SITE_URL 網站的公開網址(例如 https://shop.example.com),用於金流回呼與信件中的連結。
MOKSA_WORKERD_START_TIMEOUT_MS 選用。沙盒外掛啟動的等待時間,預設 60000。
MOKSA_PCHOMEPAY_NOTIFY_IPS 選用。支付連付款通知允許的來源 IP(逗號分隔),預設為支付連公告的 IP。
MOKSA_MAINTENANCE 選用。設為 1 時商店暫停營業(商店頁面、Store API、金流回呼都暫停)。
6. 寫入匯流排金鑰(provision-bus)

每個外掛只保存自己的金鑰(由 MOKSA_BUS_SECRET 推導)。部署後、每次新增外掛或更換 MOKSA_BUS_SECRET 後執行一次:

MOKSA_BUS_SECRET=… npx moksa-shop-provision-bus https://shop.example.com <管理員 API token>

API token 請在後台以管理員帳號建立。沒有安裝的外掛會顯示「not installed, skipped」。

7. 最小設定
  1. moksa-commerce-core 的外掛設定:商店名稱、客服 Email。
  2. 金流外掛的設定:特店編號與金鑰。綠界可以先開「測試環境」,使用公開測試帳號。
  3. 在後台新增一個商品(名稱、價格、SKU),發布。
  4. 打開 /shop,把商品加入購物車並結帳。

選項

moksaShop({
    layout: "./src/layouts/Base.astro", // 必要
    enabled: true, // 商店是否運作;"env" 表示看執行時的 MOKSA_SANDBOX=1
    storefront: true, // /shop 與 Store API 是否由本套件提供;"env" 表示看 MOKSA_SANDBOX_STOREFRONT=1
    plugins: "auto", // 參與的外掛:自動偵測,或固定的外掛 id 清單
    providers: ["ecpay", "linepay"], // 結帳頁提供的金流(預設:所有已安裝的)
    components: { ProductCard: "./src/shop/ProductCard.astro" }, // 用自己的元件替換商店區塊(選用)
});

外觀

商店頁面由本套件提供,外框(頁首、頁尾、字型)用你的 layout。樣式使用網站的設計變數(--color-brand、--color-text、--color-surface、--radius 等);網站沒有定義的變數會用 EmDash 部落格範本的預設值。要調整外觀,在網站的 CSS 覆寫這些變數,或覆寫 --shop-radius、--shop-ok-bg 等 --shop-* 變數。

  • 商店外觀:安裝 @moksa/emdash-shop-admin 後,後台「沙盒商店 → 商店外觀」可設定主色、字型、圓角、商品欄數、圖片比例與結帳頁 Logo,不用改程式。版型要放 <ShopHead /> 才會套用。
  • 替換區塊:components 可替換 ProductCard、ProductAfterSummary、ProductAfterDetails、CartAfterSummary、CheckoutBeforeSubmit、ShopTop、ShopBottom。每個名稱收到的 props 與範例見 docs/site.md;預設元件可從 @moksa/emdash-shop/slots/<名稱>.astro 引入後包起來。

授權

MIT。Moksa(https://moksaweb.com),資安聯絡:services@moksaweb.com。

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @moksa/emdash-shop

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

Copy of Template Design OX Blog (1)
Research

Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret Stealing Malware Via GitHub Actions & npm

Frame 2085668439 (1)
Group 1261154229