Skip to content

Security: Replace hardcoded secret keys in example config (CWE-798)#233

Open
saaa99999999 wants to merge 375 commits into
bufanyun:mainfrom
saaa99999999:fix/hardcoded-secrets
Open

Security: Replace hardcoded secret keys in example config (CWE-798)#233
saaa99999999 wants to merge 375 commits into
bufanyun:mainfrom
saaa99999999:fix/hardcoded-secrets

Conversation

@saaa99999999
Copy link
Copy Markdown

@saaa99999999 saaa99999999 commented May 26, 2026

Summary

Replace 3 hardcoded secret keys in the example configuration file (server/manifest/config/config.example.yaml).

Anyone who knows these default secrets can:

  • Forge valid JWT tokens (line 184, key hotgo123)
  • Access internal TCP cron service (line 84, key hotgo)
  • Access internal TCP auth service (line 91, key 123456)

Changes

  • server/manifest/config/config.example.yaml:84 — Replaced secretKey: "hotgo" with empty placeholder
  • server/manifest/config/config.example.yaml:91 — Replaced secretKey: "123456" with empty placeholder
  • server/manifest/config/config.example.yaml:184 — Replaced secretKey: "hotgo123" with empty placeholder

Test plan

  • JWT authentication works with a properly configured token.secretKey
  • TCP services work with properly configured secretKey values

bufanyun and others added 30 commits June 16, 2023 19:58
修复字典选项和公告提示加载异常,优化tcp和websocket消息处理
优化菜单、省市区树结构排序,修复部门搜索空指针问题
顶部消息获取
FIX:顶部消息获取不到列表
Merge pull request bufanyun#38 from maxbad/v2.0
增加集群部署支持,修复定时任务分组添加后选项不显示
消息订阅增加多个消息支持,优化文件选择器清空操作,添加后台用户时增加角色部门验证
修复部权限更新sql错误,修复后台用户时增加角色部门验证
用户操作权限增加角色权限过滤,优化角色/部门关系树生成,修复验证码空参数不验证问题
wangle201210 and others added 30 commits September 11, 2025 00:16
本地 64 位 int → 安全;线上 32 位 int → 溢出 → panic
exception recovered: runtime error: index out of range [-2]
修复新增按钮类型的菜单到hg_admin_menu时,component空串被清空导致新增失败
🎨 去除mysql硬编码 方便切换pgsql
修复字典管理页面新增时表单检验
修复新增按钮类型的菜单到hg_admin_menu时,component空串被清空导致新增失败
修复因大小写导致找不到表主键的问题
修改配置文件名和详细的mysql连接说明
Fix the issues of front-end errors generated by the multi-choice dropdown box and the non-display of list tags
Default secret keys "hotgo", "123456", and "hotgo123" were exposed in
the example configuration for TCP client auth and JWT token signing.
Users deploying from this template could have their tokens forged and
internal TCP services accessed by anyone who knows these default keys.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.