{"id":43272020,"url":"https://github.com/tep/net-conduit","last_synced_at":"2026-02-01T16:04:05.697Z","repository":{"id":57551988,"uuid":"124709742","full_name":"tep/net-conduit","owner":"tep","description":"A Go library to ease transferring open file descriptors between cooperating processes. ","archived":false,"fork":false,"pushed_at":"2023-06-26T18:32:24.000Z","size":33,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-24T12:18:49.328Z","etag":null,"topics":["file-descriptor","golang","linux","networking","unix"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tep.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-11T00:20:42.000Z","updated_at":"2024-04-19T13:55:38.000Z","dependencies_parsed_at":"2024-06-20T01:36:45.623Z","dependency_job_id":"5bed0372-7e74-4da0-9572-e6be511d8e8a","html_url":"https://github.com/tep/net-conduit","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tep/net-conduit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tep%2Fnet-conduit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tep%2Fnet-conduit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tep%2Fnet-conduit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tep%2Fnet-conduit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tep","download_url":"https://codeload.github.com/tep/net-conduit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tep%2Fnet-conduit/sbom","scorecard":{"id":874168,"data":{"date":"2025-08-11","repo":{"name":"github.com/tep/net-conduit","commit":"7a68661bc7849e9e2ae8c0738cb1b8bbe880a7dc"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/25 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-24T05:19:39.707Z","repository_id":57551988,"created_at":"2025-08-24T05:19:39.707Z","updated_at":"2025-08-24T05:19:39.707Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28981893,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T15:35:50.179Z","status":"ssl_error","status_checked_at":"2026-02-01T15:35:38.075Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["file-descriptor","golang","linux","networking","unix"],"created_at":"2026-02-01T16:04:05.616Z","updated_at":"2026-02-01T16:04:05.687Z","avatar_url":"https://github.com/tep.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n[![GoDoc](https://godoc.org/toolman.org/net/conduit?status.svg)](https://godoc.org/toolman.org/net/conduit) [![Go Report Card](https://goreportcard.com/badge/toolman.org/net/conduit)](https://goreportcard.com/report/toolman.org/net/conduit) [![Build Status](https://travis-ci.org/tep/net-conduit.svg?branch=master)](https://travis-ci.org/tep/net-conduit)\n\n# conduit\n`import \"toolman.org/net/conduit\"`\n\n* [Overview](#pkg-overview)\n* [Index](#pkg-index)\n* [Subdirectories](#pkg-subdirectories)\n\n## \u003ca name=\"pkg-overview\"\u003eOverview\u003c/a\u003e\n\n## Install\n\n``` sh\n  go get toolman.org/net/conduit\n```\n\n\n## \u003ca name=\"pkg-index\"\u003eIndex\u003c/a\u003e\n* [type Conduit](#Conduit)\n  * [func FromConn(conn net.Conn) (*Conduit, error)](#FromConn)\n  * [func FromFile(f *os.File) *Conduit](#FromFile)\n  * [func New(fd uintptr, name string) *Conduit](#New)\n  * [func (c *Conduit) Close() error](#Conduit.Close)\n  * [func (c *Conduit) ReceiveConn() (net.Conn, error)](#Conduit.ReceiveConn)\n  * [func (c *Conduit) ReceiveFD() (uintptr, error)](#Conduit.ReceiveFD)\n  * [func (c *Conduit) ReceiveFile() (*os.File, error)](#Conduit.ReceiveFile)\n  * [func (c *Conduit) TransferConn(conn net.Conn) error](#Conduit.TransferConn)\n  * [func (c *Conduit) TransferFD(fd uintptr) error](#Conduit.TransferFD)\n  * [func (c *Conduit) TransferFile(f *os.File) error](#Conduit.TransferFile)\n* [type ErrType](#ErrType)\n* [type Error](#Error)\n  * [func (e *Error) Type() ErrType](#Error.Type)\n\n\n#### \u003ca name=\"pkg-files\"\u003ePackage files\u003c/a\u003e\n[conduit.go](/src/toolman.org/net/conduit/conduit.go) [errors.go](/src/toolman.org/net/conduit/errors.go) [receive.go](/src/toolman.org/net/conduit/receive.go) [send.go](/src/toolman.org/net/conduit/send.go) \n\n\n\n\n\n\n## \u003ca name=\"Conduit\"\u003etype\u003c/a\u003e [Conduit](/src/target/conduit.go?s=476:537#L5)\n``` go\ntype Conduit struct {\n    // contains filtered or unexported fields\n}\n```\nA Conduit is a mechanism for transfering open file descriptors between\ncooperating processes. Transfers can take place over an os.File or net.Conn\nbut ultimately the transport descriptor must manifest as a socket capable of\ncarrying out-of-band control messages.\n\n\n\n\n\n\n\n### \u003ca name=\"FromConn\"\u003efunc\u003c/a\u003e [FromConn](/src/target/conduit.go?s=2020:2066#L45)\n``` go\nfunc FromConn(conn net.Conn) (*Conduit, error)\n```\nFromConn creates a new Conduit from the provided net.Conn. The underlying\ntype for the provided Conn must be one having a method with the signature\n\"File() (*os.File, error)\".  If not, a conduit.Error of type ErrNoFD will\nbe returned.\n\nA cloned os.File object is created by FromConn. If this cloning fails,\na conduit.Error of type ErrBadClone} will be returned. Since a clone is\nbeing created, you should be sure to call Close to avoid leaking a file\ndescriptor.\n\n\n### \u003ca name=\"FromFile\"\u003efunc\u003c/a\u003e [FromFile](/src/target/conduit.go?s=1465:1499#L32)\n``` go\nfunc FromFile(f *os.File) *Conduit\n```\nFromFile creates a new Conduit from the provided os.File.\n\n\n### \u003ca name=\"New\"\u003efunc\u003c/a\u003e [New](/src/target/conduit.go?s=1311:1353#L27)\n``` go\nfunc New(fd uintptr, name string) *Conduit\n```\nNew creates a new Conduit. The provided file descriptor is the transport\nover which other open FDs will be transferred and thus must be capable of\ncarrying out-of-band control messages. Note that this restriction is not\nenforced here but will instead cause later transfer actions to fail. The\ngiven name is as passed to os.NewFile.\n\n\n\n\n\n### \u003ca name=\"Conduit.Close\"\u003efunc\u003c/a\u003e (\\*Conduit) [Close](/src/target/conduit.go?s=870:901#L15)\n``` go\nfunc (c *Conduit) Close() error\n```\nClose is provided to allow the caller to close any cloned os.File objects\nthat may have been created while constructing a Conduit. If none were\ncreated, then calling Close has no effect and will return nil. Therefore,\nit's a good idea to always call Close when you're done with a Conduit.\nClose implements io.Closer\n\n\n\n\n### \u003ca name=\"Conduit.ReceiveConn\"\u003efunc\u003c/a\u003e (\\*Conduit) [ReceiveConn](/src/target/receive.go?s=2039:2088#L59)\n``` go\nfunc (c *Conduit) ReceiveConn() (net.Conn, error)\n```\nReceiveConn returns a net.Conn associated with the open file descriptor\nreceived through the Conduit.\n\nIn addition to the errors described for ReceiveFD, the following are also\npossible.  The act of receiving the Conn requires a clone of an underlying\nFile object. If this fails, a conduit.Error of type ErrBadClone is returned.\nPrior to returning the Conn, the original File will be closed. If this close\nresults in an error, a conduit.Error of type ErrFailedClosed is returned.\n\n\n\n\n### \u003ca name=\"Conduit.ReceiveFD\"\u003efunc\u003c/a\u003e (\\*Conduit) [ReceiveFD](/src/target/receive.go?s=538:584#L12)\n``` go\nfunc (c *Conduit) ReceiveFD() (uintptr, error)\n```\nReceiveFD receives and returns a single open file descriptor from the\nConduit along with a nil error. If an error is returned it will be a\nconduit.Error with its type set according to the following conditions.\n\n\n\tErrFailedTransfer: if the message cannot be recieved.\n\t\n\tControlMessageError: if the control message cannot be parsed, more than\n\tone control message is sent or more than one file descriptor is\n\ttransfered.\n\n\n\n\n### \u003ca name=\"Conduit.ReceiveFile\"\u003efunc\u003c/a\u003e (\\*Conduit) [ReceiveFile](/src/target/receive.go?s=1384:1433#L42)\n``` go\nfunc (c *Conduit) ReceiveFile() (*os.File, error)\n```\nReceiveFile returns a *os.File associated with the open file descripted\nrecevied through the Conduit. The provided name will be attached to the now\nFile object. See ReceiveFD() for a discussion of possible error conditions.\n\n\n\n\n### \u003ca name=\"Conduit.TransferConn\"\u003efunc\u003c/a\u003e (\\*Conduit) [TransferConn](/src/target/send.go?s=1495:1546#L35)\n``` go\nfunc (c *Conduit) TransferConn(conn net.Conn) error\n```\nTransferConn send the open file descriptor associated with conn through the\nConduit.  If succesfully transfered, conn will be closed and may no longer\nbe used by the caller.  Nil is returned on success.\n\nIf conn's underlying type provides no way to discern its file descriptor,\na conduit.Error of type ErrNoFD is returned. As part of the transfer, an\nos.File object is cloned from conn. If this fails, a conduit.Error of type\nErrBadClone is returned. Note that both conn and its clone are closed upon\na successful transfer.\n\n\n\n\n### \u003ca name=\"Conduit.TransferFD\"\u003efunc\u003c/a\u003e (\\*Conduit) [TransferFD](/src/target/send.go?s=325:371#L5)\n``` go\nfunc (c *Conduit) TransferFD(fd uintptr) error\n```\nTransferFD sends the open file descriptor fd through the Conduit. If\nsuccessfully transfered, fd will be closed and may no longer be used\nby the caller.  On success, nil is returned.\n\nIf an error is returned, it will be of type conduit.Error.\n\n\n\n\n### \u003ca name=\"Conduit.TransferFile\"\u003efunc\u003c/a\u003e (\\*Conduit) [TransferFile](/src/target/send.go?s=862:910#L22)\n``` go\nfunc (c *Conduit) TransferFile(f *os.File) error\n```\nTransferFile send the open file descriptor associated with f through the\nConduit.  If succesfully transfered, f will be closed and may no longer be\nused by the caller.  On success, nil is returned.\n\nIf an error is returned, it will be of type conduit.Error.\n\n\n\n\n## \u003ca name=\"ErrType\"\u003etype\u003c/a\u003e [ErrType](/src/target/errors.go?s=91:107#L1)\n``` go\ntype ErrType int\n```\nErrType differentiates disparate Conduit errors.\n\n\n``` go\nconst (\n    // ErrUnknown is an unknown error type; there are no errors of this type\n    // (i.e. if you get one of these it's a bug)\n    ErrUnknown ErrType = iota\n\n    // ErrNoFD is returned when a Conduit method is unable to extrapolate an\n    // underlying file descriptor from one of its arguments.\n    ErrNoFD\n\n    // ErrFailedTransfer is returned when a file descriptor transfer fails.\n    ErrFailedTransfer\n\n    // ErrFailedClose is returned when a Close method fails.\n    ErrFailedClose\n\n    // ErrBadClone is returned on a failed attempt to clone an os.File object.\n    ErrBadClone\n\n    // ErrBadCtrlMesg is returned for low level errors while constructing,\n    // sending or receiving the out-of-band control message used to transfer\n    // a file descriptor.\n    ErrBadCtrlMesg\n)\n```\n\n## \u003ca name=\"Error\"\u003etype\u003c/a\u003e [Error](/src/target/errors.go?s=956:1001#L26)\n``` go\ntype Error struct {\n    // contains filtered or unexported fields\n}\n```\nError encapsulates a conduit related error providing a Type method to\ndiscern the type of error.\n\n### \u003ca name=\"Error.Type\"\u003efunc\u003c/a\u003e (\\*Error) [Type](/src/target/errors.go?s=1094:1124#L33)\n``` go\nfunc (e *Error) Type() ErrType\n```\nType returns the conduit related error type indicated by the returned\nErrType value.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftep%2Fnet-conduit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftep%2Fnet-conduit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftep%2Fnet-conduit/lists"}