Skip to content

Bug: browser-edge artifact path can escape outDir via productId #548

@ayskobtw-lil

Description

@ayskobtw-lil

The browser-edge target builds its package artifact path with the raw Edge productId:

join(ctx.outDir, ${config.productId}-.zip)

If productId contains a path separator, e.g. ../edge-product, dry-run package plans and real build zip paths can point outside ctx.outDir. This is different from browser-firefox, which already sanitizes extension IDs before using them in artifact filenames.

Impact:

  • generated package plans can reference artifacts outside the requested output directory
  • real builds can write the zip outside ctx.outDir
  • accidental or copied IDs containing separators produce surprising paths

Expected behavior: productId should still be preserved as metadata/API input, but filename use should be sanitized so generated artifacts remain under ctx.outDir.

I have a regression test/fix ready.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions