-
Notifications
You must be signed in to change notification settings - Fork 91
Use a maintained tool for preventing checking secrets into version control #185
Comments
@afeld since that was mostly my doing, here’s the deets. At the time, there was not an easy way to install git-secrets without a bunch of dependency hell (wasn’t installable from brew for example). Also, the output is less than ideal for non-developers, giving you no real clue what you were violating unless you could read/understand the regex, and this was something we were instituting across the org for all staff. We also thought we were going to get more support from the original developer, since was fairly responsive to PRs at first, and then he just stopped. We still have PRs out there that went unmerged. As for output, compare
VS. what is output from
|
Why is that subtle difference important you may be asking? Let's take searching for New Relic license keys.
|
Could we re-prioritize this? cloud.gov has had two incidents recently with credentials being committed and we'd love to have a working tool to minimize the chance of more of these. Thanks! |
Is |
@hillaryj I'm curious if updating the git-seekrets rules could prevent a repeat of those. I suspect the rules are going to be an issue regardless of the tool, though maybe the other tools have built-in rules that already cover our needs. I'd still be interested in seeing how they perform against issues like the ones Hillary mentioned. I second @pburkholder's question. If the tool actually works and it's an issue of outdated/untested rules, then changing tools only helps if the new tool also has the rules we need and those are maintained and tested. If we still have to write and maintain our own rules, then a different tool isn't going to be any better. |
Sorry, realized I forgot to include a link to our current rules: |
@afeld -- I know we looked through this the other day when we were doing grooming together, but I'm looking back through this and I'm wondering if we could be more explicit on what a 'path forward' would look like? Is that a document, mvp code, consensus from folks asking for it...? |
My earlier comment was based on the assumption that `git-seekrets` isn't
working. But so far, my testing with git-seekrets shows it works as
advertised.
I'd like to know more about what issues folks are having with git-seekrets
itself (regardless of the rules), if any.
Given the stability of Git, I don't think git-seekrets itself is going to
need much by way of maintenance. And the UI is indeed better than
awslab's git-secrets.
The patterns need updates, and there's been an idea floated by @hillaryj
that maybe we should have a `laptop-git` repo that takes care of
installing, updating git-related stuff that's not tied to the cruft in
`laptop`.
P.
…On Tue, Feb 11, 2020 at 12:57 AM Alyssa Feola ***@***.***> wrote:
@afeld <https://github.com/afeld> -- I know we looked through this the
other day when we were doing grooming together, but I'm looking back
through this and I'm wondering if we could be more explicit on what a 'path
forward' would look like? Is that a document, mvp code, consensus from
folks asking for it...?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#185?email_source=notifications&email_token=AAJHWCXI2DQ46WUSUVIIBXLRCI43ZA5CNFSM4IIJIBH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELLJKNA#issuecomment-584488244>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJHWCXUKSQBQ2MGOB4Y35DRCI43ZANCNFSM4IIJIBHQ>
.
--
-
*Peter Burkholder*
cloud.gov compliance & security | co-lead DevOps Community of Practice
<https://digital.gov/communities/devops/>
*Solutions
<https://www.gsa.gov/about-us/organization/federal-acquisition-service/technology-transformation-services/tts-solutions>
| Technology
Transformation Services <https://join.tts.gsa.gov/tts-offices/> *
*| *
*GSA <http://www.gsa.gov/portal/category/100000>*
*202-709-2028 <(202)%20209-2028> | [email protected]
<[email protected]> *
*| pronouns he-him <https://www.mypronouns.org/he-him>*
*Free/Busy Calendar
<https://calendar.google.com/calendar/[email protected]>*
|
That help? |
Based on a thorough review of solutions, this is the proposed plan for managing repos with secrets compatible with transparent git workflows:
To protect against committing credentials or other secrets the TTS organization uses: To set this up locally Mac users can use homebrew (for any other OS, please consult in the installation instructs for each using the links provided ^) $ brew install sops gitleaks pre-commit
Users should review the shared GSA rules and make a Pull Request for any additional regex rules needed, the rules can be forked if needed: https://github.com/GSA/odp-code-repository-commit-rules
Is the secret ONLY or INFREQUENTLY required for initial set up or one-off tasks AND DOES NOT need to be shared with multiple team members or CI/CD?
Does the secret NEED to be shared with multiple team members or CI/CD?
{{ DRAFT 3/2/2020 }} The proposed model is better explained in this blog post: https://oteemo.com/2019/06/20/hashicorp-vault-is-overhyped-and-mozilla-sops-with-kms-and-git-is-massively-underrated/ |
I like this. One thing I'd suggest though is rolling installation of Also agree with using the GSA-provided rules. That's a great resource and it makes sense to use it. We'd probably want to get a couple of PRs in to cover New Relic and Mandril (if we're still using both), which are in the rules we have for This is really great, thanks for putting this together @JJediny! |
Sent to GSA secops for review/comment, awaiting feedback |
Clarified the title that let's keep this issue scoped to the local secret committing prevention; monitoring and revoking would be a whole other thing that we should split into its own issue. |
I've started working with So a rollout would mean working with a git's I'm working with |
So I heard back from Bryan Alexander that Do I use GSA’s Do I trust homebrew? Do I make my own homebrew formula with hashes that I’ve verified? Or get the binaries from the signed releases on GitHub…? For now I’m trusting homebrew, but I wish it were using a signed release (4.0.1) instead of an unsigned one (4.1.0). |
resolves #8 Reference: 18F/laptop#185 The cloud.gov team uses caulking to manage secrets checking, whereas the install of git-seekrets I was using was an aging (unmaintained?) fork. It appears from prior conversation that there was a decision made to use the tooling used/developed by (?) the cloud.gov team. The caulking role pulls the repo and runs "make && make install", and then makes sure patterns are up-to-date. While this has a certain lack of idempotency, it will make sure that, with every run of the playbook, we are up-to-date.
User Story:
As someone in TTS, I want to use a maintained tool for secrets.
Problem Statement:
We use a fork of git-seekret which isn't maintained. We should investigate using git-secrets or something like it.
Background information:
Actions to take:
Acceptance criteria:
Supporting Documentation:
git-seekret
git-secrets
Related Issues:
#184
#189
GSA-TTS/tts-tech-operations#91
The text was updated successfully, but these errors were encountered: