Skip to content

feat(audit): package mode (audit_package, audit-package) - #39

Merged
hyperpolymath merged 3 commits into
mainfrom
claude/apodeixis-package-audit
Nov 19, 2026
Merged

hyperpolymath merged 3 commits into
mainfrom
claude/apodeixis-package-audit

Conversation

@hyperpolymath

@hyperpolymath hyperpolymath commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

Summary

Adds package mode so a real Julia package can pass the source-policy audit. One form of include is permitted in package mode only, and the included file is audited too. audit_source and audit_file are unchanged: include stays forbidden there. Source-policy audit, not a proof.

Changes

  • audit_package(root_file) and PackageReport (root, one AuditReport per reached file, package-level findings, unreached files). is_policy_clean has a method for it.
  • Permitted form: include("literal.jl"), one plain string literal, as a statement at top level or directly in a module/baremodule body (nested modules fine; a docstring on the module is looked through). Everything else stays APX_DYNAMIC_ESCAPE.
  • Path rules: relative, ends in .jl, resolved against the including file, inside the root directory after realpath.
  • New codes: APX_INCLUDE_PATH, APX_INCLUDE_OUTSIDE_ROOT, APX_INCLUDE_MISSING, APX_INCLUDE_DUPLICATE, APX_INCLUDE_CYCLE, APX_PACKAGE_SCAN_ERROR (documented in the audit_package docstring).
  • Unreached .jl files under the root directory are listed, not findings.
  • CLI audit-package ROOT.jl, same exit codes as audit (0 clean, 1 rejected, 2 usage/read error).
  • Tests (a) to (l), docstring and user-defined-include cases, and CLI tests; plan (first external target) and changelog updated.

RSR Quality Checklist

Required

  • Tests pass (Pkg.test() on Julia 1.12.1: all testsets pass)
  • Code is formatted (no formatter run)
  • Linter is clean (none run)
  • No banned language patterns
  • No banned functions
  • No secrets, credentials, or .env files included

As Applicable

  • CHANGELOG or release notes updated
  • Documentation updated for user-facing changes (plan; README has no text saying include is always forbidden, so it is unchanged)

Testing

Full suite on Julia 1.12.1: 366 before, 516 after, 0 failures. Falsifier: with computed include paths permitted, 6 tests in "(c) computed paths are flagged" fail; restored, all pass. scripts/check-adoc-renders.sh not run (no asciidoctor installed).

Pilot, read only, CoprocessorRuntime.jl at a0e2c82: audit on the root had 7 APX_DYNAMIC_ESCAPE; audit-package reaches 8 files, all clean, 0 unreached.

Decided by the coordinator

Looking through the parser's own docstring node is sound and stays. The look-through matches only the GlobalRef(Core, @doc) node that the parser writes for a docstring. The parent session ran 12 attack cases on commit 2a22c75 and all gave the expected result: a user-written Core.@doc "d" module ... end and @doc "d" module ... end are still flagged; eval inside the module docstring is flagged; ../src2/x.jl (same name prefix) and a symbolic link that leaves the root give APX_INCLUDE_OUTSIDE_ROOT; two-argument include, const include = ..., a package that defines its own include, and include in a loop are flagged; the same file twice gives APX_INCLUDE_DUPLICATE; a nested docstring module that reaches a file with ccall is not clean; a docstring module with a clean include is clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_0136P7Zpa1S5bdGh4d9CQ9tt

…idden

audit_package and audit-package permit one literal include form and audit
every file it reaches. audit_file and audit_source are unchanged.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0136P7Zpa1S5bdGh4d9CQ9tt
@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Hypatia grid green

🟢 clean · commit ea13c6261f25 · run 44515004481 · scope: this change (5 file(s))

Advisory: 11 row(s), worst 🔴 high (0 critical, 10 high in grid scope) — reported, never grading the change.

Unique graded findings across gating and advisory rows: 30 (30 reporter observations; 27 without sufficient identity to corroborate). Row counts remain per reporter; unique totals do not change gating.
Raw Hypatia alert-derived observations: 29 (code-scanning, Dependabot and secret-scanning; some may also be in SARIF; not an extra total).

