You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@senssoft.apache.org by "Joshua Poore (JIRA)" <ji...@apache.org> on 2019/01/12 03:56:00 UTC
[jira] [Resolved] (SENSSOFT-321) Gulp Mocha Dependency Deprecation:
Critical Command Injection Vulnerability
[ https://issues.apache.org/jira/browse/SENSSOFT-321?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joshua Poore resolved SENSSOFT-321.
-----------------------------------
Resolution: Works for Me
RESOLUTION: MOCHA 5.2.0 (after 4.0.0) doesn't like objects as inputs into compilers opt. In gulp file need to turn call to Babel into a string. As below:
{code:java}
gulp.task('test', ['build', 'lint'], function() {
return gulp.src('test/**/*_spec.js', { read : false })
.pipe(mocha({
compilers : 'js:babel-core/register'
}))
.on('error', function(err) {
gutil.log(err);
this.emit('end');
});
});{code}
with this change, tests run again
{code:java}
$npm run test
> useralejs@1.1.0 pretest /Users/jpoore/Documents/Apache_SensSoft/Dev/incubator-senssoft-useralejs-SENSSOFT-192
> gulp lint
[22:38:01] Using gulpfile ~/Documents/Apache_SensSoft/Dev/incubator-senssoft-useralejs-SENSSOFT-192/gulpfile.js
[22:38:01] Starting 'lint'...
[22:38:01] Finished 'lint' after 400 ms
> useralejs@1.1.0 test /Users/jpoore/Documents/Apache_SensSoft/Dev/incubator-senssoft-useralejs-SENSSOFT-192
> gulp test
[22:38:02] Using gulpfile ~/Documents/Apache_SensSoft/Dev/incubator-senssoft-useralejs-SENSSOFT-192/gulpfile.js
[22:38:02] Starting 'rollup'...
[22:38:02] Starting 'rollup-web-ext-options'...
[22:38:02] Starting 'rollup-web-ext-background'...
[22:38:02] Starting 'rollup-web-ext-content'...
[22:38:02] Starting 'lint'...
[22:38:02] Finished 'rollup-web-ext-background' after 167 ms
[22:38:02] Finished 'rollup' after 171 ms
[22:38:02] Finished 'rollup-web-ext-options' after 169 ms
[22:38:02] Finished 'rollup-web-ext-content' after 169 ms
[22:38:02] Starting 'build-web-ext'...
[22:38:03] Finished 'build-web-ext' after 372 ms
[22:38:03] Starting 'build'...
[22:38:03] Finished 'lint' after 559 ms
[22:38:03] Finished 'build' after 178 ms
[22:38:03] Starting 'test'...
(node:5886) DeprecationWarning: "--compilers" will be removed in a future version of Mocha; see https://git.io/vdcSr for more info
attachHandlers
✓ attaches all the event handlers without duplicates
✓ debounces bufferedEvents (504ms)
defineDetails
- configures high detail events correctly
configure
✓ merges new configs into main config object
✓ includes a userid if present in the window.location
getUserIdFromParams
✓ fetches userId from URL params
✓ returns null if no matching param
getInitialSettings
timeStampScale
✓ no event.timestamp
✓ zero
✓ epoch milliseconds
✓ epoch microseconds
✓ performance navigation time
getInitialSettings
✓ fetches all settings from a script tag (123ms)
✓ grabs user id from params
Userale API
✓ provides configs
✓ edits configs
✓ starts + stops (210ms)
✓ sends custom logs
packageLogs
setLogFilter
✓ assigns the handler to the provided value
✓ allows the handler to be nulled
setLogMapper
✓ assigns the handler to the provided value
✓ allows the handler to be nulled
packageLog
✓ only executes if on
✓ calls detailFcn with the event as an argument if provided
✓ packages logs
✓ filters logs when a handler is assigned and returns false
✓ assigns logs to the mapper's return value if a handler is assigned
✓ does not call the map handler if the log is filtered out
✓ does not attempt to call a non-function filter/mapper
extractTimeFields
✓ returns the millisecond and microsecond portions of a timestamp
✓ sets micro to 0 when no decimal is present
✓ always returns an object
getLocation
✓ returns event page location
✓ calculates page location if unavailable
✓ fails to null
selectorizePath
✓ returns a new array of the same length provided
getSelector
✓ builds a selector
✓ identifies window
✓ handles a non-null unknown value
buildPath
✓ builds a path
✓ defaults to path if available
sendLogs
✓ sends logs on an interval
✓ does not send logs if the config is off
✓ sends logs on page exit with navigator
✓ sends logs on page exit without navigator
✓ does not send logs on page exit if config is off
45 passing (957ms)
1 pending
[22:38:05] Finished 'test' after 2.54 s{code}
Will need to revisit gulp-mocha as we move to update Gulp–they are removing the concept of compiler.
> Gulp Mocha Dependency Deprecation: Critical Command Injection Vulnerability
> ---------------------------------------------------------------------------
>
> Key: SENSSOFT-321
> URL: https://issues.apache.org/jira/browse/SENSSOFT-321
> Project: SensSoft
> Issue Type: Bug
> Components: UserALE.js
> Affects Versions: UserALE.js 1.0.0, UserALE.js 1.1.0
> Environment: javascript
> Reporter: Joshua Poore
> Assignee: Joshua Poore
> Priority: Critical
> Fix For: UserALE.js 1.1.0
>
> Attachments: Gulp Mocha Vulnerability
>
>
> Gulp Mocha v3.x has a critical vulnerability (see attached terminal output for details) due to "growl" package dependency. Vulnerability must be fixed before deployed on a network with any exposure.
> Running NPM/Node v 11.6
> Will post in comments as issue is explored.
>
>
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)