Atris

Rank scan findings by written rule.
Done by an agent. Checked twice.

One ranked list of scan findings with a priority, a due date and an overdue flag, set by the company's written rule.

Have Atris do this for you›

1

Real files in

  • hosts.csv
    Host list of 13 servers with exposure and whether each holds customer data. Two hosts in the scan are missing from it. 14 lines, 656 bytes.
  • known_exploited.csv
    The United States government's Known Exploited Vulnerabilities catalog, version 2026.11.30, trimmed to 30 of its 1,810 entries and 7 of its columns. 31 lines, 4 KB.
  • ranking_rule.md
    The written rule for ranking findings: four priorities, days allowed and what to do with unlisted hosts, missing scores and repeats. 32 lines, 2 KB.
  • scan_export.csv
    49 findings from a scan of 15 hosts. Hosts, dates and findings with no CVE are invented. The CVE ids are real and their scores were copied from the United States National Vulnerability Database on 2026-12-01. 50 lines, 4 KB.

A mix of real public documents and sample data. Each file says which.

2

Three steps

  1. 1.Read the scan and the rule
  2. 2.Rank every finding
  3. 3.Write the ranked list

Claude Sonnet 5.5, 46 seconds. No web. It never saw the check.

3

Checked twice

  • ✓Passed: 47 of 47 findings left after dropping 2 repeats appear once in ranked_findings.csv
  • ✓Passed: 47 of 47 findings carry the right host, weakness id, score, exposure and known exploited flag
  • ✓Passed: 47 of 47 priorities equal the priority the written rule gives
  • ✓Passed: 47 of 47 due dates and overdue flags equal the ones recomputed from the first seen dates
  • ✓Passed: 47 of 47 findings sit at the rank the written order gives
  • ✓Passed: 5 of 5 counts in summary.md equal the recomputed counts (four priorities and overdue)
  • ✓Passed: summary.md names 10 of 10 P1 findings, 2 of 2 hosts missing from the host list, 2 of 2 dropped repeats and 2 of 2 findings with no score
  • ✓Passed: 10 of 10 P1 findings are listed in summary.md on a line with their own host, title, due date and overdue flag
  • ✓Passed: 20 of 20 other numbers and dates in summary.md match the scan, the written rule or the ranked list

Second review by Claude Opus 5.5: pass.

Then we broke a copy of the output 6 ways on purpose. The check caught 6.

What it wrote. Lines 7 to 20 of summary.md, copied from the file.
## P1 findings

| Finding | Host | Title | Due date | Overdue |
|---|---|---|---|---|
| F-031 | web-01 | Remote code execution in Java logging library | 2026-11-25 | yes |
| F-007 | web-02 | Remote code execution in Java web framework | 2026-11-25 | yes |
| F-011 | vpn-01 | Path traversal in SSL VPN web portal | 2026-11-30 | no |
| F-018 | transfer-01 | SQL injection in file transfer application | 2026-12-03 | no |
| F-006 | web-02 | Remote code execution in SSH agent forwarding | 2026-12-04 | no |
| F-014 | mail-gw-01 | Server side request forgery in mail server | 2026-10-09 | yes |
| F-022 | test-web-9 | Default administrator password in use | 2026-11-27 | yes |
| F-021 | kiosk-03 | Remote code execution in SMBv1 file sharing | 2026-12-05 | no |
| F-005 | web-01 | HTTP/2 rapid reset denial of service | 2026-11-17 | yes |
| F-023 | test-web-9 | Memory disclosure in TLS heartbeat | 2026-11-27 | yes |

How this was run

An AI agent on Claude Sonnet 5.5 was given a folder with the files below and a three-step flow, and nothing else. It had no web access and never saw the check. The check was written before the run and made stricter after it. It works the answer out again from the input files. Then Claude Opus 5.5 reviewed the result against the inputs. Some input files are real public documents and some are sample data written by Atris. Each file says which.

Run 1 of 1 on 1 December 2026. The agent took 46 seconds.

What the second review verified

  • I re-applied the written rule to all 49 scan rows on my own and got the same 47 ranked rows. Every rank, score, exposure, known_exploited flag, priority, due date and overdue value matches output/ranked_findings.csv.
  • Repeats: F-001 is dropped and F-031 kept, because F-031 was first seen earlier (2026-11-18 vs 2026-11-25). F-045 (FILES-01) is dropped and F-026 kept, because both were first seen 2026-11-12 and F-026 is the lower id. F-008/F-009 are rightly both kept because they are on different ports (22 and 2222), and so are F-033/F-008 because they are on different hosts.
  • The counts in summary.md (P1: 10, P2: 15, P3: 13, P4: 9, overdue: 23) equal my recount of the CSV. The P1 table lists the same 10 findings with the correct titles and due dates. For example, F-014 was first seen 2026-10-02, so with 7 days it was due 2026-10-09 and is overdue.
  • kiosk-03 and test-web-9 are correctly treated as internet-facing with customer data, and F-017 and F-047 correctly get the 7.0 stand-in score. F-005 (CVE-2023-44487) and F-024 (CVE-2020-1472) are rightly marked known exploited, since both are in known_exploited.csv.

