Skip to content
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

feat: prevent secrets from leaking to source control #1373

Merged
merged 3 commits into from Jul 24, 2019
Merged

feat: prevent secrets from leaking to source control #1373

merged 3 commits into from Jul 24, 2019

Conversation

lirantal
Copy link
Member

@lirantal lirantal commented Jul 5, 2019

Type:
Feature

The following has been addressed in the PR:

  • There is a related issue?
  • Unit or Functional tests are included in the PR

Description:
Adds support through detect-secrets which wraps Yelp's generic detect-secrets tool, to test for secrets being committed to source control using the pre-commit framework the project already has, and as a result prevent secrets like passwords, tokens and others to leak into source control.

The detect-secrets npm package will try different methods of invoking the detect-secrets-hook tool to run the secrets test for each file, and if it isn't able to find it will silently fail to not interrupt developer workflow. In a future re-visit of this capability we can update this to be a breaking change and fail the commit (or perhaps fail the CI, which might be a bit late, but better than never).

@lirantal lirantal self-assigned this Jul 5, 2019
@juanpicado juanpicado self-requested a review July 6, 2019 06:30
@DanielRuf
Copy link
Contributor

I do not yet understand the userstory / use case behind this.

Can you describe your motivation @lirantal?

@juanpicado
Copy link
Member

Hi @DanielRuf , the context is outside of this website, I'm not sure whether you receive an invitation link cc: @lirantal ?

@juanpicado
Copy link
Member

I did a first try, I already deliver my outcome. We are testing this deeply.

@DanielRuf
Copy link
Contributor

I'm not sure whether you receive an invitation link cc: @lirantal ?

Not that I am aware of. Did I miss something?

@lirantal
Copy link
Member Author

lirantal commented Jul 9, 2019

@DanielRuf this is related to the conversation we had on Twitter DM with regards to the open source security program. Let's continue chatting for more context.

Do you feel this PR description, as-is, still misses on context? What else should I add?

Copy link
Member

@juanpicado juanpicado left a comment

Choose a reason for hiding this comment

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

I tested this deeply, under the following environments:

  • Windows, no Docker, no Python.
  • Mac, Docker and Python installed
  • Mac Docker shutdown but installed and Python installed (it should fails)
  • Mac Only Python installed.

Thanks @lirantal for this, it is gonna be a nice addition.

@juanpicado juanpicado merged commit 81d02f6 into verdaccio:master Jul 24, 2019
@juanpicado juanpicado added this to the 4.2.0 milestone Jul 31, 2019
@juanpicado juanpicado deleted the feat/detect-secrets branch July 31, 2019 10:34
@lock
Copy link

lock bot commented Aug 10, 2019

🤖This thread has been automatically locked 🔒 since there has not been any recent activity after it was closed.
We lock tickets after 90 days with the idea to encourage you to open a ticket with new fresh data and to provide you better feedback 🤝and better visibility 👀.
If you consider, can attach this ticket 📨to the new one as a reference for better context.
Thanks for being a part of the Verdaccio community! 💘

@lock lock bot locked as resolved and limited conversation to collaborators Aug 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants