|
| 1 | +// WARNING: This file was automatically generated. DO NOT EDIT. |
| 2 | + |
| 3 | +package main |
| 4 | + |
| 5 | +import ( |
| 6 | + "archive/tar" |
| 7 | + "io" |
| 8 | + "os" |
| 9 | +) |
| 10 | + |
| 11 | +func TaintStepTest_ArchiveTarFileInfoHeader_B0I0O0(sourceCQL interface{}) interface{} { |
| 12 | + // The flow is from `fromFileInfo656` into `intoHeader414`. |
| 13 | + |
| 14 | + // Assume that `sourceCQL` has the underlying type of `fromFileInfo656`: |
| 15 | + fromFileInfo656 := sourceCQL.(os.FileInfo) |
| 16 | + |
| 17 | + // Call the function that transfers the taint |
| 18 | + // from the parameter `fromFileInfo656` to result `intoHeader414` |
| 19 | + // (`intoHeader414` is now tainted). |
| 20 | + intoHeader414, _ := tar.FileInfoHeader(fromFileInfo656, "") |
| 21 | + |
| 22 | + // Return the tainted `intoHeader414`: |
| 23 | + return intoHeader414 |
| 24 | +} |
| 25 | + |
| 26 | +func TaintStepTest_ArchiveTarNewReader_B0I0O0(sourceCQL interface{}) interface{} { |
| 27 | + // The flow is from `fromReader518` into `intoReader650`. |
| 28 | + |
| 29 | + // Assume that `sourceCQL` has the underlying type of `fromReader518`: |
| 30 | + fromReader518 := sourceCQL.(io.Reader) |
| 31 | + |
| 32 | + // Call the function that transfers the taint |
| 33 | + // from the parameter `fromReader518` to result `intoReader650` |
| 34 | + // (`intoReader650` is now tainted). |
| 35 | + intoReader650 := tar.NewReader(fromReader518) |
| 36 | + |
| 37 | + // Return the tainted `intoReader650`: |
| 38 | + return intoReader650 |
| 39 | +} |
| 40 | + |
| 41 | +func TaintStepTest_ArchiveTarNewWriter_B0I0O0(sourceCQL interface{}) interface{} { |
| 42 | + // The flow is from `fromWriter784` into `intoWriter957`. |
| 43 | + |
| 44 | + // Assume that `sourceCQL` has the underlying type of `fromWriter784`: |
| 45 | + fromWriter784 := sourceCQL.(*tar.Writer) |
| 46 | + |
| 47 | + // Declare `intoWriter957` variable: |
| 48 | + var intoWriter957 io.Writer |
| 49 | + |
| 50 | + // Call the function that will transfer the taint |
| 51 | + // from the result `intermediateCQL` to parameter `intoWriter957`: |
| 52 | + intermediateCQL := tar.NewWriter(intoWriter957) |
| 53 | + |
| 54 | + // Extra step (`fromWriter784` taints `intermediateCQL`, which taints `intoWriter957`: |
| 55 | + link(fromWriter784, intermediateCQL) |
| 56 | + |
| 57 | + // Return the tainted `intoWriter957`: |
| 58 | + return intoWriter957 |
| 59 | +} |
| 60 | + |
| 61 | +func TaintStepTest_ArchiveTarHeaderFileInfo_B0I0O0(sourceCQL interface{}) interface{} { |
| 62 | + // The flow is from `fromHeader520` into `intoFileInfo443`. |
| 63 | + |
| 64 | + // Assume that `sourceCQL` has the underlying type of `fromHeader520`: |
| 65 | + fromHeader520 := sourceCQL.(tar.Header) |
| 66 | + |
| 67 | + // Call the method that transfers the taint |
| 68 | + // from the receiver `fromHeader520` to the result `intoFileInfo443` |
| 69 | + // (`intoFileInfo443` is now tainted). |
| 70 | + intoFileInfo443 := fromHeader520.FileInfo() |
| 71 | + |
| 72 | + // Return the tainted `intoFileInfo443`: |
| 73 | + return intoFileInfo443 |
| 74 | +} |
| 75 | + |
| 76 | +func TaintStepTest_ArchiveTarReaderNext_B0I0O0(sourceCQL interface{}) interface{} { |
| 77 | + // The flow is from `fromReader127` into `intoHeader483`. |
| 78 | + |
| 79 | + // Assume that `sourceCQL` has the underlying type of `fromReader127`: |
| 80 | + fromReader127 := sourceCQL.(tar.Reader) |
| 81 | + |
| 82 | + // Call the method that transfers the taint |
| 83 | + // from the receiver `fromReader127` to the result `intoHeader483` |
| 84 | + // (`intoHeader483` is now tainted). |
| 85 | + intoHeader483, _ := fromReader127.Next() |
| 86 | + |
| 87 | + // Return the tainted `intoHeader483`: |
| 88 | + return intoHeader483 |
| 89 | +} |
| 90 | + |
| 91 | +func TaintStepTest_ArchiveTarReaderRead_B0I0O0(sourceCQL interface{}) interface{} { |
| 92 | + // The flow is from `fromReader989` into `intoByte982`. |
| 93 | + |
| 94 | + // Assume that `sourceCQL` has the underlying type of `fromReader989`: |
| 95 | + fromReader989 := sourceCQL.(tar.Reader) |
| 96 | + |
| 97 | + // Declare `intoByte982` variable: |
| 98 | + var intoByte982 []byte |
| 99 | + |
| 100 | + // Call the method that transfers the taint |
| 101 | + // from the receiver `fromReader989` to the argument `intoByte982` |
| 102 | + // (`intoByte982` is now tainted). |
| 103 | + fromReader989.Read(intoByte982) |
| 104 | + |
| 105 | + // Return the tainted `intoByte982`: |
| 106 | + return intoByte982 |
| 107 | +} |
| 108 | + |
| 109 | +func TaintStepTest_ArchiveTarWriterWrite_B0I0O0(sourceCQL interface{}) interface{} { |
| 110 | + // The flow is from `fromByte417` into `intoWriter584`. |
| 111 | + |
| 112 | + // Assume that `sourceCQL` has the underlying type of `fromByte417`: |
| 113 | + fromByte417 := sourceCQL.([]byte) |
| 114 | + |
| 115 | + // Declare `intoWriter584` variable: |
| 116 | + var intoWriter584 tar.Writer |
| 117 | + |
| 118 | + // Call the method that transfers the taint |
| 119 | + // from the parameter `fromByte417` to the receiver `intoWriter584` |
| 120 | + // (`intoWriter584` is now tainted). |
| 121 | + intoWriter584.Write(fromByte417) |
| 122 | + |
| 123 | + // Return the tainted `intoWriter584`: |
| 124 | + return intoWriter584 |
| 125 | +} |
| 126 | + |
| 127 | +func TaintStepTest_ArchiveTarWriterWriteHeader_B0I0O0(sourceCQL interface{}) interface{} { |
| 128 | + // The flow is from `fromHeader991` into `intoWriter881`. |
| 129 | + |
| 130 | + // Assume that `sourceCQL` has the underlying type of `fromHeader991`: |
| 131 | + fromHeader991 := sourceCQL.(*tar.Header) |
| 132 | + |
| 133 | + // Declare `intoWriter881` variable: |
| 134 | + var intoWriter881 tar.Writer |
| 135 | + |
| 136 | + // Call the method that transfers the taint |
| 137 | + // from the parameter `fromHeader991` to the receiver `intoWriter881` |
| 138 | + // (`intoWriter881` is now tainted). |
| 139 | + intoWriter881.WriteHeader(fromHeader991) |
| 140 | + |
| 141 | + // Return the tainted `intoWriter881`: |
| 142 | + return intoWriter881 |
| 143 | +} |
| 144 | + |
| 145 | +func RunAllTaints_ArchiveTar() { |
| 146 | + { |
| 147 | + // Create a new source: |
| 148 | + source := newSource() |
| 149 | + // Run the taint scenario: |
| 150 | + out := TaintStepTest_ArchiveTarFileInfoHeader_B0I0O0(source) |
| 151 | + // If the taint step(s) succeeded, then `out` is tainted and will be sink-able here: |
| 152 | + sink(out) |
| 153 | + } |
| 154 | + { |
| 155 | + // Create a new source: |
| 156 | + source := newSource() |
| 157 | + // Run the taint scenario: |
| 158 | + out := TaintStepTest_ArchiveTarNewReader_B0I0O0(source) |
| 159 | + // If the taint step(s) succeeded, then `out` is tainted and will be sink-able here: |
| 160 | + sink(out) |
| 161 | + } |
| 162 | + { |
| 163 | + // Create a new source: |
| 164 | + source := newSource() |
| 165 | + // Run the taint scenario: |
| 166 | + out := TaintStepTest_ArchiveTarNewWriter_B0I0O0(source) |
| 167 | + // If the taint step(s) succeeded, then `out` is tainted and will be sink-able here: |
| 168 | + sink(out) |
| 169 | + } |
| 170 | + { |
| 171 | + // Create a new source: |
| 172 | + source := newSource() |
| 173 | + // Run the taint scenario: |
| 174 | + out := TaintStepTest_ArchiveTarHeaderFileInfo_B0I0O0(source) |
| 175 | + // If the taint step(s) succeeded, then `out` is tainted and will be sink-able here: |
| 176 | + sink(out) |
| 177 | + } |
| 178 | + { |
| 179 | + // Create a new source: |
| 180 | + source := newSource() |
| 181 | + // Run the taint scenario: |
| 182 | + out := TaintStepTest_ArchiveTarReaderNext_B0I0O0(source) |
| 183 | + // If the taint step(s) succeeded, then `out` is tainted and will be sink-able here: |
| 184 | + sink(out) |
| 185 | + } |
| 186 | + { |
| 187 | + // Create a new source: |
| 188 | + source := newSource() |
| 189 | + // Run the taint scenario: |
| 190 | + out := TaintStepTest_ArchiveTarReaderRead_B0I0O0(source) |
| 191 | + // If the taint step(s) succeeded, then `out` is tainted and will be sink-able here: |
| 192 | + sink(out) |
| 193 | + } |
| 194 | + { |
| 195 | + // Create a new source: |
| 196 | + source := newSource() |
| 197 | + // Run the taint scenario: |
| 198 | + out := TaintStepTest_ArchiveTarWriterWrite_B0I0O0(source) |
| 199 | + // If the taint step(s) succeeded, then `out` is tainted and will be sink-able here: |
| 200 | + sink(out) |
| 201 | + } |
| 202 | + { |
| 203 | + // Create a new source: |
| 204 | + source := newSource() |
| 205 | + // Run the taint scenario: |
| 206 | + out := TaintStepTest_ArchiveTarWriterWriteHeader_B0I0O0(source) |
| 207 | + // If the taint step(s) succeeded, then `out` is tainted and will be sink-able here: |
| 208 | + sink(out) |
| 209 | + } |
| 210 | +} |
0 commit comments