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.
You'll need a IBM Cloud account, Git, Cloud Foundry CLI, and Node installed.
Clone the git repo:
git clone https://github.com/IBM/VulnerabilityAdvisorDashboard.git
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'
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, go to the top directory with app.js and run the node command:
node app.js