Skip to content

fix: isolate module bundles per folder and decouple share module activation#123

Open
adrian23b wants to merge 2 commits intomainfrom
develop
Open

fix: isolate module bundles per folder and decouple share module activation#123
adrian23b wants to merge 2 commits intomainfrom
develop

Conversation

@adrian23b
Copy link
Contributor

Se ajusta el sistema de módulos para que cada zip viva en su propia carpeta modules/<module_key>/ con extracción segura, y se elimina el acoplamiento del core al module_key del share, detectando módulos activos por permiso/hook. Esto reduce impacto en core y mejora aislamiento de extensiones.

adrian and others added 2 commits March 13, 2026 19:58
@vercel
Copy link

vercel bot commented Mar 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
syspoints Ready Ready Preview, Comment Mar 14, 2026 1:43am
syspoints-dev Ready Ready Preview, Comment Mar 14, 2026 1:43am

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f58c8b6048

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +86 to +90
const manifestBuffer = manifestEntry.getData();
if (!manifestBuffer || manifestBuffer.length === 0) {
throw new ApiError(400, 'manifest file is empty');
}
if (manifestBuffer.length > MAX_MANIFEST_BYTES) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Bound manifest expansion before inflating manifest data

extractManifestFromZipBuffer inflates the manifest with manifestEntry.getData() and only applies MAX_MANIFEST_BYTES afterwards, so a tiny compressed archive can still force a very large in-memory allocation before the guard runs. In module upload paths this enables zip-bomb style input to trigger high memory usage or process instability even though the endpoint advertises strict manifest limits; check uncompressed size metadata (or stream with a hard cap) before materializing the buffer.

Useful? React with 👍 / 👎.

Comment on lines +130 to +132
const entryBuffer = entry.getData();
if (entryBuffer.length > MAX_ZIP_ENTRY_BYTES) {
throw new ApiError(400, `zip entry too large: ${safeRelativePath}`);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Bound zip entry expansion before inflating file data

saveModuleBundle calls entry.getData() for every archive entry before enforcing limits, and the only size check is per-entry after inflation. A highly compressible 5MB upload can therefore expand to very large buffers and writes (up to hundreds of MB/GB across entries) before rejection, which can exhaust memory/disk during upload; enforce pre-inflation uncompressed-size checks plus a cumulative extracted-bytes cap.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant