Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,26 @@ permissions:
contents: read

jobs:
secrets:
name: Secret scan (gitleaks, full history)
runs-on: ubuntu-24.04
env:
GITLEAKS_VERSION: 8.21.2
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install gitleaks
run: |
curl -sSfL -o gitleaks.tar.gz \
"https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz"
tar -xzf gitleaks.tar.gz gitleaks
./gitleaks version

- name: Scan every commit for secrets
run: ./gitleaks git --redact --verbose --exit-code 1 .

test:
name: ${{ matrix.arch }} · Python ${{ matrix.python }}
runs-on: ${{ matrix.runner }}
Expand Down
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,14 @@ dist/
.coverage
coverage.xml
htmlcov/

# Secrets and device state must never be committed (see SECURITY notes in keys/README.md).
# Only the public release key in keys/ is allowed.
*.pem
!keys/release-pubkey.pem
*.key
.env
.env.*
fieldimager-keys/
device.json
seal.json
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ These screenshots were captured on the real device during the first hardware run

| | |
|---|---|
| <img src="docs/media/screens/03-admin-pin-entry.png" alt="Admin PIN entry"> | <img src="docs/media/screens/05-admin-mode-wifi-networks.png" alt="Wi-Fi networks in admin mode"> |
| Admin PIN pad (digits are masked; wrong PINs count toward a lockout) | Wi-Fi exists only in admin mode, for updates |
| <img src="docs/media/screens/03-admin-pin-entry.png" alt="Admin PIN entry"> | <img src="docs/media/screens/05-admin-mode-wifi-networks-sim.png" alt="Wi-Fi networks in admin mode (simulation)"> |
| Admin PIN pad (digits are masked; wrong PINs count toward a lockout) | Wi-Fi exists only in admin mode, for updates (simulation render, so no real network names are shown) |
| <img src="docs/media/screens/12-options-default.png" alt="Default options"> | <img src="docs/media/screens/13-options-keyboard-letters.png" alt="On-screen keyboard"> |
| Default options: E01, fast compression, SHA-256 always on | Qt Virtual Keyboard for case, evidence and operator fields |
| <img src="docs/media/screens/17-acquisition-started.png" alt="Acquisition started"> | <img src="docs/media/screens/19-reading-complete-100.png" alt="Reading complete"> |
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions tests/unit/test_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,15 @@ def test_the_password_goes_to_a_private_keyfile_not_to_a_command_line(tmp_path):
(sysmod.NMCLI, "-t", "-f", "DEVICE,TYPE"): (0, "eth0:ethernet\nwlan0:wifi", ""),
(sysmod.NMCLI, "-t", "-f", "GENERAL.CONNECTION,IP4.ADDRESS"): (
0,
"GENERAL.CONNECTION:FieldImager Lab\nIP4.ADDRESS[1]:192.168.0.18/24",
"GENERAL.CONNECTION:FieldImager Lab\nIP4.ADDRESS[1]:192.0.2.18/24",
"",
),
}
)
status = asyncio.run(
HostSystem(HostPaths(tmp_path), runner).wifi_connect("Lab", SECRET, "WPA2")
)
assert status.ssid == "FieldImager Lab" and status.ip == "192.168.0.18"
assert status.ssid == "FieldImager Lab" and status.ip == "192.0.2.18"
assert not any(SECRET in " ".join(c) for c in runner.calls)
files = list((tmp_path / sysmod.NM_CONNECTIONS.lstrip("/")).iterdir())
assert len(files) == 1 and stat.S_IMODE(files[0].stat().st_mode) == 0o600
Expand Down
Loading