Skip to content

Commit

Permalink
fix(typo): fix typo dependancies -> dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: François Blondel <[email protected]>
  • Loading branch information
François Blondel authored and Farfaday committed Jul 26, 2024
1 parent f73de91 commit 2c608ca
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion checkov/common/util/runner_dependency_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def __init__(self, runner_registry: RunnerRegistry) -> None:

def validate_runner_deps(self) -> None:
"""
Checks if each runner declares any system dependancies by calling each runner's system_deps() function.
Checks if each runner declares any system dependencies by calling each runner's system_deps() function.
This function can safley not exist, but if returns true, call check_system_deps() on the same function.
The function would impliment it's own dependancy checks (see helm/runner.py for example).
Sucessful check_system_deps() should return None, otherwise self.check_type to indicate a runner has failed deps.
Expand Down
10 changes: 5 additions & 5 deletions checkov/helm/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,17 +148,17 @@ def parse_helm_chart_details(chart_path: str) -> tuple[str, dict[str, Any] | Non
return chart_path, chart_meta

def check_system_deps(self) -> str | None:
# Ensure local system dependancies are available and of the correct version.
# Ensure local system dependencies are available and of the correct version.
# Returns framework names to skip if deps fail.
logging.info(f"Checking necessary system dependancies for {self.check_type} checks.")
logging.info(f"Checking necessary system dependencies for {self.check_type} checks.")
try:
proc = subprocess.Popen([self.helm_command, 'version'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) # nosec
o, e = proc.communicate()
oString = str(o, 'utf-8')
if "Version:" in oString:
helmVersionOutput = oString[oString.find(':') + 2: oString.find(',') - 1]
if "v3" in helmVersionOutput:
logging.info(f"Found working version of {self.check_type} dependancies: {helmVersionOutput}")
logging.info(f"Found working version of {self.check_type} dependencies: {helmVersionOutput}")
return None
else:
return self.check_type
Expand Down Expand Up @@ -265,10 +265,10 @@ def get_binary_output(
if e:
if "Warning: Dependencies" in str(e, 'utf-8'):
logging.warning(
f"V1 API chart without Chart.yaml dependancies. Skipping chart dependancy list for {chart_name} at dir: {chart_dir}. Working dir: {target_dir}. Error details: {str(e, 'utf-8')}")
f"V1 API chart without Chart.yaml dependencies. Skipping chart dependancy list for {chart_name} at dir: {chart_dir}. Working dir: {target_dir}. Error details: {str(e, 'utf-8')}")
else:
logging.warning(
f"Error processing helm dependancies for {chart_name} at source dir: {chart_dir}. Working dir: {target_dir}. Error details: {str(e, 'utf-8')}")
f"Error processing helm dependencies for {chart_name} at source dir: {chart_dir}. Working dir: {target_dir}. Error details: {str(e, 'utf-8')}")

helm_command_args = [helm_command, 'template', '--dependency-update', chart_dir]
if runner_filter.var_files:
Expand Down
4 changes: 2 additions & 2 deletions checkov/kustomize/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,9 +446,9 @@ def _parseKustomization(self, kustomize_dir: str) -> dict[str, Any]:
return metadata

def check_system_deps(self) -> str | None:
# Ensure local system dependancies are available and of the correct version.
# Ensure local system dependencies are available and of the correct version.
# Returns framework names to skip if deps **fail** (ie, return None for a successful deps check).
logging.info(f"Checking necessary system dependancies for {self.check_type} checks.")
logging.info(f"Checking necessary system dependencies for {self.check_type} checks.")

if shutil.which(self.kubectl_command) is not None:
kubectl_version = get_kubectl_version(kubectl_command=self.kubectl_command)
Expand Down

0 comments on commit 2c608ca

Please sign in to comment.