Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(general): fix typo dependancies -> dependencies #6303

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -150,17 +150,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 @@ -267,10 +267,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 @@ -447,9 +447,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