-
Notifications
You must be signed in to change notification settings - Fork 15
Implement GitHub webhook signature validation #286
Copy link
Copy link
Open
Labels
enhancementNew feature or improvement to existing functionalityNew feature or improvement to existing functionalityinfrastructureInfrastructure, deployment, and DevOps tasksInfrastructure, deployment, and DevOps taskssecuritySecurity-related issues and vulnerabilitiesSecurity-related issues and vulnerabilities
Description
Activity
Metadata
Metadata
Assignees
Labels
enhancementNew feature or improvement to existing functionalityNew feature or improvement to existing functionalityinfrastructureInfrastructure, deployment, and DevOps tasksInfrastructure, deployment, and DevOps taskssecuritySecurity-related issues and vulnerabilitiesSecurity-related issues and vulnerabilities
Summary
Currently the GitHub webhook endpoint at accepts all webhook requests without validating they come from GitHub. This is a security risk as malicious actors could send fake webhook events.
Requirements
Implementation Details
The webhook signature validation should:
X-Hub-Signature-256header from incoming webhook requestsSecurity Benefits
Environment Variables
The GITHUB_WEBHOOK_SECRET environment variable is already configured in production.
Files to Modify
src/index.js- Add signature validation middleware to/githubendpointsrc/helpers/webhookSecurity.jsfor reusable validation logicReferences