sourceconditiontarget

✔

✔

✗

Description

The vulnerability/osv resource checks a package version against the OSV vulnerability database, which aggregates advisories such as GitHub Security Advisories, the Go vulnerability database and the Python Packaging Advisory Database. Each vulnerability is reported under its lowest ID, with its aliases (for example a GHSA advisory and its CVE) merged into one entry.

source

Depending on key, returns either the lowest version, starting from version, that has no known vulnerabilities (fixedversion, the default), or the comma-separated IDs of the known vulnerabilities affecting version (ids).

condition

Passes when the version has no known vulnerabilities, and fails with the list of vulnerabilities otherwise. The version comes from version, or from the source output when version is empty.

target

Not supported, a target fails with target not supported for the vulnerability/osv plugin. Use the source output in a target of another kind, such as the "File" resource or the "Yaml" resource.

Note
An scm attached to a condition is ignored, with a warning. The lookup always goes to the OSV API.

Parameters

NameTypeDescriptionRequired
ecosystemstring

“ecosystem” defines the OSV ecosystem of the package.

compatible:

  • source
  • condition

remark:

  • the value is case sensitive: the OSV API rejects “pypi” or “debian”.
  • “ecosystem” and “name” are required unless “purl” is set.
  • “ecosystem” and “purl” are mutually exclusive.
  • accepted values, as published by osv.dev at https://osv-vulnerabilities.storage.googleapis.com/ecosystems.txt, are: AlmaLinux, Alpaquita, Alpine, Android, Azure Linux, BellSoft Hardened Containers, Bitnami, Chainguard, CleanStart, CRAN, crates.io, Debian, Echo, GHC, GIT, GitHub Actions, Go, GSD, Hackage, Hex, Julia, Linux, Mageia, Maven, MinimOS, npm, NuGet, opam, openEuler, openSUSE, OSS-Fuzz, Packagist, Pub, PyPI, Red Hat, Rocky Linux, Root, RubyGems, SUSE, SwiftURL, TuxCare, Ubuntu, UVI, VSCode and Wolfi.
  • Linux distributions accept a release suffix, such as “Debian:12” or “Ubuntu:22.04:LTS”.
  • GIT expects the repository URL as name and a tag as version, such as “https://github.com/libarchive/libarchive.git” and “v3.7.4”.
  • the source key “fixedversion” only supports Go, npm, crates.io, NuGet, Hex, Pub and PyPI. Every ecosystem works with the source key “ids” and with conditions.

example:

  • ecosystem: PyPI
  • ecosystem: npm
  • ecosystem: Go
  • ecosystem: crates.io
  • ecosystem: Debian:12
  • ecosystem: Ubuntu:22.04:LTS
ignorearray

“ignore” defines the vulnerability IDs or aliases to disregard.

compatible:

  • source
  • condition

example:

  • ignore:
    • GHSA-cpwx-vrp4-4pq7
    • CVE-2025-27516
keystring

“key” defines the source output.

compatible:

  • source

default: fixedversion

remark:

  • accepted values are:
    • “fixedversion”: the lowest version, from “version”, without known vulnerabilities. Supported ecosystems are Go, npm, crates.io, NuGet, Hex, Pub and PyPI. Pre-release fixes are only considered when “version” is itself a pre-release.
    • “ids”: the comma separated IDs of the known vulnerabilities affecting “version”.
  • this source answers “which version fixes the known vulnerabilities?”, not “which version is the latest?”. “fixedversion” returns the lowest version clearing the advisories affecting “version”, so it is a security floor, not a release tracker. Combine it with a source such as “githubrelease” to also stay current.
  • its answers are only as good as osv.dev and deps.dev, which index published releases with some delay, so a very recent release may be missing or not yet linked to an advisory.
  • when no published version fixes every known vulnerability, the source is skipped.

example:

  • key: ids
minseveritystring

“minseverity” defines the minimum severity of the vulnerabilities to account for.

compatible:

  • source
  • condition

default: empty, so every vulnerability is accounted for.

