Repository navigation
XRAY-169343 - Parse the new all-versions-blocked message for npm and PyPI - #950
vageeshabr wants to merge 5 commits into
Conversation
…PyPI jf ca reads Xray's "All versions of 'X' (repo) are blocked from download by JFrog Curation." message from the npm debug log and from the PyPI 403 body. It reports every listed policy, uses the Note line as the explanation and the Action line as the recommendation, and keeps parsing the old message format. The Catalog link of a block message is kept as catalog_url in the JSON output, listed after the table, and links the package name in terminals that support hyperlinks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
All contributors have signed the CLA ✍️ ✅ |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
|
I have read the CLA Document and I hereby sign the CLA |
|
The PR checklist still has "static analysis checks passed", "tests have passed" and the last item (Contributing page / ReadMe page / CI Workflow files, "if needed") unticked, although all checks on this head are green. Could you tick them, and leave the last one as is or mark it N/A if nothing there needed an update? Review generated by xray-pr-review |
For a whole-package block the Explanation is "All versions blocked" and the Recommendation is Xray's Note line followed by its Action line. Both cells are printed once per package instead of once per policy. The Catalog links after the table are listed once per package name. In terminals that support hyperlinks the heading is bold and linked package names are blue and underlined. The all-versions message is matched case-insensitively. A PyPI requirement without a version whose versions are all blocked is reported as a blocked row instead of failing the audit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A hyperlinked package name was cut inside its escape sequence when the table wrapped a name wider than its column. The package name is plain text again, and terminals that support hyperlinks get a "Blocked Package Link" column with an "Open ↗" link, as in download-status. The column is omitted when no row has a link. The "For more details, visit:" list is printed only when the terminal does not support hyperlinks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The test compared the link cell with an unstyled hyperlink, which fails where colour output is enabled, such as on Windows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Xray now blocks a package whose versions are all blocked with a new message: "All versions of 'X' (repo) are blocked from download by JFrog Curation.", followed by the blocking policies, a Note, an Action and a JFrog Catalog link. jf ca didn't recognise it, so npm reported such packages as unresolved and PyPI showed an unknown policy.
What changes
All versions blocked - {policy:…,condition:…}format is still parsed. If Xray rewords the message after its first sentence, the package is still reported as a whole-package block.catalog_urlin the JSON output, and in a "For more details, visit:" list after the table, one line per package. In terminals that support hyperlinks, linked package names are blue, underlined and clickable. For a pinned PyPI version whose whole package is blocked, the link goes to the package page.sccp) whose versions are all blocked is now reported as a blocked row. Before, the audit failed with "Directory '.' is not installable".Related tickets:
Before:

After: (when the terminal supports hyperlinks)


After: (when the terminal doesn't support hyperlinks)
devbranch.🤖 Generated with Claude Code