Skip to main content

EnvGene Linter

EnvGene Linter checks EnvGene instance and template repositories and saves findings in HTML and JSON reports. Template-only repositories are checked by TPL-1, TPL-4, and TPL-6. Other implemented checks require instance inputs.

Checks target authored configuration. Generated instance objects and pipeline outputs are excluded. Generated Credential catalogs can still resolve references from authored inputs.

Install

You need Python 3.12 or newer with pip. The Python command can be named python or python3, depending on your installation. Check which command is available with python --version or python3 --version. Use one of the following commands with Python 3.12 or newer to install or update the tool:

python -m pip install --upgrade qubership-envgene-linter

Or, if your Python command is python3:

python3 -m pip install --upgrade qubership-envgene-linter

On Windows, you can also use py -m pip if the Python launcher is installed. You do not need to download the source code or build the package.

Run a check

Open a terminal in your repository root: the directory containing environments/, templates/, or both. Run:

envgene-linter check

Open the report

When the check finishes, the terminal shows both report locations, for example:

HTML report saved here: /path/to/instance-repository/envgene-linter-report.html
JSON report saved here: /path/to/instance-repository/envgene-linter-report.json

Open that HTML file in your browser. Each finding shows the affected file, the issue, and a suggested action. Use JSON for automated processing or AI tools. It contains an array of findings with rule_id, rule_title, files, issue, action, and fix_suggestion. An empty result is []. The linter does not fix configuration files automatically.

Every successful check replaces both reports. Their filenames are added to the repository's .gitignore. Skipped checks appear in HTML under Incomplete checks and in the terminal. Recoverable YAML, JSON, and Jinja read or parser failures retain independent checks and replace both reports. Structured skipped checks also appear in JSON as Review entries with an issue beginning Check skipped:. Review these entries before treating a report as complete.

Optional commands

To also display findings in the terminal:

envgene-linter check --console

To check a repository without changing directories:

envgene-linter check /path/to/instance-repository

Both commands also create HTML and JSON reports.

Troubleshooting

  • If pip reports externally-managed-environment, install in a Python virtual environment. A virtual environment is optional for the linter, but some systems require one for pip installations.
  • If the terminal cannot find envgene-linter, check that your Python scripts directory is on PATH. If you installed in a virtual environment, activate that environment first.
  • If neither environments/ nor templates/ is found, run the command from the repository root.
  • For template-only repositories, HTML and console output mark unsupported checks as Not applicable. JSON omits them. TPL-1, TPL-4, and TPL-6 still run unless disabled.

This is an alpha release. Most checks cover supported references and generator inputs. Connected ParameterSet checks support .yml, .yaml, and .json files, including nested files under repository, cluster, and Inventory parameters/ directories. Reference checks and merging use the same selection. An incomplete directory scan or unavailable role-specific template context receives Review in INT-2. INT-2 also checks explicit Cloud Passport references. A definitely missing target receives Fix. Optional passport absence is allowed, and incomplete or uncertain lookups receive Review. TPL-1 checks Jinja in YAML under templates/, environments/, and configuration/. It ignores YAML comments and allows .j2 files regardless of their directory. Exit code 0 means the check completed, including runs with findings. Exit code 2 indicates a command or execution error.

TPL-4 reviews references without recognized presence protection. It does not prove that generation fails. TPL-6 checks template logic and allows raw blocks for Helm, application placeholders, and other literal text. Built-in and custom filters are allowed, including filter blocks. Prohibited Jinja statements remain checked. TPL-6 reviews unsupported or unconfirmed compatibility with the applicable EnvGene renderer, including unavailable filters, unsupported legacy lookup forms, and compatibility processing that changes literal raw text. Additional legacy-expression checks cover configuration YAML. Root GSF/CI description templates are excluded. Both rules inspect .j2 files under templates/ and supported descriptor fields without rendering templates.

EnvGene Linter changelog

0.0.8

  • Exclude generated instance objects and pipeline outputs from configuration findings and incomplete-check entries. Retain generated Credential catalogs and Cloud Credential references as context for authored inputs.

