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:
- Tab 1 · Connected GitHub Repos (1-Click Recommended): Click Connect GitHub. Questor signs a 15-minute HMAC state token bound to your workspace and opens GitHub's App selector. Choose Only select repositories, pick the exact private repository you want to test (`Contents: Read-only`), and click Install. GitHub redirects straight back to the searchable repository picker in Questor.
- Tab 2 · Git URL & Read-Only Token (GitLab, Bitbucket, Azure DevOps, Self-Hosted): Save a host-scoped read-only token (`read_repository` on GitLab, `Repositories: Read` on Bitbucket, `Code (Read)` on Azure DevOps, or a fine-grained GitHub PAT). Questor encrypts the token with AES-256-GCM using `tenant_id|host` as Additional Authenticated Data (`AAD`) and injects credentials strictly via ephemeral `GIT_CONFIG_COUNT` HTTP headers during clone — never in URLs, `ps` arguments, `.git/config`, or logs.
- Tab 3 · Zero-Access Upload (`.zip` or Local CI Stage 0 Scrub): Want to grant zero Git credentials? Export a snapshot (`git archive --format=zip -o repo.zip HEAD`) and upload it directly, or run our deterministic Rust `questor-sanitiser` binary inside your own GitHub Actions / GitLab CI runner so raw `.env` files and secrets never leave your perimeter.
# 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:
- Fenced source blocks in Markdown evidence and JSON snippet fields (`snippet`, `code_snippet`, `source_excerpt`, `raw_code`) are stripped prior to persistence.
- Raw LLM prompt and response trajectories are omitted from database storage.
- Case dossiers retain exact `file:line` coordinates, CWE/CVSS classifications, and Ed25519 gate signatures, marked with a `0-snippet` badge in the portal.
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`):
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"])
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.
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:
# 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\"}"