AppScan 360° 在单个虚拟机上的定制安装

借助定制安装,您可以使用完整的配置对 AppScan 360° 进行测试。您可以在脱机或联机模式下安装单个 VM。

注: 以管理员身份在目标系统上执行所有安装和配置活动。
要在单个虚拟机上安装 AppScan 360°
  1. AppScan 360° 单个 VM 安装脚本会询问一系列问题来配置您的环境。查看 设置单个 VM 环境 上的设置信息,并收集完成安装所需的信息。

  2. AppScan 360° 单个 VM 脚本和 AppScan 360° 安装文件从 MyHCLSoftware 门户网站下载到 /home/username 下的单个目录位置。例如,/home/username/AppScan360_singleVM
    目录中包含的文件应为:
    • 执行以下任一项操作:
      • AppScan360_SingleVMsetup_v2.0.0_Online.run
      • AppScan360_SingleVMsetup_v2.0.0_Offline.run
    • AppScan360_v2.0.0.run
    • AppScan360_ASRA_v2.0.0.run
    • AppScan360_SCA_v2.0.0.run(可选)
  3. 按如下方式对所下载的文件进行重命名:
    mv AppScan360_v2.0.0.run ascp-AppScan360_v2.0.0.run
    mv AppScan360_v2.0.0.run asra-AppScan360_ASRA_v2.0.0.run
    mv AppScan360_SCA_v2.0.0.run sca-AppScan360_SCA_v2.0.0.run # (Optional)
  4. 创建一个安装目录并将所有文件移动到该目录中。所有安装工具包文件必须位于同一目录中。
    mkdir -p ~/aio-setup
    mv *.run ~/aio-setup/
  5. 在安装文件夹中,通过运行以下命令为安装程序提供可执行权限:
    cd ~/aio-setup
    chmod +x *.run
  6. 如果您对 SSO(LDAP、OIDC)或 SMTP 等服务使用定制或自签名证书,请准备证书文件夹。
    注: 此步骤对于快速安装是可选的;对于定制安装是必需的。
    ./AppScan360_SingleVMsetup_v2.0.0_Online.gz.run -- $PWD prepareCertsFolders
    该命令将创建以下文件夹结构:
    文件夹 功能
    ~/aio-setup/certs/ 主证书文件夹
    ~/aio-setup/certs/docker/ Docker 注册表证书(POC 模式不需要)
    ~/aio-setup/certs/ldap/ LDAP 证书(用于 LDAPS 支持)
    ~/aio-setup/certs/smtp/ SMTP 证书(用于 SMTPS 支持)
    ~/aio-setup/certs/oidc/ OIDC 证书(用于 OIDCS 支持)
    ~/aio-setup/certs/ingress/ 入口证书(可选,如果未提供,将生成自签名)
    重要: 在创建文件夹结构后,请将证书放入相应的文件夹中,然后再继续。
  7. 运行安装脚本:
    注: 指定文件的文件夹位置,即使从文件夹位置进行安装也是如此。
    cd ~/aio-setup
    ./AppScan360_SingleVMsetup_v2.0.0_Online.gz.run -- $PWD
    注:
    • 要出于任何原因停止安装,请按 Ctrl+C,然后运行
      cd aioWorkspace
      ./disengageAS360-AIO.sh
    • 安装日志文件位于 ./aioWorkspace/logs
  8. 出现提示时,键入 2 以指定“定制安装”。按 Enter 键。
  9. 安装程序会询问一系列问题,并希望您确认每个答案。根据要求回答问题和提示:
    1. > Will this production deployment include Software Composition Analysis (SCA)? This requires license. (y/n) [Default: n]:
      缺省值为
      • :会在安装中包括软件组成分析 (SCA) 组件。借助 SCA,您可以分析应用程序是否存在开源组件漏洞。
      • :不会在安装中包括软件组成分析 (SCA) 组件。
    2. > To ensure system stability, we strongly recommend validating your server's hardware against your expected workload. This helps prevent scan failures and performance issues after installation. Do you want to perform this resource check now? (y/n) [Default: y]:
      缺省值为
      • :根据预期的扫描工作负载验证硬件资源。建议将此项用于生产环境。
        指示预期的并发扫描次数:
        🖥️ *** Production Workload & Resource Planning ***
        📊 To calculate hardware requirements, please specify the maximum number of scans you expect to run at the same time (concurrently).
        💡 You can enter 0 if a scan type will not be used.
        
        > Enter desired number of concurrent STATIC (SAST) scans [Default: 1]:
        > Enter desired number of concurrent DYNAMIC (DAST) scans [Default: 1]:
        > Enter desired number of concurrent INTERACTIVE (IAST) scans [Default: 1]:
        如果您选择启用 SCA,请指明预期的并发 SCA 扫描次数:
        Enter desired number of concurrent SCA scans [Default: 1]:
      • :跳过资源验证。
    3. 生产安装必须配置外部 MSSQL 数据库。根据所给出的提示进行回答。
      • 🛢️ *** Database Configuration ***
        > Enter Database Hostname or IP:
      • > Enter Database Port [Default: 1433]:
      • > Enter Database User for AppScan:
      • > Enter Database User Password:
      • > Enter the name for the main AppScan database [Default: AppScan360DB]:
    4. 如果您选择在安装中包括软件组成分析 (SCA),请执行以下操作:
      • 输入 SCA 数据库名称:
        > Please provide a name for the new SCA database [Default: AppScan360_SCA_DB]:
      • 输入 SCA 聚合数据库名称:
        > Please provide a name for the new SCA Aggregation database [Default: > AppScan360_SCA_Aggregation_DB]:
      • 输入 SCA 更新所需的注册表信息或接受缺省值(如果适用):

        > SCA Registry Address [Default: hclcr.io]:
        > SCA Registry Path [Default: appscan360/as360-k8s-docker-images]:
        > SCA Registry Username (typically your HCL ID):
        > SCA Registry Password/Token:
    5. > Please enter the primary domain name for this installation. This will be used to create the access URL (e.g., yourcompany.com):

      这是没有缺省值的必填字段。指定的域名用于为您的 AppScan 360° 实例创建访问 URL。例如,如果您输入 appscan-test.local,则您的 AppScan 360° URL 将为 https://hostname.appscan-test.local

      域名应易于记忆、在您的网络环境中是唯一的,并且不应与现有域名冲突。

    6. > Please enter the external domain(s) or IP(s) that this instance will need to access for external services(such as SSO, SMTP, etc.). Separate multiple entries with commas:

      输入您的 AppScan 360° 实例需要连接到的任何域名或 IP 地址,例如:

      • 用于电子邮件通知的 SMTP 服务器

      • SSO 身份验证提供程序(LDAP、OIDC)

      • 外部 CI/CD 工具

      请用逗号分隔多个条目。如果不需要外部服务,请留空。

    7. > Is the VM connected with the local DNS server (y/n)? 

      缺省值为

      • :您的 VM 已连接到 DNS 服务器。系统使用主机名进行网络相关的配置。
      • :您的 VM 未连接到 DNS 服务器。系统直接使用 IP 地址进行网络相关的配置。
    8. > To plan for long-term storage costs, estimate the number of scan results you plan to retain. > Specify the shared storage capacity in GB [Default: 200]:
      此存储用于存放组件之间共享的日志、配置文件、持久性数据和扫描日志。缺省值为 200GB
      • Enter 键以接受缺省值,或者
      • 键入不同的数字以指定定制存储值,然后按 Enter 键。
    9. > Do you want to connect with your SMTP Mail Relay (SMR)(y/n)? 

      缺省值为

      SMTP 邮件中继是一种中介服务器,可以接受系统发出的电子邮件并将邮件转发到收件人的电子邮件服务器。中继有助于确保电子邮件送达,并可以应用某些规则,如垃圾邮件过滤。在 AppScan 360° 中设置一个中继,以便在扫描完成、预定扫描启动等情况下接收通知电子邮件。

      • :将 AppScan 360° 与 SMTP 邮件中继集成,用于从部署发送电子邮件。在您选择 y 后,需要在出现提示时为 SMR 输入相应的主机、端口、凭证和加密详细信息,以完成连接:
        • > Please enter the SMTP host:
        • > Please enter the SMTP port:

          端口号通常为 25、465 或 587。

        • > Please enter the SMTP username:

          需要身份验证时。

        • Please enter the SMTP password:

          需要身份验证时。

        • > Does your SMTP server use SSL/TLS? If yes, a certificate is required to be present in certs/smtp folder (y/n)?
      • :不设置 SMTP 服务器;用户无法接收任何相关的电子邮件通知。
  10. 指示 Docker 注册表配置:
    • > What is the external Docker Private Registry (DPR) address (FQDN:PORT)?
    • > What is the external Docker Private Registry (DPR) username?

      需要身份验证时

    • > What is the external Docker Private Registry (DPR) password?

      需要身份验证时

    • 🐳 Docker registry and Helm repository context names are used to set the context for docker images and helm charts.
      💡 To set these to an empty string(root repository), type EMPTY
      ------------------------------------------------------------------------------------------------
      > What is the docker registry context/repository name [Default: as360-k8s-docker-images]:
    • > What is the helm repository context/repository name [Default: as360-k8s-helm-packages]:
  11. 是否要使用代理服务?(是/否)[缺省值:否]:
    缺省值为
    • :配置代理服务。
      • > What is the proxy host?
      • > What is the proxy port?
      • > Does the proxy require user/password credentials? (y/n):
      • > What is the proxy username?:
      • > What is the proxy password?:
    • :跳过代理配置。
  12. 安装程序将显示您所做选择的摘要,并询问您是否要继续安装。
    ✅ Summary of your choices:
      Installation Mode: Custom (Production)
      Install SCA Kit: [y/n]
      Domain: [your domain]
      Connected to Local DNS: [y/n]
      Storage Size: [size]GB
      Use SMTP Mail Relay: [y/n]
      Docker Private Registry Address: [address]
      Scan Concurrency: SAST=[n], DAST=[n], IAST=[n], SCA=[n]
      MSSQL Host: [host], Port: [port], DB: [database]
      [Additional configuration details...]
    > Continue with installation? (y/n) [Default: y]:

    验证信息是否正确,然后键入 y

    安装程序将继续进行安装和配置:
    • Kubernetes 集群 (K0S)
    • AppScan 360° Central Platform 和组件。
    • AppScan Remediation Advisories (ASRA)
    • 软件组成分析 (SCA)(如果已选择)
    • 与外部数据库和 Docker 注册表的连接
    安装可能需要一些时间,具体取决于您的系统和网络速度。完成后,安装程序将显示一条完成消息:
    The AS360 Single VM was installed, to access it do the following:
      1. Add to your 'hosts' file the following line: [IP_ADDRESS] [HOSTNAME].[DOMAIN]
      2. Access https://[HOSTNAME].[DOMAIN] in your browser
  13. 将所提供的 IP 地址和主机名添加到您的主机文件中。
    操作系统 主机文件位置
    Linux、MacOS /etc/hosts
    Windows C:\Windows\System32\drivers\etc\hosts
    例如:
    192.168.1.100 appscan.appscan-test.local

登录并激活 AppScan 360°

要登录并激活 AppScan 360°,请执行以下操作:
  1. 使用指定的 URL (https://[HOSTNAME].[DOMAIN]) 访问 AppScan 360° 界面
  2. 使用缺省凭证登录:
    • 用户名:Admin
    • 密码:Admin123!
  3. 上载您的 AppScan 360° 许可证文件以激活产品。
注: 我们建议您定期进行备份,包括:
  • 数据库。
  • 安装目录中的配置文件。
  • 许可证信息。

更改安装方法

如果在安装和使用 AppScan 360° 的快速单个 VM 安装后,您决定要在分布式环境中安装 AppScan 360°AppScan 360° 的生产单个 VM 版本,请执行以下操作:

常见安装问题

问题 解决方案
数据库连接失败 验证数据库凭证和网络连接
磁盘空间不足 确保 VM 具有符合要求的足够存储空间
证书错误 检查证书文件夹中的证书格式和文件名
Docker 注册表连接 验证注册表凭证和网络连接