UNPKG

mcp-server-semgrep

Version:

MCP Server for Semgrep Integration - static code analysis with AI

17 lines (14 loc) 373 B
const jwt = require('jsonwebtoken'); const bad = (token) => { // ruleid: jwt-decode-without-verify if (jwt.decode(token, true).param === true) { console.log('token is valid'); } }; const ok = (token, key) => { // ok: jwt-decode-without-verify jwt.verify(token, key); if (jwt.decode(token, true).param === true) { console.log('token is valid'); } };