Skip to content

XRAY-169343 - Parse the new all-versions-blocked message for npm and PyPI - #950

Open
vageeshabr wants to merge 5 commits into
jfrog:devfrom
vageeshabr:feature/XRAY-169343
Open

vageeshabr wants to merge 5 commits into
jfrog:devfrom
vageeshabr:feature/XRAY-169343

Conversation

@vageeshabr

@vageeshabr vageeshabr commented Nov 17, 2026 •

Copy link
Copy Markdown

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

  • npm (debug log) and PyPI (403 body) parse the new message. The old 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.
  • Every listed policy gets its own row. The Explanation is "All versions blocked". The Recommendation is Xray's Note followed by its Action; for a transitive dependency, it comes after a sentence naming the parent. Both cells are printed once per package.
  • The Catalog link from a block message is kept, for every package type: as catalog_url in 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.
  • A PyPI requirement without a version (e.g. 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:
Screenshot 2026-11-17 at 9 38 00 AM

After: (when the terminal supports hyperlinks)
Screenshot 2026-11-19 at 10 36 53 AM
After: (when the terminal doesn't support hyperlinks)
Screenshot 2026-11-19 at 10 37 45 AM

🤖 Generated with Claude Code

…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>
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI; Enforced overrides: Organization, Workspace
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b1df307b-5f07-4ea2-9abc-ddea469e3af3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

@vageeshabr
vageeshabr marked this pull request as ready for review November 17, 2026 03:50
@vageeshabr

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

@gauriy-tech gauriy-tech added the safe to test Approve running integration tests on a pull request label Nov 17, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label Nov 17, 2026
Comment thread commands/curation/curationaudit.go Resolved
Comment thread commands/curation/curationaudit.go Resolved
Comment thread commands/curation/curationaudit.go Resolved
@gauriy-tech

Copy link
Copy Markdown
Collaborator

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>
@gauriy-tech gauriy-tech added the safe to test Approve running integration tests on a pull request label Nov 18, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label Nov 18, 2026
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>
@gauriy-tech gauriy-tech added the safe to test Approve running integration tests on a pull request label Nov 18, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label Nov 18, 2026
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>
@gauriy-tech gauriy-tech added the safe to test Approve running integration tests on a pull request label Nov 20, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label Nov 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

👍 Frogbot scanned this pull request and did not find any new security issues.


This branch was successfully deployed

1 active deployment
frogbot — 5c12c70e Deployed Nov 18, 2026 by vageeshabr via scan-pull-request #4817
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.

2 participants