What this run does not show

  • The scan rows are sample data built around real public weakness ids and scores, so no real scanner export was used.
  • The known exploited list is a 30 row excerpt of the public catalog, so a weakness missing from the excerpt counts as not known exploited here.
  • The check applies the same written rule as the worker and cannot say whether the rule itself is a good one.

Would the check catch a wrong answer?

A check that cannot fail proves nothing. After the run we took a copy of the output, broke it one small way at a time and ran the check again. It caught 6 of 6. The check was made stricter after the first try at this, and the same untouched output was graded again.

Open every file

flow.md · the three steps the agent followed
# Rank scan findings by written rule

function: it
for: the IT manager who decides what gets fixed first
goal: Every finding from the scan has a priority, a due date and a place in one ranked list, set by the company's written rule and nothing else.

## 1. Read the scan and the rule
Read input/ranking_rule.md, input/scan_export.csv, input/hosts.csv and input/known_exploited.csv.
The rule says how a finding gets its priority, how many days the fix may take, and what to do with
hosts that are not on the host list, findings with no score and findings reported twice. Follow it
exactly. A CVE is known exploited only when it is listed in known_exploited.csv. Do not add what
you know about a weakness from anywhere else.

## 2. Rank every finding
First drop repeats the way the rule says. For each finding that is left work out:
- score: the cvss column, or the stand-in the rule gives when it is blank.
- exposure: `internet` or `internal`, from the host list or from the rule for unlisted hosts.
- known_exploited: `yes` or `no`.
- priority, due_date and overdue (`yes` or `no`) as the rule defines them.
Sort the findings in the order the rule gives and number them 1, 2, 3 and so on.

## 3. Write the ranked list
Write output/ranked_findings.csv with columns
rank,finding_id,host,cve,score,exposure,known_exploited,priority,due_date,overdue. One row per
finding that is left, in rank order. host is in small letters. score has one decimal. due_date is
written YYYY-MM-DD.
Write output/summary.md for the IT manager. Start with five lines in the form `name: count` for
P1, P2, P3, P4 and overdue. Then list every P1 finding with its finding id, host, title, due date
and whether it is overdue. Then list the hosts in the scan that are not on the host list, the
findings that had no score and the stand-in used, and each finding id dropped as a repeat with the
finding id that was kept in its place.

