Skip to content

Commit 495ac79

Browse files
committed
Make cdxgen doc reference a hyperlink
1 parent b3db6ca commit 495ac79

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/commands/cdxgen/cmd-cdxgen.mts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// import { meowOrExit } from '../../utils/meow-with-subcommands.mts'
1+
import terminalLink from 'terminal-link'
22
import yargsParse from 'yargs-parser'
33

44
import { logger } from '@socketsecurity/registry/lib/logger'
@@ -276,7 +276,10 @@ async function run(
276276
yargv.lifecycle = 'pre-build'
277277
yargv['install-deps'] = false
278278
logger.info(
279-
`Socket set cdxgen --lifecycle to "${yargv.lifecycle}" to avoid arbitrary code execution on this scan.\n Pass "--lifecycle build" to generate a BOM consisting of information obtained during the build process.`
279+
`Socket set cdxgen --lifecycle to "${yargv.lifecycle}" to avoid arbitrary code execution on this scan.\n Pass "--lifecycle build" to generate a BOM consisting of information obtained during the build process.\n See cdxgen ${terminalLink(
280+
'BOM lifecycles documentation',
281+
'https://cyclonedx.github.io/cdxgen/#/ADVANCED?id=bom-lifecycles'
282+
)} for more details.`
280283
)
281284
}
282285

src/commands/cdxgen/cmd-cdxgen.test.mts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ describe('socket cdxgen', async () => {
1818
})
1919
expect(stdout).toMatchInlineSnapshot(
2020
`
21-
"cdxgen [command]
21+
"\\x1b[34mi\\x1b[39m Socket set cdxgen --lifecycle to "pre-build" to avoid arbitrary code execution on this scan.
22+
Pass "--lifecycle build" to generate a BOM consisting of information obtained during the build process.
23+
See cdxgen BOM lifecycles documentation (\\u200bhttps://cyclonedx.github.io/cdxgen/#/ADVANCED?id=bom-lifecycles\\u200b) for more details.
24+
cdxgen [command]
2225
2326
Commands:
2427
cdxgen completion Generate bash/zsh completion

0 commit comments

Comments
 (0)