← 返回
未分类 中文

Nginx Config Linter

Lint, validate, and audit nginx configuration files for syntax errors, security issues, and performance problems.
对 Nginx 配置文件进行语法检查、验证和安全、性能审计。
charlie-morrison charlie-morrison 来源
未分类 clawhub v1.0.1 1 版本 100000 Key: 无需
★ 0
Stars
📥 412
下载
💾 1
安装
1
版本
#latest

概述

Nginx Config Linter

Validate and audit nginx configuration files for syntax, security, and performance issues.

Commands

Lint a config file

python3 scripts/nginx-config-linter.py lint /etc/nginx/nginx.conf

Security audit

python3 scripts/nginx-config-linter.py security /etc/nginx/nginx.conf

Performance check

python3 scripts/nginx-config-linter.py performance /etc/nginx/nginx.conf

Full audit (lint + security + performance)

python3 scripts/nginx-config-linter.py audit /etc/nginx/nginx.conf

Scan directory of configs

python3 scripts/nginx-config-linter.py audit /etc/nginx/ --recursive

Options

  • --format text|json|markdown — Output format (default: text)
  • --severity error|warning|info — Minimum severity to report (default: info)
  • --recursive — Scan directories recursively for .conf files
  • --strict — Exit code 1 on any warning or error (CI mode)

What It Checks

Syntax (12 rules)

  • Unmatched braces, missing semicolons
  • Invalid directives in wrong context
  • Duplicate server_name, duplicate location
  • Empty blocks, unreachable locations
  • Invalid listen directives
  • Conflicting try_files

Security (15 rules)

  • Missing security headers (X-Frame-Options, X-Content-Type-Options, CSP, etc.)
  • Server tokens exposed (server_tokens on)
  • Weak SSL/TLS (SSLv3, TLS 1.0/1.1, weak ciphers)
  • Missing HSTS header
  • Directory listing enabled (autoindex on)
  • Missing rate limiting
  • Permissive CORS (*) with credentials
  • Default server block missing
  • Root inside location block

Performance (10 rules)

  • Gzip not enabled or poorly configured
  • Missing keepalive settings
  • Buffer sizes too small/large
  • Missing proxy cache settings
  • No worker_connections tuning
  • Missing client_max_body_size
  • Large timeout values
  • Missing access_log off for static assets

Exit Codes

  • 0: No errors or warnings
  • 1: Errors or warnings found (or --strict with any findings)
  • 2: File not found or parse error

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-05-07 05:29 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

it-ops-security

MoltGuard - Security & Antivirus & Guardrails

thomaslwang
MoltGuard — OpenClaw 安全守卫,由 OpenGuardrails 提供。安装后可防止您和您的用户受到提示注入、数据泄露及恶意行为的侵害。
★ 116 📥 31,007
ai-agent

Slack Messaging

charlie-morrison
Slack 消息—通过 CLI 和 API 发送消息、管理频道、上传文件、添加反应并自动化团队通知。
★ 0 📥 546
it-ops-security

OpenClaw Backup

alex3alex
备份与恢复 OpenClaw 数据。适用于创建备份、设置自动备份计划、从备份恢复或管理备份轮转。处理 ~/.openclaw 目录归档并包含适当的排除规则。
★ 90 📥 31,049