Skip to content

Commit a8ffc29

Browse files
committed
Drop the license stuff for now
1 parent d73543f commit a8ffc29

File tree

7 files changed

+86
-262
lines changed

7 files changed

+86
-262
lines changed

src/commands/organization/cmd-organization-policy-license.test.ts

Lines changed: 0 additions & 96 deletions
This file was deleted.

src/commands/organization/cmd-organization-policy-license.ts

Lines changed: 0 additions & 87 deletions
This file was deleted.

src/commands/organization/cmd-organization-policy.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { cmdOrganizationPolicyLicense } from './cmd-organization-policy-license'
21
import { cmdOrganizationPolicyPolicy } from './cmd-organization-policy-security'
32
import { meowWithSubcommands } from '../../utils/meow-with-subcommands'
43

@@ -16,7 +15,6 @@ export const cmdOrganizationPolicy: CliSubcommand = {
1615
async run(argv, importMeta, { parentName }) {
1716
await meowWithSubcommands(
1817
{
19-
license: cmdOrganizationPolicyLicense,
2018
security: cmdOrganizationPolicyPolicy
2119
},
2220
{

src/commands/scan/cmd-scan-report.test.ts

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ describe('socket scan report', async () => {
2525
--fold Fold reported alerts to some degree
2626
--help Print this help.
2727
--json Output result as json
28-
--license Report the license policy status. Default: true
2928
--markdown Output result as markdown
3029
--reportLevel Which policy level alerts should be reported
3130
--security Report the security policy status. Default: true
@@ -35,10 +34,7 @@ describe('socket scan report', async () => {
3534
Note: By default it reports both so by default it consumes 3 quota units.
3635
3736
Your API token will need the \`full-scans:list\` scope regardless. Additionally
38-
it needs \`security-policy:read\` to report on the security policy and it needs
39-
the \`license-policy:read\` scope to report on the license policy.
40-
41-
(Use \`--no-security\` or \`--no-license\` to omit one)
37+
it needs \`security-policy:read\` to report on the security policy.
4238
4339
By default the result is a nested object that looks like this:
4440
\`{[ecosystem]: {[pkgName]: {[version]: {[file]: {[type:loc]: policy}}}}\`
@@ -72,22 +68,20 @@ describe('socket scan report', async () => {
7268
const { code, stderr, stdout } = await invokeNpm(entryPath, cmd)
7369
expect(stdout).toMatchInlineSnapshot(`""`)
7470
expect(`\n ${stderr}`).toMatchInlineSnapshot(`
75-
"
76-
_____ _ _ /---------------
77-
| __|___ ___| |_ ___| |_ | Socket.dev CLI ver <redacted>
78-
|__ | . | _| '_| -_| _| | Node: <redacted>, API token set: <redacted>
79-
|_____|___|___|_,_|___|_|.dev | Command: \`socket scan report\`, cwd: <redacted>
80-
81-
\\x1b[31m\\xd7\\x1b[39m \\x1b[41m\\x1b[37mInput error\\x1b[39m\\x1b[49m: Please provide the required fields:
71+
"
72+
_____ _ _ /---------------
73+
| __|___ ___| |_ ___| |_ | Socket.dev CLI ver <redacted>
74+
|__ | . | _| '_| -_| _| | Node: <redacted>, API token set: <redacted>
75+
|_____|___|___|_,_|___|_|.dev | Command: \`socket scan report\`, cwd: <redacted>
8276
83-
- Org name as the first argument \\x1b[31m(missing!)\\x1b[39m
77+
\\x1b[31m\\xd7\\x1b[39m \\x1b[41m\\x1b[37mInput error\\x1b[39m\\x1b[49m: Please provide the required fields:
8478
85-
- Full Scan ID to fetch as second argument \\x1b[31m(missing!)\\x1b[39m
79+
- Org name as the first argument \\x1b[31m(missing!)\\x1b[39m
8680
87-
- Not both the --json and --markdown flags \\x1b[32m(ok)\\x1b[39m
81+
- Full Scan ID to fetch as second argument \\x1b[31m(missing!)\\x1b[39m
8882
89-
- At least one policy to report \\x1b[32m(ok)\\x1b[39m"
90-
`)
83+
- Not both the --json and --markdown flags \\x1b[32m(ok)\\x1b[39m"
84+
`)
9185

9286
expect(code, 'dry-run should exit with code 2 if missing input').toBe(2)
9387
}

src/commands/scan/cmd-scan-report.ts

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ const config: CliCommandConfig = {
3434
default: 'warn',
3535
description: 'Which policy level alerts should be reported'
3636
},
37-
license: {
38-
type: 'boolean',
39-
default: true,
40-
description: 'Report the license policy status. Default: true'
41-
},
37+
// license: {
38+
// type: 'boolean',
39+
// default: true,
40+
// description: 'Report the license policy status. Default: true'
41+
// },
4242
security: {
4343
type: 'boolean',
4444
default: true,
@@ -57,10 +57,7 @@ const config: CliCommandConfig = {
5757
Note: By default it reports both so by default it consumes 3 quota units.
5858
5959
Your API token will need the \`full-scans:list\` scope regardless. Additionally
60-
it needs \`security-policy:read\` to report on the security policy and it needs
61-
the \`license-policy:read\` scope to report on the license policy.
62-
63-
(Use \`--no-security\` or \`--no-license\` to omit one)
60+
it needs \`security-policy:read\` to report on the security policy.
6461
6562
By default the result is a nested object that looks like this:
6663
\`{[ecosystem]: {[pkgName]: {[version]: {[file]: {[type:loc]: policy}}}}\`
@@ -95,7 +92,7 @@ async function run(
9592
const {
9693
fold = 'none',
9794
json,
98-
license,
95+
// license,
9996
markdown,
10097
reportLevel = 'warn',
10198
security
@@ -106,8 +103,8 @@ async function run(
106103
if (
107104
!orgSlug ||
108105
!fullScanId ||
109-
(json && markdown) ||
110-
(!license && !security)
106+
// (!license && !security) ||
107+
(json && markdown)
111108
) {
112109
// Use exit status of 2 to indicate incorrect usage, generally invalid
113110
// options or missing arguments.
@@ -122,9 +119,8 @@ async function run(
122119
- Full Scan ID to fetch as second argument ${!fullScanId ? colors.red('(missing!)') : colors.green('(ok)')}
123120
124121
- Not both the --json and --markdown flags ${json && markdown ? colors.red('(pick one!)') : colors.green('(ok)')}
125-
126-
- At least one policy to report ${!license && !security ? colors.red('(do not omit both!)') : colors.green('(ok)')}
127122
`
123+
// - At least one policy to report ${!license && !security ? colors.red('(do not omit both!)') : colors.green('(ok)')}
128124
)
129125
return
130126
}
@@ -137,7 +133,7 @@ async function run(
137133
await reportFullScan({
138134
orgSlug,
139135
fullScanId,
140-
includeLicensePolicy: !!license,
136+
includeLicensePolicy: false, // !!license,
141137
includeSecurityPolicy: !!security,
142138
outputKind: json ? 'json' : markdown ? 'markdown' : 'text',
143139
filePath: file,

0 commit comments

Comments
 (0)