
Weekend Agent Challenge: QuantumCryptoGuardAgent
An autonomous, event-driven security agent built with AWS Lambda, Amazon Bedrock (Nova Micro), and Amazon SNS that continuously audits GitHub repositories for quantum-vulnerable cryptography and generates NIST PQC migration roadmaps.
Vision & What the Agent Does
We are rapidly approaching a monumental transition point in digital security: the advent of Cryptographically Relevant Quantum Computers (CRQCs). Classical public-key cryptography - the foundation of modern internet security, secure key exchanges, and digital signatures - relies on mathematical problems like integer factorization and discrete logarithms. Under Shor's algorithm, a sufficiently powerful quantum computer will solve these problems in polynomial time, completely compromising RSA, Elliptic Curve Diffie-Hellman (ECDH), and ECDSA algorithms.
Simultaneously, symmetric encryption and hashing algorithms are impacted by Grover's algorithm, which provides a quadratic speedup for unstructured search. This effectively halves the operational security margin of symmetric ciphers (e.g., reducing AES-128 to a vulnerable 64 bits of security, whereas AES-256 retains 128 bits of quantum resistance).
+-----------------------------------------------------------------------------------+| THE QUANTUM THREAT MATRIX |+--------------------------+---------------------------------+----------------------+| Cryptographic Category | Quantum Threat Algorithm | Impacted Standards |+--------------------------+---------------------------------+----------------------+| Asymmetric / Public Key | Shor's Algorithm (Polynomial) | RSA, ECDH, ECDSA || Symmetric Ciphers | Grover's Algorithm (Quadratic) | AES-128, 3DES, DES || Hash Functions | Grover's / Pre-image Attacks | MD5, SHA-1 |+--------------------------+---------------------------------+----------------------+ The immediate danger today is not merely future decryption - it is the "Harvest Now, Decrypt Later" (HNDL) attack vector. Threat actors are actively intercepting, harvesting, and storing encrypted enterprise payloads, proprietary codebases, and sensitive communications today. When quantum hardware reaches fault-tolerant scale, harvested historical data will be decrypted retroactively.
To solve this challenge proactively, QuantumCryptoGuardAgent was built as an autonomous, "always-on" security guard. Designed to run completely unattended while developers and security teams are offline, the agent:
- Wakes up on an automated schedule managed by Amazon EventBridge Scheduler.
- Recursively traverses target GitHub repositories via authenticated API pipelines.
- Inspects source code across multiple programming languages for legacy cryptographic primitives.
- Evaluates quantum threat profiles using Amazon Bedrock Nova Micro against the latest NIST Post-Quantum Cryptography (PQC) standards (FIPS 203, FIPS 204, and FIPS 205).
- Generates and dispatches a consolidated executive briefing directly to security leads via Amazon SNS.
Instead of relying on human developers to remember to run static code analyzers or manually inspect dependencies, the agent acts as a persistent background sentinel. You wake up every morning with a complete, actionable cryptographic posture audit waiting in your inbox.
AWS Services Used / Architecture Overview
The solution leverages a fully serverless, highly scalable AWS architecture designed for low latency, zero maintenance, and minimal cost:

