Skip to content

Commit a4bc557

Browse files
streichsbaerwahyudibo
authored andcommitted
chore(content): Update content
1 parent 784af9b commit a4bc557

File tree

8 files changed

+28
-25
lines changed

8 files changed

+28
-25
lines changed

README.md

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
![Codecov](https://img.shields.io/codecov/c/github/guardrailsio/guardrails-cli?token=3c5e84bf-caa3-4a07-ace2-64f67b86a244)
1414
[![GuardRails badge](https://api.guardrails.io/v2/badges/145474?token=5cdcd3c9f602bdf5dd4ec8a7d19e2e6599e571a73e8c9751f5b6d04deaf68aa6)](https://dashboard.guardrails.io/gh/guardrailsio/repos/145474)
1515

16-
The GuardRails CLI allows you to interact with [GuardRails](https://www.guardrails.io) via command line.
16+
The GuardRails CLI allows you to interact with [GuardRails](https://www.guardrails.io) via the command line.
17+
1718
## Table of Contents
1819

1920
- [Pre-Requisites](#pre-requisites)
@@ -24,17 +25,17 @@ The GuardRails CLI allows you to interact with [GuardRails](https://www.guardrai
2425

2526
## Pre-Requisites
2627

27-
To use the GuardRails CLI, you need to have an active account and a CLI token.
28+
To use the GuardRails CLI, you require an active GuardRails account and a CLI token.
2829

2930
More information on how to get started can be found [here](https://www.guardrails.io/docs/en/getting-started).
3031

31-
Your GuardRails account CLI token can be found in the account's setting page on the dashboard.
32+
Your GuardRails account CLI token can be obtained under `Settings`->`CLI Authentication` on the GuardRails dashboard.
3233

3334
## Installation
3435

3536
### Installation scripts (Linux / OSX)
3637

37-
Just paste this command and you're good to go. We're assuming that you're using `bash` but you can change it accordingly based on the shell that you're using. You might be asked for a password for `sudo` in the process of installation.
38+
Just paste this command, and you're good to go. We're assuming you're using `bash`, but you can change it accordingly based on the shell you're using. You might be asked for a password for `sudo` in the installation process.
3839

3940
```
4041
curl -fsSL https://raw.githubusercontent.com/guardrailsio/guardrails-cli/master/etc/scripts/install.sh | bash
@@ -51,7 +52,7 @@ brew install guardrails
5152

5253
### Windows
5354

54-
You need to have [scoop](https://scoop.sh) installed in order to install `guardrails`. The rest will be similar to the installation scripts for Linux / OSX. You just need to paste this command into your powershell:
55+
You require [scoop](https://scoop.sh) before installing `guardrails`. The rest will be similar to the installation scripts for Linux / OSX. Execute the below command in your powershell:
5556

5657
```
5758
iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/guardrailsio/guardrails-cli/master/etc/scripts/install.ps1'))
@@ -60,19 +61,20 @@ iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.co
6061
## Usage
6162

6263
Here are the main GuardRails CLI commands:
63-
64-
- `scan` : scans a repository for vulnerabilities and output results
65-
- `version` : displays build version
64+
- `scan` : Scans a repository for vulnerabilities and outputs results
65+
- `version` : Displays the build version
6666

67-
For more information on all the options and arguments available please check the help menu with: `guardrails --help`
67+
For more information on all the options and available arguments, please check the help menu with: `guardrails --help`
6868

6969
### How to read the results
7070

71-
The CLI will output the total number of vulnerabilities detected, if any.
72-
73-
Vulnerabilities detected are grouped by category, i.e. Hard-Coded Secrets.
71+
The CLI will output the total number of detected vulnerabilities.
72+
Vulnerabilities are grouped by category, i.e., `Hard-Coded Secrets`.
7473

75-
For each item within a category, there will be a severity index (see table below), the type of vulnerability and a link to a fixing advice in our documentation; and finally the file path and line number.
74+
For each item within a category, the following information is shown:
75+
- A severity index (see table below).
76+
- The type of vulnerability containing a hyperlink to fixing advice in our documentation.
77+
- The file path and line number.
7678

7779
Example: `(M) Hard-coded Secret - awesome-product/config.js:2`
7880

@@ -82,12 +84,13 @@ For Vulnerable Libraries specifically, the type of vulnerability will be replace
8284

8385
Example: `(C) pkg:gem/mypackage@2.5.2 - awesome-product/Gemfile.lock:14`
8486

85-
Here we're looking at the vulnerable `mypackage` dependancy in version `2.5.2` with a `Critical` severity declared in the file `awesome-product/Gemfile.lock` at line `14`.
87+
Here we're looking at the vulnerable `mypackage` dependency in version `2.5.2` with a `Critical` severity declared in the file `awesome-product/Gemfile.lock` at line `14`.
8688

8789
#### Severity index table
8890

8991
| Index | Severity |
9092
|-------|---------------|
93+
| (N/A) | Not available |
9194
| (I) | Informational |
9295
| (L) | Low |
9396
| (M) | Medium |
@@ -100,4 +103,4 @@ https://www.guardrails.io/docs/en/cli/introduction
100103

101104
## License
102105

103-
GuardRails CLI is released under the Apache 2.0 license. See [LICENSE.txt](https://github.com/guardrailsio/guardrails-cli/blob/master/LICENSE.txt)
106+
The GuardRails CLI is released under the Apache 2.0 license. See [LICENSE.txt](https://github.com/guardrailsio/guardrails-cli/blob/master/LICENSE.txt)

cmd/root.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ Commands:
3838
version
3939
help
4040
41-
scan: scans a repository for vulnerabilities and output results
42-
-t, --token a valid Guardrails CLI token you can obtain from dashboard > settings
41+
scan: scans a repository for vulnerabilities and outputs results
42+
-t, --token a valid GuardRails CLI token you can obtain from dashboard -> settings
4343
-p, --path the path to the repository to scan, defaults to $PWD
4444
-f, --format the output format for scan results, defaults to pretty
4545
-o, --output if provided, will save the output to the specified file path

cmd/scan.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ var scanCmd = &cobra.Command{
7474
}
7575

7676
func init() {
77-
scanCmd.Flags().StringVarP(&token, "token", "t", "", "a valid Guardrails CLI token you can obtain from dashboard > settings")
77+
scanCmd.Flags().StringVarP(&token, "token", "t", "", "a valid GuardRails CLI token you can obtain from dashboard -> settings")
7878
scanCmd.Flags().StringVarP(&path, "path", "p", "", "the path to the repository to scan, defaults to $PWD")
7979
scanCmd.Flags().StringVarP(&format, "format", "f", "pretty", "the output format for scan results, defaults to pretty")
8080
scanCmd.Flags().StringVarP(&output, "output", "o", "", "if provided, will save the output to the specified file path")

etc/scripts/install.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ if (Get-Command "scoop" 2>$null) {
22
scoop bucket add guardrails https://github.com/guardrailsio/scoop-bucket-guardrails
33
scoop install guardrails
44
scoop update guardrails
5-
Write-Output "Guardrails installed with Scoop! Run 'guardrails --help' to see available commands."
5+
Write-Output "GuardRails installed with Scoop! Run 'guardrails --help' to see available commands."
66
return
77
} else {
88
Write-Host "Scoop is not installed! (https://scoop.sh)"

internal/client/guardrails/errors.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99
)
1010

1111
var (
12-
ErrInvalidToken = errors.New("invalid token, please provide a valid Guardrails CLI token, available from dashboard > settings")
13-
ErrRepositoryNotFound = errors.New("invalid repository, please provide an existing repository from the git provider account linked with Guardrails, available from dashboard > repositories")
12+
ErrInvalidToken = errors.New("invalid token, please provide a valid GuardRails CLI token, available from dashboard -> settings")
13+
ErrRepositoryNotFound = errors.New("invalid repository, please provide an existing repository from the git provider account linked with GuardRails, available from dashboard -> repositories")
1414
)
1515

1616
func parseHTTPRespStatusCode(funcName string, resp *http.Response) error {

internal/command/scan/args.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const (
1717
)
1818

1919
var (
20-
ErrMissingToken = errors.New("missing token, please provide your Guardrails CLI token via -—token option or GUARDRAILS_CLI_TOKEN environment variable")
20+
ErrMissingToken = errors.New("missing token, please provide your GuardRails CLI token via -—token option or GUARDRAILS_CLI_TOKEN environment variable")
2121
ErrInvalidFormatParam = errors.New("failed to parse format value")
2222
)
2323

@@ -63,7 +63,7 @@ func isFormatAllowed(value interface{}) error {
6363
}
6464

6565
if !isAllowed {
66-
return fmt.Errorf("unknown format. Allowed format are %s", strings.Join(allowedFormat, ", "))
66+
return fmt.Errorf("unknown format. Allowed formats are %s", strings.Join(allowedFormat, ", "))
6767
}
6868
return nil
6969
}

internal/command/scan/format/pretty.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func GetScanDataPrettyFormat(w io.Writer, resp *guardrailsclient.GetScanDataResp
2828
fmt.Fprintln(w, text.FgCyan.Sprintf("%s (line %d)", v.Path, v.LineNumber))
2929
}
3030

31-
fmt.Fprintln(w, "Not sure how to fix this ?")
31+
fmt.Fprintln(w, "Not sure how to fix this?")
3232
for _, l := range r.Languages {
3333
fmt.Fprintln(w, text.FgBlue.Sprintf("https://docs.guardrails.io/docs/vulnerabilities/%s/%s\n", l, r.Rule.Docs))
3434
}

internal/command/scan/format/sarif.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ type Location struct {
7474
} `json:"region"`
7575
}
7676

77-
// GetScanDataJSONFormat parses guardrailsclient.GetScanDataResp to sarif format.
77+
// GetScanDataJSONFormat parses guardrailsclient.GetScanDataResp to SARIF format.
7878
func GetScanDataSARIFFormat(w io.Writer, resp *guardrailsclient.GetScanDataResp, isQuiet bool) error {
7979
schema := &Schema{
8080
Schema: "https://json.schemastore.org/sarif-2.1.0.json",

0 commit comments

Comments
 (0)