Skip to content

Commit 2f14b41

Browse files
committed
Fix a typo in docs
Simplify add_reachability_report function Remove type hints for symbols.py Signed-off-by: ziad hany <ziadhany2016@gmail.com>
1 parent c89c64e commit 2f14b41

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

scanpipe/pipelines/analyze_symbols_reachability.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,12 @@ class SymbolReachability(Pipeline):
4949
5050
The analysis checks if vulnerable symbols are defined, imported, called, or
5151
exactly match a fingerprint within the project files. The results, including
52-
evidence and a reachability status (REACHABLE, POTENTIALLY_REACHABLE, or
52+
evidence and a reachability status (REACHABLE, UNKNOWN, or
5353
NOT_REACHABLE), are stored in the `extra_data` of the matching resources
5454
under the `symbols_reachability` key.
55+
56+
Finally, a summary report is generated for each vulnerability
57+
advisory and saved as a JSON output file.
5558
"""
5659

5760
download_inputs = False

scanpipe/pipes/reachability.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -538,9 +538,7 @@ def add_reachability_report(resource, commit_hash, vcs_url, new_report):
538538

539539
old_reports = resource.extra_data.get("symbols_reachability", [])
540540
for old_report in old_reports:
541-
actual_report = old_report.get("symbols_reachability", old_report)
542-
543-
patch_info = actual_report.get("patch", {})
541+
patch_info = old_report.get("patch", {})
544542
old_commit_hash = patch_info.get("commit_hash")
545543
old_vcs_url = patch_info.get("vcs_url")
546544

@@ -550,7 +548,7 @@ def add_reachability_report(resource, commit_hash, vcs_url, new_report):
550548
replaced = True
551549
# Skip old duplicate
552550
else:
553-
cleaned_reports.append(actual_report)
551+
cleaned_reports.append(old_report)
554552

555553
if not replaced:
556554
cleaned_reports.append(new_report)

0 commit comments

Comments
 (0)