Module helmlint

Module helmlint 

Source
Expand description

Helmlint-RS: Native Rust Helm Chart Linter

A Rust implementation of a comprehensive Helm chart linter, inspired by and partially derived from the helmtest project.

§Attribution

This module is a derivative work inspired by helmtest, originally written in Go by StackRox (Red Hat).

Original Project: https://github.com/stackrox/helmtest Original License: Apache-2.0 Original Copyright: Copyright (c) StackRox, Inc.

This Rust translation maintains compatibility with the Apache-2.0 license. See THIRD_PARTY_NOTICES.md and LICENSE files for full details.

§Features

  • Chart.yaml validation (structure, versions, dependencies)
  • values.yaml validation (types, schema, unused values)
  • Template syntax analysis (unclosed blocks, undefined variables)
  • Security checks (privileged containers, host access)
  • Best practice validation (resource limits, probes, deprecated APIs)
  • Inline pragma support for ignoring rules

§Example

use syncable_cli::analyzer::helmlint::{lint_chart, HelmlintConfig, LintResult};
use std::path::Path;

let config = HelmlintConfig::default();
let result = lint_chart(Path::new("./my-chart"), &config);

for failure in result.failures {
    println!("{}: {} - {}", failure.file, failure.code, failure.message);
}

§Rules

CategoryCode RangeDescription
StructureHL1xxxChart.yaml and file structure
ValuesHL2xxxvalues.yaml validation
TemplatesHL3xxxGo template syntax
SecurityHL4xxxContainer security
Best PracticesHL5xxxK8s best practices

Re-exports§

pub use config::HelmlintConfig;
pub use formatter::OutputFormat;
pub use formatter::format_result;
pub use formatter::format_result_to_string;
pub use lint::LintResult;
pub use lint::lint_chart;
pub use lint::lint_chart_file;
pub use types::CheckFailure;
pub use types::RuleCode;
pub use types::Severity;

Modules§

config
Configuration for the helmlint linter.
formatter
Output formatters for helmlint results.
k8s
Kubernetes schema validation and API version tracking.
lint
Main linting orchestration for helmlint.
parser
Parsers for Helm chart components.
pragma
Pragma support for inline rule ignoring.
rules
Rule system for helmlint.
types
Core types for the helmlint linter.