/xwiki:xwiki-security-advisoryfrom xwiki
Drafts GitHub Security Advisory content for XWiki vulnerabilities from a security-restricted JIRA issue. Fetches the live template and JIRA issue, produces markdown body and metadata without PoC.
Ships in xwiki. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Produces the markdown body + metadata for a GitHub Security Advisory (GHSA) draft on an
xwiki/xwiki-contrib repo, from a security-restricted JIRA issue. This skill only drafts
content — creating the actual advisory on GitHub, inviting collaborators, or publishing/disclosing
it are separate, explicitly-confirmed actions (see Step 6).
The vulnerability is not public. Everything this skill produces or reads is confidential until disclosure ([[security-policy]] in the KB owns the full rule):
The advisory describes the vulnerability without enabling its reproduction: which feature or
endpoint is affected, the general attack vector, the requirements (rights, configuration) and the
impact — but no PoC: no exploit request, URL, page to target, payload, parameter values or
step-by-step reproduction, even when the JIRA issue has them (they stay in JIRA, where they're needed
for the fix). General about the mechanism, but exact about the requirements: name each right or
setting the attacker needs (e.g. "edit right on any page and comment right on a page whose author
has programming right") and say which of them the standard rights give everyone, so an admin with
non-standard rights can tell whether their wiki is affected. Scanners automatically import published advisories and try the reproduction steps they
contain. The Security Policy requires this since October 2026: a warning in its "Security Advisory
template and information" section, and a /!\ Don't provide reproduction steps. /!\ line under the
template's ### Impact — a reminder for the author, not part of the advisory, so leave it out of
the draft (Step 2 has the live wording).
This is a change from past practice: many published XWiki advisories contain a PoC or the exact request to reproduce the vulnerability (e.g. GHSA-57q2-6cp4-9mq3 gives the URL to call). Don't take past advisories as an example for the Impact section's level of detail — Step 3 uses them only for the wording of the CVSS comments.
Security issues carry a restricted Security Level (e.g. "Confidential"), so fields.security is
set and the issue is invisible to a token/account outside the security group. Fetch the full issue
over REST (not jira-cli, which doesn't surface custom fields well) to get every field at once:
curl -s -H "Authorization: Bearer $JIRA_API_TOKEN" \
"https://jira.xwiki.org/rest/api/2/issue/<KEY>" -o /tmp/issue.json
From the response's fields, collect:
summary, description (the vulnerability write-up, in JIRA wiki markup — usually has an
h2. Impact / h2. PoC structure — lift the impact from it, never the PoC), security (confirms it's
restricted), priority, versions (Affects), fixVersions, reporter. An empty security
means the issue is public: either it was disclosed, and the check below finds its published
advisory, or it was filed public, and the policy's checklist ("Verify that the Confidential level
is set") comes first — tell the user before drafting.?expand=changelog, comments, attachments) must describe only this vulnerability,
since disclosure makes all of it public. If it covers another independently fixable one, stop and
tell the user it must be split first (kb/processes/security-policy.md).customfield_11870, e.g. CVSS:4.0/…) and its numeric score
(customfield_11871); both fields are described in kb/processes/security-policy.md.customfield_* holding a devSummaryJson/pull-request bean can reveal whether a fix PR/commit
already exists — useful for the Patches/References sections once a fix lands (remember: the fix
commit message keeps the JIRA key but replaces the issue title with a neutral summary, per
[[commit-messages]], so don't search it for the title's words).If the fetch fails — no JIRA_API_TOKEN set, a network/auth error, or a 404 (which for a
restricted issue usually means the account behind the token isn't in the security group, not that
the key is wrong) — say so, then ask the user directly for whatever Step 4's mapping table needs
instead of guessing or stalling on the fetch. Ask specifically for: the title/summary; the
vulnerability description (impact, affected component, how to reproduce); affected version(s) and
fix version(s) if already decided; the reporter's name and whether they've agreed to be credited; and
a CVSS vector/score if one has already been agreed on. Draft with whatever they provide, and mark
anything still missing as an explicit [TBD] in the draft rather than inventing a value for it.
The JIRA web link can be missing (XWIKI-23438 has none, yet GHSA-53gx-j3p6-2rw9 covers it), so check both places:
curl -s -H "Authorization: Bearer $JIRA_API_TOKEN" "https://jira.xwiki.org/rest/api/2/issue/<KEY>/remotelink" \
| jq '.[].object | select(.title == "Security Advisory") | .url'
gh api --paginate "repos/<owner>/<repo>/security-advisories?per_page=100" \
--jq '.[] | select((.description // "") | test("<KEY>\\b")) | {ghsa_id, state, html_url}'
GitHub lists drafts only to an organization owner or a collaborator on them, so an empty result
from another account rules out published advisories only. When one exists, stop and show it to the
user: the job becomes reviewing or editing it (references/github-advisory.md), never a second one.
The template lives on the XWiki Security Policy page (dev.xwiki.org, space
Community.SecurityPolicy). Read it fresh every time — it is community-maintained and can change;
never reuse a copy embedded in a previous conversation, this skill, or another advisory as the
source of truth. It's a public page, reachable over REST without a token:
curl -s "https://dev.xwiki.org/xwiki/rest/wikis/dev/spaces/Community/spaces/SecurityPolicy/pages/WebHome" \
-H "Accept: application/json"
Take the content field (xwiki/2.1 syntax). Three parts of it matter:
The = What's the process to handle security issues? = section is the committer checklist the
whole job is measured against — it carries steps that live nowhere else, in particular the
Security Advisory Application import and the CVE request of Step 6. Read it, don't stop at the two
sections below.
The = Security Advisory template and information = section holds the literal markdown
template, inside a {{code language="markdown"}} … {{/code}} block — copy its section structure
(### Impact, #### CVSS Score Computation Details table, ### Patches, ### Workarounds,
### References, ### For more information, ### Attribution) verbatim; don't invent, drop, or
reorder sections.
The = Severity = section above it has the CVSS banding and the per-metric best practices.
Take every value from it, never from this skill or from generic CVSS instinct — the policy
constrains more metrics than a calculator's defaults suggest: Attack Vector, the mapping from
XWiki rights to Privileges Required, the cap that a right required to exploit puts on the impacts,
and the impact defaults fixed per vulnerability class (XSS and SSRF each have one, covering the
subsequent system as well as the vulnerable one). Use these to justify each row of the CVSS table
with a one-line comment, the way past advisories do. kb/processes/security-policy.md has the
traps to watch for when reading them.
If the page has moved (404), rediscover it instead of guessing a new path:
curl -s -G "https://dev.xwiki.org/xwiki/rest/wikis/dev/query" \
--data-urlencode "q=title:'XWiki Security Policy'" --data-urlencode "type=solr"
Step 2's guidance gives the policy behind each metric, but a good one-line comment for a CVSS table row is a matter of precedent, not policy. Pull a few already-published XWiki advisories — never a still-private/draft one — whose vector is close to the one at hand, and read how they worded that row's comment:
gh api --paginate "repos/<owner>/<repo>/security-advisories?state=published&per_page=100" --jq \
'.[] | {ghsa_id, summary, cvss: (.cvss_severities.cvss_v4.vector_string // .cvss.vector_string)}'
gh api repos/<owner>/<repo>/security-advisories/<ghsa_id> --jq '.description'
(.cvss holds only a CVSS 3 vector.) Precedents that comment each metric are rare: the published
advisories give the vector alone, except GHSA-5446-j3r6-h5xp (xwiki-contrib/application-activitypub,
the template's table) and GHSA-jm43-hrq7-r7w6 (xwiki-platform, a "CVSS explanation" list). Find
others with select(.description | test("CVSS Score Computation|Attack vector:"; "i")); without a
close one, write each comment from Step 2's guidance alone.
Match the register — tight and mechanism-specific, one sentence per row (e.g. "Reachable by a
guest, who does not need an account." rather than a generic "Low privileges needed") — not the
literal wording. This is wording inspiration only: the advisory's section structure still comes
exclusively from the live template fetched in Step 2, never from a past advisory's layout, and
past advisories are no example for the Impact section's level of detail (many contain a PoC, see
"No proof of concept in the advisory") nor for the version ranges (see
references/affected-products.md).
Fill the template using the mapping below — from the JIRA fields fetched in Step 1, or from the user's direct answers when that fetch failed. Leave nothing as a silent placeholder: flag anything still missing to the user instead of guessing it.
One advisory for several issues. A vulnerability is sometimes filed as several JIRA issues, a second one "for advisory packaging" (e.g. a separate impact of the same attack). They get one advisory: its Impact describes each of them, its References list every issue, its affected products cover the modules of all of them, and it carries a single CVSS score, the highest. Each issue keeps the vector of its own impact in JIRA and gets the advisory link (Step 6).
| Advisory field | Source |
|---|---|
| Title | JIRA summary |
| Impact prose | JIRA description's explanation, rewritten as affected feature + attack vector + requirements + impact + affected versions, in your own words — without the PoC (see "No proof of concept in the advisory") and not a verbatim copy-paste of internal notes |
| CVSS table | The vector found in Step 1, valued per the Step 2 scoring guidance, worded per the Step 3 precedent for the comment column |
| Affected package(s) / vulnerable version range | The module(s) touched, and versions (Affects), verified against the code history → GitHub's version-range syntax — see "Affected products (packages) and version ranges" below — the checks are in references/affected-products.md, which also covers updating JIRA when they differ |
| Patches | fixVersions: "has been patched in…" once the fix is committed on every branch, released or not (the advisory is only published after the releases); "will be fixed in…" before that. While fixVersions is still empty, take each maintained branch's next release from its root pom.xml (kb/conventions/versioning.md), and mark them as to be confirmed |
| Workarounds | From the JIRA description if a mitigation is mentioned, or patching the fixed file in the deployed WAR (e.g. a template), else "no known workaround other than upgrading" |
| References | The JIRA issue URL, plus the fix commit's SHA/URL on master (no backports) — use an explicit placeholder such as [commit SHA once merged] until the fix actually lands, matching the Patches row above |
| Credit / Attribution | reporter, or a named security researcher from the description — ask the user to confirm the reporter consents to be credited before naming them. Credit type (GitHub's definitions): finder for the person who discovered the vulnerability, also when they reported it themselves; reporter only for someone who passed on a finding that isn't theirs. Also link their account in the Attribution section: [@login](https://github.com/login) |
CWE: pick the closest match from https://cwe.mitre.org/data/index.html — this is a per-vulnerability
judgment call, not something to default without reasoning about the actual flaw (e.g. broken access
control against a user-controlled identifier is usually CWE-639, missing authorization generally is
CWE-862, XSS is CWE-79, etc.). Check the entry's Vulnerability Mapping "Usage" on its MITRE page:
ALLOWED or ALLOWED-WITH-REVIEW only. Content executed with the wrong author's rights is CWE-270,
not the discouraged CWE-269.
Every advisory needs them, and they are where past advisories went wrong, so before writing any
affected product or range, open references/affected-products.md and work through all of it.
Never copy the ranges of a past XWiki advisory. The file covers these checks, and the draft records
the outcome of each one, "none" included:
maven ecosystem;legacy- infix, confirmed in its pom);artifactItem, an assembly <dependencySet>, a webjar);Write the full draft — both the metadata (title, CVSS vector/score, CWE, affected versions, credits)
and the markdown body for the GitHub advisory's description field — to a file under the work
directory, e.g. <work>/<repo>/<date>-<JIRA-KEY>-security-advisory/advisory-draft.md, headed with a
CONFIDENTIAL, do not commit or post publicly banner. Show it to the user in the conversation too.
End by listing what remains after the draft, even when the user does not go on to Step 6: create the GitHub advisory, add the Security team, link it on the JIRA issue(s), import it into the Security Advisory Application once the fix is merged (that import is what triggers the disclosure reminders), and the CVE step of Step 6.
Creating the advisory is visible to every organization owner at once, so it happens only when the
user asks for it, and only after re-running Step 1's check that no advisory exists yet. Then open references/github-advisory.md and follow it: the create request, the
Security team and the credited researcher as collaborators, editing a draft others may have changed, the JIRA link, the Security
Advisory Application import and the CVE step. Two rules hold whatever the user asks:
kb/processes/security-policy.md.customfield_11870 → it may not have been scored yet; compute it with the
user using the Step 2 guidance and the official calculator (https://www.first.org/cvss/v4.0/)
rather than guessing a score.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub xwiki/xwiki-dev-llm --plugin xwiki38 skills in this plugin
/xwiki-backportBackport any change (bug fix, feature, refactor, or test) to an older branch of an XWiki repo (xwiki-platform / xwiki-commons / xwiki-rendering / xwiki-contrib). Cherry-pick `-x` the source commit(s) into a worktree, ADAPT the result to the older branch (module pom versions, Java level, `@since` tags, data migration versions and skip ranges, style/API divergence), verify it compiles against that branch, and push / open a PR. Use whenever a commit that exists on one branch needs to be applied to an older/maintenance branch. For the `testneeded`-labelled test sweep use xwiki-backport-testneeded (which builds on this skill); for Maven commands use xwiki-build; for PR/commit conventions use xwiki-pull-request; for the versioning/`@since` conventions (the format and what carries `@since`) use xwiki-knowledge./xwiki-backport-testneededBackport the automated test of one JIRA issue labelled `testneeded` to the currently-supported stable branches, adjust its `@since` tags across all branches, and open the PRs. Use when asked to backport the test of a given testneeded issue, or to catch a stable branch up with a recently-added test. (For several issues at once, the user will say so — then apply this per issue.) This is the test-specific layer on top of xwiki-backport (which owns the generic cherry-pick / adapt-to-branch / verify mechanics — including the mandatory pom-version, Java-version and `@since` checks). For Maven use xwiki-build; for PR/commit conventions use xwiki-pull-request; for the `@since` rules use xwiki-knowledge; for querying JIRA (the testneeded sweep) use xwiki-jira.