## Done looks like
- Every finding is either in ranked_findings.csv once or named in summary.md as a dropped repeat.
- Every priority and due date can be traced to a line of the written rule.
- The five counts in summary.md equal the counts in ranked_findings.csv.
input/hosts.csv · 14 lines, 656 bytes
host,role,exposure,holds_customer_data,owner
web-01,Online store web server,internet,no,Engineering
web-02,Online store web server,internet,no,Engineering
shop-db-01,Online store database,internal,yes,Engineering
mail-gw-01,Mail gateway,internet,no,IT
vpn-01,Remote access gateway,internet,no,IT
transfer-01,Partner file transfer,internet,yes,Sales
files-01,Office file server,internal,yes,IT
dc-01,Directory server,internal,no,IT
print-01,Print server,internal,no,IT
build-01,Build server,internal,no,Engineering
erp-01,Orders and stock system,internal,yes,Operations
backup-01,Backup server,internal,yes,IT
wifi-ctl-01,Wireless controller,internal,no,IT
input/known_exploited.csv · 31 lines, 4 KB
cveID,vendorProject,product,vulnerabilityName,dateAdded,dueDate,knownRansomwareCampaignUse
CVE-2014-0160,OpenSSL,OpenSSL,OpenSSL Information Disclosure Vulnerability,2022-05-04,2022-05-25,Unknown
CVE-2017-0144,Microsoft,SMBv1,Microsoft SMBv1 Remote Code Execution Vulnerability,2022-02-10,2022-08-10,Known
CVE-2018-13379,Fortinet,FortiOS,Fortinet FortiOS SSL VPN Path Traversal Vulnerability,2021-11-03,2022-05-03,Known
CVE-2019-0708,Microsoft,Remote Desktop Services,Microsoft Remote Desktop Services Remote Code Execution Vulnerability,2021-11-03,2022-05-03,Known
CVE-2019-11043,PHP,FastCGI Process Manager (FPM),PHP FastCGI Process Manager (FPM) Buffer Overflow Vulnerability,2022-03-25,2022-04-15,Known
CVE-2020-0796,Microsoft,SMBv3,Microsoft SMBv3 Remote Code Execution Vulnerability,2022-02-10,2022-08-10,Known
CVE-2020-1472,Microsoft,Netlogon,Microsoft Netlogon Privilege Escalation Vulnerability,2021-11-03,2022-05-03,Known
CVE-2021-3156,Sudo,Sudo,Sudo Heap-Based Buffer Overflow Vulnerability,2022-04-06,2022-04-27,Unknown
CVE-2021-26855,Microsoft,Exchange Server,Microsoft Exchange Server Remote Code Execution Vulnerability,2021-11-03,2022-05-03,Known
CVE-2021-34527,Microsoft,Windows,Microsoft Windows Print Spooler Remote Code Execution Vulnerability,2021-11-03,2022-05-03,Known
CVE-2021-44228,Apache,Log4j2,Apache Log4j2 Remote Code Execution Vulnerability,2021-12-10,2021-12-24,Known
CVE-2022-22965,VMware,Spring Framework,Spring Framework JDK 9+ Remote Code Execution Vulnerability,2022-04-04,2022-04-25,Unknown
CVE-2023-4966,Citrix,NetScaler ADC and NetScaler Gateway,Citrix NetScaler ADC and NetScaler Gateway Buffer Overflow Vulnerability,2023-10-18,2023-11-08,Known
CVE-2023-25915,Danfoss,AK-SM 800A Series,Danfoss AK-SM 800A Series Improper Input Validation Vulnerability,2026-11-25,2026-11-28,Unknown
CVE-2023-34362,Progress,MOVEit Transfer,Progress MOVEit Transfer SQL Injection Vulnerability,2023-06-02,2023-06-23,Known
CVE-2023-44487,IETF,HTTP/2,HTTP/2 Rapid Reset Attack Vulnerability,2023-10-10,2023-10-31,Unknown
CVE-2024-3400,Palo Alto Networks,PAN-OS,Palo Alto Networks PAN-OS Command Injection Vulnerability,2024-04-12,2024-04-19,Known
CVE-2025-41450,Danfoss,AK-SM 800A Series,Danfoss AK-SM 800A Series Improper Authentication Vulnerability,2026-11-25,2026-12-09,Unknown
CVE-2026-61500,Rejetto,HTTP File Server (HFS),Rejetto HTTP File Server (HFS) Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) Vulnerability,2026-11-30,2026-12-03,Unknown
CVE-2026-103406,Hewlett Packard Enterprise (HPE),Juniper Session Smart Conductor and Session Smart Router,Hewlett Packard Enterprise (HPE) Juniper Session Smart Conductor and Session Smart Router OS Command Injection Vulnerability,2026-11-25,2026-11-28,Unknown
CVE-2026-120705,OSGeo,GeoServer,OSGeo GeoServer XML Injection Vulnerability,2026-11-27,2026-11-30,Unknown
CVE-2026-125160,TYPO3,TYPO3 CMS,TYPO3 CMS Information Disclosure Vulnerability,2026-11-30,2026-12-14,Unknown
CVE-2026-129243,OSGeo,GeoServer,OSGeo GeoServer Incorrect Authorization Vulnerability,2026-11-27,2026-11-30,Unknown
CVE-2026-133275,Mitel,MiCollab,Mitel MiCollab Unrestricted Upload of File with Dangerous Type Vulnerability,2026-11-25,2026-11-28,Unknown
CVE-2026-133303,Mitel,MiCollab,Mitel MiCollab XML Injection Vulnerability,2026-11-25,2026-11-28,Unknown
CVE-2026-133311,Mitel,MiCollab,Mitel MiCollab Weak Authentication Vulnerability,2026-11-25,2026-12-09,Unknown
CVE-2026-133323,Mitel,MiCollab,Mitel MiCollab OS Command Injection Vulnerability,2026-11-25,2026-11-28,Unknown
CVE-2026-133324,Mitel,MiCollab,Mitel MiCollab Not Failing Securely Vulnerability,2026-11-25,2026-11-28,Unknown
CVE-2026-133469,Vates,Xen Orchestra,Vates Xen Orchestra Improper Validation of Specified Type of Input Vulnerability,2026-11-25,2026-11-28,Unknown
CVE-2026-136716,Drupal,Core,Drupal Core Improper Check for Unusual or Exceptional Conditions Vulnerability,2026-11-27,2026-11-30,Unknown
input/ranking_rule.md · 32 lines, 2 KB
# Larkmoor Outfitters: how we rank scan findings

