Skip to content

[SG-4885] feat(platform): tirith platform check — a pre-plan policy step, no platform changes - #272

Open
refeed wants to merge 42 commits into
mainfrom
feat/gate-capable-engine
Open

[SG-4885] feat(platform): tirith platform check — a pre-plan policy step, no platform changes#272
refeed wants to merge 42 commits into
mainfrom
feat/gate-capable-engine

Update platform-check.md

a0c878e
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis cancelled Aug 11, 2026 in 41s

SonarQube Cloud analysis failed

❌ The last analysis has failed.

See analysis details on SonarQube Cloud

Annotations

Check warning on line 267 in src/tirith/core/core.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace chained "endswith" calls with a single call using a tuple argument.

See more on https://sonarcloud.io/project/issues?id=StackGuardian_policy-framework&issues=AZ_xcQ-q3mOD4nGHFZK7&open=AZ_xcQ-q3mOD4nGHFZK7&pullRequest=272

Check warning on line 221 in src/tirith/core/core.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this commented out code.

See more on https://sonarcloud.io/project/issues?id=StackGuardian_policy-framework&issues=AZ_xcQ-q3mOD4nGHFZK6&open=AZ_xcQ-q3mOD4nGHFZK6&pullRequest=272

Check warning on line 2 in tests/core/test_core.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Import "pytest" as a module.

See more on https://sonarcloud.io/project/issues?id=StackGuardian_policy-framework&issues=AZ_xcRJ43mOD4nGHFZLg&open=AZ_xcRJ43mOD4nGHFZLg&pullRequest=272

Check warning on line 28 in tests/providers/json/playbook_ansible_lint_violations.yml

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Make sure granting access to others is safe here.

See more on https://sonarcloud.io/project/issues?id=StackGuardian_policy-framework&issues=AZ_xcRI53mOD4nGHFZLS&open=AZ_xcRI53mOD4nGHFZLS&pullRequest=272

Check failure on line 212 in src/tirith/platform/redact.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 16 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=StackGuardian_policy-framework&issues=AZ_xcRD53mOD4nGHFZLE&open=AZ_xcRD53mOD4nGHFZLE&pullRequest=272

Check warning on line 85 in src/tirith/core/core.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace this constructor call with a literal.

See more on https://sonarcloud.io/project/issues?id=StackGuardian_policy-framework&issues=AZ_xcQ-q3mOD4nGHFZK2&open=AZ_xcQ-q3mOD4nGHFZK2&pullRequest=272

Check warning on line 88 in src/tirith/core/core.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace this constructor call with a literal.

See more on https://sonarcloud.io/project/issues?id=StackGuardian_policy-framework&issues=AZ_xcQ-q3mOD4nGHFZK3&open=AZ_xcQ-q3mOD4nGHFZK3&pullRequest=272

Check failure on line 74 in src/tirith/platform/report.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 28 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=StackGuardian_policy-framework&issues=AZ_xcRDl3mOD4nGHFZLB&open=AZ_xcRDl3mOD4nGHFZLB&pullRequest=272

Check warning on line 51 in setup.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this commented out code.

See more on https://sonarcloud.io/project/issues?id=StackGuardian_policy-framework&issues=AZ_xcRKU3mOD4nGHFZLi&open=AZ_xcRKU3mOD4nGHFZLi&pullRequest=272

Check failure on line 110 in src/tirith/platform/client.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 21 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=StackGuardian_policy-framework&issues=AZ_xcREE3mOD4nGHFZLI&open=AZ_xcREE3mOD4nGHFZLI&pullRequest=272

Check failure on line 336 in src/tirith/platform/redact.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 20 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=StackGuardian_policy-framework&issues=AZ_xcRD53mOD4nGHFZLG&open=AZ_xcRD53mOD4nGHFZLG&pullRequest=272

Check failure on line 488 in src/tirith/platform/check.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

LLMs running this code with faulty CLI arguments can escape file system restrictions. Refactor this code to validate the constructed path before accessing the file system.

See more on https://sonarcloud.io/project/issues?id=StackGuardian_policy-framework&issues=AZ_xcREZ3mOD4nGHFZLO&open=AZ_xcREZ3mOD4nGHFZLO&pullRequest=272

Check warning on line 317 in src/tirith/platform/report.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Add replacement fields or use a normal string instead of an f-string.

