Skip to content

fix(dependencies): a module jar cannot name its way out of the registry, and a package-only build boots - #6871

Merged
delchev merged 1 commit into
masterfrom
fix/release-hardening
Aug 20, 2026
Merged

fix(dependencies): a module jar cannot name its way out of the registry, and a package-only build boots#6871
delchev merged 1 commit into
masterfrom
fix/release-hardening

Conversation

@delchev

@delchev delchev commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Closes #6860 and #6861 — two hardening fixes on the #6776 dynamic-dependencies pipeline, found reviewing the 14.29/14.30 wave.

  • core-dependencies: a module jar entry under META-INF/dirigible/../ becomes project ".." - and its removal deletes the whole registry #6860: ModuleJarInspector refuses a registry project name that is not a plain path segment ([A-Za-z0-9][A-Za-z0-9._-]*). The name is concatenated into /registry/public/<name> on removal, so a crafted META-INF/dirigible/../x entry named the project .. and its removal deleted the registry root. Covered by ModuleJarInspectorTest (accepted plain name, refused .., refused backslash).
  • build: a package-only build of build/application produces an executable jar that cannot boot #6861: the Launcher-Agent-Class manifest attribute now rides the same pre-integration-test ant step that injects the agent classes (the ant jar task merges it into the existing manifest, keepcompression preserved). A package-only build — the documented dev loop — previously produced a jar whose manifest named classes the archive lacked, which aborts java -jar before main; now it produces an agent-less jar that boots (verified by an actual boot), and the full build produces the complete pair (LauncherAgentDeliveryIT, as before).
  • Bonus: maven-antrun-plugin pinned to 3.1.0 — unpinned, older local Mavens resolved 1.3 where the injection silently degraded, which is why LauncherAgentDeliveryIT failed on developer machines while green on CI. With the pin it passes locally (3/3 verified).

🤖 Generated with Claude Code

…ry, and a package-only build boots (#6860, #6861)

Two hardening fixes on the dynamic-dependencies pipeline:

- ModuleJarInspector refuses a registry project name that is not a plain
  path segment. The name becomes a repository path on removal
  (ClasspathExpander.remove concatenates it under /registry/public), so a
  crafted "META-INF/dirigible/../x" entry named the project ".." and its
  removal would have deleted the registry root - the expand side already
  rejects its kind (the Zip-Slip guard), the remove side did not. The
  refusal is loud and per-jar: such an archive is malformed or malicious.
  Closes #6860.

- The Launcher-Agent-Class manifest attribute is written by the SAME
  pre-integration-test step that injects the agent classes, never at
  package time. A manifest naming an agent class the archive does not
  carry aborts `java -jar` before main (JEP 261), so a build that stops at
  package - the documented UI-resource dev loop - produced a jar that
  could not boot at all. Now a package-only jar has NO agent (it boots,
  without restartless dependency delivery) and the full build produces
  the complete pair; asserted by LauncherAgentDeliveryIT as before.
  Closes #6861.

- maven-antrun-plugin is pinned to 3.1.0 in build/application: unpinned,
  an older local Maven resolved 1.3, where the injection silently
  degraded - the split behind LauncherAgentDeliveryIT failing on
  developer machines while green on CI. With the pin the IT passes
  locally too.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@delchev
delchev merged commit d4739d5 into master Aug 20, 2026
10 checks passed
@delchev
delchev deleted the fix/release-hardening branch August 20, 2026 10:45
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.

core-dependencies: a module jar entry under META-INF/dirigible/../ becomes project ".." - and its removal deletes the whole registry

1 participant