Upload Configuration
Complete schema reference for configuring automatic bundle uploads in evidence.yaml.
Schema
upload:
enabled: true
api_url: https://api.evidence-platform.com
api_key_env: EVIDENCE_API_KEY
organization_id: org_abc123
retention_days: 365
tags:
environment: production
team: security
compliance: soc2
verify_before_upload: true
delete_after_upload: falseAll fields optional - Upload disabled by default.
Fields Reference
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
enabled | boolean | No | false | Enable automatic upload after collection |
api_url | string | No | https://api.evidence-platform.com | evidence platform API endpoint |
api_key_env | string | No | EVIDENCE_API_KEY | Environment variable containing API key |
organization_id | string | No | (from API key) | Organization ID for multi-org accounts |
retention_days | number | No | 365 | Bundle retention period in days |
tags | object | No | {} | Metadata tags for bundle organization |
verify_before_upload | boolean | No | true | Verify bundle integrity before upload |
delete_after_upload | boolean | No | false | Delete local bundle after successful upload |
timeout_seconds | number | No | 300 | Upload timeout in seconds |
retry_attempts | number | No | 3 | Number of retry attempts on failure |
Basic Configuration
Minimal Upload
Enable upload with defaults:
framework: soc2_type1
controls:
- CC6.1
sources:
github:
mode: token
token_env: GITHUB_TOKEN
org: acme
repos: [acme/backend]
bundle:
signing:
private_key_path: ~/.evidence/keys/private.pem
upload:
enabled: trueRequires environment variable:
export EVIDENCE_API_KEY=evd_api_your_key_hereBehavior:
- Collect evidence
- Create signed bundle
- Verify bundle locally
- Upload to platform
- Keep local copy
Manual Upload (Default)
Upload disabled (manual upload with CLI):
framework: soc2_type1
controls:
- CC6.1
sources:
github:
mode: token
token_env: GITHUB_TOKEN
org: acme
repos: [acme/backend]
bundle:
signing:
private_key_path: ~/.evidence/keys/private.pem
upload:
enabled: false # or omit upload section entirelyManual upload later:
evidence upload evidence-bundle-*.tar.gzAPI Configuration
Custom API Endpoint
For self-hosted or staging environments:
upload:
enabled: true
api_url: https://evidence.internal.company.com/apiUse cases:
- Self-hosted evidence platform
- Staging environment
- Development testing
Environment-Specific Endpoints
Development:
upload:
enabled: true
api_url: http://localhost:3000/apiStaging:
upload:
enabled: true
api_url: https://api.staging.evidence-platform.comProduction:
upload:
enabled: true
api_url: https://api.evidence-platform.comCustom API Key Variable
Use different environment variable:
upload:
enabled: true
api_key_env: CUSTOM_API_KEYSet environment variable:
export CUSTOM_API_KEY=evd_api_your_key_hereOrganization Configuration
Multi-Organization Accounts
Override organization for multi-org accounts:
upload:
enabled: true
organization_id: org_staging_123Use case: API key has access to multiple organizations
Default behavior: Uses organization ID from API key metadata
Organization from Environment
upload:
enabled: true
organization_id: ${EVIDENCE_ORG_ID}Set environment variable:
export EVIDENCE_ORG_ID=org_production_456Retention Configuration
Default Retention (1 Year)
upload:
enabled: true
retention_days: 365 # Default: 1 yearBehavior:
- Bundle auto-deleted after 365 days
- Countdown starts from upload date
- Warning notification before deletion
- Can extend before expiration
Extended Retention
For SOC 2 Type II (requires 3-6 months, often keep longer):
upload:
enabled: true
retention_days: 730 # 2 yearsUse case: Long audit periods, regulatory requirements
Short Retention
For development or testing:
upload:
enabled: true
retention_days: 30 # 30 daysWarning: Not suitable for compliance purposes
Permanent Retention
Keep bundles indefinitely:
upload:
enabled: true
retention_days: 0 # 0 = no expirationWarning: Storage costs will accumulate
Tagging Configuration
Basic Tags
Organize bundles with metadata tags:
upload:
enabled: true
tags:
environment: production
team: securityPlatform features:
- Filter bundles by tag
- Search by tag
- Group reports by tag
- Tag-based notifications
Comprehensive Tagging
upload:
enabled: true
tags:
environment: production
team: security
compliance: soc2
region: us-east-1
application: backend-api
cost_center: engineering
owner: security-team@acme.comBest practices:
- Use consistent tag keys across bundles
- Include ownership information
- Tag by environment for easy filtering
- Add application/service identifiers
Dynamic Tags
Use environment variables for dynamic tags:
upload:
enabled: true
tags:
environment: ${ENVIRONMENT}
git_commit: ${GITHUB_SHA}
build_number: ${GITHUB_RUN_NUMBER}GitHub Actions:
env:
ENVIRONMENT: production
GITHUB_SHA: ${{ github.sha }}
GITHUB_RUN_NUMBER: ${{ github.run_number }}Verification Options
Verify Before Upload (Default)
upload:
enabled: true
verify_before_upload: true # DefaultProcess:
- Create bundle
- Verify checksums (SHA-256)
- Verify signature (Ed25519)
- If valid → upload
- If invalid → abort upload
Recommended: Always enable for production
Skip Local Verification
Not recommended, but available:
upload:
enabled: true
verify_before_upload: falseWarning: Platform still verifies server-side, but you'll waste upload bandwidth if bundle is invalid
Use case: Already verified bundle separately
Upload Behavior
Keep Local Copy (Default)
upload:
enabled: true
delete_after_upload: false # DefaultBehavior:
- Upload bundle to platform
- Keep local copy in output directory
- Useful for backup or secondary verification
Delete After Upload
Clean up local bundles automatically:
upload:
enabled: true
delete_after_upload: trueBehavior:
- Upload bundle to platform
- Verify upload succeeded
- Delete local copy
Use cases:
- CI/CD pipelines (artifact storage in platform)
- Limited local storage
- Security requirement to not keep bundles locally
Warning: Ensure platform upload succeeded before deleting
Timeout Configuration
upload:
enabled: true
timeout_seconds: 600 # 10 minutesDefault: 300 seconds (5 minutes)
Increase timeout for:
- Large bundles (50+ MB)
- Slow network connections
- Multi-region uploads
Retry Configuration
upload:
enabled: true
retry_attempts: 5 # Retry up to 5 timesDefault: 3 retry attempts
Retry behavior:
- Exponential backoff (1s, 2s, 4s, 8s, 16s)
- Retries on network errors
- Retries on 5xx server errors
- No retry on 4xx client errors (invalid API key, etc.)
Complete Examples
Development Configuration
framework: soc2_type1
controls:
- CC6.1
sources:
github:
mode: token
token_env: GITHUB_TOKEN
org: acme
repos: [acme/backend]
bundle:
signing:
private_key_path: ~/.evidence/keys/dev.pem
upload:
enabled: true
api_url: http://localhost:3000/api
retention_days: 7
tags:
environment: development
delete_after_upload: falseProduction Configuration
framework: soc2_type1
controls:
- CC6.1
- CC6.6
- CC7.2
sources:
github:
mode: token
token_env: GITHUB_TOKEN
org: acme
repos: '*'
aws:
mode: env
region: us-east-1
cloudtrail:
trails:
- production-audit-trail
bundle:
signing:
private_key_path: /etc/evidence/keys/production.pem
key_id: prod-2026-01
output_path: /var/evidence/bundles
max_size_mb: 100
upload:
enabled: true
api_url: https://api.evidence-platform.com
retention_days: 730
tags:
environment: production
team: security
compliance: soc2
application: backend-api
verify_before_upload: true
delete_after_upload: false
timeout_seconds: 600
retry_attempts: 5CI/CD Configuration
framework: soc2_type1
controls:
- CC6.1
- CC6.6
- CC7.2
sources:
github:
mode: token
token_env: GITHUB_TOKEN
org: acme
repos: '*'
bundle:
signing:
private_key_path: ${RUNNER_TEMP}/signing-key.pem
output_path: ${GITHUB_WORKSPACE}/artifacts
upload:
enabled: true
retention_days: 365
tags:
environment: ${ENVIRONMENT}
git_commit: ${GITHUB_SHA}
workflow_run: ${GITHUB_RUN_NUMBER}
triggered_by: ${GITHUB_ACTOR}
verify_before_upload: true
delete_after_upload: true # Clean up CI artifactsValidation
Missing API Key
upload:
enabled: trueError (at collection time):
✗ Upload failed
Error: API key not found
Set EVIDENCE_API_KEY environment variable:
export EVIDENCE_API_KEY=evd_api_your_key_here
Or configure custom variable:
upload:
api_key_env: CUSTOM_KEY_NAMEInvalid API Key Format
upload:
enabled: trueEnvironment variable:
export EVIDENCE_API_KEY=invalid_keyError:
✗ Authentication failed
Error: Invalid API key format
API keys must start with 'evd_api_'
Create API key in platform:
Settings → API Keys → Create API KeyInvalid Retention Days
upload:
enabled: true
retention_days: -30 # ❌ Negative valueError:
Configuration validation failed:
- upload.retention_days: must be >= 0 (got -30)Invalid Timeout
upload:
enabled: true
timeout_seconds: 1000000 # ❌ Too largeError:
Configuration validation failed:
- upload.timeout_seconds: must be <= 3600 (got 1000000)
- Maximum timeout: 1 hour (3600 seconds)Upload Process
When upload.enabled: true and you run evidence collect:
Step 1: Collection
Collecting evidence...
✓ GitHub (3 artifacts)
✓ AWS (2 artifacts)
✓ Collection complete (5 artifacts in 12.3s)Step 2: Bundle Creation
Creating bundle...
✓ Manifest generated
✓ Checksums computed
✓ Signature created
✓ Bundle created: evidence-bundle-20260109-123456.tar.gz (35.1 KB)Step 3: Local Verification (if enabled)
Verifying bundle...
✓ Checksums valid (12/12 files)
✓ Signature valid
✓ Bundle verifiedStep 4: Upload
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_abc123def456Step 5: Timeline Update
Timeline updated:
Controls: CC6.1, CC6.6, CC7.2
Period: 2026-01-09
Status: Evidence collected
Next collection: 2026-02-09 (in 31 days)Troubleshooting
Authentication Failed
Symptom:
✗ Upload failed
Error: Authentication failed (HTTP 401)
Invalid or expired API key.Solutions:
-
Verify API key is set:
echo $EVIDENCE_API_KEY -
Check API key format:
- Must start with
evd_api_ - Should be 32+ characters
- Must start with
-
Create new API key:
- Go to platform → Settings → API Keys
- Create new key with
bundles:uploadpermission - Update environment variable
-
Check key hasn't been revoked:
- Review API keys in platform dashboard
- Verify key status is "Active"
Upload Timeout
Symptom:
✗ Upload failed
Error: Request timeout after 300s
Network error: Connection timeoutSolutions:
-
Increase timeout:
upload: timeout_seconds: 600 -
Check bundle size:
ls -lh evidence-bundle-*.tar.gz -
Reduce bundle size:
bundle: max_size_mb: 25 sources: aws: log_groups: - /aws/lambda/api # Limit scope -
Check network connectivity:
curl -I https://api.evidence-platform.com
Rate Limit Exceeded
Symptom:
✗ Upload failed
Error: Rate limit exceeded (HTTP 429)
Try again in 60 seconds.Solutions:
-
Wait for rate limit reset:
sleep 60 evidence upload evidence-bundle-*.tar.gz -
Check frequency:
- Recommended: Once per day or week
- Not recommended: Multiple uploads per minute
-
Contact platform support:
- For higher rate limits
- Enterprise plans available
Platform Verification Failed
Symptom:
✓ Upload complete
✗ Platform verification failed
Error: Signature verification failed on platform
Bundle was uploaded but rejected by platform.Solutions:
-
Register public key in platform:
- Go to Settings → Signing Keys
- Upload public key from
~/.evidence/keys/public.pem - Verify key fingerprint matches
-
Check key fingerprint:
openssl pkey -pubin -in ~/.evidence/keys/public.pem -outform DER | \ openssl dgst -sha256 -binary | base64 -
Re-upload bundle:
evidence upload evidence-bundle-*.tar.gz
Best Practices
1. Use Environment Variables for Secrets
✅ Good:
upload:
enabled: true
api_key_env: EVIDENCE_API_KEY❌ Bad:
upload:
enabled: true
api_key: evd_api_hardcoded_key # ❌ Never hardcode2. Tag Bundles Consistently
✅ Good:
upload:
tags:
environment: production
team: security
compliance: soc2Benefits:
- Easy filtering in platform
- Better organization
- Clearer ownership
3. Set Appropriate Retention
SOC 2 Type I: 365 days minimum SOC 2 Type II: 730 days recommended Development: 30 days sufficient
4. Enable Verification
✅ Good:
upload:
verify_before_upload: trueBenefit: Catch issues before wasting upload bandwidth
5. Configure Retries
✅ Good:
upload:
retry_attempts: 3Benefit: Handle transient network issues automatically
See Also
- evidence collect - Collect with automatic upload
- evidence upload - Manual upload command
- evidence verify - Verify before upload
- GitHub Action - Automated uploads in CI/CD
- Configuration Guide - Complete configuration examples