Security Radar
The trigger for AWS Security Agent and AWS Continuum: a security headline from the outside world →
the exact line in your code → a validated patch delivered as a pull / merge request —
and, until that patch ships, a virtual patch at the edge with AWS WAF and Route 53 Resolver DNS Firewall.
中文说明
Preview notice. This sample calls AWS Continuum code scanning, which is in public preview. APIs and behaviour
may change. Use a non-production AWS account.
What's new in v1.6
Full list in CHANGELOG.md. A walkthrough deck: https://aws-samples.github.io/sample-security-radar/.
| Area |
What changed |
| Briefs |
Rewritten only when a fact the code decided changed (severity, exploitation, CVEs, amount): ~203 → ~10 a day on a 7-day replay |
| Summaries |
A brief sentence that contradicts the code's CVEs, exploitation or amount does not become the summary or the P0 notice line |
| Duplicate judge |
Candidates that can be duplicates only (51,404 → 599); quality measured without labelling — the labelled corpus and delayed truth — on #/ops |
| GitHub advisories |
A GHSA id is an identifier: a P0 is sent with it before a CVE exists, and the GHSA event is linked to the CVE's (global, repository and unreviewed advisories) |
| Sources |
VulnCheck, ProjectDiscovery, CERT/CC, ZDI advisories, GreyNoise, Tenable Research (225 in all) |
What it is
Attacks on exchanges and DeFi protocols move fast: hot-wallet key leaks and contract exploits are often used within
minutes of disclosure. AWS Security Agent and AWS Continuum can review code, prove exploitability and write patches —
but they do not know what just happened outside, which line of your code it touches, or when a paid scan is worth it.
Security Radar is the source of that chain. It tracks the outside security world — more than 200 public
sources: CISA KEV and CSAF advisories, the CVE List itself, vendor PSIRTs and CERTs, AWS security bulletins, security
and crypto media, Web3 incident databases, exchange announcement boards, public Telegram channel previews and WeChat
official-account feeds (an X source is available but off by default) — decides in code what is real and
what is urgent, and when an event matches your code it pulls the trigger:
- AWS Security Agent — the radar writes the event as a security requirement in the requirement pack, which your own
code reviews use (the radar starts no review per event by default, and a review never fixes on its own).
- AWS Continuum — the radar submits a finding pinned to the file and line and asks for validation; once Continuum
proves the issue exploitable it produces a patch and opens a native pull request (GitHub) or merge request (GitLab).
- A human reviews and merges.
Patching takes hours to days; exploitation of a fresh disclosure can take minutes. So the radar also mitigates what
it located, on resources it owns, in a non-blocking mode until a human promotes it (see Fast path below).
What it looks like
The wall (#/wall): radar sweep of the last 24 h, the live feed, what needs a human now, Web3 losses by protocol and chain.
Captured from the author's deployment on 2026-10-28, before v1.2.0 (UI text is Chinese; every page also has a light theme).
| Home — posture, NOW, lifecycle | Web3 incidents |
 |  |
| Event detail — in your environment: located to the line, Security Agent + Continuum timeline | Sources — health of every collector |
 |  |
Key mechanisms
| Mechanism |
What it means |
| Decisions in code, not in an LLM |
De-duplication, independent-source counting, verification level V0–V4, severity P0–P2, version comparison and IOC matching are deterministic code. An LLM (Amazon Bedrock) only writes sentences, each with citations that code checks (citation exists, every number appears in the cited text). |
| Located to the line |
A pinned vulnerable version or an IOC (address, key) found in your repository becomes a finding with file and line, e.g. Dockerfile:1, composer.json:8, .gitlab-ci.yml:2. When the version cannot be compared, the radar says so and leaves it to Security Agent. |
| On-chain evidence |
For Web3 incidents the attack transaction is checked on a public RPC node (eth_getTransactionReceipt); a successful transaction raises the event to corroborated. Young incidents are reconstructed from public JSON-RPC (ERC-20 outflows, issuer freezes), and each verified attack transaction is broken down per token. |
| Clustering that is measured |
One incident, many reports: reports are merged by hard links (CVE, transaction, cited article) and by the victim's name — a name is evidence for the event it names, not for every event whose coverage mentions it. A single misplaced report can be moved (scripts/move_item.py) and stays where it was put. |
| It reports its own mistakes |
An event that changes shape within one cycle, a station that fails every run or stopped running, a source that is not collected or went quiet are items on the ops page; five Amazon CloudWatch alarms notify the owner through Amazon SNS. Published → held and became P0 → push latency are measured every cycle. |
| One response decision table |
Every response action (review, finding, scan, patch delivery, notification, mitigation) is decided by one table in code; each event page shows the outcome, the reason code and the time, and "not evaluated" looks unlike "not fired". |
| Three code hosts, one chain |
Each target lives in exactly one Continuum environment: S3 (patch artifacts), GitHub (native PRs) or GitLab (native MRs). Adding a host is one row in respond.REPO_CHANNELS, one adapter in scripts/sync-fleet.py and one integration. |
| Cost guardrails |
A scan is requested only to validate radar findings that were submitted successfully, at most once per environment per 24 h, with scheduled scans off. A daily budget line is flagged on the ops page, never silently enforced. |
| Operator view |
Daily 08:00 HKT digest (code picks and counts, the LLM writes cited sentences), advisory "possible duplicate" hints, an ops page listing what needs a human, search over every event ever published, and an exchange announcement board. |
| Notifications |
Subscriptions per channel (Slack channel / DM, Lark chat / DM, a signed webhook) with filters and message kinds, sent by their own station after Publish; Atom / JSON feeds of the published events. Configure with scripts/set-notify.sh, or let a token client register its own webhook (below). |
Fast path: mitigate until the patch ships
A mitigate station runs after the respond step. It acts only on targets the radar or the AWS agents found affected
and only writes resources the radar created (IAM scopes every write to them). A mitigation is not a fix — every
surface says so.
| Channel |
Where the plan comes from (code) |
What the radar does |
What a human does |
| AWS WAF |
The AWS Managed Rules changelog parsed into CVE → rule group / rules / minimum version; then the product (PHP, WordPress); then the weakness class (CWE — advisory only) |
Adds the managed rule group to the radar's web ACL with the rules in Count, and checks it (group overridden to Count? pinned to a version that predates the CVE?) |
scripts/promote.py waf … to Block — the promotion records the rules it approves, and the rule keeps blocking exactly those; what later events add stays in Count and is reported. The radar never demotes |
| Route 53 Resolver DNS Firewall |
Domain indicators written in defanged form in the evidence (evil[.]com) + the AWS-managed threat lists; major platforms are never blocked |
Writes the radar's domain list; rules in ALERT |
promote.py dns … to BLOCK — an approved rule keeps its approved domains; later ones wait in ALERT |
| Amazon Inspector |
Target lockfiles → CycloneDX SBOM → ScanSbom (stateless, nothing enabled in the account, at most once per target per day) |
Per-target dependency baseline; intersects event CVEs with it |
Upgrade through the PR / MR channel |
| AWS Security Hub (opt-in) |
One ASFF finding per event × affected target, with the fix version and every mitigation's state |
Imports on change, archives when no longer affected |
Triage next to GuardDuty / Inspector findings |
For each event the radar also builds a WAF rule pack: custom rules taken from verbatim features of a pinned
nuclei template or of an evidence sentence, checked by an offline matcher, with the capacity read from the read-only
CheckCapacity call, rendered as wafv2 JSON, CloudFormation, Terraform and AWS CLI text for a human to apply — the
radar does not apply a rule pack itself.
Inspector judges language packages, not runtimes (a PHP or Node.js version pin is judged by the radar's own product
registry). End-to-end checks: scripts/waf-e2e.py, scripts/dns-e2e.py, scripts/securityhub-check.py.
Agent access and subscriptions
The UI stays read-only. Agents and scripts read the same published documents through a token-gated API; the only
write it offers is a subscriber's own webhook rows.
- Token. The operator issues one Amazon Cognito app client per consumer (client-credentials grant, scope
radar/read, one-hour tokens) and hands over the 0600 file it writes — the secret is never printed:
AWS_PROFILE=<profile> uv run python scripts/radar-token.py create <name> [--subscribe]
AWS_PROFILE=<profile> uv run python scripts/radar-token.py list
AWS_PROFILE=<profile> uv run python scripts/radar-token.py revoke <name> --yes
AWS_PROFILE=<profile> uv run python scripts/radar-token.py usage --days 7 # who read how much
The file holds RADAR_URL, RADAR_TOKEN_URL (https://<domain-prefix>.auth.<region>.amazoncognito.com/oauth2/token,
stack output ApiTokenUrl), RADAR_CLIENT_ID and RADAR_CLIENT_SECRET. A revoked client gets no new token; one it
holds expires within the hour.
- What it reads.
GET <site>/api/data/* — CloudFront sends /api/* to an Amazon API Gateway REST API whose
Cognito authorizer checks signature, expiry and scope; one Lambda reads data/* of the site bucket. Every document
is listed in ui/public/llms.txt and described by schemas/site-data.schema.json.