flexport-security-basics

Featured

Apply Flexport API security best practices including webhook signature verification, API key rotation, and least-privilege access patterns. Trigger: "flexport security", "flexport webhook signature", "secure flexport API key".

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

# Flexport Security Basics ## Overview Flexport manages global freight logistics containing shipping manifests, customs declarations, commercial invoices, and supply chain partner data. A breach exposes trade routes, commodity values, importer/exporter identities, and customs brokerage details. Secure API credentials, webhook endpoints, and any pipeline that processes shipment tracking or purchase order data. ## API Key Management ```typescript function createFlexportClient(): { apiKey: string; baseUrl: string } { const apiKey = process.env.FLEXPORT_API_KEY; if (!apiKey) { throw new Error("Missing FLEXPORT_API_KEY — store in secrets manager, never in .env in production"); } // Never log the key; log only a hash suffix for debugging console.log("Flexport client initialized (key suffix:", apiKey.slice(-4), ")"); return { apiKey, baseUrl: "https://api.flexport.com/v2" }; } ``` ## Webhook Signature Verification ```typescript import crypto from "crypto"; import { Request, Response, NextFunction } from "express"; function verifyFlexportWebhook(req: Request, res: Response, next: NextFunction): void { const signature = req.headers["x-hub-signature"] as string; const secret = process.env.FLEXPORT_WEBHOOK_SECRET!; const expected = "sha256=" + crypto.createHmac("sha256", secret).update(req.body).digest("hex"); if (!signature || !crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expected))) { res.status(401).send("Invalid signature"); return; ...

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