1 # A list of source/propagation function
3 # int x = mySource1(); // x is tainted
5 DstArgs: [-1] # Index for return value
8 # mySource2(&x); // x is tainted
12 # int x = myNamespace::mySource3(); // x is tainted
14 Scope: "myNamespace::"
17 # int x = myAnotherNamespace::mySource3(); // x is tainted
19 Scope: "myAnotherNamespace::"
23 # myScanf("%d %d", &x, &y); // x and y are tainted
29 # Foo::myScanf("%d %d", &x, &y); // x and y are tainted
35 # int x; // x is tainted
37 # myPropagator(x, &y); // y is tainted
42 # constexpr unsigned size = 100;
45 # int n = mySprintf(buf, size, "%d %d", x, y); // If size, x or y is tainted
46 # // the return value and the buf will be tainted
53 # A list of filter functions
55 # int x; // x is tainted
56 # isOutOfRange(&x); // x is not tainted anymore
60 # int x; // x is tainted
61 # myNamespace::isOutOfRange(&x); // x is not tainted anymore
63 Scope: "myNamespace::"
66 # int x; // x is tainted
67 # myAnotherNamespace::isOutOfRange(&x); // x is not tainted anymore
69 Scope: "myAnotherNamespace::"
72 # char *str; // str is tainted
73 # sanitizeCmd(str) // str is not tainted anymore
77 # A list of sink functions
79 # int x, y; // x and y are tainted
80 # mySink(x, 0, 1); // It will warn
81 # mySink(0, 1, y); // It will warn
82 # mySink(0, x, 1); // It won't warn
86 # int x; // x is tainted
87 # myNamespace::mySink(x); // It will warn
89 Scope: "myNamespace::"
92 # int x; // x is tainted
93 # myAnotherNamespace::mySink(x); // It will warn
95 Scope: "myAnotherNamespace::"