---
title: "Application Security as a Closed Loop: Discover, Govern, Protect, Learn"
description: "Application security is a closed loop: discover and prioritize risk, govern access and agent behavior, protect at runtime, then investigate and feed findings back into the next cycle."
---

# Application Security as a Closed Loop: Discover, Govern, Protect, Learn

**Type:** [Architecture](https://yomu.fyi/visual-explainers/category/architecture.md)

![A four-stage left-to-right diagram showing application security as a loop: discover and prioritize, govern access and agent behavior, protect at runtime, and investigate and learn, with a return arrow feeding findings back to the first stage.](https://yomufyi.s3.us-east-1.amazonaws.com/visual-explainers/541ff597-11f5-4205-928c-5c3951209a02/image-031332dd-28e1-4c29-9704-60ccc94e83d4.webp)

> Application security is a closed loop: discover and prioritize risk, govern access and agent behavior, protect at runtime, then investigate and feed findings back into the next cycle.

## Explanation

Application security is not a single control but a continuous architecture that links four stages: discover and prioritize risks, govern access and agent behavior, protect applications at runtime, and investigate, respond, and learn. Each stage feeds the next, and every investigation should harden the earlier layers rather than closing as a one-off ticket. Positive security controls that learn the expected shape of requests reduce reliance on known attack signatures, while runtime testing and threat intelligence keep those controls current. Engineers need this mental model because isolated alerts miss multi-step campaigns that chain vulnerabilities and credentials over weeks.

## FAQ

### Where do agent credentials fit into this loop?

Agents need scoped access tokens rather than long-lived static secrets, with credentials kept out of source control and the agent's write scope bounded. Human confirmation on changes outside that scope keeps agentic changes reviewable. Those constraints belong to the govern stage, but they only hold if runtime protection and investigation can detect when they are exceeded.

**Tags:** [Application Security](https://yomu.fyi/topic/application-security.md), [Least Privilege](https://yomu.fyi/topic/least-privilege.md), [Security](https://yomu.fyi/topic/security.md), [Threat Intelligence](https://yomu.fyi/topic/threat-intelligence.md), [Vulnerabilities](https://yomu.fyi/topic/vulnerabilities.md), [WAF](https://yomu.fyi/topic/waf.md)

## Related reading

### [Adaptive application security for the AI era: how Cloudflare connects code, traffic, and intelligence to stop attacks](https://yomu.fyi/post/adaptive-application-security-for-the-ai-era-how-cloudflare-connects-c.md)
- Company: [Cloudflare](https://yomu.fyi/company/cloudflare.md)
- Author: Christian Reilly
- Published: Sep 29, 2026
- Type: Announcement

An incident in July 2026 showed AI agents autonomously compromising OpenAI and Hugging Face infrastructure, chaining vulnerabilities and credentials over months before executing a final compromise in under 13 hours. Cloudflare argues that application security must become a continuous, connected system rather than isolated controls, because individual alerts miss the complete campaign. It introduces a four-stage framework: discover and prioritize risks, govern access and agent behavior, protect applications at runtime, and investigate, respond, and learn. New capabilities include LLM-based WAF penetration testing, expanded threat intelligence for all customers, automated positive security deployment, and an Autonomous Security Operation framework with three agent stages. Cloudflare’s network visibility across over 20% of the web enables correlating isolated signals into coordinated attack timelines, turning every investigation into stronger protection.


### [We tested our own WAF with frontier AI models. Here’s what we found](https://yomu.fyi/post/we-tested-our-own-waf-with-frontier-ai-models-here-s-what-we-found.md)
- Company: [Cloudflare](https://yomu.fyi/company/cloudflare.md)
- Author: Kuber Nandwani
- Published: Sep 29, 2026
- Type: Benchmark

Cloudflare built a WAF tester that uses frontier AI models to iteratively mutate attack payloads based on real-time response feedback. The tester, implemented in Python, orchestrates an LLM proposal and review loop against an authorized customer staging environment protected by Cloudflare’s WAF. It ran 45 scenarios across six attack categories—XSS, SQLi, CMDi, SSRF, path traversal/LFI, and Log4j—starting from known blocked exploits and varying encoding, request placement, or destination representation. The vast majority of 1,107 recorded attempts were blocked; the few non-blocked requests were triaged by humans and used to create new detections that harden security for all Cloudflare customers. The post stresses that a WAF bypass still needs an exploitable application to succeed, so patching software remains essential, and suggests combining Managed Rules, Attack Signature Detection, and positive security controls for defense in depth.


### [Introducing Threat Signals: agentic skills for open-source threat intelligence, free for every Cloudflare account](https://yomu.fyi/post/introducing-threat-signals-agentic-skills-for-open-source-threat-intel.md)
- Company: [Cloudflare](https://yomu.fyi/company/cloudflare.md)
- Author: Jacob Crisp
- Published: Sep 29, 2026
- Type: Announcement

Cloudflare introduced Threat Signals, a free agentic skill layer for open-source threat intelligence available to every account. The product targets the unstructured-reporting problem: converting research posts into indicators that security tools can consume while preserving the context that explains their relevance. A skill encodes detailed instructions that capture how an experienced analyst handles one part of the job, and it runs identically on every report. The agentic skills summarize reports, surface key context, extract and normalize indicators of compromise, and apply tags within a private, account-scoped dataset. This approach standardizes analyst expertise into repeatable, context-preserving processing for threat reports.


### [Is your domain using post-quantum encryption? Now you can see for yourself](https://yomu.fyi/post/is-your-domain-using-post-quantum-encryption-now-you-can-see-for-yours.md)
- Company: [Cloudflare](https://yomu.fyi/company/cloudflare.md)
- Author: Sharon Goldberg
- Published: Sep 29, 2026
- Type: Announcement

Cloudflare introduced new post-quantum cryptography visibility tools in its Application Security and Logs products, including Logpush, Log Explorer, and the HTTP Traffic Analytics dashboard, to help customers monitor encryption adoption. These tools surface the key exchange algorithm negotiated on every incoming request, enabling customers to audit their post-quantum posture, assess compliance, and identify cryptographic gaps across their domains. The primary post-quantum algorithm in TLS 1.3 is X25519MLKEM768, a hybrid of classical ECDHE over curve X25519 and the post-quantum ML-KEM, which provides belt-and-suspenders security against harvest-now-decrypt-later attacks. Cloudflare Radar data shows about 70% of browser-generated traffic uses post-quantum encryption on the visitor-to-Cloudflare connection, but only 15% of origin connections to Cloudflare use hybrid ML-KEM. For legacy origin servers that cannot support modern post-quantum cryptography, Cloudflare Tunnel can tunnel traffic over TLS 1.3 with X25519MLKEM768 without requiring any upgrade to the origin server itself.


### [Enforce positive security with Cloudflare Application Profiles](https://yomu.fyi/post/enforce-positive-security-with-cloudflare-application-profiles.md)
- Company: [Cloudflare](https://yomu.fyi/company/cloudflare.md)
- Author: Zhiyuan Zheng
- Published: Sep 29, 2026
- Type: Announcement

Cloudflare launches Application Profiles, a positive security feature that learns the expected structure of HTTP requests and identifies deviations. By analyzing path variables, query parameters, headers, cookies, and JSON body fields, the system builds a profile of valid data types, numeric ranges, string lengths, UUIDs, and enums. This approach reduces attack surface by blocking non-conforming requests without relying solely on known attack signatures, addressing the growing threat of AI-generated payloads. The feature extends Schema Learning and Schema Validation, previously available for APIs, to web applications. Profiles are automatically updated weekly as traffic changes. Customers can review violations in Security Analytics and create rules to enforce blocking, starting with observation mode; a closed beta is open to invited Enterprise customers without API Security.


### [Integrating Claude Code with Auth0 APIs](https://yomu.fyi/post/integrating-claude-code-with-auth0-apis.md)
- Company: [Auth0](https://yomu.fyi/company/auth0.md)
- Author: Manish Hatwalne
- Published: Sep 29, 2026
- Type: Tutorial

This tutorial explains how to integrate Claude Code with Auth0’s Management API using the Auth0 MCP Server, enabling AI-driven authentication configuration management from the terminal. The setup uses the OAuth 2.0 Device Authorization Flow to obtain scoped access tokens stored in the OS keychain, avoiding static secrets that risk exposure in source control. Developers initialize the MCP server with explicit scopes like read:clients or update:actions, then register it with Claude Code via the claude mcp add command, with credentials never stored in plain text. A CLAUDE.md file provides project context and constraints, guiding the agent to respect environment-specific configurations and security policies such as never modifying production callback URLs without confirmation. The tutorial demonstrates refactoring JWT validation code in a single terminal session, with human-in-the-loop confirmation ensuring safe agentic changes and all auth-critical paths undergoing manual PR review.
