Skip to content
This repository was archived by the owner on Jun 15, 2022. It is now read-only.

Introduce seekret #69

Merged
merged 79 commits into from
Dec 21, 2016
Merged

Introduce seekret #69

merged 79 commits into from
Dec 21, 2016

Conversation

jcscottiii
Copy link

@jcscottiii jcscottiii commented Aug 16, 2016

This PR introduces Git-Seekret

  • Installs git-seekret from source
    • Installs Go
    • Installs LibGit2
  • Sets up templateDir

Setup of git-seekret per repo cases covered

  • After checkout / clone or repos.
  • For existing repos
  • Sets up pre-commit hook

Rules enabled

  • Mandrill Username, Password
  • AWS ID, Key, Secret
  • New Relic license key

Screenshot of the after clone case

image

Gotchas:
To ensure reliable of installation of git-seekret there are some options that need to happen, either:

  • Git-seekret needs to vendor / pin their dependencies or,
  • Git-seekret needs to create releases

UX of it catching an error:

$ echo "password = 'this is super secret'" > new_file
$ git add new_file
$ git commit
Found Secrets: 1
        new_file:1
            - Metadata:
              status: test
            - Rule:
              password.password
            - Content:
              password = 'this is super secret'

Before merge read #69 (comment) 👀

@rogeruiz
Copy link
Contributor

@alain-hoang This would be a good place to have standup although it'll be a little like talking into the void. But raise any concerns, questions, comments, funny memes 😉 in here and we can triage them with other engineers intrested in helping out. 👍

@rogeruiz
Copy link
Contributor

rogeruiz commented Oct 26, 2016

👀 look at the tests failure here. @alain-hoang

@alain-hoang
Copy link
Contributor

See #83 for more information on these failures

* basic functional tests for git-seekrets
* Add tests for installation check
* Enable/disable tests for rulesets
* Tests for true positives in test repo
* Addresses repeatable installation for BATS
@rogeruiz rogeruiz changed the title [WIP] Introduce seekret Introduce seekret Dec 21, 2016
@rogeruiz rogeruiz changed the title Introduce seekret [ work in progress ] Introduce seekret Dec 21, 2016
mac
# git secrets --add --allowed --global 'sha.*[A-Za-z0-9]{40}' || true
# git secrets --add --allowed --global 'secure:.*' || true
# TODO: Change to master for merge
curl -s https://raw.githubusercontent.com/18F/laptop/seekret/seekrets-install | sh -
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just leaving a reminder here to change the path to point to master before merging.

Use files in `seekret-rules` to determine defaults
Copy link
Contributor

@monfresh monfresh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I was able to install it and running git seekret check -c 0 against the identity-idp repo found no offenses, after Roger fixed the aws.rule regex.

@rogeruiz rogeruiz changed the title [ work in progress ] Introduce seekret Introduce seekret Dec 21, 2016
@rogeruiz
Copy link
Contributor

Waiting on the last test results to pass then I'll be merging in #118 into #69 and then #69 into master. 🎉 thanks everyone! 🙇

rogeruiz and others added 2 commits December 21, 2016 12:59
This should only be merged once #69 is ready to be merged into the
`master` branch. Do not merge this until #69 is totally ready!
Promote the branch names to master from seekret
@rogeruiz rogeruiz merged commit c62a279 into master Dec 21, 2016
@rogeruiz rogeruiz deleted the seekret branch December 21, 2016 18:49
@konklone
Copy link
Contributor

How difficult would this be to extract from the laptop repository? We also would want to use this on potential Linux environments, and it'd be nice to make it reusable by others (and garner contributions from others) who aren't using our laptop configuration system.

@rogeruiz
Copy link
Contributor

rogeruiz commented Dec 22, 2016

@konklone not very difficult at all. The main repository for git-seekret is forked here and the main lib for that is forked here. @LinuxBozo had tried getting Linux support out of the box but assumptions about curl were made and need to be revisited.

To extract the installation from this repo, we would just need to move a few things:

  • the git-seekret documentation
  • seekrets-install script
    • modify the install script to point to a new location that isn't the 18F/laptop repository for downloading / reading the rulesets and the installation script itself.
  • seekret-rules/*.rule rule files
  • the BATS tests test directory

@rogeruiz
Copy link
Contributor

Conversation moved to 18F/git-seekret#11

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants