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
5 changes: 3 additions & 2 deletions .claude/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,10 @@ clauses (grammar: standards `1-formats/deed/spec/abnf/deed.abnf`; lint with
- `hypatia_rules_praxis.deed` - the A5 rule registry, generated by `scripts/gen-rules-praxis.sh`
- `docs/history/A2ML-REMOVED.adoc` - each removed `.a2ml` file, its git blob id, and where its
content went
- `audits/assail-classifications_praxis.deed` - panic-attack's user-classification registry
(audited findings it flips to suppressed), read deed-first by panic-attack

Two `.a2ml` files remain, each for a reader outside this repo (see the ledger):
`audits/assail-classifications.a2ml` (panic-attack reads only that name) and
One `.a2ml` file remains, for a reader outside this repo (see the ledger):
`test/fixtures/a2ml/rsr-criteria-v2.a2ml` (a copy of the standards RSR criteria, still A2ML).
The rules that *detect* `.a2ml` in scanned repos, and the shared readers that fall back to it
(`RsrConformance`, `RsrCriteria`, `RuleLoader`), are deliberate.
Expand Down
11 changes: 2 additions & 9 deletions .github/workflows/dogfood-gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,7 @@ jobs:
- name: Check for A2ML and DEED files
id: detect
run: |
# audits/assail-classifications.a2ml is panic-attack's user-classification
# registry — an S-expression dialect by that tool's spec (see panic-attack
# CLAUDE.md), not the TOML-like manifest A2ML this gate validates. Exclude
# it rather than feeding it to a validator for a different dialect.
COUNT=$(find . -type f \( -name '*.a2ml' -o -name '*.deed' \) -not -path './.git/*' -not -name 'assail-classifications.a2ml' -printf '.' | wc -c)
COUNT=$(find . -type f \( -name '*.a2ml' -o -name '*.deed' \) -not -path './.git/*' -printf '.' | wc -c)
echo "count=$COUNT" >> "$GITHUB_OUTPUT"
if [ "$COUNT" -eq 0 ]; then
echo "::warning::No .a2ml/.deed manifest files found. Every RSR repo should have a repo deed (<reponame>_chora.deed); legacy 0-AI-MANIFEST.a2ml accepted mid-migration — standards #837"
Expand All @@ -52,9 +48,7 @@ jobs:
path: '.'
strict: 'false'
# Re-state the action's default carve-outs (a custom value REPLACES
# the default list), plus panic-attack's user-classification
# registry: that file is an S-expression dialect by panic-attack's
# spec, not the TOML-like manifest A2ML this action validates.
# the default list).
paths-ignore: |
vendor/
vendored/
Expand All @@ -63,7 +57,6 @@ jobs:
integration/fixtures/
test/fixtures/
tests/fixtures/
assail-classifications.a2ml

- name: Write summary
run: |
Expand Down
102 changes: 0 additions & 102 deletions audits/assail-classifications.a2ml

This file was deleted.

112 changes: 112 additions & 0 deletions audits/assail-classifications_praxis.deed
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
;; SPDX-License-Identifier: MPL-2.0
;; SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
;;
;; assail-classifications_praxis.deed — audited panic-attack findings for
;; hypatia. Translated entry for entry from audits/assail-classifications.a2ml
;; (removed; see docs/history/A2ML-REMOVED.adoc): (file "…") is :file,
;; (category "…") is the symbol :category, (audit "…") is :audit and
;; (rationale "…") is :rationale. Nothing was added or dropped.
;;
;; Read by panic-attack's deed-first registry reader (load_user_classifications,
;; src/assail/classifications.rs): findings matching (:file, :category) are
;; flipped to suppressed = true AFTER the structural kanren suppression pass.
Comment on lines +10 to +12

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Update scanner pins before replacing the classification registry

Keep the legacy registry until every checked-in scanner lane uses the deed-aware panic-attack revision. In this commit, .github/workflows/estate-rescan.yml still pins 410a8f821ea8297833162565b50a298f787815da, and .github/workflows/hypatia-scan.yml still delegates to the unchanged standards workflow at 7641c7fdb01420696b5420ab85d88f599f32f609; those revisions predate the deed reader described here. Consequently, scans through either lane ignore this new file after the .a2ml registry is deleted, causing all 14 audited findings to reappear unsuppressed.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. This is the ordering the PR body called for.


