惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Tailwind CSS Blog
P
Proofpoint News Feed
V
Visual Studio Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
爱范儿
爱范儿
Microsoft Azure Blog
Microsoft Azure Blog
Recent Announcements
Recent Announcements
Vercel News
Vercel News
Hugging Face - Blog
Hugging Face - Blog
GbyAI
GbyAI
博客园 - 聂微东
D
DataBreaches.Net
酷 壳 – CoolShell
酷 壳 – CoolShell
Microsoft Security Blog
Microsoft Security Blog
L
LangChain Blog
美团技术团队
H
Help Net Security
aimingoo的专栏
aimingoo的专栏
C
Check Point Blog
U
Unit 42
博客园 - 叶小钗
有赞技术团队
有赞技术团队
M
MIT News - Artificial intelligence
MongoDB | Blog
MongoDB | Blog

博客园 - fengjian1585

麒麟linx v10 sp3 cgroup v1 变更为cgroup v2 k8s Gateway API 详解 linux 挂载点覆盖清理原数据 coze 入门学习 手机安装 openclaw 关闭ingress 8443 端口 tomcat 设置 catalina.out 按天切割 Harbor 启用 Trivy 禁用 MinIO 的 Web Console 重定向功能 堆设置了8G,java进程却占用了12G内存 k8s优化选项 pod启动后一直containerCreating状态解决 Kubernetes Cilium网络组件和CoreDNS配置 mkfs对磁盘设置标签 K8S的CoreDns配置文件添加域名解析 nginx代理两套k8s ingress 不同域名 pip 搭建源 使用 kubectl debug 创建临时调试容器 openvpn server证书过期处理 - fengjian1585 "too many open files" 文件句柄 Kafka 常见故障及解决方案 华为昇腾 910B GPU Nginx与Upstream之间产生大量TIME_WAIT连接的解决办法 debian libc.musl-x86_64.so.1 => not found
Harbor Swagger接口泄露漏洞处理
fengjian1585 · 2025-04-22 · via 博客园 - fengjian1585

一、Swagger接口泄露漏洞详情

 未授权访问漏洞(中危)

漏洞链接地址:

http://1.1.1.1/devcenter-api-2.0

修复方式:

vim  harbor/common/config/nginx/nginx.conf

if ($request_uri ~* "/devcenter-api-2\.0") {
            return 404;
}

if ($request_uri ~* ^/(swagger1|swagger2)\.(html|json)$) {

      return 404;

}

http://1.1.1.1/swagger.yaml

#删除该镜像容器中的swagger.json文件
[root@localhost ~]# docker exec -ti -u root harbor-portal rm  /usr/share/nginx/html/swagger.json
[root@localhost ~]# docker exec -ti -u root harbor-portal rm  /usr/share/nginx/html/swagger2.json
[root@localhost ~]# docker exec -ti -u root harbor-portal rm /usr/share/nginx/html/swagger.yaml

http://10.1.1.1/api/v2.0/projects

关闭所有 公用的项目