Skip to content

Commit

Permalink
audit: Include session and scope in requests
Browse files Browse the repository at this point in the history
Credit: @iarna
  • Loading branch information
iarna committed May 5, 2018
1 parent f9804b1 commit aadbf3f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/install/audit.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const npa = require('npm-package-arg')
const uuid = require('uuid')
const ssri = require('ssri')
const cloneDeep = require('lodash.clonedeep')
const pacoteOpts = require('../config/pacote.js')

// used when scrubbing module names/specifiers
const runId = uuid.v4()
Expand Down Expand Up @@ -81,10 +82,13 @@ function submitForFullReport (auditData) {
}

function fetchAudit (href, body) {
const opts = pacoteOpts()
return registryFetch(href, {
method: 'POST',
headers: { 'Content-Encoding': 'gzip', 'Content-Type': 'application/json' },
config: npm.config,
npmSession: opts.npmSession,
projectScope: npm.projectScope,
log: log,
body: body
})
Expand Down

0 comments on commit aadbf3f

Please sign in to comment.