Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Diagnostic reporting #101

Open
PurelyApplied opened this issue Sep 10, 2020 · 3 comments
Open

Improve Diagnostic reporting #101

PurelyApplied opened this issue Sep 10, 2020 · 3 comments
Assignees
Milestone

Comments

@PurelyApplied
Copy link
Collaborator

PurelyApplied commented Sep 10, 2020

At present, reporting of Diagnostics is a generic a source has reached a sink message with source and sink positions included. This can be useful in simple cases, but can be opaque in the event that a source has reached a sink via taint through many propagating steps.

While a full trace of propagation steps may be unnecessary, diagnostic reporting should be improved to the point that a developer reading a diagnostic does not need familiarity with SSA, taint propagation, or go-flow-levee to remediate the failure. For instance, a more general "<source name and position> has exceeded its data boundary by reaching <sink name and position>. Arguments to <sink name> must be sanitized."

@PurelyApplied PurelyApplied added this to the 1.0 Target milestone Sep 10, 2020
@mlevesquedion
Copy link
Contributor

This idea may be a little "far out" but I think it could be interesting to have an option to produce colored output showing what values are sources and what values are tainted (perhaps in a different color from sources, to avoid any confusion). This would be easy to implement and it would likely make it very easy for developers to see how the taint propagated from the source to reach a sink. (For color-blind developers, we could use variations in brightness instead).

@PurelyApplied
Copy link
Collaborator Author

I've worked on plenty of machines where terminal escape sequences don't get rendered. That could be a nice bit of gilding down the road, though.

@mlevesquedion
Copy link
Contributor

I think we might even want the report to be configurable to some extent. E.g. by default we could end the report with Arguments to sinks must be sanitized., but users may want to use a different message, e.g. they might want to specify what sanitizer to use so developers don't have to go look it up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants