Skip to content

Add in-toto app - #284

Draft
rishabhBudhouliya wants to merge 2 commits into
mainfrom
in-toto-port
Draft

rishabhBudhouliya wants to merge 2 commits into
mainfrom
in-toto-port

Conversation

@rishabhBudhouliya

@rishabhBudhouliya rishabhBudhouliya commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Runs the Rust in-toto crate on lind-wasm. This is the first Rust application in this repo; it is built with cargo -Z build-std on wasm32-wasip1 linked against lind-glibc through wasip1-clang.sh, the same path the Rust grates use.

What is added

  • in-toto/in-toto-cli: thin CLI over the crate with keygen, run, gen-layout, verify. run records and signs artifacts with an empty command list because std::process is unsupported on wasm32-wasip1.
  • in-toto/compile_in-toto.sh: inlines the cargo-lind_compile recipe without its swallowed wasm-opt/precompile errors, drops the grate-only --export=pass_fptr_to_wt, and sets CC_wasm32_wasip1/CFLAGS_wasm32_wasip1 so ring's C objects carry atomics+bulk-memory for --shared-memory.
  • in-toto/run_tests.sh: keygen, write-code link, package link, signed layout, verify, tamper foo.py and re-run . --native runs the host build for a golden comparison.
  • Makefile targets in-toto and install-in-toto, expected-binaries.txt, clean.sh, README.

@Yaxuan-w Yaxuan-w left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! We probably need to discuss whether to create separate folders to distinguish C apps with Rust apps. Also would be good to split compilation scripts to another PR for future track

- `run -- <cmd>`: fork/execv/waitpid the step command, record its
  exit status and argv in the link. std::process is unsupported on
  wasm32-wasip1.
- `gen-layout`: step names, artifacts and expected command are now
  options; defaults keep the write-code/package demo.
- examples/gcc-imfs.sh: in-toto forks gcc under one IMFS grate,
  signs the ELF hash, verifies the chain, and rejects a tampered
  hello.c.
- run_tests.sh: add a fork/exec child test (7 checks, native and lind).
- README: rewrite for brevity.
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