Git Product home page Git Product logo

javascript-sdk's Introduction

Smartcar JS Client SDK Build Status GitHub tag

The official Smartcar JavaScript SDK.

Overview

The Smartcar API lets you read vehicle data (location, odometer) and send commands to vehicles (lock, unlock) using HTTP requests.

To make requests to a vehicle from a web application, the end user must connect their vehicle using Smartcar Connect. The Smartcar JavaScript SDK provides an easy way to launch and handle Connect to retrieve the resulting code.

Before integrating with the JavaScript SDK, you'll need to register an application in the Smartcar dashboard. Once you have registered an application, you will have a Client ID and Client Secret, which will allow you to authorize users.

Installation

You can install the JavaScript SDK either using npm or through our CDN.

npm

npm install @smartcar/auth

Smartcar CDN

<script src="https://javascript-sdk.smartcar.com/2.8.0/sdk.js"></script>

SDK reference

For detailed documentation on parameters and available methods, please refer to the SDK reference.

Flow

The SDK manages the front-end flow of the OAuth authorization process. The steps are as follows:

  1. User clicks "Connect your car" button (or similar button) which creates a pop-up dialog with Connect.
    1. User selects the make of their vehicle.
    2. User is prompted to log in with their vehicle credentials.
    3. User is presented with a set of requested permissions to grant your application.
    4. User can either "Allow" or "Deny" your application's access to the set of permissions.
  2. Connect redirects the user to the Smartcar JavaScript SDK redirect page along with the resulting code.
  3. The redirect page sends the code to your application's window and closes the pop-up dialog.
  4. Your JavaScript front end receives the code in the onComplete function registered in the SDK constructor. This function needs to communicate with your backend to exchange the code for access and refresh tokens.
  5. Your application's back end server needs to accept the code and exchange it for an access token.

The SDK facilitates generating OAuth links, creating pop-up dialogs, and receiving authorization codes. This SDK will not assist you with exchanging authorization codes for an access token or making requests to vehicles. Please see our back-end SDKs for more information on handling the access tokens and vehicle requests.

Quick start

1. Register a JavaScript SDK redirect URI

The JavaScript SDK uses a special redirect URI to provide a simpler flow to retrieve authorization codes. The redirect URI takes the following form:

https://javascript-sdk.smartcar.com/v2/redirect?app_origin=<Your Application's Origin>

Note that the version number refers to the major version of the SDK you are using, so updating the SDK to a new major version requires updating your redirect URI in the Smartcar Dashboard accordingly.

The app_origin should be the location at which your website is located. The origin consists of the protocol and the host of your site only, without the resource path.

Some example origins are:

Valid:

  • https://example.com
  • https://myapp.example.com
  • http://localhost:8000

Invalid:

  • https://example.com/some/path
  • http://localhost:8000/some/path
  • http://localhost:8000?foo=bar#baz

Once you have constructed your redirect URI, make sure to register it on the Smartcar dashboard.

2. Initialize Smartcar

const smartcar = new Smartcar({
  clientId: '<your-client-id>',
  redirectUri: '<your-redirect-uri>',
  scope: ['read_vehicle_info', 'read_odometer'],
  onComplete: function(err, code) {
    if (err) {
      // handle errors from Connect (i.e. user denies access)
    }
    // handle the returned code by sending it to your back-end server
    sendToBackend(code);
  },
});

Reference: new Smartcar(options)

NOTE: See the full set of available scopes for each endpoint in the Smartcar API reference.

3. Launch Connect

Add a click handler to an HTML element:

smartcar.addClickHandler({id: '#your-button-id'});

Reference: smartcar.addClickHandler(options)

Alternatively, you can launch Connect directly:

smartcar.openDialog();

Reference: smartcar.openDialog(options)

Advanced

In addition to the flow described above, you can use the JavaScript SDK in other ways too. The following section will cover some of these cases.

Smartcar Connect URL generation

Normally the .addClickHandler() and .openDialog() methods are used to launch Connect. However, if you would like to generate the Connect URL directly, you can do so with the .getAuthUrl() method.

const url = smartcar.getAuthUrl();

Reference: smartcar.getAuthUrl(options)

Server-side redirect handling

