refactor: JSON data column for findings, code snippets captured and displayed

This commit is contained in:
Marker689
2026-05-09 05:52:10 +03:00
parent e83167a938
commit e577f1944c
11 changed files with 60 additions and 57 deletions

View File

@@ -43,6 +43,12 @@ async def test_harvest_new_package(db_session, guarddog_normalized_flagged):
.all()
)
assert len(findings) == 3
rules = {f.data["rule"] for f in findings}
assert "shady-links" in rules
# Check code is preserved
for f in findings:
if f.data["rule"] == "shady-links":
assert f.data["code"] == "url = 'http://evil.com'"
@pytest.mark.asyncio