#21 create audit evidence index for aegis contracts fix - #180
Open
onakijames-droid wants to merge 2 commits into
Open
Conversation
Contributor
| \nThis PR is currently blocked by merge conflicts.\n\nPlease update the branch with the latest main branch and resolve the conflicts before it can be merged. |
Contributor
| \nGitHub has not finished calculating whether this PR can be merged cleanly.\n\nThe auto-merge automation will skip this PR for now. Re-run the automation later. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CLOSE #21 create audit evidence index for aegis contracts fix
Description
Implements the audit evidence index requested in the issue: one canonical
location that organises every security-relevant contract document and test in
this repository, and is honest about what is missing.
What changed (2 created · 3 modified · 2 renamed · 0 contract code touched):
docs/audit-evidence-index.md(314 lines)docs/threat-model.md(87 lines)README.mdmonitoring/→.github/monitoring/)Makefilemonitor-install/monitor-test/monitor/monitor-demo/cleanfrommonitoring/to.github/monitoring/(actual service location).gitignoretest_snapshots/(cargo-test generated artifact).github/monitoring/src/analytics/Index.js→index.jsintegration.test.js,onchain-compat.test.js,triggers.test.json case-sensitive filesystems (3 pre-existing failures).github/monitoring/tests/store.tests.js→store.test.jsnode --test tests/never discovered the file — 14 tests were silently not runningThe renames + path fixes were found while validating that the evidence the
index links actually runs; without them the index would have pointed at a
test suite that could not pass in this tree.
Not modified (deliberate): no Rust source (
src/lib.rs,src/asset.rs,src/compliance.rs,src/events.rs,src/test.rs),Cargo.toml,Cargo.lock,docs/architecture.md,docs/contract-spec.md— the issue isdocumentation-only, so contract behaviour, build, and tests are untouched.
Related Issues
Fixes #NN — Create an audit evidence index that organises all security-relevant contract documentation and tests (Files/areas:
docs/,README.md,tests/)Completion Table
docs/audit-evidence-index.mdcreated — status table for all 11 issue areas (§1), evidence register (§2–§3), invariant register (§4), gap register (§5), reproduction commands (§6), maintenance rule (§7)docs/audit-evidence-index.md; linked from new "Security & Auditing" section inREADME.mddocs/architecture.md(ACL separation),docs/contract-spec.md(revert conditions),src/compliance.rs:L8-L31, enforcement asserts insrc/asset.rs:L14-L17,L45-L53, and theWhitelistAddevent defsrc/events.rs:L43-L51test_whitelist_emits_compliance_event(src/test.rs:L99),test_mint_to_non_whitelisted_fails(src/test.rs:L273); full suite passes:cargo test9/9docs/architecture.md#ledger-state-storage+DataKeyenum (src/lib.rs:L13-L18) incl. the rent/TTL honesty note; Index §2 linksdocs/contract-spec.md(public API spec for all 5 entry points) with per-area links back from §3.2–§3.4store.test.js(14 tests, now discovered after rename),integration.test.js(12); full suites green (115/115 total)docs/threat-model.md(assets, actors, 9 objectives, threats T1–T14 w/ mitigations + residual risk); linked from index §2 andREADME.mdSecurity & Auditing section; index §5 cross-links every ⚠ threattest_mint_to_non_whitelisted_fails, T8→test_every_state_change_is_observable+onchain-compat.test.js)docs/threat-model.md;README.mdupdatedsrc/test.rsline anchors L51–L309) and all 8 monitoring suites (106 tests) to audit relevance; §4 invariant register maps each invariant to its verifying testmake test-all→ 115/115 passing (9 contract + 106 monitoring); hygiene fixes ensure the linked suites actually run (store.test.jsnow discovered, 3 previously-broken suites repaired viaindex.jsrename)src/Handling incomplete criteria: all six criteria Complete. Remaining
incompleteness is in the product (pause, migration, metadata, etc.), which
AC 6 explicitly required to be documented — it is, in the gap register.
Detailed Traceability Mapping
docs/audit-evidence-index.mdsrc/untouched (verified via status/diff)make test-all115/115 regressioncargo test9/9 (compliance gate tests green)compliance.rs,asset.rsanchors)DataKey, instance vs persistent) and the TTL gapdocs/threat-model.md; index §2; READMEstore.tests.jsand case-brokenanalytics/Index.jsfixed so evidence is reproduciblepause/upgrade/metadata fns exist); monitoring hygiene fixes disclosed as completed G-13Summary for the mapping section: 0 storage changes, 0 event changes,
0 contract-code changes. The only security-relevant behavioural effects are
in the off-chain test harness (two renames) which increase executed coverage
(55→106 discovered tests).
Type of Change
PR Evidence Checklist
1. Issue Reference
#NN).2. Implementation Summary
3. Tests Added or Justification
docs/audit-evidence-index.md§3.11 (contract tests atsrc/test.rs:L51,L79,L99,L126,L154,L184,L209,L273,L287,L309; monitoring suites under.github/monitoring/tests/).4. Commands Run
make verifypasses locally — N/A: this repo defines nomake verifytarget. Ran its closest equivalents instead; all pass (output in Additional Context):make build✅ ·make test✅ ·make monitor-test✅ ·make test-all✅ ·cargo fmt --all --check✅ ·cargo clippy --all-targets✅5. CI Status
auto-trigger.yml,trigger-auto-assign.yml) exist. Local validation stands in (below).6. Acceptance Criteria Coverage
N/Awith a reason when no documentation changes are needed.Policy & Standards
docs/contributor-evaluation-policy.mddoes not exist in this repo (also absent:docs/pr-evidence-checklist.md,docs/testing-standards.md,docs/reviewer-checklist.md,docs/legal-boundary-disclaimer.md,docs/traceability-mapping.md, referenced by this template). The acknowledgement of the payment policy is accepted as written here.CONTRIBUTING.mdguidelines (branch prefixes, mandatory tests for new logic,cargo fmt/cargo clippygates).cargo fmt --all --check→ clean; no Rust code changed regardless).cargo clippy --all-targets→ 0 warnings, 0 errors).cargo test→ 9/9) — no new logic existed to test; see No-Test Justification; additionallynode --testsuites now execute 106/106 (up from 52/55) after repairing the case-mismatch and undiscovered-filename defects.docs/reviewer-checklist.mdfile is absent from this repo.docs/threat-model.md§5 declares legal/regulatory KYC out of scope; gaps G-4/G-8 state the whitelist is not regulatory completeness (no removal/freeze, single admin). Nothing implies compliance guarantees beyond on-chain enforcement.Additional Context
Validation output (run on this PR tree)
Before/after: monitoring test discoverability (why the renames matter)
node --test tests/discovered runsstorepersistence/replay testsstore.tests.jsunmatched)integration,onchain-compat,triggersERR_MODULE_NOT_FOUND ../src/analytics/index.js(file wasIndex.js)Honesty notes for reviewers
pause/upgrade/metadata entry points exist insrc/; noextend_ttl/bump call exists; every contract test usesmock_all_auths().wasm32v1-none, Node 20,soroban-sdk 26.0.0(locked inCargo.lock).test_snapshots/(new.gitignoreentry) is cargo-test output, not source.PR_DESCRIPTION.md) is the PR body source — do not commit it tomain; paste into the PR form and delete.