Fix update_ct_logs.py to parse tiled CT logs#21
Fix update_ct_logs.py to parse tiled CT logs#21jtamboli wants to merge 1 commit intohewigovens:mainfrom
Conversation
The script only iterated over operator["logs"], missing the "tiled_logs" array where newer CT logs (Gouda, Sycamore, Willow, Halloumi, Tuscolo, Luoshu) are listed. Regenerated KnownCTLogs.swift with all 56 entries.
There was a problem hiding this comment.
Code Review
This pull request updates the Certificate Transparency log list with new entries from Let's Encrypt, TrustAsia, Geomys, and IPng Networks, while also modifying the update script to include tiled logs. Feedback was provided to improve the script's robustness against null values in the source JSON to prevent potential TypeErrors and to ensure consistent naming conventions for log descriptions in the generated output.
| for op in data.get("operators", []): | ||
| op_name = op["name"] | ||
| for log in op.get("logs", []): | ||
| all_logs = op.get("logs", []) + op.get("tiled_logs", []) |
There was a problem hiding this comment.
The use of .get(..., []) handles missing keys, but if the key is present with a null value in the JSON, it will return None, causing a TypeError when attempting to concatenate with a list. Using (op.get("logs") or []) would be more robust.
| all_logs = op.get("logs", []) + op.get("tiled_logs", []) | |
| all_logs = (op.get("logs") or []) + (op.get("tiled_logs") or []) |
| "74DB9D58F7D47E9DFD787A162A991C18CF698DA7C729918C9A18B0450DBA44BC": "TrustAsia 'log2026a'", | ||
| "25B7EFDEA1130193ED93079770AA322A26620DE35AC8AA7C75197DE0B1A9E065": "TrustAsia 'log2026b'", | ||
| "EDDAEB815C63213449B47BE5077905ABD0D93147C27AC5146B3BC58E43E9B6C7": "TrustAsia 'HETU2027'", | ||
| "573448CC6E1D2C0DC94B69F287D1EFE483C7A25C50C5320BBB3ADEA76F6EB041": "TrustAsia Luoshu2027", |
There was a problem hiding this comment.
The log name TrustAsia Luoshu2027 is inconsistent with the project's convention of using single quotes for log names (e.g., TrustAsia 'log2026a'). Since this file is auto-generated, the normalization logic in scripts/update_ct_logs.py should be improved to handle inconsistent descriptions in the source JSON.
|
@jtamboli Thanks for the contribution, I included and refactored this change into main, new version will fix this soon |
The script only iterated over operator["logs"], missing the "tiled_logs" array where newer CT logs (Gouda, Sycamore, Willow, Halloumi, Tuscolo, Luoshu) are listed. Regenerated KnownCTLogs.swift with all 56 entries.
For example, the certificate for xcancel.com shows “Unknown (1A 8B 9D 69 4A 57 98 C8…)” for the second SCT. That should be “IPng Gouda 2026h1”, as seen on crt.sh.