{"id":40993380,"url":"https://github.com/hellofresh/updater-go","last_synced_at":"2026-01-22T08:04:08.878Z","repository":{"id":43133809,"uuid":"144555585","full_name":"hellofresh/updater-go","owner":"hellofresh","description":"Library that helps verifying/updating go binary with new version","archived":false,"fork":false,"pushed_at":"2025-10-07T05:31:16.000Z","size":122,"stargazers_count":11,"open_issues_count":5,"forks_count":2,"subscribers_count":192,"default_branch":"master","last_synced_at":"2025-12-01T06:49:57.712Z","etag":null,"topics":["open-source","wiz-productivity-platform-engineering-productivity"],"latest_commit_sha":null,"homepage":"","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/hellofresh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-08-13T09:09:13.000Z","updated_at":"2025-10-07T05:31:20.000Z","dependencies_parsed_at":"2024-10-25T16:19:54.399Z","dependency_job_id":"14d9b6bc-be25-4dec-bd33-8ff4de203679","html_url":"https://github.com/hellofresh/updater-go","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/hellofresh/updater-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellofresh%2Fupdater-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellofresh%2Fupdater-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellofresh%2Fupdater-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellofresh%2Fupdater-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hellofresh","download_url":"https://codeload.github.com/hellofresh/updater-go/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellofresh%2Fupdater-go/sbom","scorecard":{"id":460363,"data":{"date":"2025-08-11","repo":{"name":"github.com/hellofresh/updater-go","commit":"72bc065b82917d1114ad708fe5cfce0ec26f1705"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.7,"checks":[{"name":"Code-Review","score":1,"reason":"Found 1/9 approved changesets -- score normalized to 1","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":"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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"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":"Maintained","score":2,"reason":"3 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/hf_pr-dependency-review.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/hellofresh/updater-go/hf_pr-dependency-review.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/testing.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/hellofresh/updater-go/testing.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/testing.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/hellofresh/updater-go/testing.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/testing.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/hellofresh/updater-go/testing.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/testing.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/hellofresh/updater-go/testing.yml/master?enable=pin","Info:   0 out of   3 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned"],"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":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'contents' permission set to 'read': .github/workflows/hf_pr-dependency-review.yml:15","Warn: no topLevel permission defined: .github/workflows/hf_pr-dependency-review.yml:1","Warn: no topLevel permission defined: .github/workflows/testing.yml:1","Info: no jobLevel write permissions found"],"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":"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":"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":"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":"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":5,"reason":"5 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2024-2687 / GHSA-4v7x-pqxf-cx7m","Warn: Project is vulnerable to: GO-2024-3333","Warn: Project is vulnerable to: GO-2025-3503 / GHSA-qxp5-gwg8-xv66","Warn: Project is vulnerable to: GO-2025-3595 / GHSA-vvgc-356p-c3xw","Warn: Project is vulnerable to: GO-2025-3488 / GHSA-6v2p-p543-phr9"],"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":1,"reason":"SAST tool is not run on all commits -- score normalized to 1","details":["Warn: 3 commits out of 22 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-19T10:58:00.798Z","repository_id":43133809,"created_at":"2025-08-19T10:58:00.798Z","updated_at":"2025-08-19T10:58:00.798Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28658964,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["open-source","wiz-productivity-platform-engineering-productivity"],"created_at":"2026-01-22T08:04:01.059Z","updated_at":"2026-01-22T08:04:08.869Z","avatar_url":"https://github.com/hellofresh.png","language":"Go","readme":"# updater-go\n\nLibrary that helps verifying/updating go binary with new version\n\n## Usage example\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"flag\"\n\t\"fmt\"\n\t\"os\"\n\t\"runtime\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/hellofresh/updater-go/v3\"\n\tlog \"github.com/sirupsen/logrus\"\n)\n\nconst (\n\tgithubOwner = \"hellofresh\"\n\tgithubRepo  = \"github-cli\"\n)\n\nfunc main() {\n\tvar (\n\t\tupdateToVersion string\n\t\tghToken         string\n\t)\n\tflag.StringVar(\u0026updateToVersion, \"version\", \"\", \"update to a particular version instead of the latest stable\")\n\tflag.StringVar(\u0026ghToken, \"token\", \"\", \"GitHub token to use for Github access\")\n\n\tflag.Parse()\n\n\t// Check to which version we need to update\n\tversionFilter := updater.StableRelease\n\tif updateToVersion != \"\" {\n\t\tversionFilter = func(name string, _ bool, _ bool) bool {\n\t\t\treturn updateToVersion == name\n\t\t}\n\t}\n\n\t// Create release locator\n\tlocator := updater.NewGithubClient(\n\t\tcontext.TODO(),\n\t\tgithubOwner,\n\t\tgithubRepo,\n\t\tghToken,\n\t\tversionFilter,\n\t\tfunc(asset string) bool {\n\t\t\treturn strings.Contains(asset, fmt.Sprintf(\"-%s-%s-\", runtime.GOARCH, runtime.GOOS))\n\t\t},\n\t\t10 * time.Second,\n\t)\n\n\t// Find the release\n\tupdateTo, err := locateRelease(locator, updateToVersion)\n\tif errors.Is(err, updater.ErrNoRepository) || errors.Is(err, updater.ErrUnauthorized) {\n\t\tlog.WithError(err).Error(\"Unable to access the repository.\\n  This is probably due to insufficient privileges of the access token.\")\n\t\tos.Exit(1)\n\t}\n\tfailOnError(err, \"failed to retrieve the update release\")\n\n\t// Use context with deadlines to specify different timeouts (optional)\n\tctx, cancel := context.WithTimeout(context.TODO(), 30 * time.Second)\n\tdefer cancel()\n\n\t// Fetch the release and update\n\terr = updater.SelfUpdate(ctx, updateTo)\n\tfailOnError(err, \"failed to update to version %s\")\n\n\tfmt.Printf(\"Successfully updated to version %s!\\n\", updateTo.Name)\n}\n\nfunc failOnError(err error, message string) {\n\tif err != nil {\n\t\tlog.WithError(err).Error(message)\n\t\tos.Exit(1)\n\t}\n}\n\nfunc locateRelease(locator updater.ReleaseLocator, version string) (updater.Release, error) {\n\t// No specific version use the latest\n\tif version == \"\" {\n\t\treturn updater.LatestRelease(context.TODO(), locator)\n\t}\n\n\t// Find a specific release\n\tvar release updater.Release\n\tupdates, err := locator.ListReleases(context.TODO(), 1)\n\tif err != nil {\n\t\treturn release, err\n\t}\n\n\tif len(updates) == 0 {\n\t\treturn release, fmt.Errorf(\"unable to locate release %s\", version)\n\t}\n\n\tif len(updates) \u003e 1 {\n\t\treturn release, fmt.Errorf(\"multiple releases locate for %s\", version)\n\t}\n\n\treturn updates[0], nil\n}\n```\n\n---\n\u003e GitHub [@hellofresh](https://github.com/hellofresh) \u0026nbsp;\u0026middot;\u0026nbsp;\n\u003e Medium [@engineering.hellofresh](https://engineering.hellofresh.com)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellofresh%2Fupdater-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhellofresh%2Fupdater-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellofresh%2Fupdater-go/lists"}