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

Add support for org and repo level secret scanning and push protection #583

Open
roryscarson opened this issue Jan 17, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@roryscarson
Copy link

Prerequisites:

Is the functionality available in the GitHub UI? If so, please provide a link to information about the feature.

Is the functionality available through the GitHub API? If the functionality is available, please provide links to the
API documentation (https://developer.github.com/v3/) as well as the Octokit documentation (https://octokit.github.io/).

Specify which security and analysis features to enable or disable for the repository.
To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "Managing security managers in your organization."
For example, to enable GitHub Advanced Security, use this data in the body of the PATCH request: { "security_and_analysis": {"advanced_security": { "status": "enabled" } } }.
You can check which security and analysis features are currently enabled by using a GET /repos/{owner}/{repo} request.

New Feature

Github supports secrets scanning and blocking push commits. It's possible to enable this org wide at https://github.com/organizations/$ORG/settings/security_analysis with the following flags

  • secret_scanning_new_repos: enabled
  • secret_scanning_push_protection_new_repos: enabled

adding these to safe-settings would prevent drift from repo admins disabling it in individual repos.

@roryscarson roryscarson added the enhancement New feature or request label Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant