Update dependency vega to v5.23.0 [SECURITY] #78
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
5.6.0
->5.23.0
GitHub Vulnerability Alerts
CVE-2023-26487
Summary
Vega's
lassoAppend
function:lassoAppend
accepts 3 arguments and internally invokespush
function on the 1st argument specifying array consisting of 2nd and 3rd arguments aspush
call argument. The type of the 1st argument is supposed to be an array, but it's not enforced.This makes it possible to specify any object with a
push
function as the 1st argument,push
function can be set to any function that can be access viaevent.view
(no all such functions can be exploited due to invalid context or signature, but some can, e.g.console.log
).Details
The issue is that
lassoAppend
doesn't enforce proper types of its arguments:PoC
Use the following Vega snippet (depends on browser's non-built-in
event.view.setImmediate
function, feel free to replace withevent.view.console.log
or alike and observe the result in the browser's console)Impact
This issue opens various XSS vectors, but exact impact and severity depends on the environment (e.g. Core JS
setImmediate
polyfill basically allowseval
-like functionality).CVE-2023-26486
Summary
The Vega
scale
expression function has the ability to call arbitrary functions with a single controlled argument. This can be exploited to escape the Vega expression sandbox in order to execute arbitrary JavaScript.Details
The scale expression function passes a user supplied argument
group
to getScale, which is then used as if it were an internal context. Thecontext.scales[name].value
is accessed fromgroup
and called as a function back inscale
.PoC
The following Vega definition can be used to demonstrate this issue executing the JavaScript code
alert(1);
This can be viewed in the Vega online IDE at https://vega.github.io/editor/#/url/vega/N4IgJAzgxgFgpgWwIYgFwhgF0wBwqgegIDc4BzJAOjIEtMYBXAI0poHsDp5kTykSArJQBWENgDsQAGhAATJJhSoA2qHFIEcNCAAaAZT0ACAApsAwtJDEkAGwZwIaZQEYAujMwAnJOIgAzNk8EJ1BMAE8cLXQAoIYbFBkkR3QNNgZxTEs4AA8cT21oWzgACgByP3SoUqlDcTibGsNgKAlMHMxUJsKbB07gCvEoPus7OE7ukvLK6sNSuBHihTYmYoAdEABNAHVsmyhxAEU2AFk9AGsAdnWASmuZ5tb2von8JoGhppH7TuVXShbfF4GFBMIF-hIIECQYEAL5wmHXeEIkAw1yomFAA
Release Notes
vega/vega (vega)
v5.23.0
Compare Source
Changes from v5.22.1:
This version contains dependency updates, bug fixes, and security patches, plus a few extra utilities to aid Vega-Lite.
monorepo
.mjs
extensions.vega-canvas
vega-crossfilter
vega-dataflow
vega-encode
vega-event-selector
vega-expression
vega-force
vega-format
vega-functions
lassoAppend
expression function XSS. (Thanks @arvind!)scale
expression function XSS (Thanks @ajxchapman and @hydrosquall!)vega-geo
vega-hierarchy
vega-interpreter
vega-label
vega-loader
vega-parser
view
style for Vega-Lite, #3480 (Thanks @arvind!)vega-projection
vega-projection-extended
vega-regression
vega-runtime
vega-scale
registerScale()
andisRegisteredScale()
methods. (Thanks @hydrosquall!)vega-scenegraph
vega-schema
__count__
private from schema, #3659 (Thanks @lsh!)vega-selections
vega-statistics
vega-time
vega-transforms
vega-typings
__count__
private from schema, #3659 (Thanks @lsh!)vega-util
vega-view
vega-view-transforms
vega-voronoi
vega-wordcloud
vega-cli
vega
v5.22.1
Compare Source
Changes from v5.22.0:
monorepo
vega-scenegraph
v5.22.0
Compare Source
Changes from v5.21.0:
docs
monorepo
vega-functions
vega-label
vega-scenegraph
vega-selections
vega-transforms
vega-typings
v5.21.0
Compare Source
Changes from v5.20.2:
monorepo
vega
vega-event-selector
vega-expression
vega-label
vega-loader
baseURL
is not prepended todata:
URLs. (#3195)vega-parser
vega-runtime
vega-statistics
sampleCurve
utility to properly scale values in angle subdivision test. (#3173)vega-typings
vega-util
v5.20.2
Compare Source
Changes from v5.20.1:
vega-view
v5.20.1
Compare Source
Changes from v5.20.0:
monorepo
vega-dataflow
vega-transforms
vega-typings
v5.20.0
Compare Source
Changes from v5.19.1:
monorepo
vega
vega-scenegraph
vega-schema
vega-typings
vega-util
vega-view
v5.19.1
Compare Source
Changes from v5.19.0:
vega-schema
v5.19.0
Compare Source
Changes from v5.18.0:
vega-functions
pluck
expression function. (thanks @arvind!)vega-parser
values
property. (thanks @domoritz!)vega-scenegraph
vega-schema
vega-selections
v5.18.0
Compare Source
Changes from v5.17.3:
vega
vega-functions
vega-selections
v5.17.3
Compare Source
Changes from v5.17.2:
vega-expression
vega-functions
vega-parser
vega-view
v5.17.2
Compare Source
Changes from v5.17.1:
vega-expression
vega-functions
vega-parser
vega-schema
vega-selections
vega-view
v5.17.1
Compare Source
Changes from v5.17.0:
vega-geo
vega-expression
vega-typings
v5.17.0
Compare Source
Changes from v5.16.1:
vega-canvas
vega-loader
vega-util
isIterable
utility.v5.16.1
Compare Source
Changes from v5.16.0:
monorepo
v5.16.0
Compare Source
Notable Changes
label
transform automatically positions labels without overlapping other marks. (Thanks @chanwutk!)Changelog
Changes from v5.15.0:
docs
monorepo
vega
vega-canvas
vega-crossfilter
vega-dataflow
vega-encode
vega-event-selector
vega-expression
vega-functions
vega-force
vega-format
vega-geo
vega-hierarchy
vega-interpreter
vega-label
vega-loader
vega-parser
vega-projection
vega-projection-extended
vega-regression
vega-runtime
vega-scale
vega-scenegraph
vega-schema
vega-selections
vega-statistics
vega-time
vega-transforms
vega-typings
vega-util
vega-view-transforms
vega-view
vega-voronoi
vega-wordcloud
v5.15.0
Compare Source
Changes from v5.14.0:
monorepo
vega
vega-core
build to use D3 v6.vega-scale
turbo
andcividis
color palettes. (thanks @mcnuttandrew!)v5.14.0
Compare Source
Notable Changes
function
declarations where appropriate.let
andconst
tovar
.Changelog
Changes from v5.13.0:
vega-cli
vega-canvas
vega-crossfilter
vega-dataflow
addAll
to clear rem set when applicable. This prevents tuple removal from being invoked on newly instantiated operators that never observed those tuples in the first place. (#2605)vega-encode
vega-event-selector
vega-expression
vega-force
vega-format
vega-functions
vega-geo
vega-hierarchy
vega-label
vega-loader
vega-parser
vega-projection
vega-regression
vega-scale
vega-scenegraph
markup
andserializeXML
utilities for SVG string output. Ensure proper XML output. (#2672)xmllint
checks to test conformance of SVG output.SVGStringRenderer
class methods to use markup utility.openTag
,closeTag
utilities.vega-statistics
vega-time
vega-transforms
vega-view-transforms
vega-view
vega-util
members
argument toinherits
utility.ascending
comparator utility.vega-voronoi
vega-wordcloud
v5.13.0
Compare Source
Notable Changes
Improved Streaming Performance.
For performance, Vega caches a lot of internal data structures, including calculated tuples, scenegraph items, and SVG DOM nodes. Previously, nested scopes (such as those created for facetted data) that result in vega-runtime subcontexts were never cleaned. If no external View API calls are made, this is fine, and actually improves performance for interaction-driven dynamic filtering. However, when providing streaming data to Vega through the View API, uncleaned caches and subcontexts can result in substantial memory leaks that also eventually degrade performance.
This version adds mechanisms for clearing caches and detaching subflows to support streaming data within nested specifications. When input data is removed via a View API call or via signal-valued URL, Vega will now by default trigger garbage collection to reclaim resources. This behavior can be disabled by calling
clean(false)
on a constructed ChangeSet passed to the View API.Improved Cursor Performance.
Previously Vega updated the
cursor
style on the HTML document body. This persists cursor settings even during interactions (such as drags) that may leave the Vega View component. However, it also can result in large performance penalties in Chrome, which re-evaluates CSS styles in response. This version changes the default behavior to set the cursor locally on the Vega View component. If a global cursor is desired, the boolean config propertyevents.globalCursor
can be settrue
or the View methodglobalCursor
can be invoked to change the setting at runtime.Optional Expression Interpreter.
This release adds interpreter support for Vega expressions that is Content Security Policy (CSP) compliant. By default, the Vega parser performs code generation for parsed Vega expressions, and the Vega runtime uses the Function constructor to create JavaScript functions from the generated code. Although the Vega parser includes its own security checks, the runtime generation of functions from source code nevertheless violates security policies designed to prevent cross-site scripting.
This release provides an interpreter plug-in (the new
vega-interpreter
package) that evaluates expressions by traversing an Abstract Syntax Tree (AST) for an expression and performing each operation in turn. Use of the interpreter enables compliance with CSP, but can incur a performance penalty. In tests of initial parse and dataflow evaluation times, the interpreter is on average ~10% slower. Interactive updates may incur higher penalties, as they are often more expression-heavy and amortize the one-time cost of Function constructor parsing.Changelog
Changes from v5.12.3:
vega
stream.html
andstream-nested.html
performance test pages.vega-dataflow
detach
method toOperator
to remove adjacent edges (listeners) from the dataflow graph.clean
setter toChangeSet
, set totrue
by default if any tuples are removed.clean
getter/setter to Pulse, propagate value to forked pulses if they share a datasource
.vega-encode
DataJoin
transform to clean internal map whenpulse.clean()
is true.Scale
to includedomainMid
as an extrema if it exceeds the domain min or max. (#2656)vega-functions
undefined
input. This ensures identical semantics with the internal_scale
helper function used by code-generated encoders.vega-geo
vega-interpreter
vega-projection
vega-projection-extended
vega-runtime
detach
method to remove subcontexts. Export asdetachSubflow
on the head operator of a generated subflow.vega-statistics
numbers
utility to exclude empty string.vega-transforms
Aggregate
transform to clean internal map whenpulse.clean()
is true.Facet
,PreFacet
, andSubflow
transforms to prune subflows in response topulse.clean()
.Load
transform to setpulse.clean(true)
when removing loaded data.Bin
andExtent
to treat empty string as a missing value. (thanks @domoritz!)vega-typings
eventConfig.globalCursor
to config typings.vega-util
fastmap
andvisitArray
utilities.vega-view
expr
to pass in a custom expression evaluator.globalCursor
method and event configuration.v5.12.3
Compare Source
Notable Changes
The previous Vega v5.12.0 release introduced changes to how SVG was generated, including the addition of an internal stylesheet. However, this leads to integration issues with downstream tools (including at least one popular SVG optimizer) that do not support stylesheet parsing. In addition, local performance tests indicate faster rendering in Chrome when using presentation attributes instead of CSS styling. This version (v5.12.3) now changes the SVG output to favor presentation attributes (
fill="blue"
) over CSS style (style="fill: blue;"
).CSS styles have been removed in all but one case: the use of
image-rendering
for non-smoothed images, where browser differences require multiple style definitions to appease both Chrome and Firefox, something we can't express with presentation attributes alone. If and when Firefox properly supportsimage-rendering: pixelated
we can consider dropping this last use of CSS.Note that external stylesheets can still be used to style Vega SVG content, and may now have higher specificity due to the use of attributes.
Changelog
Changes from v5.12.2:
monorepo
vega
vega-cli
vega-format
vega-geo
vega-hierarchy
vega-parser
vega-projections-extended
vega-scenegraph
vega-schema
vega-time
vega-transforms
v5.12.2
Compare Source
Changes from v5.12.1:
vega-scenegraph
vega-typings
v5.12.1
Compare Source
Changes from v5.12.0:
monorepo
vega-cli
vega-parser
vega-scenegraph
vega-transforms
vega-typings
vega-view
v5.12.0
Compare Source
Notable Additions
locale
option, and Vega specs support aconfig.locale
property. Locale objects should havenumber
and/ortime
properties that map to valid d3-format or d3-time-format locale definitions.toCanvas
now accepts anexternalContext
option to draw into a separately managed canvas instance. For example, one could draw multiple Vega views into the same node-canvas instance for server-side PDF document generation.orient
properties. This addition allows the position of an axis (e.g., left versus right) to be dynamically updated at runtime. The feature should be considered experimental; subtle bugs may still arise.ast
option flag to include generated abstract syntax trees for expressions in the parser output. AllFunction
constructor use for generated code is now consolidated into a single file in the vega-runtime package and could be overridden if an expression AST interpreter is implemented.Changelog
Changes from v5.11.1:
vega
bar-time
test specification to test locale config usage.budget-forecasts
test specification.vega-cli
vega-dataflow
vega-encode
vega-expression
this
global variable.vega-format
vega-functions
this
context.vega-geo
size
setter input checks.vega-loader
read
method.vega-parser
code
property.translate
property. (Thanks @haldenl!)orient
property. (Thanks @haldenl!)parse
.ast
parse option to enable AST output from expression parser.vega-runtime
vega-scale
vega-scenegraph
externalContext
CanvasRenderer option. (Thanks @pixelspark!)resetSVGDefIds
to reset gradient and clip id counter. (Thanks @kanitw!)vega-schema
translate
signal support to schema.orient
to schema.vega-time
vega-transforms
Function
constructor.vega-typings
externalCanvas
render option to typings.translate
signal support to typings.orient
to typings.vega-util
field
,key
, andcompare
methods to no longer use theFunction
constructor.vega-view
vega-view-transforms
ViewLayout
reflow to ensure group bounds are updated. (#2568)vega-wordcloud
v5.11.1
Compare Source
Changes from v5.11.0:
monorepo
vega-hierarchy
vega-scenegraph
vega-statistics
vega-view-transforms
v5.11.0
Compare Source
Notable Additions
description
andaria
properties. Individual mark items do not include ARIA attributes by default (which helps prevent bloat of both the scenegraph and output SVG), but these can be added usingdescription
andaria
encoding channels.dayofyear
time unit support for thetimeunit
transform.dayofyear
,week
,utcdayofyear
, andutcweek
expression functions.domainCap
,gridCap
, andtickCap
properties.Changelog
Changes from v5.10.1:
monorepo
vega
calendar
test specification.overview-detail-bins
test spec to test suite.description
property output.vega-encode
vega-functions
dayofyear
,week
,utcdayofyear
,utcweek
expression functions.vega-geo
vega-parser
aria
anddescription
properties.zindex
support for guide config.domainCap
,gridCap
, andtickCap
properties. (Thanks @kanitw!)vega-scale
domainCaption
utility.tickMinStep
(#2550, thanks @rwoollen!)vega-scenegraph
<g>
tags for mark items include automaticrole
andaria-roleDescription
attributes.<g>
tags for axes and legends include automaticaria-label
captions.aria
anddescription
properties. Ifaria
isfalse
, the content is hidden from the accessibility tree by settingaria-hidden
SVG attribute. Thedescription
property determines thearia-label
SVG attribute.aria
anddescription
. If adescription
is provided andaria !== false
, then Vega will generate accompanyingrole
andaria-roledescription
attributes for a mark item.ariaRole
andariaRoleDescription
encoding channels for individual marks, which override the defaultrole
andaria-roledescription
attributes generated by Vega. However, note that these are experimental features and so may change at a later date.vega-schema
domainCap
,gridCap
, andtickCap
properties.vega-time
dayofyear
time unit support and corresponding tests.dayofyear
,week
,utcdayofyear
,utcweek
utility functions.TIME_UNITS
array of valid time unit strings.vega-transforms
TimeUnit
transform parameter schema to enforce valid time unit strings.vega-typings
dayofyear
option toTimeUnit
transform typings.zindex
support for guide config.domainCap
,gridCap
, andtickCap
properties.vega-view
v5.10.1
Compare Source
Changes from v5.10.0:
vega-encode
vega-loader
startsWith
rather thanindexOf
for string prefix checks.vega-parser
startsWith
rather thanindexOf
for string prefix checks.fill
andsize
fortrail
mark config.vega-transforms
window
operator init state forprev_value
andnext_value
. (#2475.)vega-typings
vega-view-transforms
Overlap
transform to early exit when there are no items (#2449).v5.10.0
Compare Source
Notable Additions
background
signal which the view uses to set the background color. While not technically a breaking change (specs will still parse and evaluate successfully), existing specs that use a signal named"background"
may not render the same as before, in which case a different signal name should be used.autosize
,background
,padding
,width
,height
) accept signal references, such as{"signal": "<expr>"}
, which map to a signal definition'supdate
property. If the top-levelsignals
array contains an entry that matches one of these properties, the definitions will be merged, with precedence given to the properties defined in thesignals
array.role
attribute is set to"figure"
, and thearia-label
attribute is set to the specificationdescription
property.aggregate
andwindow
transforms support theproduct
operation to multiply values.lineBreak
option for setting a global default for text line breaks. This property should be a string or regexp value, or a corresponding signal reference.baseline
valuesline-top
andline-bottom
. These values are similar totop
andbottom
baselines, but calculated relative to thelineHeight
rather thanfontSize
alone.blend
encoding channel. The allowed values are:multiply
,screen
,overlay
,darken
,lighten
,color-dodge
,color-burn
,hard-light
,soft-light
,difference
,exclusion
,hue
,saturation
,color
,luminosity
. For Canvas rendering, the blend is set via the context 2DglobalCompositeOperation
property. For SVG rendering, the blend is set via the CSSmix-blend-mode
style. The default Vega value isnull
(orundefined
), which maps to the default values"source-over"
(for Canvas) and"normal"
(for SVG). For more, see the CanvasglobalCompositeOperation
and CSSmix-blend-mode
documentation, including limitations in cross-browser support.crossOrigin="anonymous"
by default for loaded images, which allows images loaded from a different host to be included in exported visualization images (and thereby avoid "tainted canvas errors"), so long as the server provides permission via proper CORS headers. This default can be overridden by providing loader options to the Vega view that include acrossOrigin
property. If this property is defined and maps to a value ofnull
orundefined
, then ano-cors
fetch will be performed instead.labelOffset
property to adjust axis label position in addition totickOffset
, andlabelLineHeight
to set the lConfiguration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.