fix(ci): use slack incoming webhook for trufflehog alerts#16
Open
alexandre-parfin wants to merge 1 commit into
Open
fix(ci): use slack incoming webhook for trufflehog alerts#16alexandre-parfin wants to merge 1 commit into
alexandre-parfin wants to merge 1 commit into
Conversation
The previous PR (#15) wired SLACK_BOT_TOKEN into the workflow, but that token is an org-level secret with a `selected` allowlist that currently only covers 8 private repos. Adding `rayls-explorer-frontend` (public) to the allowlist would make it the first public repo with access to a workspace-wide bot token — wider blast radius than needed for this use case. Switch to a Slack Incoming Webhook instead: - a webhook URL is scoped to a single channel and can only post (no read, no DMs, no other API methods), so a leak is contained - store it as a repo-level secret (SLACK_WEBHOOK_URL) — no org-wide allowlist change needed Required follow-up before this works: 1. create an Incoming Webhook in Slack pointing at the alerts channel 2. set it as a repo secret with `gh secret set SLACK_WEBHOOK_URL`
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
SLACK_BOT_TOKENinto the scan workflow, but on the first post-merge run the Slack step failed withMissing input! A token must be provided to use the method decided.— the token is an org-level secret withselectedvisibility andrayls-explorer-frontendis not on its allowlist.SLACK_WEBHOOK_URL), so no org allowlist change either.channelfield is removed from the JSON payload (Incoming Webhooks ignore it; the destination is encoded in the URL itself).Required setup before merging
https://hooks.slack.com/services/T.../B.../...URL.If the secret is missing at run time, the step still has
continue-on-error: trueand just skips silently — the workflow won't crash. So merge order isn't critical, but Slack only fires once the secret is in place.Test plan
Security History Scanviaworkflow_dispatchFail on findingsstill flips the run red