SuperAPI AI Directory

utools-plugin-selfcheck

Testing & quality

View repository

Updated 12-02 16:14

About this skill

uTools Plugin Self-Check

Before submitting to the uTools plugin marketplace for review, check using the same standards as the official reviewoneplugin, tell the developer which issues will cause rejection, which must be fixed before passing, and which are suggested optimizations. Self-check results are for reference only; the official review is final. Communicate with the developer in Simplified Chinese (follow the developer if they use another language).

1. Input and Boundaries

  • Input: plugin root directory, i.e., the directory containing plugin.json, the directory prepared for packaging and submission (usually the build output directory, such as dist/, not the source project root). When the developer only provides the project root, first find plugin.json directory; when both the source directory and build directory exist, use the build directory as the basis for checking release content, and read source code to aid understanding.
  • Static check only: do not install dependencies, do not start the plugin, and do not execute any scripts or binaries in the package.
  • Read-only by default: do not modify the developer's files. When the developer explicitly requests fixes, then fix item by item according to the report, and after fixing, rerun the corresponding checks.
  • Does not involve the review backend: does not call any review API, and does not require or request tokens or keys.
  • Tool call discipline: send only 1 tool call per response; if you need results from multiple commands, combine them into one command (using ; or && to chain). Do not combine two sets of parameters into one call (such as {"command":"a"}{"command":"b"}), that will invalidate the entire round.
  • Reading discipline: first wc -l / wc -c determine the file format; for single-line or minified files (Vite / webpack outputs,.min.js) do not cat, read in full, or grep -n, use grep -c to determine whether it exists; when the original text is needed, only excerpt ≤400 characters before and after the match.

2. Review Standards

