mirror of
https://github.com/hohn/sarif-cli.git
synced 2025-12-16 17:23:03 +01:00
Change sarif sig severity to problem.severity
and rm redundant table col for kind
This commit is contained in:
@@ -39,8 +39,7 @@ class ScanTablesTypes:
|
|||||||
'query_kind' : pd.StringDtype(),
|
'query_kind' : pd.StringDtype(),
|
||||||
'query_precision' : pd.StringDtype(),
|
'query_precision' : pd.StringDtype(),
|
||||||
'query_severity' : pd.StringDtype(),
|
'query_severity' : pd.StringDtype(),
|
||||||
|
|
||||||
'result_type' : pd.StringDtype(),
|
|
||||||
'codeFlow_id' : pd.UInt64Dtype(),
|
'codeFlow_id' : pd.UInt64Dtype(),
|
||||||
|
|
||||||
'message' : pd.StringDtype(),
|
'message' : pd.StringDtype(),
|
||||||
@@ -150,9 +149,9 @@ def joins_for_results(basetables, external_info):
|
|||||||
"""
|
"""
|
||||||
Form and return the `results` table
|
Form and return the `results` table
|
||||||
"""
|
"""
|
||||||
# Get one table per result_type, then stack them,
|
# Get one table per query_kind, then stack them,
|
||||||
# kind_problem
|
# problem
|
||||||
# kind_pathproblem
|
# path-problem
|
||||||
#
|
#
|
||||||
# Concatenation with an empty table triggers type conversion to float, so don't
|
# Concatenation with an empty table triggers type conversion to float, so don't
|
||||||
# include empty tables.
|
# include empty tables.
|
||||||
@@ -195,9 +194,8 @@ def _results_from_kind_problem(basetables, external_info):
|
|||||||
'query_id' : b.kind_problem.rule_id,
|
'query_id' : b.kind_problem.rule_id,
|
||||||
'query_kind' : "problem",
|
'query_kind' : "problem",
|
||||||
'query_precision' : [_populate_from_rule_table("precision", b, i) for i in range(len(b.kind_problem))],
|
'query_precision' : [_populate_from_rule_table("precision", b, i) for i in range(len(b.kind_problem))],
|
||||||
'query_severity' : [_populate_from_rule_table("severity", b, i) for i in range(len(b.kind_problem))],
|
'query_severity' : [_populate_from_rule_table("problem.severity", b, i) for i in range(len(b.kind_problem))],
|
||||||
|
|
||||||
'result_type' : "kind_problem",
|
|
||||||
'codeFlow_id' : 0, # link to codeflows (kind_pathproblem only, NULL here)
|
'codeFlow_id' : 0, # link to codeflows (kind_pathproblem only, NULL here)
|
||||||
|
|
||||||
'message': b.kind_problem.message_text,
|
'message': b.kind_problem.message_text,
|
||||||
@@ -284,9 +282,8 @@ def _results_from_kind_pathproblem(basetables, external_info):
|
|||||||
'query_id' : cfid0ppt0.rule_id.values[0],
|
'query_id' : cfid0ppt0.rule_id.values[0],
|
||||||
'query_kind' : "path-problem",
|
'query_kind' : "path-problem",
|
||||||
'query_precision' : _populate_from_rule_table_code_flow("precision", b, cfid0ppt0),
|
'query_precision' : _populate_from_rule_table_code_flow("precision", b, cfid0ppt0),
|
||||||
'query_severity' : _populate_from_rule_table_code_flow("severity", b, cfid0ppt0),
|
'query_severity' : _populate_from_rule_table_code_flow("problem.severity", b, cfid0ppt0),
|
||||||
#
|
|
||||||
'result_type' : "kind_pathproblem",
|
|
||||||
'codeFlow_id' : cfid0,
|
'codeFlow_id' : cfid0,
|
||||||
#
|
#
|
||||||
'message': cfid0ppt0.message_text.values[0],
|
'message': cfid0ppt0.message_text.values[0],
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ properties_keys = set([first for first, _ in
|
|||||||
dummy_properties = { 'kind' : 'scli-dyys dummy value',
|
dummy_properties = { 'kind' : 'scli-dyys dummy value',
|
||||||
'precision' : 'scli-dyys dummy value',
|
'precision' : 'scli-dyys dummy value',
|
||||||
'security-severity' : 'scli-dyys dummy value',
|
'security-severity' : 'scli-dyys dummy value',
|
||||||
'severity' : 'scli-dyys dummy value',
|
'problem.severity' : 'scli-dyys dummy value',
|
||||||
'sub-severity' : 'scli-dyys dummy value',
|
'sub-severity' : 'scli-dyys dummy value',
|
||||||
'tags' : ['scli-dyys dummy value'],
|
'tags' : ['scli-dyys dummy value'],
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ struct_graph_2022_02_01 = (
|
|||||||
('kind', 'String'),
|
('kind', 'String'),
|
||||||
('precision', 'String'),
|
('precision', 'String'),
|
||||||
('security-severity', 'String'),
|
('security-severity', 'String'),
|
||||||
('severity', 'String'),
|
('problem.severity', 'String'),
|
||||||
('sub-severity', 'String'),
|
('sub-severity', 'String'),
|
||||||
('tags', 'Array7069'))),
|
('tags', 'Array7069'))),
|
||||||
( 'Struct6818',
|
( 'Struct6818',
|
||||||
|
|||||||
Reference in New Issue
Block a user