(inPath, outPath string)
| 213 | } |
| 214 | |
| 215 | func stripCodeSignature(inPath, outPath string) error { |
| 216 | _, err := exec.LookPath("codesign_allocate") |
| 217 | if err != nil { |
| 218 | return fmt.Errorf("your system is missing the codesign_allocate tool, so we can't verify the SLSA attestation (you can bypass this by setting `export HISHTORY_DISABLE_SLSA_ATTESTATION=true` in your shell)") |
| 219 | } |
| 220 | cmd := exec.Command("codesign_allocate", "-i", inPath, "-o", outPath, "-r") |
| 221 | var stdout bytes.Buffer |
| 222 | cmd.Stdout = &stdout |
| 223 | var stderr bytes.Buffer |
| 224 | cmd.Stderr = &stderr |
| 225 | err = cmd.Run() |
| 226 | if err != nil { |
| 227 | return fmt.Errorf("failed to use codesign_allocate to strip signatures on binary=%v (stdout=%#v, stderr%#v): %w", inPath, stdout.String(), stderr.String(), err) |
| 228 | } |
| 229 | return nil |
| 230 | } |
| 231 | |
| 232 | func downloadFiles(updateInfo shared.UpdateInfo) error { |
| 233 | clientUrl := "" |
no test coverage detected