Harbor 对接 NeuVector Registry Adapter

Harbor 本身支持对存放的制品进行安全扫描,但需要额外部署扫描器。NeuVector 提供了 Registry Adapter 功能,可与 Harbor 对接以实现扫描能力。

NeuVector 启用 Registry Adapter

创建一个 Secret,存放 Harbor 凭证给 Registry Adapter 使用:

1
2
3
4
5
6
7
8
9
10
11
cat <<EOF | kubectl apply -f -
apiVersion: v1
data:
password: <password>
username: <username>
kind: Secret
metadata:
name: neuvector-registry-adapter-harbor-secret
namespace: cattle-neuvector-system
type: kubernetes.io/basic-auth
EOF

在 Helm Chart Values 中开启 Registry Adapter:

1
2
3
4
5
6
7
8
9
...
cve:
adapter:
enabled: true
harbor:
secretName: neuvector-registry-adapter-harbor-secret
svc:
type: NodePort
...

检查 Registry Adapter 是否运行正常:

1
2
3
root@rke2-cilium-01:~# kubectl -n cattle-neuvector-system get pod -l app=neuvector-registry-adapter-pod
NAME READY STATUS RESTARTS AGE
neuvector-registry-adapter-pod-644b5fb68c-4ldbc 1/1 Running 2 (4d9h ago) 23d

Harbor 对接 NeuVector Registry Adapter

在 Harbor 中添加扫描器,此处使用 NeuVector Registry Adapter 的 NodePort 进行对接:

点击测试连接可能会失败,可以忽略,后续状态为健康即可。

保存后,查看状态是否健康:

尝试对制品进行扫描:

扫描成功:

在 NeuVector 也可以查看到对应的扫描报告:

Author

Warner Chen

Posted on

2025-12-25

Updated on

2025-12-25

Licensed under

You need to set install_url to use ShareThis. Please set it in _config.yml.
You forgot to set the business or currency_code for Paypal. Please set it in _config.yml.

Comments

You forgot to set the shortname for Disqus. Please set it in _config.yml.