Resources

Security

Security practices, compliance controls, and data protection at Tork.

Security Overview

Tork is built with security as a foundational principle. We implement industry-leading security practices to protect your data and help meet compliance requirements.

SOC 2 Type II

Not certified — controls designed to align

Encryption

AES-256 at rest, TLS 1.3 in transit

Privacy

GDPR and CCPA compliant

API Key Security

Best practices for managing your API keys:

Use Environment Variables

Never hardcode API keys in source code

Rotate Keys Regularly

Rotate production keys every 90 days

Scope Permissions

Use the minimum permissions required

Monitor Usage

Set up alerts for unusual API activity

Separate Environments

Use different keys for dev, staging, and production

An API key is only needed to reach the Tork cloud API. There is no Python cloud client — from Python, call the REST API directly with a Bearer token. The cloud client class TorkClient ships in @torknetwork/sdk (npm), which is a different package from the on-device tork-governance family.

python
import os
import requests

# Good: load the key from the environment
API_KEY = os.environ["TORK_API_KEY"]

# Bad: hardcoded key
# API_KEY = "tork_sk_..."  # Never do this!

resp = requests.post(
    "https://tork.network/api/v1/govern",
    headers={
        "Authorization": f"Bearer {API_KEY}",
        "Content-Type": "application/json",
    },
    json={"input": "Contact me at jane@example.com"},
    timeout=10,
)
resp.raise_for_status()

tork-governance makes the governance decision on your machine. PII detection, redaction and the returned verdict are computed on-device. With no API key it makes zero network calls: prompts, completions and detected PII values never leave the machine, and nothing appears in your dashboard.

Data Handling

How we handle your data:

Data TypeRetentionEncryption
Audit Logs90 days (configurable)AES-256
Policy ConfigsUntil deletedAES-256
Agent MetadataUntil deletedAES-256
Content (if stored)24 hoursAES-256
PII (detected)Not storedN/A

Content passing through Tork is processed in memory and not persisted unless explicitly configured for audit purposes.

Network Security

Infrastructure security measures:

Infrastructure

  • Infrastructure providers (Supabase, Vercel) hold SOC 2 Type II certification
  • VPC isolation for all services
  • Regular penetration testing
  • WAF and DDoS protection

Compliance

  • Tork is not SOC 2 certified — controls designed to align with SOC 2 Type II
  • GDPR compliant
  • CCPA compliant

IP Allowlisting

Restrict API access to specific IP addresses:

python
# Configure the IP allowlist in the dashboard:
#   Settings > Security > IP Allowlist
#
# Allowlisting is enforced by the Tork cloud API and applies to
# requests that carry your API key. The on-device SDK is unaffected:
# with no API key it makes no network calls at all.
#
# Verify which source IP the API sees from a given host:
import os
import requests

resp = requests.get(
    "https://tork.network/api/v1/health",
    headers={"Authorization": f"Bearer {os.environ['TORK_API_KEY']}"},
    timeout=10,
)
print(resp.status_code)  # 403 if this host is not on the allowlist

Webhook Security

Secure your webhook endpoints:

python
import hmac
import hashlib
from datetime import datetime, timedelta

def verify_webhook(payload: bytes, signature: str, timestamp: str, secret: str) -> bool:
    # Check timestamp to prevent replay attacks
    webhook_time = datetime.fromisoformat(timestamp)
    if datetime.utcnow() - webhook_time > timedelta(minutes=5):
        return False

    # Verify HMAC signature
    expected = hmac.new(
        secret.encode(),
        f"{timestamp}.{payload.decode()}".encode(),
        hashlib.sha256
    ).hexdigest()

    return hmac.compare_digest(signature, f"sha256={expected}")

Security Incidents

If you discover a security vulnerability:

Responsible Disclosure

Please report security vulnerabilities to:

security@tork.network

We respond to all reports within 24 hours and aim to resolve critical issues within 72 hours.

Request Audit Documentation: Enterprise customers can request current compliance documentation and completed security questionnaires from security@tork.network. SOC 2 Type II is in progress — see the Trust Center for current status.

Documentation

Learn to integrate TORK

Upgrade Plan

Current: free

Support

Get help from our team