-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automation solution for GitHub processes that need a PAT #420
Comments
See discussion in the #wg-security-tooling channel. |
Just want to note that we've had this come up for https://github.com/gittuf/gittuf as well for packaging on winget. A generalized OpenSSF-wide solution would be fantastic. |
I just learned about The reason why I want to know if it's in a GitHub Actions workflow or not is to determine if the secret can be stored as a secret in Actions, or if we need some other shared credential manager. To unblock folks, we could have an OpenSSF staffer create a PAT that's scoped in terms of repository, permissions, and time, which should limit the amount of potential abuse. It would be a little weird for all the OpenSSF |
Our release is using GitHub Actions. We are currently using an individual's PAT stored as a GitHub Actions secret, but that feels icky, so we'd like to have a less-icky solution. |
In particular, we're using goreleaser: https://github.com/mindersec/minder/blob/main/.github/workflows/releaser.yml#L61 With this config file: https://github.com/mindersec/minder/blob/main/.goreleaser.yaml#L48 |
Okay, so just talking through some options:
When brainstorming, I like to include an option that's a bit out there. Even if we don't choose it, having it there can help stretch the solution space. Here is that option:
|
Happy to be a point of contact for any questions if it would be useful!
This is a side-effect of how github does app permissions. 😢
The iac folder has the configuration we use for our GCP deployment if that's helpful! The bigger con of the App based approach is tokens are minted per installation (i.e. per org) - I don't believe this allows you to open PRs in other orgs that haven't installed the app. |
Sorry I wasn't clear -- octo-sts itself only works with GitHub App tokens, which don't work for this purpose. We'd need to have a different service for minting PATs, or work with Chainguard to extend octo-sts for that purpose. (IIRC, GitHub App tokens also can't be used against In any case, I'd expect openssf to run their own token-issuing service rather than relying on one run by a member company. Another possible problem is that I'm not sure that GitHub provides APIs for managing PATs -- I think access may be web-ui-only on purpose. |
Oops! I missed this from my earlier investigation. It doesn't sound like we can get away from needing a long(ish) lived PAT. We could at least have that PAT stored in a separate application, that workflows make authenticated API requests to, so the app (not a GitHub OAuth App, just a regular web app) could use the PAT for that organization and open up pull requests for the requester. Pro: individual workflows would not have direct access to the PAT to create the pull request, greatly reducing exfiltration risk |
It's a random idea, but would it work if the |
I think the overall conclusion from the Dec 10 OpenSSF TAC meeting is that @SecurityCRob and @riaankleinhans would look into https://github.com/1Password/for-open-source and establishing a 1Password Teams account for the OpenSSF. Presumably, once the base 1Password infrastructure is established, they will determine a way to grant specific projects access to a "folder" within the account for things like shared keys and passwords. I'm not sure if we made a determination as to whether each project that needs to e.g. publish to WinGet would create their own "bot" account, but that seems likely to be the best approach from a reduction-of-blast-radius standpoint. |
@evankanderson we have achieve a few things here already.
At the moment the OpenSSF-Robot must have OpenSSF GH enterprise level Admin access to execute the landscape workflow. Clearly that would not be ideal when issuing PATs for running other automation. |
In case we don't want to have a bot per project approach, would it work to create a fine-grained minimally-scoped PAT from |
@rdimitrov that is the workflow I have in mind as well. |
Alright, I can take this action item with regards to Minder |
The https://github.com/mindersec/winget-pkgs repo is used to release the Minder binary to the Windows ecosystem. This process involves opening a PR against https://github.com/microsoft/winget-pkgs, which is not currently feasible for a GitHub app which is not installed on the
microsoft
org. The recommended solution is to use a scoped Personal Access Token (PAT).Is there common infrastructure within OpenSSF for managing these sorts of credentials? Ideal solution would be to have an automation account ("bot"), with credentials stored in a shared-secrets solution like 1Password, and access to the secret shared amongst maintainers and OpenSSF staff.
The text was updated successfully, but these errors were encountered: