awslabs / ar-go-tools

ar-go-tools (Argot) is a collection of analysis tools for Go
Apache License 2.0
5 stars 1 forks source link

Sanitization of untrusted data #39

Closed victornicolet closed 8 months ago

victornicolet commented 8 months ago

This PR adds sanitization of the values passed to Printf, Sprintf and Fprintf (and derivatives like the logging functions). The values that need to be sanitized are the ones from the code being analyzed. The values are sanitized either:

Issue #, if available:

38

There is also a small functionality extension with the addition of "context" in the code identifiers that will allow us to match things only under a certain "context" (for now, it matches the parent function string under which the code identifier is matched).