Skip to content

Add default taint configuration file #2280

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

Merged
merged 3 commits into from
Jul 31, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add an example of default taint config file
  • Loading branch information
mmvpm committed Jun 12, 2023
commit 31ff504d5670895adb0b7911f12a3ae26024f9ca
107 changes: 103 additions & 4 deletions utbot-framework/src/main/resources/taint/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,109 @@ sources:
- java.util.Scanner.next:
add-to: return
marks: user-input
- java.io.BufferedReader.readLine:
add-to: return
marks: user-input
- javax.servlet.http.HttpServletRequest.getParameter:
add-to: return
marks: user-input
- java.util.Properties.getProperty:
add-to: return
marks: user-input
- java.sql.ResultSet.getString:
add-to: return
marks: user-input
- javax.servlet.http.HttpServletRequest.getQueryString:
add-to: return
marks: user-input

cleaners:
- java.lang.String.isEmpty:
remove-from: this
marks: [ ]
conditions:
return: true

passes:
- java.lang.String.getBytes:
get-from: this
add-to: return
marks: [ ]
- java.lang.String.split:
get-from: this
add-to: return
marks: [ ]
- java.lang.String.concat:
get-from: [ this, arg1 ]
add-to: return
marks: [ ]
- java.lang.StringBuilder.append:
get-from: arg1
add-to: this
marks: [ ]
- java.lang.StringBuilder.toString:
get-from: this
add-to: return
marks: [ ]

- java.sql.Connection.prepareStatement:
get-from: arg1
add-to: [ this, return ]
marks: [ ]
- java.sql.PreparedStatement.setString:
get-from: arg2
add-to: this
marks: [ ]

- java.sql.Statement.addBatch:
get-from: arg1
add-to: this
marks: [ ]

- java.io.ByteArrayOutputStream.writeData:
get-from: arg1
add-to: this
marks: [ ]
- java.io.ByteArrayOutputStream.toByteArray:
get-from: this
add-to: return
marks: [ ]
- java.io.ByteArrayInputStream.<init>:
get-from: arg1
add-to: [ this, return ]
marks: [ ]
- java.io.ObjectInputStream.<init>:
get-from: arg1
add-to: [ this, return ]
marks: [ ]
- java.io.ObjectInputStream.readObject:
get-from: this
add-to: return
marks: [ ]

sinks:
- java.lang.RuntimeException.<init>:
- java.sql.Statement.execute:
check: arg1
marks: []
conditions:
arg1: { not: "" }
marks: user-input
- java.sql.Statement.executeUpdate:
check: arg1
marks: user-input
- java.sql.Statement.executeBatch:
check: this
marks: user-input
- java.sql.Statement.executeQuery:
check: arg1
marks: user-input

- java.sql.PreparedStatement.execute:
check: this
marks: user-input
- java.sql.PreparedStatement.executeUpdate:
check: this
marks: user-input
- java.sql.PreparedStatement.executeBatch:
check: this
marks: user-input
- java.sql.PreparedStatement.executeQuery:
check: this
marks: user-input