Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Websocket Security

ASecurity

Analyze WebSocket security posture — use when reviewing WS/WSS upgrade auth, origin checks, message authorization, or cross-site WebSocket hijacking risks (CWE-346 / CWE-352 / A01:2021).

15 stars
0 votes
0 copies
0 views
Added 9/22/2026
securitygospringapibackendsecurity

Works with

cliapi

Security Analysis

A100/100

Scanned 9/22/2026

Install to Claude Code

$npx -y skills add awarexone/AXguard --skill websocket-security --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Websocket Security?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Websocket Security
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/awarexone-websocket-security/badge)](https://www.skillsdirectory.com/skills/awarexone-websocket-security)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
name: websocket-security
description: Analyze WebSocket security posture — use when reviewing WS/WSS upgrade auth, origin checks, message authorization, or cross-site WebSocket hijacking risks (CWE-346 / CWE-352 / A01:2021).
version: "1.0.0"
author: AwareXone
license: MIT
domain: application-security
subcategory: web-security
tags: [websocket, origin, csrf, cwe-346]
frameworks:
  cwe: [CWE-346, CWE-352]
  owasp_top10: [A01:2021, A07:2021]
  owasp_api_top10: [API2:2023, API5:2023]
  owasp_llm_top10: []
  owasp_wstg: []
  owasp_asvs: []
  mitre_attack: []
  mitre_atlas: []
  nist_csf: []
  nist_ai_rmf: []
related_skills: [api-security, authentication-analysis, authorization-analysis, session-security, security-triage, security-remediation]
related_commands: [/axguard-auth, /axguard-audit, /axguard-scan]
related_rules: [auth.]
references:
  - https://owasp.org/Top10/A01_2021-Broken_Access_Control/
  - https://owasp.org/Top10/A07_2021-Identification_and_Authentication_Failures/
  - https://cwe.mitre.org/data/definitions/346.html
  - https://cwe.mitre.org/data/definitions/352.html
last_reviewed: "2026-09-15"
---

# WebSocket Security

## Purpose

Guide defensive review of **WebSocket** endpoints: authentication at upgrade time, origin validation, per-message authorization, and abuse of long-lived channels.

## When to Use / When Not to Use

**Use when:**

- Apps use `ws`/`wss`, Socket.IO, Action Cable, Spring STOMP, or browser `WebSocket` to privileged backends.
- Cookie sessions authenticate the upgrade (cross-site WebSocket hijacking risk).
- Real-time features push sensitive events or accept commands over WS.

**Do not use when:**

- Pure unidirectional server-sent events/HTTP without WS.
- Public read-only broadcast with no sensitive data and no command channel (still note DoS).

## Security Concepts

The HTTP upgrade is the auth gate. Browsers send cookies on cross-site WS; **Origin** must be validated server-side. Authorization is not “once at connect” for every later message if topics/commands vary.

## Threat Model

Attacker goals:

1. Cross-site hijack of victim WS sessions to read/act.
2. Subscribe to other users’ channels (BOLA over topics).
3. Inject malicious messages causing XSS in listeners or server-side command execution.
4. Resource exhaustion via connection floods / huge messages.

## Analysis Workflow

1. Locate upgrade handlers and auth checks (token query vs header vs cookie).
2. Verify Origin/Host allowlists — reject missing/unexpected Origin for cookie-auth sockets.
3. Prefer explicit tokens over cookie-only WS when cross-site risk is high.
4. Map message types/topics; require authZ per subscribe/publish/action.
5. Validate and size-limit message payloads; avoid `eval` of message bodies.
6. Enforce TLS (`wss`) in production; avoid sensitive data on `ws://`.
7. Rate-limit connections and messages; idle timeouts.

## Evidence Requirements

- Upgrade handler location and auth mechanism
- Missing Origin check or missing per-message authZ
- Sensitive event/command capability
- Impact (hijack / IDOR / injection / DoS)

## False Positive Controls

- Token in protocol that is not auto-sent cross-site + Origin still checked
- No cookie auth and no sensitive commands
- Same-site-only deployments with hardened Origin allowlist and tests

## Remediation

1. Authenticate upgrade; re-authorize sensitive messages.
2. Allowlist Origins; fail closed.
3. Use `wss`, short-lived tokens, and avoid putting long-lived secrets in query strings (logs).
4. Apply standard input validation to message payloads.
5. Connection/message quotas and max payload sizes.

## Verification

```text
Review upgrade+message auth → Fix Origin/authZ → Re-test authorized clients only → Confirm cross-site connect fails closed
```

## Related Skills

- `session-security`, `authentication-analysis`, `authorization-analysis`
- `api-security`, `security-triage`, `security-remediation`

## Framework Mapping

- CWE-346 Origin Validation Error; CWE-352 CSRF
- OWASP A01:2021, A07:2021
- OWASP API2:2023, API5:2023

## References

- https://owasp.org/Top10/A01_2021-Broken_Access_Control/
- https://owasp.org/Top10/A07_2021-Identification_and_Authentication_Failures/
- https://cwe.mitre.org/data/definitions/346.html
- https://cwe.mitre.org/data/definitions/352.html

## Research Provenance

Primary sources:

- OWASP A01/A07:2021; CWE-346; CWE-352; OWASP API2/API5:2023 (accessed 2026-09-15)

Secondary / internal:

- AXGuard `rules/auth.json` adjacency; `/axguard-auth`
- AwareXone Agentic-Bug-Hunter WebSocket methodology (concepts only; not copied)

Datasets:

- UVID HF dataset — category linkage concepts only (MIT license metadata review 2026-09-15)

Attribution

awarexoneawarexone
View sourceMore from awarexone →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Springboot Security

Java Spring Boot 服务中关于身份验证/授权、验证、CSRF、密钥、标头、速率限制和依赖安全的 Spring Security 最佳实践。

2456590 votes

Security Review

Use this skill when adding authentication, handling user input, working with secrets, creating API endpoints, or implementing payment/sensitive features. Provides comprehensive security checklist and patterns.

2456590 votes

Paperclip Task Bridge

Create, comment on, update, and list Paperclip tasks from Hermes using scoped Paperclip API credentials.

805540 votes

Summarize Status

Write a short, colloquial summary for a Paperclip summary slot: open with the 1–3 specific, concrete actions the reader needs to take right now to unblock the work, then a brief plain-language status, streaming progress as it works.

805540 votes

Paperclip Evals

Choose, inspect, validate, and report Paperclip Runner or Product E2E evaluations while preserving evidence, provenance, cost, and failure classification.

805540 votes
View all in security →