npfaerber

Node.js Security Audit

IT運用・セキュリティv1.0.0
作者:npfaerber更新日 2026-05-11nodejs-security-audit@clawhub_npfaerber/nodejs-security-audit
セキュリティスキャン#Security Audit#Deployment

AlphaMoatによると、2026-09時点でNode.js Security Auditのダウンロード数は1,847、スター数は0で、AIスキル全体5,078件中4,543位、IT運用・セキュリティでは264件中255位です。

インストール数
334
ダウンロード数
1847
スター数
-
総合順位
#4,543
全体の上位 90% · IT運用・セキュリティの上位 97%
プラットフォームインストール数ダウンロード数スター数コメント
ClawHub ↗451708--
SkillHub ↗3341847-—

プラットフォームごとに集計方法と集計時点が異なります。

このスキルでできること

秘密の露出、注入、XSS、認証、CORS、パス、ヘッダー、利用制限、入力検証、依存関係を扱います。所見は重大度、場所、修正案で示します。コマンドを確認してソースと所見を保護します。チェックリストや例だけで安全性が証明されるわけではありません。

資料公開日 2026-10-27

できること

  • 公開前の Node.js サーバーを確認する

使う場面

  • 変更したサーバーの安全確認が必要なとき

プロンプト例

スキルのドキュメントをもとに生成した例であり、実際の実行結果ではありません。

根拠、重大度、ファイル位置を添えて問題を報告して。

月次の推移

ダウンロード数1847
662129919352026-03 · ダウンロード数 7502026-05 · ダウンロード数 11142026-06 · ダウンロード数 12132026-07 · ダウンロード数 14182026-08 · ダウンロード数 15692026-09 · ダウンロード数 184726-0326-09
スター数-
0112026-03 · スター数 -2026-05 · スター数 -2026-06 · スター数 -2026-07 · スター数 -2026-08 · スター数 -2026-09 · スター数 -26-0326-09

2026-09 から集計方法を変更し、同名スキルを作者ごとに分けて集計し、全スキルを対象にしました。破線は変更前の月で、変更後のデータとは直接比較せず、変更をまたぐ増減も計算していません。

月ダウンロード数前月比スター数
2026-091847—-
2026-081569+10.6%-
2026-071418+16.9%-
2026-061213+8.9%-
2026-051114—-
2026-03750—-

SKILL.md 原文

作者が公開した元のファイルをテキストのまま表示しています。AlphaMoat による編集や審査はしていません。リンクはクリックできません。コマンドは内容を確認してから実行してください。取得日 2026-10-23。

2.9 KB・ClawHub v1.0.0
---
name: nodejs-security-audit
description: Audit Node.js HTTP servers and web apps for security vulnerabilities. Checks OWASP Top 10, CORS, auth bypass, XSS, path traversal, hardcoded secrets, missing headers, rate limiting, and input validation. Use when reviewing server code before deployment or after changes.
---

# Node.js Security Audit

Structured security audit for Node.js HTTP servers and web applications.

## Audit Checklist
すべて表示(全 96 行)

### Critical (Must Fix Before Deploy)

**Hardcoded Secrets**
- Search for: API keys, passwords, tokens in source code
- Pattern: `grep -rn "password\|secret\|token\|apikey\|api_key" --include="*.js" --include="*.ts" | grep -v node_modules | grep -v "process.env\|\.env"`
- Fix: Move to env vars, fail if missing: `if (!process.env.SECRET) process.exit(1);`

**XSS in Dynamic Content**
- Search for: `innerHTML`, template literals injected into DOM, unsanitized user input in responses
- Fix: Use `textContent`, or escape: `str.replace(/[&<>"']/g, c => ({'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;',"'":"&#39;"}[c]))`

**SQL/NoSQL Injection**
- Search for: String concatenation in queries, `eval()`, `Function()` with user input
- Fix: Parameterized queries, input validation

### High (Should Fix)

**CORS Misconfiguration**
- Search for: `Access-Control-Allow-Origin: *`
- Fix: Allowlist specific origins: `const origin = ALLOWED.has(req.headers.origin) ? req.headers.origin : ALLOWED.values().next().value`

**Auth Bypass**
- Check: Every route that should require auth actually checks it
- Common miss: Static file routes, agent/webhook endpoints, health checks that expose data

**Path Traversal**
- Check: `path.normalize()` + `startsWith(allowedDir)` on all file-serving routes
- Extra: Resolve symlinks with `fs.realpathSync()` and re-check

### Medium (Recommended)

**Security Headers**
```javascript
const HEADERS = {
  'X-Frame-Options': 'SAMEORIGIN',
  'X-Content-Type-Options': 'nosniff',
  'Referrer-Policy': 'strict-origin-when-cross-origin',
  'Permissions-Policy': 'camera=(), microphone=(), geolocation=()',
};
// Apply to all responses
```

**Rate Limiting**
```javascript
const attempts = new Map(); // ip -> { count, resetAt }
const LIMIT = 5, WINDOW = 60000;
function isLimited(ip) {
  const now = Date.now(), e = attempts.get(ip);
  if (!e || now > e.resetAt) { attempts.set(ip, {count:1, resetAt:now+WINDOW}); return false; }
  return ++e.count > LIMIT;
}
```

**Input Validation**
- Body size limits: `if (bodySize > 1048576) { req.destroy(); return; }`
- JSON parse in try/catch
- Type checking on expected fields

### Low (Consider)

**Dependency Audit:** `npm audit`
**Error Leakage:** Don't send stack traces to clients in production
**Cookie Security:** `HttpOnly; Secure; SameSite=Strict`

## Report Format

```
## Security Audit: [filename]

### Critical
1. **[Category]** Description — File:Line — Fix: ...

### High
...

### Medium
...

### Low
...

### Summary
X critical, X high, X medium, X low
```

IT運用・セキュリティの人気スキル

SkillScanIT運用・セキュリティ

使う前にスキルパッケージの安全性を調べ、結果に応じて導入を止めるスキルです。

↓ 18.2万★ 41tokauthai
Free Ride - Unlimited free AIIT運用・セキュリティ

Manages free AI models from OpenRouter for OpenClaw. Automatically ranks models by quality, configures fallbacks for rate-limit handling, and updates opencla...

↓ 9.7万★ 485Shaishav Pidadi
OpenClaw BackupIT運用・セキュリティ

OpenClaw の設定、資格情報、ワークスペースをバックアップし復元するスキルです。

↓ 3.5万★ 93alex3alex
1passwordIT運用・セキュリティ

1Password CLI でシークレットを扱うための設定と使い方です。

↓ 3.5万★ 53Peter Steinberger
MoltGuard - Security & Antivirus & GuardrailsIT運用・セキュリティ

プロンプト注入や危険なコマンドを検出すると説明されている OpenClaw 用セキュリティプラグインです。

↓ 3.4万★ 116Thomas
TmuxIT運用・セキュリティ

tmux セッションを遠隔操作し、対話型 CLI にキーを送って出力を取得します。

↓ 3.3万★ 46Peter Steinberger
Security AuditorIT運用・セキュリティ

アプリケーションセキュリティ技術者の視点でコードと構成を監査します。

↓ 3万★ 51jgarrison929
Tencent COSIT運用・セキュリティ

Tencent Cloud のオブジェクトストレージとデータ処理サービスを管理するスキルです。

↓ 2.7万★ 15u_23a69fa7

データ月:2026-09 · ダウンロード数、スター数、インストール数は公開スキルレジストリ(ClawHub、SkillHub)から月単位で集計しています。詳しくはデータの方法論をご覧ください。