In a traditional OAuth implementation, the redirect URI is normally set to your application's back end, rather than Smartcar's special JavaScript SDK redirect page described in the flow above. Instead of using the JavaScript SDK redirect page, you can still choose to use the traditional server-side architecture (described below). In this architecture you would receive the authorization code on a back-end route instead of the client-side onComplete callback.

To use the JavaScript SDK for this flow, do the following:

  1. Set the redirect_uri parameter in the initialization to a route on your application's back-end server:
const smartcar = new Smartcar({
  clientId: '<your-client-id>',
  redirectUri: '<your-backend-redirect-uri>',
  scope: ['read_vehicle_info', 'read_odometer'],
  onComplete: function() {},
});

Make sure to also register the URI on the Smartcar dashboard.

  1. On your redirect_uri route, you will need to accept the authorization code according to the query parameters documented in the Smartcar API reference.

For example:

https://application-backend.com/page?code=90abecb6-e7ab-4b85-864a-e1c8bf67f2ad

Or in case of an error:

https://application-backend.com/page?error=access_denied&error_description=User+denied+access+to+application.
  1. On the redirect route, you can render a page with the JavaScript SDK's redirect helper script. The script will invoke the onComplete callback and close out the Connect pop-up dialog.
<script src="https://javascript-sdk.smartcar.com/v2/redirect.js"></script>

NOTE: If the page serving the redirect script file does not have the original query parameters sent from Connect (code, state, error, error_description), then the onComplete callback will be invoked with no parameters.

javascript-sdk's People

Contributors

albertlaptu avatar allisonc07 avatar dependabot[bot] avatar esonmez avatar gurpreetatwal avatar hughyoh avatar jia-guo avatar m-oc avatar mattprivman avatar mend-bolt-for-github[bot] avatar morgannewman avatar nathanshelly avatar sankethkatta avatar

Watchers

 avatar

javascript-sdk's Issues

[DepShield] (CVSS 7.5) Vulnerability due to usage of acorn:5.7.3

Vulnerabilities

DepShield reports that this application's usage of acorn:5.7.3 results in the following vulnerability(s):


Occurrences

acorn:5.7.3 is a transitive dependency introduced by the following direct dependency(s):

jest-environment-jsdom:23.4.0
        └─ jsdom:11.12.0
              └─ acorn:5.7.3

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 9.8) Vulnerability due to usage of handlebars:4.0.12

Vulnerabilities

DepShield reports that this application's usage of handlebars:4.0.12 results in the following vulnerability(s):


Occurrences

handlebars:4.0.12 is a transitive dependency introduced by the following direct dependency(s):

jest:23.6.0
        └─ jest-cli:23.6.0
              └─ istanbul-api:1.3.7
                    └─ istanbul-reports:1.5.1
                          └─ handlebars:4.0.12

jsdoc-to-markdown:4.0.1
        └─ dmd:3.0.12
              └─ handlebars:4.0.12

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 5.3) Vulnerability due to usage of kind-of:5.1.0

Vulnerabilities

DepShield reports that this application's usage of kind-of:5.1.0 results in the following vulnerability(s):


Occurrences

kind-of:5.1.0 is a transitive dependency introduced by the following direct dependency(s):

gulp:3.9.1
        └─ liftoff:2.5.0
              └─ findup-sync:2.0.0
                    └─ micromatch:3.1.10
                          └─ snapdragon:0.8.2
                                └─ define-property:0.2.5
                                      └─ is-descriptor:0.1.6
                                            └─ kind-of:5.1.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash._isiterateecall:3.0.9

Vulnerabilities

DepShield reports that this application's usage of lodash._isiterateecall:3.0.9 results in the following vulnerability(s):


Occurrences

lodash._isiterateecall:3.0.9 is a transitive dependency introduced by the following direct dependency(s):

gulp:3.9.1
        └─ gulp-util:3.0.8
              └─ lodash.template:3.6.2
                    └─ lodash._isiterateecall:3.0.9

nightwatch:0.9.21
        └─ lodash.clone:3.0.3
              └─ lodash._isiterateecall:3.0.9
        └─ mocha-nightwatch:3.2.2
              └─ lodash.create:3.1.1
                    └─ lodash._isiterateecall:3.0.9

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash._basevalues:3.0.0

Vulnerabilities

DepShield reports that this application's usage of lodash._basevalues:3.0.0 results in the following vulnerability(s):


Occurrences

lodash._basevalues:3.0.0 is a transitive dependency introduced by the following direct dependency(s):

