支持python3、javaScript、shell、typescript 的定时任务管理面板(A timed task management panel that supports typescript, javaScript, python3, and shell)
Go to file
rockymelody ce599d306f
青龙面板鉴权绕过漏洞已修复 (#2935)
已实施的安全加固措施
第一层防御:启用Express严格路由(第17-18行)
app.set('case sensitive routing', true);  // 路由大小写敏感
app.set('strict routing', true);           // 严格路由匹配
第二层防御:路径标准化检查中间件(第23-37行)
app.use((req, res, next) => {
  const originalPath = req.path;
  const normalizedPath = originalPath.toLowerCase();

  // 检测并拦截大小写混淆攻击
  if (originalPath !== normalizedPath &&
      (normalizedPath.startsWith('/api/') || normalizedPath.startsWith('/open/'))) {
    return res.status(400).json({
      code: 400,
      message: 'Invalid path format'
    });
  }

  next();
});
作用:主动检测并拒绝含有大小写变体的恶意请求
第三层防御:JWT中间件正则表达式修复(第59行)
// 修复前:
path: [...config.apiWhiteList, /^\/(?!api\/).*/],

// 修复后:添加大小写不敏感标志 'i'
path: [...config.apiWhiteList, /^(\/(?!api\/).*)$/i],
作用:防御正则匹配层面的绕过
第四层防御:自定义Token中间件路径标准化(第74-87行)
// 修复前:
if (!['/open/', '/api/'].some((x) => req.path.startsWith(x))) {

// 修复后:统一转小写比较
const pathLower = req.path.toLowerCase();
if (!['/open/', '/api/'].some((x) => pathLower.startsWith(x))) {
}
作用:确保Token验证逻辑对所有路径变体生效

第五层防御:初始化接口路径检查修复(第122-123行)
// 修复前:
if (!['/api/user/init', '/api/user/notification/init'].includes(req.path)) {

// 修复后:
const pathLower = req.path.toLowerCase();
if (!['/api/user/init', '/api/user/notification/init'].includes(pathLower)) {
2026-03-01 17:44:03 +08:00
.github 更新 workflow 2025-12-24 01:03:21 +08:00
back 青龙面板鉴权绕过漏洞已修复 (#2935) 2026-03-01 17:44:03 +08:00
docker 更新 docker 日志 2025-11-22 01:05:28 +08:00
sample Fix TG_PROXY_AUTH concatenation in notify.js - add missing @ separator (#2882) 2025-12-22 23:05:06 +08:00
shell Fix PM2 startup failures on ARM routers with Node.js incompatibility (#2828) 2025-11-16 20:29:32 +08:00
src 修复 apiWhiteList 路径 2025-12-23 00:58:09 +08:00
.editorconfig 初始化项目 2021-03-14 22:06:27 +08:00
.env.example 移除 nginx 2025-11-02 19:29:59 +08:00
.gitignore 修改系统内置通知模块名称,避免重复 2025-02-25 00:32:13 +08:00
.npmrc 移除随机延迟相关配置及 ProxyUrl 默认值,修复拉库通知可能失败 2023-11-05 01:02:31 +08:00
.prettierignore 修改认证信息存储方式,避免认证信息异常 2024-12-30 14:23:04 +08:00
.prettierrc 初始化项目 2021-03-14 22:06:27 +08:00
.umirc.ts 移除 nginx 2025-11-02 19:29:59 +08:00
ecosystem.config.js 修改服务启动逻辑 2025-05-07 09:30:00 +08:00
LICENSE 修复定时任务标签默认值 2022-05-26 00:18:04 +08:00
nodemon.json Enable debug backend (#2776) 2025-08-19 11:13:33 +08:00
package.json Add cron task management to QLAPI (#2826) 2025-11-14 23:20:56 +08:00
pnpm-lock.yaml 升级 cron-parser 2025-11-11 00:37:03 +08:00
README-en.md Add non-root Docker user support with automatic command setup (#2830) 2025-11-15 01:46:24 +08:00
README.md Add non-root Docker user support with automatic command setup (#2830) 2025-11-15 01:46:24 +08:00
SECURITY.md 增加安全报告提示 2025-01-14 01:05:48 +08:00
tsconfig.json 写入文件增加文件锁,避免竞争条件引起文件内容异常 2025-01-04 01:22:29 +08:00
typings.d.ts 修复文件越权访问 2024-09-04 23:25:48 +08:00
version.yaml 更新 2.20.1 2025-12-26 21:17:30 +08:00

青龙

简体中文 | English

支持 Python3、JavaScript、Shell、Typescript 的定时任务管理平台

Timed task management platform supporting Python3, JavaScript, Shell, Typescript

npm version docker pulls docker stars docker image size

Demo / Issues / Telegram Channel / Buy Me a Coffee

演示 / 反馈 / Telegram 频道 / 打赏开发者

cover

功能

  • 支持多种脚本语言python3、javaScript、shell、typescript
  • 支持在线管理脚本、环境变量、配置文件
  • 支持在线查看任务日志
  • 支持秒级任务设置
  • 支持系统级通知
  • 支持暗黑模式
  • 支持手机端操作

版本

docker

latest 镜像是基于 alpine 构建,debian 镜像是基于 debian-slim 构建。如果需要使用 alpine 不支持的依赖,建议使用 debian 镜像

⚠️ 重要提示: 如果您需要以非 root 用户运行 Docker请使用 debian 镜像。Alpine 的 crond 需要 root 权限。

docker pull whyour/qinglong:latest
docker pull whyour/qinglong:debian

npm

npm 版本支持 debian/ubuntu/alpine 系统,需要自行安装 node/npm/python3/pip3/pnpm

npm i @whyour/qinglong

部署

查看文档

内置 API

查看文档

内置命令

查看文档

开发

git clone https://github.com/whyour/qinglong.git
cd qinglong
cp .env.example .env
# 推荐使用 pnpm https://pnpm.io/zh/installation
npm install -g pnpm@8.3.1
pnpm install
pnpm start

打开你的浏览器,访问 http://127.0.0.1:5700

链接

名称来源

青龙,又名苍龙,在中国传统文化中是四象之一、天之四灵之一,根据五行学说,它是代表东方的灵兽,为青色的龙,五行属木,代表的季节是春季,八卦主震。苍龙与应龙一样,都是身具羽翼。《张果星宗》称“又有辅翼,方为真龙”。

《后汉书·律历志下》记载:日周于天,一寒一暑,四时备成,万物毕改,摄提迁次,青龙移辰,谓之岁。

在中国二十八宿中,青龙是东方七宿(角、亢、氐、房、心、尾、箕)的总称。 在早期星宿信仰中,祂是最尊贵的天神。 但被道教信仰吸纳入其神系后,神格大跌,道教将其称为“孟章”,在不同的道经中有“帝君”、“圣将”、“神将”和“捕鬼将”等称呼,与白虎监兵神君一起,是道教的护卫天神。