Skip to content

Integrations

SPEAR integrates with third-party services to enhance functionality. Configure API connections, AI services, and other integrations from the administration panel.


IntegrationPurposeStatus
OpenAIAI writing assistanceOptional
AnthropicAI writing assistanceOptional
WebhooksEvent notificationsOptional
API AccessExternal automationBuilt-in

Enable AI-powered writing assistance for report creation and finding descriptions.

🖥️ OpenAI Integration Configuration Screenshot

Navigate to Admin > Integrations > OpenAI

SettingDescription
API KeyYour OpenAI API key
ModelGPT model to use (gpt-4, gpt-4-turbo, gpt-3.5-turbo)
Max TokensMaximum response length
TemperatureCreativity level (0-1)
Rate LimitRequests per minute limit
  1. Create an account at OpenAI
  2. Generate an API key from the API keys page
  3. Enter the API key in SPEAR
  4. Select your preferred model
  5. Test the connection
  6. Save configuration
ModelBest ForCost
GPT-4High-quality technical writingHigher
GPT-4 TurboBalance of quality and speedMedium
GPT-3.5 TurboFast responses, simpler tasksLower

Once configured, AI assistance is available for:

  • Finding Descriptions: Generate detailed vulnerability descriptions
  • Remediation Steps: Create remediation recommendations
  • Executive Summaries: Draft executive summary content
  • Technical Writing: Improve technical documentation

In the report editor:

  1. Position cursor where you want AI content
  2. Click the AI assist button or use keyboard shortcut
  3. Select the type of assistance
  4. Review and edit generated content
  5. Insert into document

Alternative AI provider using Claude models.

🖥️ Anthropic Integration Settings Screenshot

Navigate to Admin > Integrations > Anthropic

SettingDescription
API KeyYour Anthropic API key
ModelClaude model to use
Max TokensMaximum response length
  1. Create an account at Anthropic
  2. Generate an API key
  3. Enter the API key in SPEAR
  4. Configure model preferences
  5. Test and save

🖥️ Webhook Configuration Interface Screenshot

Send event notifications to external services.

EventTrigger
report.createdNew report created
report.exportedReport exported to PDF
report.sharedReport shared via portal
finding.createdNew finding added
project.status_changedProject status updated
user.loginUser login event
  1. Navigate to Admin > Integrations > Webhooks
  2. Click Add Webhook
  3. Configure:
    • Name: Descriptive name
    • URL: Endpoint to receive events
    • Events: Which events to send
    • Secret: Shared secret for verification
  4. Test the webhook
  5. Enable and save
{
"event": "report.exported",
"timestamp": "2024-01-15T10:30:00Z",
"data": {
"report_id": "abc123",
"report_title": "Security Assessment Report",
"exported_by": "user@example.com",
"format": "pdf"
},
"signature": "sha256=..."
}

Verify webhook authenticity using the signature:

import hmac
import hashlib
def verify_webhook(payload, signature, secret):
expected = hmac.new(
secret.encode(),
payload.encode(),
hashlib.sha256
).hexdigest()
return hmac.compare_digest(f"sha256={expected}", signature)

🖥️ API Access Management Screenshot

SPEAR provides a REST API for external integrations.

Access interactive API documentation at:

https://your-spear-instance/api/docs

API requests use bearer token authentication:

Terminal window
curl -H "Authorization: Bearer YOUR_API_TOKEN" \
https://your-spear-instance/api/collections/reports/records
  1. Go to Account Settings > API Tokens
  2. Click Generate New Token
  3. Set token name and expiration
  4. Copy the token (shown only once)
  5. Store securely

Default API rate limits:

Endpoint TypeLimit
Read operations100/minute
Write operations30/minute
Export operations10/minute

Configure custom limits at Admin > Integrations > API.


Import findings from security scanning tools.

ScannerFormatNotes
Burp SuiteXMLProfessional/Enterprise export
NodeZeroJSONAPI export
Nexpose/InsightVMXMLStandard export
BloodHoundJSONSharpHound collection
AtlasJSONNative format
  1. Export findings from your scanner
  2. Navigate to Operations > Vulnerabilities > Import
  3. Select scanner format
  4. Upload the export file
  5. Map fields if prompted
  6. Review and confirm import

Automate scanner imports via API:

Terminal window
curl -X POST \
-H "Authorization: Bearer YOUR_TOKEN" \
-F "file=@burp-export.xml" \
-F "format=burp" \
https://your-spear-instance/api/imports/scanner

Build custom integrations using the SPEAR API:

// Example: Create a finding via API
const response = await fetch('https://spear/api/collections/findings/records', {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
title: 'SQL Injection',
severity: 'high',
description: '...',
remediation: '...'
})
});

Subscribe to real-time events via WebSocket:

const ws = new WebSocket('wss://spear/api/realtime');
ws.onopen = () => {
ws.send(JSON.stringify({
type: 'subscribe',
collection: 'reports',
token: 'YOUR_TOKEN'
}));
};

  • Use separate keys for different integrations
  • Set appropriate expiration dates
  • Rotate keys regularly
  • Never expose keys in client-side code
  • Use HTTPS endpoints only
  • Always verify signatures
  • Handle retries idempotently
  • Log webhook events for debugging
  • Set reasonable rate limits
  • Monitor API costs
  • Review AI-generated content before publishing
  • Provide clear prompts for better results

  1. Verify API key is valid
  2. Check for billing/quota issues
  3. Ensure network allows outbound HTTPS
  4. Try a different model
  1. Verify endpoint URL is correct
  2. Check endpoint returns 2xx status
  3. Review webhook logs in SPEAR
  4. Test endpoint independently
  1. Reduce request frequency
  2. Implement exponential backoff
  3. Cache responses where possible
  4. Request rate limit increase if needed