ecr.packages.search

Find the images that contain a package

GET /ecr/api/packagesIAM ecr:GetScanResultsRead

Every scan keeps the full package list of the image, vulnerable packages or not, so the question "which images contain this package" is answered the day an advisory is published, before any vulnerability database knows the CVE. Names match exactly (case-insensitive) unless contains=true. Images scanned before package lists were kept get one on their next scan.

Request syntax

GET /ecr/api/packages

Query parameters

  • nameRequired

    string

    Package name, case-insensitive (`log4j-core`, `openssl`, `next`)

    Constraints: 1-214 chars

  • containsOptional

    enum

    true matches every package whose name contains `name`; exact when omitted

    One of: true, false

  • versionOptional

    string

    Only this exact version

    Constraints: 1-128 chars

  • ecosystemOptional

    string

    Only this ecosystem as the scanner names it: `debian`, `alpine`, `npm`, `gomod` …

    Constraints: /^[a-z0-9-]{1,32}$/

  • limitOptional

    number

    Matches per page, 1–500; 100 when omitted

    Constraints: integer, 1-500

    Default: 100

  • offsetOptional

    number

    Matches to skip; 0 when omitted

    Constraints: integer, 0-1000000

    Default: 0

Response

200 with one page of matches (data), hasMore, and imagesWithPackages (how many images have a stored package list). Each match: repositoryId, repositoryName, manifestId, digest, tags, ecosystem, name, version, purl, target (the file or layer path it was found in), runningIn (apps running that digest), lastPulledAt, pushedAt.

A JSON response is wrapped as { "success": true, "data": … }; the CLI prints the whole body with --json.

Errors

  • 400The request does not pass the schema above. The body is { "error": …, "issues": […] }, one issue per field.
  • 401No credentials, or an access key that is unknown, revoked or expired.
  • 403The caller's policies do not allow ecr:GetScanResults on this resource. The body names the action and the resource, and the refusal is recorded in the audit log.
  • 404The resource does not exist in your organization.

Examples

The required parameters only, with example values. Replace id and the other placeholders with your own.

dcloud ecr packages search --name example

Generated from the API description, the same one the API checks requests against and the CLI is built from. MCP tool: dcloud_ecr_packages_search.