@brightsec/cli 10.0.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Bright Security Inc. All Rights Reserved
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,82 @@
1
+ # Bright CLI
2
+
3
+ [Bright](https://brightsec.com) is a powerful dynamic application & API security testing (DAST) platform. With its effective automation and integration capabilities, Bright allows developers to scan multiple targets, uncover security vulnerabilities without false positives, get detailed reports on every finding, and quickly fix security issues by following the remediation guidelines.
4
+
5
+ The NPM allows you to install the Bright Command Line Interface (CLI) on your machine. You can use the **Bright CLI** to run and manage security scans directly from your development environment. In addition, the container includes a preconfigured [Repeater (scan proxy)](https://docs.brightsec.com/docs/on-premises-repeater-local-agent), which enables you to scan local targets securely, without exposing them to the Internet.
6
+
7
+ ##### Features:
8
+
9
+ - Easy control of the Bright REST API.
10
+ - [Repeater mode](https://docs.brightsec.com/docs/initializing-the-repeater), which allows the Bright cloud engine to connect to local targets securely, pulling all scan requests as outbound traffic, without exposing the targets to the Internet.
11
+ - Flexible proxy configuration, which allows you to control the CLI requests both internally and externally.
12
+ - Connector to on-premises (local) ticketing services. For example, you can enable the Bright integration with on-premises Jira, for tickets to be automatically opened for each security vulnerability detected.
13
+ - Integration of Bright with your CI pipelines. Please see our [guide on integrating Bright with CI pipelines](https://docs.brightsec.com/docs/integrate-bright-with-your-ci-pipeline) for more information.
14
+ - Running commands from a configuration file. You can run the CLI commands from your console or save them as a JSON, XML, YML, or JavaScript file. Running the CLI from a pre-configured file will simplify further scanning.
15
+
16
+ ## 🔎 Table of Contents
17
+
18
+ - [Quick Start](#🚀-quick-start)
19
+ - [Full Documentation](#📚-full-documentation)
20
+ - [License](#📝-license)
21
+
22
+ ## 🚀 Quick Start
23
+
24
+ Before you can use **Bright CLI** make sure you have the following:
25
+
26
+ - An active user in [the Bright app](https://app.brightsec.com/)
27
+ - You have Docker installed on your machine.
28
+ - You have a valid [organization API key](https://docs.brightsec.com/docs/manage-your-organization#manage-organization-apicli-authentication-tokens) or a [personal API key](https://docs.brightsec.com/docs/manage-your-personal-account#manage-your-personal-api-keys-authentication-tokens) with the following scopes: `bot`, `scans:run` and `scans:read`. You can watch video about [creating API keys](https://www.youtube.com/watch?v=W_WdIGPXoUQ&t=3s).
29
+ - You have registered (created) a Repeater in the Bright app and copied the generated Repeater ID. For the instructions on how to register a Repeater, see [here](https://docs.brightsec.com/docs/manage-repeaters#create-a-new-repeater).
30
+ - You have copied the Bright Project ID under which you want to run a scan. A Project ID is required. If you do not have any custom projects, use the Default Project ID.
31
+
32
+ #### 1. Install Bright CLI globally
33
+
34
+ ```bash
35
+ npm install @brightsec/cli -g
36
+ ```
37
+
38
+ You can make sure the installation worked by executing the following command:
39
+
40
+ ```bash
41
+ bright-cli --version
42
+ ```
43
+
44
+ It should return the latest Bright CLI version.
45
+
46
+ #### 2. Activate the Repeater
47
+
48
+ ```bash
49
+ bright-cli repeater \
50
+ --token {TOKEN} \
51
+ --id {ID}
52
+ ```
53
+
54
+ #### 3. Start a new scan with a Crawler
55
+
56
+ ```bash
57
+ bright-cli scan:run \
58
+ --token {TOKEN} \
59
+ --repeater {ID} \
60
+ --name "Bright scan" \
61
+ --crawler {TARGET_URL} \
62
+ --project {PROJECT_ID} \ #If you do not have any custom projects, specify the Default Project ID.
63
+ --smart
64
+ ```
65
+
66
+ This command will initialize a new scan engine on the cloud, which will start scanning the target in the Repeater mode.
67
+
68
+ We recommend that you use the `--smart` option to optimize the scan coverage and time. This enables you to use automatic smart decisions, such as parameter skipping, detection phases and so on.
69
+
70
+ #### 4. Check out the scan results
71
+
72
+ You can follow the scan status in the [Bright app](https://app.brightsec.com/scans) or by using the [**Bright CLI** polling](https://docs.brightsec.com/docs/checking-scan-status) command.
73
+
74
+ ## 📚 Full Documentation
75
+
76
+ The **Bright CLI** can do so much more! You can find a full guide with the usage examples in the [Bright docs](https://docs.brightsec.com/docs/getting-started-with-bright-cli).
77
+
78
+ ## 📝 License
79
+
80
+ Copyright © 2023 [Bright Security Inc.](https://brightsec.com/)
81
+
82
+ This project is licensed under the MIT License - see the [LICENSE file](LICENSE) for details.