Documentation

SDK & Client Installation Options

Veltrix Security Automation Platform is available as a SaaS solution, with a range of SDKs, libraries, and client tools to help you interact with the platform and integrate security automation, security configuration management, and DevSecOps automation into your workflows.

SDK & Client Installation Overview

We provide multiple client options to interact with the Veltrix platform, allowing you to choose the right tool for your environment, tech stack, and workflow preferences.

Security Automation Client SDKs and Libraries

Fig 1: Veltrix Security Configuration Management and DevSecOps SDK Integration Options

Client Option Ideal For Key Features
CLI Tool DevOps engineers, security automation scripts, command-line workflows Interactive and scriptable, comprehensive security configuration management
JavaScript SDK Web applications, Node.js services, CI/CD pipelines in JavaScript Full API coverage, TypeScript support, async/await pattern
Python SDK Data science, automation scripts, backend services in Python Pythonic API, integration with popular frameworks, comprehensive error handling
Go SDK Backend services, cloud-native applications, high-performance systems Strong typing, concurrency support, efficient resource utilization
Terraform Provider Teams managing infrastructure as code with Terraform Declarative security configurations, state management, infrastructure as code (IaC) security
Browser Extension Security analysts, quick checks, dashboard access One-click security checks, notifications, quick access to dashboards

CLI Tool Installation

Our command-line interface tool enables you to interact with the Veltrix platform directly from your terminal, making it perfect for scripting, automation, and integrating with existing command-line workflows.

Prerequisites

  • Node.js 14.x or later
  • npm or yarn package manager
  • Valid Veltrix account credentials

Installation Steps

Install the CLI globally using npm:

npm install -g veltrix-cli

Or using yarn:

yarn global add veltrix-cli

Authentication Setup

After installation, configure your authentication:

veltrix configure

Follow the interactive prompts to enter your API key or login credentials.

Usage Examples

Check your security configuration status:

veltrix config status

Validate a configuration file against policy:

veltrix policy validate --file ./config.json

List recent security events:

veltrix events list --limit 10

Pro Tip

Add the CLI to your CI/CD pipeline to automate security approval workflows and policy checks: veltrix ci-check --config ./security-config.json

JavaScript SDK Installation

The JavaScript SDK provides a seamless way to integrate Veltrix security automation and security configuration management into your JavaScript and TypeScript applications.

Prerequisites

  • Node.js 12.x or later
  • npm, yarn, or pnpm package manager
  • Valid Veltrix API credentials

Installation Steps

Install the SDK using npm:

npm install @veltrix/secops-sdk

Or using yarn:

yarn add @veltrix/secops-sdk

Basic Usage

// Import the SDK
import { VeltrixClient } from '@veltrix/secops-sdk';

// Initialize the client
const client = new VeltrixClient({
  apiKey: 'your-api-key',
  // or use clientId/clientSecret for OAuth2
});

// Example: Check a configuration against security policies
async function validateConfiguration() {
  try {
    const result = await client.policy.validate({
      configuration: {
        // Your configuration object
        access: 'restricted',
        encryption: 'enabled',
        // ...more configuration properties
      },
      policyId: 'pol_standard_compliance',
    });
    
    if (result.compliant) {
      console.log('Configuration is compliant!');
    } else {
      console.error('Compliance issues:', result.issues);
    }
  } catch (error) {
    console.error('Validation failed:', error);
  }
}

For more examples and detailed documentation, check the JavaScript SDK documentation.

Python SDK Installation

Our Python SDK enables seamless integration with the Veltrix platform for your Python applications, scripts, and data pipelines.

Prerequisites

  • Python 3.7 or later
  • pip package manager
  • Valid Veltrix API credentials

Installation Steps

Install the Python SDK using pip:

pip install veltrix-secops

For a virtual environment:

python -m venv venv
source venv/bin/activate  # On Windows, use venv\Scripts\activate
pip install veltrix-secops

Basic Usage

# Import the SDK
from veltrix import VeltrixClient