Reporter Gate Status Critical High Medium Minor Since previous revision
Hypatia scan gating 🟢 clean 0 0 0 0 — same commit (no revision comparison)
panic-attack assail advisory 🔴 high 0 1 3 0 — same commit (no revision comparison)
pons asinorum advisory 🟢 clean 0 0 0 0 — same commit (no revision comparison)
echidnabot advisory ⚪ not applicable 0 0 0 0 — same commit (no revision comparison)
rhodibot (RSR compliance) advisory 🟢 clean 0 0 0 0 — same commit (no revision comparison)
panicbot advisory ⚪ not applicable 0 0 0 0 — same commit (no revision comparison)
sustainabot advisory ⚪ not applicable 0 0 0 0 — same commit (no revision comparison)
glambot (presentation quality) advisory 🔵 minor 0 0 0 7 — same commit (no revision comparison)
seambot advisory ⚪ not applicable 0 0 0 0 — same commit (no revision comparison)
finishingbot (release readiness) advisory 🔴 high 0 9 10 0 — same commit (no revision comparison)
cipherbot advisory ⚪ not applicable 0 0 0 0 — same commit (no revision comparison)
accessibilitybot advisory ⚪ not applicable 0 0 0 0 — same commit (no revision comparison)
Hypatia scan: 1 finding(s)
  • 1 further finding(s) in files this change does not touch: reported, not graded (0 critical, 0 high).
panic-attack assail: 22 finding(s)
  • high DynamicCodeExecution — test/runtests.jl — eval/Meta.parse in test/runtests.jl
  • medium UnsafeFFI — src/Apodeixis.jl — 1 ccall/FFI calls in src/Apodeixis.jl
  • medium UnsafeFFI — test/runtests.jl — 5 ccall/FFI calls in test/runtests.jl
  • medium ProofDrift — test/runtests.jl — 2 `@test x isa Y` assertion(s) with no value check — type-only tests may substitute for an unwritten formal theorem in test/runtests.jl
  • 18 further finding(s) in files this change does not touch: reported, not graded (0 critical, 0 high).
pons asinorum: 9 finding(s)
  • 9 further finding(s) in files this change does not touch: reported, not graded (0 critical, 0 high).
echidnabot: not_applicable — template default: enrol once the repository carries proofs and an ECHIDNA engine is configured
  • ⚪ not applicable: template default: enrol once the repository carries proofs and an ECHIDNA engine is configured
rhodibot (RSR compliance): 11 finding(s)
  • 11 further finding(s) in files this change does not touch: reported, not graded (0 critical, 10 high).
panicbot: not_applicable — panic-attack is already graded by the verdict grid's own panic-attack row, from static-analysis-gate.yml evidence; enrolling panicbot would report one scanner twice and give two rows that can disagree
  • ⚪ not applicable: panic-attack is already graded by the verdict grid's own panic-attack row, from static-analysis-gate.yml evidence; enrolling panicbot would report one scanner twice and give two rows that can disagree
sustainabot: not_applicable — reserved fleet slot; no adapter exists (gitbot-fleet bots/sustainabot/README.adoc)
  • ⚪ not applicable: reserved fleet slot; no adapter exists (gitbot-fleet bots/sustainabot/README.adoc)
glambot (presentation quality): 91 finding(s)
  • info GS-001 — Install git-seo for comprehensive SEO analysis: https://github.com/hyperpolymath/git-seo
  • info MACH-007 — ECOSYSTEM.scm not found in .machine_readable/ directory.
  • info MACH-007 — META.scm not found in .machine_readable/ directory.
  • info MACH-007 — STATE.scm not found in .machine_readable/ directory.
  • info MACH-005 — No robots.txt found. Consider adding one for crawler control.
  • info VIS-005 — docs/plan/ULTRAPLAN.adoc:37 — Line 265 characters exceeds max length of 80.
  • info VIS-005 — CHANGELOG.adoc:73 — Line 89 characters exceeds max length of 80.
  • 84 further finding(s) in files this change does not touch: reported, not graded (0 critical, 2 high).
