Script to determine which AS, do not filter ROA invalid prefixes, based on data from the GRC

Burble (AS4242422601) announces the prefix fd42:4242:2601:ffff::/64 with ROA Invalid to test which AS filter ROA Invalid prefix and which do not. The following script identifies some ASs that do not filter. For this it asks the GRC via SSH which AS “pass” the invalid prefix to the GRC and do not filter it out. These and the ASs in the AS path are then output. The origin AS of burble is excluded.

ssh collector.dn42 "show route for fd42:4242:2601:ffff::/64 where bgp_path.first != 4242422601 all" 2>/dev/null | grep -Po "BGP.as_path: (\d{1,20} ?)+" | grep -Po "\d+" | grep -v "4242422601" | sort | uniq