剑庭安
首页
黑客安全首页全部安全栏目 黑客技术黑客技术、渗透测试、漏洞利用工具与教程 安全软件安全工具、扫描器、检测与审计软件 病毒分析恶意软件分析、样本、逆向与沙箱 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-aqua - Aqua E…
harbor-scanner-aqua - Aqua Enterprise scanner as a plug-in vulnerability 安全软件 点击放大
作者:admin 发布:2026-10-05

harbor-scanner-aqua - Aqua Enterprise scanner as a plug-in vulnerability

项目说明[![GitHub release][release-img]][release][![GitHub Build Action][build-action-img]][actions][![Go Report Card][report-card-img]][report-card]![Doc…
资源可下载 免费下载 0 条讨论
会员资源
开通会员后即可下载全部资源。
登录后开通会员
会员方案
382浏览量
0讨论
2下载链接
可下载资源状态
内容可验证
更新 2026-10-05
人工审核发布
评论区答疑

harbor-scanner-aqua - Aqua Enterprise scanner as a plug-in vulnerability

harbor-scanner-aqua - Aqua Enterprise scanner as a plug-in vulnerability

项目说明

[![GitHub release][release-img]][release]
[![GitHub Build Action][build-action-img]][actions]
[![Go Report Card][report-card-img]][report-card]
![Docker Pulls][docker-pulls]
[![License][license-img]][license]

Harbor Scanner Adapter for Aqua Enterprise

> NOTE: This adapter is only required if you want Harbor to use Aqua Enterprise for its image scanning feature.
> If your objective is to use Aqua Enterprise to provide its own analysis reports against images stored in Harbor,
> that can be achie deploying this adapter.

The Harbor Scanner Adapter for Aqua Enterprise is a service that translates the Harbor scanning API into scannercli
commands and allows Harbor to use Aqua Enterprise ad hoc scanning for pro reports on images stored
in Harbor registry as part of its scan feature.

The adapter service implements the [Pluggable Scanners API v1.0][harbor-pluggable-scanner-api] and communicates with
the Aqua API server to fulfil the contract required by Harbor scanning API. This contract is based on OS and application
, which implies that Harbor scanning API and Harbor Portal are **only capable of handling and displaying
OS and application **.

!HLD

> NOTE: To see the whole report generated by the Aqua scanner, including detected malware and sensitive data,
> you have to na from Harbor Portal to Aqua Management Console. Similarly, Harbor does not ha for
> displaying or enforcing Aqua's image assurance policies. You will need to use the Aqua Management Console to view
> and configure these policies.

TOC

  • Requirements

  • How does it work?

  • Deployment

  • - Docker
    - Kubernetes
    - OpenShift Container Platform
    - Configuring Harbor Scanner
  • Configuration

  • Troubleshooting

  • - Error: Failed getting image manifest: 412 Precondition Failed
    - Error: Failed scanning image: image was not found in registry
    - Error: Failed scanning image: no such registry
    - Scans are not displayed in the CI/CD Scans page
  • Contributing
  • Requirements

    1. Harbor >= 1.10
    2. This adapter service requires Aqua Enterprise >= 4.5 deployment to operate. The adapter can be deployed before the
    Aqua Enterprise installation, but the Aqua Management Console URL and credentials must be known to configure the
    adapter with the en .
    3. The adapter service also requires the scannercli executable binary, in matching the Aqua Enterprise, to be
    mounted at /usr/local/bin/scannercli. The provided Helm chart mounts the scannercli executable automatically by
    pulling the registry.aquasec.com/scanner:$AQUA_ image from Aqua Registry and running it as an
    [init container][k8s-init-containers]. The init container's command is configured to copy the executable from the
    container's filesystem to an [emptyDir][k8s-] , which is shared with the main container. This
    makes the scannercli executable a to the main container at /usr/local/bin/scannercli.

    > NOTE: Make sure that you provide valid Aqua Registry credentials received from Aqua Security as Helm
    > in order to create the corresponding image pull secret.

    If you're not using Kubernetes to run the adapter service, you have to download the scannercli executable from the
    Aqua downloads page manually and mount it at /usr/local/bin/scannercli.
    See [Aqua Scanner Executable Binary][aqua-docs-scanner-binary] for more details on manual download.
    4. It is highly recommended to create a new user in the Aqua Management Console with credentials dedicated to the
    Harbor adapter, e.g. harbor_scanner. The adapter does not need full access to Aqua: the Scanner role is the only
    permission required for the scannercli executable binary which is run by the adapter service on each scan request.
    Therefore, create your harbor_scanner user and assign it only the Scanner role.

    ![](docs/images/aqua_user_for_harbor.png)
    5. It is also highly recommended to create a new user in Harbor for the Aqua Enterprise scanner, with permission only to
    pull images from Harbor, e.g. aqua_scanner. Please remember to add this user as a member of the project in Harbor
    that you intend to scan the images from.

    ![](docs/images/harbor_user_for_aqua.png)
    6. Finally, add a new Harbor registry integration in Aqua Management Console and use the credentials of the user
    created in the previous step. Please note that the value of the Registry Name field corresponds to the
    SCANNER_AQUA_REGISTRY configuration .

    ![](docs/images/adding_harbor_registry_in_aqua.png)

    How does it work?

    In essence, a scan request payload sent by Harbor to the adapter:

    is translated to the following scannercli command:

    Finally, the output report is transformed to Harbor's model and displayed in the Harbor interface.

    > NOTE: The SCANNER_AQUA_USE_IMAGE_TAG en whether the image tag (library/mongo:3.4-xenial)
    > or digest (library/mongo:6c3c624b58dbbcd3c0dd82b4c53f04194d1247c6eebdaab7c610cf7d66709b3b) is used as
    > the image identifier passed to the scannercli command.

    > NOTE: Harbor >= 2.0 && < 2.3 no longer set the tag property in the scan request.
    > Thus, the SCANNER_AQUA_USE_IMAGE_TAG env must be set to false.

    Deployment

    Harbor can be [installed as a Docker service][harbor-docs-installer] or deployed with [high a via Helm][harbor-docs-helm].
    This section describes how to perform a new installation of the adapter service in both cases.

    It's also possible to deploy Harbor on Docker (outside the Kubernetes en) to work with Aqua Enterprise on
    Kubernetes, and you should be able to figure it out based on the following instructions.

    Docker

    This section shows how to install the adapter service by extending the Docker Compose file
    created by the Harbor >= 1.10 installer in the $HARBOR_HOME directory. We assume that the internal
    [TLS communication between Harbor components][harbor-docs-internal-tls] is enabled and internal certificate files are
    stored in the $HARBOR_PKI_DIR directory. The default Harbor data path is referred to as $HARBOR_DATA. We also
    assume that you installed Aqua Enterprise >= 4.5, and the Aqua Management Console is accessible at
    and you ha credentials with permission to scan container images.

    1. Export en that are used throughout the installation scripts.

    Review and adapt the to reflect your installation paths and credentials.

    2. Create the config and data directories for the adapter service.

    3. Download the scannercli executable binary.
    1. You can download the binary from the [docs][download-scannercli] page and save it to
    $HARBOR_HOME/common/config/aqua-adapter/scannercli.
    2. Alternatively you can use the registry.aquasec.com/scanner:$AQUA_ image to copy the scannercli binary
    from the container's file system.

    4. Generate certificate files.
    > NOTE: Self signed certificates without SAN were deprecated in Go, therefore you must add the SAN
    > extension to your certificate files. The DNS name in SAN extension should be the same as CN field.
    1. Generate a private key.

    2. Generate a certificate signing request (CSR).

    Adapt the in the -subj option to reflect your organization.

    3. Generate an x509 v3 extension file.

    You must create this file so that you can generate a certificate for adapter service host that complies with the
    Subject Alternative Name (SAN) and x509 v3 extension requirements.

    4. Use the aqua_adapter_v3.ext file to generate a certificate for adapter service host.
    > NOTE: The certificate must be signed by the internal Harbor CA.

    5. Create the env file to configure the adapter service:

    6. Create docker-compose.o.yml file in the $HARBOR_HOME directory to install the adapter service:

    7. For some Docker drivers you must explicitly set ownership of config files and data directories to user and
    group which runs the adapter process, i.e. 1000:1000:

    8. Start the adapter service:

    The adapter service will be accessible at from within the harbor Docker network.
    9. Connect Harbor to Aqua scanner.

    Kubernetes

    > I assume that you installed Aqua Enterprise >= 4.5 with [Aqua Security Helm charts][aqua-helm-chart] in the aqua
    > namespace, and the Aqua Management Console is accessible at from within the cluster.

    1. Export en that are used throughout the installation scripts.

    Review and adapt the to reflect your installation paths and credentials.

    2. Install the harbor-scanner-aqua chart:

    The scanner service should be accessible at from within the cluster.
    3. Connect Harbor to Aqua scanner.

    OpenShift Container Platform

    Similar to the way that RBAC resources control user access, administrators can use Security Context Constraints (SCCs)
    to control permissions for pods. These permissions include actions that a pod can perform and what resources it can
    access. You can use SCCs to define a set of conditions that a pod must run with in order to be accepted into the system.

    In particular, SCCs allow an administrator to control:
    * The container user ID
    * The allocation of an fsGroup that owns the pod's

    The harbor-scanner-aqua’s Helm chart deployment template:
    * Runs the underlying pod with a dedicated service account (named after a Helm release)
    * Requires that the pod's containers run as user with ID 1000
    * Requires that fsGroup that owns the pod's has ID 1000

    Therefore, the harbor-scanner-aqua deployment will be accepted by OpenShift Container Platform only when a service
    account is granted access to a SCC that:
    * Allows container user with ID 1000
    * Allows fsGroup with ID 1000

    For example, if the scanner adapter installed as the Helm release called harbor-scanner-aqua in the harbor namespace,
    the following command has to be run by the administrator to accept the pods:

    where <scc name> is one of the predefined SCCs or a custom SCC created by the administrator.

    Configuring Harbor Scanner

    1. Log in to the Harbor interface with an account that has Harbor system administrator pri.
    2. Expand Administration, and select Interrogation Services.
    !Scanners config
    3. Click the NEW SCANNER button.
    4. Enter the information to identify the scanner.
    1. A unique name for this scanner instance to display in the Harbor interface, e.g. Aqua Enterprise 6.5.
    2. The API endpoint URL of the adapter service.

    > NOTE: For the adapter deployed on Kubernetes the default URL is
    > whereas for Docker, it's

    !Add scanner
    5. Click TEST CONNECTION to make sure that Harbor can connect successfully to the adapter service.

    > NOTE: When you click the TEST CONNECTION button Harbor only pings the adapter service. It does not
    > connection to the Aqua Management Console, which is configured with SCANNER_AQUA_USERNAME, SCANNER_AQUA_PASSWORD,
    > and SCANNER_AQUA_HOST en . If the connection to the Aqua Management Console is misconfigured
    > you will see an error message in the scan logs accessible from the Harbor interface.
    6. If e is fine click ADD to save the configuration and connect Harbor to the adapter service.
    7. If you configured multiple scanners, you can designate the Aqua Enterprise scanner as the default one by selecting it
    and clicking SET AS DEFAULT.
    !Set default scanner
    Make sure the Default label is displayed next to the Aqua scanner's name.

    Configuration

    Configuration of the adapter is done at startup.

    | Name | Default | Description |
    |---------------------------------------------|------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
    | SCANNER_LOG_LEVEL | info | The log level of trace, debug, info, warn, warning, error, fatal or panic. The standard logger logs entries with that level or anything above it. |
    | SCANNER_API_ADDR | :8080 | Binding address for the API HTTP server |
    | SCANNER_API_TLS_CERTIFICATE | | The absolute path to the x509 certificate file |
    | SCANNER_API_TLS_KEY | | The absolute path to the x509 private key file |
    | SCANNER_API_READ_TIMEOUT | 15s | The maximum duration for reading the entire request, including the body |
    | SCANNER_API_WRITE_TIMEOUT | 15s | The maximum duration before timing out writes of the response |
    | SCANNER_API_IDLE_TIMEOUT | 60s | The maximum amount of time to wait for the next request when keep-alives are enabled |
    | SCANNER_AQUA_USERNAME | N/A | Aqua management console username (required) |
    | SCANNER_AQUA_PASSWORD | N/A | Aqua management console password (required) |
    | SCANNER_AQUA_HOST | | Aqua management console address |
    | SCANNER_AQUA_REGISTRY | Harbor | The name of the Harbor registry configured in Aqua management console |
    | SCANNER_AQUA_REPORTS_DIR | /var/lib/scanner/reports | Directory to sa scan reports |
    | SCANNER_AQUA_USE_IMAGE_TAG | false | The flag to determine whether the image tag or digest is used in the image reference passed to scannercli |
    | SCANNER_CLI_NO_ | false | The flag passed to scannercli to skip TLS certificates |
    | SCANNER_CLI_SHOW_NEGLIGIBLE | true | The flag passed to scannercli to show negligible/unknown se |
    | SCANNER_CLI_OIALS | false | The flag to enable passing --robot-username and --robot-password flags to the scannercli executable binary |
    | SCANNER_CLI_DIRECT_CC | false | The flag passed to scannercli to contact CyberCenter directly (rather than through the Aqua server) |
    | SCANNER_CLI_REGISTER_IMAGES | Never | The flag to determine whether images are registered in Aqua management console: Never - skips registration; Compliant - registers only compliant images; Always - registers compliant and non-compliant images. |
    | SCANNER_STORE_REDIS_NAMESPACE | harbor.scanner.aqua:store | The namespace for keys in the Redis store |
    | SCANNER_STORE_REDIS_SCAN_JOB_TTL | 1h | The time to live for persisting scan jobs and associated scan reports |
    | SCANNER_REDIS_URL | redis://harbor-harbor-redis:6379 | The Redis server URI. The URI supports schemas to connect to a standalone Redis server, i.e. redis://:password:port/db-number and Redis Sentinel deployment, i.e. redis+sentinel://:password:port1,sentinel_host2:port2/monitor-name/db-number. |
    | SCANNER_REDIS_POOL_MAX_ACTIVE | 5 | The max number of connections allocated by the pool for the Redis store |
    | SCANNER_REDIS_POOL_MAX_IDLE | 5 | The max number of idle connections in the pool for the Redis store |
    | SCANNER_REDIS_POOL_IDLE_TIMEOUT | 5m | The duration after which idle connections to the Redis server are closed. If the value is zero, then idle connections are not closed. |
    | SCANNER_REDIS_POOL_CONNECTION_TIMEOUT | 1s | The timeout for connecting to the Redis server |
    | SCANNER_REDIS_POOL_READ_TIMEOUT | 1s | The timeout for reading a single Redis command reply |
    | SCANNER_REDIS_POOL_WRITE_TIMEOUT | 1s | The timeout for writing a single Redis command |

    Troubleshooting

    Error: Failed getting image manifest: 412 Precondition Failed

    Currently, there's a limitation of scannercli in Aqua Enterprise < 4.6.20181 (4.6 update 16) which do not
    accept Harbor robot account credentials passed by a Harbor scan job to the adapter service. This effectively means that
    the Aqua Enterprise scanner is using the credentials provided in Aqua Management Console under the
    Integrations / Image Registries section. However, these credentials do not ha permissions to bypass the
    deployment security checker when it's enabled in the Harbor project configuration. In other words, the deployment
    security checker prevents the Aqua Enterprise scanner from pulling an image, which it needs to be able to do in order
    to scan it.

    ![](docs/images/harbor_deployment_security.png)

    The a solution depends on the of your Aqua Enterprise deployment. In scannercli >= 4.6.20181 (4.6 update 16)
    we' new --robot-username and --robot-password flags to respect credentials provided by Harbor.

  • For Aqua Enterprise < 4.6.20181 (4.6 update 16) you can only disable deployment security checks in the Harbor

  • interface under the project configuration.
  • For Aqua Enterprise >= 4.6.20181 (4.6 update 16) set the value of the SCANNER_CLI_OIALS

  • env to true.

    Error: Failed scanning image: image was not found in registry

    For Harbor >= 2.0 && < 2.3, which do not set the tag property in a scan request anymore, the value of the
    SCANNER_AQUA_USE_IMAGE_TAG env must be set to false. This informs the adapter service to use digest rather than tag
    as the image identifier.

    Error: Failed scanning image: no such registry

    Make sure the value of the SCANNER_AQUA_REGISTRY env is the same as the Registry Name entered in Aqua Management
    Console.

    Scans are not displayed in the CI/CD Scans page

    Normally, scans performed via the scannercli scan command (not through the daemon mode) are only saved if the images
    are also registered in Aqua Enterprise. To store and display all scannercli scans in the CI/CD Scans page,
    accessible from within the Images page, enable the Save CI/CD scans option in the Aqua Management Console.

    ![](docs/images/aqua_settings_sa.png)

    Now, even if the images stored in Harbor were not registered in Aqua Enterprise, you'd see them in the CI/CD Scans page.

    ![](docs/images/aqua_cicd_scans_page.png)

    Contributing

    Please read CONTRIBUTING.md for information about setting up your de en, and the
    contribution workflow that we expect.

    [release-img]:
    [release]:
    [build-action-img]:
    [actions]:
    [report-card-img]:
    [report-card]:
    [docker-pulls]:
    [license-img]:
    [license]:
    [harbor-url]:
    [harbor-helm-chart]:
    [harbor-docs-installer]:
    [harbor-docs-internal-tls]:
    [harbor-docs-helm]:
    [harbor-pluggable-scanner-api]:
    [k8s-init-containers]:
    [k8s-]:
    [aqua-docs-scanner-binary]:
    [aqua-helm-chart]:
    [download-scannercli]:

    项目信息

    开发语言:Go

    Star 数:36

    技术要点

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

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

    使用与学习建议

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

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

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

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

    免责声明

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

    资源标题harbor-scanner-aqua - Aqua Enterprise scanner as a plug-in vulnerability
    所属分类安全软件
    发布作者admin
    发布时间2026-10-05 22:48:36
    下载权限 免费下载
    附件数量2 个下载链接
    浏览次数382
    讨论数量0
    主题状态正常讨论中

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

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

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

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

    Powered by 酷像SEOv3.0

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