Handle nullable AROI validator errors - #208
Conversation
Co-authored-by: 1aeo <1aeo@users.noreply.github.com>
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Security review result: no high-confidence vulnerabilities found in this PR.
Reviewed the AROI validator error normalization changes for injection, XSS/request-forgery exposure, secrets leakage, authz boundary changes, unsafe deserialization, dependency/supply-chain changes, and insecure logging. The diff normalizes nullable/non-string error fields to a constant display string before existing regex/lowercase processing and does not add new external requests, command execution, template sinks, dependencies, or credential handling.
Validation: python3 -m unittest tests.unit.aroi.test_aroi_validation passed (49 tests). python3 -m pytest tests/unit/aroi/test_aroi_validation.py could not run because pytest is not installed in the active environment.
Sent by Cursor Automation: Find vulnerabilities


Bug and impact
If aroivalidator
latest.jsoncontains an invalid relay result witherror: nullor another non-string value, Allium can crash while generating network-health metrics or contact/operator pages. JSON null bypassesdict.get(..., default), then the value reaches string-only helpers (re.findall,.lower()), aborting the static site build.Root cause
AROI result
errorfields were treated as always-present strings at the aggregation/rendering boundary.Fix
Unknown errorbefore rollup/rendering.Validation
python3 -m pytest tests/unit/aroi/test_aroi_validation.py— 49 passedpython3 -m flake8 allium/lib/aroi_validation.py tests/unit/aroi/test_aroi_validation.py --select=E9,F63,F7,F82 --show-source— passedpython3 -m pytest— 949 passed, 54 deselected, 34 subtests passedNote: repo-wide
python3 -m flake8 . --select=E9,F63,F7,F82 --show-sourcecurrently reports pre-existing failures intests/integration/test_api_timeout.py,tests/integration/test_authorities.py, and vendoredvenv/files; the touched files pass the same rule set.