shopify-security-basics

Featured

Apply Shopify security best practices for API credentials, webhook HMAC validation, and access scope management. Use when securing API keys, validating webhook signatures, or auditing Shopify security configuration. Trigger with phrases like "shopify security", "shopify secrets", "secure shopify", "shopify HMAC", "shopify webhook verify".

AI & Automation 2,926 stars 433 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Shopify Security Basics ## Overview Security essentials for Shopify apps: credential management, webhook HMAC validation, request verification, and least-privilege access scopes. ## Prerequisites - Shopify Partner account with app credentials - Understanding of HMAC-SHA256 signatures - Access to Shopify app configuration ## Instructions ### Step 1: Secure Credential Storage ```bash # .env — NEVER commit SHOPIFY_API_KEY=your_api_key SHOPIFY_API_SECRET=your_api_secret_key SHOPIFY_ACCESS_TOKEN=shpat_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # .gitignore — add immediately .env .env.local .env.*.local *.pem ``` **Token format reference:** | Token Type | Prefix | Length | Used For | |-----------|--------|--------|----------| | Admin API access token | `shpat_` | 38 chars | Server-side Admin API | | Storefront API token | varies | varies | Client-safe storefront queries | | API secret key | none | 32+ hex | Webhook HMAC, OAuth | ### Step 2: Webhook HMAC Verification Shopify signs every webhook with your app's API secret using HMAC-SHA256. The signature is in the `X-Shopify-Hmac-Sha256` header. ```typescript import crypto from "crypto"; import express from "express"; function verifyShopifyWebhook( rawBody: Buffer, hmacHeader: string, secret: string ): boolean { const computed = crypto .createHmac("sha256", secret) .update(rawBody) .digest("base64"); // Timing-safe comparison prevents timing attacks return crypto.timingSafeEqual( Buffer.from(computed...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category