GHA: scan git repository and detect unvetted binary files

The only binary-looking files that are accepted in the git repository
need to match the checksums in the sha256sum file
".github/scripts/binarycheck.sums".

This is done to make sure that no one has planted any hidden (encrypted)
potentially dangerous payload in the tree.

Closes #14333
This commit is contained in:
Daniel Stenberg 2024-08-01 11:16:21 +02:00
parent c3fe2dd25c
commit e3240db0a7
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
3 changed files with 163 additions and 0 deletions

23
.github/workflows/binarycheck.yml vendored Normal file
View file

@ -0,0 +1,23 @@
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
#
# SPDX-License-Identifier: curl
name: bincheck
on:
push:
branches:
- master
pull_request:
branches:
- master
permissions: {}
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Check for binary files
run: ./.github/scripts/binarycheck.pl