ci(socket-fix): use GITHUB_TOKEN instead of an app private key - #224
Merged
Conversation
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Larry-Osakwe
approved these changes
Aug 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This job runs
@socketsecurity/cli fix --autopilot— third-party code, resolved at run time — in the same job that held a GitHub App private key. Worse, the key wasGH_REPO_ACCESS_*, the enterprise app installed across keycardlabs, so that job could mint a token for every private labs repo.It doesn't need an app at all: it only pushes a branch and opens a PR in its own repo, which
GITHUB_TOKENcan do with thecontents: write+pull-requests: writepermissions the workflow already declares (no ruleset bypass is needed to open a PR).GITHUB_TOKENis scoped to this repository and cannot leave it, so there is no longer any credential here that reaches another repo, let alone another org. Deliberately not switched to the newSDK_RELEASE_*app: keeping a key out of the autopilot job is the point.One behavior change to be aware of: PRs opened by
GITHUB_TOKENdo not trigger workflow runs, so Socket's fix PRs will land without CI. If that matters, the alternative is aworkflow_dispatch/workflow_runchain rather than putting a key back in this job.Part of the GitHub Actions cross-org audit (keycardlabs <-> keycardai): finding F1.
Link to Devin session: https://app.devin.ai/sessions/6197211c97f643b09c1e0ace7b92d29f
Requested by: @kiambogo