# SSL Certificate Expiry & Security Headers Checker (A–F) (`lokieee0/ssl-security-scanner`) Actor

For MSPs, agencies & IT teams monitoring client sites: bulk-scan SSL/TLS certificate expiry, chain and hostname errors, legacy TLS 1.0/1.1, HSTS, CSP and security headers, cookie flags. A–F grade, prioritized fixes and expiry alerts – schedule it and never miss a renewal.

- **URL**: https://apify.com/lokieee0/ssl-security-scanner.md
- **Developed by:** [maraa k](https://apify.com/lokieee0) (community)
- **Categories:** Developer tools, SEO tools, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / 1,000 site scanneds

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?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## SSL Certificate & Security Headers Scanner (A–F grade)

Scan hundreds of websites at once for **SSL/TLS certificate problems** and **missing security headers**. Each host gets an **A–F grade**, a 0–100 score, and a **prioritized list of exact fixes**. Run it on a schedule to catch **expiring certificates** before your customers see a browser warning.

Made for DevOps and SRE teams, MSPs managing client sites, security consultants and agencies.

### What it checks

| Area | Checks |
|---|---|
| **Certificate** | Expiry (days left), trusted chain, **hostname coverage** (SAN), self-signed, untrusted root, **incomplete chain / missing intermediate**, key type and size, SHA-1 signatures, issuer, SAN list, wildcard |
| **TLS** | Negotiated protocol and cipher, **TLS 1.0/1.1 still enabled**, TLS 1.3 support, legacy-only servers |
| **Redirect** | Whether HTTP → HTTPS redirects |
| **Headers** | HSTS (with max-age check), Content-Security-Policy (flags `unsafe-inline`), clickjacking protection (X-Frame-Options / frame-ancestors), X-Content-Type-Options, Referrer-Policy, Permissions-Policy, **server version leaks** |
| **Cookies** | Missing `Secure`, `HttpOnly` (on session cookies) and `SameSite` |

### Accuracy

- **Validated against [badssl.com](https://badssl.com)**, the industry test bed. Expired, wrong-host, self-signed, untrusted-root and incomplete-chain certificates are all detected correctly on this build.
- **TLS 1.0/1.1 detection actually works.** Modern OpenSSL refuses to speak TLS 1.0/1.1 by default, so many scanners report "disabled" for every server. This one lowers the security level for those probes only, and the results were cross-checked with `openssl s_client`.
- **Hostname checked independently**, so a valid certificate for the wrong domain is still caught.
- A critical certificate problem **caps the grade at F**, however good the headers are.

### Input

```json
{ "urls": ["example.com", "www.example.com", "shop.example.com:8443"], "expiryWarnDays": 30, "onlyProblems": true }
```

### Output

```json
{
  "host": "expired.badssl.com",
  "grade": "F",
  "score": 30,
  "certificateValid": false,
  "daysUntilExpiry": -3874,
  "topFix": "Renew the certificate now and enable auto-renewal (certbot/ACME).",
  "issues": [{ "area": "certificate", "severity": "critical", "message": "Certificate EXPIRED 3874 day(s) ago (2015-04-12).", "fix": "Renew the certificate now…" }],
  "certificate": { "issuer": "COMODO CA Limited", "trusted": false, "coversHostname": true, "keyType": "RSA", "keyBits": 2048, "protocol": "TLSv1.2", "sans": ["*.badssl.com", "badssl.com"] },
  "tlsVersions": { "tls10": false, "tls11": false, "tls13": false },
  "headers": { "present": { "strict-transport-security": null }, "versionLeaks": ["Server: nginx/1.10.3"] }
}
```

### Monitoring tip

Schedule this actor daily with `onlyProblems: true` and `expiryWarnDays: 21`, then connect a Slack or email integration. You'll only hear about hosts that need attention.

### How to use it

1. Paste hostnames or URLs into **URLs** (`host:port` works too).
2. Set **Expiry warning days** (e.g. 21). Turn on **Only problems** if you're monitoring.
3. Click **Start**.
4. Open **Overview** for grades and days until expiry, or **Issues** for a fix list.

### How much does it cost?

You pay **$3 per 1,000 sites** returned, with no subscription and no separate compute charges. Filters that drop rows mean you don't pay for those rows.

| You process | Typical use | Cost |
|---|---|---|
| 50 sites | one MSP's client sites | **$0.15** |
| 1,000 sites | a daily monitoring run for an agency | **$3** |
| 10,000 sites | an attack-surface sweep | **$30** |

Apify's free plan includes monthly credit, which is enough to try this actor on a real list before you pay anything.

### Use it from code or your tools

Run it from **Make, Zapier, n8n, Google Sheets, Slack, webhooks** or any language through the [Apify API](https://docs.apify.com/api/v2).

**Python**

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("lokieee0/ssl-security-scanner").call(run_input={
    "urls": [
        "example.com",
        "shop.example.com"
    ],
    "onlyProblems": True
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

**Node.js**

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

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('lokieee0/ssl-security-scanner').call({"urls": ["example.com", "shop.example.com"], "onlyProblems": true});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

**cURL** (run and get results in one request)

```bash
curl -X POST "https://api.apify.com/v2/acts/lokieee0~ssl-security-scanner/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"urls": ["example.com", "shop.example.com"], "onlyProblems": true}'
```

### FAQ

**How do I get alerts before a certificate expires?**
Schedule the actor daily with `onlyProblems: true`, then add a Slack or email integration. Runs with no problems send nothing.

**Is this an active vulnerability scanner?**
No. It makes normal HTTPS connections and reads certificates and headers, the same as a browser, so it's safe to run against client sites.

**Why does TLS 1.0 show as enabled when other tools say it's off?**
Many tools use modern OpenSSL, which refuses to probe TLS 1.0/1.1 and reports 'disabled' for everything. This actor probes them properly, and results were cross-checked with openssl s_client.

**Can I schedule it or connect it to other apps?**
Yes. Use Apify **Schedules** for recurring runs, and **Integrations** to send results to Google Sheets, Slack, email, Zapier, Make, n8n or a webhook.

**Something didn't work or a field is missing?**
Open an issue on the **Issues** tab. Reports are usually fixed within a few days, and feature requests are welcome.

### More tools from the same developer

- [SPF, DKIM & DMARC checker with a 0–100 score and exact DNS fixes](https://apify.com/lokieee0/email-auth-auditor)
- [Find businesses with outdated websites, with a ready-to-send pitch](https://apify.com/lokieee0/website-redesign-auditor)
- [Jobs from Greenhouse, Lever, Ashby & 4 more ATS in one format](https://apify.com/lokieee0/ats-jobs-scraper)
- [Emails, phones & social profiles from any list of websites](https://apify.com/lokieee0/website-contact-extractor)
- [Detect 130+ technologies (CMS, Shopify, analytics, hosting) on any site](https://apify.com/lokieee0/tech-stack-detector)
- [Npm, PyPI & crates.io vulnerability and supply-chain risk audit](https://apify.com/lokieee0/package-intel)
- [Bulk GitHub repo stats with a 0–100 health score](https://apify.com/lokieee0/github-repo-intel)
- [Search, scrape & monitor Hacker News without the 1,000-result limit](https://apify.com/lokieee0/hacker-news-scraper)
- [Crawl a website for broken links, meta tag, redirect & sitemap issues](https://apify.com/lokieee0/seo-site-auditor)

# Actor input Schema

## `urls` (type: `array`):

Hostnames or URLs to scan. Certificates are per hostname, so www.example.com and example.com are scanned separately. Non-standard ports are supported: host:8443.

## `checkTlsVersions` (type: `boolean`):

Run extra handshakes to see whether deprecated TLS 1.0/1.1 are still enabled and whether TLS 1.3 is supported.

## `expiryWarnDays` (type: `integer`):

Flag certificates that expire within this many days. Under 7 days is always high severity.

## `onlyProblems` (type: `boolean`):

Skip hosts that have only low-severity findings. Good for scheduled monitoring: you see (and pay for) only what needs action.

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

Hosts scanned in parallel.

## `maxItems` (type: `integer`):

Stop after this many results, which caps the cost of the run.

## Actor input object example

```json
{
  "urls": [
    "github.com",
    "expired.badssl.com"
  ],
  "checkTlsVersions": true,
  "expiryWarnDays": 30,
  "onlyProblems": false,
  "concurrency": 10
}
```

# Actor output Schema

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

No description

## `issues` (type: `string`):

No description

## `allResults` (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 = {
    "urls": [
        "github.com",
        "expired.badssl.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("lokieee0/ssl-security-scanner").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 = { "urls": [
        "github.com",
        "expired.badssl.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("lokieee0/ssl-security-scanner").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 '{
  "urls": [
    "github.com",
    "expired.badssl.com"
  ]
}' |
apify call lokieee0/ssl-security-scanner --silent --output-dataset

```

## MCP server setup

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

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/469zcV40Lk4rLuRAz/builds/Jv7GbYIQvOjyxxkYx/openapi.json