Generated by Claude Code

;; A malformed file fails the scan; it is never read as an empty registry.
;; Entries here are AUDITED-SOUND residuals, not exemptions of convenience:
;; every entry must cite its rationale, and the registry lives apart from the
;; source so a code edit cannot self-suppress (see panic-attack CLAUDE.md,
;; User-Classification Registry).
;;
;; Audit trail: 2026-06-11 estate-loop session — fresh panic-attack
;; 2.5.5 scan of hypatia; every entry below was inspected at source.
(praxis-deed
:schema-version "1.0.0"
:canonical-name "hypatia-assail-classifications"
:beholding-chora #uuid"0889b37b-defb-831f-973c-e119500db00e"
:profile assail-classifications

;; ── Soundness-gate negative fixtures ─────────────────────────────
;; test/soundness/fixtures/code_safety/ exists to PROVE the scanner
;; catches these constructs; the findings are the fixtures working
;; as designed. Mirrors lib/hypatia/scanner_suppression.ex, which
;; already exempts these paths for hypatia's own scanner.
(classification
:file "test/soundness/fixtures/code_safety/transmute.rs"
:category UnsafeCode
:audit "test/soundness — deliberate negative fixture"
:rationale "fixture asserting the scanner detects mem::transmute")
(classification
:file "test/soundness/fixtures/code_safety/admitted.v"
:category ProofDrift
:audit "test/soundness — deliberate negative fixture"
:rationale "fixture asserting the scanner detects Admitted")
(classification
:file "test/soundness/fixtures/code_safety/believe_me.idr"
:category ProofDrift
:audit "test/soundness — deliberate negative fixture"
:rationale "fixture asserting the scanner detects believe_me")
(classification
:file "test/soundness/fixtures/code_safety/sorry.lean"
:category ProofDrift
:audit "test/soundness — deliberate negative fixture"
:rationale "fixture asserting the scanner detects sorry")
(classification
:file "test/soundness/fixtures/code_safety/obj_magic_ocaml.ml"
:category UnsafeTypeCoercion
:audit "test/soundness — deliberate negative fixture"
:rationale "fixture asserting the scanner detects Obj.magic")
(classification
:file "test/soundness/fixtures/code_safety/unsafe_coerce.hs"
:category UnsafeTypeCoercion
:audit "test/soundness — deliberate negative fixture"
:rationale "fixture asserting the scanner detects unsafeCoerce")
(classification
:file "test/soundness/fixtures/code_safety/elixir_code_eval.ex"
:category DynamicCodeExecution
:audit "test/soundness — deliberate negative fixture"
:rationale "fixture asserting the scanner detects Code.eval_string")
(classification
:file "test/soundness/fixtures/code_safety/zig_ptr_cast.zig"
:category UnsafeCode
:audit "test/soundness — deliberate negative fixture"
:rationale "fixture asserting the scanner detects Zig pointer casts")

;; ── Remediation scripts: pattern strings, not vulnerabilities ────
(classification
:file "scripts/fix-scripts/fix-deno-permissions.sh"
:category ExcessivePermissions
:audit "remediation tool — replaces `deno -A` with scoped permission flags; scripts/fix-scripts/ is already exempt in scanner_suppression.ex"
:rationale "contains -A as the SEARCH pattern it removes from other repos")

;; ── FFI boundary unsafe: documented, load-bearing ────────────────
(classification
:file "clients/rust/hypatia-client/src/ffi.rs"
:category UnsafeCode
:audit "in-file # Safety section (ffi.rs:7-30) enumerates the invariant for every unsafe block; carries hypatia allow pragmas"
:rationale "libloading C-ABI boundary calls against libhypatia_ffi.so; each block's invariant documented at source")

;; ── Test harnesses ───────────────────────────────────────────────
(classification
:file "tests/e2e.sh"
:category CommandInjection
:audit "tests/e2e.sh:88-93 — heredoc writes a deliberately insecure fixture"
:rationale "the eval is fixture CONTENT generated for the scanner-detection test, not executed by the harness")
(classification
:file "integration/run-tests.sh"
:category HardcodedSecret
:audit "integration/run-tests.sh:268 — ARANGODB_PASSWORD=testpassword"
:rationale "throwaway credential for the ephemeral integration-test database container")

;; ── Env-var binding misread as a secret ──────────────────────────
(classification
:file "hooks/lib/cache.sh"
:category HardcodedSecret
:audit "hooks/lib/cache.sh:17-22 — CICD_CACHE_PASSWORD=\"${CICD_CACHE_PASSWORD:-}\""
:rationale "empty-default env-var binding, documented in-file; no literal secret present")

;; ── Rule definitions detecting themselves ────────────────────────
(classification
:file "lib/hypatia/scanner_suppression.ex"
:category HardcodedSecret
:audit "scanner suppression rule definitions contain secret-shaped pattern strings"
:rationale "detector/suppression pattern table, not credentials — same class as the scripts/fix-* carve-out in scanner_suppression.ex")
)
18 changes: 9 additions & 9 deletions docs/history/A2ML-REMOVED.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -223,24 +223,24 @@ Size is in bytes. The sha256 is of the file as it was tracked.
| RuleLoader fixture (HYP-S007).
| Inlined into `test/rules/rule_loader_test.exs`.

