Agent Utilities
← Security checks

security.cookie-audit · v1.0.0

Cookie Audit
for your agent.

Check up to 50 Set-Cookie headers for security attributes and prefix rules; masks cookie values.

$0.0005 / call500 micro-dollar credits
131,072 bytes max input65,536 bytes max output
Works on supplied inputNo external network fetch

Example input

{
  "setCookies": [
    "demo=example; Secure; HttpOnly; SameSite=Lax; Path=/"
  ]
}

Example output

{
  "cookies": [
    {
      "name": "demo",
      "value": "[REDACTED]",
      "secure": true,
      "httpOnly": true,
      "sameSite": "lax",
      "hasDomain": false,
      "findings": []
    }
  ],
  "scope": "One Set-Cookie header per input; values are omitted. Origin, expiry and application behavior are not verified."
}

Generated from the actual handler using this example input; this is a preview, not a paid API call. Paid responses wrap the result with a receipt and recovery expiry.

Call it from your agent

Add credits in the workspace and keep your API key in private environment storage. Use the same request ID and exact body to recover a lost response within ten minutes.

// Node.js 22+. Read the key from your private environment.
const requestId = Date.now() + '_' + crypto.randomUUID();
const response = await fetch('https://agent-utilities.agent-utilities.workers.dev/v1/tools/security.cookie-audit', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer ' + process.env.AGENT_UTILITIES_API_KEY,
    'Idempotency-Key': requestId
  },
  body: JSON.stringify({
  "setCookies": [
    "demo=example; Secure; HttpOnly; SameSite=Lax; Path=/"
  ]
})
});
const data = await response.json();
if (!response.ok) throw new Error(data.error?.message ?? 'Request failed');
console.log(data);
// On response loss, retry this SAME requestId, tool and body.
// Do not rerun the line that generates requestId for a retry.
Input JSON Schema
{
  "type": "object",
  "properties": {
    "setCookies": {
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 8192
      },
      "maxItems": 50
    }
  },
  "required": [
    "setCookies"
  ],
  "additionalProperties": false
}
Output JSON Schema
{
  "type": "object",
  "properties": {
    "cookies": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "value": {
            "const": "[REDACTED]"
          },
          "secure": {
            "type": "boolean"
          },
          "httpOnly": {
            "type": "boolean"
          },
          "sameSite": {
            "type": "string"
          },
          "hasDomain": {
            "type": "boolean"
          },
          "findings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "rule": {
                  "type": "string"
                },
                "severity": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "rule",
                "severity",
                "message"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "name",
          "value",
          "secure",
          "httpOnly",
          "sameSite",
          "hasDomain",
          "findings"
        ],
        "additionalProperties": false
      }
    },
    "scope": {
      "type": "string"
    }
  },
  "required": [
    "cookies",
    "scope"
  ],
  "additionalProperties": false
}

Before you integrate

Prices are experimental. The service currently allows 1,000 new calls per day across all accounts. Failed operations return reserved credits. This tool may process sensitive content; use sanitized samples when possible. Successful results are encrypted for ten-minute retry recovery. Review data handling and service limits.

Related tools

security $0.0005 / call

Secret Scan

Detect five families of credential patterns with fully masked findings.

security.secret-scan

security $0.0005 / call

Secret Redact

Replace detected credential patterns with redaction markers.

security.secret-redact

security $0.0003 / call

JWT Inspect

Decode untrusted JWT claims and optionally compare timestamps; never verifies a signature.

security.jwt-inspect