Repository navigation
90 lines (78 loc) · 2.96 KB
/
Copy pathei-lifecycle.yml
File metadata and controls
90 lines (78 loc) · 2.96 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: AutoControl EI lifecycle evidence
on:
push:
branches: ["dev"]
paths:
- "je_auto_control/linux_wayland/**"
- "docker/Dockerfile.eis"
- "docker/libei_verify.py"
- "docker/eis_verify.py"
- "docker/eis_server.py"
- "pyproject.toml"
- ".github/workflows/ei-lifecycle.yml"
- "test/unit_test/headless/test_ei_native_verification.py"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ei-lifecycle-${{ github.ref }}
cancel-in-progress: true
jobs:
ei-lifecycle:
runs-on: ubuntu-22.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- name: Prepare evidence directory
run: mkdir -p native-ei
- name: Set up Docker Buildx
# nosemgrep: yaml.github-actions.security.third-party-action-not-pinned-to-commit-sha.third-party-action-not-pinned-to-commit-sha
uses: docker/setup-buildx-action@v4 # NOSONAR githubactions:S7637
- name: Build the isolated EI image
id: build
# nosemgrep: yaml.github-actions.security.third-party-action-not-pinned-to-commit-sha.third-party-action-not-pinned-to-commit-sha
uses: docker/build-push-action@v7 # NOSONAR githubactions:S7637
with:
context: .
file: docker/Dockerfile.eis
tags: autocontrol-ei-lifecycle:ci
load: true
cache-from: type=gha,scope=ei-lifecycle
cache-to: type=gha,scope=ei-lifecycle,mode=max
- name: Record native versions
shell: bash
run: |
docker run --rm --entrypoint sh autocontrol-ei-lifecycle:ci \
-c 'python -VV && dpkg-query -W libei1 libeis1' 2>&1 | tee native-ei/versions.log
- name: Verify half-open teardown and native refusal
if: always() && steps.build.outcome == 'success'
timeout-minutes: 5
shell: bash
run: |
docker run --rm --name ac-libei-probe --stop-timeout 5 --entrypoint python \
autocontrol-ei-lifecycle:ci /opt/verify/libei_verify.py 2>&1 | tee native-ei/libei.log
- name: Verify the live EIS peer independently
if: always() && steps.build.outcome == 'success'
timeout-minutes: 5
shell: bash
run: |
docker run --rm --name ac-eis-peer --stop-timeout 5 --entrypoint python \
autocontrol-ei-lifecycle:ci /opt/verify/eis_verify.py 2>&1 | tee native-ei/eis.log
- name: Remove owned verification containers
if: always()
shell: bash
run: |
for name in ac-libei-probe ac-eis-peer; do
if docker container inspect "$name" >/dev/null 2>&1; then
docker rm -f "$name"
fi
done
- name: Retain native EI evidence
if: always()
uses: actions/upload-artifact@v4
with:
name: ei-lifecycle-${{ github.run_id }}-${{ github.run_attempt }}
path: native-ei/
retention-days: 14