2.1 Not allowed to be listed (will be rejected)

  • Harmful to the user's computer, data, or privacy: backdoors, viruses, privacy theft, undisclosed data collection and external transmission, destructive operations.
  • Copyright, trademark infringement, or plagiarism: pirated films/TV, music, images, textbooks; plagiarizing others' plugins or works. When using another party's brand name, if the plugin harms that brand (impersonating official, counterfeiting, damaging goodwill) or has a competitive relationship with that brand, it must be changed to a name that does not use that trademark, or authorization proof must be attached at submission; if it only provides supporting or assistant functionality for that brand and neither harms nor constitutes competition, the brand may be mentioned in the name and description.
  • Violent, hateful, or pornographic content; political rumors.
  • Claimed value or functionality inconsistent with reality: exaggerated or false store descriptions, update notes, or interface copy.
  • Clipboard monitoring: continuously monitoring or polling the clipboard (clipboard history, automatically capturing copied content, etc.) is no longer accepted. Reading the clipboard once when the user actively triggers a feature is fine.
  • Damaging integration with third-party platforms: Deliberately bypassing the platform's risk controls or access restrictions (bulk traffic/brushing, bypassing CAPTCHA / login / paywall, etc.), scraping other people's accounts or non-public data, forging study / attendance / transaction records. In automation scenarios, setting Referer / UA and calling web APIs are not a problem in themselves; they are only rejected when used for the above purposes.
  • Native binaries whose security cannot be verified:.exe / .dll / .so / .dylib / .node(including node_modules/*/prebuilds/**). Local WebAssembly with verifiable sources is acceptable; readable scripts (.js、.ps1、.sh etc.) are not considered binaries.
  • preload and its dependencies are unreadable, and their security cannot be confirmed:preload.js and its require local files must remain readable as plaintext and must not be compiled, packaged, compressed, or obfuscated (e.g., single-line minification,_0x style obfuscation, whole-string encoding, bytenode .jsc); npm packages used by preload must be submitted with the package; if using node_modules the entire folder must be submitted as well; do not copy only part of it. Frontend build artifacts are not subject to this restriction.

2.2 Must be fixed (can pass after fixing)

  • preload exposes overly broad capabilities: attaching fs、child_process etc. directly to window, or providing generic functions that 'read/write any path / execute any command / request any URL'. It also counts if the authorization whitelist can be written by the page itself (e.g., the page can call grantAccess(任意路径)) also counts.
  • Loading remote code at runtime:eval / new Function executing remote content, dynamically import external URLs, pages referencing external <script>, or downloading executable files and then running them.
  • Hardcoding keys, tokens, or accounts; integrating unapproved login or payment; undisclosed analytics/reporting, especially when the reported content includes clipboard contents, raw input, or user identifiers.
  • The sync database stores logs / cache and other non-user data:utools.db / utools.dbStorage is synced with the account and used to hold user data; business-related history (translation / search history, favorites, recent items, etc.) may be written. Logs, caches, search indexes, temporary data, binaries, and downloaded files must be placed in the plugin's local data directory or temporary directory. Writing keys, passwords, etc. in plaintext will not be rejected, but it is recommended to encrypt them before storing or store them only locally.
  • Default logo: Default icons or placeholder images from uTools templates, scaffolds, or frameworks such as Vite / Vue / React / Electron must be replaced with an original icon representing this plugin. In particular, the default uTools plugin logo (dark gray rounded square with '101 / 010' written inside a square in the middle) must be replaced; determined by hash: if the logo file's SHA-256 is c4a8ac6e06310f40e2512d44f5eace46376351f769ac689519a8ff486c18fe62 then it is.
  • Residual files in the release package:.git、.github、.vscode、.idea、.map, test directories, build remnants, developer machine paths, or documentation/reference images unrelated to the functionality. A few small files that do not affect the plugin size (such as a developer-facing README) will not require rectification for this reason; cleanup is only recommended.
  • Description does not match the implementation but can be corrected; collecting personal information without notice and privacy explanation.

2.3 Not considered a problem

  • plugin.json Keeping development.main(e.g., http://localhost:5173) debug entry points are allowed; the release main must be inside the package .html。

2.4 Recommended improvements (best practices)

Give specific suggestions based on the plugin's own functionality, for example: do not put business logic into preload unless necessary; keep only necessary native capability wrappers in preload; validate parameters in preload functions and restrict paths and commands; reduce unnecessary external domain requests; package large files and dependencies on demand. Only write the places that need changes.

3. Process

  1. Locate and get an overview(one command): in the plugin root directory, read plugin.json, and list the file inventory, sizes, and suspicious files:

    cd "<插件目录>" && cat plugin.json; echo '== files =='; find . -type f -not -path './node_modules/*' | head -200; echo '== count =='; find . -type f | wc -l; echo '== big =='; find . -type f -size +1M -exec ls -lh {} \; ; echo '== binaries / hygiene =='; find . \( -name '*.exe' -o -name '*.dll' -o -name '*.so' -o -name '*.dylib' -o -name '*.node' -o -name '*.map' -o -name '.git' -o -name '.github' -o -name '.vscode' -o -name '.idea' -o -name 'test' -o -name 'tests' -o -name '__tests__' \) -print
    
  2. preload and require chain: Find plugin.json of preload, list its require local files and npm packages, and look one by one at what window exposes what, where the parameters come from, and whether paths / commands / domains are restricted:

    cd "<插件目录>" && wc -lc preload.js; grep -o "require(['\"][^'\"]*['\"])" preload.js | sort -u; grep -n 'window\.[A-Za-z_$]*\s*=' preload.js | head -40; grep -c 'child_process\|exec(\|spawn(\|execFile(' preload.js; grep -c 'clipboard' preload.js
    

    Then confirm that preload and its local dependencies are in plaintext and that npm dependencies are complete (an excessively large maximum character count per line usually indicates minification or bundling):

    cd "<插件目录>" && for f in preload.js $(grep -oE "require\(['\"]\./[^'\"]+['\"]\)" preload.js | sed -E "s/require\(['\"]//; s/['\"]\)//"); do [ -f "$f" ] || f="$f.js"; echo "$f lines=$(wc -l < "$f" 2>/dev/null) maxline=$(awk '{ if (length>m) m=length } END {print m+0}' "$f" 2>/dev/null)"; done; echo '== obfuscation =='; grep -c '_0x[0-9a-f]\{4\}' preload.js; find . -name '*.jsc' -not -path './node_modules/*/test/*'; echo '== npm deps =='; for m in $(grep -oE "require\(['\"][^./'\"][^'\"]*['\"]\)" preload.js | sed -E "s/require\(['\"]//; s/['\"]\)//; s#^(@[^/]+/[^/]+|[^/]+).*#\1#" | sort -u); do case "$m" in fs|path|os|child_process|crypto|http|https|url|util|events|stream|zlib|buffer|electron|node:*) ;; *) [ -d "node_modules/$m" ] && echo "ok $m" || echo "MISSING $m";; esac; done
    

    Focus on reading the original source:window.X = definition body, path validation and whitelist write points,exec / spawn parameters, the target and request body of network requests,setInterval whether the clipboard is read.

  3. Frontend (lightweight): external scripts, external domains, reporting,eval:

    cd "<插件目录>" && grep -rhoE 'https?://[a-zA-Z0-9._-]+' --include='*.js' --include='*.html' . | sed 's#.*//##' | sort | uniq -c | sort -rn | head -15; echo '== external script =='; grep -rlE '<script[^>]+src="https?://' --include='*.html' . ; echo '== eval =='; grep -rc 'eval(\|new Function(' --include='*.js' . | grep -v ':0$'
    
  4. Sync database: Check utools.db / utools.dbStorage what was written:

    cd "<插件目录>" && grep -rhoE 'utools\.(db|dbStorage)\.[a-zA-Z]+' --include='*.js' . | sort | uniq -c
    

    When there are writes, capture the hit location and check whether the key name and written content are logs, caches, search indexes, base64 images, etc. (business history records can be retained), and whether keys or passwords are stored in plaintext.

  5. logo: Open plugin.json in logo pointed to, take a look (a separate image read), and determine whether it is a default / framework icon or another party's trademark. First compare the hash; if it equals c4a8ac6e06310f40e2512d44f5eace46376351f769ac689519a8ff486c18fe62 it is the uTools default logo:

    cd "<插件目录>" && shasum -a 256 "$(node -p "require('./plugin.json').logo")"
    
  6. Description and implementation: Ask the developer to provide the store description and update notes (if none, use plugin.json of description、features and README), and compare them against the actual implementation.

  7. Output the report (Section 4).

4. Report format

「插件名」版本号 自查结果:<会被拒绝 / 需要修改后再提交 / 可以提交>

必须整改
1. <位置:文件:行号或函数名> <问题> <怎么改>
2. ...

建议整改
1. <位置> <建议>
2. ...

说明:自查结果仅供参考,最终以官方审核为准。<需要开发者确认或补充的信息,如商标授权、二进制来源>
  • Conclusion: if there are issues from 2.1, write "will be rejected"; if there are only issues from 2.2, write "needs modification before resubmission"; if neither, write "can be submitted".
  • For each item that must be corrected, clearly statelocation + problem + how to fix, and it would be better to provide an example fix.
  • If a section has no content, omit the entire section and do not write "none"; do not write affirmative statements or things like "recommend keeping".
  • Put uncertain items (such as whether trademark infringement is constituted, whether the source of a binary can be verified) in "Notes", and remind the developer to attach authorization or source proof when submitting.