Skip to content

Fix update_ct_logs.py to parse tiled CT logs#21

Closed
jtamboli wants to merge 1 commit intohewigovens:mainfrom
jtamboli:main
Closed

Fix update_ct_logs.py to parse tiled CT logs#21
jtamboli wants to merge 1 commit intohewigovens:mainfrom
jtamboli:main

Conversation

@jtamboli
Copy link
Copy Markdown

@jtamboli jtamboli commented Apr 1, 2026

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.

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.
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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", [])
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
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",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

@hewigovens
Copy link
Copy Markdown
Owner

@jtamboli Thanks for the contribution, I included and refactored this change into main, new version will fix this soon

@hewigovens hewigovens closed this Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants