Troubleshooting
Common issues, solutions, and debugging techniques for evidence collection.
Quick Diagnostics
Check SDK Version
evidence --versionExpected: 0.1.0 or higher
If outdated:
npm install -g @evidence-oss/cli@latestVerify Configuration
# Test configuration without collecting
evidence collect --dry-runChecks:
- Configuration file syntax
- Required fields present
- Credentials accessible
- Control coverage
Enable Verbose Logging
# More detailed output
evidence collect --verboseShows:
- API requests and responses
- File operations
- Policy evaluations
- Detailed error messages
Installation Issues
Command Not Found
Symptom:
evidence --version
# zsh: command not found: evidenceCauses:
- evidence CLI not installed
- Not in PATH
Solutions:
-
Install evidence CLI:
npm install -g @evidence-oss/cli -
Verify installation:
which evidence # Should show: /usr/local/bin/evidence or similar -
Check PATH:
echo $PATH # Should include npm global bin directory -
Restart shell:
exec $SHELL
NPM Permission Errors
Symptom:
npm install -g @evidence-oss/cli
# EACCES: permission deniedSolutions:
Option 1: Use npx (recommended for testing):
npx @evidence-oss/cli collectOption 2: Fix npm permissions:
# Change npm global directory
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
# Add to PATH
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.zshrc
source ~/.zshrc
# Install
npm install -g @evidence-oss/cliOption 3: Use sudo (not recommended):
sudo npm install -g @evidence-oss/cliConfiguration Issues
YAML Syntax Error
Symptom:
✗ Configuration validation failed
Error: YAML parse error at line 12:
unexpected token 'indent'Causes:
- Incorrect indentation
- Missing colons
- Invalid YAML syntax
Solutions:
-
Use 2-space indentation (not tabs):
sources: github: # 2 spaces mode: token # 4 spaces -
Validate YAML online:
- Copy configuration to YAML Lint
- Fix reported errors
-
Use editor with YAML support:
- VS Code with YAML extension
- Shows syntax errors in real-time
Missing Required Fields
Symptom:
✗ Configuration validation failed
- sources.github.org: required field missing
- sources.github.repos: required field missingSolution:
Add all required fields:
sources:
github:
mode: token
token_env: GITHUB_TOKEN
org: your-org # Required
repos: # Required
- your-org/your-repoCheck field requirements in:
Environment Variable Not Set
Symptom:
✗ Collection failed
Error: Environment variable 'GITHUB_TOKEN' not setSolutions:
-
Set environment variable:
export GITHUB_TOKEN=ghp_your_token_here -
Verify it's set:
echo $GITHUB_TOKEN -
Add to shell profile (permanent):
echo 'export GITHUB_TOKEN=ghp_...' >> ~/.zshrc source ~/.zshrc -
Use .env file (development):
# .env GITHUB_TOKEN=ghp_... AWS_ACCESS_KEY_ID=AKIA...# Load before collection source .env evidence collect
GitHub Connector Issues
Authentication Failed
Symptom:
✗ GitHub connector failed
Error: Bad credentials (HTTP 401)Solutions:
-
Verify token is set:
echo $GITHUB_TOKEN -
Test token manually:
curl -H "Authorization: token $GITHUB_TOKEN" \ https://api.github.com/user -
Create new token:
- GitHub → Settings → Developer settings → Personal access tokens
- Generate new token with required scopes
- Update environment variable
Insufficient Permissions
Symptom:
✗ GitHub connector failed
Error: Resource not accessible by personal access token (HTTP 403)Causes:
- Token missing required scopes
- Token doesn't have access to private repos
- SSO not authorized
Solutions:
-
Check required scopes:
- Private repos:
reposcope - Public repos:
public_reposcope - Organization:
read:orgscope
- Private repos:
-
Authorize SSO (if applicable):
- GitHub → Settings → Personal access tokens
- Find token
- Click "Configure SSO"
- Authorize organization
-
Verify organization access:
curl -H "Authorization: token $GITHUB_TOKEN" \ https://api.github.com/orgs/your-org
Rate Limit Exceeded
Symptom:
✗ GitHub connector failed
Error: API rate limit exceeded (HTTP 403)
Rate limit: 0 / 5,000 remaining
Resets at: 2026-01-09T14:00:00ZSolutions:
-
Wait for rate limit reset:
- Check reset time in error message
- Wait up to 1 hour
-
Enable rate limit pausing:
sources: github: rate_limit_pause: true # SDK will wait automatically -
Use dedicated token:
- Don't share token across multiple systems
- Create separate token for evidence collection
-
Reduce collection frequency:
- Collect once per day instead of per commit
- Use scheduled GitHub Actions
Repository Not Found
Symptom:
✗ GitHub connector failed
Error: Not Found (HTTP 404)
Repository 'acme/backend' not found or not accessible.Solutions:
-
Verify repository name:
repos: - acme/backend # Format: org/repo -
Check repository exists:
curl -H "Authorization: token $GITHUB_TOKEN" \ https://api.github.com/repos/acme/backend -
Verify token has access:
- For private repos:
reposcope required - User must be member or collaborator
- For private repos:
AWS Connector Issues
Access Denied
Symptom:
✗ AWS connector failed
Error: User is not authorized to perform: iam:GetAccountPasswordPolicy (HTTP 403)Solutions:
-
Verify credentials are set:
echo $AWS_ACCESS_KEY_ID echo $AWS_SECRET_ACCESS_KEY -
Test credentials:
aws sts get-caller-identity -
Check IAM permissions:
aws iam get-user-policy \ --user-name evidence-collector \ --policy-name EvidenceCollection -
Attach required policy:
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "iam:GetAccountPasswordPolicy", "cloudtrail:DescribeTrails", "cloudtrail:GetTrailStatus", "logs:DescribeLogGroups" ], "Resource": "*" } ] }
Invalid Credentials
Symptom:
✗ AWS connector failed
Error: The security token included in the request is invalid (HTTP 403)Solutions:
-
Verify credentials:
aws sts get-caller-identity -
Rotate credentials:
- Create new access key in IAM console
- Update environment variables
- Delete old access key
-
Check for expired temporary credentials:
- If using assume role, session may have expired
- Re-authenticate and retry
CloudTrail Not Found
Symptom:
✗ AWS connector failed
Error: Trail 'production-trail' not found in region us-east-1Solutions:
-
List all trails:
aws cloudtrail describe-trails -
Check trail name:
cloudtrail: trails: - production-audit-trail # Exact name -
Check region:
- CloudTrail trails are regional
- Multi-region trails visible in home region only
Assume Role Failed
Symptom:
✗ AWS connector failed
Error: User is not authorized to perform: sts:AssumeRoleSolutions:
-
Verify role ARN:
sources: aws: role_arn: arn:aws:iam::123456789012:role/evidence-collector -
Check trust policy:
aws iam get-role --role-name evidence-collector \ --query 'Role.AssumeRolePolicyDocument' -
Verify external ID:
sources: aws: external_id: evidence-sdk # Must match trust policy
Google Workspace Issues
Authentication Failed
Symptom:
✗ Google Workspace connector failed
Error: Invalid service account credentials (HTTP 401)Solutions:
-
Verify credentials file exists:
ls -l $GOOGLE_APPLICATION_CREDENTIALS -
Check file format:
cat $GOOGLE_APPLICATION_CREDENTIALS | jq .type # Should output: "service_account" -
Test credentials:
gcloud auth activate-service-account \ --key-file=$GOOGLE_APPLICATION_CREDENTIALS
Domain-Wide Delegation Not Authorized
Symptom:
✗ Google Workspace connector failed
Error: Not Authorized to access this resource/api (HTTP 403)Solutions:
-
Get Client ID:
cat $GOOGLE_APPLICATION_CREDENTIALS | jq -r .client_id -
Verify delegation in Admin Console:
- Security → API controls → Domain-wide Delegation
- Search for client ID
- Verify scopes are correct
-
Required scopes:
https://www.googleapis.com/auth/admin.directory.user.readonly https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly https://www.googleapis.com/auth/admin.reports.audit.readonly -
Re-authorize if needed:
- Edit delegation entry
- Update scopes
- Click "Authorize"
- Wait 5-10 minutes for propagation
Invalid Customer ID
Symptom:
✗ Google Workspace connector failed
Error: Invalid customer ID 'C0xxxxxxx'Solutions:
-
Find correct customer ID:
- Admin Console → Account → Account settings
- Copy Customer ID (format:
C01234567)
-
Verify format:
- Must start with
C - Followed by 8 digits
- Total 9 characters
- Must start with
Bundle Creation Issues
Private Key Not Found
Symptom:
✗ Bundle signing failed
Error: ENOENT: no such file or directory, open '~/.evidence/keys/private.pem'Solutions:
-
Generate key pair:
evidence init --generate-keys -
Verify file exists:
ls -l ~/.evidence/keys/private.pem -
Check configuration path:
bundle: signing: private_key_path: ~/.evidence/keys/private.pem
Permission Denied (Private Key)
Symptom:
✗ Bundle signing failed
Error: EACCES: permission denied, open '/etc/evidence/keys/private.pem'Solutions:
-
Fix permissions:
sudo chmod 600 /etc/evidence/keys/private.pem sudo chown $USER:$USER /etc/evidence/keys/private.pem -
Verify:
ls -l /etc/evidence/keys/private.pem # Should show: -rw------- 1 user user ...
Bundle Too Large
Symptom:
✗ Bundle creation failed
Error: Bundle size (75.3 MB) exceeds maximum (50 MB)Solutions:
-
Increase size limit:
bundle: max_size_mb: 100 -
Reduce scope:
sources: github: repos: - acme/backend # Instead of '*' aws: log_groups: - /aws/lambda/api # Instead of '*' -
Disable verbose manifest:
bundle: verbose_manifest: false
Verification Issues
Checksum Mismatch
Symptom:
✗ Checksums verified (11/12 files)
✗ sources/github/org_settings.json: FAILEDCauses:
- Bundle tampered with
- Bundle corrupted
- Incomplete extraction
Solutions:
-
Re-download bundle
-
Verify extraction:
tar -xzf bundle.tar.gz -C /tmp/test cd /tmp/test sha256sum -c checksums.sha256 -
Do NOT use tampered bundle for compliance
Signature Verification Failed
Symptom:
✗ Signature verification failed
Signature does not match checksums file.Causes:
- Wrong public key
- Bundle tampered with
- Bundle created with different private key
Solutions:
-
Verify public key:
tar -xzf bundle.tar.gz cat manifest.json | jq '.signer.key_id' # Compare with your key inventory -
Use correct public key:
evidence verify bundle.tar.gz \ --public-key public-2026-01.pem -
Do NOT use bundle if signature fails
Upload Issues
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:
- Platform → Settings → API Keys
- Create with
bundles:uploadpermission - Update environment variable
Upload Timeout
Symptom:
✗ Upload failed
Error: Request timeout after 300sSolutions:
-
Increase timeout:
upload: timeout_seconds: 600 -
Check network connectivity:
curl -I https://api.evidence-platform.com -
Reduce bundle size
Rate Limit Exceeded
Symptom:
✗ Upload failed
Error: Rate limit exceeded (HTTP 429)
Try again in 60 seconds.Solutions:
-
Wait and retry:
sleep 60 evidence upload bundle.tar.gz -
Reduce collection frequency:
- Upload daily instead of hourly
- Use scheduled uploads
Debugging Techniques
Enable Verbose Mode
evidence collect --verboseShows:
- Configuration parsing
- Credential validation
- API requests/responses
- Policy evaluations
- File operations
Use Dry Run Mode
evidence collect --dry-runTests without collecting:
- Configuration validation
- Credential authentication
- Control coverage
- Permission checks
Inspect Bundle Contents
# Extract bundle
tar -xzf evidence-bundle-*.tar.gz -C /tmp/inspect
# View manifest
cat /tmp/inspect/manifest.json | jq
# View run metadata
cat /tmp/inspect/run.json | jq
# Check artifacts
ls -lR /tmp/inspect/sources/Test API Credentials Directly
GitHub:
curl -H "Authorization: token $GITHUB_TOKEN" \
https://api.github.com/userAWS:
aws sts get-caller-identity
aws iam get-account-password-policyGoogle Workspace:
gcloud auth activate-service-account \
--key-file=$GOOGLE_APPLICATION_CREDENTIALS
gcloud auth print-access-tokenGetting Help
Check Documentation
- Quick Start: Installation
- Guides: How It Works
- Reference: CLI Commands
- Advanced: Credential Management
Community Support
GitHub Discussions:
- Ask questions
- Share configurations
- Report issues
GitHub Issues:
- Bug reports
- Feature requests
Error Reporting
When reporting issues, include:
-
evidence CLI version:
evidence --version -
Operating system:
uname -a -
Configuration (redacted):
# Remove sensitive data before sharing framework: soc2_type1 sources: github: org: [REDACTED] -
Error output:
Full error message and stack trace -
Steps to reproduce
Common Error Messages
| Error | Likely Cause | Solution |
|---|---|---|
Command not found: evidence | CLI not installed | npm install -g @evidence-oss/cli |
YAML parse error | Invalid YAML syntax | Check indentation, validate YAML |
Environment variable not set | Missing credentials | export VAR=value |
Bad credentials (401) | Invalid token/key | Regenerate credentials |
Not Authorized (403) | Insufficient permissions | Add required scopes/permissions |
Not Found (404) | Resource doesn't exist | Verify resource name |
Rate limit exceeded (429) | Too many requests | Wait for reset, enable pausing |
Bundle too large | Exceeds size limit | Increase limit or reduce scope |
Checksum mismatch | Bundle tampered/corrupted | Do not use bundle |
Signature failed | Wrong key or tampering | Verify key, do not use if tampered |