{"id":37826199,"url":"https://github.com/thechriswalker/puid","last_synced_at":"2026-01-16T15:45:37.292Z","repository":{"id":57500002,"uuid":"92421822","full_name":"thechriswalker/puid","owner":"thechriswalker","description":"like `cuid`s but with configurable prefixes. `cuid` compatible","archived":false,"fork":false,"pushed_at":"2021-10-06T21:01:31.000Z","size":21,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-10-23T09:29:11.881Z","etag":null,"topics":["cuid"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thechriswalker.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}},"created_at":"2017-05-25T16:17:42.000Z","updated_at":"2023-09-08T17:25:32.000Z","dependencies_parsed_at":"2022-08-28T20:00:56.129Z","dependency_job_id":null,"html_url":"https://github.com/thechriswalker/puid","commit_stats":null,"previous_names":[],"tags_count":1,"template":null,"template_full_name":null,"purl":"pkg:github/thechriswalker/puid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thechriswalker%2Fpuid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thechriswalker%2Fpuid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thechriswalker%2Fpuid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thechriswalker%2Fpuid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thechriswalker","download_url":"https://codeload.github.com/thechriswalker/puid/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thechriswalker%2Fpuid/sbom","scorecard":{"id":878136,"data":{"date":"2025-08-11","repo":{"name":"github.com/thechriswalker/puid","commit":"a411105af0a5fd108c480753c2b5970bcc6c07f9"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"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":"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"Code-Review","score":0,"reason":"Found 0/13 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":"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":"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: MIT License: 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":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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"}}]},"last_synced_at":"2025-08-24T06:53:06.476Z","repository_id":57500002,"created_at":"2025-08-24T06:53:06.476Z","updated_at":"2025-08-24T06:53:06.476Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479409,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: 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":["cuid"],"created_at":"2026-01-16T15:45:37.057Z","updated_at":"2026-01-16T15:45:37.279Z","avatar_url":"https://github.com/thechriswalker.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![GoDoc](https://godoc.org/github.com/thechriswalker/puid?status.svg)](http://godoc.org/github.com/thechriswalker/puid) [![Build Status](https://travis-ci.org/thechriswalker/puid.svg?branch=master)](https://travis-ci.org/thechriswalker/puid) \n\n# `puid`, like [`cuid`](https://github.com/ericelliott/cuid) (Collision-Resistant IDs)\n\n**Please refer to the [main project site](http://usecuid.org) for the full rationale behind CUIDs.**\n\nAlmost all of the rationale stands except than with an puid, you can vary the initial character (or prefix) -- it's not just a fixed `c`.\n\nMy use case is that I want to use that character as a type hint. Purely\na visual thing. \n\nNB You can easily break the URL-Safety that CUIDs guarrantee by using stupid prefixes. I define this as user error, the puid library makes no attempt to stop you from doing this.\n\nOtherwise the library and implementation is compliant and marginally faster than the main Go implementation ([lucsky/cuid](https://github.com/lucsky/cuid)). Thats probably because I don't use exactly the same alogorithm for generating the fingerprint and random data. Now the random data is fine - as long as it is random enough, I cannot see how it matters. The fingerprint bit\nis different though, because maybe we want the `hostname` portion of the default fingerprint to match across languages? Personally, I don't really care about that.\n\n\u003cdetails\u003e\n    \u003csummary\u003esubjective `go test -bench=.` output\u003c/summary\u003e\n\n#### Run on my laptop, pinch of salt necessary\n\n`Benchmark_LucskyCuid*` imports [lucsky/cuid](https://github.com/lucsky/cuid) from `\"github.com/lucsky/cuid\"` for the `tip` and `\"gopkg.in/lucsky/cuid.v1\"` for `v1`.\n\n```\n$  go test -run=XXX -bench=.\nBenchmark_PuidString         3000000           417 ns/op\nBenchmark_PuidBytes          5000000           367 ns/op\nBenchmark_PuidAppendBytes    5000000           354 ns/op\nBenchmark_PuidInCuidMode     3000000           413 ns/op\nBenchmark_LucskyCuidV1       3000000           559 ns/op\nBenchmark_LucskyCuidTip      3000000           562 ns/op\nPASS\nok      github.com/thechriswalker/puid  12.193s\n```\n\nEvent more reason to question this is that technically `Benchmark_PuidString` and `Benchmark_PuidInCuidMode` are doing exactly the same work...\n\nAlso, **~500ns is not very long.**\n\u003c/details\u003e\n\n## install\n\n```\n$ go get github.com/thechriswalker/puid/...\n```\n\n\n\n## use as a tool\n\nIf your `$GOPATH`/`$GOBIN` is all setup, then you should be able to run\n\n```\n$ puid\npj34aln7t0000cars6wqeent6\n$ puid d\ndj34alh5d0000carshj2ctw8e\n$ puid foo: bar:\nfoo:j34al93s0000carskgw1gt3q\nbar:j34al93s0001carskzagqwy2\n$ puid -count=10\npj34am4tg0000carsa3zp2gqh\npj34am4th0001cars809dw0k0\npj34am4th0002carsgh2xlo91\npj34am4th0003carsnrt75ob7\npj34am4th0004cars9v53axm5\npj34am4th0005carsnmzjbaoj\npj34am4ti0006carsd2wxrfks\npj34am4ti0007cars32qh9yq9\npj34am4ti0008carsezmwei9e\npj34am4ti0009carsm5pziq9m\n``` \n\n## use as a lib\n\ndocs [on godoc.org](https://godoc.org/github.com/thechriswalker/puid)\n\nor see [`cmd/puid/main.go`](cmd/puid/main.go)\n\nor run `puid -example`\n\n## customization the generator\n\nMore customization can be made to the id generator, you can supply a custom fingerprint, random data source, or counter as well as the prefix. see the docs for info\n\n## acknowledgements\n\nFirstly, [ericelliott](https://github.com/ericelliott) for CUIDs which are awesome.\nSecondly, [lucsky](https://github.com/lucsky) for his [implementation of CUID in golang](https://github.com/lucsky/cuid) which inspired this.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthechriswalker%2Fpuid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthechriswalker%2Fpuid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthechriswalker%2Fpuid/lists"}