[SG-4885] feat(platform): tirith platform check — a pre-plan policy step, no platform changes - #272
[SG-4885] feat(platform): tirith platform check — a pre-plan policy step, no platform changes#272refeed wants to merge 42 commits into
tirith platform check — a pre-plan policy step, no platform changes#272SonarQube Cloud analysis failed
❌ The last analysis has failed.
Annotations
Check warning on line 267 in src/tirith/core/core.py
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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