Build a rig

Safety checks

The warnings rig surfaces during pack and inspect — what they mean and what to do.

rig pack and rig inspect scan files in the artifact for things that typically shouldn't be shared. They're conservative heuristics, not a guarantee. Read every warning.

What gets checked

CheckTriggers onWhy it matters
Likely secretsHigh-entropy strings that resemble API keys, tokensCould be a real credential
Private key blocks-----BEGIN ... PRIVATE KEY----- markersAlmost certainly a real key
.env-shaped filesFiles matching *.env, *.env.*Default exclude, but flagged if force-included
Large filesFiles above a size thresholdBloats the artifact; usually unintended
Local private pathsHardcoded /Users/..., /home/... pathsWon't work for the installer; may leak who you are
Database files*.db, *.sqliteOften contains personal data
Bulk email addressesA file with many @-bearing stringsCould be a contact list, mailing list, or PII

Each warning prints a file path and a brief reason. Nothing is auto-removed.

What to do

For each warning:

  1. Open the file.
  2. Decide if shipping it is what you actually want.
  3. If yes, ignore the warning.
  4. If no, either delete the file, add it to [package].exclude, or add it to .rigignore.

Re-run rig pack && rig inspect until the warning list is the one you mean to ship with.

What's always excluded regardless

The default excludes.env, *.key, *.pem, .git/, node_modules/, etc. — apply even if you don't customise [package]. You'd have to explicitly rig add one of those patterns to ship it. If you do, the safety check will warn loudly.

Pre-publish checklist

Before rig hub publish:

  • rig pack produces a clean warning list (or each warning is reviewed).
  • rig inspect file list contains only what you mean to ship.
  • No .env, no *.key, no private/ content.
  • Manifest version is correct ([rig].version).
  • Round-trip test install + rig doctor passes.

See also