Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
lirshindalman committed Sep 11, 2023
1 parent 0fb2374 commit 175005a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
10 changes: 7 additions & 3 deletions checkov/common/bridgecrew/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
secrets_check_reduced_keys = check_reduced_keys + ('validation_status',)
check_metadata_keys = ('evaluations', 'code_block', 'workflow_name', 'triggers', 'job')

FILE_NAME_NETWORKX = 'graph_networkx.json'
FILE_NAME_IGRAPH = 'graph_igraph.json'
FILE_NAME_RUSTWORKX = 'graph_rustworkx.json'


def _is_scanned_file(file: str) -> bool:
file_ending = os.path.splitext(file)[1]
Expand Down Expand Up @@ -153,13 +157,13 @@ def persist_graphs(graphs: dict[str, DiGraph | Graph | PyDiGraph], s3_client: S3
def _upload_graph(check_type: str, graph: DiGraph | Graph, _absolute_root_folder: str = '') -> None:
if isinstance(graph, DiGraph):
json_obj = node_link_data(graph)
graph_file_name = 'graph_networkx.json'
graph_file_name = FILE_NAME_NETWORKX
elif isinstance(graph, Graph):
json_obj = serialize_to_json(graph, _absolute_root_folder)
graph_file_name = 'graph_igraph.json'
graph_file_name = FILE_NAME_IGRAPH
elif isinstance(graph, PyDiGraph):
json_obj = digraph_node_link_json(graph)
graph_file_name = 'rustworkx_igraph.json'
graph_file_name = FILE_NAME_RUSTWORKX
else:
logging.error(f"unsupported graph type '{graph.__class__.__name__}'")
return
Expand Down
3 changes: 1 addition & 2 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
mypy_path = extra_stubs

files = checkov
exclude = checkov/(arm/checks|cloudformation/checks|kubernetes/checks|serverless|terraform/(checks|plan_runner.py))|rustworkx
exclude = checkov/(arm/checks|cloudformation/checks|kubernetes/checks|serverless|terraform/(checks|plan_runner.py))| rustworkx
strict = True
disallow_subclassing_any = False
implicit_reexport = True
Expand Down Expand Up @@ -33,5 +33,4 @@ ignore_missing_imports = True
follow_imports = skip

[mypy-rustworkx.*]
ignore_missing_imports = True
ignore_errors = True

0 comments on commit 175005a

Please sign in to comment.