Scan date: 2026-11-30

## Priority

Work down this list and stop at the first line that fits.

- P1, fix within 7 days. The CVE is on the known exploited list and the host faces the internet.
  Or the score is 9.0 or higher and the host faces the internet.
- P2, fix within 30 days. The CVE is on the known exploited list, on any host. Or the score is 7.0
  or higher and the host faces the internet. Or the score is 9.0 or higher and the host holds
  customer data.
- P3, fix within 90 days. The score is 7.0 or higher. Or the score is 4.0 or higher and the host
  faces the internet.
- P4, fix within 180 days. Everything else.

A host faces the internet when the host list says its exposure is internet.

## Details

1. Host names match ignoring capital letters.
2. A host that is not on the host list is treated as facing the internet and as holding customer
   data until someone proves otherwise.
3. A finding with no score is given a score of 7.0 until someone scores it.
4. The same CVE on the same host and the same port reported twice is one finding. Keep the row
   with the earlier first seen date. If the dates are equal keep the lower finding id. Findings
   with no CVE are never treated as repeats of each other.
5. The clock starts on the first seen date. The due date is the first seen date plus the days
   allowed for the priority. A finding is overdue when its due date is before the scan date.
6. Order of the ranked list: priority first (P1 at the top), then higher score first, then
   earlier first seen date, then finding id.
