# SSL Certificate & Security Header Audit (`technicaldost/ssl-certificate-security-audit`) Actor

Check TLS certificates and security headers for any list of domains. Returns issuer, expiry with days remaining, hostname coverage, chain trust, TLS version, plus missing security headers - graded A to F. Built for scheduled expiry monitoring. No API key.

- **URL**: https://apify.com/technicaldost/ssl-certificate-security-audit.md
- **Developed by:** [Technical Dost Solutions](https://apify.com/technicaldost) (community)
- **Categories:** Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / 1,000 domain auditeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## SSL Certificate & Security Header Audit

**Know before your certificate expires — and see which security headers are missing — across every domain you own, in one scheduled run.**

Reads the certificate straight from a TLS handshake, so it reports what a browser would actually see: issuer, validity window, hostname coverage, chain trust and negotiated TLS version. Then it checks the six headers that materially change a site's security posture, and grades the result A to F.

### What you get

```json
{
  "domain": "github.com",
  "grade": "A",
  "score": 96,
  "isExpired": false,
  "daysUntilExpiry": 40,
  "validTo": "2026-09-30T23:59:59.000Z",
  "issuer": "Sectigo Limited",
  "isValidForHost": true,
  "trustedByNode": true,
  "tlsProtocol": "TLSv1.3",
  "cipher": "TLS_AES_128_GCM_SHA256",
  "missingSecurityHeaders": ["Permissions-Policy"],
  "issues": ["Missing security headers: Permissions-Policy."]
}
```

An expired certificate is reported, not skipped — `expired.badssl.com` returns grade **F** with `isExpired: true`, `daysUntilExpiry: -4149` and the untrusted-chain reason.

### Main use cases

- **Certificate expiry monitoring.** Schedule weekly and alert on `daysUntilExpiry < 30`. An expired cert takes a site down.
- **Portfolio audits** across every domain and subdomain you own.
- **Vendor and acquisition due diligence.**
- **Compliance evidence** — HSTS, CSP, X-Frame-Options coverage as a CSV.
- **Post-deploy verification** that a renewal actually rolled out.

### What is graded

| Check | Weight |
|---|---|
| Certificate valid and not expiring within 30 days | 35 |
| Certificate covers the hostname (wildcard-aware) | 15 |
| Chain trusted by a real trust store | 15 |
| Modern TLS (1.2 / 1.3) | 10 |
| Security headers present | up to 25 |

Wildcard matching follows browser rules: `*.example.com` covers `a.example.com` but **not** `a.b.example.com`.

### Pricing

| Event | Price | When |
|---|---|---|
| **Domain audited** | **$0.003** | One domain with a completed handshake and header check |

Domains where the TLS handshake failed entirely are **not charged** — there is nothing useful to return.

**1,000 domains = $3.00.**

### Input

| Field | Type | Default | Notes |
|---|---|---|---|
| `domains` | array | **required** | Ports and paths stripped automatically. Up to 5,000. |
| `concurrency` | integer | `8` | Parallel handshakes. |

### Limitations

- **Port 443 only.** Mail and other TLS services on different ports are not checked.
- **Configuration, not a penetration test.** It reads the certificate and headers; it does not test cipher downgrade, vulnerability classes, or header *values* beyond presence.
- **Header checks need a working certificate.** If TLS fails, headers cannot be read — reported in `issues` rather than silently omitted.
- Grades are this Actor's own scoring model, not an industry standard such as SSL Labs.

### Related Actors

- **[Bulk Email Deliverability Auditor](https://apify.com/technicaldost/bulk-email-deliverability-auditor)** — SPF, DKIM and DMARC for the same domains.
- **[Bulk URL Status & Redirect Chain Checker](https://apify.com/technicaldost/bulk-url-status-redirect-checker)** — HTTP-level health for the same list.

### Reliability

- Retries on 429 and 5xx with exponential backoff; permanent 4xx errors are not retried.
- Bad input is reported and skipped, never charged.
- One failing target never aborts the rest of the run.
- Concurrency is bounded and configurable — this work is network-bound, so parallel requests, not memory, are what control speed.

### Data source and responsible use

Reads only publicly available data. No authentication bypass, no CAPTCHA circumvention, no browser automation.

Not affiliated with any of the services checked.

# Actor input Schema

## `domains` (type: `array`):

Domains or URLs to audit. Ports and paths are stripped - https://example.com/pricing becomes example.com.

## `concurrency` (type: `integer`):

How many to process at once. This work is network-bound, so concurrency - not memory - is what controls speed.

## Actor input object example

```json
{
  "domains": [
    "github.com",
    "expired.badssl.com"
  ],
  "concurrency": 8
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `csv` (type: `string`):

No description

## `runSummary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "domains": [
        "github.com",
        "expired.badssl.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("technicaldost/ssl-certificate-security-audit").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "domains": [
        "github.com",
        "expired.badssl.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("technicaldost/ssl-certificate-security-audit").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "domains": [
    "github.com",
    "expired.badssl.com"
  ]
}' |
apify call technicaldost/ssl-certificate-security-audit --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,technicaldost/ssl-certificate-security-audit"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/iAm8AMO0RSfZ123gc/builds/itgXNqdtvaXKdx2AN/openapi.json
