Skip to main content

Module git

Module git 

Source
Expand description

A narrow, hardened boundary to git ls-remote.

The only network operation this binary performs. It reads one reference from one credential-free https:// repository and returns the object ID the reference points at. Everything about it is bounded: the transport is allowlisted, the process runs with no shell, no credential prompt, and no inherited Git configuration, and its time and output are capped. It writes nothing and downloads no code — a reference is a name and a hash.

Enums§

GitError
Why a lookup could not produce a result.

Functions§

accept
Validate that a repository URL is a credential-free https:// URL and a reference is a full refs/... name. Returns the reason on refusal.
ls_remote
The full object ID reference points at in repository, or None when the reference is absent.