|
140 | 140 | description: "Run 'goreturns -l -d [$ARGS] $FILE' for each staged .go file"
|
141 | 141 | pass_filenames: true
|
142 | 142 |
|
| 143 | +# ============================================================================== |
| 144 | +# go-sec-mod |
| 145 | +# * Folder-Based |
| 146 | +# * Recursive |
| 147 | +# * Targets first parent folder with a go.mod file |
| 148 | +# * Executes if any .go files modified |
| 149 | +# * Executes if go.mod modified |
| 150 | +# ============================================================================== |
| 151 | +- id: go-sec-mod |
| 152 | + name: 'go-sec-mod' |
| 153 | + entry: go-sec-mod.sh |
| 154 | + files: '(\.go$)|(\bgo\.mod$)' |
| 155 | + exclude: '(^|/)vendor/' |
| 156 | + language: 'script' |
| 157 | + description: "Run 'cd $(mod_root $FILE); gosec [$ARGS] ./...' for each staged .go file" |
| 158 | + pass_filenames: true |
| 159 | + require_serial: true |
| 160 | + |
| 161 | +# ============================================================================== |
| 162 | +# go-sec-pkg |
| 163 | +# * Folder-Based |
| 164 | +# * Targets folder containing staged file |
| 165 | +# * Executes if any .go files modified |
| 166 | +# ============================================================================== |
| 167 | +- id: go-sec-pkg |
| 168 | + name: 'go-sec-pkg' |
| 169 | + entry: go-sec-pkg.sh |
| 170 | + types: [go] |
| 171 | + exclude: '(^|/)vendor/' |
| 172 | + language: 'script' |
| 173 | + description: "Run 'gosec [$ARGS] ./$(dirname $FILE)' for each staged .go file" |
| 174 | + pass_filenames: true |
| 175 | + require_serial: true |
| 176 | + |
| 177 | +# ============================================================================== |
| 178 | +# go-sec-repo-mod |
| 179 | +# * Repo-Based |
| 180 | +# * Recursive |
| 181 | +# * Targets ALL folders with a go.mod file |
| 182 | +# * Executes if any .go files modified |
| 183 | +# * Executes if go.mod modified |
| 184 | +# ============================================================================== |
| 185 | +- id: go-sec-repo-mod |
| 186 | + name: 'go-sec-repo-mod' |
| 187 | + entry: go-sec-repo-mod.sh |
| 188 | + files: '(\.go$)|(\bgo\.mod$)' |
| 189 | + exclude: '(^|/)vendor/' |
| 190 | + language: 'script' |
| 191 | + description: "Run 'cd $(mod_root); gosec [$ARGS] ./...' for each module in the repo" |
| 192 | + pass_filenames: false |
| 193 | + |
| 194 | +# ============================================================================== |
| 195 | +# go-sec-repo-pkg |
| 196 | +# * Repo-Based |
| 197 | +# * Recursive |
| 198 | +# * Executes if any .go files modified |
| 199 | +# ============================================================================== |
| 200 | +- id: go-sec-repo-pkg |
| 201 | + name: 'go-sec-repo-pkg' |
| 202 | + entry: go-sec-repo-pkg.sh |
| 203 | + types: [go] |
| 204 | + exclude: '(^|/)vendor/' |
| 205 | + language: 'script' |
| 206 | + description: "Run 'gosec [$ARGS] ./...' in repo root folder" |
| 207 | + pass_filenames: false |
| 208 | + |
143 | 209 | # ==============================================================================
|
144 | 210 | # go-test-mod
|
145 | 211 | # * Folder-Based
|
|
0 commit comments