| `audits/assail-classifications.a2ml`
| 5623
| `7d9c7b14419f6a597a9be87e5828ee7aff53648d5edc1175204494205d1bcb24`
| `eba4c4e6c4ed29dbbc7e1c9ca733f91e54e114f7`
| panic-attack's user-classification registry: 14 audited findings (file, category, audit, rationale) that panic-attack flips to suppressed. Removed later than the rest (it was retained until panic-attack had a deed reader); last held at `7d1059aa`.
| `audits/assail-classifications_praxis.deed`, entry for entry, all 14 kept: `(file …)`, `(audit …)` and `(rationale …)` became the `:file`, `:audit` and `:rationale` fields and `(category "…")` the symbol `:category`. No mapping spec covers it; its reader is panic-attack's deed-first `load_user_classifications`, which reads this name before the legacy A2ML ones.

|===

== Retained, with the reason

Two `.a2ml` files stay, each because a live reader outside this repository's
control still needs exactly that input. Neither has a deed form to move to.
One `.a2ml` file stays, because a live reader outside this repository's
control still needs exactly that input, and it has no deed form to move to.

[cols="3,5",options="header"]
|===
| Path | Why it stays

| `audits/assail-classifications.a2ml`
| panic-attack (>= 2.5.5, `load_user_classifications` in its assail module,
in the panic-attack repository) reads only `audits/assail-classifications.a2ml` or
`.panic-attack-classifications.a2ml`. No mapping spec covers it and
panic-attack has no deed reader, so deleting it would unsuppress the audited
findings it records. It goes when panic-attack reads a deed form first.

| `test/fixtures/a2ml/rsr-criteria-v2.a2ml`
| A dogfood copy of the RSR v2.0 criteria, whose canon
(`0-canon/rsr/rsr-criteria-v2.a2ml` in standards) is still A2ML: A7 section
Expand Down
5 changes: 3 additions & 2 deletions test/dogfood_manifest_detection_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
[['manifest.deed'], 1],
[['manifest.a2ml'], 1],
[["line\nbreak.deed", 'legacy.a2ml'], 2],
[['.git/ignored.deed', 'audits/assail-classifications.a2ml'], 0]
[['.git/ignored.deed'], 0],
[['audits/assail-classifications_praxis.deed'], 1]
].each do |files, expected|
Dir.mktmpdir('dogfood-detect-') do |dir|
files.each do |file|
Expand All @@ -25,4 +26,4 @@
abort "wrong candidate count for #{files.inspect}" unless File.read(output) == "count=#{expected}\n"
end
end
puts 'PASS: empty, DEED-only, A2ML-only, mixed, newline filenames, and excluded manifests'
puts 'PASS: empty, DEED-only, A2ML-only, mixed, newline filenames, .git excluded, classification deed counted'
Loading