Go agent release notes
Release date: September 5, 2024
Language versions currently supported: 1.21 (deprecated), 1.22, 1.23
New and improved:
Improved the default method for the app name in cases where build command includes a list of Go files instead of packages. (GO-1945)
Release date: August 23, 2024
Language versions currently supported: 1.21 (deprecated), 1.22, 1.23
New and improved:
The Go agent now supports the use of
CONTRAST__API__TOKEN
instead ofCONTRAST__API__URL
,CONTRAST__API__API_KEY
,CONTRAST__API__SERVICE_KEY
, andCONTRAST__API__USER_NAME
for communication with Contrast. (GO-2149)Note
Contrast TeamServer is not yet adding the token to the downloadable agent configuration file.
Release date: August 22, 2024
Language versions currently supported: 1.20 (deprecated), 1.21, 1.22, 1.23
New and improved:
Added support for Go 1.23. (GO-2130)
Improved handling of hash/kw collisions in pipelines. (GO-2134)
Bug fixes:
Fixed a race condition when calling
SetFinalizer
in tracker. (GO-2155)
Release date: August 8, 2024
Language versions currently supported: 1.20 (deprecated), 1.21, 1.22
New and improved:
Made API changes that improved performance. (multiple GO tickets)
The agent now reports Cloud Resource Identifiers. (GO-1695)
Added initial support for Go v1.23. (multiple GO tickets).
Go v1.23 is not an officially supported version yet.
Release date: June 18, 2024
Language versions currently supported: 1.20 (deprecated), 1.21, 1.22
New and improved:
Removed
tag.Tags
interface. The agent now uses the underlying type directly. (GO-2075)The agent now uses a new startup endpoint. (GO-2069)
On-premises customers: The minimum TeamServer version for this feature is 3.11.2. This version and future versions of the Go agent will fail to start up with older TeamServer versions.
Refactored policy test helpers to use a new API. (GO-2089)
Add a
framework
field for route discovery. (GO-2119)Added a feature flag to let customers configure the route observation error code check. (GO-2093)
Release date: May 31, 2024
Language versions currently supported: 1.20 (deprecated), 1.21, 1.22
New and improved:
Multiple performance optimizations.
Updated route observation behavior to match the Contrast Agent Route Observation Error Handling specification.
Bug fixes:
Multiple minor bug fixes.
Fixed a memory leak that an issue with tracker instances was causing. (GO-2094)
Release date: April 29, 2024
Language versions currently supported: 1.20 (deprecated), 1.21, 1.22
New and improved:
Improved performance for Assess.
The
contrast-go -v [...]
now results in logs in pure JSON format. (GO-2054)
Bug fixes:
The contrast-go agent can now run with Dynatrace. (GO-2066)
Previously, Dynatrace would crash due to a change in the size of
internal/poll.fdMutex
.
Release date: March 15, 2024
Language versions currently supported: 1.20 (deprecated), 1.21, 1.22
New and improved:
Changed the route observation reporting interval from 10 seconds to 30 seconds.
Release date: February 22, 2024
Language versions currently supported: 1.20 (deprecated), 1.21, 1.22
New and improved:
Added full support for Go 1.22 features.
Release date: February 15, 2024
Language versions currently supported: 1.20, 1.21
New and improved:
Added additional support for Go 1.22.
Full support for Go 1.22 features is in progress.
Bug fixes:
Fixed a bug that affected the way some files with special compiler directives were printed. (GO-2035)
Release date: February 7, 2024
Language versions currently supported: 1.20, 1.21
New and improved:
This agent is compatible with Go 1.22. If you update your applications to Go 1.22, they will continue to work with Contrast.
Support for new features introduced in Go 1.22 is planned for a future release.
Release date: January 22, 2024
Language versions currently supported: 1.20, 1.21
New and improved:
Improved general agent performance.
Bug fixes:
Fixed an issue with Protect attack vector masking. (GO-1986)
Fixed an issue where the rewriter could break build tag formatting and cause build failures. (GO-1981)
Release date: December 18, 2023
Language versions currently supported: 1.20, 1.21
New and improved:
The agent now supports Contrast Protect functionality.
The agent no longer supports Go 1.19.
Improved performance for Assess operations.
Release date: December 12, 2023
Language versions currently supported: Go:1.19, 1.20, 1.21
New and improved:
Improves
contrast-go
build compatibility with older, unsupported versions of frameworks. Previously,contrast-go
could break builds in these scenarios. Now, the build succeeds and warnings are written to the log to alert users that they are using an unsupported version. (GO-1891)The agent now reports effective configuration settings to Contrast. The application mode is displayed in the Contrast web interface. (GO-1636)
Bug fixes:
Fixes a build error when using the slice operator on a generic byte array. (GO-1955)
Release date: November 27, 2023
Language versions currently supported: Go:1.19, 1.20, 1.21
New and improved:
Made performance improvements for Assess. (GO-1929, GO-1923, GO-1946)
The Go agent now supports version 2.40 and later of the Go Fiber framework.
Bug fixes:
Fixed a race condition that could cause build failures for Go commands which compile multiple main packages. (GO-1935)
Improved dataflow accuracy when tracking map keys (GO-1948)
Release date: November 2, 2023
Language versions currently supported: Go:1.19, 1.20, 1.21
Bug fixes:
Fixed a couple of cases where
contrast-go
could cause build errors. (GO-1907)Fixed a case where the
contrast-go
type checking would fail and cause the agent to skip instrumenting some packages. (GO-1853)Fixed an issue with the handling the shutdown reaction in the response during application creation. (GO-1936)
Release date: October 26, 2023
Language versions currently supported: Go:1.19, 1.20, 1.21
New and improved:
Improved behavior of requests from
net/http
sources so that the agent doesn’t try to read the request body ahead of time. (GO-1925)Improved performance when propagating through the
unicode/utf8
package. (GO-1924)
Release date: October 20, 2023
Language versions currently supported: Go:1.19, 1.20, 1.21
Bug fixes:
Fixed an issue where the agent was capturing stack traces in certain propagators for no reason, which could cause performance issues. (GO-1917)
Fixed a bug where
contrast-go
could generate invalid code and cause build failures. (GO-1904)
Release date: October 12, 2023
Language versions currently supported: Go:1.19, 1.20, 1.21
New and improved:
Improved the accuracy of the path-traversal rule. (GO-1892)
Bug fixes:
Fixed an issue where propagation through JSON marshaling was causing performance issues. (GO-1912)
Release date: October 4, 2023
Language versions currently supported: Go:1.19, 1.20, 1.21
New and improved:
The Go agent now supports Go 1.21.
Release date: September 19, 2023
Language versions currently supported: Go:1.19, 1.20
New and improved:
Added policy to track gRPC messages served by the
net/http.Handler
interface. (GO-1268)
Release date: September 15, 2023
Language versions currently supported: Go:1.19, 1.20
New and improved:
Added support for github.com/gofiber/fiber v2.48.0 and later.
Added support for github.com/valyala/fasthttp v1.46.0 and later.
Release date: September 5, 2023
Language versions currently supported: Go:1.19, 1.20
New and improved:
Improved trace presentation details.
Improved accuracy and performance.
Release date: July 21, 2023
Language versions currently supported: Go:1.19, 1.20
New and improved:
Added support for the Contrast CLI command:,
contrast-go help
.Added a policy for propagation though
gin.StingToBytes
andgin.BytesToString
.
Bug fixes:
Fixed an use that could cause panics when tracking stack-allocated byte slices.
Release date: June 27, 2023
Language versions currently supported: Go:1.19, 1.20
New and improved:
Updated dependency versions.
Bug fixes:
Fixed an issue that caused aarch64 builds to fail.
Release date: June 20, 2023
Language versions currently supported: Go:1.19, 1.20
New and improved:
Updated multiple dependency versions.
Update diagnostic output to align with Contrast specifications.
Improved how agent shut down and flush occurs on
SIGTERM
andSIGINT
.
Release date: April 25, 2023
Language versions currently supported: Go:1.19, 1.20
New and improved:
Improvements and bug fixes for data accuracy.
Removed support for Go 1.18
Release date: November 14, 2022
Language versions currently supported: Go: 1.18, 1.19
New and improved:
Added support for Chi framework
Release date: October 25, 2022
Language versions currently supported: Go: 1.18, 1.19
New and improved:
Added route discovery and observation for the julienschmidt/httprouter routing library.
Bug fixes:
Fixed a configuration options merge issue that unintentionally disabled Assess under some conditions. (GO-1567)
Updated routes deduplication algorithm. (GO-1528)
Release date:January 11, 2022
Language versions currently supported: Go: 1.16, 1.17
New and improved:
Use main package path as default application name.
Bug fixes:
Minor bug fixes and improvements.
Release date: October 12, 2022
Language versions currently supported: Go: 1.18, 1.19
New and improved:
Go Agent 4.0 uses direct communication with the Contrast web interface. The dependency on Contrast service is removed from the agent and the option to use Contrast service for communication is no longer supported.
gRPC support is out of preview status and is now generally available.
Added support for go1.19 language features.
Improved accuracy of gRPC message tracking.
Bug fixes:
Fixed swagger route discovery failure.
Release date: September 8, 2022
Language versions currently supported: Go: 1.17, 1.18
New and improved:
Reduced instrumentation overhead and improved agent performance.
Improved accuracy of gRPC message tracking.
Release date: August 26, 2022
Language versions currently supported: Go: 1.17, 1.18
New and improved:
Added X-Powered-By-Set Assess response analysis
Bug fixes:
Agent failed to start in case of config option misconfiguration (GO-1497)
Fixed a race condition in concurrent map access that might result in a crash (GO-1467)
Release date: August 19, 2022
Language versions currently supported: Go: 1.17, 1.18
New and improved:
Log diagnostic data to JSON file at agent startup
Fixed logs inconsistency in cached build logs
Added process ID to the log entires
Release date: August 2, 2022
Language versions currently supported: Go: 1.17, 1.18
Bug fixes:
contrast-go
build failed in 1.18 modules whenany
is redeclared. (GO-1464)
Release date: August 5, 2022
Language versions currently supported: Go: 1.17, 1.18
Bug fixes:
Fixed a crash condition that occurred when all required fields were missing from the configuration (GO-1446)
Improved code instrumentation when encountering shadowed type names (GO-1472)
Release date: July 28, 2022
Language versions currently supported: Go: 1.17, 1.18
Bug fixes:
Agent only reported routes for one service in gRPC apps with multiple services. (GO-1465)
Agent caused a memory leak in certain scenarios where an instrumented application spawns a long-running
goroutine
. (GO-1461)
Release date: July 7, 2022
Language versions currently supported: Go: 1.17, 1.18
Warning
The Go agent now defaults to communicating directly with Contrast, rather than indirectly through the Contrast service.
This change will break environments where an instrumented app is running in a separate network than the Contrast service and the instrumented app is not configured to communicate with Contrast.
We encourage users to update the instrumented app’s network to allow direct communication, and to remove the Contrast service. Alternately, you may choose to continue to use the Contrast service by setting
agent.service.bypass=false
in YAML configuration or settingCONTRAST_AGENT_SERVICE__BYPASS=false
as an environment variable.
The contrast-go rewriter and Go agent no longer support go1.16
Users should update to the latest version of go1.17 or go1.18, or continue to use contrast-go v2.8.0 if they choose to stay on go1.16
New and improved:
The Go agent now supports log rotation. Log rotation can be configured using the following options:
agent: logger: rotate: enable: true # defaults to false max_size_mb: 10 # defaults to 1. sets the maximum size of an individual log file backup_count: 3 # defaults 10. sets the number of backup files to retain compress: false # defaults to false. enables compression of rotated files
It can also be configured through environment variables. Backups are stored in agent.logger.path with a timestamp appended to the base of the filename.
The Go agent now drops route observations reports under high load to improve application request throughput.
The Go agent short circuits more instrumentation when disabled, resulting in lower memory usage.
Release date: June 9, 2022
Language versions currently supported: Go: 1.16, 1.17, 1.18
New and improved:
Improvements to vulnerability rendering.
Log messages now use a user-friendly time format rather than Unix epochs.
Bug fixes:
Agent now correctly reports routes discovered for applications written with the go-swagger framework (GO-1377).
Agent now correctly reports library usage data for applications written with the Gin framework (GO-1292).
Release date: April 25, 2022
Language versions currently supported: Go: 1.16, 1.17, 1.18
New and improved:
Support for Go 1.18.
Bug fixes:
Various minor fixes.
Release date: April 14, 2022
Language versions currently supported: Go: 1.16, 1.17
New and improved:
Bug fixes:
Update to include Go security fixes in Golang release 1.17.9.
Release date: April 14, 2022
Language versions currently supported: Go: 1.16, 1.17
New and improved:
Support for
go-swagger
APIs.Route discovery and observation for gRPC APIs written with
google.golang.org/grpc
.
Bug fixes:
gRPC trace titles are now reported more uniquely for different inputs. (GO-1272)
Release date: March 25, 2022
Language versions currently supported: Go: 1.16, 1.17
New and improved:
The agent now supports vulnerability detection for gRPC APIs written with the
google.golang.org/grpc
module. The functionality is enabled via the following configuration settings:agent: go: preview: grpc: true service: bypass: true
Alternately, the same feature can be enabled using environment variables:
CONTRAST__AGENT__GO__PREVIEW__GRPC=true CONTRAST__AGENT__SERVICE__BYPASS=true
Bug fixes:
The agent now correctly reports server tags when bypassing the service. (GO-1256)
The agent now reports unvalidated redirects under the appropriate vulnerability category. (GO-1265)
contrast-go
now correctly accepts build flags with double dashes. (GO-1258)
Release date: March 7, 2022
Language versions currently supported: Go: 1.16, 1.17
New and improved:
Go agent users can now configure the agent to report directly to Contrast, removing the need to install contrast-service, by using the
bypass
setting in theircontrast_security.yaml
file:agent: service: bypass: true
Alternately, the same feature can be enabled using an environment variable:
CONTRAST__AGENT__SERVICE__BYPASS=true
Bug fixes:
When running the agent with
contrast-go run main.go
, the application name was reported as 'command-line-arguments'. It now reports the correct package name when possible. (GO-1188)Exercised routes erroneously appeared as new routes due to a mismatch in how trailing slashes were interpreted by discovered vs exercised routes. Exercised routes now handle trailing slashes identically to discovered routes. (GO-1210)
Release date: December 9, 2021
Language versions currently supported: Go: 1.16, 1.17
New and improved:
Support for bufio buffered I/O.
Bug fixes:
Distributing bullseye package for Debian. (GO-1141)
Report path traversal vulnerability for os.Rename with user controlled new file name. (GO-1078)
Fix
fmt
handling of complex types. (GO-1146)Tracking no longer fails when reading directly from a request body to a []byte. (GO-1147)
Fixed a false negative caused by merging multiple vulnerabilities discovered on the same route. (GO-1149)
Release date: November 17, 2021
Language versions currently supported: Go: 1.16, 1.17
New and improved:
Support for the Gin web framework.
Bug fixes:
The
io/fs.Open
function now correctly triggers the path traversal finding. (GO-1072)contrast-go run
now supports running programs that take arguments. (GO-1016)
Release date: October 18, 2021
Language versions currently supported: Go: 1.16, 1.17
Bug fixes:
When calling bufio/bytes methods on interfaces instead of concrete types, the agent won't propagate. (GO-1019)
When custom types are printed to a
http.ResponseWriter
, they aren't analyzed for XSS (False Negative). (GO-1053)
Warning
This release will no longer support GoLang version 1.15.
Release date: September 28, 2021
Language versions currently supported: Go: 1.15, 1.16, 1.17
New and improved:
Golang major language version 1.17 support.
Bug fixes:
When converting from strings to named byte slices or byte slices to named strings, the agent loses data flow. (GO-1005)
Release date: September 22, 2021
Language versions currently supported: Go: 1.15, 1.16
Bug fixes:
When an application nests http.Handlers, the agent reports route observation and responses multiple times. (GO-999)
When triggering dataflow rules, sink events do not correctly set up parent history. (GO-1027)
When reporting route observation, the request pointer changes which breaks assess sources. (GO-1028)
Release date: September 15, 2021
Language versions currently supported: Go: 1.15, 1.16
New and improved:
Allow for custom
go
commands to be passed through ourcontrast-go
executable.
Bug fixes:
When reporting sinks with multiple sources, the agent does not correctly attribute which fields/sources triggered the corresponding finding. (Go-950)
When rewriting a slice operation on a named byte slice type with methods, the build fails. (Go-991)
When appending data, the agent incorrectly detects if the data is tracked, resulting in no finding when reporting to TeamServer. (Go-993)
When dataflow events happen concurrently, the runtime panics and crashes the application. (Go-1023)
Release date: September 1, 2021
Language versions currently supported: Go: 1.15, 1.16
Bug fixes:
When the application starts, the agent spawns ticker routines which continuously leak more tickers. (GO-995)
When sending enhanced class usage, the agent never releases previous reports and spends unnecessary resources on de-duping. (GO-996)
Release date: August 23, 2021
Language versions currently supported: Go: 1.15, 1.16
Bug fixes:
When an application calls a pointer method with a value, the rewritten code copies by value not reference, changing the runtime behavior. (GO-989)
Release date: August 17, 2021
Language versions currently supported: Go: 1.15, 1.16
New and improved:
Improve performance of rewritten code.
Bug fixes:
When propagating through bytes
Buffer/Reader.Read
, no propagation event is shown in the finding trace. (GO-993)When rewriting go function literals with returns, the rewriter omits the returns and breaks builds. (GO-937)
When an error occurs during initialization of the logger, the agent shuts itself off. (GO-952)
When a slice of a tainted byte slice reaches a sink, the sink is not triggered (false negative). (GO-983)
Release date: August 6, 2021
Language versions currently supported: Go: 1.15, 1.16
New and improved:
Enhanced data flow tracking, which improves agent accuracy.
Bug fixes:
When propagating through a circular buffer, the agent caused a stack overflow. (GO-982)
Release date: July 22, 2021
Language versions currently supported: Go: 1.15, 1.16
New and improved:
When an error occurs during agent initialization, more specific/detailed error messages are logged.
Release date: July 8, 2021
Language versions currently supported: Go: 1.15, 1.16
Bug fixes:
When using
getTypeName
, the rewriter failed to safely handle errors and did not inject correct packages. (GO-884)When comparing types, the rewriter incorrectly compared by pointer rather than by type. (GO-885)
Release date: June 17, 2021
Language versions currently supported: Go: 1.15, 1.16
New and improved:
Update the rewriter to only emit on exported functions, reducing the performance overhead of the rewriter itself.
Bug fixes:
When replacing expressions with
callexprs
, the agent may break addressability, resulting in a failed build. (GO-873)When creating caches for rewrite, the reported tool version is not included, resulting in caches that will not be rebuilt despite agent changes. (GO-875)
When rewriting string slices, shadowed type names do not prevent casts from being injected, resulting in code that will not build. (GO-883)
Release date: June 15, 2021
Language versions currently supported: Go: 1.15, 1.16
New and improved:
Updated the rewriter functionality of the agent to rely on Go’s toolexec to allow for the instrumentation of a larger set of Go applications.
Bug fixes:
Release date: June 14, 2021
Language versions currently supported: Go: 1.15, 1.16
New and improved:
Add custom SSRF sink for net/http
Client.PostForm
.
Bug fixes:
Release date: May 28, 2021
Language versions currently supported: Go: 1.15, 1.16
New and improved:
Added the ability to rewrite Go code including compiler directive comments, such as,
//go:embed
,//go:nosplit
and//go:noescape
and others.OSS and Assess feature support for the Go standard library.
Bug fixes:
Update
agent.logger.path
andagent.logger.level
config settings to those from remote settings. (GO-844)