Integrate KhulnaSoft vulnerability data directly into your security tools and workflows with our comprehensive API. Access real-time vulnerability intelligence to enhance your security posture.
Access our entire database of vulnerabilities from multiple sources
Get notified about new vulnerabilities as soon as they're discovered
Enhance your security tools with actionable vulnerability data
Select an endpoint and execute a request to see the response
All API requests require authentication using an API key. You can generate an API key in your account dashboard.
Include your API key in the request headers for all API calls:
Authorization: Bearer YOUR_API_KEYYou can create, rotate, and revoke API keys from your account dashboard. We recommend rotating your API keys periodically for enhanced security.
List all vulnerabilities with pagination and filtering options.
GET /api/v1/vulnerabilities?page=1&limit=20&severity=highGet detailed information about a specific vulnerability.
GET /api/v1/vulnerabilities/CVE-2023-1234Search for vulnerabilities with advanced filtering options.
POST /api/v1/vulnerabilities/search
Content-Type: application/json
{
"query": "sql injection",
"severity": ["high", "critical"],
"affected_packages": ["postgresql"],
"from_date": "2023-01-01",
"to_date": "2023-12-31"
}To ensure fair usage and maintain service quality, our API implements rate limiting. Rate limits vary based on your subscription plan.
| Plan | Rate Limit | Burst Limit |
|---|---|---|
| Free | 100 requests/hour | 10 requests/second |
| Developer | 1,000 requests/hour | 20 requests/second |
| Enterprise | 10,000 requests/hour | 50 requests/second |
Each API response includes headers to help you track your rate limit usage:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 950
X-RateLimit-Reset: 1620000000// Using fetch API
const fetchVulnerabilities = async () => {
const response = await fetch('https://api.khulnasoft.com/v1/vulnerabilities', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
if (!response.ok) {
throw new Error(`API error: ${response.status}`);
}
const data = await response.json();
return data;
};
// Using axios
import axios from 'axios';
const client = axios.create({
baseURL: 'https://api.khulnasoft.com/v1',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const fetchVulnerabilities = async () => {
const response = await client.get('/vulnerabilities');
return response.data;
};import axios from 'axios';
const checkPackages = async (packages) => {
const client = axios.create({
baseURL: 'https://api.khulnasoft.com/v1',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const response = await client.post('/packages/check', {
packages: packages
});
return response.data;
};
// Example usage
const packages = [
{ name: 'lodash', version: '4.17.15' },
{ name: 'express', version: '4.17.1' }
];
checkPackages(packages)
.then(results => console.log(results))
.catch(error => console.error('Error checking packages:', error));Webhooks allow you to receive real-time notifications when new vulnerabilities are discovered or existing vulnerabilities are updated. This enables you to take immediate action to protect your systems.
You can configure webhooks in your account dashboard. Specify the URL where you want to receive webhook events and select the event types you're interested in.
// Example webhook payload
{
"event_type": "vulnerability.created",
"timestamp": "2023-05-11T14:30:00Z",
"data": {
"id": "CVE-2023-1234",
"title": "SQL Injection in PostgreSQL",
"severity": 3.4,
"affected_packages": ["postgresql"],
"url": "https://khulnasoft.com/vulnerability/CVE-2023-1234"
}
}Official JavaScript/TypeScript SDK for Node.js and browser applications.
npm install @khulnasoft/security-sdkOfficial Python SDK for integrating with the KhulnaSoft Security API.
pip install khulnasoft-securityOfficial Go SDK for integrating with the KhulnaSoft Security API.
go get github.com/khulnasoft/security-sdk-go