@@ -25,6 +25,14 @@ let stackAnalysis = await exhort.stackAnalysis('/path/to/pom.xml')
2525let stackAnalysisHtml = await exhort .stackAnalysis (' /path/to/pom.xml' , true )
2626// Get component analysis in JSON format
2727let componentAnalysis = await exhort .componentAnalysis (' /path/to/pom.xml' )
28+ // Get image analysis in JSON format
29+ let imageAnalysis = await exhort .imageAnalysis ([' docker.io/library/node:18' ])
30+ // Get image analysis in HTML format (string)
31+ let imageAnalysisHtml = await exhort .imageAnalysis ([' docker.io/library/node:18' ], true )
32+ // Analyze multiple images
33+ let multipleImagesAnalysis = await exhort .imageAnalysis ([' docker.io/library/node:18' , ' docker.io/library/python:3.9' ])
34+ // Specify architecture using ^^ notation (e.g., httpd:2.4.49^^amd64)
35+ let imageAnalysisWithArch = await exhort .imageAnalysis ([' httpd:2.4.49^^amd64' ])
2836```
2937</li >
3038</ul >
@@ -68,11 +76,12 @@ Use as CLI Script
6876``` shell
6977$ npx @trustify-da/trustify-da-javascript-client help
7078
71- Usage: trustify-da-javascript-client {component| stack}
79+ Usage: trustify-da-javascript-client {component| stack| image | validate-token }
7280
7381Commands:
7482 trustify-da-javascript-client stack < /path/to/manifest> [--html| --summary] produce stack report for manifest path
7583 trustify-da-javascript-client component < path/to/manifest> [--summary] produce component report for a manifest type and content
84+ trustify-da-javascript-client image < image-refs..> [--html| --summary] produce image analysis report for OCI image references
7685
7786Options:
7887 --help Show help [boolean]
@@ -91,6 +100,22 @@ $ npx @trustify-da/trustify-da-javascript-client stack /path/to/pom.xml --html
91100
92101# get component analysis
93102$ npx @trustify-da/trustify-da-javascript-client component /path/to/pom.xml
103+
104+ # get image analysis in json format
105+ $ npx @trustify-da/trustify-da-javascript-client image docker.io/library/node:18
106+
107+ # get image analysis in json format (summary only)
108+ # Note: summary returns an object with imageRef as key
109+ $ npx @trustify-da/trustify-da-javascript-client image docker.io/library/node:18 --summary
110+
111+ # get image analysis in html format
112+ $ npx @trustify-da/trustify-da-javascript-client image docker.io/library/node:18 --html
113+
114+ # analyze multiple images
115+ $ npx @trustify-da/trustify-da-javascript-client image docker.io/library/node:18 docker.io/library/python:3.9
116+
117+ # specify architecture using ^^ notation (e.g., httpd:2.4.49^^amd64)
118+ $ npx @trustify-da/trustify-da-javascript-client image httpd:2.4.49^^amd64
94119```
95120</li >
96121
@@ -113,6 +138,22 @@ $ trustify-da-javascript-client stack /path/to/pom.xml --html
113138
114139# get component analysis
115140$ trustify-da-javascript-client component /path/to/pom.xml
141+
142+ # get image analysis in json format
143+ $ trustify-da-javascript-client image docker.io/library/node:18
144+
145+ # get image analysis in json format (summary only)
146+ # Note: summary returns an object with imageRef as key
147+ $ trustify-da-javascript-client image docker.io/library/node:18 --summary
148+
149+ # get image analysis in html format
150+ $ trustify-da-javascript-client image docker.io/library/node:18 --html
151+
152+ # analyze multiple images
153+ $ trustify-da-javascript-client image docker.io/library/node:18 docker.io/library/python:3.9
154+
155+ # specify architecture using ^^ notation (e.g., httpd:2.4.49^^amd64)
156+ $ trustify-da-javascript-client image httpd:2.4.49^^amd64
116157```
117158</li >
118159</ul >
@@ -288,6 +329,13 @@ let stackAnalysisHtml = await exhort.stackAnalysis('/path/to/pom.xml', true, opt
288329
289330// Get component analysis in JSON format
290331let componentAnalysis = await exhort .componentAnalysis (' /path/to/pom.xml' , options)
332+
333+ // Get image analysis in JSON format
334+ let imageAnalysis = await exhort .imageAnalysis ([' docker.io/library/node:18' ], false , options)
335+ // Get image analysis in HTML format in string
336+ let imageAnalysisHtml = await exhort .imageAnalysis ([' docker.io/library/node:18' ], true , options)
337+ // Specify architecture using ^^ notation (e.g., httpd:2.4.49^^amd64)
338+ let imageAnalysisWithArch = await exhort .imageAnalysis ([' httpd:2.4.49^^amd64' ], false , options)
291339```
292340 ** _ Environment variables takes precedence._ **
293341</p >
0 commit comments