Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Applies Hex security practices for API token scoping, secrets handling, webhook signature checks, and access control.
63% 96%+33 ptsof test cases passed
Passed 23 of 24 test cases with the skill, and 15 of 24 without it.
When writing a schema to validate Hex project execution requests, what string format constraint must be enforced on the `project_id` property?
Validates project_id with Zod uuid constraint.
This test ran on v1. v2 is the current version and hasn’t been tested on gemini-3.6-flash yet.
3 of 3 safety checks passed
Hex is a collaborative data analytics platform where notebooks query production databases, generate visualizations, and share results across teams. Security concerns center on API token management (read vs run scopes), protecting database connection credentials embedded in Hex projects, and ensuring query results containing sensitive business data are not leaked through logs or exports. A compromised run-scope token can trigger arbitrary queries against connected databases.
function createHexClient(scope: "read" | "run"): { token: string; baseUrl: string } {
const envVar = scope === "run" ? "HEX_RUN_TOKEN" : "HEX_READ_TOKEN";
const token = process.env[envVar];
if (!token) {
throw new Error(`Missing ${envVar} — store in secrets manager, never in code`);
}
// Run tokens can trigger queries — use read tokens for monitoring
console.log(`Hex client initialized with ${scope} scope (token suffix: ${token.slice(-4)})`);
return { token, baseUrl: "https://app.hex.tech/api/v1" };
}
import crypto from "crypto";
import { Request, Response, NextFunction } from "express";
function verifyHexWebhook(req: Request, res: Response, next: NextFunction): void {
const signature = req.headers["x-hex-signature"] as string;
const secret = process.env.HEX_WEBHOOK_SECRET!;
const expected = 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;
}
next();
}
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.