input/scan_export.csv · 50 lines, 4 KB
finding_id,host,port,title,cve,cvss,first_seen
F-001,web-01,443,Remote code execution in Java logging library,CVE-2021-44228,10.0,2026-11-25
F-002,web-01,443,Denial of service in TLS library certificate parsing,CVE-2022-0778,7.5,2026-10-31
F-003,web-01,22,SSH prefix truncation weakness,CVE-2023-48795,5.9,2026-09-14
F-004,web-01,443,Weak Diffie-Hellman key exchange supported,CVE-2015-4000,3.7,2026-06-08
F-005,WEB-01,443,HTTP/2 rapid reset denial of service,CVE-2023-44487,7.5,2026-11-10
F-006,web-02,22,Remote code execution in SSH agent forwarding,CVE-2023-38408,9.8,2026-11-27
F-007,web-02,443,Remote code execution in Java web framework,CVE-2022-22965,9.8,2026-11-18
F-008,web-02,22,Race condition in SSH server signal handling,CVE-2024-6387,8.1,2026-10-15
F-009,web-02,2222,Race condition in SSH server signal handling,CVE-2024-6387,8.1,2026-11-05
F-010,web-02,443,Denial of service in TLS renegotiation,CVE-2021-3449,5.9,2026-08-03
F-011,vpn-01,443,Path traversal in SSL VPN web portal,CVE-2018-13379,9.8,2026-11-23
F-012,vpn-01,443,TLS certificate signed with a weak hash,,7.0,2026-11-02
F-013,vpn-01,22,Command injection through SSH host name,CVE-2023-51385,6.5,2026-07-20
F-014,mail-gw-01,443,Server side request forgery in mail server,CVE-2021-26855,9.1,2026-10-02
F-015,mail-gw-01,25,Weak 64 bit block cipher supported,CVE-2016-2183,7.5,2026-11-09
F-016,mail-gw-01,25,Weak RC4 cipher supported,CVE-2013-2566,5.9,2026-11-09
F-017,mail-gw-01,443,Operating system version no longer supported,,,2026-10-12
F-018,transfer-01,443,SQL injection in file transfer application,CVE-2023-34362,9.8,2026-11-26
F-019,transfer-01,443,TLS 1.0 enabled,,4.0,2026-08-24
F-020,transfer-01,443,Web security headers missing,,3.9,2026-08-24
F-021,kiosk-03,445,Remote code execution in SMBv1 file sharing,CVE-2017-0144,8.8,2026-11-28
F-022,test-web-9,8080,Default administrator password in use,,9.0,2026-11-20
F-023,test-web-9,443,Memory disclosure in TLS heartbeat,CVE-2014-0160,7.5,2026-11-20
F-024,dc-01,445,Privilege escalation in domain logon protocol,CVE-2020-1472,5.5,2026-10-20
F-025,dc-01,445,SMB signing not required,,5.3,2026-05-11
F-026,files-01,445,Remote code execution in SMBv1 file sharing,CVE-2017-0144,8.8,2026-11-12
F-027,files-01,445,Remote code execution in SMBv3 compression,CVE-2020-0796,10.0,2026-11-12
F-028,files-01,443,Default administrator password on storage web page,,8.9,2026-09-28
F-029,print-01,445,Remote code execution in print spooler,CVE-2021-34527,8.8,2026-09-01
F-030,print-01,161,Default SNMP community name,,6.9,2026-04-13
F-031,web-01,443,Remote code execution in Java logging library,CVE-2021-44228,10.0,2026-11-18
F-032,build-01,22,Local privilege escalation in sudo,CVE-2021-3156,7.8,2026-11-03
F-033,build-01,22,Race condition in SSH server signal handling,CVE-2024-6387,8.1,2026-10-15
F-034,build-01,443,Type confusion in TLS library address handling,CVE-2023-0286,7.4,2026-07-06
F-035,build-01,22,Malicious code in compression library release,CVE-2024-3094,10.0,2026-08-31
F-036,build-01,8443,Self-signed certificate,,4.8,2026-03-02
F-037,shop-db-01,22,Malicious code in compression library release,CVE-2024-3094,10.0,2026-11-21
F-038,shop-db-01,5432,Database accepts connections without encryption,,7.4,2026-09-07
F-039,erp-01,3389,Remote code execution in remote desktop service,CVE-2019-0708,9.8,2026-10-26
F-040,erp-01,443,Buffer overflow in TLS library certificate name check,CVE-2022-3602,7.5,2026-08-17
F-041,erp-01,443,Denial of service in TLS renegotiation,CVE-2021-3449,5.9,2026-08-17
F-042,backup-01,22,Remote code execution in SSH agent forwarding,CVE-2023-38408,9.8,2026-11-16
F-043,backup-01,22,Command injection through SSH host name,CVE-2023-51385,6.5,2026-07-20
F-044,backup-01,22,SSH prefix truncation weakness,CVE-2023-48795,5.9,2026-05-25
F-045,FILES-01,445,Remote code execution in SMBv1 file sharing,CVE-2017-0144,8.8,2026-11-12
F-046,wifi-ctl-01,443,Denial of service in TLS library certificate parsing,CVE-2022-0778,7.5,2026-06-22
F-047,wifi-ctl-01,443,Firmware version no longer supported,,,2026-09-21
F-048,wifi-ctl-01,23,Telnet service enabled,,6.5,2026-02-09
F-049,erp-01,22,Local privilege escalation in sudo,CVE-2021-3156,7.8,2026-11-24
output/ranked_findings.csv · written by the agent, 48 lines
rank,finding_id,host,cve,score,exposure,known_exploited,priority,due_date,overdue
1,F-031,web-01,CVE-2021-44228,10.0,internet,yes,P1,2026-11-25,yes
2,F-007,web-02,CVE-2022-22965,9.8,internet,yes,P1,2026-11-25,yes
3,F-011,vpn-01,CVE-2018-13379,9.8,internet,yes,P1,2026-11-30,no
4,F-018,transfer-01,CVE-2023-34362,9.8,internet,yes,P1,2026-12-03,no
5,F-006,web-02,CVE-2023-38408,9.8,internet,no,P1,2026-12-04,no
6,F-014,mail-gw-01,CVE-2021-26855,9.1,internet,yes,P1,2026-10-09,yes
7,F-022,test-web-9,,9.0,internet,no,P1,2026-11-27,yes
8,F-021,kiosk-03,CVE-2017-0144,8.8,internet,yes,P1,2026-12-05,no
9,F-005,web-01,CVE-2023-44487,7.5,internet,yes,P1,2026-11-17,yes
10,F-023,test-web-9,CVE-2014-0160,7.5,internet,yes,P1,2026-11-27,yes
11,F-027,files-01,CVE-2020-0796,10.0,internal,yes,P2,2026-12-12,no
12,F-037,shop-db-01,CVE-2024-3094,10.0,internal,no,P2,2026-12-21,no
13,F-039,erp-01,CVE-2019-0708,9.8,internal,yes,P2,2026-11-25,yes
14,F-042,backup-01,CVE-2023-38408,9.8,internal,no,P2,2026-12-16,no
15,F-029,print-01,CVE-2021-34527,8.8,internal,yes,P2,2026-10-01,yes
16,F-026,files-01,CVE-2017-0144,8.8,internal,yes,P2,2026-12-12,no
17,F-008,web-02,CVE-2024-6387,8.1,internet,no,P2,2026-11-14,yes
18,F-009,web-02,CVE-2024-6387,8.1,internet,no,P2,2026-12-05,no
19,F-032,build-01,CVE-2021-3156,7.8,internal,yes,P2,2026-12-03,no
20,F-049,erp-01,CVE-2021-3156,7.8,internal,yes,P2,2026-12-24,no
21,F-002,web-01,CVE-2022-0778,7.5,internet,no,P2,2026-11-30,no
22,F-015,mail-gw-01,CVE-2016-2183,7.5,internet,no,P2,2026-12-09,no
23,F-017,mail-gw-01,,7.0,internet,no,P2,2026-11-11,yes
24,F-012,vpn-01,,7.0,internet,no,P2,2026-12-02,no
25,F-024,dc-01,CVE-2020-1472,5.5,internal,yes,P2,2026-11-19,yes
26,F-035,build-01,CVE-2024-3094,10.0,internal,no,P3,2026-11-29,yes
27,F-028,files-01,,8.9,internal,no,P3,2026-12-27,no
28,F-033,build-01,CVE-2024-6387,8.1,internal,no,P3,2027-01-13,no
29,F-046,wifi-ctl-01,CVE-2022-0778,7.5,internal,no,P3,2026-09-20,yes
30,F-040,erp-01,CVE-2022-3602,7.5,internal,no,P3,2026-11-15,yes
31,F-034,build-01,CVE-2023-0286,7.4,internal,no,P3,2026-10-04,yes
32,F-038,shop-db-01,,7.4,internal,no,P3,2026-12-06,no
33,F-047,wifi-ctl-01,,7.0,internal,no,P3,2026-12-20,no
34,F-013,vpn-01,CVE-2023-51385,6.5,internet,no,P3,2026-10-18,yes
35,F-010,web-02,CVE-2021-3449,5.9,internet,no,P3,2026-11-01,yes
36,F-003,web-01,CVE-2023-48795,5.9,internet,no,P3,2026-12-13,no
37,F-016,mail-gw-01,CVE-2013-2566,5.9,internet,no,P3,2027-02-07,no
38,F-019,transfer-01,,4.0,internet,no,P3,2026-11-22,yes
39,F-030,print-01,,6.9,internal,no,P4,2026-10-10,yes
40,F-048,wifi-ctl-01,,6.5,internal,no,P4,2026-08-08,yes
41,F-043,backup-01,CVE-2023-51385,6.5,internal,no,P4,2027-01-16,no
42,F-044,backup-01,CVE-2023-48795,5.9,internal,no,P4,2026-11-21,yes
43,F-041,erp-01,CVE-2021-3449,5.9,internal,no,P4,2027-02-13,no
44,F-025,dc-01,,5.3,internal,no,P4,2026-11-07,yes
45,F-036,build-01,,4.8,internal,no,P4,2026-08-29,yes
46,F-020,transfer-01,,3.9,internet,no,P4,2027-02-20,no
47,F-004,web-01,CVE-2015-4000,3.7,internet,no,P4,2026-12-05,no
output/summary.md · written by the agent, 43 lines
P1: 10
P2: 15
P3: 13
P4: 9
overdue: 23

