feat(store): AI auto-ingest from .crx + security scan publish gate#38
Merged
Conversation
Publishers shouldn't fill out forms — point the store at a .crx URL and it does the rest: - crx.ts: parse a CRX2/CRX3 (Cr24 header + zip) → manifest.json + icons. Auto-derives name, summary, description, version, permissions, and the logo (largest icon as a data: URI). - scanner.ts: security scan ported from ugig.net's BuiltInScanner/Composite engine, TUNED for browser extensions — high/medium are advisory; only `critical` (pipe-to-shell, rm -rf /, ssh-key paths, bundled native binaries) BLOCKS. Also flags broad host access + sensitive permissions. A listing is `green` (publishable) iff there are no critical findings. SecureClaw/vu1nz enrichment stays optional behind SECURECLAW_API_KEY. - routes: POST /extensions/ingest (auth) returns the auto-filled listing + scan verdict; version-submit now GATES on a green .crx scan (422 on critical) and stores the result for the store badge. - frontend: render the logo (was initials-only) in cards + detail; submit page gets a "paste your .crx → auto-fill + scan" flow that populates every field and disables publish until the scan is green; "Source / homepage (GitHub/GitLab)" field. 27 tests pass (crx + scanner incl. green-for-legit / block-on-critical), tsc clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
vu1nz Security Review0 finding(s) in PR #? No security issues found. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No more forms — point the store at a
.crxURL and it fills the listing and gates on a security scan.What
services/api/src/store/crx.ts): parse a CRX2/CRX3 (Cr24header + zip) →manifest.json+ icons. Auto-derives name, summary, description, version, permissions, and the logo (largest icon →data:URI).services/api/src/store/scanner.ts): the engine is ported fromugig.net'sBuiltInScanner/CompositeScanner, tuned for browser extensions — the raw skill ruleset flags things every extension legitimately does (fetch,globalThis,atob, base64, hex escapes in bundled@noblecrypto), so those are advisory (high/medium) and onlycritical(pipe-to-shell,rm -rf /, ssh-key paths, bundled native binaries) blocks. Also flags broad host access + sensitive permissions. A listing isgreeniff there are no critical findings. Optional SecureClaw/vu1nz enrichment stays behindSECURECLAW_API_KEY.POST /api/store/extensions/ingestreturns the auto-filled listing + scan verdict; version-submit now gates on a green.crxscan (422 on critical) and stores the result for the store badge..crx→ auto-fill + scan" flow that populates every field and keeps Publish disabled until the scan is green; Source / homepage (GitHub/GitLab) field.Verify
services/api: 27 tests pass (crx parse; scanner: green-for-legit-extension, block-on-critical, bundled-binary, advisory-eval, permission flags),tscclean. Validated end-to-end against the real CoinPay Wallet.crx→ ingests name/version/permissions/icon and scans green.Notes for maintainers
scanner.tsif you want high to block too.data:URIs; if the store page CSP restrictsimg-src, adddata:for the logos to render.🤖 Generated with Claude Code