Skip to content

Commit 1e81968

Browse files
Merge pull request #313 from cyberchen1995/master
docs: Update installation instructions, add multiple installation met…
2 parents aee1ec6 + 6385978 commit 1e81968

File tree

2 files changed

+109
-42
lines changed

2 files changed

+109
-42
lines changed

.github/README.md

Lines changed: 50 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ English|[中文](../README.md)
1919

2020
- [Introduction](#introduction)
2121
- [Detection Ability](#detection-ability)
22-
- [Download \& Deployment](#download--deployment)
22+
- [Installation](#installation)
23+
- [Method 1: Download from Releases](#method-1-download-from-releases)
24+
- [Method 2: Use install script](#method-2-use-install-script)
25+
- [Method 3: Use package manager(Homebrew)](#method-3-use-package-managerhomebrew)
26+
- [Method 4: Build from source](#method-4-build-from-source)
2327
- [Use OpenSCA](#use-opensca)
2428
- [Parameters](#parameters)
2529
- [Report Formats](#report-formats)
@@ -64,28 +68,57 @@ OpenSCA is now capable of parsing configuration files in the listed programming
6468
| `Erlang` | `Rebar` | `rebar.lock` |
6569
| `Python` | `Pip` | `Pipfile` `Pipfile.lock` `setup.py` `requirements.txt` `requirements.in`(For the latter two, pipenv environment & internet connection are needed) |
6670

67-
## Download & Deployment
71+
## Installation
72+
73+
OpenSCA-cli is available for Windows, Linux and MacOS. The installation method is as follows:
74+
75+
### Method 1: Download from Releases
6876

6977
1. Download the appropriate executable file according to your system architecture from [releases](https://github.com/XmirrorSecurity/OpenSCA-cli/releases).
78+
2. Unzip the downloaded file and run `opensca-cli` directly.
79+
80+
### Method 2: Use install script
81+
82+
- For Mac/Linux Users
83+
```shell
84+
curl -sSL https://raw.githubusercontent.com/XmirrorSecurity/OpenSCA-cli/master/scripts/install.sh | sh
85+
86+
# Try this when internet connection fails
87+
curl -sSL https://gitee.com/XmirrorSecurity/OpenSCA-cli/raw/master/scripts/install.sh | sh -s -- gitee
88+
```
89+
- For Windows Users(need PowerShell)
90+
```powershell
91+
iex "&{$(irm https://raw.githubusercontent.com/XmirrorSecurity/OpenSCA-cli/master/scripts/install.ps1)}"
92+
93+
# Try this when internet connection fails
94+
iex "&{$(irm https://gitee.com/XmirrorSecurity/OpenSCA-cli/raw/master/scripts/install.ps1)} gitee"
95+
```
7096

71-
2. Or download the source code and compile (`go 1.18` and above is needed)
97+
### Method 3: Use package manager(Homebrew)
98+
```shell
99+
brew install opensca-cli
100+
```
101+
102+
### Method 4: Build from source
72103

73-
```shell
74-
// github linux/mac
75-
git clone https://github.com/XmirrorSecurity/OpenSCA-cli.git opensca && cd opensca && go build
76-
// gitee linux/mac
77-
git clone https://gitee.com/XmirrorSecurity/OpenSCA-cli.git opensca && cd opensca && go build
78-
// github windows
79-
git clone https://github.com/XmirrorSecurity/OpenSCA-cli.git opensca ; cd opensca ; go build
80-
// gitee windows
81-
git clone https://gitee.com/XmirrorSecurity/OpenSCA-cli.git opensca ; cd opensca ; go build
82-
```
104+
Clone the source code and compile (`go 1.18` and above is needed)
105+
106+
```shell
107+
# github linux/mac
108+
git clone https://github.com/XmirrorSecurity/OpenSCA-cli.git opensca && cd opensca && go build
109+
# gitee linux/mac
110+
git clone https://gitee.com/XmirrorSecurity/OpenSCA-cli.git opensca && cd opensca && go build
111+
# github windows
112+
git clone https://github.com/XmirrorSecurity/OpenSCA-cli.git opensca ; cd opensca ; go build
113+
# gitee windows
114+
git clone https://gitee.com/XmirrorSecurity/OpenSCA-cli.git opensca ; cd opensca ; go build
115+
```
83116

84-
The default option is to generate the program of the current system architecture. If you want to try it for other system architectures, you can set the following environment variables before compiling.
117+
The default option is to generate the program of the current system architecture. If you want to try it for other system architectures, you can set the following environment variables before compiling.
85118

86-
- Disable `CGO_ENABLED` `CGO_ENABLED=0`
87-
- Set the operating system `GOOS=${OS} \\ darwin,liunx,windows`
88-
- Set the architecture `GOARCH=${arch} \\ amd64,arm64`
119+
- Disable `CGO_ENABLED` `CGO_ENABLED=0`
120+
- Set the operating system `GOOS=${OS} \\ darwin,liunx,windows`
121+
- Set the architecture `GOARCH=${arch} \\ amd64,arm64`
89122

90123
## Use OpenSCA
91124

README.md

Lines changed: 59 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
- [项目介绍](#项目介绍)
1818
- [检测能力](#检测能力)
1919
- [下载安装](#下载安装)
20+
- [方式 1: 从 Releases 下载](#方式-1-从-releases-下载)
21+
- [方式 2: 一键安装脚本](#方式-2-一键安装脚本)
22+
- [方式 3: 使用包管理器(Homebrew)](#方式-3-使用包管理器homebrew)
23+
- [方式 4: 从源码构建](#方式-4-从源码构建)
2024
- [使用说明](#使用说明)
2125
- [参数说明](#参数说明)
2226
- [报告格式](#报告格式)
@@ -61,33 +65,63 @@
6165

6266
## 下载安装
6367

68+
OpenSCA-cli 支持 Windows、Linux、MacOS 等操作系统,支持 x86_64 和 arm64 架构。目前提供了以下几种安装方式:
69+
70+
### 方式 1: 从 Releases 下载
71+
6472
1.[github](https://github.com/XmirrorSecurity/OpenSCA-cli/releases)[gitee](https://gitee.com/XmirrorSecurity/OpenSCA-cli/releases)[gitcode](https://gitcode.com/XmirrorSecurity/OpenSCA-cli/releases) 下载对应系统架构的可执行文件压缩包
73+
2. 解压,并运行 `opensca-cli` 可执行文件即可。
74+
75+
### 方式 2: 一键安装脚本
76+
77+
- Mac/Linux 用户
78+
```shell
79+
curl -sSL https://raw.githubusercontent.com/XmirrorSecurity/OpenSCA-cli/master/scripts/install.sh | sh
80+
81+
# 如果遇到网络问题,可尝试以下命令
82+
curl -sSL https://gitee.com/XmirrorSecurity/OpenSCA-cli/raw/master/scripts/install.sh | sh -s -- gitee
83+
```
84+
- For Windows Users(need PowerShell)
85+
```powershell
86+
iex "&{$(irm https://raw.githubusercontent.com/XmirrorSecurity/OpenSCA-cli/master/scripts/install.ps1)}"
87+
88+
# 如遇到网络问题,可尝试以下命令
89+
iex "&{$(irm https://gitee.com/XmirrorSecurity/OpenSCA-cli/raw/master/scripts/install.ps1)} gitee"
90+
```
91+
92+
### 方式 3: 使用包管理器(Homebrew)
93+
94+
```
95+
brew install opensca-cli
96+
```
97+
98+
### 方式 4: 从源码构建
99+
100+
克隆并源码编译(需要 `go 1.18` 及以上版本)
101+
102+
```shell
103+
# github linux/mac
104+
git clone https://github.com/XmirrorSecurity/OpenSCA-cli.git opensca && cd opensca && go build
105+
# gitee linux/mac
106+
git clone https://gitee.com/XmirrorSecurity/OpenSCA-cli.git opensca && cd opensca && go build
107+
# gitcode linux/mac
108+
git clone https://gitcode.com/XmirrorSecurity/OpenSCA-cli.git opensca && cd opensca && go build
109+
# github windows
110+
git clone https://github.com/XmirrorSecurity/OpenSCA-cli.git opensca ; cd opensca ; go build
111+
# gitee windows
112+
git clone https://gitee.com/XmirrorSecurity/OpenSCA-cli.git opensca ; cd opensca ; go build
113+
# gitcode windows
114+
git clone https://gitcode.com/XmirrorSecurity/OpenSCA-cli.git opensca ; cd opensca ; go build
115+
```
116+
117+
默认生成当前系统架构的程序,如需生成其他系统架构可配置环境变量后编译
65118

66-
2. 或者下载源码编译(需要 `go 1.18` 及以上版本)
67-
68-
```shell
69-
// github linux/mac
70-
git clone https://github.com/XmirrorSecurity/OpenSCA-cli.git opensca && cd opensca && go build
71-
// gitee linux/mac
72-
git clone https://gitee.com/XmirrorSecurity/OpenSCA-cli.git opensca && cd opensca && go build
73-
// gitcode linux/mac
74-
git clone https://gitcode.com/XmirrorSecurity/OpenSCA-cli.git opensca && cd opensca && go build
75-
// github windows
76-
git clone https://github.com/XmirrorSecurity/OpenSCA-cli.git opensca ; cd opensca ; go build
77-
// gitee windows
78-
git clone https://gitee.com/XmirrorSecurity/OpenSCA-cli.git opensca ; cd opensca ; go build
79-
// gitcode windows
80-
git clone https://gitcode.com/XmirrorSecurity/OpenSCA-cli.git opensca ; cd opensca ; go build
81-
```
82-
83-
默认生成当前系统架构的程序,如需生成其他系统架构可配置环境变量后编译
84-
85-
- 禁用`CGO_ENABLED`
86-
`CGO_ENABLED=0`
87-
- 指定操作系统
88-
`GOOS=${OS} \\ darwin,liunx,windows`
89-
- 指定体系架构
90-
`GOARCH=${arch} \\ amd64,arm64`
119+
- 禁用`CGO_ENABLED`
120+
`CGO_ENABLED=0`
121+
- 指定操作系统
122+
`GOOS=${OS} \\ darwin,liunx,windows`
123+
- 指定体系架构
124+
`GOARCH=${arch} \\ amd64,arm64`
91125

92126
## 使用说明
93127

0 commit comments

Comments
 (0)