checkov の API リファレンス
checkov (bridgecrewio/checkov) の公開 API 94 件 —— クラス 16、関数 56、メソッド 22。実際のソースを静的解析して抽出した正確なシグネチャを掲載しています。
リポジトリ: bridgecrewio/checkov
| 種別 | 件数 |
|---|---|
| クラス | 16 |
| 関数 | 56 |
| メソッド | 22 |
API 一覧
func
checkov.ansible.utils.get_scannable_file_paths(root_folder:str | Path) -> set[Path]Finds yaml files
class
checkov.arm.context_parser.ContextParserARM template context parser
method
checkov.arm.context_parser.ContextParser.search_deep_keys(search_text:str, arm_dict:dict[str, Any], path:list[str | int]) -> list[list[Any]]Search deep for keys and get their values
func
checkov.arm.parser.parser.load(filename:Path | str) -> tuple[dict[str, Any], list[tuple[int, str]]]Load the given JSON/YAML file
func
checkov.arm.parser.parser.parse(filename:str) -> tuple[dict[str, Any], list[tuple[int, str]]] | tuple[None, None]Decode filename into an object
method
checkov.arm.runner.Runner.add_graph_check_results(report:Report, runner_filter:RunnerFilter) -> NoneAdds graph check results to given report
method
checkov.arm.runner.Runner.add_python_check_results(report:Report, runner_filter:RunnerFilter, root_folder:str | None) -> NoneAdds Python check results to given report
func
checkov.arm.utils.get_scannable_file_paths(root_folder:str | None=None, excluded_paths:list[str] | None=None) -> set[str]Finds ARM files
method
checkov.bicep.runner.Runner.add_graph_check_results(report:Report, runner_filter:RunnerFilter) -> NoneAdds YAML check results to given report
method
checkov.bicep.runner.Runner.add_python_check_results(report:Report, runner_filter:RunnerFilter, root_folder:str | Path | None) -> NoneAdds Python check results to given report
func
checkov.bicep.utils.get_scannable_file_paths(root_folder:str | Path | None=None, files:list[str] | None=None, excluded_paths:list[str] | None=None) -> set[Path]Finds Bicep files
class
checkov.cloudformation.context_parser.ContextParserCloudFormation template context parser
class
checkov.cloudformation.parser.cfn_yaml.CfnParseErrorError thrown when the template contains Cfn Error
class
checkov.cloudformation.parser.cfn_yaml.MarkedLoaderClass for marked loading YAML
class
checkov.cloudformation.parser.cfn_yaml.NodeConstructorNode Constructors for loading different types in Yaml
method
checkov.cloudformation.parser.cfn_yaml.NodeConstructor.construct_yaml_null_error(node:Node) -> NoReturnThrow a null error
func
checkov.cloudformation.parser.cfn_yaml.construct_getatt(node:ScalarNode) -> ListNodeReconstruct !GetAtt into a list
func
checkov.cloudformation.parser.cfn_yaml.load(filename:str | Path, content_type:ContentType | None) -> tuple[dict[str, Any], list[tuple[int, str]]]Load the given YAML file
func
checkov.cloudformation.parser.cfn_yaml.loads(yaml_string:str, fname:str, content_type:ContentType | None=None) -> DictNode | dict[str, Any]Load the given YAML string
func
checkov.cloudformation.parser.cfn_yaml.multi_constructor(loader:MarkedLoader, tag_suffix:str, node:ScalarNode) -> DictNodeDeal with !Ref style function format
func
checkov.cloudformation.parser.parse(filename:str, out_parsing_errors:Optional[Dict[str, str]]=None) -> tuple[dict[str, Any] | list[dict[str, Any]], list[tuple[int, str]]] | tuple[None, None]Decode filename into an object
func
checkov.common.external_checks.verification.sources_registry.verify_and_register(dirs:Iterable[str], public_key_paths:List[str]) -> NoneNo-op when ``public_key_paths`` is empty.
func
checkov.common.external_checks.verification.verified_loader.uninstall_finder(finder:VerifiedSourcesFinder) -> NoneIdempotent — second call is a silent no-op.
method
checkov.common.graph.graph_builder.graph_components.blocks.Block.update_list_attribute(attribute_key:str, attribute_value:Any) -> NoneUpdates list attributes with their index
class
checkov.common.images.image_referencer.ImageReferencerMixinMixin class to simplify image reference search
func
checkov.common.images.image_referencer.fix_related_resource_ids(report:Report | None, tmp_dir:str) -> NoneRemove tmp dir prefix from 'relatedResourceId'
func
checkov.common.output.cyclonedx.file_sha1sum(filename:str) -> strGenerate a SHA1 hash of the provided file.
method
checkov.common.output.report.Report.get_test_suite(properties:Optional[Dict[str, Any]]=None, use_bc_ids:bool=False) -> TestSuiteCreates a test suite for the JUnit XML report
method
checkov.common.parsers.json.decoder.Decoder.decode(s:str, _w:Callable[..., Any] | None=None) -> AnyOverridden to retrieve indexes
class
checkov.common.parsers.json.decoder.MarkMark of line and column
func
checkov.common.parsers.json.decoder.count_occurrences(arr:Sequence[int], key:int) -> intBinary search indexes to replace str.count
func
checkov.common.parsers.json.decoder.find_indexes(s:str, ch:str='\n') -> list[int]Finds all instances of given char and returns list of indexes
func
checkov.common.parsers.json.decoder.get_beg_end_mark(s:str, start:int, end:int, indexes:list[int]) -> tuple[Mark, Mark]Get the Start and End Mark
func
checkov.common.parsers.json.decoder.largest_less_than(indexes:list[int], line_num:int, pos:int) -> intReplacement func for python str.rfind using indexes
func
checkov.common.parsers.json.decoder.scan_once(string:str, idx:int) -> tuple[Any, int]Scan Once
class
checkov.common.parsers.json.errors.DuplicateErrorError thrown when the template contains duplicates
class
checkov.common.parsers.json.errors.NullErrorError thrown when the template contains Nulls
func
checkov.common.parsers.json.load(filename:str | Path, allow_nulls:bool=True, content:str | None=None) -> tuple[dict[str, Any], list[tuple[int, str]]]Load the given JSON file
class
checkov.common.parsers.node.DictNodeNode class created based on the input class
method
checkov.common.parsers.node.DictNode.get(key:str, default:Any=None) -> AnyOverride the default get
method
checkov.common.parsers.node.DictNode.get_safe(key:str, default:Any=None, path:list[str] | None=None, type_t:Type[tuple[Any, ...]]=tuple) -> list[tuple[tuple[Any, ...], list[str]]]Get values in format
method
checkov.common.parsers.node.DictNode.items_safe(path:list[int | str] | None=None, type_t:Type[tuple[Any, ...]]=tuple) -> Generator[tuple[Any, ...], Any, None]Get items while handling IFs
class
checkov.common.parsers.node.ListNodeNode class created based on the input class
method
checkov.common.parsers.node.ListNode.items_safe(path:list[int | str] | None=None, type_t:Type[tuple[Any, ...]]=tuple) -> Generator[tuple[Any, ...], Any, None]Get items while handling IFs
class
checkov.common.parsers.node.StrNodeNode class created based on the input class
class
checkov.common.parsers.node.TemplateAttributeErrorCustom error to capture Attribute Errors in the Template
func
checkov.common.parsers.yaml.loader.load(filename:str | Path, content:str | None=None) -> tuple[list[dict[str, Any]], list[tuple[int, str]]]Load the given YAML file
func
checkov.common.parsers.yaml.loader.loads(content:str) -> list[dict[str, Any]]Load the given YAML string
func
checkov.common.runners.base_runner.strtobool(val:str) -> intConvert a string representation of truth to true (1) or false (0).
method
checkov.common.runners.object_runner.Runner.add_graph_check_results(report:Report, runner_filter:RunnerFilter) -> NoneAdds graph check results to given report
method
checkov.common.runners.object_runner.Runner.add_inline_suppression(check:BaseGraphCheck, entity:dict[str, Any], check_result:_CheckResult) -> NoneAdjusts check result, if inline suppressed
func
checkov.common.util.data_structures_utils.merge_dicts(*dicts:dict[_T, Any]) -> dict[_T, Any]Merges two or more dicts.
func
checkov.common.util.data_structures_utils.pickle_deepcopy(obj:_T) -> _TMore performant version of the built-in deepcopy
func
checkov.common.util.decorators.time_it(func:Callable[P, T]) -> Callable[P, T]Prints the time it took to execute the function
func
checkov.common.util.deep_merge.overwrite(v1:_T, v2:_T, **kwargs:Any) -> _TCompletely overwrites one value with another.
func
checkov.common.util.file_utils.read_file_with_any_encoding(file_path:str | Path) -> strRead the file with the system encoding and then try to detect it
func
checkov.common.util.http_utils.valid_url(url:str | None) -> boolChecks for a valid URL, otherwise returns False
func
checkov.common.util.parser_utils.find_var_blocks(value:str) -> List[VarBlockMatch]Find and return all the var blocks within a given string.
func
checkov.common.util.parser_utils.split_merge_args(value:str) -> list[str] | NoneSplit arguments of a merge function.
func
checkov.common.util.secrets.is_hash(s:str) -> boolChecks whether a string is a MD5 or SHA1 hash :param s: :return:
func
checkov.common.util.stopit.threadstop.async_raise(target_tid:int, exception:type[Exception]) -> NoneRaises an asynchronous exception in another thread.
func
checkov.common.util.type_forcers.convert_prisma_policy_filter_to_params(filter_string:str) -> List[Tuple[str, str]]Converts the filter string to a list of tuples.
func
checkov.common.util.type_forcers.force_dict(obj:Any) -> dict[str, Any] | NoneIf the specified object is a dict, returns the object.
class
checkov.common.util.update_checker.update_checker.UpdateCheckerA class to check for package updates.
func
checkov.common.util.update_checker.update_checker.parse_version(s:str) -> tuple[str, ...]Convert a version string to a chronologically-sortable key.
func
checkov.common.util.update_checker.update_checker.pretty_date(the_datetime:datetime) -> strAttempt to return a human-readable time delta string.
func
checkov.common.util.update_checker.update_checker.wrapped(obj:UpdateChecker, package_name:str, package_version:str, **extra_data:Any) -> UpdateResult | NoneReturn cached results if available.
method
checkov.dockerfile.runner.Runner.add_graph_check_results(report:Report, runner_filter:RunnerFilter, root_folder:str | None) -> NoneAdds graph check results to given report
method
checkov.dockerfile.runner.Runner.add_python_check_results(report:Report, runner_filter:RunnerFilter, root_folder:str | None) -> NoneAdds Python check results to given report
func
checkov.dockerfile.utils.get_abs_path(root_folder:str | None, file_path:str) -> strCreates the abs path There are a few cases here.
func
checkov.dockerfile.utils.get_scannable_file_paths(root_folder:str | Path | None=None, excluded_paths:list[str] | None=None) -> set[str]Finds Dockerfiles
func
checkov.github_actions.utils.get_scannable_file_paths(root_folder:str | Path) -> set[Path]Finds yaml files
func
checkov.github_actions.utils.get_workflow_dir() -> strDetects os and uses different dir string
method
checkov.gitlab.dal.Gitlab.discover() -> Nonediscover parameters from execution context of checkov.
func
checkov.kubernetes.parser.k8_json.load(filename:Path) -> Tuple[List[Dict[str, Any]], List[Tuple[int, str]]]Load the given JSON file
func
checkov.kubernetes.parser.k8_json.loads(content:str) -> list[dict[str, Any]]Load the given JSON string
func
checkov.kubernetes.parser.k8_yaml.load(filename:Path) -> Tuple[List[Dict[str, Any]], List[Tuple[int, str]]]Load the given YAML file
func
checkov.kubernetes.parser.k8_yaml.loads(content:str) -> List[Dict[str, Any]]Load the given YAML string
method
checkov.openapi.runner.Runner.is_valid(conf:dict[str, Any] | list[dict[str, Any]] | None) -> boolvalidate openAPI configuration.
method
checkov.sca_package_2.runner.Runner.upload_package_files(root_path:Path | None, files:list[str] | None, excluded_paths:set[str], excluded_file_names:set[str] | None=None) -> List[FileToPersist] | Noneupload package files to s3
method
checkov.sca_package_2.scanner.Scanner.scan() -> dict[str, Any] | Nonerun SCA package scan and poll scan results
func
checkov.secrets.git_history_store.get_secret_key(file_name:str, secret_hash:str, secret_type:str) -> strOne way to create a secret key for the secret map
func
checkov.secrets.log_prefix_stripper.strip_log_prefix(line:str) -> strStrip common build log prefixes from a single line.
func
checkov.secrets.log_prefix_stripper.strip_log_prefixes_from_content(content:str) -> strStrip log prefixes from all lines in file content.
class
checkov.serverless.parsers.context_parser.ContextParserserverless functions template context parser
func
checkov.terraform.context_parsers.tf_plan.parse(filename:str, out_parsing_errors:dict[str, str]) -> tuple[dict[str, Any], list[tuple[int, str]]] | tuple[None, None]Decode filename into an object
func
checkov.terraform.graph_builder.variable_rendering.evaluate_terraform.find_conditional_expression_groups(input_str:str) -> Optional[Tuple[List[str], int, int]]from condition ?
func
checkov.terraform.graph_builder.variable_rendering.renderer.create_variable_key_path(key_path:list[str]) -> strReturns the key_path without the var prefix ex.
method
checkov.terraform.module_loading.loader.ModuleLoader.discover(module_params:ModuleParams) -> Nonediscover parameters from execution context of checkov.
class
checkov.terraform.module_loading.loaders.versions_parser.VersionConstraintA class representing a module version.
func
checkov.terraform.module_loading.module_finder.find_tf_managed_modules(path:str) -> List[ModuleDownload]Leverage modules.json to better inform discovery.
func
checkov.terraform_json.parser.loads(file_path:Path) -> tuple[dict[str, Any], list[tuple[int, str]]]Loads the given JSON file with line numbers
func
checkov.terraform_json.parser.parse(file_path:Path) -> tuple[dict[str, Any], list[tuple[int, str]]] | tuple[None, None]Parse file to dict object
func
checkov.terraform_json.utils.get_scannable_file_paths(root_folder:str | Path | None=None, files:list[str] | None=None, excluded_paths:list[str] | None=None) -> set[Path]Finds Terraform JSON files
この情報について
掲載しているシグネチャは bridgecrewio/checkov の公開ソースコードを
Python の ast モジュールで静的解析し、引数名・デフォルト値・
型注釈・戻り値型をそのまま抽出したものです。実装コードは保存していません。
詳しくは仕組みの解説をご覧ください。