From b19f1fd1c46b8ab33c36b892ee667dc0951b35bc Mon Sep 17 00:00:00 2001 From: Dani Alcala <112832187+clavedeluna@users.noreply.github.com> Date: Mon, 9 Jun 2025 10:09:07 -0300 Subject: [PATCH 1/4] Fix failing upload sonar results (#1066) upgrade action --- .github/workflows/sonar_pixee.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sonar_pixee.yml b/.github/workflows/sonar_pixee.yml index d590b142..2802d749 100644 --- a/.github/workflows/sonar_pixee.yml +++ b/.github/workflows/sonar_pixee.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest if: ${{ github.event.check_run.name == 'SonarCloud Code Analysis' }} steps: - - uses: pixee/upload-tool-results-action@v2 + - uses: pixee/upload-tool-results-action@v2.5.0 with: tool: sonar sonar-token: ${{ secrets.SONAR_TOKEN }} From 4c0b7ebae113ec7a84f80652edb1c1551b4ab808 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 12 Jun 2025 12:36:10 -0300 Subject: [PATCH 2/4] Update stefanzweifel/git-auto-commit-action action to v6 (#1069) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/autoformat-pixeebot-prs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/autoformat-pixeebot-prs.yaml b/.github/workflows/autoformat-pixeebot-prs.yaml index 560abe64..9baa1cc0 100644 --- a/.github/workflows/autoformat-pixeebot-prs.yaml +++ b/.github/workflows/autoformat-pixeebot-prs.yaml @@ -27,6 +27,6 @@ jobs: run: black . - name: Commit and push changes - uses: stefanzweifel/git-auto-commit-action@v5 + uses: stefanzweifel/git-auto-commit-action@v6 with: commit_message: ":art: Apply formatting" From 6c101d30acc5be622063d5114f547dd0832cc9d2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 12 Jun 2025 15:32:30 -0300 Subject: [PATCH 3/4] Update all non-major dependencies (#1067) Update all non-major dependencies && fix numpy py 3.10 Co-authored-by: clavedeluna --- pyproject.toml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index bc4af611..356cb79b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,11 +52,11 @@ get-hashes = 'codemodder.scripts.get_hashes:main' [project.optional-dependencies] semgrep = [ - "semgrep>=1.123,<1.124", + "semgrep>=1.125,<1.126", ] test = [ "azure-ai-inference>=1.0.0b1,<2.0", - "coverage>=7.8,<7.9", + "coverage>=7.9,<7.10", "coverage-threshold~=0.4", "defusedxml==0.7.1", "types-defusedxml==0.7.0.20250516", @@ -67,7 +67,7 @@ test = [ "Jinja2~=3.1.2", "jsonschema~=4.24.0", "lxml>=5.3.0,<6.0.0", - "openai>=1.84,<1.85", + "openai>=1.86,<1.87", "mock==5.2.*", "pre-commit<5", "Pyjwt~=2.10.0", @@ -81,19 +81,20 @@ test = [ "security==1.3.1", "types-mock==5.2.*", "django>=4,<6", - "numpy~=2.2.1", + "numpy ~= 2.2.1; python_version == '3.10'", + "numpy ~= 2.3.0; python_version > '3.10'", "flask_wtf~=1.2.0", "fickling~=0.1.0,>=0.1.3", "graphql-server~=3.0.0b7", "unidiff>=0.7.5", - "semgrep>=1.123,<1.124", + "semgrep>=1.125,<1.126", ] complexity = [ "radon==6.0.*", "xenon==0.9.*", ] openai = [ - "openai>=1.84,<1.85", + "openai>=1.86,<1.87", ] azure = [ "azure-ai-inference>=1.0.0b1,<2.0", From 00100409105bf15e42c5dc218060181d3a0926c7 Mon Sep 17 00:00:00 2001 From: Dan D'Avella Date: Wed, 18 Jun 2025 13:29:29 -0400 Subject: [PATCH 4/4] Do not filter Sonar results by status (#1072) --- src/core_codemods/sonar/results.py | 3 +-- tests/test_results.py | 33 ------------------------------ 2 files changed, 1 insertion(+), 35 deletions(-) diff --git a/src/core_codemods/sonar/results.py b/src/core_codemods/sonar/results.py index 2c6025ae..26ac9de4 100644 --- a/src/core_codemods/sonar/results.py +++ b/src/core_codemods/sonar/results.py @@ -120,8 +120,7 @@ def from_json(cls, json_file: str | Path) -> Self: result_set = cls() for result in data.get("issues", []) + data.get("hotspots", []): - if result["status"].lower() in ("open", "to_review"): - result_set.add_result(SonarResult.from_result(result)) + result_set.add_result(SonarResult.from_result(result)) return result_set except Exception: diff --git a/tests/test_results.py b/tests/test_results.py index 97990596..34ef8592 100644 --- a/tests/test_results.py +++ b/tests/test_results.py @@ -216,39 +216,6 @@ def test_or(self, tmpdir): result2["python:S5659"][Path("code.py")][0], ] - def test_sonar_only_open_issues(self, tmpdir): - issues = { - "issues": [ - { - "rule": "python:S5659", - "status": "OPEN", - "component": "code.py", - "textRange": { - "startLine": 1, - "endLine": 1, - "startOffset": 1, - "endOffset": 1, - }, - }, - { - "rule": "python:S5659", - "status": "RESOLVED", - "component": "code.py", - "textRange": { - "startLine": 1, - "endLine": 1, - "startOffset": 1, - "endOffset": 1, - }, - }, - ] - } - sonar_json1 = Path(tmpdir) / "sonar1.json" - sonar_json1.write_text(json.dumps(issues)) - - result = SonarResultSet.from_json(sonar_json1) - assert len(result["python:S5659"][Path("code.py")]) == 1 - def test_sonar_flows(self, tmpdir): issues = { "issues": [