Phy Jwt Auth AuditCAUTION
๐ง Curated collection of 1209+ best OpenClaw skills โ weekly updated by MyClaw.ai
Overview
๐ง Curated collection of 1209+ best OpenClaw skills โ weekly updated by MyClaw.ai
4f3b4a2a472eOBSERVED ยท 2026-10-08Host compatibility
What the documentation claims. We have not run a compatibility test.
| Host | Status | Notes |
|---|---|---|
| openclaw | mentioned |
What it tells the agent
The instruction file, verbatim from the audited commit โ this is the text the model reads, and the surface the audit's instruction layer examines. Quoted here so you can judge it without cloning anything.
---
name: phy-jwt-auth-audit
description: JWT and OAuth/OIDC security auditor. Decodes any JWT token (without verification) to inspect alg/exp/iss/aud/scope claims, detects the "alg:none" bypass vulnerability, expired or no-expiry tokens, overly broad OAuth scopes, JWT stored in localStorage (XSS theft risk), JWT in URL parameters (log leakage), missing issuer/audience validation in source code, hardcoded tokens in .env files, and weak HMAC secrets. Also scans source files for insecure token handling patterns: Bearer token logged, token compared with ==, auth bypass via role:admin in payload. Generates a severity-ranked report with exact code locations and fixes. Zero external API โ pure local analysis. Triggers on "JWT audit", "token security", "auth security", "alg none", "OAuth scopes", "bearer token", "token expiry", "/jwt-audit".
license: Apache-2.0
metadata:
author: PHY041
version: "1.0.0"
tags:
- security
- jwt
- oauth
- authentication
- token-security
- static-analysis
- developer-tools
- owasp
- api-security
- compliance
---
# JWT & Auth Auditor
A developer pastes a JWT into a debug log. The logger ships it to Datadog. An attacker finds it in the logs 6 months later. The token never expires.
This skill decodes JWTs without verifying them (which is the point โ you need to inspect them even when you don't have the secret), checks their claims against security best practices, scans your codebase for insecure token handling, and finds the OAuth scopes that give more access than necessary.
**Zero external API โ all analysis runs locally. Works with any JWT/OAuth provider.**
---
## Trigger Phrases
- "JWT audit", "token security check"
- "auth security", "authentication review"
- "alg:none vulnerability", "JWT algorithm"
- "OAuth scopes", "bearer token check"
- "token expiry", "no exp claim"
- "JWT in localStorage", "token in URL"
- "/jwt-audit"
---
## How to Provide Input
```bash
# Option 1: Decode and audit a specific JWT token
/jwt-audit eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
# Option 2: Audit source code for insecure token handling
/jwt-audit --scan src/
# Option 3: Audit .env files for hardcoded tokens
/jwt-audit --env-scan
# Option 4: Audit a specific auth file
/jwt-audit src/middleware/auth.ts
# Option 5: Full audit (token decode + code scan + env scan)
/jwt-audit eyJhbG... --scan . --env-scan
# Option 6: Check OAuth scopes in API calls
/jwt-audit --check-scopes
# Option 7: CI mode (exit 1 on critical findings)
/jwt-audit --scan src/ --ci --max-critical 0
```
---
## Step 1: Decode and Analyze JWT Claims
```python
import base64
import json
import time
from dataclasses import dataclass, field
from typing import Any, Optional
@dataclass
class JwtFinding:
severity: str # CRITICAL / HIGH / MEDIUM / LOW / INFO
claim: str # which claim is affected
issue: str
detail: str
fix: str
def decode_jwt_unsafe(token: str) -> tuple[dict, dict, str]:
"""
Decode a JWT token WITHOUT verifying the signature.
Returns (header, payload, signature_b64).
Safe for inspection purposes โ never use for auth decisions.
"""
parts = token.strip().split('.')
if len(parts) != 3:
raise ValueError(f"Invalid JWT format: expected 3 parts, got {len(parts)}")
def b64_decode(s: str) -> dict:
# JWT uses URL-safe base64 without padding
padding = 4 - len(s) % 4
if padding != 4:
s += '=' * padding
raw = base64.urlsafe_b64decode(s)
return json.loads(raw)
header = b64_decode(parts[0])
payload = b64_decode(parts[1])
signature = parts[2]
return header, payload, signature
def analyze_jwt_claims(token: str) -> list[JwtFinding]:
"""Full security analysis of a JWT token's claims and header."""
findings = []
try:
header, payload, sig = decode_jwt_unsafe(token)
except Exception as e:
return [JwtFinding(
severity='CRITICAL', claim='format',
issue='Invalid JWT format', detail=str(e),
fix='Ensure token is a valid JWT (3 base64url parts separated by dots)'
)]
now = int(time.time())
# โโ Algorithm checks โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
alg = header.get('alg', '')
if alg.lower() == 'none':
findings.append(JwtFinding(
severity='CRITICAL', claim='alg',
issue='Algorithm "none" โ signature verification disabled',
detail=(
'alg:none means the JWT has no signature. Any payload can be crafted '
'and will be accepted by a vulnerable server. This is CVE-2015-9235.'
),
fix=(
'Server must reject tokens with alg:none. '
'In jsonwebtoken: jwt.verify(token, secret, { algorithms: ["HS256"] })'
),
))
elif alg.startswith('HS') and len(sig) < 32:
findings.append(JwtFinding(
severity='HIGH', claim='alg',
issue=f'Algorithm {alg} with suspiciously short signature',
detail='Short signature may indicate a weak or guessable HMAC secret.',
fix='Use a minimum 256-bit (32-byte) random secret for HMAC-SHA256',
))
elif alg == 'RS256' or alg == 'ES256':
findings.append(JwtFinding(
severity='INFO', claim='alg',
issue=f'Algorithm: {alg} (asymmetric โ good)',
detail='RSA/ECDSA signature โ cannot be forged without the private key.',
fix='Ensure public key is loaded from a trusted source, not from the JWT header itself.',
))
# Algorithm confusion: HS256 when server expects RS256
if alg == 'HS256':
findings.append(JwtFinding(
severity='MEDIUM', claim='alg',
issue='HS256 โ verify server rejects RS256โHS256 algorithm confusion',
detail=(
'If the server also supports RS256, an attacker may forge Trust audit
CAUTIONgrade B ยท trust 89/100 Install with care. The audit found things worth knowing before you trust its output.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | WARN |
| L2 | Instruction surface (what it tells the agent) | FAIL |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- pinned
- Secrets in source
- none-found
Findings (2)
'fix': 'Load from environment: process.env.JWT_SECRET or os.getenv("JWT_SECRET")',<key>k5Ey9KFlkqpj+SDkUw+5ED9lTA3En/qUi0zdrydUCH3kMWTE3Eh65NXnFCaxlY2omY2JHnlEoK7Li7oOEvM7eG5VPdcO/sFlMfoCRdnLYdepJ+uLzYwOWR8W4yQVve/clxVFTVRL4DFleKInGdpAxIbHZT2yi4ADAMENls1N1XSLojRuqXePXDeAT/4Mv4TTx0s
Gates applied: no_behavioural_pass.
4f3b4a2a472efull audit observations/trust-audit/skill/leoyeai__phy-jwt-auth-audit.json ยท Report an issue / request a re-scanAudit history
Every audit this skill has had.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-08 | 4f3b4a2a472e | CAUTION | B | 89 | first audit |
Questions
What does the Phy Jwt Auth Audit skill do?
๐ง Curated collection of 1209+ best OpenClaw skills โ weekly updated by MyClaw.ai
Is Phy Jwt Auth Audit safe to install?
With care. The audit graded it B (89/100) and found 2 things worth knowing before you trust this skill, listed below with the exact line each was found on.
What can Phy Jwt Auth Audit access on my machine?
The audit observed no filesystem, network or shell use at all in its source.
Which assistants does Phy Jwt Auth Audit work with?
Its documentation mentions openclaw. That is what the text claims, not a compatibility test we ran.
How current is this page?
The grade is for one exact copy of the source (4f3b4a2a472e), read on 2026-10-08. The repository is watched, and a new audit runs when it changes โ this is the first audit.