CI/CD Security Gate
Check public deployment security before promotion
Check public deployment security before promotion. Use the API workflow below to collect dated findings, review their scope, and decide which follow-up checks your team needs.
Implementation example by the EdgeDNS team · Updated
The Challenge
A successful build can still deploy missing headers, unexpected certificates, or weaker HTTPS configuration.
The Solution
Run header, SSL, HSTS, and security-score checks against a publicly reachable deployment. Define failure criteria from the actual response fields, handle API errors separately from target failures, and account for endpoint caching before using a result to block promotion.
Endpoints Used
Combine these EdgeDNS endpoints to build this solution.
/v1/security/headersAPI referenceSecurity Headers: Analyze HTTP security headers, score, and compliance
/v1/domain/sslAPI referenceSSL Certificate: Analyze active SSL/TLS certificate details
/v1/score/securityAPI referenceSecurity Score: Composite security score from 10 weighted factors
/v1/domain/hstsAPI referenceHSTS Preload: Check HSTS policy and preload status
What this workflow helps you do
Define explicit release criteria
Choose the header and certificate findings that matter to your service.
Handle incomplete checks
Retry or require review when an upstream check is unavailable.
Keep deployment evidence
Archive responses with the release identifier.
Code Example
Check public deployment security before promotion
const headers = { Authorization: 'Bearer YOUR_API_KEY' };
const checks = [
{
"path": "/v1/security/headers",
"params": {
"url": "https://example.com"
}
},
{
"path": "/v1/domain/ssl",
"params": {
"domain": "example.com"
}
},
{
"path": "/v1/score/security",
"params": {
"domain": "cloudflare.com"
}
}
];
// Run sequentially to keep concurrency bounded. API tier restrictions apply.
for (const { path, params } of checks) {
const url = new URL(path, 'https://api.edgedns.dev');
url.search = new URLSearchParams(params).toString();
const response = await fetch(url, { headers });
const result = await response.json();
if (!response.ok) {
throw new Error(`${path}: ${response.status} ${result.error?.message ?? 'Request failed'}`);
}
// Keep the response metadata and any partial/unknown findings for review.
console.log(path, result);
}Learn More
Explore industry standards and best practices related to this use case.
Ready to build CI/CD Security Gate?
Get started with 200 free API requests per month. No credit card required.
Other Use Cases
Security Compliance Auditing
Collect external security configuration evidence for audit review
Third-Party Risk Manager / Security AnalystVendor Security Assessment
Add external domain observations to third-party risk reviews
Brand Protection / LegalDomain Portfolio Protection
Investigate lookalike domains and changes to domains you own