Skip to content

fix: improve typing of docker registry client#6837

Open
d3vco wants to merge 1 commit into
mainfrom
chore/update-docker-registry-client
Open

fix: improve typing of docker registry client#6837
d3vco wants to merge 1 commit into
mainfrom
chore/update-docker-registry-client

Conversation

@d3vco
Copy link
Copy Markdown
Contributor

@d3vco d3vco commented May 22, 2026

Pull Request Submission Checklist

  • Follows CONTRIBUTING guidelines
  • Commit messages
    are release-note ready, emphasizing
    what was changed, not how.
  • Includes detailed description of changes
  • Contains risk assessment (Low | Medium | High)
  • Highlights breaking API changes (if applicable)
  • Links to automated tests covering new functionality
  • Includes manual testing instructions (if necessary)
  • Updates relevant GitBook documentation (PR link: ___)
  • Includes product update to be announced in the next stable release notes

What does this PR do?

Bumps @snyk/docker-registry-v2-client from ^2.24.1 to ^4.0.2 and adapts the registry client to use the typed ClientOptions. This type check indicated a typo in the acceptLayer option.

The new client also bumps needle from ^3.3.0 to ^3.5.0. To make this change, the needle patch added here was regenerated for the new version.

Where should the reviewer start?

src/cli/commands/test/iac/local-execution/rules/oci-registry.ts: only call-site change needed to accommodate the v4 client API.

How should this be manually tested?

  1. Run an IaC scan that pulls rules from an OCI registry (e.g. snyk iac test with a custom rules bundle) and confirm rules are fetched successfully.
  2. Verify no regressions in standard IaC test flows.

What's the product update that needs to be communicated to CLI users?

No user-facing change, internal dependency update.

Risk assessment (Low | Medium | High)?

Low — dependency bump with a direct call-site adaptation. No logic changes; the patch preserves existing behaviour.

Any background context you want to provide?

See Jira ticket for more on the impetus for this version bump.

What are the relevant tickets?

Jira ticket

@d3vco d3vco requested review from a team as code owners May 22, 2026 17:29
@snyk-io
Copy link
Copy Markdown

snyk-io Bot commented May 22, 2026

⚠️ Snyk checks are incomplete.

Status Scan Engine Critical High Medium Low Total (0)
⚠️ Open Source Security 0 0 0 0 See details
⚠️ Licenses 0 0 0 0 See details
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 22, 2026

Warnings
⚠️

You've modified files in src/ directory, but haven't updated anything in test folder. Is there something that could be tested?

Generated by 🚫 dangerJS against 7fe16ed

@snyk-pr-review-bot

This comment has been minimized.

@d3vco d3vco changed the title Chore/update docker registry client chore: update docker registry client May 22, 2026
@d3vco d3vco changed the title chore: update docker registry client chore: improve typing of docker registry client May 22, 2026
@d3vco d3vco force-pushed the chore/update-docker-registry-client branch from 3ea24c3 to de43867 Compare May 22, 2026 17:34
@snyk-pr-review-bot

This comment has been minimized.

@d3vco d3vco force-pushed the chore/update-docker-registry-client branch 2 times, most recently from f8e63a1 to 8ccff1a Compare May 22, 2026 17:36
@d3vco d3vco changed the title chore: improve typing of docker registry client fix: improve typing of docker registry client May 22, 2026
@snyk-pr-review-bot

This comment has been minimized.

@snyk-pr-review-bot

This comment has been minimized.

@d3vco d3vco force-pushed the chore/update-docker-registry-client branch from 8ccff1a to c190aef Compare May 22, 2026 17:45
Updates client options to use the new `ClientOptions` type and corrects
an error in the `acceptLayer` option name.

Replaces patches/needle+3.3.0.patch with patches/needle+3.5.0.patch to
restore the resp.resume() redirect fix after needle was upgraded to 3.5.0
by @snyk/docker-registry-v2-client@4.0.2.
@d3vco d3vco force-pushed the chore/update-docker-registry-client branch from c190aef to 7fe16ed Compare May 22, 2026 17:46
@snyk-pr-review-bot

This comment has been minimized.

@snyk-pr-review-bot
Copy link
Copy Markdown

PR Reviewer Guide 🔍

🧪 No relevant tests
🔒 No security concerns identified
⚡ No major issues detected
📚 Repository Context Analyzed

This review considered 8 relevant code sections from 2 files (average relevance: 0.66)

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.

1 participant