gulp:3.9.1
        └─ gulp-util:3.0.8
              └─ lodash.template:3.6.2
                    └─ lodash._basevalues:3.0.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 8.2) Vulnerability due to usage of http-proxy-agent:1.0.0

Vulnerabilities

DepShield reports that this application's usage of http-proxy-agent:1.0.0 results in the following vulnerability(s):


Occurrences

http-proxy-agent:1.0.0 is a transitive dependency introduced by the following direct dependency(s):

nightwatch:0.9.21
        └─ proxy-agent:2.0.0
              └─ http-proxy-agent:1.0.0
              └─ pac-proxy-agent:1.1.0
                    └─ http-proxy-agent:1.0.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash._getnative:3.9.1

Vulnerabilities

DepShield reports that this application's usage of lodash._getnative:3.9.1 results in the following vulnerability(s):


Occurrences

lodash._getnative:3.9.1 is a transitive dependency introduced by the following direct dependency(s):

gulp:3.9.1
        └─ gulp-util:3.0.8
              └─ lodash.template:3.6.2
                    └─ lodash.keys:3.1.2
                          └─ lodash._getnative:3.9.1

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash.omit:4.5.0

Vulnerabilities

DepShield reports that this application's usage of lodash.omit:4.5.0 results in the following vulnerability(s):


Occurrences

lodash.omit:4.5.0 is a transitive dependency introduced by the following direct dependency(s):

jsdoc-to-markdown:4.0.1
        └─ jsdoc-parse:3.0.1
              └─ lodash.omit:4.5.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 8.8) Vulnerability due to usage of js-yaml:3.12.0

Vulnerabilities

DepShield reports that this application's usage of js-yaml:3.12.0 results in the following vulnerability(s):


Occurrences

js-yaml:3.12.0 is a transitive dependency introduced by the following direct dependency(s):

eslint:5.8.0
        └─ js-yaml:3.12.0

jest:23.6.0
        └─ jest-cli:23.6.0
              └─ istanbul-api:1.3.7
                    └─ js-yaml:3.12.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 8.8) Vulnerability due to usage of minimist:0.0.8

Vulnerabilities

DepShield reports that this application's usage of minimist:0.0.8 results in the following vulnerability(s):


Occurrences

minimist:0.0.8 is a transitive dependency introduced by the following direct dependency(s):

eslint:5.8.0
        └─ mkdirp:0.5.1
              └─ minimist:0.0.8

nightwatch:0.9.21
        └─ optimist:0.6.1
              └─ minimist:0.0.8

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash._reevaluate:3.0.0

Vulnerabilities

DepShield reports that this application's usage of lodash._reevaluate:3.0.0 results in the following vulnerability(s):


Occurrences

lodash._reevaluate:3.0.0 is a transitive dependency introduced by the following direct dependency(s):

gulp:3.9.1
        └─ gulp-util:3.0.8
              └─ lodash._reevaluate:3.0.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.5) Vulnerability due to usage of yargs-parser:10.1.0

Vulnerabilities

DepShield reports that this application's usage of yargs-parser:10.1.0 results in the following vulnerability(s):


Occurrences

yargs-parser:10.1.0 is a transitive dependency introduced by the following direct dependency(s):

convict:4.4.0
        └─ yargs-parser:10.1.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash.template:4.4.0

Vulnerabilities

DepShield reports that this application's usage of lodash.template:4.4.0 results in the following vulnerability(s):


Occurrences

lodash.template:4.4.0 is a transitive dependency introduced by the following direct dependency(s):

gulp-umd:2.0.0
        └─ lodash.template:4.4.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.2) Vulnerability due to usage of underscore:1.8.3

Vulnerabilities

DepShield reports that this application's usage of underscore:1.8.3 results in the following vulnerability(s):


Occurrences

underscore:1.8.3 is a transitive dependency introduced by the following direct dependency(s):

jsdoc-to-markdown:4.0.1
        └─ jsdoc-api:4.0.3
              └─ jsdoc:3.5.5
                    └─ underscore:1.8.3

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.5) Vulnerability due to usage of yargs-parser:9.0.2

Vulnerabilities

DepShield reports that this application's usage of yargs-parser:9.0.2 results in the following vulnerability(s):


Occurrences