# Initialize the client
client = VeltrixClient(api_key='your-api-key')

# Example: Check a configuration against security policies
def validate_configuration():
    try:
        result = client.policy.validate(
            configuration={
                # Your configuration object
                'access': 'restricted',
                'encryption': 'enabled',
                # ...more configuration properties
            },
            policy_id='pol_standard_compliance'
        )
        
        if result.compliant:
            print('Configuration is compliant!')
        else:
            print('Compliance issues:', result.issues)
    except Exception as e:
        print(f'Validation failed: {e}')

Integration With Frameworks

The Python SDK seamlessly integrates with popular frameworks like Django, Flask, and FastAPI. See our framework integration guides for specific examples.

Go SDK Installation

The Go SDK provides a strongly-typed, efficient way to integrate Veltrix security automation and security configuration management into your Go applications and services.

Prerequisites

  • Go 1.16 or later
  • Valid Veltrix API credentials

Installation Steps

Install the Go SDK using go get:

go get github.com/veltrix/secops-go

Basic Usage

package main

import (
	"context"
	"fmt"
	"log"

	veltrix "github.com/veltrix/secops-go"
)

func main() {
	// Initialize the client
	client, err := veltrix.NewClient(veltrix.WithAPIKey("your-api-key"))
	if err != nil {
		log.Fatalf("Failed to create client: %v", err)
	}

	// Example: Check a configuration against security policies
	cfg := map[string]interface{}{
		"access":      "restricted",
		"encryption":  "enabled",
		// ...more configuration properties
	}

	result, err := client.Policy.Validate(context.Background(), &veltrix.ValidateRequest{
		Configuration: cfg,
		PolicyID:      "pol_standard_compliance",
	})
	if err != nil {
		log.Fatalf("Validation failed: %v", err)
	}

	if result.Compliant {
		fmt.Println("Configuration is compliant!")
	} else {
		fmt.Println("Compliance issues:", result.Issues)
	}
}

For more examples and detailed documentation, check the Go SDK documentation.

Terraform Provider Installation

The Veltrix Terraform Provider allows you to manage security configurations, policies, and resources using infrastructure as code (IaC), making it perfect for DevSecOps automation and security configuration management.

Prerequisites

  • Terraform 0.14.x or later
  • Valid Veltrix API credentials

Configuration

Add the provider to your Terraform configuration:

terraform {
  required_providers {
    veltrix = {
      source  = "veltrix/secops"
      version = "~> 1.0"
    }
  }
}

provider "veltrix" {
  api_key = var.veltrix_api_key
  # Or use OAuth2 authentication
  # client_id     = var.veltrix_client_id
  # client_secret = var.veltrix_client_secret
}

Resource Examples

# Define a security policy
resource "veltrix_policy" "compliance_policy" {
  name        = "Standard Compliance Policy"
  description = "Ensures all configurations meet security standards"
  rules       = jsonencode({
    "encryption": {
      "required": true,
      "level": "AES-256"
    },
    "access_control": {
      "principle": "least-privilege",
      "mfa_required": true
    }
  })
}

# Define a security configuration
resource "veltrix_configuration" "app_security_config" {
  name        = "Application Security Configuration"
  description = "Security settings for our application"
  config      = jsonencode({
    "encryption": {
      "enabled": true,
      "algorithm": "AES-256"
    },
    "access_control": {
      "principle": "least-privilege",
      "mfa_required": true
    }
  })
  
  # Validate against policy
  validation {
    policy_id = veltrix_policy.compliance_policy.id
  }
}

For more examples and complete documentation, check the Terraform Provider documentation.

DevSecOps Automation

Use the Terraform provider in your CI/CD pipeline to implement security approval workflows and automatically validate infrastructure changes against security policies before deployment.

Browser Extension Installation

Our browser extension provides quick access to the Veltrix platform, enabling real-time security checks and notifications directly from your browser.

Supported Browsers

  • Google Chrome
  • Mozilla Firefox
  • Microsoft Edge
  • Safari (macOS only)

Installation Links