Comprehensive Service Breakdown:
- Amazon EventBridge Scheduler: Serves as the agent's autonomous heartbeat. It executes a scheduled trigger to invoke the AWS Lambda function automatically without requiring any human initiation or web console button clicks.
- AWS Lambda: Acts as the central orchestration engine. It securely reads runtime parameters (
GIT_PAT,REPO_LIST,SNS_TOPIC_ARN) from environment variables, queries GitHub's API REST endpoints, aggregates multi-repository code samples, invokes Amazon Bedrock, and formats the output for publication.
- Amazon Bedrock (Nova Micro Model): Functions as the AI cryptographic analyst. By utilizing Bedrock's high-performance Converse API, Nova Micro analyzes raw code structures, identifies cryptographic primitives, classifies quantum risks, and maps migration paths to NIST standards.
- Amazon SNS (Simple Notification Service): Provides the delivery layer. It receives the final structured markdown brief generated by Amazon Bedrock and immediately publishes it to an active email subscription topic.
How I Built It
- Ingestion & Multi-Repository Traversal Strategy
Scanning multiple repositories dynamically inside a serverless environment presents strict execution time constraints. To optimize throughput and prevent AWS Lambda timeouts, the agent uses GitHub's recursive Git Trees REST API endpoint (
/git/trees/{branch}?recursive=1). Instead of cloning heavy Git trees or pulling binary files, the agent discovers all source files (.py,.js,.ts,.java,.go,.c,.cpp,.cs) in a single HTTP request per repository. It then filters and downloads content blobs sequentially, extracting functional cryptographic code blocks while ignoring non-executable asset files.
- Multi-Tier Testbed Environment To rigorously evaluate the classification accuracy of the Bedrock reasoning model, I constructed three dedicated testbed repositories representing different stages of enterprise cryptographic maturity:
-
crypto-symmetric(Classical Symmetric Testbed): Contains code implementations using DES, 3DES, AES-128 (ECB mode), and legacy hashing algorithms (MD5, SHA-1). This validates the agent's ability to flag algorithms that are either broken classically or severely degraded by Grover's algorithm.
-
crypto-asymmetric(Classical Asymmetric Testbed): Contains legacy public-key algorithms including RSA-1024, RSA-2048, ECDH (P-256), and ECDSA signatures. This verifies detection of primitives susceptible to complete key recovery or signature forgery via Shor's algorithm.
-
crypto-pqc(Quantum-Safe Control Reference): Contains standard implementations of NIST FIPS 203 (ML-KEM-768), FIPS 204 (ML-DSA-65), and hybrid key encapsulation mechanisms (ECDH + ML-KEM via HKDF). This ensures the agent recognizes compliant post-quantum implementations without raising false positives.
- Prompt Engineering for Amazon Bedrock Nova Micro To ensure consistent, high-precision security output from Amazon Bedrock Nova Micro, the input prompt enforces a structured three-tier audit schema:
- Executive Summary: A high-level qualitative assessment of the enterprise's overall cryptographic health across all audited repositories.
- Per-Repository Cryptographic Findings: Explicit classification of every identified cipher into one of three risk categories:
- Vulnerable to Shor's Algorithm (High Priority)
- Impacted by Grover's Algorithm (Medium Priority)
- Quantum-Resistant / NIST Compliant (Low / No Risk)
- Consolidated NIST PQC Action Plan: Prioritized remediation guidance recommending transitions to:
- NIST FIPS 203 (ML-KEM): For general encryption and key exchange.
- NIST FIPS 204 (ML-DSA): For lattice-based digital signatures.
- NIST FIPS 205 (SLH-DSA): For stateless hash-based backup signatures.
Key Challenges & Solutions
- Context Window & Payload Optimization: Attempting to feed entire repository trees into an LLM can result in high token costs or context truncation.
- Solution: The agent extracts lines surrounding key cryptographic keywords (
crypto,rsa,ecdh,aes,hashlib,pqc,kyber,dilithium) and caps single-file payload sizes before invoking Bedrock.
- Unattended Execution Reliability: Unattended background agents must handle external network failures gracefully.
- Solution: Built-in HTTP retry wrappers and exception handling ensure that if an individual repository API call fails, the error is logged inline while allowing the agent to complete the audit for all remaining repositories.
What did I Learn
- Event-Driven Security Automation: Combining Amazon EventBridge Scheduler with AWS Lambda unlocks a true "set-and-forget" pattern. Security posture monitoring shifts from a reactive manual task to a continuous background discipline.
- Cost-Effective AI with Amazon Bedrock Nova Micro: Highly specialized reasoning tasks do not always require massive foundation models. Amazon Bedrock Nova Micro provided extremely fast response times and precise code analysis at a fraction of the cost.
- Operationalizing NIST PQC Standards: Implementing this project deepened my practical understanding of NIST's new standards - FIPS 203 (ML-KEM), FIPS 204 (ML-DSA), and FIPS 205 (SLH-DSA) - and reinforced the importance of planning migration roadmaps before legacy algorithms are exploited.
Link to App or Repo
Visual Proofs:
Amazon EventBridge Scheduler configured for autonomous execution

Consolidated Post-Quantum security audit briefing delivered automatically via Amazon SNS

Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article