From 351f6ef568c9c09302e4e53305a68bdad6469b46 Mon Sep 17 00:00:00 2001 From: csmig <33138761+csmig@users.noreply.github.com> Date: Thu, 18 Nov 2021 18:19:32 -0500 Subject: [PATCH] feat: support for STIG Manager v1.1.0 (#12) --- README.md | 2 +- index.js | 28 ++- lib/api.js | 36 ++++ lib/cargo.js | 127 ++++++----- lib/parse.js | 327 ++++++++++++++-------------- package-lock.json | 538 ++++++++++++++++++++++++++-------------------- package.json | 3 +- 7 files changed, 610 insertions(+), 451 deletions(-) diff --git a/README.md b/README.md index 3d8d1ec..c1e1b93 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@

STIG Manager Watcher

- + A [STIG Manager](https://github.com/nuwcdivnpt/stig-manager) CLI client that watches a path for test result files formatted as CKL or XCCDF and posts the results to a Collection. diff --git a/index.js b/index.js index 6b6fd2f..580d1f5 100755 --- a/index.js +++ b/index.js @@ -1,5 +1,7 @@ #!/usr/bin/env node +const minApiVersion = '1.1.0' + const { logger, getSymbol } = require('./lib/logger') const config = require('./lib/args') if (!config) { @@ -58,15 +60,25 @@ async function run() { } } -async function preflightServices () { - try { - await auth.getToken() - logger.info({ component: 'main', message: `preflight token request suceeded`}) - await api.getCollectionAssets(config.collectionId) - await api.getInstalledStigs() - logger.info({ component: 'main', message: `prefilght api requests suceeded`}) +async function hasMinApiVersion () { + const semverGte = require('semver/functions/gte') + const [remoteApiVersion] = await api.getDefinition('$.info.version') + logger.info({ component: 'main', message: `preflight API version`, minApiVersion, remoteApiVersion}) + if (semverGte(remoteApiVersion, minApiVersion)) { + return true + } + else { + throw( `Remote API version ${remoteApiVersion} is not compatible with this release.` ) } - finally {} +} + +async function preflightServices () { + await hasMinApiVersion() + await auth.getToken() + logger.info({ component: 'main', message: `preflight token request suceeded`}) + await api.getCollectionAssets(config.collectionId) + await api.getInstalledStigs() + logger.info({ component: 'main', message: `prefilght api requests suceeded`}) } function getObfuscatedConfig (config) { diff --git a/lib/api.js b/lib/api.js index b91e97a..dc094f6 100644 --- a/lib/api.js +++ b/lib/api.js @@ -4,6 +4,42 @@ const config = require('./args') const auth = require('./auth') const { logger, getSymbol } = require('./logger') +module.exports.getDefinition = async function (jsonPath) { + let response + try { + response = await got.get(`${config.api}/op/definition${jsonPath ? '?jsonpath=' + encodeURIComponent(jsonPath) : ''}`, { + responseType: 'json' + }) + logResponse (response ) + return response.body + } + catch (e) { + e.component = 'api' + e.message = 'query failed' + throw (e) + } +} + +module.exports.getCollection = async function (collectionId) { + let response + try { + await auth.getToken() + response = await got.get(`${config.api}/collections/${collectionId}`, { + headers: { + Authorization: `Bearer ${auth.tokens.access_token}` + }, + responseType: 'json' + }) + logResponse (response ) + return response.body + } + catch (e) { + e.component = 'api' + e.message = 'query failed' + throw (e) + } +} + module.exports.getCollectionAssets = async function (collectionId) { let response try { diff --git a/lib/cargo.js b/lib/cargo.js index 9be7e34..f44d749 100644 --- a/lib/cargo.js +++ b/lib/cargo.js @@ -8,7 +8,7 @@ const component = 'cargo' let batchId = 0 class TaskObject { - constructor ( { apiAssets = [], apiStigs = [], parsedResults = [] } ) { + constructor({ apiAssets = [], apiStigs = [], parsedResults = [] }) { // An array of results from the parsers this.parsedResults = parsedResults @@ -17,10 +17,10 @@ class TaskObject { // Create Maps of the assets by assetName and metadata.cklHostName this.mappedAssetNames = new Map() this.mappedCklHostnames = new Map() - for ( const apiAsset of apiAssets ) { + for (const apiAsset of apiAssets) { // Update .stigs to an array of benchmarkId strings - apiAsset.stigs = apiAsset.stigs.map( stig => stig.benchmarkId ) - this.mappedAssetNames.set( apiAsset.name.toLowerCase(), apiAsset ) + apiAsset.stigs = apiAsset.stigs.map(stig => stig.benchmarkId) + this.mappedAssetNames.set(apiAsset.name.toLowerCase(), apiAsset) if (apiAsset.metadata?.cklHostName) { const v = this.mappedCklHostnames.get(apiAsset.metadata.cklHostName.toLowerCase()) if (v) { @@ -35,8 +35,8 @@ class TaskObject { // A Map() of the installed benchmarkIds return by the API // key: benchmarkId, value: array of revisionStr this.mappedStigs = new Map() - for ( const apiStig of apiStigs ) { - this.mappedStigs.set( apiStig.benchmarkId, apiStig.revisionStrs ) + for (const apiStig of apiStigs) { + this.mappedStigs.set(apiStig.benchmarkId, apiStig.revisionStrs) } // An array of accumulated errors @@ -46,30 +46,34 @@ class TaskObject { this.taskAssets = this._createTaskAssets() } - _findAssetFromParsedTarget( target ) { + _findAssetFromParsedTarget(target) { if (!target.metadata.cklHostName) { return this.mappedAssetNames.get(target.name.toLowerCase()) } const matchedByCklHostname = this.mappedCklHostnames.get(target.metadata.cklHostName.toLowerCase()) if (!matchedByCklHostname) return null - const matchedByAllCklMetadata = matchedByCklHostname.find( + const matchedByAllCklMetadata = matchedByCklHostname.find( asset => asset.metadata.cklWebDbInstance === target.metadata.cklWebDbInstance - && asset.metadata.cklWebDbSite === target.metadata.cklWebDbSite) + && asset.metadata.cklWebDbSite === target.metadata.cklWebDbSite) if (!matchedByAllCklMetadata) return null return matchedByAllCklMetadata } _createTaskAssets() { - // taskAssets is a Map() keyed by mapKey, the values are + // taskAssets is a Map() keyed by lowercase asset name (or CKL metadata), the value is an object: // { - // newAsset: false, // does the asset need to be created? - // assetProps: parseResult.target, // asset properties from the parsed results - // hasNewBenchmarkIds: false, // are there new STIG assignments? - // stigsIgnored: [], // benchmarkIds ignored because no updates allowed - // reviews: [] // the reviews to be posted + // knownAsset: false, // does the asset need to be created + // assetProps: null, // an Asset object suitable for put/post to the API + // hasNewAssignment: false, // are there new STIG assignments? + // newAssignments: [], // any new assignments + // checklists: new Map(), // the vetted result checklists, a Map() keyed by benchmarkId + // checklistsIgnored: [], // the ignored checklists + // reviews: [] // the vetted reviews // } + const taskAssets = new Map() + for (const parsedResult of this.parsedResults) { // Generate mapping key let mapKey, tMeta = parsedResult.target.metadata @@ -77,15 +81,12 @@ class TaskObject { mapKey = parsedResult.target.name.toLowerCase() } else { - const appends = [tMeta.cklHostName] - appends.push(tMeta.cklWebDbSite ?? 'NA') - appends.push(tMeta.cklWebDbInstance ?? 'NA') - mapKey = appends.join('-') + mapKey = `${tMeta.cklHostName}-${tMeta.cklWebDbSite ?? 'NA'}-${tMeta.cklWebDbInstance ?? 'NA'}` } - + // Try to find the asset in the API response - const apiAsset = this._findAssetFromParsedTarget( parsedResult.target ) - if (! apiAsset && ! config.createObjects) { + const apiAsset = this._findAssetFromParsedTarget(parsedResult.target) + if (!apiAsset && !config.createObjects) { // Bail if the asset doesn't exist and we won't create it this.errors.push({ file: parsedResult.file, @@ -102,19 +103,20 @@ class TaskObject { continue } // Try to find the target in our Map() - let taskAsset = taskAssets.get( mapKey ) + let taskAsset = taskAssets.get(mapKey) - if ( !taskAsset ) { + if (!taskAsset) { // This is our first encounter with this assetName, initialize Map() value taskAsset = { knownAsset: false, assetProps: null, // an object suitable for put/post to the API hasNewAssignment: false, - checklists: [], // the vetted result checklists + newAssignments: [], + checklists: new Map(), // the vetted result checklists checklistsIgnored: [], // the ignored checklists reviews: [] // the vetted reviews - } - if ( !apiAsset ) { + } + if (!apiAsset) { // The asset does not exist in the API. Set assetProps from this parseResult. if (!tMeta.cklHostName) { taskAsset.assetProps = { ...parsedResult.target, collectionId: config.collectionId, stigs: [] } @@ -129,58 +131,73 @@ class TaskObject { taskAsset.assetProps = apiAsset } // Insert the asset into taskAssets - taskAssets.set( mapKey, taskAsset ) + taskAssets.set(mapKey, taskAsset) } // Helper functions - const stigIsInstalled = ( { benchmarkId, revisionStr } ) => { - const revisionStrs = this.mappedStigs.get( benchmarkId ) - if ( revisionStrs ) { - return revisionStr && config.strictRevisionCheck ? revisionStrs.includes( revisionStr ) : true + const stigIsInstalled = ({ benchmarkId, revisionStr }) => { + const revisionStrs = this.mappedStigs.get(benchmarkId) + if (revisionStrs) { + return revisionStr && config.strictRevisionCheck ? revisionStrs.includes(revisionStr) : true } else { return false } } - const stigIsAssigned = ( { benchmarkId } ) => { - return taskAsset.assetProps.stigs.includes( benchmarkId ) + const stigIsAssigned = ({ benchmarkId }) => { + return taskAsset.assetProps.stigs.includes(benchmarkId) } - const assignStig = ( benchmarkId ) => { - if (!stigIsAssigned( benchmarkId )) { + const assignStig = (benchmarkId) => { + if (!stigIsAssigned(benchmarkId)) { taskAsset.hasNewAssignment = true - taskAsset.assetProps.stigs.push( benchmarkId ) + taskAsset.newAssignments.push(benchmarkId) + taskAsset.assetProps.stigs.push(benchmarkId) + } + } + const stigIsNewlyAssigned = (benchmarkId) => taskAsset.newAssignments.includes(benchmarkId) + + const addToTaskAssetChecklistMapArray = (taskAsset, checklist) => { + let checklistArray = taskAsset.checklists.get(checklist.benchmarkId) + if (checklistArray) { + checklistArray.push(checklist) + } + else { + taskAsset.checklists.set(checklist.benchmarkId, [checklist]) } } + // Vet the checklists in this parseResult for (const checklist of parsedResult.checklists) { checklist.file = parsedResult.file - if ( stigIsInstalled( checklist ) ) { - if ( stigIsAssigned( checklist ) ) { - taskAsset.checklists.push( checklist ) + if (stigIsInstalled(checklist)) { + if (stigIsAssigned(checklist)) { + checklist.newAssignment = stigIsNewlyAssigned(checklist.benchmarkId) + addToTaskAssetChecklistMapArray(taskAsset, checklist) logger.debug({ component: 'taskobject', message: 'checklist included', file: parsedResult.file, assetName: parsedResult.target.name, benchmarkId: checklist.benchmarkId, - }) + }) } - else if ( config.createObjects ) { - assignStig( checklist.benchmarkId ) - taskAsset.checklists.push( checklist ) + else if (config.createObjects) { + assignStig(checklist.benchmarkId) + checklist.newAssignment = true + addToTaskAssetChecklistMapArray(taskAsset, checklist) logger.debug({ component: 'taskobject', message: 'checklist assigned and included', file: parsedResult.file, assetName: parsedResult.target.name, benchmarkId: checklist.benchmarkId, - }) + }) } else { - checklist.ignored = `STIG is not assigned` - taskAsset.checklistsIgnored.push( checklist ) + checklist.ignored = `Not mapped to Asset` + taskAsset.checklistsIgnored.push(checklist) logger.warn({ component: 'taskobject', message: 'checklist ignored', @@ -188,12 +205,12 @@ class TaskObject { assetName: parsedResult.target.name, benchmarkId: checklist.benchmarkId, reason: 'stig is not assigned' - }) + }) } } else { - checklist.ignored = `STIG is not installed` - taskAsset.checklistsIgnored.push( checklist ) + checklist.ignored = `Not installed` + taskAsset.checklistsIgnored.push(checklist) logger.warn({ component: 'taskobject', message: 'checklist ignored', @@ -243,7 +260,10 @@ async function writer ( taskAsset ) { // POST reviews let reviews = [] - for (const checklist of taskAsset.checklists) { + for (const assetStigChecklists of taskAsset.checklists.values()) { + // Since the parsed files were sorted by ascending date order, the last + // item in each checklists array was parsed from the most recently dated checklist file and we will choose this item. + const checklist = assetStigChecklists.slice(-1)[0] reviews = reviews.concat(checklist.reviews) } if (reviews.length > 0) { @@ -252,9 +272,8 @@ async function writer ( taskAsset ) { component: component, message: `posted reviews`, asset: { name: taskAsset.assetProps.name, id: taskAsset.assetProps.assetId }, - permitted: r.permitted.length, - rejected: r.rejected.length, - errors: r.errors.length + rejected: r.rejected, + affected: r.affected }) } else { diff --git a/lib/parse.js b/lib/parse.js index c1ac0b6..bde6016 100644 --- a/lib/parse.js +++ b/lib/parse.js @@ -46,175 +46,190 @@ const tagValueProcessor = require('he').decode // ] // } -const reviewsFromCkl = function reviewsFromCkl (cklData, options = {}) { - try { - options.ignoreNr = !!options.ignoreNr - const fastparseOptions = { - attributeNamePrefix: "", - ignoreAttributes: false, - ignoreNameSpace: true, - allowBooleanAttributes: false, - parseNodeValue: true, - parseAttributeValue: true, - trimValues: true, - cdataTagName: "__cdata", //default is 'false' - cdataPositionChar: "\\c", - localeRange: "", //To support non english character in tag/attribute values. - parseTrueNumberOnly: false, - arrayMode: true, //"strict" - tagValueProcessor: val => tagValueProcessor(val) - } - let parsed = parser.parse(cklData, fastparseOptions) +const reviewsFromCkl = function reviewsFromCkl (cklData, options = {}, fieldSettings) { + options.ignoreNr = !!options.ignoreNr + const fastparseOptions = { + attributeNamePrefix: "", + ignoreAttributes: false, + ignoreNameSpace: true, + allowBooleanAttributes: false, + parseNodeValue: false, + parseAttributeValue: false, + trimValues: true, + cdataTagName: "__cdata", //default is 'false' + cdataPositionChar: "\\c", + localeRange: "", //To support non english character in tag/attribute values. + parseTrueNumberOnly: false, + arrayMode: true, //"strict" + tagValueProcessor: val => tagValueProcessor(val) + } + let parsed = parser.parse(cklData, fastparseOptions) + + if (!parsed.CHECKLIST) throw (new Error("No CHECKLIST element")) + if (!parsed.CHECKLIST[0].ASSET) throw (new Error("No ASSET element")) + if (!parsed.CHECKLIST[0].STIGS) throw (new Error("No STIGS element")) - if (!parsed.CHECKLIST) throw (new Error("No CHECKLIST element")) - if (!parsed.CHECKLIST[0].ASSET) throw (new Error("No ASSET element")) - if (!parsed.CHECKLIST[0].STIGS) throw (new Error("No STIGS element")) + let returnObj = {} + returnObj.target = processAsset(parsed.CHECKLIST[0].ASSET[0]) + if (!returnObj.target.name) { + throw (new Error("No host_name in ASSET")) + } + returnObj.checklists = processIStig(parsed.CHECKLIST[0].STIGS[0].iSTIG) + if (returnObj.checklists.length === 0) { + throw (new Error("STIG_INFO element has no SI_DATA for SID_NAME == stigId")) + } + return (returnObj) - let returnObj = {} - returnObj.target = processAsset(parsed.CHECKLIST[0].ASSET[0]) - if (!returnObj.target.name) { - throw (new Error("No host_name in ASSET")) + function processAsset(assetElement) { + let obj = { + name: assetElement.HOST_NAME, + description: null, + ip: assetElement.HOST_IP || null, + fqdn: assetElement.HOST_FQDN || null, + mac: assetElement.HOST_MAC || null, + noncomputing: assetElement.ASSET_TYPE === 'Non-Computing' } - returnObj.checklists = processIStig(parsed.CHECKLIST[0].STIGS[0].iSTIG) - if (returnObj.checklists.length === 0) { - throw (new Error("STIG_INFO element has no SI_DATA for SID_NAME == stigId")) + const metadata = {} + if (assetElement.ROLE) { + metadata.cklRole = assetElement.ROLE } - return (returnObj) - - function processAsset(assetElement) { - let obj = { - name: assetElement.HOST_NAME, - description: null, - ip: assetElement.HOST_IP || null, - fqdn: assetElement.HOST_FQDN || null, - mac: assetElement.HOST_MAC || null, - noncomputing: assetElement.ASSET_TYPE === 'Non-Computing' + if (assetElement.TECH_AREA) { + metadata.cklTechArea = assetElement.TECH_AREA + } + if (assetElement.WEB_OR_DATABASE === 'true') { + metadata.cklWebOrDatabase = 'true' + metadata.cklHostName = assetElement.HOST_NAME + if (assetElement.WEB_DB_SITE) { + metadata.cklWebDbSite = assetElement.WEB_DB_SITE } - const metadata = {} - if (assetElement.ROLE) { - metadata.cklRole = assetElement.ROLE + if (assetElement.WEB_DB_INSTANCE) { + metadata.cklWebDbInstance = assetElement.WEB_DB_INSTANCE } - if (assetElement.TECH_AREA) { - metadata.cklTechArea = assetElement.TECH_AREA + } + obj.metadata = metadata + return obj + } + + function processIStig(iStigElement) { + let checklistArray = [] + iStigElement.forEach(iStig => { + let checklist = {} + // get benchmarkId + let stigIdElement = iStig.STIG_INFO[0].SI_DATA.filter( d => d.SID_NAME === 'stigid' )[0] + checklist.benchmarkId = stigIdElement.SID_DATA.replace('xccdf_mil.disa.stig_benchmark_', '') + // get revision + const stigVersion = iStig.STIG_INFO[0].SI_DATA.filter( d => d.SID_NAME === 'version' )[0].SID_DATA + let stigReleaseInfo = iStig.STIG_INFO[0].SI_DATA.filter( d => d.SID_NAME === 'releaseinfo' )[0].SID_DATA + const stigRelease = stigReleaseInfo.match(/Release:\s*(.+?)\s/)[1] + const stigRevisionStr = `V${stigVersion}R${stigRelease}` + checklist.revisionStr = stigRevisionStr + + if (checklist.benchmarkId) { + let x = processVuln(iStig.VULN) + checklist.reviews = x.reviews + checklist.stats = x.stats + checklistArray.push(checklist) } - if (assetElement.WEB_OR_DATABASE) { - metadata.cklWebOrDatabase = 'true' - metadata.cklHostName = assetElement.HOST_NAME - if (assetElement.WEB_DB_SITE) { - metadata.cklWebDbSite = assetElement.WEB_DB_SITE - } - if (assetElement.WEB_DB_INSTANCE) { - metadata.cklWebDbInstance = assetElement.WEB_DB_INSTANCE - } + }) + return checklistArray + } + + function processVuln(vulnElements) { + // vulnElements is an array of this object: + // { + // COMMENTS + // FINDING_DETAILS + // SEVERITY_JUSTIFICATION + // SEVERITY_OVERRIDE + // STATUS + // STIG_DATA [26] + // } + + const resultMap = { + NotAFinding: 'pass', + Open: 'fail', + Not_Applicable: 'notapplicable', + Not_Reviewed: 'notchecked' + } + const resultStats = { + pass: 0, + fail: 0, + notapplicable: 0, + notchecked: 0, + notselected: 0, + informational: 0, + error: 0, + fixed: 0, + unknown: 0 + } + let vulnArray = [] + vulnElements?.forEach(vuln => { + let result = resultMap[vuln.STATUS] + if (result) { + if (result === 'notchecked' && (vuln.FINDING_DETAILS || vuln.COMMENTS)) result = 'informational' + resultStats[result]++ + if (result === 'notchecked' && options.ignoreNr) return + let ruleId + vuln.STIG_DATA.some(stigDatum => { + if (stigDatum.VULN_ATTRIBUTE == "Rule_ID") { + ruleId = stigDatum.ATTRIBUTE_DATA + return true + } + }) + if (!ruleId) return + // let status = bestStatusForVuln(result, vuln.FINDING_DETAILS, vuln.COMMENTS, fieldSettings) + vulnArray.push({ + ruleId: ruleId, + result: result, + detail: options.replaceText ? vuln.FINDING_DETAILS : vuln.FINDING_DETAILS || null, + comment: options.replaceText ? vuln.COMMENTS : vuln.COMMENTS || null, + autoResult: false, + // status: status + }) } - obj.metadata = metadata - return obj + }) + + return { + reviews: vulnArray, + stats: resultStats } - - function processIStig(iStigElement) { - let checklistArray = [] - iStigElement.forEach(iStig => { - let checklist = {} - // get benchmarkId - let stigIdElement = iStig.STIG_INFO[0].SI_DATA.filter( d => d.SID_NAME === 'stigid' )[0] - checklist.benchmarkId = stigIdElement.SID_DATA.replace('xccdf_mil.disa.stig_benchmark_', '') - // get revision - const stigVersion = iStig.STIG_INFO[0].SI_DATA.filter( d => d.SID_NAME === 'version' )[0].SID_DATA - let stigReleaseInfo = iStig.STIG_INFO[0].SI_DATA.filter( d => d.SID_NAME === 'releaseinfo' )[0].SID_DATA - const stigRelease = stigReleaseInfo.match(/Release:\s*(.+?)\s/)[1] - const stigRevisionStr = `V${stigVersion}R${stigRelease}` - checklist.revisionStr = stigRevisionStr + } - if (checklist.benchmarkId) { - let x = processVuln(iStig.VULN) - checklist.reviews = x.reviews - checklist.stats = x.stats - checklistArray.push(checklist) + function bestStatusForVuln(result, detail, comment, fieldSettings) { + let detailSubmittable = false + switch (fieldSettings.detailRequired) { + case 'optional': + detailSubmittable = true + break + case 'findings': + if ((result !== 'fail') || (result === 'fail' && detail)) { + detailSubmittable = true } - }) - return checklistArray - } - - function processVuln(vulnElements) { - // vulnElements is an array of this object: - // { - // COMMENTS - // FINDING_DETAILS - // SEVERITY_JUSTIFICATION - // SEVERITY_OVERRIDE - // STATUS - // STIG_DATA [26] - // } - - const resultMap = { - NotAFinding: 'pass', - Open: 'fail', - Not_Applicable: 'notapplicable', - Not_Reviewed: 'notchecked' - } - const resultStats = { - pass: 0, - fail: 0, - notapplicable: 0, - notchecked: 0, - notselected: 0, - informational: 0, - error: 0, - fixed: 0, - unknown: 0 - } - let vulnArray = [] - vulnElements?.forEach(vuln => { - let result = resultMap[vuln.STATUS] - if (result) { - if (result === 'notchecked' && vuln.FINDING_DETAILS) result = 'informational' - resultStats[result]++ - let ruleId - vuln.STIG_DATA.some(stigDatum => { - if (stigDatum.VULN_ATTRIBUTE == "Rule_ID") { - ruleId = stigDatum.ATTRIBUTE_DATA - return true - } - }) - let action = null - if (result === 'fail') { - if (vuln.COMMENTS.startsWith("Mitigate:")) { - action = "mitigate" - } - else if (vuln.COMMENTS.startsWith("Exception:")) { - action = "exception" - } - else if (vuln.COMMENTS.startsWith("Remediate:")) { - action = "remediate" - } - } - let status = 'saved' - if (result && vuln.FINDING_DETAILS && result !== 'fail') { - status = 'submitted' - } - if (result && vuln.FINDING_DETAILS && result === 'fail' && action && vuln.COMMENTS) { - status = 'submitted' - } - if (result === 'notchecked' && options.ignoreNr) return - vulnArray.push({ - ruleId: ruleId, - result: result, - resultComment: vuln.FINDING_DETAILS, - action: action, - actionComment: vuln.COMMENTS == "" ? null : vuln.COMMENTS, - autoResult: false, - status: status - }) + break + case 'always': + if (detail) { + detailSubmittable = true } - }) - - return { - reviews: vulnArray, - stats: resultStats - } - } + break + } + let commentSubmittable = false + switch (fieldSettings.commentRequired) { + case 'optional': + commentSubmittable = true + break + case 'findings': + if ((result !== 'fail') || (result === 'fail' && comment)) { + commentSubmittable = true + } + break + case 'always': + if (comment) { + commentSubmittable = true + } + break + } + return detailSubmittable && commentSubmittable ? 'submitted' : 'saved' } - finally {} } const reviewsFromScc = function (sccFileContent, options = {}) { diff --git a/package-lock.json b/package-lock.json index 10aedd3..1143f99 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,12 @@ { "name": "stigman-watcher", - "version": "1.1.2", + "version": "1.2.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "version": "1.1.2", + "name": "stigman-watcher", + "version": "1.2.0", "license": "MIT", "dependencies": { "atob": "^2.1.2", @@ -20,6 +21,7 @@ "jsonwebtoken": "^8.5.1", "n-readlines": "^1.0.1", "prompt-sync": "^4.2.0", + "semver": "^7.3.5", "serialize-error": "^8.0.1", "winston": "^3.3.3" }, @@ -41,11 +43,11 @@ } }, "node_modules/@nodelib/fs.scandir": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz", - "integrity": "sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dependencies": { - "@nodelib/fs.stat": "2.0.4", + "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" }, "engines": { @@ -53,19 +55,19 @@ } }, "node_modules/@nodelib/fs.stat": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz", - "integrity": "sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "engines": { "node": ">= 8" } }, "node_modules/@nodelib/fs.walk": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz", - "integrity": "sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow==", + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dependencies": { - "@nodelib/fs.scandir": "2.1.4", + "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" }, "engines": { @@ -73,9 +75,9 @@ } }, "node_modules/@sindresorhus/is": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.0.1.tgz", - "integrity": "sha512-Qm9hBEBu18wt1PO2flE7LPb30BHMQt1eQgbV76YntdNk73XZGpn3izvGTYxbGgzXKgbCjiia0uxTd3aTNQrY/g==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.2.0.tgz", + "integrity": "sha512-VkE3KLBmJwcCaVARtQpfuKcKv8gcBmUubrfHGF84dXuuW6jgsRYxPtzcIhPyK9WAPpRt2/xY6zkD9MnRaJzSyw==", "engines": { "node": ">=10" }, @@ -84,9 +86,9 @@ } }, "node_modules/@szmarczak/http-timer": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.5.tgz", - "integrity": "sha512-PyRA9sm1Yayuj5OIoJ1hGt2YISX45w9WcFbh6ddT0Z/0yaFxOtGLInr4jUfU1EAFVs0Yfyfev4RNwBlUaHdlDQ==", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", + "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", "dependencies": { "defer-to-connect": "^2.0.0" }, @@ -95,9 +97,9 @@ } }, "node_modules/@types/cacheable-request": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.1.tgz", - "integrity": "sha512-ykFq2zmBGOCbpIXtoVbz4SKY5QriWPh3AjyU4G74RYbtt5yOc5OfaY75ftjg7mikMOla1CTGpX3lLbuJh8DTrQ==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.2.tgz", + "integrity": "sha512-B3xVo+dlKM6nnKTcmm5ZtY/OL8bOAOd2Olee9M1zft65ox50OzjEHW91sDiU9j6cvW8Ejg1/Qkf4xd2kugApUA==", "dependencies": { "@types/http-cache-semantics": "*", "@types/keyv": "*", @@ -106,22 +108,22 @@ } }, "node_modules/@types/http-cache-semantics": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.0.tgz", - "integrity": "sha512-c3Xy026kOF7QOTn00hbIllV1dLR9hG9NkSrLQgCVs8NF6sBU+VGWjD3wLPhmh1TYAc7ugCFsvHYMN4VcBN1U1A==" + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", + "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==" }, "node_modules/@types/keyv": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.1.tgz", - "integrity": "sha512-MPtoySlAZQ37VoLaPcTHCu1RWJ4llDkULYZIzOYxlhxBqYPB0RsRlmMU0R6tahtFe27mIdkHV+551ZWV4PLmVw==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.3.tgz", + "integrity": "sha512-FXCJgyyN3ivVgRoml4h94G/p3kY+u/B86La+QptcqJaWtBWtmc6TtkNfS40n9bIvyLteHh7zXOtgbobORKPbDg==", "dependencies": { "@types/node": "*" } }, "node_modules/@types/node": { - "version": "15.0.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-15.0.1.tgz", - "integrity": "sha512-TMkXt0Ck1y0KKsGr9gJtWGjttxlZnnvDtphxUOSd0bfaR6Q1jle+sPvrzNR1urqYTWMinoKvjKfXUGsumaO1PA==" + "version": "16.11.8", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.8.tgz", + "integrity": "sha512-hmT5gfpRkkHr7DZZHMf3jBe/zNcVGN+jXSL2f8nAsYfBPxQFToKwQlS/zES4Sjp488Bi73i+p6bvrNRRGU0x9Q==" }, "node_modules/@types/responselike": { "version": "1.0.0", @@ -152,9 +154,9 @@ } }, "node_modules/async": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.0.tgz", - "integrity": "sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw==" + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.2.tgz", + "integrity": "sha512-H0E+qZaDEfx/FY4t7iLRv1W2fFI6+pyCeTw1uN20AQPiwqwM6ojPxHxdLv4z8hi2DtnW9BOckSspLucW7pIE5g==" }, "node_modules/atob": { "version": "2.1.2", @@ -215,16 +217,16 @@ } }, "node_modules/cacheable-request": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.1.tgz", - "integrity": "sha512-lt0mJ6YAnsrBErpTMWeu5kl/tg9xMAWjavYTN6VQXM1A/teBITuNcccXsCxF0tDQQJf9DfAaX5O4e0zp0KlfZw==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.2.tgz", + "integrity": "sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew==", "dependencies": { "clone-response": "^1.0.2", "get-stream": "^5.1.0", "http-cache-semantics": "^4.0.0", "keyv": "^4.0.0", "lowercase-keys": "^2.0.0", - "normalize-url": "^4.1.0", + "normalize-url": "^6.0.1", "responselike": "^2.0.0" }, "engines": { @@ -232,23 +234,23 @@ } }, "node_modules/chokidar": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", - "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", + "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", "dependencies": { - "anymatch": "~3.1.1", + "anymatch": "~3.1.2", "braces": "~3.0.2", - "glob-parent": "~5.1.0", + "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", - "readdirp": "~3.5.0" + "readdirp": "~3.6.0" }, "engines": { "node": ">= 8.10.0" }, "optionalDependencies": { - "fsevents": "~2.3.1" + "fsevents": "~2.3.2" } }, "node_modules/clone-response": { @@ -260,12 +262,12 @@ } }, "node_modules/color": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/color/-/color-3.0.0.tgz", - "integrity": "sha512-jCpd5+s0s0t7p3pHQKpnJ0TpQKKdleP71LWcA0aqiljpiuAkOSUFN/dyH8ZwF0hRmFlrIuRhufds1QyEP9EB+w==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/color/-/color-3.2.1.tgz", + "integrity": "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==", "dependencies": { - "color-convert": "^1.9.1", - "color-string": "^1.5.2" + "color-convert": "^1.9.3", + "color-string": "^1.6.0" } }, "node_modules/color-convert": { @@ -282,9 +284,9 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, "node_modules/color-string": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.5.tgz", - "integrity": "sha512-jgIoum0OfQfq9Whcfc2z/VhCNcmQjWbey6qBX0vqt7YICflUmBCh9E9CiQD5GSJ+Uehixm3NUwHVhqUAWRivZg==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.6.0.tgz", + "integrity": "sha512-c/hGS+kRWJutUBEngKKmk4iH3sD59MBkoxVapS/0wgpCz2u7XsNloxknyvBhzwEs1IbV36D9PwqLPJ2DTu3vMA==", "dependencies": { "color-name": "^1.0.0", "simple-swizzle": "^0.2.2" @@ -299,11 +301,11 @@ } }, "node_modules/colorspace": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/colorspace/-/colorspace-1.1.2.tgz", - "integrity": "sha512-vt+OoIP2d76xLhjwbBaucYlNSpPsrJWPlBTtwCpQKIu6/CSMutyzX93O/Do0qzpH3YoHEes8YEFXyZ797rEhzQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/colorspace/-/colorspace-1.1.4.tgz", + "integrity": "sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==", "dependencies": { - "color": "3.0.x", + "color": "^3.1.3", "text-hex": "1.0.x" } }, @@ -316,9 +318,9 @@ } }, "node_modules/core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" }, "node_modules/decompress-response": { "version": "6.0.0", @@ -354,11 +356,11 @@ } }, "node_modules/dotenv": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz", - "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==", + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.6.0.tgz", + "integrity": "sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==", "engines": { - "node": ">=8" + "node": ">=10" } }, "node_modules/ecdsa-sig-formatter": { @@ -383,30 +385,27 @@ } }, "node_modules/fast-glob": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.5.tgz", - "integrity": "sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", + "integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==", "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.0", + "glob-parent": "^5.1.2", "merge2": "^1.3.0", - "micromatch": "^4.0.2", - "picomatch": "^2.2.1" + "micromatch": "^4.0.4" }, "engines": { "node": ">=8" } }, - "node_modules/fast-safe-stringify": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", - "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==" - }, "node_modules/fast-xml-parser": { - "version": "3.19.0", - "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-3.19.0.tgz", - "integrity": "sha512-4pXwmBplsCPv8FOY1WRakF970TjNGnGnfbOnLqjlYvMiF1SR3yOHyxMR/YCXpPTOspNF5gwudqktIP4VsWkvBg==", + "version": "3.21.1", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-3.21.1.tgz", + "integrity": "sha512-FTFVjYoBOZTJekiUsawGsSYV9QL0A+zDYCRj7y34IO6Jg+2IMYEtQa+bbictpdpV8dHxXywqU7C0gRDEOFtBFg==", + "dependencies": { + "strnum": "^1.0.4" + }, "bin": { "xml2js": "cli.js" }, @@ -416,9 +415,9 @@ } }, "node_modules/fastq": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.0.tgz", - "integrity": "sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", "dependencies": { "reusify": "^1.0.4" } @@ -483,16 +482,16 @@ } }, "node_modules/got": { - "version": "11.8.2", - "resolved": "https://registry.npmjs.org/got/-/got-11.8.2.tgz", - "integrity": "sha512-D0QywKgIe30ODs+fm8wMZiAcZjypcCodPNuMz5H9Mny7RJ+IjJ10BdmGW7OM7fHXP+O7r6ZwapQ/YQmMSvB0UQ==", + "version": "11.8.3", + "resolved": "https://registry.npmjs.org/got/-/got-11.8.3.tgz", + "integrity": "sha512-7gtQ5KiPh1RtGS9/Jbv1ofDpBFuq42gyfEib+ejaRBJuj/3tQFeR5+gw57e4ipaU8c/rCjvX6fkQz2lyDlGAOg==", "dependencies": { "@sindresorhus/is": "^4.0.0", "@szmarczak/http-timer": "^4.0.5", "@types/cacheable-request": "^6.0.1", "@types/responselike": "^1.0.0", "cacheable-lookup": "^5.0.3", - "cacheable-request": "^7.0.1", + "cacheable-request": "^7.0.2", "decompress-response": "^6.0.0", "http2-wrapper": "^1.0.0-beta.5.2", "lowercase-keys": "^2.0.0", @@ -561,9 +560,9 @@ } }, "node_modules/is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dependencies": { "is-extglob": "^2.1.1" }, @@ -580,11 +579,14 @@ } }, "node_modules/is-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", - "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/isarray": { @@ -618,6 +620,14 @@ "npm": ">=1.4.28" } }, + "node_modules/jsonwebtoken/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "bin": { + "semver": "bin/semver" + } + }, "node_modules/jwa": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", @@ -638,9 +648,9 @@ } }, "node_modules/keyv": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.0.3.tgz", - "integrity": "sha512-zdGa2TOpSZPq5mU6iowDARnMBZgtCqJ11dJROFi6tg6kTn4nuUdU09lFyLFSaHrWqpIJ+EBq4E8/Dc0Vx5vLdA==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.0.4.tgz", + "integrity": "sha512-vqNHbAc8BBsxk+7QBYLW0Y219rWcClspR6WSeoHYKG5mnsSoOH+BL1pWq02DDCVdvvuUny5rkBlzMRzoqc+GIg==", "dependencies": { "json-buffer": "3.0.1" } @@ -686,14 +696,14 @@ "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=" }, "node_modules/logform": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/logform/-/logform-2.2.0.tgz", - "integrity": "sha512-N0qPlqfypFx7UHNn4B3lzS/b0uLqt2hmuoa+PpuXNYgozdJYAyauF5Ky0BWVjrxDlMWiT3qN4zPq3vVAfZy7Yg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/logform/-/logform-2.3.0.tgz", + "integrity": "sha512-graeoWUH2knKbGthMtuG1EfaSPMZFZBIrhuJHhkS5ZseFBrc7DupCzihOQAzsK/qIKPQaPJ/lFQFctILUY5ARQ==", "dependencies": { "colors": "^1.2.1", - "fast-safe-stringify": "^2.0.4", "fecha": "^4.2.0", "ms": "^2.1.1", + "safe-stable-stringify": "^1.1.0", "triple-beam": "^1.3.0" } }, @@ -705,6 +715,17 @@ "node": ">=8" } }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -760,11 +781,14 @@ } }, "node_modules/normalize-url": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz", - "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", + "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/once": { @@ -784,17 +808,17 @@ } }, "node_modules/p-cancelable": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.0.tgz", - "integrity": "sha512-HAZyB3ZodPo+BDpb4/Iu7Jv4P6cSazBz9ZM0ChhEXp70scx834aWCEjQRwgt41UzzejUAPdbqqONfRWTPYrPAQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", + "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==", "engines": { "node": ">=8" } }, "node_modules/picomatch": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz", - "integrity": "sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", "engines": { "node": ">=8.6" }, @@ -868,9 +892,9 @@ } }, "node_modules/readdirp": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", - "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dependencies": { "picomatch": "^2.2.1" }, @@ -879,9 +903,9 @@ } }, "node_modules/resolve-alpn": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.1.2.tgz", - "integrity": "sha512-8OyfzhAtA32LVUsJSke3auIyINcwdh5l3cvYKdKO0nvsYSKuiLfTM5i78PJswFPT8y6cPW+L1v6/hE95chcpDA==" + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", + "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==" }, "node_modules/responselike": { "version": "2.0.0", @@ -941,12 +965,23 @@ } ] }, + "node_modules/safe-stable-stringify": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-1.1.1.tgz", + "integrity": "sha512-ERq4hUjKDbJfE4+XtZLFPCDi8Vb1JqaxAPTxWFLBx8XcAlf9Bda/ZJdVezs/NAfsMQScyIlUMx+Yeu7P7rx5jw==" + }, "node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dependencies": { + "lru-cache": "^6.0.0" + }, "bin": { - "semver": "bin/semver" + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, "node_modules/serialize-error": { @@ -998,6 +1033,11 @@ "node": ">=6" } }, + "node_modules/strnum": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.4.tgz", + "integrity": "sha512-lMzNMfDpaQOLt4B2mEbfzYS0+T7dvCXeojnlGf6f1AygvWDMcWyXYaLbyICfjVu29sErR8fnRagQfBW/N/hGgw==" + }, "node_modules/text-hex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz", @@ -1039,6 +1079,7 @@ "version": "3.4.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", "bin": { "uuid": "bin/uuid" } @@ -1105,6 +1146,11 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" } }, "dependencies": { @@ -1119,45 +1165,45 @@ } }, "@nodelib/fs.scandir": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz", - "integrity": "sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "requires": { - "@nodelib/fs.stat": "2.0.4", + "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" } }, "@nodelib/fs.stat": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz", - "integrity": "sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q==" + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==" }, "@nodelib/fs.walk": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz", - "integrity": "sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow==", + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "requires": { - "@nodelib/fs.scandir": "2.1.4", + "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" } }, "@sindresorhus/is": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.0.1.tgz", - "integrity": "sha512-Qm9hBEBu18wt1PO2flE7LPb30BHMQt1eQgbV76YntdNk73XZGpn3izvGTYxbGgzXKgbCjiia0uxTd3aTNQrY/g==" + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.2.0.tgz", + "integrity": "sha512-VkE3KLBmJwcCaVARtQpfuKcKv8gcBmUubrfHGF84dXuuW6jgsRYxPtzcIhPyK9WAPpRt2/xY6zkD9MnRaJzSyw==" }, "@szmarczak/http-timer": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.5.tgz", - "integrity": "sha512-PyRA9sm1Yayuj5OIoJ1hGt2YISX45w9WcFbh6ddT0Z/0yaFxOtGLInr4jUfU1EAFVs0Yfyfev4RNwBlUaHdlDQ==", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", + "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", "requires": { "defer-to-connect": "^2.0.0" } }, "@types/cacheable-request": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.1.tgz", - "integrity": "sha512-ykFq2zmBGOCbpIXtoVbz4SKY5QriWPh3AjyU4G74RYbtt5yOc5OfaY75ftjg7mikMOla1CTGpX3lLbuJh8DTrQ==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.2.tgz", + "integrity": "sha512-B3xVo+dlKM6nnKTcmm5ZtY/OL8bOAOd2Olee9M1zft65ox50OzjEHW91sDiU9j6cvW8Ejg1/Qkf4xd2kugApUA==", "requires": { "@types/http-cache-semantics": "*", "@types/keyv": "*", @@ -1166,22 +1212,22 @@ } }, "@types/http-cache-semantics": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.0.tgz", - "integrity": "sha512-c3Xy026kOF7QOTn00hbIllV1dLR9hG9NkSrLQgCVs8NF6sBU+VGWjD3wLPhmh1TYAc7ugCFsvHYMN4VcBN1U1A==" + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", + "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==" }, "@types/keyv": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.1.tgz", - "integrity": "sha512-MPtoySlAZQ37VoLaPcTHCu1RWJ4llDkULYZIzOYxlhxBqYPB0RsRlmMU0R6tahtFe27mIdkHV+551ZWV4PLmVw==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.3.tgz", + "integrity": "sha512-FXCJgyyN3ivVgRoml4h94G/p3kY+u/B86La+QptcqJaWtBWtmc6TtkNfS40n9bIvyLteHh7zXOtgbobORKPbDg==", "requires": { "@types/node": "*" } }, "@types/node": { - "version": "15.0.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-15.0.1.tgz", - "integrity": "sha512-TMkXt0Ck1y0KKsGr9gJtWGjttxlZnnvDtphxUOSd0bfaR6Q1jle+sPvrzNR1urqYTWMinoKvjKfXUGsumaO1PA==" + "version": "16.11.8", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.8.tgz", + "integrity": "sha512-hmT5gfpRkkHr7DZZHMf3jBe/zNcVGN+jXSL2f8nAsYfBPxQFToKwQlS/zES4Sjp488Bi73i+p6bvrNRRGU0x9Q==" }, "@types/responselike": { "version": "1.0.0", @@ -1206,9 +1252,9 @@ } }, "async": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.0.tgz", - "integrity": "sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw==" + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.2.tgz", + "integrity": "sha512-H0E+qZaDEfx/FY4t7iLRv1W2fFI6+pyCeTw1uN20AQPiwqwM6ojPxHxdLv4z8hi2DtnW9BOckSspLucW7pIE5g==" }, "atob": { "version": "2.1.2", @@ -1254,32 +1300,32 @@ "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==" }, "cacheable-request": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.1.tgz", - "integrity": "sha512-lt0mJ6YAnsrBErpTMWeu5kl/tg9xMAWjavYTN6VQXM1A/teBITuNcccXsCxF0tDQQJf9DfAaX5O4e0zp0KlfZw==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.2.tgz", + "integrity": "sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew==", "requires": { "clone-response": "^1.0.2", "get-stream": "^5.1.0", "http-cache-semantics": "^4.0.0", "keyv": "^4.0.0", "lowercase-keys": "^2.0.0", - "normalize-url": "^4.1.0", + "normalize-url": "^6.0.1", "responselike": "^2.0.0" } }, "chokidar": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", - "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", + "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", "requires": { - "anymatch": "~3.1.1", + "anymatch": "~3.1.2", "braces": "~3.0.2", - "fsevents": "~2.3.1", - "glob-parent": "~5.1.0", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", - "readdirp": "~3.5.0" + "readdirp": "~3.6.0" } }, "clone-response": { @@ -1291,12 +1337,12 @@ } }, "color": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/color/-/color-3.0.0.tgz", - "integrity": "sha512-jCpd5+s0s0t7p3pHQKpnJ0TpQKKdleP71LWcA0aqiljpiuAkOSUFN/dyH8ZwF0hRmFlrIuRhufds1QyEP9EB+w==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/color/-/color-3.2.1.tgz", + "integrity": "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==", "requires": { - "color-convert": "^1.9.1", - "color-string": "^1.5.2" + "color-convert": "^1.9.3", + "color-string": "^1.6.0" } }, "color-convert": { @@ -1313,9 +1359,9 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, "color-string": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.5.tgz", - "integrity": "sha512-jgIoum0OfQfq9Whcfc2z/VhCNcmQjWbey6qBX0vqt7YICflUmBCh9E9CiQD5GSJ+Uehixm3NUwHVhqUAWRivZg==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.6.0.tgz", + "integrity": "sha512-c/hGS+kRWJutUBEngKKmk4iH3sD59MBkoxVapS/0wgpCz2u7XsNloxknyvBhzwEs1IbV36D9PwqLPJ2DTu3vMA==", "requires": { "color-name": "^1.0.0", "simple-swizzle": "^0.2.2" @@ -1327,11 +1373,11 @@ "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==" }, "colorspace": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/colorspace/-/colorspace-1.1.2.tgz", - "integrity": "sha512-vt+OoIP2d76xLhjwbBaucYlNSpPsrJWPlBTtwCpQKIu6/CSMutyzX93O/Do0qzpH3YoHEes8YEFXyZ797rEhzQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/colorspace/-/colorspace-1.1.4.tgz", + "integrity": "sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==", "requires": { - "color": "3.0.x", + "color": "^3.1.3", "text-hex": "1.0.x" } }, @@ -1341,9 +1387,9 @@ "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==" }, "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" }, "decompress-response": { "version": "6.0.0", @@ -1366,9 +1412,9 @@ "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==" }, "dotenv": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz", - "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==" + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.6.0.tgz", + "integrity": "sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==" }, "ecdsa-sig-formatter": { "version": "1.0.11", @@ -1392,32 +1438,29 @@ } }, "fast-glob": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.5.tgz", - "integrity": "sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", + "integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==", "requires": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.0", + "glob-parent": "^5.1.2", "merge2": "^1.3.0", - "micromatch": "^4.0.2", - "picomatch": "^2.2.1" + "micromatch": "^4.0.4" } }, - "fast-safe-stringify": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", - "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==" - }, "fast-xml-parser": { - "version": "3.19.0", - "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-3.19.0.tgz", - "integrity": "sha512-4pXwmBplsCPv8FOY1WRakF970TjNGnGnfbOnLqjlYvMiF1SR3yOHyxMR/YCXpPTOspNF5gwudqktIP4VsWkvBg==" + "version": "3.21.1", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-3.21.1.tgz", + "integrity": "sha512-FTFVjYoBOZTJekiUsawGsSYV9QL0A+zDYCRj7y34IO6Jg+2IMYEtQa+bbictpdpV8dHxXywqU7C0gRDEOFtBFg==", + "requires": { + "strnum": "^1.0.4" + } }, "fastq": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.0.tgz", - "integrity": "sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", "requires": { "reusify": "^1.0.4" } @@ -1463,16 +1506,16 @@ } }, "got": { - "version": "11.8.2", - "resolved": "https://registry.npmjs.org/got/-/got-11.8.2.tgz", - "integrity": "sha512-D0QywKgIe30ODs+fm8wMZiAcZjypcCodPNuMz5H9Mny7RJ+IjJ10BdmGW7OM7fHXP+O7r6ZwapQ/YQmMSvB0UQ==", + "version": "11.8.3", + "resolved": "https://registry.npmjs.org/got/-/got-11.8.3.tgz", + "integrity": "sha512-7gtQ5KiPh1RtGS9/Jbv1ofDpBFuq42gyfEib+ejaRBJuj/3tQFeR5+gw57e4ipaU8c/rCjvX6fkQz2lyDlGAOg==", "requires": { "@sindresorhus/is": "^4.0.0", "@szmarczak/http-timer": "^4.0.5", "@types/cacheable-request": "^6.0.1", "@types/responselike": "^1.0.0", "cacheable-lookup": "^5.0.3", - "cacheable-request": "^7.0.1", + "cacheable-request": "^7.0.2", "decompress-response": "^6.0.0", "http2-wrapper": "^1.0.0-beta.5.2", "lowercase-keys": "^2.0.0", @@ -1523,9 +1566,9 @@ "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" }, "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "requires": { "is-extglob": "^2.1.1" } @@ -1536,9 +1579,9 @@ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" }, "is-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", - "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==" + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==" }, "isarray": { "version": "1.0.0", @@ -1565,6 +1608,13 @@ "lodash.once": "^4.0.0", "ms": "^2.1.1", "semver": "^5.6.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } } }, "jwa": { @@ -1587,9 +1637,9 @@ } }, "keyv": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.0.3.tgz", - "integrity": "sha512-zdGa2TOpSZPq5mU6iowDARnMBZgtCqJ11dJROFi6tg6kTn4nuUdU09lFyLFSaHrWqpIJ+EBq4E8/Dc0Vx5vLdA==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.0.4.tgz", + "integrity": "sha512-vqNHbAc8BBsxk+7QBYLW0Y219rWcClspR6WSeoHYKG5mnsSoOH+BL1pWq02DDCVdvvuUny5rkBlzMRzoqc+GIg==", "requires": { "json-buffer": "3.0.1" } @@ -1635,14 +1685,14 @@ "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=" }, "logform": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/logform/-/logform-2.2.0.tgz", - "integrity": "sha512-N0qPlqfypFx7UHNn4B3lzS/b0uLqt2hmuoa+PpuXNYgozdJYAyauF5Ky0BWVjrxDlMWiT3qN4zPq3vVAfZy7Yg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/logform/-/logform-2.3.0.tgz", + "integrity": "sha512-graeoWUH2knKbGthMtuG1EfaSPMZFZBIrhuJHhkS5ZseFBrc7DupCzihOQAzsK/qIKPQaPJ/lFQFctILUY5ARQ==", "requires": { "colors": "^1.2.1", - "fast-safe-stringify": "^2.0.4", "fecha": "^4.2.0", "ms": "^2.1.1", + "safe-stable-stringify": "^1.1.0", "triple-beam": "^1.3.0" } }, @@ -1651,6 +1701,14 @@ "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==" }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "requires": { + "yallist": "^4.0.0" + } + }, "merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -1691,9 +1749,9 @@ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" }, "normalize-url": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz", - "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==" + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", + "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==" }, "once": { "version": "1.4.0", @@ -1712,14 +1770,14 @@ } }, "p-cancelable": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.0.tgz", - "integrity": "sha512-HAZyB3ZodPo+BDpb4/Iu7Jv4P6cSazBz9ZM0ChhEXp70scx834aWCEjQRwgt41UzzejUAPdbqqONfRWTPYrPAQ==" + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", + "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==" }, "picomatch": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz", - "integrity": "sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==" + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==" }, "process-nextick-args": { "version": "2.0.1", @@ -1764,17 +1822,17 @@ } }, "readdirp": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", - "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "requires": { "picomatch": "^2.2.1" } }, "resolve-alpn": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.1.2.tgz", - "integrity": "sha512-8OyfzhAtA32LVUsJSke3auIyINcwdh5l3cvYKdKO0nvsYSKuiLfTM5i78PJswFPT8y6cPW+L1v6/hE95chcpDA==" + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", + "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==" }, "responselike": { "version": "2.0.0", @@ -1802,10 +1860,18 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" }, + "safe-stable-stringify": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-1.1.1.tgz", + "integrity": "sha512-ERq4hUjKDbJfE4+XtZLFPCDi8Vb1JqaxAPTxWFLBx8XcAlf9Bda/ZJdVezs/NAfsMQScyIlUMx+Yeu7P7rx5jw==" + }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "requires": { + "lru-cache": "^6.0.0" + } }, "serialize-error": { "version": "8.1.0", @@ -1844,6 +1910,11 @@ "ansi-regex": "^4.1.0" } }, + "strnum": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.4.tgz", + "integrity": "sha512-lMzNMfDpaQOLt4B2mEbfzYS0+T7dvCXeojnlGf6f1AygvWDMcWyXYaLbyICfjVu29sErR8fnRagQfBW/N/hGgw==" + }, "text-hex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz", @@ -1935,6 +2006,11 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" } } } diff --git a/package.json b/package.json index b1a341e..838f8bc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stigman-watcher", - "version": "1.1.2", + "version": "1.2.0", "description": "CLI that watches a path for STIG test result files on behalf of a STIG Manager Collection.", "main": "index.js", "bin": { @@ -25,6 +25,7 @@ "jsonwebtoken": "^8.5.1", "n-readlines": "^1.0.1", "prompt-sync": "^4.2.0", + "semver": "^7.3.5", "serialize-error": "^8.0.1", "winston": "^3.3.3" }