Diffinery

homeflare/diffinerypublic

Open-source, agent-first GitHub and GitHub Actions alternative that runs on your own Cloudflare account: git hosting, pull requests, code review and drop-in GitHub Actions YAML on Workers, Durable Objects, R2 and Containers.

Merge pull request #18 from codician-team/claude/fake-key-from-parts

Test: build the fake GitHub App key at run time, so push protection doesn't flag it
altugank authored · GitHub committed 2 parents d993a8a334de50commit 13fca51c2747708f7a9c3fc48607dd77fd1de66eBrowse files
1 file changed+2−1
modifiedapps/diffinery/test/unit/deploy-github-app.test.ts+2−1View file
@@ -59,7 +59,8 @@
5959
6060 it("refuses a value of the wrong shape without printing it", () => {
6161 tree();
62- const pem = "-----BEGIN RSA PRIVATE KEY-----\nMIIEsecret\n-----END RSA PRIVATE KEY-----";
62+ // Put together at run time, so secret scanners (diffinery.com's push protection among them) don't take the fake key for a real one.
63+ const pem = ["BEGIN", "END"].map((edge) => `-----${edge} RSA PRIVATE KEY-----`).join("\nMIIEsecret\n");
6364 for (const [key, value, message] of [
6465 ["GITHUB_APP_ID", pem, "GITHUB_APP_ID must be the App ID, a number"],
6566 ["GITHUB_APP_SLUG", "Diffinery Runners", "GITHUB_APP_SLUG must be the slug"],