Skip to content

audit: classify 8 FFI/systems unsafe findings as legitimate (PA001/PA007)#32

Merged
hyperpolymath merged 1 commit into
mainfrom
panic-fix/PA001-PA007-ffi-legitimate
May 26, 2026
Merged

audit: classify 8 FFI/systems unsafe findings as legitimate (PA001/PA007)#32
hyperpolymath merged 1 commit into
mainfrom
panic-fix/PA001-PA007-ffi-legitimate

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

Summary

panic-attack assail reports 8 UnsafeCode (PA001) + UnsafeFFI (PA007) Critical/High findings under impl/rust-cli/src/, impl/zig/, ffi/rust/src/ in this repo. All sit at the C-ABI / syscall boundary and are required by the language to call across.

Rationale: valence-shell is a Unix shell. impl/rust-cli is the Rust shell front-end calling libc::{chown,getpwnam,getgrnam,getpgrp,kill,pipe,WIFSTOPPED} + File::from_raw_fd — required POSIX job-control + permission syscalls. impl/zig is the Zig daemon-client FFI; ffi/rust contains the Rust FFI shim to the Lean-verified core via lean_wrapper.zig.

What changes

  • audits/assail-classifications.a2ml — 8 entries, classification=legitimate-ffi.
  • audits/audit-ffi-2026-05-26.md — auditor record + anti-gameability note.

Scope

Classification is scoped to the listed roots (impl/rust-cli/src/, impl/zig/, ffi/rust/src/). Any unsafe block outside those roots remains visible.

Anti-gameability

Same pattern as svalinn, proven, gossamer, docudactyl, proven-servers, aerie, boj-server, stapeln, ambientops.

Verification

Locally: panic-attack assail . --headless reports the 8 findings as suppressed: true on this branch.

Refs hyperpolymath/panic-attack#32.

🤖 Generated with Claude Code

…007)

panic-attack assail flags 8 UnsafeCode/UnsafeFFI Critical/High findings
under impl/rust-cli/src/, impl/zig/, ffi/rust/src/ — all at the C-ABI / syscall boundary.

Rationale: valence-shell is a Unix shell. impl/rust-cli is the Rust shell front-end calling libc::{chown,getpwnam,getgrnam,getpgrp,kill,pipe,WIFSTOPPED} + File::from_raw_fd — required POSIX job-control + permission syscalls. impl/zig is the Zig daemon-client FFI; ffi/rust contains the Rust FFI shim to the Lean-verified core via lean_wrapper.zig.

Adds:
- audits/assail-classifications.a2ml (entries=8, classification=legitimate-ffi)
- audits/audit-ffi-2026-05-26.md

Anti-gameability: registry is separate from source under scan; new unsafe
inside a classified root requires a companion classification entry.

Refs hyperpolymath/panic-attack#32 (estate sweep tracker).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 82 issues detected

Severity Count
🔴 Critical 9
🟠 High 33
🟡 Medium 40

⚠️ Action Required: Critical security issues found!

View findings
[
  {
    "reason": "Action hyperpolymath/standards/.github/workflows/governance-reusable.yml@main needs attention",
    "type": "unpinned_action",
    "file": "governance.yml",
    "action": "pin_sha",
    "rule_module": "workflow_audit",
    "severity": "high"
  },
  {
    "reason": "Workflow executes remote script directly (curl/wget piped to shell). Download, verify checksum/signature, then execute.",
    "type": "download_then_run",
    "file": "lean-verification.yml",
    "action": "verify_download_integrity",
    "rule_module": "workflow_audit",
    "severity": "high"
  },
  {
    "reason": "Workflow executes remote script directly (curl/wget piped to shell). Download, verify checksum/signature, then execute.",
    "type": "download_then_run",
    "file": "mirror.yml",
    "action": "verify_download_integrity",
    "rule_module": "workflow_audit",
    "severity": "high"
  },
  {
    "reason": "Workflow executes remote script directly (curl/wget piped to shell). Download, verify checksum/signature, then execute.",
    "type": "download_then_run",
    "file": "rust-cli.yml",
    "action": "verify_download_integrity",
    "rule_module": "workflow_audit",
    "severity": "high"
  },
  {
    "reason": "Agda postulate assumes without proof -- potential soundness hole (1 occurrences, CWE-704)",
    "type": "agda_postulate",
    "file": "/home/runner/work/valence-shell/valence-shell/proofs/agda/FilesystemModel.agda",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "critical"
  },
  {
    "reason": "Coq admit tactic leaves goal unproven (1 occurrences, CWE-704)",
    "type": "coq_admit_tactic",
    "file": "/home/runner/work/valence-shell/valence-shell/proofs/coq/filesystem_composition.v",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "critical"
  },
  {
    "reason": "Admitted leaves proof hole (2 occurrences, CWE-704)",
    "type": "admitted",
    "file": "/home/runner/work/valence-shell/valence-shell/proofs/coq/posix_errors.v",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "critical"
  },
  {
    "reason": "Obj.magic bypassing type safety (2 occurrences, CWE-704)",
    "type": "obj_magic",
    "file": "/home/runner/work/valence-shell/valence-shell/impl/mcp/src/bindings/Mcp.res",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "high"
  },
  {
    "reason": "JSON decode without validation (1 occurrences, CWE-20)",
    "type": "json_decode_no_validation",
    "file": "/home/runner/work/valence-shell/valence-shell/impl/mcp/src/Server.res",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "critical"
  },
  {
    "reason": "unwrap_or(0) with dangerous default (1 occurrences, CWE-754)",
    "type": "unwrap_dangerous_default",
    "file": "/home/runner/work/valence-shell/valence-shell/ffi/rust/src/operations.rs",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "critical"
  }
]

Powered by Hypatia Neurosymbolic CI/CD Intelligence

@hyperpolymath hyperpolymath merged commit e4cae83 into main May 26, 2026
13 of 17 checks passed
@hyperpolymath hyperpolymath deleted the panic-fix/PA001-PA007-ffi-legitimate branch May 26, 2026 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant