Skip to content

Commit

Permalink
add test graph utils
Browse files Browse the repository at this point in the history
  • Loading branch information
lirshindalman committed Sep 13, 2023
2 parents b51c373 + 5721569 commit 68e4ff9
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 7 deletions.
16 changes: 15 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
# CHANGELOG

## [Unreleased](https://github.com/bridgecrewio/checkov/compare/2.4.32...HEAD)
## [Unreleased](https://github.com/bridgecrewio/checkov/compare/2.4.33...HEAD)

## [2.4.33](https://github.com/bridgecrewio/checkov/compare/2.4.32...2.4.33) - 2023-09-12

### Feature

- **general:** attempt to fix overload in loaders and add tests - [#5549](https://github.com/bridgecrewio/checkov/pull/5549)
- **general:** remove 3.7 integ. test - [#5556](https://github.com/bridgecrewio/checkov/pull/5556)
- **general:** remove line to force code change - [#5558](https://github.com/bridgecrewio/checkov/pull/5558)
- **terraform:** add check Neptune DB clusters should be configured to copy tags to snapshots - [#5552](https://github.com/bridgecrewio/checkov/pull/5552)
- **terraform:** add CKV_AWS_361 to ensure Neptune DB cluster has adequate backup retention - [#5548](https://github.com/bridgecrewio/checkov/pull/5548)

### Bug Fix

- **terraform:** Fix external_modules_source_map serialization - [#5546](https://github.com/bridgecrewio/checkov/pull/5546)

## [2.4.32](https://github.com/bridgecrewio/checkov/compare/2.4.30...2.4.32) - 2023-09-10

Expand Down
2 changes: 1 addition & 1 deletion checkov/common/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from checkov.common.runners.base_runner import BaseRunner # noqa
from networkx import DiGraph
from igraph import Graph
from rustworkx import PyDiGraph, PyGraph
from rustworkx import PyDiGraph
from checkov.terraform.modules.module_objects import TFDefinitionKey

_BaseRunner = TypeVar("_BaseRunner", bound="BaseRunner[Any, Any, Any]")
Expand Down
5 changes: 3 additions & 2 deletions checkov/terraform/graph_builder/graph_components/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@ def to_dict(self) -> dict[str, Any]:
'blocks': [block.to_dict() for block in self.blocks]
}

def from_dict(self, module_dict: dict[str, Any]) -> Module:
@staticmethod
def from_dict(module_dict: dict[str, Any]) -> Module:
module = Module(source_dir=module_dict.get('source_dir', ''),
external_modules_source_map=self._from_dict_external_modules_source_map(module_dict)
external_modules_source_map=Module._from_dict_external_modules_source_map(module_dict)
)
module.blocks = [TerraformBlock.from_dict(block) for block in module_dict.get('blocks', [])]
module.path = module_dict.get('path', '')
Expand Down
2 changes: 1 addition & 1 deletion checkov/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = '2.4.33'
version = '2.4.35'
2 changes: 1 addition & 1 deletion integration_tests/prepare_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ else

fi

if [[ "$2" == "3.7" && "$1" == "ubuntu-latest" ]]
if [[ "$2" == "3.8" && "$1" == "ubuntu-latest" ]]
then
pipenv run checkov -s -f terragoat/terraform/aws/s3.tf --bc-api-key $BC_KEY > checkov_report_s3_singlefile_api_key_terragoat.txt
pipenv run checkov -s -d terragoat/terraform/azure/ --bc-api-key $BC_KEY > checkov_report_azuredir_api_key_terragoat.txt
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
checkov==2.4.33
checkov==2.4.35
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import warnings
from pathlib import Path
from typing import List
Expand Down

0 comments on commit 68e4ff9

Please sign in to comment.