剑庭安
首页
黑客安全首页全部安全栏目 黑客技术黑客技术、渗透测试、漏洞利用工具与教程 安全软件安全工具、扫描器、检测与审计软件 病毒分析恶意软件分析、样本、逆向与沙箱 CTF思路CTF 题目、writeup、解题思路与工具 防护思路防御技术、加固、检测响应与蓝队 红蓝攻防红队攻击模拟、蓝队对抗、攻防演练 漏洞知识库漏洞、CVE、PoC、EXP 与安全研究
逆向|反编译
PHP源码PHP 网站源码、程序、系统 APP源码安卓/iOS APP 源码 ASP源码ASP 网站源码与程序 NET源码.NET 网站源码与系统 小程序源码微信/支付宝小程序源码 Dedecms风格模板Dedecms 织梦风格模板 Empirecms风格模板EmpireCMS 帝国风格模板 Discuz商业模板/插件Discuz 商业模板与插件 WordPress主题/插件WordPress 主题与插件 其它源码、模板其它各类源码与模板 游戏源码游戏源码与引擎项目 加密货币源码加密货币、区块链、钱包、USDT/比特币相关源码与工具 手游源码手机游戏源码、服务端、客户端与引擎项目 传奇源码热血传奇、传奇世界、复古传奇等客户端/服务端/引擎源码 页游源码网页游戏、H5 游戏、浏览器游戏源码 端游源码电脑单机游戏、PC 网游客户端/服务端源码
最新万能免驱动支持所有型号打印机下载程序 日历天气老黄历 · 每天同步真实日期与天气
站长工具站长工具 自助开通会员浏览该分类 其他资源qtziy SEO工具SEO工具 站群源码站群源码 泛程序泛程序 蜘蛛模板蜘蛛模板 蜘蛛池蜘蛛池 外链工具外链工具
搜索 自助开通会员🔓 破甲 API
登录 注册
首页 分类列表 安全软件 harbor-scanner-adapter - Har…
harbor-scanner-adapter - Harbor Scanner Adapter for Anchore Engine and Ente 安全软件 点击放大
作者:admin 发布:2026-10-05

harbor-scanner-adapter - Harbor Scanner Adapter for Anchore Engine and Ente

项目说明[![CI][ci-img]][ci][![Go Reportcard][report-card-img]][report-card]Harbor Scanner Adapter for Anchore Engine/EnterpriseOThe Harbor Scanner Adapter…
资源可下载 免费下载 0 条讨论
会员资源
开通会员后即可下载全部资源。
登录后开通会员
会员方案
329浏览量
0讨论
2下载链接
可下载资源状态
内容可验证
更新 2026-10-05
人工审核发布
评论区答疑

harbor-scanner-adapter - Harbor Scanner Adapter for Anchore Engine and Ente

harbor-scanner-adapter - Harbor Scanner Adapter for Anchore Engine and Ente

项目说明

[![CI][ci-img]][ci]
[![Go Reportcard][report-card-img]][report-card]

Harbor Scanner Adapter for Anchore Engine/Enterprise

O

The Harbor Scanner Adapter for Anchore is a service that translates the Harbor scanning API into the Anchore API
and allows Harbor to utilize Anchore Enterprise for pro reports on images stored in Harbor as
part of its scan feature.

This Adapter is only required if you want Harbor to use Anchore for its 'Scan' feature. If your objective is to use Anchore in a CI/CD
workflow or to provide its own analysis reports against images stored in Harbor, that can be achie this Adapter.

>:construction: Note:
>
> This sequence diagram is no longer quite accurate. The calls are correct, but in recent updates they are done asynchronously and are stored by a result store that is not yet added to this diagram

!Interaction O

Authentication

#### Harbor-to-Adapter

API requests between Harbor and the adapter should be protected by TLS/HTTPS at the channel level, but can also use a shared secret for authentication.
See the configuration section below on setting an API key for the Adapter. Then, when adding the adapter to Harbor via the UI, use the 'Bearer' auth type
and set the value to the value set in the adapter configuration. This will cause harbor to send they token as a Bearer token to the adapter, which will
the HTTP Authorization header against the expected value.

#### Adapter-To-Anchore

API calls between the Adapter and Anchore should also be protected by TLS/HTTPS and also require a username/password for HTTP Basic authentication to Anchore. For this, it
is highly recommended to create a specific harbor user in Anchore and use those credentials in the auth secret presented to the Adapter as described below in the configuration section.

Note that these are not credentials use to pull images from Harbor, only to authenticate API calls between the adapter service and the Anchore API service.

#### Anchore-To-Harbor

API requests from Anchore services to Harbor to fetch the image data for analysis are protected by short-li generated by Harbor and passed to the Adapter service on each
new scan request. The Adapter service automatically configures Anchore to use the supplied credentials for the data fetch operations as part of requesting an image analysis to Anchore.

The adapter ne requests to Harbor and ne any image content, only Anchore services access any Harbor image data.

Building the Adapter service

Run make to run test and get the binary in dist/<platform>/anchore-adapter

