Address code review: fix E501 consistency in AGENTS.md, fix exception handling in test_security.py
Agent-Logs-Url: https://github.com/christianlouis/dmarq/sessions/9d256101-34b6-4861-a8cf-7f86f32b54d5 Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
@@ -105,7 +105,7 @@ black --check backend/app
|
|||||||
isort --check-only backend/app
|
isort --check-only backend/app
|
||||||
|
|
||||||
# Flake8 lint
|
# Flake8 lint
|
||||||
flake8 backend/app --max-line-length=100 --extend-ignore=E203,W503
|
flake8 backend/app --max-line-length=100 --extend-ignore=E203,W503,E501
|
||||||
```
|
```
|
||||||
|
|
||||||
If Black or isort report issues, fix them automatically:
|
If Black or isort report issues, fix them automatically:
|
||||||
|
|||||||
@@ -149,5 +149,5 @@ class TestXMLParsingSecurity:
|
|||||||
result = DMARCParser.parse_file(xxe_payload, "test.xml")
|
result = DMARCParser.parse_file(xxe_payload, "test.xml")
|
||||||
org_name = result.get("org_name", "")
|
org_name = result.get("org_name", "")
|
||||||
assert "root:" not in org_name and "/bin" not in org_name
|
assert "root:" not in org_name and "/bin" not in org_name
|
||||||
except (ValueError, Exception):
|
except Exception:
|
||||||
pass # Expected – defusedxml blocks DTD processing
|
pass # Expected – defusedxml blocks DTD processing
|
||||||
|
|||||||
Reference in New Issue
Block a user