Collaboration API¶
API functions for collaboration features.
add_annotation ¶
Add an annotation to a finding.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
finding
|
GhostFinding
|
Finding to annotate. |
required |
author
|
str
|
Name of the person creating the annotation. |
required |
comment
|
str
|
Comment text. |
required |
tags
|
list[str] | None
|
Optional list of tags. |
None
|
status
|
str | None
|
Optional status update ("reviewed", "fixed", "false_positive"). |
None
|
Returns:
| Type | Description |
|---|---|
Annotation
|
Created Annotation instance. |
Source code in lavendertown/collaboration/api.py
get_annotations ¶
Get all annotations for a finding.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
finding
|
GhostFinding
|
Finding to get annotations for. |
required |
Returns:
| Type | Description |
|---|---|
list[Annotation]
|
List of Annotation objects for the finding. |
Source code in lavendertown/collaboration/api.py
create_shareable_report ¶
Create a shareable report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
title
|
str
|
Report title. |
required |
author
|
str
|
Name of the person creating the report. |
required |
findings
|
list[GhostFinding]
|
List of findings to include. |
required |
annotations
|
list[Annotation] | None
|
Optional list of annotations to include. |
None
|
ruleset
|
RuleSet | None
|
Optional ruleset used for analysis. |
None
|
metadata
|
dict[str, Any] | None
|
Optional additional metadata. |
None
|
Returns:
| Type | Description |
|---|---|
ShareableReport
|
Created ShareableReport instance. |
Source code in lavendertown/collaboration/api.py
export_report ¶
Export a shareable report to a file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
report
|
ShareableReport
|
Report to export. |
required |
filepath
|
str | None
|
Optional path to save the report. If None, saves to default reports directory. |
None
|
Returns:
| Type | Description |
|---|---|
Path
|
Path where the report was saved. |
Source code in lavendertown/collaboration/api.py
import_report ¶
Import a shareable report from a file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filepath
|
str
|
Path to the report JSON file. |
required |
Returns:
| Type | Description |
|---|---|
ShareableReport
|
ShareableReport instance loaded from the file. |