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

Scan commits for secrets and prevent push #19343

Closed
luwol03 opened this issue Apr 7, 2022 · 4 comments
Closed

Scan commits for secrets and prevent push #19343

luwol03 opened this issue Apr 7, 2022 · 4 comments
Labels
type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@luwol03
Copy link

luwol03 commented Apr 7, 2022

Feature Description

I think it would be a cool integration to prevent pushing commits which contain secrets. Github now announced, that they now prevent such pushes. Of course this feature should be possible to opt-out.

I randomly found the following go tool on my discover page that can scan repositories and files even directly via a remote url from git. Maybe it’s somehow possible to use that for scanning the files.

Screenshots

No response

@luwol03 luwol03 added type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first. labels Apr 7, 2022
@silverwind
Copy link
Member

silverwind commented Apr 8, 2022

Might be nice to have, but I'd say this should definitely be an opt-in feature and I think there must be a way to still push in case of false-positive detections. Maybe it can allow secrets via force pushes, for example.

Just one example would be that I often like to push self-signed private keys to repos for testing purposes. In the general sense, such files are classified as secrets, but in my case, it's still fine to push them as they are only significant locally.

@mscherer
Copy link
Contributor

Instead of --force (who could have side effect), I think using -o/--push-option would be better.

And if a secret is force pushed, should there be some way to ignore further push with the same secret ? (eg, clear per secret once and for all)

@techknowlogick
Copy link
Member

closing as dupe of #5656

@luwol03
Copy link
Author

luwol03 commented Apr 13, 2022

Oh ok. Never found that issue. Thank you.

@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

4 participants