0.0.7

  • Check explicit inventory.cloudPassport references in INT-2. Report definitely missing local targets as Fix and dynamic, unreadable, unsafe, or uncertain lookups as Review. Allow optional passport absence.
  • Check only selected Cloud Passport paths in PLACE-3. Ignore unused aliases while retaining findings for selected misplaced paths that share a physical file.
  • Continue independent checks after recoverable YAML, JSON, and Jinja read or parser failures and write fresh reports. Export affected checks as located Review entries in JSON. Keep incomplete merge inputs from confirming PLACE-1 promotion or PLACE-2 removal.
  • Check connected nested YAML and JSON ParameterSets consistently across reference resolution, content rules, and Effective Set merging. Preserve relative-path replacement and generator application order. Keep unavailable replacements and incomplete scans from restoring shadowed inputs.
  • Include nested YAML and JSON ParameterSets in INT-4's authored candidate and reference analysis.
  • Preserve YAML value types in PLACE-1 and PLACE-2 comparisons, including nested collections. Treat booleans, integers, floating-point numbers, and numeric strings as distinct values.
  • Confirm PLACE-2 removals against every known local selected consumer before reporting Fix. Keep necessary overrides silent and report incomplete or unsupported merge contexts as Review. Distinguish global, application, nested, and literal dotted source entries.
  • Stop reporting .j2 files based on their directory in TPL-1. Ignore YAML comments while retaining checks for Jinja in active values, including quoted strings and block scalars.
  • Report literal data.username values in usernamePassword Credentials as Warning / Fix in SEC-5. Ignore exact envgeneNullValue placeholders. Unknown expressions and Fernet values remain Review.
  • Limit rendered profile reference checks in INT-2 to profile.name. Ignore baseline and override_name.
  • Allow same-named ParameterSet fragments across scopes without INT-3 findings.
  • Report Shared Template Variable location mismatches as Review in PLACE-10, with generator lookup guidance.
  • Suppress NAME-8 passport and companion naming findings when a cluster context contains multiple ordinary passports.
  • Clarify SEC-4 Review guidance for intentionally separate user/password Credential IDs.
  • Recognize protected EnvGene environment lookups in TPL-4 for YAML templates and guaranteed context fields in ordinary environment template descriptor scalars.
  • Resolve selected Artifact Definition registry Credentials against the root catalog, including active V2 authentication configurations. Keep anonymous and inactive configurations out of reference evidence.
  • Show skipped checks in HTML and export skipped Jinja checks as located Review entries in JSON, so incomplete template checks cannot appear as clean reports.
  • Allow all syntactically valid raw blocks in TPL-6, regardless of whether they contain Helm syntax.
  • Allow all built-in and custom filters in TPL-6, including filter chains and filter blocks.
  • Review unsupported or unconfirmed Ansible compatibility after modeling the applicable EnvGene renderer. Check legacy lookup forms, filter availability and arguments, and changes to literal raw or string content. Include potential legacy expressions in configuration YAML. Exclude root GSF/CI description templates.

0.0.6

  • Add TPL-4, enabled by default, to review potentially optional Jinja references without recognized presence protection, such as default or an appropriate is defined check. Report candidates as Review without claiming that rendering fails.
  • Add TPL-6, enabled by default, to report prohibited Jinja constructs as Fix and uncertain template logic as Review. Allow recognizable Helm passthrough in raw blocks and review other raw blocks. Both new rules check .j2 files under templates/ and supported descriptor fields in instance and template repositories.
  • Generate envgene-linter-report.json alongside HTML on every check, with one object per finding and all related file locations. Include rule_id, rule_title, files, issue, action, and fix_suggestion. Write [] when there are no findings. Add the JSON report filename to .gitignore automatically.
  • Print separate HTML report saved here: and JSON report saved here: messages with absolute report paths.

