GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — nodejs-containeranalysis/samples at master · daniel-sanche/nodejs-containeranalysis

Expand file tree

/

samples

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
 
 
/

samples

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
test
test
 
 
.eslintrc.yml
.eslintrc.yml
 
 
README.md
README.md
 
 
createNote.js
createNote.js
 
 
createOccurrence.js
createOccurrence.js
 
 
deleteNote.js
deleteNote.js
 
 
deleteOccurrence.js
deleteOccurrence.js
 
 
getDiscoveryInfo.js
getDiscoveryInfo.js
 
 
getNote.js
getNote.js
 
 
getOccurrence.js
getOccurrence.js
 
 
highVulnerabilitiesForImage.js
highVulnerabilitiesForImage.js
 
 
occurrencePubSub.js
occurrencePubSub.js
 
 
occurrencesForImage.js
occurrencesForImage.js
 
 
occurrencesForNote.js
occurrencesForNote.js
 
 
package.json
package.json
 
 
pollDiscoveryOccurrenceFinished.js
pollDiscoveryOccurrenceFinished.js
 
 
quickstart.js
quickstart.js
 
 
vulnerabilityOccurrencesForImage.js
vulnerabilityOccurrencesForImage.js
 
 

README.md

Outline

Google Cloud Platform logo

Google Container Analysis: Node.js Samples

Open in Cloud Shell

Table of Contents

  • Before you begin
  • Samples
    • Create Note
    • Create Occurrence
    • Delete Note
    • Delete Occurrence
    • Get Discovery Info
    • Get Note
    • Get Occurrence
    • Get High Vulnerabilities for Image
    • Occurrence PubSub
    • Occurrences for Image
    • Occurrences for Note
    • Poll Discovery Occurrence Finished
    • Quickstart
    • Vulnerability Occurrences for Image

Before you begin

Before running the samples, make sure you've followed the steps outlined in Using the client library.

Samples

Create Note

Creates a Note with specified ID

View the source code.

Open in Cloud Shell

Usage:

node createNote.js "project-id" "note-id"


Create Occurrence

Creates an Occurrence of a Note and attaches it as a metadata to an image

View the source code.

Open in Cloud Shell

Usage:

node createOccurrence.js "note-project-id" "note-id" "occurrence-project-id" "image url"


Delete Note

Deletes a specified Note

View the source code.

Open in Cloud Shell

Usage:

node deleteNote.js "project-id" "note-id"


Delete Occurrence

Deletes a specified Occurrence

View the source code.

Open in Cloud Shell

Usage:

node deleteOccurrence.js "project-id" "occurrence-id"


Get Discovery Info

Gets all Discovery Occurrences attached to specified image

View the source code.

Open in Cloud Shell

Usage:

node getDiscoveryInfo.js "project-id" "image-url"


Get Note

Retrieves and prints a specified note

View the source code.

Open in Cloud Shell

Usage:

node getNote.js "project-id" "note-id"


Get Occurrence

Retrieves and prints a specified Occurrence

View the source code.

Open in Cloud Shell

Usage:

node getOccurrence.js "project-id" "occurrence-id"


Get High Vulnerabilities for Image

Retrieves all Vulnerability Occurrences of High Severity from Specified Image

View the source code.

Open in Cloud Shell

Usage:

node highVulnerabilitiesForImage.js "project-id" "image-url"


Occurrence PubSub

Polls a specified PubSub subscription for Occurrences. Requires a subscription to a topic named 'container-analysis-occurrences-v1beta'

View the source code.

Open in Cloud Shell

Usage:

node occurrencePubSub.js "project-id" "subscription-id" "timeout-in-seconds"


Occurrences for Image

Retrieves all Occurrences attached to the metadata of a specified image

View the source code.

Open in Cloud Shell

Usage:

node occurrencesForImage.js "project-id" "image-url"


Occurrences for Note

Retrieves all Occurrences of a specified Note

View the source code.

Open in Cloud Shell

Usage:

node occurrencesForNote.js "project-id" "note-id"


Poll Discovery Occurrence Finished

Waits for a Discovery Occurrence to reach a terminal state

View the source code.

Open in Cloud Shell

Usage:

node pollDiscoveryOccurrenceFinished.js "project-id" "image-url" "retries"


Quickstart

fetching an instance of Grafeas and creating a note.

View the source code.

Open in Cloud Shell

Usage:

node quickstart.js "project-id" "note-id"


Vulnerability Occurrences for Image

Retrieves all Vulnerability Occurrences attached to a specified image

View the source code.

Open in Cloud Shell

Usage:

node vulnerabilityOccurrencesForImage.js "project-id" "image-url"

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.