[PR #293] [MERGED] feat: Enhance plugin signing with authorized category verification #428

Closed
opened 2026-02-16 01:15:56 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-plugin-daemon/pull/293
Author: @Yeuoly
Created: 5/20/2025
Status: Merged
Merged: 5/21/2025
Merged by: @Yeuoly

Base: mainHead: feat/add-authorized-category


📝 Commits (5)

  • 7dcc04d feat: Enhance plugin signing with authorized category verification
  • c160629 fix
  • 437bc2a fix
  • 278ec81 test
  • 64bd0f9 test: Add unit test for plugin verification without verification field

📊 Changes

14 files changed (+347 additions, -40 deletions)

View changed files

📝 cmd/commandline/signature.go (+23 -1)
📝 cmd/commandline/signature/sign.go (+3 -2)
📝 cmd/commandline/signature/signature_test.go (+57 -2)
📝 cmd/license/sign/main.go (+9 -4)
📝 internal/service/plugin_decoder.go (+8 -0)
📝 pkg/plugin_packager/decoder/decoder.go (+7 -0)
pkg/plugin_packager/decoder/entities.go (+13 -0)
📝 pkg/plugin_packager/decoder/fs.go (+8 -0)
📝 pkg/plugin_packager/decoder/helper.go (+28 -16)
📝 pkg/plugin_packager/decoder/verifier.go (+14 -0)
📝 pkg/plugin_packager/decoder/zip.go (+40 -6)
📝 pkg/plugin_packager/packager_test.go (+18 -6)
📝 pkg/plugin_packager/signer/sign.go (+15 -2)
📝 pkg/plugin_packager/signer/withkey/sign_with_key.go (+104 -1)

📄 Description

  • Added support for an authorized_category flag in the signature command to validate the category before signing.
  • Updated the Sign function to accept a verification parameter, allowing for category-based signing.
  • Enhanced error handling for invalid categories during the signing process.
  • Updated tests to cover new verification scenarios and ensure proper functionality with the authorized category.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify-plugin-daemon/pull/293 **Author:** [@Yeuoly](https://github.com/Yeuoly) **Created:** 5/20/2025 **Status:** ✅ Merged **Merged:** 5/21/2025 **Merged by:** [@Yeuoly](https://github.com/Yeuoly) **Base:** `main` ← **Head:** `feat/add-authorized-category` --- ### 📝 Commits (5) - [`7dcc04d`](https://github.com/langgenius/dify-plugin-daemon/commit/7dcc04d94a99c6de1cf2758996a4f9b4e98d949d) feat: Enhance plugin signing with authorized category verification - [`c160629`](https://github.com/langgenius/dify-plugin-daemon/commit/c1606297943ede90fcd942133267613a84b00cfe) fix - [`437bc2a`](https://github.com/langgenius/dify-plugin-daemon/commit/437bc2a29df53a19cea00749fd567174730d6447) fix - [`278ec81`](https://github.com/langgenius/dify-plugin-daemon/commit/278ec81c816e3a352a94ad52b1123b459fe0afed) test - [`64bd0f9`](https://github.com/langgenius/dify-plugin-daemon/commit/64bd0f965a3ba11dcff657893ccbe7c39535b278) test: Add unit test for plugin verification without verification field ### 📊 Changes **14 files changed** (+347 additions, -40 deletions) <details> <summary>View changed files</summary> 📝 `cmd/commandline/signature.go` (+23 -1) 📝 `cmd/commandline/signature/sign.go` (+3 -2) 📝 `cmd/commandline/signature/signature_test.go` (+57 -2) 📝 `cmd/license/sign/main.go` (+9 -4) 📝 `internal/service/plugin_decoder.go` (+8 -0) 📝 `pkg/plugin_packager/decoder/decoder.go` (+7 -0) ➕ `pkg/plugin_packager/decoder/entities.go` (+13 -0) 📝 `pkg/plugin_packager/decoder/fs.go` (+8 -0) 📝 `pkg/plugin_packager/decoder/helper.go` (+28 -16) 📝 `pkg/plugin_packager/decoder/verifier.go` (+14 -0) 📝 `pkg/plugin_packager/decoder/zip.go` (+40 -6) 📝 `pkg/plugin_packager/packager_test.go` (+18 -6) 📝 `pkg/plugin_packager/signer/sign.go` (+15 -2) 📝 `pkg/plugin_packager/signer/withkey/sign_with_key.go` (+104 -1) </details> ### 📄 Description - Added support for an `authorized_category` flag in the signature command to validate the category before signing. - Updated the `Sign` function to accept a verification parameter, allowing for category-based signing. - Enhanced error handling for invalid categories during the signing process. - Updated tests to cover new verification scenarios and ensure proper functionality with the authorized category. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 01:15:56 -05:00
yindo closed this issue 2026-02-16 01:15:56 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-daemon#428