yargs-parser:9.0.2 is a transitive dependency introduced by the following direct dependency(s):

jest:23.6.0
        └─ jest-cli:23.6.0
              └─ yargs:11.1.0
                    └─ yargs-parser:9.0.2

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 8.8) Vulnerability due to usage of growl:1.9.2

Vulnerabilities

DepShield reports that this application's usage of growl:1.9.2 results in the following vulnerability(s):


Occurrences

growl:1.9.2 is a transitive dependency introduced by the following direct dependency(s):

nightwatch:0.9.21
        └─ mocha-nightwatch:3.2.2
              └─ growl:1.9.2

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash.sortby:4.7.0

Vulnerabilities

DepShield reports that this application's usage of lodash.sortby:4.7.0 results in the following vulnerability(s):


Occurrences

lodash.sortby:4.7.0 is a transitive dependency introduced by the following direct dependency(s):

jest-environment-jsdom:23.4.0
        └─ jsdom:11.12.0
              └─ data-urls:1.0.1
                    └─ whatwg-url:7.0.0
                          └─ lodash.sortby:4.7.0
              └─ whatwg-url:6.5.0
                    └─ lodash.sortby:4.7.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash._basecopy:3.0.1

Vulnerabilities

DepShield reports that this application's usage of lodash._basecopy:3.0.1 results in the following vulnerability(s):


Occurrences

lodash._basecopy:3.0.1 is a transitive dependency introduced by the following direct dependency(s):

gulp:3.9.1
        └─ gulp-util:3.0.8
              └─ lodash.template:3.6.2
                    └─ lodash._basecopy:3.0.1

nightwatch:0.9.21
        └─ lodash.clone:3.0.3
              └─ lodash._baseclone:3.3.0
                    └─ lodash._baseassign:3.2.0
                          └─ lodash._basecopy:3.0.1

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash._baseassign:3.2.0

Vulnerabilities

DepShield reports that this application's usage of lodash._baseassign:3.2.0 results in the following vulnerability(s):


Occurrences

lodash._baseassign:3.2.0 is a transitive dependency introduced by the following direct dependency(s):

nightwatch:0.9.21
        └─ lodash.clone:3.0.3
              └─ lodash._baseclone:3.3.0
                    └─ lodash._baseassign:3.2.0
        └─ mocha-nightwatch:3.2.2
              └─ lodash.create:3.1.1
                    └─ lodash._baseassign:3.2.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 8.2) Vulnerability due to usage of y18n:3.2.1

Vulnerabilities

DepShield reports that this application's usage of y18n:3.2.1 results in the following vulnerability(s):


Occurrences

y18n:3.2.1 is a transitive dependency introduced by the following direct dependency(s):

jest:23.6.0
        └─ jest-cli:23.6.0
              └─ yargs:11.1.0
                    └─ y18n:3.2.1

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash._reescape:3.0.0

Vulnerabilities

DepShield reports that this application's usage of lodash._reescape:3.0.0 results in the following vulnerability(s):


Occurrences

lodash._reescape:3.0.0 is a transitive dependency introduced by the following direct dependency(s):

gulp:3.9.1
        └─ gulp-util:3.0.8
              └─ lodash._reescape:3.0.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.5) Vulnerability due to usage of marked:0.3.19

Vulnerabilities

DepShield reports that this application's usage of marked:0.3.19 results in the following vulnerability(s):


Occurrences

marked:0.3.19 is a transitive dependency introduced by the following direct dependency(s):

jsdoc-to-markdown:4.0.1
        └─ dmd:3.0.12
              └─ marked:0.3.19
        └─ jsdoc-api:4.0.3
              └─ jsdoc:3.5.5
                    └─ marked:0.3.19

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 9.8) Vulnerability due to usage of lodash:4.17.11

Vulnerabilities

DepShield reports that this application's usage of lodash:4.17.11 results in the following vulnerability(s):


Occurrences

lodash:4.17.11 is a transitive dependency introduced by the following direct dependency(s):

@semantic-release/exec:3.1.3
        └─ lodash:4.17.11

babel-core:6.26.3
        └─ babel-generator:6.26.1
              └─ lodash:4.17.11
        └─ babel-register:6.26.0
              └─ lodash:4.17.11
        └─ babel-template:6.26.0
              └─ lodash:4.17.11
        └─ babel-traverse:6.26.0
              └─ lodash:4.17.11
        └─ babel-types:6.26.0
              └─ lodash:4.17.11
        └─ lodash:4.17.11

