Skip to content

Commit 1e5de28

Browse files
committed
Cleanup readme and commands
1 parent cc79dba commit 1e5de28

File tree

3 files changed

+16
-45
lines changed

3 files changed

+16
-45
lines changed

README.md

Lines changed: 11 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -34,43 +34,21 @@ socket --help
3434

3535
All aliases support the flags and arguments of the commands they alias.
3636

37-
- `socket ci` - alias for `socket report create --view --strict` which creates a
38-
report for the current directory and quits with an exit code if the result is unhealthy.
37+
- `socket ci` - alias for `socket scan create --report` which creates a report for the current directory and quits with an exit code if the result is unhealthy.
3938

4039
## Flags
4140

42-
### Command specific flags
43-
44-
- `--view` - when set on `socket report create` the command will immediately do
45-
a `socket report view` style view of the created report, waiting for the
46-
server to complete it
47-
4841
### Output flags
4942

50-
- `--json` - Outputs result as JSON which you can then pipe into
51-
[`jq`](https://stedolan.github.io/jq/) and other tools.
52-
- `--markdown` - Outputs result as Markdown which you can then copy into an
53-
issue, PR, or chat.
54-
55-
## Strictness flags
56-
57-
- `--all` - by default only `high` and `critical` issues are included, by
58-
setting this flag all issues will be included
59-
- `--strict` - when set, exits with an error code if report result is deemed
60-
unhealthy
43+
- `--json` - Outputs result as JSON which can be piped into [`jq`](https://stedolan.github.io/jq/) and other tools.
44+
- `--markdown` - Outputs result as Markdown which can be copied into issues, pull requests, or chats.
6145

6246
### Other flags
6347

64-
- `--dry-run` - like all CLI tools that perform an action should have, we have a
65-
dry run flag. Eg. `socket report create` supports running the command without
66-
actually uploading anything
67-
- `--debug` - outputs additional debug output. Great for debugging, geeks and us
68-
who develop. Hopefully you will never _need_ it, but it can still be fun,
69-
right?
70-
- `--help` - prints the help for the current command. All CLI tools should have
71-
this flag
72-
- `--version` - prints the version of the tool. All CLI tools should have this
73-
flag
48+
- `--dry-run` - Run a command without uploading anything.
49+
- `--debug` - Output additional debug.
50+
- `--help` - Prints the help for a command.
51+
- `--version` - Prints the Socket CLI version.
7452

7553
## Configuration files
7654

@@ -106,13 +84,10 @@ To run dev locally you can run these steps
10684

10785
```
10886
npm install
109-
npm run build:dist
87+
npm run build
11088
npm exec socket
11189
```
11290

113-
That should invoke it from local sources. If you make changes you run
114-
`build:dist` again.
115-
11691
### Environment variables for development
11792

11893
- `DEBUG` - Enable debug logging based on the [`debug`](https://socket.dev/npm/package/debug) package.
@@ -127,12 +102,12 @@ That should invoke it from local sources. If you make changes you run
127102

128103
## Similar projects
129104

130-
- [`@socketsecurity/sdk`](https://github.com/SocketDev/socket-sdk-js) - The SDK used by Socket CLI
105+
- [`@socketsecurity/sdk`](https://github.com/SocketDev/socket-sdk-js) - The SDK used by Socket CLI.
131106

132107
## See also
133108

134109
- [Announcement blog post](https://socket.dev/blog/announcing-socket-cli-preview)
135-
- [Socket API Reference](https://docs.socket.dev/reference) - The API used by Socket CLI
136-
- [Socket GitHub App](https://github.com/apps/socket-security) - The plug-and-play GitHub App
110+
- [Socket API Reference](https://docs.socket.dev/reference) - The API used by Socket CLI.
111+
- [Socket GitHub App](https://github.com/apps/socket-security) - The plug-and-play GitHub App.
137112

138113
[Socket.dev]: https://socket.dev/

src/commands/ci/cmd-ci.mts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ const config: CliCommandConfig = {
1919
...commonFlags,
2020
autoManifest: {
2121
type: 'boolean',
22-
default: false, // dev tools is not likely to be set up so this is safer
22+
// Dev tools in CI environments are not likely to be set up, so this is safer.
23+
default: false,
2324
description:
2425
'Auto generate manifest files where detected? See autoManifest flag in `socket scan create`',
2526
},
@@ -32,10 +33,9 @@ const config: CliCommandConfig = {
3233
${getFlagListOutput(config.flags)}
3334
3435
This command is intended to use in CI runs to allow automated systems to
35-
accept or reject a current build. When the scan does not pass your security
36-
policy, the exit code will be non-zero.
37-
38-
It will use the default org for the Socket API token.
36+
accept or reject a current build. It will use the default org of the
37+
Socket API token. The exit code will be non-zero when the scan does not pass
38+
your security policy.
3939
4040
The --autoManifest flag does the same as the one from \`socket scan create\`
4141
but is not enabled by default since the CI is less likely to be set up with

src/commands/ci/handle-ci.mts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ import { serializeResultJson } from '../../utils/serialize-result-json.mts'
77
import { handleCreateNewScan } from '../scan/handle-create-new-scan.mts'
88

99
export async function handleCi(autoManifest: boolean): Promise<void> {
10-
// ci: {
11-
// description: 'Alias for "report create --view --strict"',
12-
// argv: ['report', 'create', '--view', '--strict']
13-
// }
1410
const orgSlugCResult = await getDefaultOrgSlug()
1511
if (!orgSlugCResult.ok) {
1612
process.exitCode = orgSlugCResult.code ?? 1

0 commit comments

Comments
 (0)