This repository was archived by the owner on Oct 27, 2026. It is now read-only.
Repository navigation
137 lines (132 loc) · 5.13 KB
/
Copy pathci.yml
File metadata and controls
137 lines (132 loc) · 5.13 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
name: ci
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
id-token: write
pull-requests: read
concurrency:
group: ci-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
changes:
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
runtime: ${{ steps.filter.outputs.runtime }}
steps:
- uses: actions/checkout@v7.0.0
- uses: dorny/paths-filter@v4.0.3
id: filter
with:
filters: |
runtime:
- '.github/workflows/**'
- 'Dockerfile'
- 'codecov.yml'
- 'cmd/**'
- 'config.example.json'
- 'go.mod'
- 'go.sum'
- 'internal/**'
- 'ego-browser-skill-source.json'
- 'managed-skill-source.json'
- 'release-dependencies.json'
- 'scripts/**'
- 'systemd/**'
- 'tests/**'
test:
runs-on: ubuntu-latest
timeout-minutes: 15
needs: changes
if: needs.changes.outputs.runtime == 'true'
steps:
- uses: actions/checkout@v7.0.0
- name: Resolve managed skill source
id: managed-skill
run: |
test "$(jq -er .schema_version managed-skill-source.json)" = "1"
test "$(jq -er .repository managed-skill-source.json)" = "Agent-Remote/agent-remote-device"
echo "commit=$(jq -er .commit managed-skill-source.json)" >> "$GITHUB_OUTPUT"
- name: Resolve official ego-browser Skill source
id: ego-browser-skill
run: |
test "$(jq -er .schema_version ego-browser-skill-source.json)" = "1"
test "$(jq -er .upstream_repository ego-browser-skill-source.json)" = \
"https://github.com/citrolabs/ego-lite"
echo "commit=$(jq -er .upstream_commit ego-browser-skill-source.json)" >> "$GITHUB_OUTPUT"
- uses: actions/checkout@v7.0.0
with:
repository: Agent-Remote/agent-remote-device
ref: ${{ steps.managed-skill.outputs.commit }}
path: .external/agent-remote-device
persist-credentials: false
- uses: actions/setup-go@v6.5.0
with:
go-version-file: go.mod
- uses: actions/checkout@v7.0.0
with:
repository: citrolabs/ego-lite
ref: ${{ steps.ego-browser-skill.outputs.commit }}
path: .external/ego-lite
persist-credentials: false
- name: Verify managed skill matches device source
run: |
test "$(git -C .external/agent-remote-device rev-parse HEAD)" = \
"$(jq -er .commit managed-skill-source.json)"
scripts/check-managed-skills.sh .external/agent-remote-device
- name: Verify official ego-browser Skill matches pinned source
run: scripts/check-ego-browser-skill-source.sh .external/ego-lite
- name: Scan reachable Go vulnerabilities
run: |
go run golang.org/x/vuln/cmd/govulncheck@v1.6.0 -json ./... > govulncheck.json
jq -s -e '
any(.[]; ((.finding.trace? // []) |
any((.function? // "") != ""))) | not
' govulncheck.json >/dev/null
- name: Upload Go vulnerability report
if: always()
uses: actions/upload-artifact@v7.0.1
with:
name: agent-remote-node-govulncheck
path: govulncheck.json
if-no-files-found: error
- name: Run quality checks and generate coverage
env:
COVERAGE_PROFILE: coverage.out
run: scripts/run-quality-checks.sh
- name: Prove native runtime UID and broker socket ACLs
run: tests/linux_ego_browser_uid_acl_test.sh
- name: Verify isolated terminal privileges and PTY interactions
run: bash tests/linux_terminal_host_test.sh
- name: Verify root-owned ego-browser release success paths
run: |
sudo env \
"PATH=$PATH" \
"HOME=$HOME" \
"GOCACHE=$RUNNER_TEMP/root-go-cache" \
go test -run '^(TestInstallNodeExchangesJoinCodeAndCommitsVerifiedEnable|TestConfigureEgoBrowserSynchronizesVersionWithoutEnabling)$' ./cmd/agent-remote-node
- name: Run session network namespace integration
run: |
sudo env \
"PATH=$PATH" \
"HOME=$HOME" \
"GOCACHE=$RUNNER_TEMP/root-go-cache" \
AGENT_REMOTE_RUN_NETNS_TEST=1 \
go test -run '^TestDialNetworkNamespaceLoopbackIntegration$' ./internal/runtimehelper
- name: Verify bounded disk temporary storage and cleanup
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends e2fsprogs
go test -c -o "$RUNNER_TEMP/runtimehelper-temp.test" ./internal/runtimehelper
sudo unshare --mount --propagation private env AGENT_REMOTE_RUN_TEMP_STORAGE_TEST=1 \
"$RUNNER_TEMP/runtimehelper-temp.test" -test.v -test.run '^TestDiskTemporaryStorage'
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v7.0.0
with:
disable_search: true
fail_ci_if_error: false
files: ./coverage.out
use_oidc: true