Repository navigation
75 lines (71 loc) · 3.42 KB
/
Copy pathlinux-package-runtime.yml
File metadata and controls
75 lines (71 loc) · 3.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Linux-only package runtime prerequisites
on:
pull_request:
paths:
- tests/e2e/package-runtime/**
- tests/unit/test_linux_package_*.py
- .github/workflows/linux-package-runtime.yml
workflow_dispatch:
inputs:
stage:
description: Source controls or measured host qualification
type: choice
options: [source, qualify]
default: source
permissions:
contents: read
concurrency:
group: linux-package-prerequisites-${{ github.event_name }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
source:
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Install native ELF fixture tools without starting a guest
run: |
sudo apt-get update -qq
sudo apt-get install -y -qq qemu-system-x86 qemu-utils ovmf genisoimage binutils
- name: Authenticate private host resources and verify isolated closure without a guest
run: |
HOST_DATA_PREFIX="/run/wootc-package-host-$GITHUB_RUN_ID-$GITHUB_RUN_ATTEMPT"
sudo --preserve-env=GITHUB_ACTIONS,RUNNER_ENVIRONMENT,RUNNER_OS,GITHUB_RUN_ID,GITHUB_RUN_ATTEMPT,GITHUB_SHA,RUNNER_TEMP \
/usr/bin/python3 tests/e2e/package-runtime/host-data.py "$HOST_DATA_PREFIX"
sudo --preserve-env=GITHUB_ACTIONS,RUNNER_ENVIRONMENT,RUNNER_OS,GITHUB_RUN_ID,GITHUB_RUN_ATTEMPT,GITHUB_SHA,RUNNER_TEMP \
/usr/bin/python3 tests/e2e/package-runtime/host-namespace.py "$HOST_DATA_PREFIX" --probe
- name: Execute actual source controls without guest installation
run: |
python3 -m unittest discover -s tests/unit -p 'test_linux_package_*.py'
python3 -m unittest discover -s tests/unit -p test_wootc_package_consumer.py
python3 tests/audit-linux-package-runtime.py .
- name: Retain bounded host authentication and namespace proof
if: always()
run: |
HOST_DATA_PREFIX="/run/wootc-package-host-$GITHUB_RUN_ID-$GITHUB_RUN_ATTEMPT"
sudo --preserve-env=GITHUB_ACTIONS,RUNNER_ENVIRONMENT,RUNNER_OS,GITHUB_RUN_ID,GITHUB_RUN_ATTEMPT,GITHUB_SHA,RUNNER_TEMP \
/usr/bin/python3 tests/e2e/package-runtime/host-data-proof.py "$HOST_DATA_PREFIX" "$RUNNER_TEMP/host-data-proof"
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
if: always()
with:
name: host-data-proof-${{ github.job }}-${{ github.run_id }}-${{ github.run_attempt }}
path: ${{ runner.temp }}/host-data-proof/
if-no-files-found: warn
retention-days: 14
qualify:
if: github.event_name == 'workflow_dispatch' && inputs.stage == 'qualify'
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Measure eligibility without image acquisition or VM launch
env:
QUALIFICATION_OUT: ${{ runner.temp }}/linux-package-host.json
run: |
python3 tests/e2e/package-runtime/qualify.py "$RUNNER_TEMP" "$QUALIFICATION_OUT"
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
if: always()
with:
name: linux-package-host-qualification
path: ${{ runner.temp }}/linux-package-host.json
if-no-files-found: error