refactor: JSON data column for findings, code snippets captured and displayed
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user