0.0.5

  • Hide disabled rules in HTML and console reports. If every rule is disabled, show No rules enabled.
  • Support template repositories containing templates/ without requiring environments/. TPL-1 runs on these repositories. Other checks are not yet supported for template-only repositories.
  • Add TPL-1, enabled by default, to check YAML and .j2 placement under templates/, environments/, and configuration/. Allow generator-rendered descriptor fields and EnvGene macros. Report misplaced templates and EnvGene Jinja as Fix, and ambiguous Helm or application placeholders as Review. No automatic conversion or renaming is performed.
  • Add VAL-4, enabled by default, to review JSON collections and YAML block collections encoded as strings in connected ParameterSets, including application parameters and nested values. Findings recommend native YAML after checking the consumer contract. No automatic conversion is performed.

0.0.4

  • Add INT-3 to report used reference names defined at multiple environment, cluster, or repository scopes. Checks cover ParameterSets, shared Credential files, Resource Profile Overrides, and Shared Template Variables.
  • Add INT-4 to flag authored entities for which no references were found in available local sources. Findings recommend Review and explain uncertainty, including external templates and rendered references. The rule does not establish that removal is safe or delete entities automatically.
  • Add NAME-8 to check that selected default Cloud Passports use the filename stem passport and their selected companion Credential files use passport-creds. The passport-infra file and its companion are excluded.
  • Enable INT-3, INT-4, and NAME-8 by default.
  • Remove the Type row and its colored chips from HTML findings. Cards retain File, Issue, Action, and Fix suggestion. Console severity remains unchanged.
  • Show the repository's root folder name below the HTML report heading and in the browser tab title. Escape special characters and show the name even when there are no findings.

0.0.3

No functional changes from 0.0.2.

0.0.2

  • Allow envgene-linter check without a repository argument to check the current directory. Explicit repository paths remain supported.
  • Create or update envgene-linter-report.html by default and print its absolute path.
  • Add --console to also print findings in the terminal. Errors and parsing diagnostics remain visible by default.
  • Remove --html. HTML reports are generated automatically, including when --console is used.

To migrate from 0.0.1, remove --html from existing commands. Add --console to commands that need findings on stdout, including shell redirection and CI log collection. Each successful check now writes the report and adds it to the checked repository's .gitignore if needed. The report location must be writable. Findings still return exit code 0, and operational errors return 2.

0.0.1

  • Initial PyPI release of qubership-envgene-linter.
  • Check local instance repositories for placement, naming, secret handling, and reference integrity.
  • Print findings in the terminal, with optional HTML output through --html.
  • Support rule switches configured when the package is built.

Metadata

Release files for qubership-envgene-linter 0.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qubership-envgene-linter 0.0.8
File Size Uploaded Provenance Actions
qubership_envgene_linter-0.0.8.tar.gz 81.1 kB Without provenance Details for qubership_envgene_linter-0.0.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for qubership-envgene-linter 0.0.8
File Interpreter ABI Platform Actions
qubership_envgene_linter-0.0.8-py3-none-any.whl Python 3 none any Details for qubership_envgene_linter-0.0.8-py3-none-any.whl

Total release size: 190.8 kB

Release files / qubership_envgene_linter-0.0.8.tar.gz

Download URL qubership_envgene_linter-0.0.8.tar.gz
Size 81.1 kB
Tags Source
SHA-256 checksum
How to use checksums
9110816834814bd4d4ba89b88e73d7eedccb31ab0f85ad8b20fd3fd21c557f68
BLAKE2b-256 checksum
How to use checksums
a07939e3d4a623a03dc66b90d4aa11ec14437a0de677cb4739167351bd7fb68f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.3 CPython/3.12.15 Linux/7.0.0-1017-azure

Release files / qubership_envgene_linter-0.0.8-py3-none-any.whl

Download URL qubership_envgene_linter-0.0.8-py3-none-any.whl
Size 109.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8198f28376b357ef80a76b223dbe4ed7becdab7f92a9e201f85a9fa41cfffb73
BLAKE2b-256 checksum
How to use checksums
627bb29889e792138bbd3dfe9c9538df5706083bdd3f3051a95c3fc3b2e9d778
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.3 CPython/3.12.15 Linux/7.0.0-1017-azure

Security for qubership-envgene-linter 0.0.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page