{"id":22281928,"url":"https://github.com/bradleyfalzon/ghinstallation","last_synced_at":"2026-06-09T06:01:49.148Z","repository":{"id":39421924,"uuid":"71996265","full_name":"bradleyfalzon/ghinstallation","owner":"bradleyfalzon","description":"HTTP Round Tripper for GitHub Apps - Authenticate as an Installation Workflow","archived":false,"fork":false,"pushed_at":"2026-05-25T22:51:13.000Z","size":164,"stargazers_count":370,"open_issues_count":25,"forks_count":111,"subscribers_count":6,"default_branch":"master","last_synced_at":"2026-06-02T10:04:28.936Z","etag":null,"topics":["github","github-enterprise","go"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bradleyfalzon.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":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2016-10-26T11:24:09.000Z","updated_at":"2026-05-30T07:58:18.000Z","dependencies_parsed_at":"2025-12-08T21:00:09.393Z","dependency_job_id":null,"html_url":"https://github.com/bradleyfalzon/ghinstallation","commit_stats":null,"previous_names":["bradleyfalzon/installationtransport"],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/bradleyfalzon/ghinstallation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradleyfalzon%2Fghinstallation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradleyfalzon%2Fghinstallation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradleyfalzon%2Fghinstallation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradleyfalzon%2Fghinstallation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bradleyfalzon","download_url":"https://codeload.github.com/bradleyfalzon/ghinstallation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradleyfalzon%2Fghinstallation/sbom","scorecard":{"id":250344,"data":{"date":"2025-08-11","repo":{"name":"github.com/bradleyfalzon/ghinstallation","commit":"a41d4c3351f934185d63c24d5ab5eb952d5ce439"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":6.4,"checks":[{"name":"Maintained","score":5,"reason":"7 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"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":"Code-Review","score":10,"reason":"all changesets reviewed","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":"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":"Pinned-Dependencies","score":10,"reason":"all dependencies are pinned","details":["Info:   4 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   1 third-party GitHubAction dependencies pinned","Info:   1 out of   1 goCommand 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":10,"reason":"GitHub workflow tokens follow principle of least privilege","details":["Info: jobLevel 'contents' permission set to 'read': .github/workflows/go.yml:26","Info: jobLevel 'contents' permission set to 'read': .github/workflows/golangci-lint.yml:20","Info: jobLevel 'pull-requests' permission set to 'read': .github/workflows/golangci-lint.yml:21","Warn: jobLevel 'checks' permission set to 'write': .github/workflows/golangci-lint.yml:22","Info: found token with 'none' permissions: .github/workflows/go.yml:1","Info: found token with 'none' permissions: .github/workflows/golangci-lint.yml:1"],"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":"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: Apache License 2.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":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"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 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-17T08:19:23.261Z","repository_id":39421924,"created_at":"2025-08-17T08:19:23.261Z","updated_at":"2025-08-17T08:19:23.261Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34063159,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"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":["github","github-enterprise","go"],"created_at":"2024-12-03T16:23:32.264Z","updated_at":"2026-06-09T06:01:49.143Z","avatar_url":"https://github.com/bradleyfalzon.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ghinstallation\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/bradleyfalzon/ghinstallation/v2.svg)](https://pkg.go.dev/github.com/bradleyfalzon/ghinstallation/v2)\n\n`ghinstallation` provides `Transport`, which implements `http.RoundTripper` to\nprovide authentication as an installation for GitHub Apps.\n\nThis library is designed to provide automatic authentication for\nhttps://github.com/google/go-github or your own HTTP client.\n\nSee https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/about-authentication-with-a-github-app\n\n## Installation\n\nGet the package:\n\n```bash\ngo get -u github.com/bradleyfalzon/ghinstallation/v2\n```\n\n## GitHub Example\n\n```go\nimport \"github.com/bradleyfalzon/ghinstallation/v2\"\n\nfunc main() {\n\t// Shared transport to reuse TCP connections.\n\ttr := http.DefaultTransport\n\n\t// Wrap the shared transport for use with the app ID 1 authenticating with installation ID 99.\n\titr, err := ghinstallation.NewKeyFromFile(tr, 1, 99, \"2016-10-19.private-key.pem\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\t// Use installation transport with github.com/google/go-github\n\tclient := github.NewClient(\u0026http.Client{Transport: itr})\n}\n```\n\nYou can also use [`New()`](https://pkg.go.dev/github.com/bradleyfalzon/ghinstallation/v2#New) to load a key directly from a `[]byte`.\n\n## GitHub Enterprise Example\n\nFor clients using GitHub Enterprise, set the base URL as follows:\n\n```go\nimport \"github.com/bradleyfalzon/ghinstallation/v2\"\n\nconst GitHubEnterpriseURL = \"https://github.example.com/api/v3\"\n\nfunc main() {\n\t// Shared transport to reuse TCP connections.\n\ttr := http.DefaultTransport\n\n\t// Wrap the shared transport for use with the app ID 1 authenticating with installation ID 99.\n\titr, err := ghinstallation.NewKeyFromFile(tr, 1, 99, \"2016-10-19.private-key.pem\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\titr.BaseURL = GitHubEnterpriseURL\n\n\t// Use installation transport with github.com/google/go-github\n\tclient := github.NewEnterpriseClient(GitHubEnterpriseURL, GitHubEnterpriseURL, \u0026http.Client{Transport: itr})\n}\n```\n\n## What is app ID and installation ID\n\n`app ID` is the GitHub App ID. \\\nYou can check as following : \\\nSettings \u003e Developer \u003e settings \u003e GitHub App \u003e About item\n\n`installation ID` is a part of WebHook request. \\\nYou can get the number to check the request. \\\nSettings \u003e Developer \u003e settings \u003e GitHub Apps \u003e Advanced \u003e Payload in Request\ntab\n\n```\nWebHook request\n...\n  \"installation\": {\n    \"id\": `installation ID`\n  }\n```\n\n## Customizing signing behavior\n\nUsers can customize signing behavior by passing in a\n[Signer](https://pkg.go.dev/github.com/bradleyfalzon/ghinstallation/v2#Signer)\nimplementation when creating an\n[AppsTransport](https://pkg.go.dev/github.com/bradleyfalzon/ghinstallation/v2#AppsTransport).\nFor example, this can be used to create tokens backed by keys in a KMS system.\n\n```go\nsigner := \u0026myCustomSigner{\n  key: \"https://url/to/key/vault\",\n}\natr := NewAppsTransportWithOptions(http.DefaultTransport, 1, WithSigner(signer))\ntr := NewFromAppsTransport(atr, 99)\n```\n\n## License\n\n[Apache 2.0](LICENSE)\n\n## Dependencies\n\n- [github.com/golang-jwt/jwt-go](https://github.com/golang-jwt/jwt-go)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbradleyfalzon%2Fghinstallation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbradleyfalzon%2Fghinstallation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbradleyfalzon%2Fghinstallation/lists"}