Skip to content

IBM/VulnerabilityAdvisorDashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vulnerability Advisor Dashboard

This application is a sample dashboard for retrieving and using information from the IBM Cloud Vulnerability Advisor APIs.

The app is built with Node.js and the Express Framework.

Before you begin

You'll need a IBM Cloud account, Git, Cloud Foundry CLI, and Node installed.

Instructions

Get the Code

Clone the git repo:
git clone https://github.com/IBM/VulnerabilityAdvisorDashboard.git

Setup Authentication to IBM Cloud

Retrieve your oauth token from your IBM Cloud Account:
ibmcloud login

When you login and select a region, your account ID will be printed out.
Targeted region us-south

API endpoint: https://cloud.ibm.com
Region: us-south
User: test@us.ibm.com
Account: Test's Account (6cb76556cb76556cb7655)
Resource group: default
CF API endpoint:
Org:
Space:

Set the variable icr_account in routes/index.js to this ID: const icr_account = '6cb76556cb76556cb7655'

Now get the oauth-tokens associated for this account:
ibmcloud iam oauth-tokens

Copy the token starting with "Bearer"
$ ibmcloud iam oauth-tokens IAM token: Bearer eyJraWQieyJraWQieyJraWQieyJraWQieyJraWQieyJraWQieyJraWQieyJraWQieyJraWQi

In the routes/index.js file update the "auth_token" variable with the token from the previous command:
const auth_token ='Bearer eyJraWQieyJraWQieyJraWQieyJraWQieyJraWQieyJraWQieyJraWQieyJraWQieyJraWQi'

Load Containers into the Registry

This application is most useful if you have container(s) in the registry, however they can be added after the fact as well. If you want to push containers ahead of time you can do so as follows:

Login to the container registry:
ibmcloud cr login

Create a namespace for the container (optional):
ibmcloud cr namespace-add vadashboard

Tag and push a container to the registry:
docker tag dockerdemo:test1 us.icr.io/vadashboard/dockerdemo:test1 docker push us.icr.io/vadashboard/dockerdemo:test1

Run the App

Run the app, go to the top directory with app.js and run the node command:
node app.js

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published