Skip to content

feat(cli): predefined policy packs — run many policies in one invocation - #364

Open
refeed wants to merge 2 commits into
mainfrom
sg-predefined-packs
Open

feat(cli): predefined policy packs — run many policies in one invocation#364
refeed wants to merge 2 commits into
mainfrom
sg-predefined-packs

feat(cli): run many policies in one invocation, and bundle the first …

660d25d
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis cancelled Sep 4, 2026 in 19s

SonarQube Cloud analysis failed

❌ The last analysis has failed.

See analysis details on SonarQube Cloud

Annotations

Check failure on line 294 in tools/sync_pack.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=AaBra9k5yWo4wePYoN15&open=AaBra9k5yWo4wePYoN15&pullRequest=364

Check failure on line 354 in src/tirith/core/core.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=AaBra9ZkyWo4wePYoN1n&open=AaBra9ZkyWo4wePYoN1n&pullRequest=364

Check failure on line 312 in tools/sync_pack.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Change this code to not construct the path from user-controlled data.

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

Check failure on line 259 in tools/sync_pack.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

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

Check warning on line 62 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=AaBra9lWyWo4wePYoN17&open=AaBra9lWyWo4wePYoN17&pullRequest=364

Check warning on line 74 in src/tirith/packs/__init__.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

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

Check failure on line 149 in tools/sync_pack.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=AaBra9k5yWo4wePYoN14&open=AaBra9k5yWo4wePYoN14&pullRequest=364

Check failure on line 358 in tools/sync_pack.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=AaBra9k5yWo4wePYoN16&open=AaBra9k5yWo4wePYoN16&pullRequest=364

Check warning on line 136 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=AaBra9ZkyWo4wePYoN1i&open=AaBra9ZkyWo4wePYoN1i&pullRequest=364

Check failure on line 137 in tools/sync_pack.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=AaBra9k5yWo4wePYoN1z&open=AaBra9k5yWo4wePYoN1z&pullRequest=364

Check failure on line 312 in tools/sync_pack.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=AaBra9k5yWo4wePYoN11&open=AaBra9k5yWo4wePYoN11&pullRequest=364

Check warning on line 126 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=AaBra9ZkyWo4wePYoN1g&open=AaBra9ZkyWo4wePYoN1g&pullRequest=364

Check failure on line 170 in src/tirith/core/core.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

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

Check failure on line 29 in src/tirith/prettyprinter.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this assignment; "GREY" is assigned again on line 37.

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

Check warning on line 272 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=AaBra9ZkyWo4wePYoN1k&open=AaBra9ZkyWo4wePYoN1k&pullRequest=364

Check warning on line 331 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=AaBra9ZkyWo4wePYoN1l&open=AaBra9ZkyWo4wePYoN1l&pullRequest=364

Check failure on line 415 in src/tirith/core/core.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use "logging.exception()" instead.

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

Check failure on line 354 in tools/sync_pack.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=AaBra9k5yWo4wePYoN13&open=AaBra9k5yWo4wePYoN13&pullRequest=364

Check failure on line 48 in src/tirith/cli.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=AaBra9iWyWo4wePYoN1t&open=AaBra9iWyWo4wePYoN1t&pullRequest=364

Check failure on line 139 in src/tirith/prettyprinter.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

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

Check failure on line 118 in tools/sync_pack.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=AaBra9k5yWo4wePYoN10&open=AaBra9k5yWo4wePYoN10&pullRequest=364

Check failure on line 285 in tools/sync_pack.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=AaBra9k5yWo4wePYoN12&open=AaBra9k5yWo4wePYoN12&pullRequest=364

Check warning on line 131 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=AaBra9ZkyWo4wePYoN1h&open=AaBra9ZkyWo4wePYoN1h&pullRequest=364

Check failure on line 47 in src/tirith/packs/__init__.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=AaBra9hFyWo4wePYoN1q&open=AaBra9hFyWo4wePYoN1q&pullRequest=364

Check warning on line 251 in tools/sync_pack.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use concise character class syntax '\d' instead of '[0-9]'.

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