Skip to content

Remove Slack notifications for CI failures#199

Merged
waiting-for-dev merged 2 commits intomasterfrom
waiting-for-dev/remove_slack_notifications
Feb 10, 2023
Merged

Remove Slack notifications for CI failures#199
waiting-for-dev merged 2 commits intomasterfrom
waiting-for-dev/remove_slack_notifications

Conversation

@waiting-for-dev
Copy link
Copy Markdown
Contributor

Summary

We were storing the Slack secrets on a CircleCI context. Although we were also passing them to forks, it resulted on unauthorized builds for external contributions.

We could work around the issue in two ways:

  • Having the secrets outside of any context, but that would compromise the security of the associated Slack channel for:
    • Send messages as @CircleCI notifications
    • Send messages to channels @CircleCI notifications isn't a member of
    • Upload, edit, and delete files as CircleCI notifications
  • Using CircleCI logic statements to conditionally run jobs when CIRCLECI_USERNAME or CIRCLE_PR_USERNAME env vars are in a list of allowed users. However, that would be something difficult to maintain, and there's no other way to check the user's role.

Given that we don't find those trade-offs to be acceptable, we remove the integration for now.

Closes #4902

Checklist

Check out our PR guidelines for more details.

The following are mandatory for all PRs:

The following are not always needed:

  • 📖 I have updated the README to account for my changes.
  • 📑 I have documented new code with YARD.
  • 🛣️ I have opened a PR to update the guides.
  • ✅ I have added automated tests to cover my changes.
  • 📸 I have attached screenshots to demo visual changes.

We were storing the Slack secrets on a CircleCI context [1]. Although we
were also passing them to forks [2], it resulted on unauthorized builds
for external contributions.

We could work around the issue in two ways:

- Having the secrets outside of any context, but that would compromise
 the security of the associated Slack channel for:
  - Send messages as @circleci notifications
  - Send messages to channels @circleci notifications isn't a member of
  - Upload, edit, and delete files as CircleCI notifications
- Using CircleCI logic statements [3] to conditionally run jobs when
`CIRCLECI_USERNAME` or `CIRCLE_PR_USERNAME` env vars [4] are in a list
of allowed users. However, that would be something difficult to
maintain, and there's no other way to check the user's role.

Given that we don't find those trade-offs to be acceptable, we remove
the integration for now.

[1] - https://circleci.com/docs/contexts/
[2] - https://circleci.com/docs/oss/#pass-secrets-to-builds-from-forked-pull-requests
[3] - https://circleci.com/docs/configuration-reference/#logic-statements
[4] - https://circleci.com/docs/variables/
@mergify mergify Bot added the needs changelog label Needs a label to determine the type of change. label Feb 9, 2023
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Feb 9, 2023

It looks like this PR is missing a label to determine the type of change it introduces. The maintainer should add one of the following labels:

  • bug for bugfixes.
  • enhancement for new features and improvements.
  • documentation for documentation changes.
  • security for security patches.
  • removed for feature removals.
  • infrastructure for internal changes that should not go in the changelog.

Additionally, the maintainer may also want to add one of the following:

  • breaking for breaking changes.
  • deprecated for feature deprecations.

Once the correct labels have been set, simply remove the needs changelog label label from this PR so I can merge it.

@waiting-for-dev waiting-for-dev merged commit 3507863 into master Feb 10, 2023
@waiting-for-dev waiting-for-dev deleted the waiting-for-dev/remove_slack_notifications branch February 10, 2023 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs changelog label Needs a label to determine the type of change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants