Skip to content

Use authentihash

Use authentihash #7

Workflow file for this run

name: Build
on: push
jobs:
build:
runs-on: windows-latest
permissions:
id-token: write
contents: read
attestations: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Compile
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
cl .\hello.cpp
.\hello.exe
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install lief
run: |
pip install lief
python -c "import lief, binascii; print('DIGEST=' + binascii.hexlify(lief.parse('hello.exe').authentihash_sha256))" >> $GITHUB_ENV
- name: Attest
uses: actions/attest@v1
with:

Check failure on line 30 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build.yml

Invalid workflow file

You have an error in your yaml syntax on line 30
subject-name: 'hello.exe'
subject-digest: "sha256:"${DIGEST}
predicate-type: 'https://in-toto.io/attestation/release/v0.1'
predicate: '{"purl": "git+https://github.com/qstokkink/testghattestations.git@1","releaseId": "1"}'
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: Build
retention-days: 2
path: |
*