Blog / Architecture & How-To Guide
Engineering Guide · Private Repositories & Code Custody

How to scan private repos and verify ephemeral deletion offline

Connect private codebases in one click without broad account permissions, keep zero source lines at rest with Snippet-Free Mode, and verify every Ed25519 scratch-wipe receipt yourself.

1-Click GitHub / Tokenor Zero-Access .zipStage 0 Redaction(Zero Code Execution)Gates A–H Check(Snippet-Free Option)Scratch Wiped +Ed25519 ReceiptLEAST-PRIVILEGE INTAKEEPHEMERAL HEADER AUTHSIGNED CASE LEDGEROFFLINE VERIFIABLE
Private repo lifecycle · least-privilege intake → Stage 0 credential stripping → Gates A–H static verification → automatic scratch deletion + Ed25519 receipt

Connecting a private repository to an external security scanner raises two reasonable questions: how easy is onboarding, and how do we verify that our proprietary source code is neither executed nor retained after the scan?

This guide walks through the three ways to scan private code in the Questor Portal (available on every plan starting with Verify at $49/mo), how to enable Snippet-Free Mode, and how to verify a scan's Ed25519 Ephemeral Wipe Receipt offline.

0 · Run a zero-permission benchmark first

Before connecting any internal code, every empty workspace shows a 1-click OWASP/NodeGoat benchmark banner at the top of Scans. Clicking it runs the complete six-stage pipeline on the public benchmark app so your team can inspect Stage 0 redaction, Ready vs Disproven cases, and a live signed deletion receipt in under three minutes.

1 · Choose one of three private repo onboarding paths

Open Scans → + New scan. The intake panel offers three tabs depending on your Git provider and security posture:

Option 3B · Run Stage 0 Secret Stripping Locally in Your Own CI
# 1. Strip secrets & seal the Stage 0 manifest inside your own CI runner
questor-sanitiser \
  --url ./my-private-repo \
  --ref main \
  --out-dir ./stage0-out \
  --signing-key ./tenant-ed25519.key

# 2. Zip only the redacted source tree and upload alongside sealed-manifest.json
(cd ./stage0-out/sanitised && zip -r ../sanitised-bundle.zip .)

2 · Enable Snippet-Free Privacy Mode (optional)

By default, case dossiers include the minimal redacted 5–15 line code excerpt needed for an engineer to review the source-to-sink trace. For regulated repositories where zero lines of proprietary code may sit in third-party databases, toggle Snippet-Free Privacy Mode before queuing your scan:

3 · Verify the Ed25519 Ephemeral Wipe Receipt offline

Questor never compiles, builds, or executes target code. As soon as a scan (or linked multi-repository batch) settles, the worker deletes the `clone/`, `sanitised/`, and `upload/` scratch directories from disk, verifies `remaining_source_files == 0`, and signs an Ed25519 Ephemeral Wipe Receipt.

Open any completed run in Scans → Scan Detail and click View signed wipe attestation JSON, save it as `wipe_receipt.json`, and verify the signature offline (`pip install pynacl`):

Offline Verification · Python + PyNaCl (RFC 8032 Ed25519)
import base64, hashlib, json
from nacl.signing import VerifyKey

receipt = json.load(open("wipe_receipt.json"))
payload = receipt["canonical_payload"].encode("utf-8")

# 1. Confirm SHA-256 digest matches the canonical pipe-delimited wipe record
assert hashlib.sha256(payload).hexdigest() == receipt["payload_sha256"]

# 2. Confirm clone/ and sanitised/ were deleted with zero remaining files
assert receipt["clone_deleted"] is True and receipt["sanitised_deleted"] is True
assert receipt["remaining_source_files"] == 0

# 3. Verify RFC 8032 Ed25519 signature against the workspace public key
sig_b64 = receipt["signature_b64"] + "=" * (-len(receipt["signature_b64"]) % 4)
VerifyKey(bytes.fromhex(receipt["public_key_hex"])).verify(payload, base64.b64decode(sig_b64))
print("Verified Ed25519 wipe receipt at:", receipt["wiped_at"])
Custody & Verification SummaryVERIFIABLE
ABCDEFGH

Every candidate vulnerability is checked statically across Gates A–H without executing your code, and every temporary checkout is wiped upon completion with a signed cryptographic receipt.

Ed25519 · canonical payload `ephemeral-wipe-v1|scan_id|tenant_id|commit_sha|...` · offline verifiable

4 · Automate private scans from CI via REST API

You can also queue private repository scans or upload `.zip` snapshots directly from CI pipelines using your workspace session or automation credentials:

REST API · Queue Snippet-Free Scan or Zero-Access Archive
# Queue a private repository scan in Snippet-Free Mode
curl -X POST https://qapp.mach41.com/api/v1/scans \
  -H "Content-Type: application/json" -b cookies.txt \
  -d '{
    "repositories": [{ "url": "https://gitlab.com/acme/payments-api.git", "ref": "main" }],
    "privacy_mode": "snippet_free"
  }'

# Or upload a one-shot .zip archive with zero Git credentials
ZIP_B64=$(base64 -w0 payments-api.zip)
curl -X POST https://qapp.mach41.com/api/v1/scans/upload-archive \
  -H "Content-Type: application/json" -b cookies.txt \
  -d "{\"name\":\"payments-api\",\"zip_base64\":\"$ZIP_B64\",\"privacy_mode\":\"snippet_free\"}"