{"id":20536066,"url":"https://github.com/techprober/app-token-generator","last_synced_at":"2026-02-12T07:06:52.084Z","repository":{"id":44644186,"uuid":"454711389","full_name":"techprober/app-token-generator","owner":"techprober","description":"A serverless function that offers the end-user a way to dynamically generate a Github Access Token for use cases in any back-end system","archived":false,"fork":false,"pushed_at":"2022-02-03T08:48:44.000Z","size":17,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-08T13:56:25.713Z","etag":null,"topics":["cicd","containerization","github-application","oauth-function","serverless"],"latest_commit_sha":null,"homepage":"","language":"Makefile","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/techprober.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":"2022-02-02T09:26:54.000Z","updated_at":"2022-02-02T13:02:42.000Z","dependencies_parsed_at":"2022-09-25T00:22:58.533Z","dependency_job_id":null,"html_url":"https://github.com/techprober/app-token-generator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/techprober/app-token-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techprober%2Fapp-token-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techprober%2Fapp-token-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techprober%2Fapp-token-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techprober%2Fapp-token-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/techprober","download_url":"https://codeload.github.com/techprober/app-token-generator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techprober%2Fapp-token-generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29360766,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T01:03:07.613Z","status":"online","status_checked_at":"2026-02-12T02:00:06.911Z","response_time":55,"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":["cicd","containerization","github-application","oauth-function","serverless"],"created_at":"2024-11-16T00:35:13.791Z","updated_at":"2026-02-12T07:06:52.070Z","avatar_url":"https://github.com/techprober.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e🔐 App Token Generator\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n    \u003cem\u003eA tool to generate Github Access Token on the fly\u003c/em\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/TechProber/app-token-generator?color=critical\" alt=\"License\"/\u003e\n    \u003ca href=\"https://hits.seeyoufarm.com\"\u003e\n      \u003cimg src=\"https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2FTechProber%2Fapp-token-generator\u0026count_bg=%235322B2\u0026title_bg=%23555555\u0026icon=\u0026icon_color=%23E7E7E7\u0026title=hits\u0026edge_flat=false\"/\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://img.shields.io/tokei/lines/github/TechProber/app-token-generator?color=orange\"\u003e\n      \u003cimg src=\"https://img.shields.io/tokei/lines/github/TechProber/app-token-generator?color=orange\" alt=\"lines\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://hub.docker.com/repository/docker/hikariai/\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/docker-v20.10.7-blue\" alt=\"Version\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/TechProber/app-token-generator\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/last-commit/TechProber/app-token-generator\" alt=\"lastcommit\"/\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n## Introduction\n\n#### Background\n\nUsing default settings with GitHub Apps may put you at risk of leaking data between GitHub App installations. GitHub allows developers to create what is referred to as a GitHub app. A GitHub app can be installed on a GitHub organization or a personal GitHub account. Once installed, the GitHub app can request a new token for each installation of the app. The GitHub App has a private key that is used to generate a GitHub App token. This token can be used for a subset of the GitHub APIs.\n\n#### Application\n\n`App Token Generator` is a serverless function offers the end-user a way to dynamically generate a Github Access Token tailored to be used in any back-end system. It can also be intergrated in the standard CICD Pipeline as a seperate step or stage.\n\n## Local Setup\n\n#### Pre-requisite\n\n- Put `private-key.pem` associtated to your Github Application under the project root path\n\n#### Run\n\n```bash\nGITHUB_APP_KEY=private-key.pem APP_ID=\u003cYOUR GITHUB_APP_ID\u003e ./handler.rb\n```\n\n## Containerization\n\nBuild the image\n\n```bash\ndocker build -t app-token-generator:latest .\n```\n\nRun the application as a container\n\n```bash\ndocker run --rm -it \\\n           --name app-token-generator \\\n           -e APP_ID=\u003cYOUR GITHUB_APP_ID\u003e \\\n           -e GITHUB_APP_KEY=\u003cKEY LOCATION\u003e \\\n           -v $(PWD)/private-key.pem:\u003cKEY_LOCATION\u003e \\\n           quay.io/techprober/app-token-generator:latest\n```\n\n## References\n\n- [GitHub Apps - How to avoid leaking your customer’s source code with GitHub apps](https://roadie.io/blog/avoid-leaking-github-org-data/)\n- [GitHub Docs - Authenticating with github apps](https://docs.github.com/en/developers/apps/building-github-apps/authenticating-with-github-apps#generating-a-private-key)\n- [GitHub API Docs - Create an installation access token for an app](https://docs.github.com/en/rest/reference/apps#create-an-installation-access-token-for-an-app)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechprober%2Fapp-token-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechprober%2Fapp-token-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechprober%2Fapp-token-generator/lists"}