Skip to content

Commit 2a28ae1

Browse files
committed
chore(cli): drop deprecated profile flag
1 parent fd1bed9 commit 2a28ae1

File tree

4 files changed

+13
-12
lines changed

4 files changed

+13
-12
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,4 @@ __debug_bin
3636
/pkg/tool/kubectl/assets/
3737

3838
/cdk
39+
.cache/

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,13 @@ chmod a+x cdk
6363
## Usage
6464
```
6565
Usage:
66-
cdk evaluate [--full] [--profile=<name>]
66+
cdk evaluate [--full]
6767
cdk run (--list | <exploit> [<args>...])
6868
cdk <tool> [<args>...]
6969
7070
Evaluate:
7171
cdk evaluate Gather information to find weakness inside container.
7272
cdk evaluate --full Enable file scan during information gathering.
73-
cdk evaluate --profile=<name> Run a specific evaluation profile (basic, extended, additional).
7473
7574
Exploit:
7675
cdk run --list List all available exploits.
@@ -104,9 +103,8 @@ CDK has three modules:
104103

105104
Usage
106105
```
107-
cdk evaluate [--full] [--profile=<name>]
106+
cdk evaluate [--full]
108107
```
109-
This command runs the baseline profile by default. Use `--full` (alias for `--profile=extended`) to include file-system checks, or pick a specific profile with `--profile=basic`, `--profile=additional`, or `--profile=extended`.
110108

111109
|Tactics|Script|Supported|Usage/Example|
112110
|---|---|---|---|

pkg/cli/banner.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ var BannerContainerTpl = BannerHeader + `
4141
%s
4242
cdk eva
4343
cdk eva --full
44-
cdk evaluate [--full] [--profile=<name>]
44+
cdk evaluate [--full]
4545
cdk run (--list | <exploit> [<args>...])
4646
cdk <tool> [<args>...]
4747

pkg/cli/parse_test.go

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ type testArgsCase struct {
3434
successStr string
3535
}
3636

37+
const parseTimeout = 5 * time.Second
38+
3739
func doParseCDKMainWithTimeout() {
3840

3941
result := make(chan bool, 1)
@@ -43,8 +45,8 @@ func doParseCDKMainWithTimeout() {
4345
}()
4446

4547
select {
46-
case <-time.After(time.Second * 2):
47-
log.Println("check run ok, timeout in 2s, and return.")
48+
case <-time.After(parseTimeout):
49+
log.Printf("check run ok, timeout reached in %s, and return.", parseTimeout)
4850
return
4951
case <-result:
5052
return
@@ -64,11 +66,11 @@ func TestParseCDKMain(t *testing.T) {
6466
args: []string{"./cdk_cli_path", "eva"},
6567
successStr: "current user",
6668
},
67-
{
68-
name: "./cdk eva --profile=additional",
69-
args: []string{"./cdk_cli_path", "eva", "--profile=additional"},
70-
successStr: "randomize_va_space",
71-
},
69+
// {
70+
// name: "./cdk eva --profile=additional",
71+
// args: []string{"./cdk_cli_path", "eva", "--profile=additional"},
72+
// successStr: "randomize_va_space",
73+
// },
7274
{
7375
name: "./cdk run test-poc",
7476
args: []string{"./cdk_cli_path", "run", "test-poc"},

0 commit comments

Comments
 (0)