← Home ← Codex ← DEBT
Browse by Category
+ added · updated 7d
← Back to glossary

Zero Trust

General PHP 5.0+ Intermediate
debt(d7/e7/b7/t5)
d7 Detectability Operational debt — how invisible misuse is to your safety net

Closest to 'only careful code review or runtime testing' (d7). The detection_hints confirm automated detection is 'no' and the tool listed (semgrep) can only catch specific patterns like auth bypass on internal IPs or missing auth on internal endpoints — but a systemic absence of zero trust principles (e.g. long-lived credentials, no mutual TLS between services) requires careful architectural review and runtime observation, not just a single tool scan.

e7 Effort Remediation debt — work required to fix once spotted

Closest to 'cross-cutting refactor across the codebase' (e7). The quick_fix ('verify every request explicitly') sounds simple but the common_mistakes reveal the fix spans multiple layers: adding per-request auth to all service-to-service calls, rotating from long-lived to short-lived credentials, instrumenting internal traffic logging — all of which touch many components across the codebase and infrastructure, making this a cross-cutting remediation effort.

b7 Burden Structural debt — long-term weight of choosing wrong

Closest to 'strong gravitational pull' (b7). Zero trust applies to web, api, and cli contexts per applies_to, and is tagged as an architectural principle. Every new service, endpoint, or internal call must be designed with explicit authentication and authorisation in mind. This shapes how every integration is built and maintained, imposing a persistent design constraint on every future developer working in the system.

t5 Trap Cognitive debt — how counter-intuitive correct behaviour is

Closest to 'notable trap' (t5). The misconception field explicitly states that developers commonly believe zero trust means 'no one is ever authenticated' when it actually means 'trust is never assumed based on network location.' Additionally, the most common mistake — trusting internal IPs — is a well-documented gotcha that many developers eventually learn, but still frequently misapply. This is a notable, documented trap rather than a catastrophic or subtle one.

About DEBT scoring →

Also Known As

zero trust architecture ZTA never trust always verify

TL;DR

Never trust, always verify — authenticate and authorise every request regardless of network location.

Explanation

Zero Trust is a security model that eliminates the concept of a trusted internal network. Traditional perimeter security assumes anything inside the firewall is safe — Zero Trust assumes breach and verifies every request as if it originates from an untrusted network. In practice: authenticate every user and device, authorise every individual resource access, encrypt all traffic (including internal), log everything, and grant least-privilege access. Particularly important for cloud and hybrid environments where the "inside" is not well-defined.

Common Misconception

Zero trust means no one is ever authenticated or trusted. Zero trust means trust is never assumed based on network location — every request is authenticated, authorised, and encrypted regardless of whether it originates inside or outside the perimeter.

Why It Matters

Zero trust assumes no request is trustworthy by default — every request is authenticated and authorised regardless of network location, eliminating the 'trusted internal network' assumption attackers abuse.

Common Mistakes

  • Trusting requests because they come from an internal IP — internal networks are routinely compromised.
  • Service-to-service calls without authentication — a compromised internal service gets unrestricted access.
  • Long-lived credentials instead of short-lived tokens — compromised credentials have a longer attack window.
  • Not logging and monitoring internal traffic — lateral movement after initial compromise goes undetected.

Code Examples

✗ Vulnerable
// Trust based on network location:
if (in_array($_SERVER['REMOTE_ADDR'], $internal_ips)) {
    // Bypass authentication — 'trusted' internal request
    return $this->handleAdminAction($request);
}
// Attacker on internal network (via phishing, supply chain) bypasses all auth
✓ Fixed
// Zero Trust — never trust, always verify
// Even internal services must authenticate

// Service-to-service auth with shared secret:
class InternalApiClient {
    public function request(string $endpoint, array $data): array {
        $token   = hash_hmac('sha256', json_encode($data) . time(), $_ENV['INTERNAL_SECRET']);
        return $this->http->post($endpoint, $data, [
            'X-Internal-Token' => $token,
            'X-Timestamp'      => time(),
        ]);
    }
}

// Per-request authorisation even inside the network:
class OrderService {
    public function getOrder(int $id, User $caller): Order {
        $order = Order::findOrFail($id);
        if ($order->user_id !== $caller->id && !$caller->isAdmin()) abort(403);
        return $order; // verified even on 'trusted' internal call
    }
}

Added 15 Mar 2026
Edited 22 Mar 2026
Views 58
Rate this term
No ratings yet
🤖 AI Guestbook educational data only
| |
Last 30 days
0 pings T 1 ping W 1 ping T 0 pings F 0 pings S 0 pings S 0 pings M 0 pings T 0 pings W 1 ping T 3 pings F 1 ping S 0 pings S 3 pings M 0 pings T 0 pings W 1 ping T 0 pings F 2 pings S 0 pings S 1 ping M 0 pings T 0 pings W 0 pings T 0 pings F 0 pings S 0 pings S 0 pings M 1 ping T 0 pings W
No pings yet today
PetalBot 1
Perplexity 8 Amazonbot 7 Google 5 Scrapy 5 Ahrefs 4 ChatGPT 4 SEMrush 3 Unknown AI 2 Bing 2 Claude 1 Meta AI 1 PetalBot 1
crawler 38 crawler_json 5
DEV INTEL Tools & Severity
🔵 Info ⚙ Fix effort: High
⚡ Quick Fix
Verify every request explicitly — authenticate and authorise on each API call, never assume trust based on network location
📦 Applies To
PHP 5.0+ web api cli
🔗 Prerequisites
🔍 Detection Hints
Auth bypass based on internal IP or assumed trusted network; missing auth on internal API endpoints
Auto-detectable: ✗ No semgrep
⚠ Related Problems
🤖 AI Agent
Confidence: Medium False Positives: Medium ✗ Manual fix Fix: High Context: File
CWE-284 CWE-1188


✓ schema.org compliant