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

add callout for branch protection #1098

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

s-santillan
Copy link
Collaborator

@s-santillan s-santillan commented Jun 28, 2023

Thanks for improving Semgrep Docs 馃榾

Please ensure

  • A subject matter expert (SME) reviews the content
  • A technical writer reviews the content or PR
  • This change has no security implications or else you have pinged the security team

Here is what it looks like rendered:

Snag_6834c

@s-santillan s-santillan marked this pull request as ready for review June 28, 2023 18:53
@s-santillan s-santillan self-assigned this Jun 28, 2023
@s-santillan s-santillan changed the title add callout for branch protectiton add callout for branch protection Jun 28, 2023
@s-santillan s-santillan added the documentation Improvements or additions to documentation label Aug 6, 2023
@s-santillan
Copy link
Collaborator Author

Snag_1538099 Hi @r2c-david! Can you let me know if the updates work for you?

:::caution
For **GitHub** users: This method of adding a repository commits a GitHub Actions workflow file directly into your trunk or default branch, such as `main` or `develop`. **Branch protection** can prevent Semgrep from onboarding your repositories, whether in bulk or one-by-one, through this method.

If you encounter issues with adding repositories, such as being unable to commit the Semgrep workflow file, change your [branch protection](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches) settings temporarily while you add repositories to Semgrep.

Choose a reason for hiding this comment

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

I don't think most customers will actually be willing/able to modify their branch protection settings. I'd also suggest that they introduce the workflow file through a PR and then merge it into the repo.

As the feature bakes - I'd also encourage linking somewhere in here to auto-scan as an alternative.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'd also suggest that they introduce the workflow file through a PR and then merge it into the repo.

Thanks for the reply. Just confirming that you're suggesting, IF the user CAN'T change their branch protection:

  1. The user has to do it manually (copy paste the yml file, make a PR).
  2. The user has to do this for every repo.

Is that correct?

Choose a reason for hiding this comment

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

Yup that's exactly right.

Regarding the "do this for every repo" - it might be helpful to caveat if they are looking to deploy to many repos where this would be cumbersome - they might consider some of the approaches outlined by github here:

https://github.blog/2023-04-05-building-organization-wide-governance-and-re-use-for-ci-cd-and-automation-with-github-actions/

Copy link
Collaborator

Choose a reason for hiding this comment

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

we could also link to our required/reusable workflows KBs!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Development

Successfully merging this pull request may close these issues.

None yet

3 participants