Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .jules/bolt.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@
## 2026-07-02 - Credential Masking Security Hole in Subprocess Environments
**Learning:** Found a critical missing credential masking pattern in `scripts/ci/noema_review_gate.py`'s `scrub_sensitive_data` which didn't mask `Authorization: Basic` or `Proxy-Authorization: Basic` tokens unlike its analogous helper in `scripts/ci/pr_review_merge_scheduler.py`. This leaves exception messages and logs vulnerable to exposing sensitive credentials when HTTP operations fail.
**Action:** When implementing credential masking functions that sanitize tracebacks and log messages, ensure the masking scope includes all relevant headers, particularly `Authorization` and `Proxy-Authorization`. Ensure parity across masking helpers across CI scripts to prevent blind spots.
## 2026-07-06 - Avoid recursive list allocations in JSON extraction
**Learning:** In recursive tree-walking functions like `extract_dicts`, using `results.extend()` on the results of recursive calls allocates many intermediate lists, leading to unnecessary memory overhead and slower execution times, especially on deeply nested JSON objects.
**Action:** Optimize recursive collection functions by passing a single mutable list instance (e.g. `results`) down through the call stack and using `list.append()` or `list.extend()` to mutate it in-place rather than concatenating returned lists.
9 changes: 5 additions & 4 deletions scripts/ci/opencode_review_normalize_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -843,16 +843,17 @@ def valid_control(
}


def extract_dicts(obj: Any) -> list[Any]:
def extract_dicts(obj: Any, results: list[Any] | None = None) -> list[Any]:
"""Recursively extract all dictionaries from a JSON-like object."""
results = []
if results is None:
results = []
if isinstance(obj, dict):
results.append(obj)
for v in obj.values():
results.extend(extract_dicts(v))
extract_dicts(v, results)
elif isinstance(obj, list):
for item in obj:
results.extend(extract_dicts(item))
extract_dicts(item, results)
return results


Expand Down
Loading