babel-preset-env:1.7.0
        └─ babel-plugin-transform-es2015-block-scoping:6.26.0
              └─ lodash:4.17.11
        └─ babel-plugin-transform-es2015-classes:6.24.1
              └─ babel-helper-define-map:6.26.0
                    └─ lodash:4.17.11
        └─ babel-plugin-transform-es2015-sticky-regex:6.24.1
              └─ babel-helper-regex:6.26.0
                    └─ lodash:4.17.11

eslint:5.8.0
        └─ inquirer:6.2.0
              └─ lodash:4.17.11
        └─ lodash:4.17.11
        └─ table:5.1.0
              └─ lodash:4.17.11

gulp-template:5.0.0
        └─ lodash:4.17.11

gulp-uglify:3.0.1
        └─ lodash:4.17.11

jest:23.6.0
        └─ jest-cli:23.6.0
              └─ istanbul-api:1.3.7
                    └─ async:2.6.1
                          └─ lodash:4.17.11

jest-environment-jsdom:23.4.0
        └─ jsdom:11.12.0
              └─ request-promise-native:1.0.5
                    └─ request-promise-core:1.1.1
                          └─ lodash:4.17.11

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.2) Vulnerability due to usage of underscore:1.6.0

Vulnerabilities

DepShield reports that this application's usage of underscore:1.6.0 results in the following vulnerability(s):


Occurrences

underscore:1.6.0 is a transitive dependency introduced by the following direct dependency(s):

jsdoc-to-markdown:4.0.1
        └─ jsdoc-api:4.0.3
              └─ jsdoc:3.5.5
                    └─ catharsis:0.8.9
                          └─ underscore-contrib:0.3.0
                                └─ underscore:1.6.0
                    └─ requizzle:0.2.1
                          └─ underscore:1.6.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash.templatesettings:4.1.0

Vulnerabilities

DepShield reports that this application's usage of lodash.templatesettings:4.1.0 results in the following vulnerability(s):


Occurrences

lodash.templatesettings:4.1.0 is a transitive dependency introduced by the following direct dependency(s):

gulp-umd:2.0.0
        └─ lodash.template:4.4.0
              └─ lodash.templatesettings:4.1.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 8.2) Vulnerability due to usage of merge:1.2.0

Vulnerabilities

DepShield reports that this application's usage of merge:1.2.0 results in the following vulnerability(s):


Occurrences

merge:1.2.0 is a transitive dependency introduced by the following direct dependency(s):

jest:23.6.0
        └─ jest-cli:23.6.0
              └─ jest-haste-map:23.6.0
                    └─ sane:2.5.2
                          └─ exec-sh:0.2.2
                                └─ merge:1.2.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash.template:3.6.2

Vulnerabilities

DepShield reports that this application's usage of lodash.template:3.6.2 results in the following vulnerability(s):


Occurrences

lodash.template:3.6.2 is a transitive dependency introduced by the following direct dependency(s):

gulp:3.9.1
        └─ gulp-util:3.0.8
              └─ lodash.template:3.6.2

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash.rest:4.0.5

Vulnerabilities

DepShield reports that this application's usage of lodash.rest:4.0.5 results in the following vulnerability(s):


Occurrences

lodash.rest:4.0.5 is a transitive dependency introduced by the following direct dependency(s):

nightwatch:0.9.21
        └─ lodash.defaultsdeep:4.3.2
              └─ lodash.rest:4.0.5

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.5) Vulnerability due to usage of set-value:2.0.0

Vulnerabilities

DepShield reports that this application's usage of set-value:2.0.0 results in the following vulnerability(s):


Occurrences

set-value:2.0.0 is a transitive dependency introduced by the following direct dependency(s):

gulp:3.9.1
        └─ liftoff:2.5.0
              └─ findup-sync:2.0.0
                    └─ micromatch:3.1.10
                          └─ snapdragon:0.8.2
                                └─ base:0.11.2
                                      └─ cache-base:1.0.1
                                            └─ set-value:2.0.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash.restparam:3.6.1

Vulnerabilities

DepShield reports that this application's usage of lodash.restparam:3.6.1 results in the following vulnerability(s):


Occurrences