To build into a container:

Configuration

Configuration of the adapter is done at startup or via a configuration file. If both are used,
en take precedent o from the file.

En

Adapter configuration . These cannot be set in the client config file, only .

| En | Description | Default Value |
|----------|-------------|---------------|
| SCANNER_ADAPTER_LISTEN_ADDR | The address for the adapter to listen on for HTTP traffice | ":8080" |
| SCANNER_ADAPTER_LOG_LEVEL | Log | "info" |
| SCANNER_ADAPTER_LOG_FORMAT | Format of the log, either text or json | "text" |
| SCANNER_ADAPTER_APIKEY | Secret that must be presented by client (harbor) to authenticate calls to the adapter itself | null |
| SCANNER_ADAPTER_FULL_ | Add full descriptions, but will make scans slower | true |
| SCANNER_ADAPTER_TLS_KEY_FILE | Path to the private key for the API to listen with HTTPS | null |
| SCANNER_ADAPTER_TLS_CERT_FILE | Path to the public cert file for the API to listen with HTTPS | null |
| SCANNER_ADAPTER_FILTER_ | If set, any marked as ignored or will-not-fix by (e.g. Debian's No-DSA flag will not be returned in the scan result. This can help reduce noise in scans if you accept the distro 's fix assessment. | False |
| SCANNER_ADAPTER_REGISTRY_ | If set, the adapter will ask Anchore to the credentials passed to it by Harbor for the image fetch. If false, then the is skipped and credentials are used without being checked first. | True |
| SCANNER_ADAPTER_REGISTRY_TLS_ | If set to False, the adapter will set a flag in Anchore to ensure Anchore skips of the TLS certificate when it contacts Harbor to pull the image. This is primarily for use when your Harbor install uses self-signed certificates | True |
| SCANNER_ADAPTER_DESCRIPTION_CACHE_ENABLED | Boolean to enable a cache to impro of the scan by caching descriptions | True |
| SCANNER_ADAPTER_DESCRIPTION_CACHE_COUNT | Number of cache entries to keep in memory in the adapter. This is the number of description strings to cache | 10000 |
| SCANNER_ADAPTER_DESCRIPTION_CACHE_TTL | The timeout value for entries in the description cache. Descriptions can be updated, so larger gi performance but may ha descriptions. | 86400 (24 hours) |
| SCANNER_ADAPTER_REPORT_CACHE_ENABLED | Boolean to enable caching of the raw reports from Anchore within the Adapter. This reduces the call to Anchore for different report types requested by Harbor or scans that are close-together and result in the same report from Anchore between Anchore's vuln db updates | True |
| SCANNER_ADAPTER_REPORT_CACHE_COUNT | The number of raw Anchore image reports to cache in memory to avoid repeated calls to Anchore for the same result. | 100 |
| SCANNER_ADAPTER_REPORT_CACHE_TTL | The ttl, in seconds, for raw Anchore reports in the adapter, which are re-used for the Harbor format and raw format responses. A good value here is at least 10 seconds. | 180 |
| SCANNER_ADAPTER_DB_UPDATE_CACHE_ENABLED | Boolean to enable caching of the Anchore db updated timestamp to reduce call between the adapter and Anchore. Harbor tends to check the update timestamp often so this reduces calls to Anchore. | True |
| SCANNER_ADAPTER_DB_UPDATE_CACHE_TTL | The number of seconds to keep the last db update timestamp before checking the Anchore service again. The service check to Anchore is a bit resource intensive so this value helps reduce load on Anchore from the Adapter | 60 |
| SCANNER_ADAPTER_ENABLE_RAW_MIME_TYPE | Enable/Disable the RAW MIME type from the adapter | True |
| ANCHORE_ENDPOINT | The url to reach the Anchore API (e.g ) | null |
| ANCHORE_USERNAME | The username the Adapter will use to authenticate API calls against Anchore itself. This must be a username within Anchore, not a Harbor user. | null |
| ANCHORE_PASSWORD | The password the Adapter will use to authenticate API calls against Anchore itself. This is not a Harbor credential. | null |
| ANCHORE_CLIENT_TIMEOUT_SECONDS | Timeout (in seconds) for API calls to Anchore from the Adapter | 60 |
| ANCHORE_AUTHFILE_PATH | A path to a json file with any of the properties "username", "password", "endpoint", "timeoutseconds", and "tls" to enable passing Anchore credentials to the Adapter without en (e.g. for secrets in k8s mounted as a file) | null |

Configuration file format

The configuration file must be json formatted and may contain all or some of the below fields. The config file is loaded first, and any also present in the en will o the file .

Deployment

Requirements

This adapter requires both a Harbor deployment and an Anchore Enterprise deployment to operate. The adapter can be deployed before the Anchore installation,
but the endpoint url and credentials must be known to pass to the adapter.

Install Harbor:

Install Anchore Enterprise:
Installation docs

Create Credentials

It is highly recommended to create a new account in the Anchore deployment and a new user with credentials dedicated to the Harbor adapter.
When using Enterprise 5+, you can also utilize api keys. Learn how to generate them here -

Create a harbor account and user in Anchore for the adapter to use for authenticating calls to Anchore.

_This is not required, but recommended as it will limit the scope of the adapter's credentials within Anchore to a
non-admin account and keep all Harbor image data in one account for easy management. This step can be skipped for demo en where the Anchore deployment is not shared, but is strongly encouraged for all production use and all cases where
Harbor will be integrated with an existing Anchore deployment._

For example with anchorectl, you could create a new account in Anchore, _harbor_ with a single user _harbor_ and password for this example (use a much stronger password in your install)

Now you need to store the credentials in a secret for use by the adapter.
If you created a custom user:

You can use the default admin user/pass for a fresh test/de of Anchore (DO NOT DO THIS FOR PRODUCTION!):

Please ensure the secret is stored in the same namespace as the deployed Harbor adapter.

Install Adapter

Take a copy of the yaml manifest and edit to your specific deployment requirements. If you created a secret for the username and password then these will be used.
Install the adapter:

Please note: You can install multiple adapters and configure each of these to work differently. This would allow you to map each adapter/scanner instance to the desired project in Harbor.

Configure Adapter

Configure the scanner in Harbor:

In the Harbor UI login as an admin and na to Administration->Interrogation Ser>Scanners and click "+ New Scanner".
In older of Harbor, this can be found under Configuration->Scanners.

!Add Scanner UI

In 'Endpoint', use the adapter hostname of your instance. The default is the following:

Lea empty since in this example we did not set an API key in the adapter deployment en.

Click "Test Connection" and should work.
You can now click "Add" to add the scanner

Now for each project in Harbor, we must add and set the Anchore Scanner.
In the Harbor UI, na to the project->scanner and click "Select Scanner". You might want to make Anchore the default scanner for a project.
!Add Scanner to Project UI

Test Scanning

Na to a project and repository, then select an image and push the scan button at the top of the page.

Also under the Administration->Interrogation Services page you can perform bulk scans.

Finally, under a Project goto the 'Configuration' page where you can 'scan images on push' and 'prevent images from running'.
The last option will require you to enable 'Use internal registry address' so that Anchore can access the image in Harbor to scan it.

De

If you ha installed it can be used against a local k8s install for
de skaffold dev will build the adapter with ko and deploy using the
manifest file at k8s/harbor-adapter-anchore-skaffold.yaml. Any changes will
then be li to local k8s for testing.

Special Thanks

Special thanks to the following for their help with the prototype adapter implementation that inspired this work:

* cafeliker
* MaGaoJU

[ci]:
[ci-img]:
[report-card]:
[report-card-img]:

项目信息

开发语言:Go

Star 数:40

技术要点

该项目属于安全软件方向的开源资源,代码结构清晰,适合安全研究人员学习参考。项目围绕Harbor Scanner Adapter for Anchore Engine and Enterprise展开,提供了可运行的实现,对理解相关安全机制、工具原理与攻防技术具有较高的研究价值。

从技术实现角度看,此类项目的核心在于对底层原理的深入理解与工程化落地。开发者在研究过程中可以结合官方文档与社区讨论,梳理项目的初始化流程、核心模块职责与数据流转,逐步掌握其中的技术细节与设计思路。

使用与学习建议

1. 下载源码压缩包,解压到本地环境。

2. 根据项目类型准备对应的运行环境与依赖。

3. 按照 README 中的步骤完成配置与部署。

4. 在隔离的测试环境中运行验证,避免影响生产系统。

免责声明

本资源来源于开源社区,仅供安全研究、技术学习与合法授权范围内的攻防演练使用,请勿用于任何非法或侵害他人权益的用途。使用本项目产生的一切后果由使用者自行承担。

资源标题harbor-scanner-adapter - Harbor Scanner Adapter for Anchore Engine and Ente
所属分类安全软件
发布作者admin
发布时间2026-10-05 22:47:42
下载权限 免费下载
附件数量2 个下载链接
浏览次数329
讨论数量0
主题状态正常讨论中

本资源免费,登录后即可在本页「下载链接」区域获取全部附件。

请在评论区留言说明具体链接,或联系作者补档。楼主更新后本页会同步最新的下载地址。

请先阅读正文中的授权说明;未注明的默认仅限站内学习交流,禁止直接搬运到其他站点二次售卖。
还没有讨论,快来抢沙发~
登录 后才能参与讨论
下载链接
会员才能下载
登录后开通会员
同分类推荐
暂无同类资源
免费登录即可下载
查看会员
放大预览

© 2026 剑庭安 - 网站开发定制 SEO 优化蜘蛛池代做 在线看手相算命. 保留所有权利。

Powered by 酷像SEOv3.0

网站地图 Sitemap.xml
首页 全部分类 黑客安全 逆向|反编译 精品源码 站长工具自助开通会员其他资源SEO工具站群源码泛程序蜘蛛模板蜘蛛池外链工具创意乐园 搜索 会员服务 登录 注册