Skip to content

feat(verify-build): PDA-first remote verify via solana-verify remote submit-job#1

Draft
stegaBOB wants to merge 3 commits into
feat/base-image-inputfrom
feat/verify-build-submit-job
Draft

feat(verify-build): PDA-first remote verify via solana-verify remote submit-job#1
stegaBOB wants to merge 3 commits into
feat/base-image-inputfrom
feat/verify-build-submit-job

Conversation

@stegaBOB

@stegaBOB stegaBOB commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

Replaces the deprecated --remote flag with the PDA-first solana-verify remote submit-job flow for the OtterSec verified-builds v2 API.

--remote on verify-from-repo now hard-errors at runtime in current solana-verify. The flow is now two steps: verify-from-repo writes the signer's verify PDA, then solana-verify remote submit-job --program-id … --uploader <signer> --url … queues the remote build (mainnet only; skipped otherwise, with a log line). The if: use-squads == 'false' gate was removed so the PDA write + job submission also run in the squads flow — separate from the program-authority PDA tx (pda_tx) the multisig executes itself.

Stacked on #2

This PR targets feat/base-image-input (#2, the base-image/features passthroughs) and contains only the submit-job commit. Merge #2 first, or this PR's base will retarget to main automatically once #2 lands.

Context: verified-builds v2

Targets the OtterSec verified-builds v2 API (otter-sec/solana-verified-programs-api) — the PDA-first, uploader-keyed remote flow plus the /resolve-hash lookup that our "record the hash before deploy → buffer resolvable via the osec api" story depends on. v2 is not live at verify.osec.io yet — this lands alongside it.

Caller requirements

  • solana-verify >= 0.4.0 (ideally 0.5.1) — remote submit-job and the --remote hard-deprecation both landed in 0.4.0. setup-all's verify_version defaults to empty, so callers must pin a new-enough version.

🤖 Generated with Claude Code

@stegaBOB stegaBOB changed the title feat(verify-build): PDA-first remote verify (submit-job) + base-image/features passthrough feat(verify-build): PDA-first remote verify via solana-verify remote submit-job Jul 2, 2026
@stegaBOB
stegaBOB changed the base branch from main to feat/base-image-input July 2, 2026 17:15
@stegaBOB
stegaBOB force-pushed the feat/verify-build-submit-job branch from c7b1a22 to 7c9bd2a Compare July 16, 2026 19:15
stegaBOB and others added 3 commits July 17, 2026 10:09
…rify (solana-foundation#20)

* feat: pass --base-image override through build-verified and verify-build

Adds an optional 'base-image' input to both actions, forwarded to
solana-verify's --base-image flag in three call sites:
  - build-verified  → solana-verify build
  - verify-build    → solana-verify verify-from-repo  (devnet path)
  - verify-build    → solana-verify export-pda-tx     (Squads path)

Consumers that don't set the input keep the existing behavior
(solana-verify falls back to [workspace.metadata.cli] solana in
Cargo.toml). Consumers that DO set it can drive both the local
verified build and the on-chain verify-PDA from a single value
(e.g. Anchor.toml [toolchain] solana_version), avoiding the
two-source-of-truth drift between Cargo.toml and Anchor.toml.

Must be passed identically to both actions — if only one side gets
the override, OtterSec re-builds with the PDA's image, which won't
match the .so produced locally, and verification fails.

* feat(verify-build): pass --features through to verify-from-repo and export-pda-tx

Mirrors build-verified's features input. Forwarded as trailing
'-- --features <value>' so the verify-PDA's 'args' field records
the cargo args used — OtterSec then replays the build with the
same features and the hash matches.

Without this, build-verified with --features X produces a .so
whose hash won't match what a verifier rebuilds without features:
silent failure on any release that toggles a feature flag.

* style(build-verified): use [ -n ] for empty-check consistency

Standardize on '[ -n ]' instead of the '[ ! -z ]' spelling used by the
existing FEATURES guard. Functionally identical; addresses Greptile P2.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(verify-build,build-verified): pass inputs via env to close shell injection

Every ${{ inputs.* }} / ${{ github.event.inputs.* }} used inside a run:
block is expanded into the script text by the Actions template engine
before bash parses it, so shell metacharacters in a value execute. Move
all such values to step-level env: blocks and reference them as quoted
shell variables ($VAR), so values are data, not code. Single-value args
are quoted; $ARGS/$CARGO_ARGS/$BASE_IMAGE_ARG stay unquoted for
intentional flag word-splitting. Addresses Greptile P1 (security), and
hardens the pre-existing interpolations in the same steps too.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
… of 10,240 bytes (#1) (solana-foundation#22)

* fix: ensure program is extended by minimum size of 10,240 bytes (#1)

* fix: handle edge cases at max permitted data length
…deprecated --remote

Write the signer's verify PDA and queue the remote build for both squads and non-squads so the built hash is recorded before deploy and the buffer is resolvable via the osec /resolve-hash. Replaces the deprecated `--remote` flag with `remote submit-job` (mainnet only).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@stegaBOB
stegaBOB force-pushed the feat/verify-build-submit-job branch from 7c9bd2a to 19a5bf7 Compare July 17, 2026 16:21
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