Feature: Tainting
- Dominant language
- Java
- Stars
- 7.2k
- Forks
- 820
- Avg merge
- 5h 9m
- Merged PRs (30d)
- 50
Description
I'd like to see a feature similar https://checkerframework.org/manual/#tainting-checker
Though I think slightly different, I'd like to be able to write
```
@Untainted public static String cleanHtml( @Tainted String html ) {
}
class MyClass {
void setHtml( @Vulnerable String html ) { // EP should require this to be untainted first.
}
}
```
not untainting the string prior to calling setHtml would result in a compile error.
vaadin for example has many "documented" vulnerable methods that will take any arbitrary html, this is for power usage, but also makes it incredibly easy to introduce a vulnerability. I don't fully agree with with using it for SQL injection, except perhaps if you're parameterizing table names and such (since most parameters are properly quoted via prepared statements).
p.s. completely unrelated, but I'd love to see a union of Checker/Error Prone as they overlap, but neither currently is a complete solution for me.
Contributor guide
Assessment
This issue has not been assessed yet.