Skip to content

Support for scanning renv lockfiles for the R language #642

@dijitali

Description

@dijitali

Following the addition of CRAN for the R language to the OSV database (google/osv.dev#1477), it would be helpful if this CLI supported scanning renv lockfiles.

A workaround at present is to parse the lockfile with jq and generate a custom lockfile:

jq '{
    results: [
      {
        packages: [
          .Packages | to_entries[] | {
            package: {
              name: .key,
              version: .value.Version,
              ecosystem: "CRAN"
            }
          }
        ]
      }
    ]
  }' renv.lock > osv-renv-lock.json

osv-scanner --lockfile osv-scanner:./osv-renv-lock.json

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions