evidence upload
Upload verified bundles to the evidence platform.
Synopsis
evidence upload <bundle> [options]Description
The evidence upload command:
- Verifies bundle integrity (checksums + signature)
- Authenticates with evidence platform API
- Uploads bundle to secure storage
- Verifies upload completed successfully
- Returns bundle ID and platform URL
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
<bundle> | string | Yes | Path to bundle file (.tar.gz) |
Options
| Flag | Type | Default | Description |
|---|---|---|---|
--endpoint, -e | string | (from config) | API endpoint URL |
--api-key, -k | string | (from env) | API key for authentication |
--organization, -o | string | (from API key) | Organization ID |
--verify-first, -v | boolean | true | Verify bundle before upload |
--retention-days | number | 365 | Bundle retention period |
--tags | string | - | Tags for bundle (comma-separated) |
--quiet, -q | boolean | false | Minimal output |
--help, -h | boolean | false | Show help |
Examples
Basic Upload
Upload with API key from environment:
export EVIDENCE_API_KEY=evd_api_...
evidence upload evidence-bundle-20260109-123456.tar.gzOutput:
Verifying bundle...
✓ Checksums valid (12/12 files)
✓ Signature valid
Uploading to evidence platform...
✓ Authenticated (organization: acme)
✓ Upload complete (2.3s, 35.1 KB)
✓ Verified on platform
✓ Upload successful
Bundle ID: bundle_abc123def456
Platform URL: https://app.evidence-platform.com/bundles/bundle_abc123def456
Timeline updated:
Controls: CC6.1, CC6.6, CC7.2
Period: 2026-01-09
Status: Evidence collectedUpload with Explicit API Key
Provide API key directly:
evidence upload bundle.tar.gz \
--api-key evd_api_your_key_hereCustom Endpoint
Upload to different environment:
# Staging environment
evidence upload bundle.tar.gz \
--endpoint https://api.staging.evidence-platform.com
# Self-hosted instance
evidence upload bundle.tar.gz \
--endpoint https://evidence.internal.company.com/apiUpload with Tags
Add metadata tags for organization:
evidence upload bundle.tar.gz \
--tags "environment:production,team:security,compliance:soc2"Tags visible in platform:
- Filter bundles by tag
- Search by tag
- Report by tag
Skip Verification
Upload without local verification (not recommended):
evidence upload bundle.tar.gz --verify-first=falseUse case: Bundle already verified, re-uploading
Warning: Platform still verifies bundle server-side
Custom Retention
Set bundle retention period:
evidence upload bundle.tar.gz --retention-days 730
# Keep for 2 years instead of default 1 yearRetention policies:
- Bundles auto-deleted after retention period
- Can be extended before expiration
- SOC 2 Type II typically requires 365+ days
Quiet Mode
Minimal output for scripts:
evidence upload bundle.tar.gz --quietOutput (success):
bundle_abc123def456Output (failure):
Error: Upload failedExit code: 0 on success, non-zero on failure
Upload Process
Step 1: Pre-Upload Verification
Verifying bundle...
✓ Checksums valid
✓ Signature validChecks:
- Bundle integrity (SHA-256)
- Bundle authenticity (Ed25519)
- Manifest structure valid
Skip: --verify-first=false (not recommended)
Step 2: Authentication
✓ Authenticated (organization: acme)Process:
- Read API key from
--api-keyorEVIDENCE_API_KEY - Send authentication request to platform
- Receive authentication token
- Extract organization ID from token
API Key format:
evd_api_1234567890abcdef...Required permissions:
bundles:createbundles:upload
Step 3: Upload
Uploading to evidence platform...
✓ Upload complete (2.3s, 35.1 KB)Process:
- Request upload URL from platform
- Upload bundle to secure storage (S3, GCS, etc.)
- Notify platform of upload completion
- Platform verifies bundle server-side
Upload methods:
- Direct upload to cloud storage
- Presigned URL (no credentials needed)
- Chunked upload for large bundles (>50MB)
Step 4: Platform Verification
✓ Verified on platformServer-side checks:
- Bundle extracts successfully
- Checksums match
- Signature valid
- Manifest parses correctly
- Controls supported
- No policy violations
Step 5: Timeline Update
Timeline updated:
Controls: CC6.1, CC6.6, CC7.2
Period: 2026-01-09
Status: Evidence collectedPlatform actions:
- Extract bundle metadata
- Map artifacts to controls
- Update compliance timeline
- Generate compliance report
- Send notifications (if configured)
API Authentication
API Key Creation
Create API key in platform:
- Go to evidence platform → Settings → API Keys
- Click "Create API Key"
- Set permissions:
bundles:create,bundles:upload - Copy API key (shown only once)
- Store securely
Example API key:
evd_api_1234567890abcdefghijklmnopqrstuvAPI Key Storage
Environment variable (recommended):
export EVIDENCE_API_KEY=evd_api_...
# Add to shell profile for persistence
echo 'export EVIDENCE_API_KEY=evd_api_...' >> ~/.zshrc
source ~/.zshrcCI/CD secrets:
# GitHub Actions
env:
EVIDENCE_API_KEY: ${{ secrets.EVIDENCE_API_KEY }}
# GitLab CI
variables:
EVIDENCE_API_KEY: $CI_EVIDENCE_API_KEYNever hardcode:
# ❌ BAD - never do this
evidence upload bundle.tar.gz --api-key evd_api_hardcodedAPI Key Rotation
Rotate keys regularly:
- Create new API key in platform
- Update environment variables / CI secrets
- Test with new key
- Revoke old key in platform
Recommended frequency: Every 90 days
Environment Variables
| Variable | Description |
|---|---|
EVIDENCE_API_KEY | API key for platform authentication |
EVIDENCE_API_URL | Override default API endpoint |
EVIDENCE_ORGANIZATION_ID | Override organization (multi-org accounts) |
Example:
export EVIDENCE_API_KEY=evd_api_...
export EVIDENCE_API_URL=https://api.staging.evidence-platform.com
export EVIDENCE_ORGANIZATION_ID=org_abc123
evidence upload bundle.tar.gz
# Uses environment variablesExit Codes
| Code | Meaning |
|---|---|
0 | Success - bundle uploaded |
1 | Verification failed - invalid bundle |
2 | Authentication failed - invalid API key |
3 | Upload failed - network/server error |
4 | Platform verification failed - bundle rejected |
5 | Rate limit exceeded |
Upload Configuration
In evidence.yaml
Configure default upload settings:
upload:
enabled: true
api_url: https://api.evidence-platform.com
retention_days: 365
tags:
environment: production
team: security
compliance: soc2Use in collection:
evidence collect --upload
# Uses upload config from evidence.yamlCommand Line Override
Override config file settings:
evidence upload bundle.tar.gz \
--endpoint https://api.staging.evidence-platform.com \
--retention-days 730 \
--tags "environment:staging,test:true"Platform Features
Bundle Storage
Secure storage:
- Encrypted at rest (AES-256)
- Encrypted in transit (TLS 1.3)
- Access-controlled (organization scoped)
- Audit logged (all access tracked)
Retention:
- Configurable retention period
- Auto-deletion after expiration
- Export before deletion
- Compliance period tracking
Compliance Timeline
Timeline visualization:
- Evidence collected over time
- Control coverage per period
- Gap identification
- Audit-ready reports
Example timeline:
2026:
Jan: ✓ CC6.1, CC6.6, CC7.2 (9 artifacts)
Feb: ✓ CC6.1, CC6.6, CC7.2 (9 artifacts)
Mar: ✓ CC6.1, CC6.6, CC7.2 (10 artifacts)
Coverage: 3 months (SOC 2 Type I: ✓, Type II: ✗ need 3 more)Compliance Reports
Auto-generated reports:
- Control status summary
- Evidence inventory
- Compliance gaps
- Remediation recommendations
- Audit export (PDF, CSV)
Notifications
Configurable alerts:
- Evidence collection success/failure
- Timeline gaps detected
- Compliance status changes
- Upcoming audits
Common Issues
Authentication Failed
Symptom:
✗ Authentication failed
Error: Invalid API key
HTTP 401: UnauthorizedCauses:
- API key invalid or revoked
- API key missing required permissions
- Environment variable not set
Solution:
# Verify API key set
echo $EVIDENCE_API_KEY
# Re-create API key in platform
# Update environment variable
export EVIDENCE_API_KEY=evd_api_new_keyUpload Timeout
Symptom:
✗ Upload failed
Error: Request timeout after 300s
Network error: Connection timeoutCauses:
- Large bundle size
- Slow network connection
- Platform downtime
Solution:
# Check bundle size
ls -lh bundle.tar.gz
# Retry upload
evidence upload bundle.tar.gz
# Contact platform support if persistsRate Limit Exceeded
Symptom:
✗ Upload failed
Error: Rate limit exceeded
Try again in 60 seconds.Causes:
- Too many uploads in short period
- Shared API key across multiple systems
- Platform-wide rate limiting
Solution:
# Wait for rate limit reset
sleep 60
# Retry
evidence upload bundle.tar.gzPlatform Verification Failed
Symptom:
✓ Upload complete
✗ Platform verification failed
Error: Signature verification failed on platform
Bundle was uploaded but rejected by platform.Causes:
- Public key not registered in platform
- Bundle created with different private key
- Platform public key mismatch
Solution:
- Go to evidence platform → Settings → Signing Keys
- Upload your public key (from
~/.evidence/keys/public.pem) - Verify key fingerprint matches
- Re-upload bundle
See Also
- evidence collect - Create bundles with upload
- evidence verify - Verify before upload
- Configuration Guide - Upload configuration
- GitHub Action - Auto-upload in CI/CD