fix(slack): harden native webhook configuration - #7566
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThis PR hardens native Slack webhook configuration and authentication while preserving custom-bot and outbound OAuth behavior.
Confidence Score: 5/5The PR appears safe to merge; the webhook authentication and configuration guards are consistently applied and covered by targeted tests. No actionable new defects remain. The previous setup-diagnostic finding was fixed by naming both extended-scope flags in the remediation and was manually resolved after waleedlatif1 confirmed the change.
|
| Filename | Overview |
|---|---|
| apps/sim/app/api/webhooks/slack/route.ts | Moves native Slack signing-secret and signature checks ahead of challenge handling and event dispatch. |
| apps/sim/lib/webhooks/deploy.ts | Rejects native Sim-app trigger deployment without a signing secret while leaving custom-bot resolution unaffected. |
| apps/sim/lib/webhooks/providers/slack.ts | Makes malformed legacy Slack registrations without signing secrets fail closed. |
| apps/sim/lib/webhooks/slack-native-config.ts | Centralizes normalization of the native Slack signing secret, treating empty and whitespace-only values as unconfigured. |
| packages/sim-setup/src/checks.ts | Adds configuration coherence diagnostics and complete remediation guidance for native Slack trigger flags. |
| apps/docs/content/docs/platform/self-hosting/integrations-oauth.mdx | Documents native Slack configuration requirements, approval-gated scopes, and outbound-only OAuth behavior. |
Sequence Diagram
sequenceDiagram
participant Slack
participant Route as Native Slack webhook route
participant Config as Slack native configuration
participant Verify as Signature verifier
participant Dispatch as Webhook dispatcher
Slack->>Route: POST raw request
Route->>Config: Read and trim signing secret
alt Secret missing or empty
Route-->>Slack: 500 Slack app not configured
else Secret configured
Route->>Verify: Verify timestamp, signature, and raw body
alt Signature invalid
Verify-->>Slack: 401 Unauthorized
else Signature valid
alt URL verification challenge
Route-->>Slack: Signed challenge response
else Slack event
Route->>Dispatch: Resolve and dispatch webhook
Dispatch-->>Slack: Dispatch response
end
end
end
Reviews (5): Last reviewed commit: "fix(slack): align setup checks with runt..." | Re-trigger Greptile
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 10 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
d52a174 to
0682df9
Compare
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Summary
Type of Change
Testing
Checklist