Agent Zero AI framework
add report malicious plugin link to installer detail view
frdel7ee5dac78e9d
diff --git a/plugins/_plugin_installer/webui/install-detail.html b/plugins/_plugin_installer/webui/install-detail.htmlindex ffd8d9066..62ffb0222 100644--- a/plugins/_plugin_installer/webui/install-detail.html+++ b/plugins/_plugin_installer/webui/install-detail.html@@ -245,6 +245,12 @@<span>Plugin Index</span></a></template>+ <template x-if="$store.pluginInstallStore.getReportUrl($store.pluginInstallStore.selectedPlugin)">+ <a :href="$store.pluginInstallStore.getReportUrl($store.pluginInstallStore.selectedPlugin)" target="_blank" class="pi-dev-link pi-report-link">+ <span class="material-symbols-outlined">report</span>+ <span>Report malicious plugin</span>+ </a>+ </template></div></div></div>@@ -796,6 +802,13 @@color: var(--color-highlight);}+ .pi-dev-link.pi-report-link,+ .pi-dev-link.pi-report-link:hover,+ .pi-dev-link.pi-report-link .material-symbols-outlined,+ .pi-dev-link.pi-report-link:hover .material-symbols-outlined {+ color: var(--color-error-text);+ }+.pi-footer .buttons-container {width: 100%;}diff --git a/plugins/_plugin_installer/webui/pluginInstallStore.js b/plugins/_plugin_installer/webui/pluginInstallStore.jsindex 141962db5..b59b8b6e4 100644--- a/plugins/_plugin_installer/webui/pluginInstallStore.js+++ b/plugins/_plugin_installer/webui/pluginInstallStore.js@@ -705,6 +705,25 @@ const model = {});},+ getReportUrl(plugin) {+ const githubUrl = plugin?.github;+ if (!githubUrl || typeof githubUrl !== "string") return "";+ try {+ const url = new URL(githubUrl.trim().replace(/\.git$/i, ""));+ if (!url.hostname.includes("github.com")) return "";+ const parts = url.pathname.split("/").filter(Boolean);+ if (parts.length >= 1) {+ const username = parts[0];+ const contentUrl = encodeURIComponent(githubUrl);+ const report = encodeURIComponent(`${username} (user)`);+ return `https://github.com/contact/report-content?content_url=${contentUrl}&report=${report}`;+ }+ } catch (e) {+ // ignore+ }+ return "";+ },+// ── Shared ───────────────────────────────────resetZip() {