Skip to content

Report audited-source drift from audit/audits.json in rainix-sol #321

Description

@thedavidmeister

rain.solmem now carries audit/audits.json, a machine-readable record of which commits an external auditor reviewed and which files were in scope (rainlanguage/rain.solmem#88, rainlanguage/rain.solmem PR to follow). Nothing consumes it.

Consumer repos call rainix-sol.yaml and nothing else, so the reporting step belongs here rather than in each consumer.

What is missing

A non-blocking job — a report, not a gate. Drift past an audited commit is expected and legitimate; drift nobody can see is not.

Two things it should surface per audited commit:

  • how far src/ has moved since (git diff --name-only <commit>..HEAD -- src/),
  • whether the manifest still describes reality: every reviews[].commit resolves and is an ancestor of HEAD, every scope[] path existed at those commits, report points at a file that exists.

Shape

audit/audits.json in the consumer:

[
  {
    "auditor": "Protofire",
    "report": "audit/protofire/rain.solmem.228b35c6725877e7fbcd2432b4c692357f16f510.jan-2026.pdf",
    "reviews": [
      { "date": "2026-01-13", "commit": "228b35c6725877e7fbcd2432b4c692357f16f510" },
      { "date": "2026-01-26", "commit": "26bce6197383f193e35326bab4d4424cf6eafde7" }
    ],
    "scope": ["src/lib/LibMemCpy.sol", "..."]
  }
]

A rainix-sol-audit-drift.yaml reusable, wired into rainix-sol.yaml alongside static / legal / test, that no-ops when the file is absent (most repos do not have one yet).

actions/checkout must run at fetch-depth: 0 in that job — the audited commits are months of history back, and the default depth-1 checkout cannot resolve them.

Known gap

The ancestry and scope-presence checks cannot tell that a scope list has been silently narrowed: dropping an entry that the PDF listed leaves every remaining entry valid. Only a human comparing the manifest to the report catches that. Worth stating in whatever documents the format rather than pretending the check is total.

Other repos with audits to convert once this lands

  • rain.orderbookaudit/protofire/raindex.e686b4d.apr-2026.pdf, raindex.sol-v0.1.12.jun-2026.pdf (the second encodes a tag, not a commit)
  • rain.interpreteraudit/protofire/rainlang.b44c664fe7cc175748f8cf19a99cdb43d7f3a0d1.mar-2026.pdf, audit/payant/rainlang.2023-08-29.pdf (encodes only a date)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions