The guardian angel for your codebase.
Find, validate, and fix vulnerabilities in code as it is written.
DownloadFrom a line of code to the controls it touches.
ledgerlens/views.py
@bp.post("/report/import")def import_report(): import pickle from flask import jsonify report = pickle.loads(request.data) return jsonify({"received": report})NEW / full scan
CRITICAL ledgerlens/views.py:87
ID: f_40f0dd7825c680fd34d51d04
deva.cwe-345.pickle-on-request-body | CWE-345
pickle.loads called directly on a request body / network input
without a signature check. Either replace pickle with JSON, or
verify a separate HMAC over the bytes before unpickling.Verdict: Likely valid
Confidence: 99%
Explanation:
The reachable import endpoint passes raw request bytes directly to
pickle.loads, with no signature verification shown. Deployment
exposure is not established.Verdict: Fix suggested
Confidence: 94%
Proposed diff (read-only):
@@ -82,7 +82,7 @@
@bp.post("/report/import")
def import_report():
- import pickle
+ import json
from flask import jsonify
- report = pickle.loads(request.data)
+ report = json.loads(request.data)
return jsonify({"received": report})
Review redacted source lines before applying this proposed diff.SOC2
CC6.8 — Prevention and Detection of Unauthorized Software: covered violations
Core finding count: 1
Traceable report findings: 1
Finding b630a425295d…: ledgerlens/views.py:87 | deva.cwe-502.python-pickle
Use of pickle.load / pickle.loads on potentially untrusted data
enables arbitrary code execution. Use json or msgpack for data
interchange; pickle should only be used for trusted, internal
payloads.
Detector-covered CWEs: CWE-94, CWE-434, CWE-502, CWE-829, CWE-1321, CWE-1336
Core evidence guidance: Show that deserialization is safe, dependencies are verified, and code injection vectors are mitigated.Saved sarif output to ledgerlens.sarif
{
"level": "error",
"locations": [
{
"physicalLocation": {
"artifactLocation": {
"uri": "ledgerlens/views.py",
"uriBaseId": "SRCROOT"
},
"region": {
"endLine": 87,
"startColumn": 14,
"startLine": 87
}
}
}
],
"properties": {
"cwe": "CWE-345",
"deva_compliance": {
"nist_800_53": [
"SC-23",
"SI-7",
"SI-10"
],
…
},
"severity": "CRITICAL"
},
"ruleId": "deva.cwe-345.pickle-on-request-body"
}Scanning is free. Every step after deva scan needs Pro.
Preserve the context each reviewer needs.
For developers
Findings and fixes stay connected to the affected code instead of becoming detached tickets.
- report = pickle.loads(request.data)
+ report = json.loads(request.data)For security teams
Validation context and remediation history make review faster and more consistent.
Verdict: Likely valid
Confidence: 99%For compliance teams
Control mappings and structured outputs create a reusable technical evidence trail.
SOC2
CC6.8 — Prevention and Detection of Unauthorized Software: covered violationsMatch the workflow to the environment.
Local analysis
Run core scanning and evidence workflows on the developer workstation.
Customer-controlled infrastructure
Keep sensitive code and analysis inside infrastructure your organization controls.
Optional AI assistance
Use supported local or cloud models when AI-assisted validation and remediation fit the environment.
Your organization
Developer workstation
$ deva scan .CI runner
$ deva scan . --format jsonLocal model
$ deva models installCloud model, your key
$ deva providers configure openrouterKeep up with Deva.
New releases and product updates, by email.