remark:

  • accepted values are LOW, MODERATE, MEDIUM, HIGH and CRITICAL. MEDIUM is an alias of MODERATE.
  • the severity comes from GitHub advisories. Vulnerabilities without one are always accounted for.

example:

  • minseverity: HIGH
namestring

“name” defines the package name within the ecosystem.

compatible:

  • source
  • condition

remark:

  • “ecosystem” and “name” are required unless “purl” is set.
  • “name” and “purl” are mutually exclusive.

example:

  • name: jinja2
  • name: golang.org/x/net
  • name: org.apache.logging.log4j:log4j-core
  • name: “@angular/core”
purlstring

“purl” defines the package URL, without version.

compatible:

  • source
  • condition

remark:

  • “purl” is mutually exclusive with “ecosystem” and “name”.
  • it must start with “pkg:” and must not contain a version.
  • the ecosystem is derived from the package URL type: cargo (crates.io), composer (Packagist), gem (RubyGems), golang (Go), hex (Hex), maven (Maven), npm (npm), nuget (NuGet), pub (Pub) and pypi (PyPI). Vulnerabilities of other package URL types are only matched on the package URL itself, and the source key “fixedversion” does not support them.

example:

  • purl: pkg:pypi/jinja2
  • purl: pkg:golang/golang.org/x/net
  • purl: pkg:npm/%40angular/core
urlstring

“url” defines the OSV API URL.

compatible:

  • source
  • condition

default: https://api.osv.dev

versionstring

“version” defines the package version to check.

compatible:

  • source
  • condition

default: in a condition, the output of the associated source.

remark:

  • “version” is required in a source.

The generated table above stays empty until the Updatecli JSON schema published with this website includes the vulnerability/osv resource. Until then, these are the parameters:

NameStageDescription

ecosystem

source, condition

The OSV ecosystem of the package, such as PyPI, npm, Go, crates.io, Maven, Debian:12 or Ubuntu:22.04:LTS. The value is case-sensitive: the OSV API rejects pypi or debian.

name

source, condition

The package name within the ecosystem, such as jinja2, golang.org/x/net, org.apache.logging.log4j:log4j-core or @angular/core.

purl

source, condition

The package URL, without a version, such as pkg:pypi/jinja2 or pkg:npm/%40angular/core. Replaces ecosystem and name.

version

source, condition

The package version to check. Required for a source. A condition falls back to the source output when it is empty.

key

source

What the source returns: fixedversion (default) or ids.

minseverity

source, condition

Only account for vulnerabilities at or above this severity: LOW, MODERATE (or its alias MEDIUM), HIGH or CRITICAL.

ignore

source, condition

Vulnerability IDs or aliases to disregard, such as GHSA-cpwx-vrp4-4pq7 or CVE-2025-27516.

url

source, condition

The OSV API URL. Defaults to https://api.osv.dev.

Identifying the package

Set either ecosystem and name, or purl. The resource validates the spec before running and reports the problems it finds together, for example an unsupported key alongside a bad package:

  • purl together with ecosystem or name fails with vulnerability/osv purl is mutually exclusive with ecosystem and name.

  • Neither fails with vulnerability/osv package not defined, set ecosystem and name, or purl.

  • A purl carrying a version fails with vulnerability/osv purl "pkg:pypi/jinja2@3.1.2" must not contain a version, use the version field instead.

  • A source without version fails with vulnerability/osv source requires a version.

With purl, the ecosystem comes from the package URL type: cargo (crates.io), composer (Packagist), gem (RubyGems), golang (Go), hex (Hex), maven (Maven), npm (npm), nuget (NuGet), pub (Pub) and pypi (PyPI). Other package URL types are only matched on the package URL itself, and fixedversion does not support them.

Severity and ignored vulnerabilities

minseverity relies on the severity of the GitHub advisory. A vulnerability without one is always accounted for, whatever the threshold. Set it deliberately: with minseverity: HIGH, a version whose advisories are all rated MODERATE passes the condition.

ignore matches both IDs and aliases, case-insensitively, so a vulnerability can be ignored by its CVE number even when OSV reports it under a GHSA ID.