## P1 findings

| Finding | Host | Title | Due date | Overdue |
|---|---|---|---|---|
| F-031 | web-01 | Remote code execution in Java logging library | 2026-11-25 | yes |
| F-007 | web-02 | Remote code execution in Java web framework | 2026-11-25 | yes |
| F-011 | vpn-01 | Path traversal in SSL VPN web portal | 2026-11-30 | no |
| F-018 | transfer-01 | SQL injection in file transfer application | 2026-12-03 | no |
| F-006 | web-02 | Remote code execution in SSH agent forwarding | 2026-12-04 | no |
| F-014 | mail-gw-01 | Server side request forgery in mail server | 2026-10-09 | yes |
| F-022 | test-web-9 | Default administrator password in use | 2026-11-27 | yes |
| F-021 | kiosk-03 | Remote code execution in SMBv1 file sharing | 2026-12-05 | no |
| F-005 | web-01 | HTTP/2 rapid reset denial of service | 2026-11-17 | yes |
| F-023 | test-web-9 | Memory disclosure in TLS heartbeat | 2026-11-27 | yes |

## Hosts in the scan not on the host list

Treated as internet-facing and holding customer data (rule detail 2).

- kiosk-03: F-021
- test-web-9: F-022, F-023

## Findings with no score

Stand-in score 7.0 used (rule detail 3).

- F-017 (mail-gw-01)
- F-047 (wifi-ctl-01)

## Dropped repeats

Same CVE, host and port (rule detail 4).

- F-001 dropped, F-031 kept
- F-045 dropped, F-026 kept

Total: 49 scan rows, 2 dropped, 47 ranked.
check.py · the check, written before the run
"""Applies the written ranking rule to the scan export and compares the result row by row."""
import csv, re, sys
from datetime import date, timedelta
from pathlib import Path

