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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scan for leaked credentials in PRs and code diff using TruffleHog OSS 馃惙 #414

Open
4 tasks
JamieSlome opened this issue Jan 24, 2024 · 4 comments
Open
4 tasks
Labels
good first issue Good for newcomers security Security improvements or tooling

Comments

@JamieSlome
Copy link
Member

JamieSlome commented Jan 24, 2024

Although GitHub's native secret detection is in place, there are various ways secrets can end up in files and commits. Plus, an extra layer of protection never hurts! 馃憤

To ensure the capture of leaked credentials, an assessment should occur at the pull request level, with PRs blocked if TruffleHog returns any results. Moreover, pull requests should only be mergeable if TruffleHog returns empty.

Tasks

@JamieSlome JamieSlome added good first issue Good for newcomers security Security improvements or tooling labels Jan 24, 2024
@JamieSlome JamieSlome assigned JamieSlome and unassigned JamieSlome Jan 24, 2024
@JamieSlome
Copy link
Member Author

@abinash2512 - want to take this one on?

@JamieSlome JamieSlome changed the title Scan for leaked credentials in PRs using TruffleHog OSS 馃惙 Scan for leaked credentials in PRs and code diff using TruffleHog OSS 馃惙 Apr 5, 2024
@JamieSlome
Copy link
Member Author

@abinash2512 - I've updated the scope of this ticket to include:

  1. Running TruffleHog as a pull request check on our GitHub repository, via GitHub Actions
  2. Assess code pushed through Git Proxy for secrets using TruffleHog as a new push processor

@JamieSlome
Copy link
Member Author

@maoo - after our community discussion today, we recognised that TruffleHog uses the AGPL-3.0 license. Do you think this would be a problem running it as a status check when pull requests are opened?

@coopernetes mentioned that running it as an embeddable plugin or assessment layer in Git Proxy itself may be problematic but wanted to see what you think about running it as a GitHub Action?

@maoo
Copy link
Member

maoo commented Apr 8, 2024

@maoo - after our community discussion today, we recognised that TruffleHog uses the AGPL-3.0 license. Do you think this would be a problem running it as a status check when pull requests are opened?

Yes, I believe so; there are actually 2 things that concern me:

  • The "GPL" part of it, which would force all our derived code (eg, a GitProxy plugin that uses TruffleHog) to be released as GPL; assuming we would build the code based on the 2.x architecture, we could host the plugin as a separate FINOS project, and release it as GPL, though I'm not sure if you would be able to run it on your end
  • The "A" part, which could affect the license of GitProxy

I can seek legal advice, though it could take some time.

@coopernetes mentioned that running it as an embeddable plugin or assessment layer in Git Proxy itself may be problematic but wanted to see what you think about running it as a GitHub Action?

I think that leaked credentials is a crucial use case for GitProxy, and we should provide it as a plugin that adheres to the GitProxy 2.x architecture.

I also think that we should consider evaluating TruffleHog alternatives; from a quick seach I found https://github.com/GitGuardian , but I'm sure there are way more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers security Security improvements or tooling
Projects
None yet
Development

No branches or pull requests

2 participants