The fixed version is a security floor

fixedversion answers "which version fixes the known vulnerabilities?", not "which version is the latest?". It returns the lowest version, from version onwards, that clears the advisories affecting version, and returns version itself when it has no known vulnerabilities.

  • It supports the Go, npm, crates.io, NuGet, Hex, Pub and PyPI ecosystems. Every ecosystem works with key: ids and with conditions.

  • A pre-release fix is only considered when version is itself a pre-release.

  • When no published version fixes every known vulnerability yet, the source is skipped rather than failed, and the pipeline does not update anything.

Combine it with a source such as "PyPI" or "GitHub Release" when you also want to stay on the latest release: the condition example below takes the latest release and only writes it when it has no known vulnerability.

When the source feeds a target that changes something, the pipeline changelog, used in the pull request description, lists the vulnerabilities fixed between the two versions, along with the latest published version of the package, as recorded by deps.dev. The changelog is best effort: a failing lookup leaves it out without failing the pipeline.

Limitations

  • The answers are only as good as osv.dev and deps.dev, which index published releases with some delay. A very recent release may be missing, or not yet linked to an advisory.

  • The resource needs network access to the OSV API, or to the mirror set in url.

  • No authentication is supported.

Examples

Raise a package to its fixed version

The source returns 3.1.6, the lowest jinja2 release that fixes the five known vulnerabilities of 3.1.2, and the target pins it in requirements.txt.

# updatecli.yaml
name: Raise jinja2 to the lowest version without known vulnerabilities

sources:
  jinja2:
    name: Lowest jinja2 version fixing the vulnerabilities of 3.1.2
    kind: vulnerability/osv
    spec:
      ecosystem: PyPI
      name: jinja2
      version: 3.1.2

targets:
  requirements:
    name: Pin jinja2 in requirements.txt
    kind: file
    sourceid: jinja2
    spec:
      file: requirements.txt
      matchpattern: 'jinja2==.*'
      replacepattern: 'jinja2=={{ source "jinja2" }}'

Only bump to a version without known vulnerabilities

The source takes the latest requests release from PyPI, and the condition only lets the target run when that release has no known vulnerability rated HIGH or CRITICAL.

# updatecli.yaml
name: Only bump requests when the new version has no known high or critical vulnerability

sources:
  requests:
    name: Latest requests version on PyPI
    kind: pypi
    spec:
      name: requests

conditions:
  noVulnerability:
    name: The new requests version has no known high or critical vulnerability
    kind: vulnerability/osv
    sourceid: requests
    spec:
      purl: pkg:pypi/requests
      minseverity: HIGH

targets:
  requirements:
    name: Pin requests in requirements.txt
    kind: file
    sourceid: requests
    spec:
      file: requirements.txt
      matchpattern: 'requests==.*'
      replacepattern: 'requests=={{ source "requests" }}'

When the condition fails, it lists what it found:

✗ 5 known vulnerabilities for version "3.1.2" of PyPI package "jinja2":
  * GHSA-cpwx-vrp4-4pq7 (CVE-2025-27516, PYSEC-2026-1471) [MODERATE] Jinja2 vulnerable to sandbox breakout through attr filter selecting format method - fixed in: 3.1.6
  * GHSA-gmj6-6f8f-6699 (CVE-2024-56201, PYSEC-2026-1472) [MODERATE] Jinja has a sandbox breakout through malicious filenames - fixed in: 3.1.5
  ...

List the known vulnerabilities

With key: ids, the source returns the IDs of the known vulnerabilities, here for the Go module golang.org/x/net at v0.20.0, with one of them ignored.

# updatecli.yaml
name: List the known vulnerabilities of golang.org/x/net v0.20.0

sources:
  vulnerabilities:
    name: Known vulnerabilities of golang.org/x/net v0.20.0
    kind: vulnerability/osv
    spec:
      ecosystem: Go
      name: golang.org/x/net
      version: v0.20.0
      key: ids
      ignore:
        - GO-2024-2687