DAYS = {"P1": 7, "P2": 30, "P3": 90, "P4": 180}
NUM = re.compile(r"(?<![\w.-])\d(?:[\d,]*\d)?(?:\.\d+)?(?![\w-])")
DAY = re.compile(r"\d{4}-\d{2}-\d{2}")

def figures(text):
    return [float(m.group(0).replace(",", "")) for m in NUM.finditer(text) if len(m.group(0)) >= 2]

def rows(p):
    with p.open(newline="") as fh:
        return list(csv.DictReader(fh))

def low(s):
    return (s or "").strip().lower()

def expected(root):
    inp = root / "input"
    scan_day = date.fromisoformat(re.search(r"Scan date:\s*(\d{4}-\d{2}-\d{2})", (inp / "ranking_rule.md").read_text()).group(1))
    hosts = {low(h["host"]): h for h in rows(inp / "hosts.csv")}
    listed = {low(k["cveID"]) for k in rows(inp / "known_exploited.csv")}
    kept, dropped = {}, {}
    for f in sorted(rows(inp / "scan_export.csv"), key=lambda f: (f["first_seen"], f["finding_id"])):
        cve = low(f["cve"])
        key = (low(f["host"]), f["port"].strip(), cve) if cve else ("", "", f["finding_id"])
        if key in kept: dropped[f["finding_id"]] = kept[key]["finding_id"]
        else: kept[key] = f
    want, unknown, unscored = {}, set(), set()
    for f in kept.values():
        host = low(f["host"]); h = hosts.get(host)
        if not h: unknown.add(host)
        internet = True if not h else low(h["exposure"]) == "internet"
        customer = True if not h else low(h["holds_customer_data"]) == "yes"
        raw = f["cvss"].strip()
        if not raw: unscored.add(f["finding_id"])
        score = float(raw) if raw else 7.0
        kev = low(f["cve"]) in listed if low(f["cve"]) else False
        if (kev and internet) or (score >= 9.0 and internet): p = "P1"
        elif kev or (score >= 7.0 and internet) or (score >= 9.0 and customer): p = "P2"
        elif score >= 7.0 or (score >= 4.0 and internet): p = "P3"
        else: p = "P4"
        first = date.fromisoformat(f["first_seen"].strip()); due = first + timedelta(days=DAYS[p])
        want[f["finding_id"]] = {"host": host, "cve": f["cve"].strip(), "title": f["title"].strip(), "port": f["port"].strip(), "score": score, "exposure": "internet" if internet else "internal", "known_exploited": "yes" if kev else "no",
                                 "priority": p, "due_date": due.isoformat(), "overdue": "yes" if due < scan_day else "no", "first": first}
    order = sorted(want, key=lambda k: (want[k]["priority"], -want[k]["score"], want[k]["first"], k))
    for i, k in enumerate(order): want[k]["rank"] = i + 1
    return want, dropped, unknown, unscored