seambot: not_applicable — template default: enrol once a seam register exists at spec/seams/seam-register.json
  • ⚪ not applicable: template default: enrol once a seam register exists at spec/seams/seam-register.json
finishingbot (release readiness): 174 finding(s)
  • high V1-DOC-ROADMAP.adoc — Required file ROADMAP.adoc not found (Project roadmap).
  • high TOOL-001 — .tool-versions file not found for asdf/mise version management.
  • high SCM-001-NEUROSYM.scm — Required SCM file NEUROSYM.scm not found (Neurosymbolic AI documentation).
  • high SCM-001-AGENTIC.scm — Required SCM file AGENTIC.scm not found (Agentic AI integration documentation).
  • high SCM-001-PLAYBOOK.scm — Required SCM file PLAYBOOK.scm not found (Operational playbooks and procedures).
  • high SCM-001-ECOSYSTEM.scm — Required SCM file ECOSYSTEM.scm not found (Project's place in the ecosystem).
  • high SCM-001-META.scm — Required SCM file META.scm not found (Meta-level information and architectural decisions).
  • high SCM-001-STATE.scm — Required SCM file STATE.scm not found (Project state and progress tracking).
  • high PH-100 — Found 124 placeholders, exceeds maximum allowed (0)
  • medium V1-COM-CONTRIBUTING.md — CONTRIBUTING.md file not found (Contribution guidelines).
  • medium V1-COM-CODE_OF_CONDUCT.md — CODE_OF_CONDUCT.md file not found (Code of conduct).
  • medium V1-SEC-001 — SECURITY.md not found for responsible disclosure.
  • medium TEST-001 — Could not determine if this is a Rust or Deno project.
  • medium REL-004 — No SECURITY.md file found
  • medium CLM-006 — CHANGELOG.adoc — Documentation references non-existent file: e2e.yml.template
  • medium CLM-006 — CHANGELOG.adoc — Documentation references non-existent file: hypatia-scan.yml
  • medium CLM-006 — CHANGELOG.adoc — Documentation references non-existent file: dogfood-gate.yml
  • medium CLM-006 — CHANGELOG.adoc — Documentation references non-existent file: security-policy.yml
  • medium PH-001 — CHANGELOG.adoc:224 — Found 'TODO' in: `FROM …:latest` lines and a body of TODO comments built nothing and failed
  • 155 further finding(s) in files this change does not touch: reported, not graded (0 critical, 4 high).
cipherbot: not_applicable — template default: enrol once the repository implements cryptography
  • ⚪ not applicable: template default: enrol once the repository implements cryptography
accessibilitybot: not_applicable — template default: enrol once the repository serves HTML
  • ⚪ not applicable: template default: enrol once the repository serves HTML

Scope: static findings reported by each row's tool at the named commit. The table grades only findings in files this change touches, so the colour answers "does this change introduce anything?", not "what does the whole repository still carry?". Standing findings are counted in each accordion and in report.json; the baseline filter remains the place where acknowledged debt is recorded. The lane state is the worst GATING row; advisory rows are listed and counted but never set it. Purple, red, yellow and blue grade the worst GRADED finding present; orange is evidence missing, malformed or a scanner that did not run; grey is an explicit scope exclusion with its reason. No row is a security certification. report.json, badge.json and the raw findings are in the verdict-grid artifact on the linked run.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0136P7Zpa1S5bdGh4d9CQ9tt
@hyperpolymath
hyperpolymath marked this pull request as ready for review November 19, 2026 11:24
@sonarqubecloud

Copy link
Copy Markdown

Repository owner deleted a comment from coderabbitai Bot Nov 19, 2026
@hyperpolymath
hyperpolymath merged commit d7789b6 into main Nov 19, 2026
52 checks passed
@hyperpolymath
hyperpolymath deleted the claude/apodeixis-package-audit branch November 19, 2026 11:47
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.

3 participants