See more on https://sonarcloud.io/project/issues?id=StackGuardian_policy-framework&issues=AZ_xcRDl3mOD4nGHFZLC&open=AZ_xcRDl3mOD4nGHFZLC&pullRequest=272

Check warning on line 53 in tests/providers/json/playbook_ansible_lint.yml

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Make sure granting access to others is safe here.

See more on https://sonarcloud.io/project/issues?id=StackGuardian_policy-framework&issues=AZ_xcRJD3mOD4nGHFZLT&open=AZ_xcRJD3mOD4nGHFZLT&pullRequest=272

Check failure on line 41 in src/tirith/platform/cli.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

LLMs running this code with faulty CLI arguments can escape file system restrictions. Refactor this code to validate the constructed path before accessing the file system.

See more on https://sonarcloud.io/project/issues?id=StackGuardian_policy-framework&issues=AZ_xcRDS3mOD4nGHFZK-&open=AZ_xcRDS3mOD4nGHFZK-&pullRequest=272

Check failure on line 205 in src/tirith/platform/archive.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 29 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=StackGuardian_policy-framework&issues=AZ_xcREN3mOD4nGHFZLJ&open=AZ_xcREN3mOD4nGHFZLJ&pullRequest=272

Check failure on line 78 in src/tirith/platform/check.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 17 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=StackGuardian_policy-framework&issues=AZ_xcREZ3mOD4nGHFZLL&open=AZ_xcREZ3mOD4nGHFZLL&pullRequest=272

Check warning on line 84 in src/tirith/platform/cli.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Merge these implicitly concatenated strings; or did you forget a comma?

See more on https://sonarcloud.io/project/issues?id=StackGuardian_policy-framework&issues=AZ_xcRDS3mOD4nGHFZK8&open=AZ_xcRDS3mOD4nGHFZK8&pullRequest=272

Check failure on line 119 in src/tirith/platform/discover.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

LLMs running this code with faulty CLI arguments can escape from shell sandboxes. Refactor this code to validate untrusted data before passing them to OS commands.

See more on https://sonarcloud.io/project/issues?id=StackGuardian_policy-framework&issues=AZ_xcRDb3mOD4nGHFZLA&open=AZ_xcRDb3mOD4nGHFZLA&pullRequest=272

Check warning on line 116 in tests/providers/json/playbook_ansible_lint.yml

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Make sure granting access to others is safe here.

See more on https://sonarcloud.io/project/issues?id=StackGuardian_policy-framework&issues=AZ_xcRJD3mOD4nGHFZLV&open=AZ_xcRJD3mOD4nGHFZLV&pullRequest=272

Check warning on line 89 in tests/test_readme_is_current.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Split this composite assertion into separate assertions.

See more on https://sonarcloud.io/project/issues?id=StackGuardian_policy-framework&issues=AZ_xcRKB3mOD4nGHFZLh&open=AZ_xcRKB3mOD4nGHFZLh&pullRequest=272

Check warning on line 181 in tests/providers/json/playbook_ansible_lint.yml

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Make sure granting access to others is safe here.

See more on https://sonarcloud.io/project/issues?id=StackGuardian_policy-framework&issues=AZ_xcRJD3mOD4nGHFZLX&open=AZ_xcRJD3mOD4nGHFZLX&pullRequest=272

Check warning on line 154 in tests/platform/test_check.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Split this composite assertion into separate assertions.

See more on https://sonarcloud.io/project/issues?id=StackGuardian_policy-framework&issues=AZ_xcRJN3mOD4nGHFZLa&open=AZ_xcRJN3mOD4nGHFZLa&pullRequest=272

Check warning on line 93 in src/tirith/core/core.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace this constructor call with a literal.

See more on https://sonarcloud.io/project/issues?id=StackGuardian_policy-framework&issues=AZ_xcQ-q3mOD4nGHFZK4&open=AZ_xcQ-q3mOD4nGHFZK4&pullRequest=272

Check failure on line 119 in src/tirith/platform/discover.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

LLMs running this code with faulty CLI arguments can escape from shell sandboxes. Refactor this code to validate untrusted OS commands before using them.

See more on https://sonarcloud.io/project/issues?id=StackGuardian_policy-framework&issues=AZ_xcRDb3mOD4nGHFZK_&open=AZ_xcRDb3mOD4nGHFZK_&pullRequest=272