def main():
    root = Path(sys.argv[1]); ok = True
    def say(passed, text):
        nonlocal ok
        ok = ok and passed; print(("PASS " if passed else "FAIL ") + text)
    want, dropped, unknown, unscored = expected(root)
    path = root / "output/ranked_findings.csv"
    if not path.exists():
        say(False, "output/ranked_findings.csv was not written"); sys.exit(1)
    got_rows = rows(path)
    got = {(r.get("finding_id") or "").strip(): {k: (v or "").strip() for k, v in r.items() if k} for r in got_rows}
    n = len(want)
    say(len(got_rows) == n and set(got) == set(want), f"{len(set(got) & set(want))} of {n} findings left after dropping {len(dropped)} repeats appear once in ranked_findings.csv")
    def num(s):
        try: return float(s)
        except ValueError: return None
    facts = sum(1 for k, w in want.items() if num(got.get(k, {}).get("score", "")) == w["score"] and low(got.get(k, {}).get("exposure")) == w["exposure"]
                and low(got.get(k, {}).get("known_exploited")) == w["known_exploited"]
                and got.get(k, {}).get("host") == w["host"] and got.get(k, {}).get("cve", "").upper() == w["cve"].upper())
    say(facts == n, f"{facts} of {n} findings carry the right host, weakness id, score, exposure and known exploited flag")
    pr = sum(1 for k, w in want.items() if got.get(k, {}).get("priority", "").upper() == w["priority"])
    say(pr == n, f"{pr} of {n} priorities equal the priority the written rule gives")
    due = sum(1 for k, w in want.items() if got.get(k, {}).get("due_date") == w["due_date"] and low(got.get(k, {}).get("overdue")) == w["overdue"])
    say(due == n, f"{due} of {n} due dates and overdue flags equal the ones recomputed from the first seen dates")
    rk = sum(1 for k, w in want.items() if got.get(k, {}).get("rank") == str(w["rank"]))
    say(rk == n, f"{rk} of {n} findings sit at the rank the written order gives")
    summary = (root / "output/summary.md").read_text() if (root / "output/summary.md").exists() else ""
    tally = {p: sum(1 for w in want.values() if w["priority"] == p) for p in DAYS}
    tally["overdue"] = sum(1 for w in want.values() if w["overdue"] == "yes")
    s_ok = 0
    for name, val in tally.items():
        m = re.search(r"(?<![A-Za-z_])" + name + r"[`*\s]*:[`*\s]*(\d+)", summary)
        if m and int(m.group(1)) == val: s_ok += 1
    say(s_ok == 5, f"{s_ok} of 5 counts in summary.md equal the recomputed counts (four priorities and overdue)")
    has = lambda k: bool(re.search(re.escape(k) + r"(?!\d)", summary))
    p1 = [k for k, w in want.items() if w["priority"] == "P1"]
    a, b, c, d = sum(1 for k in p1 if has(k)), sum(1 for h in unknown if h in summary.lower()), sum(1 for k, v in dropped.items() if has(k) and has(v)), sum(1 for k in unscored if has(k))
    say(a == len(p1) and b == len(unknown) and c == len(dropped) and d == len(unscored),
        f"summary.md names {a} of {len(p1)} P1 findings, {b} of {len(unknown)} hosts missing from the host list, {c} of {len(dropped)} dropped repeats and {d} of {len(unscored)} findings with no score")
    lines = summary.splitlines()
    def p1_line(k):
        w = want[k]
        for ln in lines:
            if not re.search(re.escape(k) + r"(?!\d)", ln): continue
            rest = ln.lower().replace(w["title"].lower(), "")
            said = re.findall(r"\b(not overdue|overdue|yes|no)\b", rest)
            flags = {"yes" if s in ("yes", "overdue") else "no" for s in said}
            if w["host"] in ln.lower() and w["title"].lower() in ln.lower() and DAY.findall(ln) == [w["due_date"]] and flags == {w["overdue"]}: return True
        return False
    e = sum(1 for k in p1 if p1_line(k))
    say(e == len(p1), f"{e} of {len(p1)} P1 findings are listed in summary.md on a line with their own host, title, due date and overdue flag")
    scan = rows(root / "input/scan_export.csv")
    by_id = {f["finding_id"]: f for f in scan}
    rule_text = (root / "input/ranking_rule.md").read_text()
    totals = {float(x) for x in [len(scan), n, len(dropped), len(unknown), len(unscored), *tally.values(), *DAYS.values()]} | set(figures(rule_text))
    rule_days = set(DAY.findall(rule_text))
    seen = bad = 0
    for ln in lines:
        ids = [i for i in re.findall(r"F-\d{3}(?!\d)", ln) if i in by_id]
        nums, days = set(totals), set(rule_days)
        for i in ids:
            f = by_id[i]; w = want.get(i, {})
            for v in (f["cvss"], f["port"], w.get("score"), w.get("rank")):
                if str(v or "").strip(): nums.add(float(v))
            days |= {f["first_seen"].strip(), w.get("due_date", "")}
        if not ids: nums = set(totals)
        for v in figures(DAY.sub(" ", ln)):
            seen += 1; bad += v not in nums
        for d in DAY.findall(ln):
            seen += 1; bad += d not in days
    for pat, val in ((r"(?<![\w.-])(\d+)\s+(?:scan rows|rows in the scan|findings in the scan|findings scanned)", len(scan)), (r"(?<![\w.-])(\d+)\s+(?:ranked|kept|left)\b", n),
                     (r"(?<![\w.-])(\d+)\s+(?:dropped|repeats)\b", len(dropped))):
        for m in re.finditer(pat, summary):
            seen += 1; bad += int(m.group(1)) != val
    say(seen > 0 and bad == 0, f"{seen - bad} of {seen} other numbers and dates in summary.md match the scan, the written rule or the ranked list")
    sys.exit(0 if ok else 1)

if __name__ == "__main__":
    main()

hosts.csv: sample data written by Atris. Fingerprint 0485c8e6df33.

known_exploited.csv: public document. Fingerprint 25864db98ea0.

ranking_rule.md: sample data written by Atris. Fingerprint 8ca2b3161a95.

scan_export.csv: sample data written by Atris. Fingerprint f6f18c45ea5c.

ranked_findings.csv: written by the agent. Fingerprint d95576262b92.

summary.md: written by the agent. Fingerprint bd41ddc644c7.


More it and security work, and every other desk job

For agentsGitHub
What is AtrisBlogApp StorePricingPrivacyTerms