lodash.restparam:3.6.1 is a transitive dependency introduced by the following direct dependency(s):

gulp:3.9.1
        └─ gulp-util:3.0.8
              └─ lodash.template:3.6.2
                    └─ lodash.restparam:3.6.1

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash.isarguments:3.1.0

Vulnerabilities

DepShield reports that this application's usage of lodash.isarguments:3.1.0 results in the following vulnerability(s):


Occurrences

lodash.isarguments:3.1.0 is a transitive dependency introduced by the following direct dependency(s):

gulp:3.9.1
        └─ gulp-util:3.0.8
              └─ lodash.template:3.6.2
                    └─ lodash.keys:3.1.2
                          └─ lodash.isarguments:3.1.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash.escape:3.2.0

Vulnerabilities

DepShield reports that this application's usage of lodash.escape:3.2.0 results in the following vulnerability(s):


Occurrences

lodash.escape:3.2.0 is a transitive dependency introduced by the following direct dependency(s):

gulp:3.9.1
        └─ gulp-util:3.0.8
              └─ lodash.template:3.6.2
                    └─ lodash.escape:3.2.0
                    └─ lodash.templatesettings:3.1.1
                          └─ lodash.escape:3.2.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash.camelcase:4.3.0

Vulnerabilities

DepShield reports that this application's usage of lodash.camelcase:4.3.0 results in the following vulnerability(s):


Occurrences

lodash.camelcase:4.3.0 is a transitive dependency introduced by the following direct dependency(s):

jsdoc-to-markdown:4.0.1
        └─ command-line-tool:0.8.0
              └─ command-line-args:5.0.2
                    └─ lodash.camelcase:4.3.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash._arraycopy:3.0.0

Vulnerabilities

DepShield reports that this application's usage of lodash._arraycopy:3.0.0 results in the following vulnerability(s):


Occurrences

lodash._arraycopy:3.0.0 is a transitive dependency introduced by the following direct dependency(s):

nightwatch:0.9.21
        └─ lodash.clone:3.0.3
              └─ lodash._baseclone:3.3.0
                    └─ lodash._arraycopy:3.0.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.5) Vulnerability due to usage of q:1.4.1

Vulnerabilities

DepShield reports that this application's usage of q:1.4.1 results in the following vulnerability(s):


Occurrences

q:1.4.1 is a transitive dependency introduced by the following direct dependency(s):

nightwatch:0.9.21
        └─ q:1.4.1

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.5) Vulnerability due to usage of acorn:6.0.2

Vulnerabilities

DepShield reports that this application's usage of acorn:6.0.2 results in the following vulnerability(s):


Occurrences

acorn:6.0.2 is a transitive dependency introduced by the following direct dependency(s):

jest-environment-jsdom:23.4.0
        └─ jsdom:11.12.0
              └─ acorn-globals:4.3.0
                    └─ acorn:6.0.2

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash.pick:4.4.0

Vulnerabilities

DepShield reports that this application's usage of lodash.pick:4.4.0 results in the following vulnerability(s):


Occurrences

lodash.pick:4.4.0 is a transitive dependency introduced by the following direct dependency(s):

jsdoc-to-markdown:4.0.1
        └─ jsdoc-parse:3.0.1
              └─ lodash.pick:4.4.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

CVE-2019-20149 (High) detected in kind-of-6.0.2.tgz - autoclosed

CVE-2019-20149 - High Severity Vulnerability

Vulnerable Library - kind-of-6.0.2.tgz

Get the native type of a value.

Library home page: https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/kind-of/package.json

Dependency Hierarchy:

  • gulp-3.9.1.tgz (Root Library)
    • liftoff-2.5.0.tgz
      • findup-sync-2.0.0.tgz
        • micromatch-3.1.10.tgz
          • kind-of-6.0.2.tgz (Vulnerable Library)

Found in HEAD commit: 2ed96566365ee89d8a9b1250ccd7c049281ed09c

Found in base branch: master

Vulnerability Details

ctorName in index.js in kind-of v6.0.2 allows external user input to overwrite certain internal attributes via a conflicting name, as demonstrated by 'constructor': {'name':'Symbol'}. Hence, a crafted payload can overwrite this builtin attribute to manipulate the type detection result.

Publish Date: 2019-12-30

URL: CVE-2019-20149

