uv malware check fails with "invalid peer certificate: UnknownIssuer" when run through sfw

Open
#59 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Quiet

Research direction

Reproduce uv add duckdb through the provided _sfw_wrap shell wrapper and compare it with command uv add duckdb. Start with the wrapper's handling of the OSV request to https://api.osv.dev/v1/querybatch; done means the malware check completes successfully through sfw without the UnknownIssuer error.

Written by the indexing model from the issue text.

Description

Environment

  • OS: Linux Mint
  • uv: 0.11.16 (x86_64-unknown-linux-gnu)
  • sfw: Socket Firewall Free, version 1.13.1

Shell wrapper

_sfw_wrap() {
  if ! command -v sfw >/dev/null 2>&1; then
    printf 'ERROR: Socket Firewall (sfw) is not installed; refusing to run "%s">
    printf '       Install it with: %s --install\n' "$_SFW_INSTALL_SCRIPT" >&2
    printf '       Or bypass the firewall for this call with: command %s ...\n'>
    return 127
  fi

  command sfw "$@"
}

uv() {
    _sfw_wrap uv "$@"
}

Steps

  1. Run:
    uv add duckdb

Expected

Package installs successfully.

Actual

Resolved 17 packages in 3ms
warning: Malware checks are experimental and may change without warning. Pass `--preview-features malware-check` to disable this warning.
error: Malware check failed due to an error from OSV
  Caused by: Request failed after 3 retries
  Caused by: error sending request for url (https://api.osv.dev/v1/querybatch)
  Caused by: client error (Connect)
  Caused by: invalid peer certificate: UnknownIssuer

Control experiment

Running the exact same command without the sfw wrapper succeeds:

command uv add duckdb

This installs successfully.

Notes

  • Package resolution succeeds.
  • Failure only occurs during uv's OSV malware check.
  • Bypassing sfw immediately resolves the issue.
Dominant language
No language data
Stars
271
Forks
8
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from SocketDev/sfw-free

All issues in SocketDev/sfw-free

Similar issues

More Networking issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.