There is 1 comment.
 
 
Security Advisory Application / cid:jira-generated-image-avatar-84f72a04-8c73-43a6-be9d-592f526c81be SPAPP-38 Open

Use the real release date of the patched versions when no release note exists for the product

 
View issue   ยท   Add comment
 

1 comment

 
cid:jira-generated-image-avatar-d91c4bb5-4846-4123-b5af-589a2cebea22 Simon Urli on 13/Nov/26 16:52
 

There is actually Maven-side data we can use: it's not in the POM or in maven-metadata.xml, but the Maven repository records when each file was deployed and serves it as the Last-Modified HTTP header of the artifact files.

What I checked

Artifact Release reference Last-Modified
security-advisory-default 2.3.0 on maven.xwiki.org release commit 2026-11-04 13:15 UTC 2026-11-04 13:17:21 GMT
security-advisory-default 2.0.0 on maven.xwiki.org tag 2026-06-24 13:12 UTC 2026-06-24 13:14:04 GMT
application-antispam 1.0 on maven.xwiki.org   2016-01-29, so the dates survived 10 years of Nexus
xwiki-commons-component-api 8.4 released Nov 2016 xwiki.org 2016-11-10 17:40, Central 19:29 (sync delay)

In each case the date is the deploy time, about 2 minutes after release:prepare. Maven Central's search API (search.maven.org/solrsearch/select?...&core=gav) also returns a per-version timestamp, but it only covers Central, and contrib artifacts live on maven.xwiki.org.

The XWiki Extension API has no release date field, so we'd have to make the HTTP request ourselves.

Proposed change in DefaultVersionReleasedManager#computeReleased

  1. Keep the current order: release notes first, and release notes only for XWiki Standard.
  2. When there's no release note, instead of exists() followed by new Date():
    • go through extensionRepositoryManager.getRepositories() and keep the ones whose descriptor type is maven (the repositories the wiki is already configured with, so no new configuration is needed);
    • for each one, send a HEAD request to <repoURI>/<groupId as path>/<artifactId>/<version>/<artifactId>-<version>.pom;
    • only on HTTP 200, parse Last-Modified and keep the earliest date across repositories, so a mirror's later copy doesn't count. Trap: Central's 404 responses also carry a Last-Modified header, so the status check is required.
  3. If no Maven repository gives a date but exists() is still true (e.g. the extension is only on extensions.xwiki.org), keep the current new Date() fallback and log a warning.
  4. Put the HTTP lookup in a small internal component (e.g. MavenReleaseDateResolver using java.net.http.HttpClient) so that DefaultVersionReleasedManagerTest can mock it, and give the resolver its own test for parsing and status handling.

Why this is better than relying on the git tag

  • The tag date is the time of release:prepare, not the time the artifact became available, and a tag can exist for a release that failed to deploy.
  • Using tags means finding the SCM URL in the POM, guessing the tag name format and calling the GitHub API, which has rate limits.
  • Last-Modified measures what the embargo should measure: when users could actually get the fix.

Caveats

  • A repository migration that doesn't keep file times would reset the dates. The 2016 dates above show it hasn't happened so far.
  • A proxy or group repository could report when it cached the file rather than the real deploy time. Taking the earliest date across repositories limits this. For contrib artifacts, nexus.xwiki.org/nexus/content/groups/public returned the same time as the hosted repository.

PS: This post was co-written with Claude Code.