Skip to content

docs: add CLAUDE.md - #1

Merged
Hny0305Lin merged 3 commits into
mainfrom
fix/audit-findings
Aug 12, 2026
Merged

docs: add CLAUDE.md#1
Hny0305Lin merged 3 commits into
mainfrom
fix/audit-findings

Conversation

@Burial0268

Copy link
Copy Markdown
Collaborator

Build/test commands for the three deliverables and the cross-cutting
invariants that are only visible after reading several files:

  • Rust 1.81.0 is mandatory (Injective's VM rejects 1.82+/1.87+ wasm)
  • push ordering: US Pin confirmation before update_ref, local GC only
    after the tx succeeds
  • force push replaces the whole pack_uris list, so the helper must emit a
    self-contained pack
  • the contract schema is hand-mirrored in msg.rs, chain/client.go and
    chain.ts with no codegen and no drift test
  • CI skips web-only and docs-only changes

Build/test commands for the three deliverables and the cross-cutting
invariants that are only visible after reading several files:

- Rust 1.81.0 is mandatory (Injective's VM rejects 1.82+/1.87+ wasm)
- push ordering: US Pin confirmation before update_ref, local GC only
  after the tx succeeds
- force push replaces the whole pack_uris list, so the helper must emit a
  self-contained pack
- the contract schema is hand-mirrored in msg.rs, chain/client.go and
  chain.ts with no codegen and no drift test
- CI skips web-only and docs-only changes
Pack verification hashed a fixed maxBytes+1 prefix of the object and
never compared the actual length against the size bound into the ticket.
A client chooses both the bytes behind a CID and the SHA-256 it declares,
so it could request an authorization for a few bytes (charged against its
rate and byte quota), publish an arbitrarily large object whose
maxBytes+1 prefix hashed to the declared digest, and have all of it
pinned durably on the US node.

kuboSHA256 becomes kuboVerify: it reads one byte past the declared size
and returns the byte count, and replicate() now rejects and unpins when
the count differs from the authorized size.

The regression test drives the exploit shape directly (declared size 8,
100-byte object, digest over the maxBytes+1 prefix). Against the previous
verification path it returns 201 with the object left pinned.
igit repos and the web owner page requested a single 100-entry page of
list_repos with no pagination. Moderation filtering happens client-side,
so an owner whose first 100 entries are delisted showed no repositories
at all. Both now page through with start_after, mirroring ListRefs.

`igit collab remove` passed (repo, address) to an English format string
reading "collaborator %s removed from %s", printing the two the wrong way
round. The sponsor confirmation in Chinese read as if the repository's
own INJ had been spent.

parseView ran decodeURIComponent during render, but tree/blob links embed
file paths unencoded -- a repository containing a file such as "50%.md"
raised URIError and blanked the whole route. Decoding is now tolerant of
a literal '%'.

The TreeView branch selector built its target with
dirLink("").replace(encodeURIComponent(short), ...), which rewrites the
first match anywhere in the path including the owner and repo segments:
switching branches in a repository named after a branch navigated to a
repository that does not exist. It now builds the URL directly.
@Hny0305Lin
Hny0305Lin merged commit e279c7f into main Aug 12, 2026
3 checks passed
@Burial0268
Burial0268 deleted the fix/audit-findings branch August 12, 2026 15:03
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.

2 participants