securewithtrace 0.21.0 → 0.21.2
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/README.md +12 -0
- package/dist/index.js +39 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -134,6 +134,9 @@ tracecli vulnerabilities list --output json | jq '.[].title'
|
|
|
134
134
|
|
|
135
135
|
# TSV output for awk/cut
|
|
136
136
|
tracecli vulnerabilities list --output tsv | cut -f1,7
|
|
137
|
+
|
|
138
|
+
# Open vulnerabilities dashboard in browser
|
|
139
|
+
tracecli vulnerabilities list --web
|
|
137
140
|
```
|
|
138
141
|
|
|
139
142
|
Flags:
|
|
@@ -145,6 +148,7 @@ Flags:
|
|
|
145
148
|
| `--status <status>` | | Filter by status |
|
|
146
149
|
| `--limit <n>` | `-L` | Max results (default: 30, max: 100) |
|
|
147
150
|
| `--output <format>` | `-o` | Output format: `table` (default), `json`, `tsv` |
|
|
151
|
+
| `--web` | `-w` | Open vulnerabilities dashboard in browser |
|
|
148
152
|
|
|
149
153
|
Supported filter values:
|
|
150
154
|
|
|
@@ -175,6 +179,9 @@ tracecli pentest list --limit 50
|
|
|
175
179
|
# JSON output for scripting
|
|
176
180
|
tracecli pentest list --output json | jq '.[].title'
|
|
177
181
|
|
|
182
|
+
# Open pentests dashboard in browser
|
|
183
|
+
tracecli pentest list --web
|
|
184
|
+
|
|
178
185
|
# List findings for a pentest
|
|
179
186
|
tracecli pentest findings list --pentest PT-3
|
|
180
187
|
|
|
@@ -183,6 +190,9 @@ tracecli pentest findings list --pentest PT-3 --output json
|
|
|
183
190
|
|
|
184
191
|
# Findings as TSV
|
|
185
192
|
tracecli pentest findings list --pentest PT-3 --output tsv | cut -f1,4
|
|
193
|
+
|
|
194
|
+
# Open pentests dashboard in browser
|
|
195
|
+
tracecli pentest findings list --pentest PT-3 --web
|
|
186
196
|
```
|
|
187
197
|
|
|
188
198
|
Flags for `pentest list`:
|
|
@@ -191,6 +201,7 @@ Flags for `pentest list`:
|
|
|
191
201
|
|------|-----------|-------------|
|
|
192
202
|
| `--limit <n>` | `-L` | Max results (default: 30, max: 100) |
|
|
193
203
|
| `--output <format>` | `-o` | Output format: `table` (default), `json`, `tsv` |
|
|
204
|
+
| `--web` | `-w` | Open pentests dashboard in browser |
|
|
194
205
|
|
|
195
206
|
Flags for `pentest findings list`:
|
|
196
207
|
|
|
@@ -198,6 +209,7 @@ Flags for `pentest findings list`:
|
|
|
198
209
|
|------|-----------|-------------|
|
|
199
210
|
| `--pentest <id>` | | Pentest display ID (e.g. `PT-3`) or UUID (required) |
|
|
200
211
|
| `--output <format>` | `-o` | Output format: `table` (default), `json`, `tsv` |
|
|
212
|
+
| `--web` | `-w` | Open pentests dashboard in browser |
|
|
201
213
|
|
|
202
214
|
### Upgrades
|
|
203
215
|
|
package/dist/index.js
CHANGED
|
@@ -26831,7 +26831,7 @@ function buildAuthStatusInfo(token, refreshToken, selectedOrganizationId) {
|
|
|
26831
26831
|
}
|
|
26832
26832
|
}
|
|
26833
26833
|
function createStatusCommand() {
|
|
26834
|
-
return new Command("status").description("Show current authentication status").option("-o, --output <format>", "Output format: table
|
|
26834
|
+
return new Command("status").description("Show current authentication status").option("-o, --output <format>", "Output format: table, json, tsv (default: table)", "table").addHelpText(
|
|
26835
26835
|
"after",
|
|
26836
26836
|
`
|
|
26837
26837
|
Examples:
|
|
@@ -26897,7 +26897,7 @@ Examples:
|
|
|
26897
26897
|
});
|
|
26898
26898
|
}
|
|
26899
26899
|
function createOrgListCommand() {
|
|
26900
|
-
return new Command("list").description("List organizations available to your account").option("-o, --output <format>", "Output format: table
|
|
26900
|
+
return new Command("list").description("List organizations available to your account").option("-o, --output <format>", "Output format: table, json, tsv (default: table)", "table").option("-L, --limit <n>", "Max organizations to display (default: all)", (v) => {
|
|
26901
26901
|
const n = Number.parseInt(v, 10);
|
|
26902
26902
|
if (Number.isNaN(n) || n < 1) {
|
|
26903
26903
|
throw new Error("--limit must be a positive integer");
|
|
@@ -26977,7 +26977,7 @@ Examples:
|
|
|
26977
26977
|
});
|
|
26978
26978
|
}
|
|
26979
26979
|
function createOrgCurrentCommand() {
|
|
26980
|
-
return new Command("current").description("Show the active organization used by CLI commands").option("-o, --output <format>", "Output format: table
|
|
26980
|
+
return new Command("current").description("Show the active organization used by CLI commands").option("-o, --output <format>", "Output format: table, json, tsv (default: table)", "table").option("-w, --web", "Open the organization settings in a browser").addHelpText(
|
|
26981
26981
|
"after",
|
|
26982
26982
|
`
|
|
26983
26983
|
Examples:
|
|
@@ -27598,7 +27598,7 @@ function createListCommand() {
|
|
|
27598
27598
|
}
|
|
27599
27599
|
return Math.min(n, MAX_LIMIT);
|
|
27600
27600
|
}
|
|
27601
|
-
).option("-o, --output <format>", "Output format: table, json, tsv (default: table)", "table").addHelpText(
|
|
27601
|
+
).option("-o, --output <format>", "Output format: table, json, tsv (default: table)", "table").option("-w, --web", "Open the pentests dashboard in a browser").addHelpText(
|
|
27602
27602
|
"after",
|
|
27603
27603
|
`
|
|
27604
27604
|
Examples:
|
|
@@ -27606,8 +27606,18 @@ Examples:
|
|
|
27606
27606
|
tracecli pentest list --status IN_PROGRESS
|
|
27607
27607
|
tracecli pentest list --limit 10
|
|
27608
27608
|
tracecli pentest list --output json | jq '.[].title'
|
|
27609
|
-
tracecli pentest list --output tsv | cut -f1,2
|
|
27609
|
+
tracecli pentest list --output tsv | cut -f1,2
|
|
27610
|
+
tracecli pentest list --web`
|
|
27610
27611
|
).action(async (options) => {
|
|
27612
|
+
if (options.web) {
|
|
27613
|
+
const slug = await resolveOrganizationSlug();
|
|
27614
|
+
const url2 = `${getAppBaseUrl()}/dashboard/${slug}/pentests`;
|
|
27615
|
+
const opened = await openBrowser(url2);
|
|
27616
|
+
if (!opened) {
|
|
27617
|
+
console.log(`Open in browser: ${url2}`);
|
|
27618
|
+
}
|
|
27619
|
+
return;
|
|
27620
|
+
}
|
|
27611
27621
|
const organizationId = await resolveOrganizationId();
|
|
27612
27622
|
const result = await authenticatedRequest(
|
|
27613
27623
|
(client) => client.pentest.listPentests({
|
|
@@ -27695,7 +27705,7 @@ function createFindingsListCommand() {
|
|
|
27695
27705
|
}
|
|
27696
27706
|
return Math.min(n, MAX_LIMIT);
|
|
27697
27707
|
}
|
|
27698
|
-
).option("-o, --output <format>", "Output format: table, json, tsv (default: table)", "table").addHelpText(
|
|
27708
|
+
).option("-o, --output <format>", "Output format: table, json, tsv (default: table)", "table").option("-w, --web", "Open the pentests dashboard in a browser").addHelpText(
|
|
27699
27709
|
"after",
|
|
27700
27710
|
`
|
|
27701
27711
|
Examples:
|
|
@@ -27703,9 +27713,19 @@ Examples:
|
|
|
27703
27713
|
tracecli pentest findings list --pentest PT-3 --severity CRITICAL
|
|
27704
27714
|
tracecli pentest findings list --pentest PT-3 --status OPEN --limit 20
|
|
27705
27715
|
tracecli pentest findings list --pentest PT-3 --output json
|
|
27706
|
-
tracecli pentest findings list --pentest PT-3 --output tsv | cut -f1,4
|
|
27716
|
+
tracecli pentest findings list --pentest PT-3 --output tsv | cut -f1,4
|
|
27717
|
+
tracecli pentest findings list --pentest PT-3 --web`
|
|
27707
27718
|
).action(
|
|
27708
27719
|
async (options) => {
|
|
27720
|
+
if (options.web) {
|
|
27721
|
+
const slug = await resolveOrganizationSlug();
|
|
27722
|
+
const url2 = `${getAppBaseUrl()}/dashboard/${slug}/pentests`;
|
|
27723
|
+
const opened = await openBrowser(url2);
|
|
27724
|
+
if (!opened) {
|
|
27725
|
+
console.log(`Open in browser: ${url2}`);
|
|
27726
|
+
}
|
|
27727
|
+
return;
|
|
27728
|
+
}
|
|
27709
27729
|
const organizationId = await resolveOrganizationId();
|
|
27710
27730
|
const pentestId = await resolvePentestId(organizationId, options.pentest);
|
|
27711
27731
|
const result = await authenticatedRequest(
|
|
@@ -29078,7 +29098,7 @@ function createListCommand3() {
|
|
|
29078
29098
|
}
|
|
29079
29099
|
return Math.min(n, MAX_LIMIT3);
|
|
29080
29100
|
}
|
|
29081
|
-
).option("-o, --output <format>", "Output format: table, json, tsv (default: table)", "table").addHelpText(
|
|
29101
|
+
).option("-o, --output <format>", "Output format: table, json, tsv (default: table)", "table").option("-w, --web", "Open the vulnerabilities dashboard in a browser").addHelpText(
|
|
29082
29102
|
"after",
|
|
29083
29103
|
`
|
|
29084
29104
|
Examples:
|
|
@@ -29086,9 +29106,19 @@ Examples:
|
|
|
29086
29106
|
tracecli vulnerabilities list --severity CRITICAL --status OPEN
|
|
29087
29107
|
tracecli vulnerabilities list --repo securewithtrace/trace --limit 50
|
|
29088
29108
|
tracecli vulnerabilities list --output json | jq '.[].title'
|
|
29089
|
-
tracecli vulnerabilities list --output tsv | cut -f1,7
|
|
29109
|
+
tracecli vulnerabilities list --output tsv | cut -f1,7
|
|
29110
|
+
tracecli vulnerabilities list --web`
|
|
29090
29111
|
).action(
|
|
29091
29112
|
async (options) => {
|
|
29113
|
+
if (options.web) {
|
|
29114
|
+
const slug = await resolveOrganizationSlug();
|
|
29115
|
+
const url2 = `${getAppBaseUrl()}/dashboard/${slug}/vulnerabilities`;
|
|
29116
|
+
const opened = await openBrowser(url2);
|
|
29117
|
+
if (!opened) {
|
|
29118
|
+
console.log(`Open in browser: ${url2}`);
|
|
29119
|
+
}
|
|
29120
|
+
return;
|
|
29121
|
+
}
|
|
29092
29122
|
const organizationId = await resolveOrganizationId();
|
|
29093
29123
|
const conditions = [];
|
|
29094
29124
|
if (options.repo) {
|