CVSS 3 Score Details (7.5)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: None
    • Integrity Impact: High
    • Availability Impact: None

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2019-20149

Release Date: 2020-08-24

Fix Resolution (kind-of): 6.0.3

Direct dependency fix Resolution (gulp): 4.0.0


Step up your Open Source Security Game with Mend here

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash._basecreate:3.0.3

Vulnerabilities

DepShield reports that this application's usage of lodash._basecreate:3.0.3 results in the following vulnerability(s):


Occurrences

lodash._basecreate:3.0.3 is a transitive dependency introduced by the following direct dependency(s):

nightwatch:0.9.21
        └─ mocha-nightwatch:3.2.2
              └─ lodash.create:3.1.1
                    └─ lodash._basecreate:3.0.3

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 9.8) Vulnerability due to usage of lodash:1.0.2

Vulnerabilities

DepShield reports that this application's usage of lodash:1.0.2 results in the following vulnerability(s):


Occurrences

lodash:1.0.2 is a transitive dependency introduced by the following direct dependency(s):

gulp:3.9.1
        └─ vinyl-fs:0.3.14
              └─ glob-watcher:0.0.6
                    └─ gaze:0.5.2
                          └─ globule:0.1.0
                                └─ lodash:1.0.2

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.5) Vulnerability due to usage of mem:1.1.0

Vulnerabilities

DepShield reports that this application's usage of mem:1.1.0 results in the following vulnerability(s):


Occurrences

mem:1.1.0 is a transitive dependency introduced by the following direct dependency(s):

jest:23.6.0
        └─ jest-cli:23.6.0
              └─ yargs:11.1.0
                    └─ os-locale:2.1.0
                          └─ mem:1.1.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash.clonedeep:4.5.0

Vulnerabilities

DepShield reports that this application's usage of lodash.clonedeep:4.5.0 results in the following vulnerability(s):


Occurrences

lodash.clonedeep:4.5.0 is a transitive dependency introduced by the following direct dependency(s):

convict:4.4.0
        └─ lodash.clonedeep:4.5.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash._reinterpolate:3.0.0

Vulnerabilities

DepShield reports that this application's usage of lodash._reinterpolate:3.0.0 results in the following vulnerability(s):


Occurrences

lodash._reinterpolate:3.0.0 is a transitive dependency introduced by the following direct dependency(s):

gulp:3.9.1
        └─ gulp-util:3.0.8
              └─ lodash._reinterpolate:3.0.0
              └─ lodash.template:3.6.2
                    └─ lodash._reinterpolate:3.0.0
                    └─ lodash.templatesettings:3.1.1
                          └─ lodash._reinterpolate:3.0.0

gulp-umd:2.0.0
        └─ lodash.template:4.4.0
              └─ lodash.templatesettings:4.1.0
                    └─ lodash._reinterpolate:3.0.0
              └─ lodash._reinterpolate:3.0.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of ini:1.3.5

Vulnerabilities

DepShield reports that this application's usage of ini:1.3.5 results in the following vulnerability(s):


Occurrences

ini:1.3.5 is a transitive dependency introduced by the following direct dependency(s):

gulp:3.9.1
        └─ liftoff:2.5.0
              └─ findup-sync:2.0.0
                    └─ resolve-dir:1.0.1
                          └─ global-modules:1.0.0
                                └─ global-prefix:1.0.2
                                      └─ ini:1.3.5

jest:23.6.0
        └─ jest-cli:23.6.0
              └─ jest-haste-map:23.6.0
                    └─ sane:2.5.2
                          └─ fsevents:1.2.12
                                └─ node-pre-gyp:0.14.0
                                      └─ rc:1.2.8
                                            └─ ini:1.3.5

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash.keys:3.1.2

Vulnerabilities

DepShield reports that this application's usage of lodash.keys:3.1.2 results in the following vulnerability(s):


Occurrences

lodash.keys:3.1.2 is a transitive dependency introduced by the following direct dependency(s):

gulp:3.9.1
        └─ gulp-util:3.0.8
              └─ lodash.template:3.6.2
                    └─ lodash.keys:3.1.2

nightwatch:0.9.21
        └─ lodash.clone:3.0.3
              └─ lodash._baseclone:3.3.0
                    └─ lodash._baseassign:3.2.0
                          └─ lodash.keys:3.1.2
                    └─ lodash.keys:3.1.2

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 8.8) Vulnerability due to usage of minimist:1.2.0

Vulnerabilities

DepShield reports that this application's usage of minimist:1.2.0 results in the following vulnerability(s):


Occurrences

minimist:1.2.0 is a transitive dependency introduced by the following direct dependency(s):

convict:4.4.0
        └─ json5:1.0.1
              └─ minimist:1.2.0

gulp:3.9.1
        └─ gulp-util:3.0.8
              └─ minimist:1.2.0
        └─ minimist:1.2.0

jest:23.6.0
        └─ jest-cli:23.6.0
              └─ jest-haste-map:23.6.0
                    └─ sane:2.5.2
                          └─ minimist:1.2.0
                          └─ watch:0.18.0
                                └─ minimist:1.2.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

CVE-2021-23369 (High) detected in handlebars-4.0.12.tgz, handlebars-4.7.6.tgz - autoclosed

CVE-2021-23369 - High Severity Vulnerability

Vulnerable Libraries - handlebars-4.0.12.tgz, handlebars-4.7.6.tgz

handlebars-4.0.12.tgz

Handlebars provides the power necessary to let you build semantic templates effectively with no frustration

Library home page: https://registry.npmjs.org/handlebars/-/handlebars-4.0.12.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/handlebars/package.json

Dependency Hierarchy:

  • jsdoc-to-markdown-4.0.1.tgz (Root Library)
    • dmd-3.0.12.tgz
      • handlebars-4.0.12.tgz (Vulnerable Library)
handlebars-4.7.6.tgz

Handlebars provides the power necessary to let you build semantic templates effectively with no frustration

Library home page: https://registry.npmjs.org/handlebars/-/handlebars-4.7.6.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/conventional-changelog-writer/node_modules/handlebars/package.json

Dependency Hierarchy:

  • semantic-release-17.2.3.tgz (Root Library)
    • release-notes-generator-9.0.1.tgz
      • conventional-changelog-writer-4.0.18.tgz
        • handlebars-4.7.6.tgz (Vulnerable Library)

Found in HEAD commit: 2ed96566365ee89d8a9b1250ccd7c049281ed09c

Found in base branch: master

Vulnerability Details

The package handlebars before 4.7.7 are vulnerable to Remote Code Execution (RCE) when selecting certain compiling options to compile templates coming from an untrusted source.

Publish Date: 2021-04-12

URL: CVE-2021-23369

CVSS 3 Score Details (9.8)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: High
    • Integrity Impact: High
    • Availability Impact: High

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-23369

Release Date: 2021-04-12

Fix Resolution (handlebars): 4.1.2-0

Direct dependency fix Resolution (jsdoc-to-markdown): 5.0.0-node12.1

Fix Resolution (handlebars): 4.7.7

Direct dependency fix Resolution (semantic-release): 17.2.4


Step up your Open Source Security Game with Mend here

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash._arrayeach:3.0.0

Vulnerabilities

DepShield reports that this application's usage of lodash._arrayeach:3.0.0 results in the following vulnerability(s):


Occurrences

lodash._arrayeach:3.0.0 is a transitive dependency introduced by the following direct dependency(s):

nightwatch:0.9.21
        └─ lodash.clone:3.0.3
              └─ lodash._baseclone:3.3.0
                    └─ lodash._arrayeach:3.0.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 8.2) Vulnerability due to usage of https-proxy-agent:1.0.0

Vulnerabilities

DepShield reports that this application's usage of https-proxy-agent:1.0.0 results in the following vulnerability(s):


Occurrences

https-proxy-agent:1.0.0 is a transitive dependency introduced by the following direct dependency(s):

nightwatch:0.9.21
        └─ proxy-agent:2.0.0
              └─ https-proxy-agent:1.0.0
              └─ pac-proxy-agent:1.1.0
                    └─ https-proxy-agent:1.0.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 8.2) Vulnerability due to usage of lodash.mergewith:4.6.1

Vulnerabilities

DepShield reports that this application's usage of lodash.mergewith:4.6.1 results in the following vulnerability(s):


Occurrences

lodash.mergewith:4.6.1 is a transitive dependency introduced by the following direct dependency(s):

nightwatch:0.9.21
        └─ lodash.defaultsdeep:4.3.2
              └─ lodash.mergewith:4.6.1

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.