Skip to main content
Founding Partner + 7-Day Trial
Tier B Enterprise Fleet · 12-Language Immunity EngineAutoExtinguish: false (MCP Referee)

AutoExtinguish: false across all 12 languages — authentication & RBAC policies are architectural; verify candidate guards locally via ciphermap mcp (ciphermap_verify_candidate_fix).

Commercial boundary: ciphermap immunity scan, immunity extinguish --apply, immunity attest (CycloneDX 1.6 CISA IBOM & OpenVEX 0.2.0), and ciphermap mcp require Tier B Enterprise Fleet. Offline proof and IBOM verification (--verify-proof, attest --verify) and the ciphermap demo sandbox run Free.

Back to docs
IMM-AUTH-001HIGHCISA Secure-by-Design Pledge · CWE-306 · NIST SP 800-53 Rev. 5 (AC-3, SC-7)

Unauthenticated or Unguarded State-Mutating Boundary Endpoint

Severity: HIGH

State-mutating HTTP/RPC endpoints, Next.js 'use server' Server Actions, and controller routes that omit explicit authentication, authorization, CSRF, or anti-abuse rate-limit guards allow unauthenticated callers to trigger privileged mutations directly across Go, TypeScript, JavaScript, Python, Java, Kotlin, C#, Rust, C/C++, Ruby, PHP, and Swift. Because authentication principals, tenant roles, and authorization policies are application-specific, IMM-AUTH-001 deliberately sets AutoExtinguish: false across all 12 languages — ciphermap preflight routes these findings to architectural_or_mcp_assisted so developers or AI coding agents remediate them under the local zero-egress ciphermap mcp Vericoding Referee.

Remediation checklist

  • TypeScript & JavaScript: enforce session/principal verification, rate limiting, and CSRF/challenge validation at the top of every exported Next.js 'use server' action and mutating Express/Fastify/Hono route; Go: wrap mutating HTTP/gRPC handlers in explicit authentication and rate-limit middleware.
  • Python: attach Depends(require_user), @login_required, or IsAuthenticated permission classes on mutating FastAPI/Flask/Django views; Java & Kotlin: enforce @PreAuthorize/@Secured on Spring @PostMapping/@DeleteMapping controllers and authenticate {} blocks on Ktor routes.
  • C#: require [Authorize] or RequireAuthorization() (and never [AllowAnonymous] without compensating proof) on mutating ASP.NET Core actions; Rust & C/C++: require authenticated principal extractors/middleware (Axum/Actix) or verified mTLS/token guards on mutating RPC handlers.
  • Ruby: never bypass before_action :authenticate_user! or verify_authenticity_token on mutating Rails controller actions, and enforce Pundit/CanCanCan authorization; PHP: attach auth middleware + Gate::authorize / #[IsGranted] on Laravel/Symfony routes and real capability checks (never '__return_true') on mutating WordPress register_rest_route endpoints; Swift: protect mutating Vapor routes with AuthMiddleware and req.auth.require(User.self).

Illustrative Code Examples

These fragments explain migration direction. They are not complete applications or compiler-verified patches for your project.

Vulnerable — unguarded mutating boundary endpoints (Next.js / Rails / PHP)

terminal · zsh
// TypeScript Next.js Server Action without auth or rate limit
"use server";
export async function deleteTenant(tenantId: string) {
  return await db.tenants.delete(tenantId);
}

# Ruby on Rails: skipping auth on mutating destroy action
class UsersController < ApplicationController
  skip_before_action :authenticate_user!, only: [:destroy]
  def destroy; User.find(params[:id]).destroy!; end
end

Remediated — authenticated & authorized mutations verified via ciphermap mcp

terminal · zsh
// TypeScript Next.js Server Action with rate limit + session guard
"use server";
export async function deleteTenant(tenantId: string) {
  await consumeSubmissionRateLimit("delete-tenant");
  const session = await requireAuthenticatedSession();
  await authorizeTenantAdmin(session.userId, tenantId);
  return await db.tenants.delete(tenantId);
}

Preview remediation proposals

Preview proposed changes free with ciphermap fix . --dry-run --offline --no-telemetry. Eligibility depends on the installed build, call shape, module format, and migration context. The bundled RSA fixture has a classical key-size candidate; that does not make it post-quantum secure. Persisted digests and unsupported contexts may be declined. Applying supported candidates requires an entitlement, explicit verifier consent, and the required project tools. Review the actual verification result before adopting a change.

View DevSecOps pricing

Other rule families