Logo

dev-resources.site

for different kinds of informations.

VMClarity: How to use the API

Published at
4/24/2023
Categories
sbom
opensource
api
Author
shmcfarl
Categories
3 categories in total
sbom
open
opensource
open
api
open
Author
8 person written this
shmcfarl
open
VMClarity: How to use the API

If you are just now joining us on our multi-post series on the VMClarity open source project, check out these other posts to catch up:


The VMClarity API

VMClarity uses the OpenAPI spec; you can look at it here: https://github.com/openclarity/vmclarity/blob/main/api/openapi.yaml.

You can interact with the API via the following methods:

  • VMClarity UI - See the blogs referenced above to understand how to interact with the UI)
  • curl commands - See the video and commands referenced below
  • API tools such as Postman - See the video below

Once you have VMClarity up and running, check out this video to learn more about interacting with the VMClarity API:


Here are some of the commands that I referenced in the video:
SSH tunnel into the VMClarity Server instance (EC2):

ssh -i <your PEM> -N -L 8888:localhost:8888 ubuntu@<VMClarity public IP address>
Enter fullscreen mode Exit fullscreen mode

curl against the VMClarity API to get the scan configurations:

curl -s -X GET http://localhost:8888/api/scanConfigs -H 'Content-Type: application/json' | json_pp
Enter fullscreen mode Exit fullscreen mode

curl to get a list of scan targets (EC2 assets found based on the scan scope in the scan configuration):

curl -s -X GET http://localhost:8888/api/targets -H 'Content-Type: application/json' | json_pp
Enter fullscreen mode Exit fullscreen mode

curl to get the scan results. Note: This is going to generate a LOT of output. It is best to view this information in the UI:

curl -s -X GET http://localhost:8888/api/scanResults -H 'Content-Type: application/json' | json_pp
Enter fullscreen mode Exit fullscreen mode

Learn More & Join the Community!

Learn more about VMClarity and join the community! https://github.com/openclarity/vmclarity

I will be back with more posts on understanding how VMClarity works, and how you can contribute to it!

You can also learn more about the other Clarity projects, such as (API security) and KubeClarity (K8s SBOM/Supply chain security) here:

And several blogs about both projects are here:
https://techblog.cisco.com/


Shannon McFarland is a Distinguished Engineer and open source advocate in Ciscoโ€™s Emerging Technology & Incubation organization. You can follow him on Twitter @eyepv6.

sbom Article's
30 articles in total
Favicon
Do You Need an SBOM?
Favicon
SBOM, Libs e Components
Favicon
Creating SBOMs with the Snyk CLI
Favicon
FOSDEM 2024 - Summary and Reflections
Favicon
Software Supply Chain Awareness at Scale
Favicon
DruBOM: An SBOM for Drupal
Favicon
Software Bill of Materials (SBOM) and Flutter Apps
Favicon
Flutter Takes a Leap Towards Enhanced Security with SLSA Compliance
Favicon
Convert with CycloneDX
Favicon
Generate SBOM
Favicon
SBOM - Software Bill of Materials
Favicon
Securing the Software Supply Chain: The Struggle Is (Still) Real ย 
Favicon
VMClarity: How to use the API
Favicon
VMClarity: What Happens During a Scan?
Favicon
VMClarity: Virtual Machine Security
Favicon
SBOM: understanding the facts and dispelling theย myths
Favicon
EO 14028: What you need to know about the new cybersecurity standards for software suppliers
Favicon
SBOM Explained: ๐Ÿ“š An Enterprise Guide to Security Risk Management
Favicon
Create SPDX with Yocto
Favicon
Outreachy: Experience with Adoptium
Favicon
Outreachy: Everyone Struggles
Favicon
A Step-by-step Guide to the SBOM Executive Order
Favicon
Deeper dive into SBOM
Favicon
Outreachy: Introducing myself with Eclipse Adoptium
Favicon
SBOM with Checkov
Favicon
SBOM with Anchore
Favicon
How to Automate the Software Bill of Materials (SBOM)
Favicon
SBOM with FOSSology
Favicon
SBOM with VulnerableCode.io
Favicon
What is SBOM

Featured ones: