Skip to content

Commit bcbbe44

Browse files
FreedischJ12934
authored andcommitted
feat: add docs to scbctl usage
Signed-off-by: freedisch <freeproduc@gmail.com>
1 parent 8efc3bc commit bcbbe44

2 files changed

Lines changed: 79 additions & 0 deletions

File tree

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,7 @@ lintall: ## Lint complete repo
116116
help: ## Display this help screen.
117117
@grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
118118
awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
119+
120+
.PHONY: scbctl
121+
scbctl: ## Build scbctl cli tool
122+
cd scbctl && go build -o scbctl main.go

scbctl/README.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# scbctl - CLI for secureCodeBox
2+
3+
A handy CLI for interaction with [secureCodeBox](https://github.com/secureCodeBox/secureCodeBox) CustomResources like Scans & ScheduledScans which are tedious to perform using usual `kubectl` & `helm` tooling.
4+
5+
## Installation
6+
7+
```bash
8+
git clone https://github.com/secureCodeBox/secureCodeBox.git
9+
make scbctl
10+
11+
# move `scbctl` binary into a directory in your path
12+
cd scbctl
13+
sudo mv scbctl /usr/local/bin/scbctl
14+
```
15+
16+
## Commands
17+
18+
### scan
19+
20+
Create a new Scan custom resource in the current namespace.
21+
22+
#### Usage
23+
24+
```bash
25+
scbctl scan [scanType] -- [parameters...]
26+
```
27+
28+
#### Arguments
29+
30+
- `scanType`: The type of scan to create.
31+
- `parameters...`: Additional parameters to pass to the scan.
32+
33+
#### Examples
34+
35+
```bash
36+
# Create a new scan
37+
scbctl scan nmap -- scanme.nmap.org
38+
39+
# Create a scan with a custom name
40+
scbctl scan nmap --name scanme-nmap-org -- scanme.nmap.org
41+
42+
# Create with multiple parameters
43+
scbctl scan nuclei -- -target example.com
44+
45+
# Create in a different namespace
46+
scbctl scan --namespace foobar nmap -- -p 80 scanme.nmap.org
47+
```
48+
49+
### trigger
50+
51+
Trigger a new execution (Scan) of a ScheduledScan, ahead of its usual execution schedule.
52+
53+
#### Usage
54+
55+
```bash
56+
scbctl trigger [scheduledScanName] [flags]
57+
```
58+
59+
#### Arguments
60+
61+
- `scheduledScanName`: The name of the ScheduledScan to trigger.
62+
63+
#### Examples
64+
65+
```bash
66+
# Trigger a new scan for a ScheduledScan
67+
scbctl trigger nmap-localhost
68+
69+
# Trigger in a different namespace
70+
scbctl trigger nmap-localhost --namespace foobar
71+
```
72+
73+
## Completion
74+
75+
`scbctl` offers shell completion. See `scbctl completion --help` for instructions on how to set it up in your shell environment.

0 commit comments

Comments
 (0)