Skip to content

Tags: go-yaml/yaml

Tags

v3.0.1

Toggle v3.0.1's commit message
The Billion Dollar Mistake

To be fair, it only happens here because this is a C-style API that was
converted to Go but keeping its general shape. The proper fix, to be
done eventually, is to replace all these boolean error flags by proper
error types.

Fixes #665

v3.0.0

Toggle v3.0.0's commit message
github: drop broken semgrep workflow

v2.4.0

Toggle v2.4.0's commit message
Revert v2 line length change as discussed in #670

It was clearly a mistake to accept the default formatting change in v2,
and now there's no ideal choice. Either we revert the change and break
some projects twice, or we keep the change and break some projects once.
Given the report comes from Kubernetes, which has a relevant community
and code size, we'll revert it. At the same time, to simplify the life
of those that already started migrating towards the v3 behavior, a new
FutureLineWrap function is being introduced to trivially preserve the
new behavior where desired.

The v3 branch is not affected by this, and will retain the default
non-wrapping behavior. It will also be changed soon to support per
arbitrary line-wrapping for individual encoding operations.

Thanks to everyone who offered code and ideas, and apologies for
the trouble.

v2.3.0

Toggle v2.3.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Set the default line length to infinity (-1) (#571)

v2.2.8

Toggle v2.2.8's commit message
Optimize cases with long potential simple_keys (#555)

This change introduces an index to lookup token numbers referenced by simple_keys in O(1),
thus significantly reducing the performance impact of certain abusively constructed snippets.

When we build up the simple_keys stack, we count on the (formerly named) staleness check to
catch errors where a simple key is required but would be > 1024 chars or span lines. The previous
simplification that searches the stack from the top can go 1024 keys deep before finding a "stale"
key and stopping. I added a test that shows that this consumes ~3s per 1MB of document size.

v2.2.7

Toggle v2.2.7's commit message
Fix issue in simple_keys improvements (#548)

v2.2.6

Toggle v2.2.6's commit message
Update travis config to use latest go versions (#540)

v2.2.5

Toggle v2.2.5's commit message
Fix check for non-map alias merging in v2 (#529)

The problem does not affect v3.

v2.2.4

Toggle v2.2.4's commit message
Improve heuristics preventing CPU/memory abuse (#515)

This addresses the following items:

==== Parse time of excessively deep nested or indented documents

Parsing these documents is non-linear; limiting stack depth to 10,000 keeps parse times of pathological documents sub-second (~.25 seconds in benchmarks)

==== Alias node expansion limits

The current limit allows 10,000% expansion, which is too permissive for large documents.

Limiting to 10% expansion for larger documents allows callers to use input size as an effective way to limit resource usage. Continuing to allow larger expansion rates (up to the current 10,000% limit) for smaller documents does not unduly affect memory use.

This change bounds decode operations from alias expansion to ~400,000 operations for small documents (worst-case ~100-150MB) or 10% of the input document for large documents, whichever is greater.

v2.2.3

Toggle v2.2.3's commit message
Add logic to catch cases of alias abuse.

Backport of caeefd8.