Skip to content
This repository was archived by the owner on Jan 25, 2024. It is now read-only.
This repository was archived by the owner on Jan 25, 2024. It is now read-only.

Prompt before pushing to a public repo #8

@hcourt

Description

@hcourt

secret-shield introduces a layer of protection against accidentally committing secrets to public repos. What if we want to protect against accidentally committing to public repos at all?

Proposal

We should add a pre-push hook to the default secret-shield suites. This hook would:

  • Check if the repo is public.
  • Check if this user has never committed to this repo before. (optional: make this configurable!)

If both are true, the hook would prompt with a confirmation message.

> git push -u origin foo
WARNING!  This repository is PUBLIC, and you have never committed to this repo before.
Are you sure you want to push refs to 'git@github.com:mapbox/secret-shield'?  y/N

cc/ @mapbox/security-and-compliance @ectrotter @tmpsantos

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions