koopjs / koop-provider-google-sheets

Create a Koop provider to bring in data from Google Sheets into Insights for ArcGIS
Other
6 stars 3 forks source link

Found 1 high severity vulnerability #15

Open hhkaos opened 4 years ago

hhkaos commented 4 years ago

Running npm install I have found a major issue.

npm audit

                       === npm audit security report ===

# Run  npm install googleapis@42.0.0  to resolve 1 vulnerability
SEMVER WARNING: Recommended action is a potentially breaking change

│ High          │ Improper Authorization                                       
│ Package       │ googleapis                                                   
│ Dependency of │ googleapis                                                   
│ Path          │ googleapis                                                   
│ More info     │ https://npmjs.com/advisories/791                             

If I update to the latest googleapi script it breaks :(👍

const sheets = google.sheets('v4')
                      ^

TypeError: google.sheets is not a function
    at Object.<anonymous> (/Users/hhkaos/workspace/koop-provider-google-sheets/sheets.js:3:23)
    at Module._compile (internal/modules/cjs/loader.js:759:30)

I see authentication needs to be done differently now: https://github.com/googleapis/google-api-nodejs-client/blob/master/samples/sheets/append.js

So I guess this is something that belongs here ^_^ (issues I mean)