Conversation
Merging the release exposed a batch of SonarCloud findings that the PR gates never saw, because a PR only rates its own diff. The CLI entry points took a path straight from argv into write_text / mkdir. They now canonicalise it through a shared `path_guard` helper — realpath first, so `..` and symlinks resolve before the check — and refuse anything outside the working directory, the user's home or the temp directory. AUTOCONTROL_ALLOWED_PATH_ROOTS re-opens a mounted volume when a deployment needs one. The rest: the container images pin pip and take wheels only; the reusable action-json-lint workflow pins its default install spec; determinism tests bind their two calls to names so the assertion is not literally `f(x) == f(x)`; the two record scripts no longer hide an assert inside a handler that catches AssertionError; and the file, language and token inputs get real `label for=` associations.
The runtime layer resolved and built its dependencies straight from PyPI, so a rebuild could pick up a different set and any sdist in the graph got to run its setup script inside the image. A throwaway builder stage now produces every wheel, and the runtime installs with --only-binary and --no-index against that directory — nothing new can be fetched there. Drop the two suppressions that turned out to be inert: NOSONAR is not honoured inside a Dockerfile or a `run: |` block, so they were noise.
…de-cleanup Bound CLI paths and clear the new-code findings on main
|
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 29 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Ships #461 to
main, which is where the branch quality gate went red after the previous release.utils/path_guard/: operator-supplied CLI paths are canonicalised withos.path.realpathand bounded to the working directory, home or temp dir (AUTOCONTROL_ALLOWED_PATH_ROOTSextends it). Wired intostubs.generator,config_bundleandturn_config.--only-binary :all: --no-index, so nothing new can be pulled there.total_recordscripts no longer hide anassertinside a handler that catchesAssertionError, and the file / language / token inputs get reallabel for=associations.