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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
name: CI
on:
push:
branches:
pull_request:
branches:
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -Dwarnings
# Every job that runs `cargo metadata` (clippy, test, msrv, deny, geiger) must
# resolve this crate's path dependencies. The closure is:
# forensic-mount(4n6mount) -> {ext4fs-core, ewf, iso9660-forensic, vmdk-core};
# ext4fs-core -> ewf. actions/checkout cannot place a repo outside
# $GITHUB_WORKSPACE, so we check this repo out under `path: 4n6mount` and the
# siblings as peer subdirs, matching the `../sibling` relative paths in the
# manifests, then run cargo with `working-directory: 4n6mount`.
# The `fuser` crate links libfuse at build time, so build jobs install
# libfuse3-dev + pkg-config.
jobs:
fmt:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: 4n6mount
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- run: cargo fmt --check
working-directory: 4n6mount
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- run: sudo apt-get update && sudo apt-get install -y libfuse3-dev pkg-config
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: 4n6mount
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: ${{ github.repository_owner }}/ext4fs-forensic
path: ext4fs-forensic
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: ${{ github.repository_owner }}/ewf
path: ewf
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: ${{ github.repository_owner }}/iso9660-forensic
path: iso9660-forensic
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: ${{ github.repository_owner }}/vmdk-forensic
path: vmdk-forensic
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
- run: cargo clippy --all-targets --locked -- -D warnings
working-directory: 4n6mount
test:
name: Test
runs-on: ubuntu-latest
steps:
- run: sudo apt-get update && sudo apt-get install -y libfuse3-dev pkg-config
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: 4n6mount
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: ${{ github.repository_owner }}/ext4fs-forensic
path: ext4fs-forensic
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: ${{ github.repository_owner }}/ewf
path: ewf
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: ${{ github.repository_owner }}/iso9660-forensic
path: iso9660-forensic
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: ${{ github.repository_owner }}/vmdk-forensic
path: vmdk-forensic
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
- run: cargo test --locked
working-directory: 4n6mount
msrv:
name: MSRV (1.85)
runs-on: ubuntu-latest
steps:
- run: sudo apt-get update && sudo apt-get install -y libfuse3-dev pkg-config
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: 4n6mount
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: ${{ github.repository_owner }}/ext4fs-forensic
path: ext4fs-forensic
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: ${{ github.repository_owner }}/ewf
path: ewf
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: ${{ github.repository_owner }}/iso9660-forensic
path: iso9660-forensic
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: ${{ github.repository_owner }}/vmdk-forensic
path: vmdk-forensic
- uses: dtolnay/rust-toolchain@1.85
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
- run: cargo test --locked
working-directory: 4n6mount
deny:
name: Cargo Deny
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: 4n6mount
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: ${{ github.repository_owner }}/ext4fs-forensic
path: ext4fs-forensic
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: ${{ github.repository_owner }}/ewf
path: ewf
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: ${{ github.repository_owner }}/iso9660-forensic
path: iso9660-forensic
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: ${{ github.repository_owner }}/vmdk-forensic
path: vmdk-forensic
- uses: dtolnay/rust-toolchain@stable
# cargo-deny is run as a CLI step (not the Docker action) so it can resolve
# the crate's path dependencies, checked out as siblings above.
- uses: taiki-e/install-action@15449e3094499af05d8d964a1c884208e4b8b595 # v2.81.11
with:
tool: cargo-deny
- run: cargo deny --locked check
working-directory: 4n6mount
secrets:
name: Secret Scan (gitleaks)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
# gitleaks-action v2+ demands a paid GITLEAKS_LICENSE for organization
# repos; the upstream binary itself is unrestricted, so we download and
# run it directly to keep the secret scan free and license-free.
- name: Install gitleaks
run: |
set -euo pipefail
VERSION=8.30.1
curl -sSL "https://github.com/gitleaks/gitleaks/releases/download/v${VERSION}/gitleaks_${VERSION}_linux_x64.tar.gz" \
| tar -xz -C /usr/local/bin gitleaks
gitleaks version
- run: gitleaks detect --source . --redact --no-banner -v
geiger:
name: Unsafe Audit (cargo-geiger)
runs-on: ubuntu-latest
continue-on-error: true
steps:
- run: sudo apt-get update && sudo apt-get install -y libfuse3-dev pkg-config
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: 4n6mount
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: ${{ github.repository_owner }}/ext4fs-forensic
path: ext4fs-forensic
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: ${{ github.repository_owner }}/ewf
path: ewf
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: ${{ github.repository_owner }}/iso9660-forensic
path: iso9660-forensic
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: ${{ github.repository_owner }}/vmdk-forensic
path: vmdk-forensic
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
- run: cargo install cargo-geiger --locked
- run: cargo geiger 2>&1 || true
working-directory: 4n6mount