Skip to content

Switch Package pane from P3M's /repo/vulns endpoint to /filter/packages #17446

Closed

Description

@jstruzik

Problem Statement

In Package Manager's 2026.04.0 release we inadvertently removed the /repos/{repo}/vulns endpoint without deprecating for clients. We've since restored the behavior in 2026.04.1 but would like to suggest that clients move to the more general POST /filter/packages endpoint, which supports vulnerability filtering and has much more efficient responses.

Proposed Behaviour

Migrate /repos/{repo}/vulns callers to POST /filter/packages. Specifically

.rs.addFunction("ppm.getVulnerabilityInformationImpl", function(repoUrl)
{
# If we have cached information available, use it.
if (exists(repoUrl, envir = .rs.ppm.vulns))
return(get(repoUrl, envir = .rs.ppm.vulns))
# Request vulnerabilities
ppmUrl <- .rs.ppm.fromRepositoryUrl(repoUrl)
if (length(ppmUrl) == 0L)
return(structure(list(), names = character()))
fmt <- "%s/__api__/repos/%s/vulns"
endpoint <- sprintf(fmt, ppmUrl$root, ppmUrl$repos)
destfile <- tempfile("ppm-vuln-")
status <- tryCatch(
download.file(endpoint, destfile = destfile, quiet = TRUE),
condition = identity
)
if (inherits(status, "condition"))
return(structure(list(), names = character()))
contents <- readLines(destfile, warn = FALSE)
json <- .rs.fromJSON(contents)
vulns <- .rs.markScalars(json)
# Cache the result and return.
assign(repoUrl, vulns, envir = .rs.ppm.vulns)
vulns
})

Example curl

curl -X POST -H "Content-Type: application/json" \
     -d '{"repo": "my-repo", "has_vulns": true}' \
     https://ppmurl/__api__/filter/packages

Activity

  1. added
    new
    on Apr 22, 2026
  2. added and removed
    new
    on Apr 22, 2026
  3. added this to the Golden Wattle milestone on Apr 29, 2026
  4. self-assigned this
    on May 12, 2026
  5. ronblum commented on May 17, 2026

    @ronblum
    Contributor

    Verified in RStudio Desktop 2026.05.0-daily+217 on Windows 11.

    Primarily:

    1. Point at the public PPM CRAN repo: options(repos = c(CRAN = "https://packagemanager.posit.co/cran/latest"))
    2. Install widgetframe (every published version is currently flagged by PPM with RSEC-2026-0): install.packages("widgetframe")
    3. Check for the warning for widgeframe in the Packages pane.
    4. Click on the warning icon and check the info in the pop-up.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions