# CAA Record Policy Auditor (`phoenix2810/caa-policy-auditor`) Actor

Audit a public domain's CAA (Certificate Authority Authorization, RFC 8659) DNS policy in one API call. Validates issue and issuewild issuer authorization, iodef violation-reporting contacts, tag and flag validity, and blocked-issuance detection. Returns a score, grade, and recommendations.

- **URL**: https://apify.com/phoenix2810/caa-policy-auditor.md
- **Developed by:** [Sanskar Jaiswal](https://apify.com/phoenix2810) (community)
- **Categories:** Developer tools, SEO tools, Open source
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

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

## CAA Record Policy Auditor

Apify Actor that audits a public domain's **CAA (Certificate Authority
Authorization, RFC 8659)** DNS policy in one cheap API call.

### What it does

- Fetches the domain's CAA records via a public DNS-over-HTTPS resolver
  (Cloudflare 1.1.1.1 JSON API, no auth, no page fetching).
- Parses every record with full RFC 8659 semantics:
  - `issue` / `issuewild` issuer domains and `name=value` parameters
    (duplicate `accounturi` / `validationmethods` detection).
  - `iodef` violation-reporting contacts — validated as URI strings only
    (mailto / http / https schemes), **never fetched**.
  - Unknown tags, invalid flags, unknown flag bits, and the critical-bit
    (128) misuse that makes CAs ignore the property.
  - Blocked issuance (`0 issue ";"`) and wildcard-only policies.
- Classifies issuer domains against a list of known certificate authorities.
- Returns a policy summary, weighted **readiness score (0-100)**, letter
  grade, issues, and concrete recommendations.

### Input

| Field | Type | Description |
| --- | --- | --- |
| `startUrl` | string (required) | Public domain or URL to audit |
| `timeoutSeconds` | integer | DoH query timeout, default 10 |

### Output (default dataset)

One JSON object: `domain`, `caaFound`, `recordCount`, `records[]` (flags, tag,
value, domain, parameters, iodef analysis, issues), `tagCounts`, `policy`
(issuers, issuersRecognized, wildcardPolicy, blockAllIssuance), `hasIssueTag`,
`hasIssuewildTag`, `hasIodef`, `iodefValid`, `unknownTagCount`,
`unknownCaCount`, `hasDuplicateTags`, `recordIssues[]`, `score`, `grade`,
`issues[]`, `recommendations[]`, `checkedAt`.

### Security

- DNS CAA lookups only, via a public DoH resolver; the target URL is never
  fetched over HTTP.
- SSRF protection: only HTTP/HTTPS input, credentials rejected, private IPv4
  and IPv6 literals blocked, DNS resolution of the hostname checked against
  private ranges.
- iodef URLs are validated as strings and never requested, so the actor
  cannot be weaponized for report flooding.

### Use cases

- Certificate-renewal and CA-migration QA (adding CAA for a new CA before
  switching issuers).
- Security posture monitoring for parked and production domains.
- Compliance audits (CAA is a low-cost control in frameworks like PCI DSS
  4.0 as part of key/certificate management practices).

### Pricing suggestion

$0.005 actor start + $0.01 per domain audited (~$0.015 per run).

# Actor input Schema

## `startUrl` (type: `string`):

Public domain or URL to audit. The actor extracts the hostname and queries its CAA DNS records via a public DoH resolver. The URL itself is never fetched. Private IP ranges are blocked.

## `timeoutSeconds` (type: `integer`):

Timeout for the DNS-over-HTTPS CAA lookup.

## Actor input object example

```json
{
  "startUrl": "https://example.com",
  "timeoutSeconds": 10
}
```

# Actor output Schema

## `results` (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 = {
    "startUrl": "https://example.com"
};

// Run the Actor and wait for it to finish
const run = await client.actor("phoenix2810/caa-policy-auditor").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 = { "startUrl": "https://example.com" }

# Run the Actor and wait for it to finish
run = client.actor("phoenix2810/caa-policy-auditor").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 '{
  "startUrl": "https://example.com"
}' |
apify call phoenix2810/caa-policy-auditor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,phoenix2810/caa-policy-auditor"
        }
    }
}
```

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/QLVFUejZsrHFbaoCp/builds/pypydpEphXCaUXsQF/openapi.json
