Skip to content

fix: address the findings of the M1.2 milestone audit - #3647

Merged
jpraynaud merged 7 commits into
mainfrom
jpraynaud/3646-fix-audit-findings-m1.2
Oct 27, 2026
Merged

jpraynaud merged 7 commits into
mainfrom
jpraynaud/3646-fix-audit-findings-m1.2

Conversation

@jpraynaud

@jpraynaud jpraynaud commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Content

This PR includes fixes for the observations of the M1.2 milestone audit (Cardano database artifacts on IPFS):

  • Check once in the client that the IPFS RPC URL answers as a Kubo RPC API (api/v0/version), and mark the IPFS downloader unreachable with a message that names the URL when it does not
  • Name both --ipfs-rpc-url and the IPFS_RPC_URL environment variable in the client --unstable refusal for an IPFS download
  • Check the Kubo RPC API at the aggregator startup, and warn when it does not answer that immutable files will not be uploaded to IPFS until it does
  • Create the missing parent directories of the e2e test work directory, and show its path when its creation fails

Pre-submit checklist

  • Branch
    • Tests are provided (if possible)
    • Crates versions are updated (if relevant)
    • Commit sequence broadly makes sense
    • Key commits have useful messages
  • PR
    • All check jobs of the CI have succeeded
    • Self-reviewed the diff
    • Useful pull request description
    • Reviewer requested

Issue(s)

Closes #3646

@jpraynaud jpraynaud self-assigned this Oct 23, 2026
@jpraynaud jpraynaud added the optimization 🛠️ Optimization and/or small enhancements label Oct 23, 2026
@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Test Results

     5 files  ± 0     236 suites  ±0   52m 43s ⏱️ - 2m 56s
 4 062 tests +12   4 062 ✅ +12  0 💤 ±0  0 ❌ ±0 
12 865 runs  +43  12 865 ✅ +43  0 💤 ±0  0 ❌ ±0 

Results for commit b547fde. ± Comparison against base commit b71dced.

♻️ This comment has been updated with latest results.

@jpraynaud
jpraynaud deployed to testing-preview October 23, 2026 16:19 — with GitHub Actions Active
@jpraynaud
jpraynaud deployed to testing-2-preview October 23, 2026 16:19 — with GitHub Actions Active
@jpraynaud
jpraynaud force-pushed the jpraynaud/3646-fix-audit-findings-m1.2 branch from 1a96494 to ea036e8 Compare October 23, 2026 16:28
@jpraynaud
jpraynaud requested a lite review from Copilot October 23, 2026 16:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Two critical credential-disclosure findings and one error-handling issue remain unresolved.

3 open issues
What changed in this PR

This pull request addresses M1.2 audit findings for Cardano database artifacts on IPFS by validating Kubo RPC endpoints, improving diagnostics, and making e2e work-directory setup recursive.

Changes:

  • Added cached Kubo /api/v0/version checks for client downloads and aggregator startup.
  • Improved IPFS availability errors, unstable-command messaging, and startup warnings.
  • Updated e2e work-directory creation to create missing parent directories and report failures.
File Summary Review findings
mithril-test-lab/​mithril-end-to-end/​src/​main.rs Creates missing work-directory parents and adds coverage for nested paths. Nit: Avoid terminating through panic!; return a contextual error and propagate it instead. (3 votes)
mithril-client/​src/​file_downloader/​ipfs.rs Validates and caches the Kubo RPC API check before downloading IPFS files. Critical: Raw reqwest::Error formatting can expose credentials embedded in the request URL; use a redacted or generic error. (3 votes)
mithril-client-cli/​src/​commands/​cardano_db/​download/​v2.rs Names both IPFS configuration mechanisms in the unstable-command error. No additional findings.
mithril-aggregator/​src/​tools/​kubo_rpc_client/​query/​mod.rs Exposes the new Kubo version query. No additional findings.
mithril-aggregator/​src/​tools/​kubo_rpc_client/​query/​ipfs_version.rs Implements and tests the Kubo /api/v0/version query. No additional findings.
mithril-aggregator/​src/​file_uploaders/​ipfs_uploader.rs Adds backend availability checks and uploader support. Critical: Raw startup error logging can expose credentials embedded in the Kubo endpoint URL; log a sanitized or generic availability failure. (2 votes)
mithril-aggregator/​src/​dependency_injection/​builder/​protocol/​artifacts.rs Runs the IPFS availability check while building the immutable-file uploader. No additional findings.

Review effort: Lite

Comment thread mithril-aggregator/src/file_uploaders/ipfs_uploader.rs
Comment thread mithril-client/src/file_downloader/ipfs.rs Outdated
Comment thread mithril-test-lab/mithril-end-to-end/src/main.rs Outdated
@jpraynaud
jpraynaud deployed to testing-2-preview October 23, 2026 16:46 — with GitHub Actions Active
@jpraynaud
jpraynaud deployed to testing-preview October 23, 2026 16:46 — with GitHub Actions Active
@jpraynaud
jpraynaud force-pushed the jpraynaud/3646-fix-audit-findings-m1.2 branch from ea036e8 to 091430c Compare October 23, 2026 17:51
@jpraynaud
jpraynaud marked this pull request as ready for review October 23, 2026 17:57
@jpraynaud
jpraynaud deployed to testing-preview October 23, 2026 18:06 — with GitHub Actions Active
@jpraynaud
jpraynaud deployed to testing-2-preview October 23, 2026 18:06 — with GitHub Actions Active
@jpraynaud
jpraynaud force-pushed the jpraynaud/3646-fix-audit-findings-m1.2 branch from 0ffdb9a to 091430c Compare October 26, 2026 08:22
@jpraynaud
jpraynaud marked this pull request as draft October 26, 2026 08:23
@jpraynaud
jpraynaud deployed to testing-2-preview October 26, 2026 08:41 — with GitHub Actions Active
@jpraynaud
jpraynaud deployed to testing-preview October 26, 2026 08:41 — with GitHub Actions Active
@jpraynaud
jpraynaud marked this pull request as ready for review October 26, 2026 09:24
Comment thread mithril-client/src/file_downloader/ipfs.rs

@turmelclem turmelclem left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 👍

A URL that is not a Kubo RPC API, such as a public gateway, now makes the client builder skip the IPFS locations.
Add a Kubo version query and warn when the configured Kubo RPC API does not answer.
* mithril-aggregator from `0.10.25` to `0.10.26`
* mithril-client-cli from `0.13.30` to `0.13.31`
* mithril-client from `0.14.35` to `0.14.36`
* mithril-end-to-end from `0.5.29` to `0.5.30`
@jpraynaud
jpraynaud force-pushed the jpraynaud/3646-fix-audit-findings-m1.2 branch from 091430c to b547fde Compare October 27, 2026 13:59
@jpraynaud
jpraynaud deployed to testing-2-preview October 27, 2026 14:14 — with GitHub Actions Active
@jpraynaud
jpraynaud deployed to testing-preview October 27, 2026 14:14 — with GitHub Actions Active

@Alenar Alenar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@jpraynaud
jpraynaud merged commit 4bd1f98 into main Oct 27, 2026
53 checks passed
@jpraynaud
jpraynaud deleted the jpraynaud/3646-fix-audit-findings-m1.2 branch October 27, 2026 15:50

This branch was successfully deployed

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

Labels

optimization 🛠️ Optimization and/or small enhancements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Address the findings of the M1.2 milestone audit

4 participants