Skip to content

Commit 45aaf2b

Browse files
security(assail): classify the 4 audited false-positive panic-attack residuals (#166)
## Summary Makes `panic-attack assail` **provably clean** for neurophone (answers "is it fully panic-attacked and safely remediated?" — **yes**). I built + ran the `panic-attack` tool against neurophone: **9 weak points, 0 real vulnerabilities.** 5 `PanicPath` findings are already auto-suppressed (test/bench code). The 4 production-script findings are **audited-sound false positives**, now recorded in the user-classification registry (which lives apart from the source, so a finding can't self-suppress — a reviewable companion change per the panic-attack pattern): - `audits/assail-classifications.a2ml`: - `scripts/{setup,install-on-phone,uninstall}.sh` **PathTraversal** — the flagged path is `/data/local/tmp/` (the canonical Android `adb` device-staging dir), **not** host `/tmp`. `mktemp` would be *incorrect* for a device path. - `scripts/install-termux.sh` **HardcodedSecret** — a **public** HuggingFace model URL + a commented `# api_key = "sk-ant-..."` placeholder in a generated config template. No secret is committed. - `audits/audit-install-scripts.adoc` — the reviewable rationale, cross-referenced per entry. **Verified:** re-ran the built binary → `total weak_points=9, suppressed=9, unsuppressed=0`. Production code remains 0 unsafe / 0 panic-sites / 0 injection / 0 crypto-misuse. `must-check` exit 0. ## Note (flagged, not fixed here) `panic-attack` emits `failed to read AI manifest: extra tokens after manifest` on `0-AI-MANIFEST.a2ml` — a minor a2ml-format nuance for a follow-up (doesn't affect the scan). This is workstream A of the audit-remediation plan; doc-format fixes, RSR gaps, wikis, android tests, and bot docs follow as separate PRs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_0172RBMz3qYjb1ttzD2i7RNh --- _Generated by [Claude Code](https://claude.ai/code/session_0172RBMz3qYjb1ttzD2i7RNh)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent e3be2ed commit 45aaf2b

2 files changed

Lines changed: 93 additions & 0 deletions

File tree

audits/assail-classifications.a2ml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
; SPDX-License-Identifier: MPL-2.0
2+
; assail-classifications.a2ml — user-classification registry for panic-attack.
3+
;
4+
; Flips audited-sound findings to `suppressed = true` AFTER the kanren
5+
; structural-suppression pass (see panic-attack src/assail/mod.rs ::
6+
; apply_user_classifications). Matching is exact on (file, category). This
7+
; registry lives apart from the source under scan, so a finding cannot
8+
; self-suppress — each entry is a reviewable companion change with a rationale
9+
; cross-referenced to audits/audit-install-scripts.adoc.
10+
;
11+
; All entries below are audited false positives; neurophone has 0 real
12+
; vulnerabilities (production: 0 unsafe, 0 panic sites, 0 injection, 0 crypto
13+
; misuse). The PanicPath findings are auto-suppressed (test/bench) and need no
14+
; classification here.
15+
;
16+
; The top-level identity/version fields below satisfy the estate a2ml-validate
17+
; gate (matching a2ml-ecosystem conformance/valid/sectioned-manifest.a2ml);
18+
; panic-attack's loader ignores everything outside `(classification …)` blocks,
19+
; so they do not affect suppression.
20+
21+
project = "neurophone"
22+
schema_version = "1.0.0"
23+
24+
[metadata]
25+
name = "assail-classifications"
26+
version = "1.0.0"
27+
28+
(assail-classifications
29+
(classification
30+
(file "scripts/setup.sh")
31+
(category "PathTraversal")
32+
(audit "audits/audit-install-scripts.adoc §1")
33+
(rationale "Android /data/local/tmp device-staging path (adb), not host /tmp"))
34+
(classification
35+
(file "scripts/install-on-phone.sh")
36+
(category "PathTraversal")
37+
(audit "audits/audit-install-scripts.adoc §1")
38+
(rationale "adb push target on the device: /data/local/tmp/<model>, not host /tmp"))
39+
(classification
40+
(file "scripts/uninstall.sh")
41+
(category "PathTraversal")
42+
(audit "audits/audit-install-scripts.adoc §1")
43+
(rationale "adb shell rm of the on-device model at /data/local/tmp, not host /tmp"))
44+
(classification
45+
(file "scripts/install-termux.sh")
46+
(category "HardcodedSecret")
47+
(audit "audits/audit-install-scripts.adoc §2")
48+
(rationale "public HuggingFace model URL + commented sk-ant placeholder in a config template; no secret")))

audits/audit-install-scripts.adoc

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// SPDX-License-Identifier: CC-BY-SA-4.0
2+
// SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
3+
= Audit: install/uninstall shell scripts — panic-attack residuals
4+
:toc:
5+
:revdate: 2026-07-01
6+
7+
Companion audit for `audits/assail-classifications.a2ml`. Records why the
8+
`panic-attack assail` findings in the install/uninstall shell scripts are
9+
audited-sound false positives, so they may be classified `suppressed` in a
10+
reviewable, out-of-band way (per the panic-attack user-classification pattern —
11+
the registry lives apart from the source, so a finding cannot self-suppress).
12+
13+
Scan of record: `panic-attack assail .` — 9 weak points, 0 real vulnerabilities.
14+
The 5 `PanicPath` findings are already auto-suppressed (test/bench code). The
15+
four production-script findings below are the audited residuals.
16+
17+
== §1 PathTraversal — Android device-staging paths (not host `/tmp`)
18+
19+
Files: `scripts/setup.sh`, `scripts/install-on-phone.sh`, `scripts/uninstall.sh`.
20+
21+
The detector pattern-matched `/tmp/` inside `/data/local/tmp/`. That is **not**
22+
the host temp directory — it is the canonical Android **on-device** staging path
23+
used with `adb push` / `adb shell`, the standard location for pushing a model
24+
file to a phone:
25+
26+
* `scripts/setup.sh` — an `echo` instruction: `Place in: /data/local/tmp/ on the device`.
27+
* `scripts/install-on-phone.sh` — `DEVICE_MODEL_PATH="/data/local/tmp/${MODEL_FILE}"`, the `adb push` target on the device.
28+
* `scripts/uninstall.sh` — `adb shell rm -f /data/local/tmp/llama-…gguf`, removing the model from the device.
29+
30+
There is no host-side symlink/traversal surface here: the path is a device path
31+
addressed through `adb`, and applying `mktemp` would be **incorrect** (you cannot
32+
`mktemp` a device path, and `/data/local/tmp/` is the required Android location).
33+
Classification: audited-sound false positive.
34+
35+
== §2 HardcodedSecret — public URL + commented key template
36+
37+
File: `scripts/install-termux.sh`.
38+
39+
* Line ~19: `MODEL_URL="https://huggingface.co/…/Llama-3.2-1B-Instruct-Q4_K_M.gguf"` — a **public** model download URL, not a secret.
40+
* The `sk-ant-…` string is a **commented-out placeholder** inside a generated
41+
`config.toml` template (`# api_key = "sk-ant-..." # uncomment + set …`),
42+
showing the user where to place *their own* key. No credential is committed.
43+
44+
No secret enters source control (corroborated by the estate secret-scanner gate).
45+
Classification: audited-sound false positive.

0 commit comments

Comments
 (0)