3421 Commits

Author SHA1 Message Date
SonarTech
c40e726e6c update coverage information 2023-09-28 00:32:52 +00:00
Sylvain Kuchen
6ac44b3040
Modify rule S6320: Adapt to LaYC format (#3158) 2023-09-27 17:45:38 +02:00
Anton Haubner
f0dc2a21ea
Modify rule S6466: Extend LaYC content (#3156) 2023-09-27 15:16:22 +02:00
Fred Tingaud
40852c33d9
Frontend: Simplify the code a little 2023-09-27 10:22:15 +02:00
github-actions[bot]
077b76f3ab
Create rule S6745(java): Detection of the Local Butterfly object dependencies anti-pattern (#3007) 2023-09-26 15:48:40 +02:00
Fred Tingaud
51e34f4a2f
Update GitHub actions to avoid deprecated Node version
Following Node12's deprecation by GitHub, we started getting the
following message:
```
create_new_rule
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions/setup-python@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
```

From the doc of these actions, it looks like just upgrading the versions
should work transparently.
2023-09-26 11:11:10 +02:00
SonarTech
8238b22e12 update coverage information 2023-09-26 00:32:50 +00:00
Loris S
3529b90ddb
SONARIAC-583 Modify S6437(docker): Add Wget samples (#2981)
To merge when SONARIAC-583 is complete.
2023-09-25 15:46:48 +02:00
Mary Georgiou
6730601ee4
Modify rule: Delete S4834 (#3144) 2023-09-25 15:34:15 +02:00
Mary Georgiou
559d01a710
Modify rule: Delete S4564 (#3136) 2023-09-25 15:34:01 +02:00
Mary Georgiou
1f4ac7c911
Modify rule: Delete S2228 (#3130) 2023-09-25 15:29:49 +02:00
Mary Georgiou
08ee29134e
Modify rule: Delete S4784 (#3132) 2023-09-25 15:28:22 +02:00
Peter Trifanov
1e518308f3
Modify rule S6597: Update wording for LaYC (#3139) 2023-09-25 13:24:32 +00:00
Rudy Regazzoni
c8a38c91dd
Modify rule S6579: apply LaYC format (#3124)
## Review

A dedicated reviewer checked the rule description successfully for:

- [ ] logical errors and incorrect information
- [ ] information gaps and missing content
- [ ] text style and tone
- [ ] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)

---------

Co-authored-by: Marcin Stachniuk <marcin.stachniuk@sonarsource.com>
2023-09-25 15:04:40 +02:00
Jonas Wielage
c101d61c31
Modify rule S6504: Update code example (#3143) 2023-09-25 13:59:44 +02:00
Peter Trifanov
fd8de68430
Modify rule S6505: Fix FN by mentioning standalone yarn command (#3142) 2023-09-25 11:15:10 +00:00
Jonas Wielage
ac6f02dce3
Modify rule S6500: Update code example (#3141) 2023-09-25 13:11:19 +02:00
Rudy Regazzoni
62dc9768f1
Modify rule S5899: Add exception on public static method that return data (#2897) 2023-09-25 12:53:02 +02:00
Jonas Wielage
180ec50cb2
Modify rule S6504: Update code example (#3138) 2023-09-25 12:41:03 +02:00
github-actions[bot]
4f164efd1f
Create rule S6781: JWT secret keys should not be disclosed (#3101) 2023-09-25 12:31:17 +02:00
Jonas Wielage
83ff995dfb
Modify S6589: Update description and include more code examples (#3137) 2023-09-25 11:08:03 +02:00
Peter Trifanov
9477d715fd
Modify rule S6570: Convert to LaYC format (#3127) 2023-09-25 08:31:58 +00:00
Yassin Kammoun
ba9ed3e319
Modify rule S4822: Avoid repetitive usage of 'await' (#3135) 2023-09-25 09:52:55 +02:00
daniel-teuchert-sonarsource
9372724e74
Modify rule S5332: Improve RSPEC text and examples (APPSEC-1089) (#3095)
## Review

A dedicated reviewer checked the rule description successfully for:

- [x] logical errors and incorrect information
- [x] information gaps and missing content
- [x] text style and tone
- [ ] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-09-25 09:39:16 +02:00
SonarTech
8e635ff5a6 update coverage information 2023-09-23 00:32:42 +00:00
dependabot[bot]
1430fad659
Bump gitpython from 3.1.32 to 3.1.34 in /rspec-tools (#3020)
Bumps [gitpython](https://github.com/gitpython-developers/GitPython)
from 3.1.32 to 3.1.34.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/gitpython-developers/GitPython/releases">gitpython's
releases</a>.</em></p>
<blockquote>
<h2>3.1.34 - fix resource leaking</h2>
<h2>What's Changed</h2>
<ul>
<li>util: close lockfile after opening successfully by <a
href="https://github.com/skshetry"><code>@​skshetry</code></a> in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1639">gitpython-developers/GitPython#1639</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/skshetry"><code>@​skshetry</code></a>
made their first contribution in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1639">gitpython-developers/GitPython#1639</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/gitpython-developers/GitPython/compare/3.1.33...3.1.34">https://github.com/gitpython-developers/GitPython/compare/3.1.33...3.1.34</a></p>
<h2>v3.1.33 - with security fix</h2>
<h2>What's Changed</h2>
<ul>
<li>WIP Quick doc by <a
href="https://github.com/LeoDaCoda"><code>@​LeoDaCoda</code></a> in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1608">gitpython-developers/GitPython#1608</a></li>
<li>Partial clean up wrt mypy and black by <a
href="https://github.com/bodograumann"><code>@​bodograumann</code></a>
in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1617">gitpython-developers/GitPython#1617</a></li>
<li>Disable merge_includes in config writers by <a
href="https://github.com/bodograumann"><code>@​bodograumann</code></a>
in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1618">gitpython-developers/GitPython#1618</a></li>
<li>feat: full typing for &quot;progress&quot; parameter in Repo class
by <a
href="https://github.com/madebylydia"><code>@​madebylydia</code></a> in
<a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1634">gitpython-developers/GitPython#1634</a></li>
<li>Fix CVE-2023-40590 by <a
href="https://github.com/EliahKagan"><code>@​EliahKagan</code></a> in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1636">gitpython-developers/GitPython#1636</a></li>
<li><a
href="https://redirect.github.com/gitpython-developers/GitPython/issues/1566">#1566</a>
Creating a lock now uses python built-in &quot;open()&quot; method to
work arou… by <a
href="https://github.com/HageMaster3108"><code>@​HageMaster3108</code></a>
in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1619">gitpython-developers/GitPython#1619</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/LeoDaCoda"><code>@​LeoDaCoda</code></a>
made their first contribution in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1608">gitpython-developers/GitPython#1608</a></li>
<li><a
href="https://github.com/bodograumann"><code>@​bodograumann</code></a>
made their first contribution in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1617">gitpython-developers/GitPython#1617</a></li>
<li><a
href="https://github.com/EliahKagan"><code>@​EliahKagan</code></a> made
their first contribution in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1636">gitpython-developers/GitPython#1636</a></li>
<li><a
href="https://github.com/HageMaster3108"><code>@​HageMaster3108</code></a>
made their first contribution in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1619">gitpython-developers/GitPython#1619</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/gitpython-developers/GitPython/compare/3.1.32...3.1.33">https://github.com/gitpython-developers/GitPython/compare/3.1.32...3.1.33</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="2a2ae77682"><code>2a2ae77</code></a>
prepare patch release</li>
<li><a
href="47147406a5"><code>4714740</code></a>
Merge pull request <a
href="https://redirect.github.com/gitpython-developers/GitPython/issues/1639">#1639</a>
from skshetry/close-lockfile</li>
<li><a
href="3e829eb516"><code>3e829eb</code></a>
util: close lockfile after opening successfully</li>
<li><a
href="f882cd8422"><code>f882cd8</code></a>
update instructions for how to create a release</li>
<li><a
href="993f04588a"><code>993f045</code></a>
prepare for next release</li>
<li><a
href="a1c472bd31"><code>a1c472b</code></a>
Merge pull request <a
href="https://redirect.github.com/gitpython-developers/GitPython/issues/1619">#1619</a>
from HageMaster3108/bugfix/use-python-builtin-open-m...</li>
<li><a
href="70924c4265"><code>70924c4</code></a>
Skip now permanently failing test with note on how to fix it</li>
<li><a
href="8b75434e2c"><code>8b75434</code></a>
Merge pull request <a
href="https://redirect.github.com/gitpython-developers/GitPython/issues/1636">#1636</a>
from EliahKagan/cve-2023-40590</li>
<li><a
href="7611cd909b"><code>7611cd9</code></a>
Don't check form of version number</li>
<li><a
href="94e0fb0794"><code>94e0fb0</code></a>
Add a unit test for CVE-2023-40590</li>
<li>Additional commits viewable in <a
href="https://github.com/gitpython-developers/GitPython/compare/3.1.32...3.1.34">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=gitpython&package-manager=pip&previous-version=3.1.32&new-version=3.1.34)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/SonarSource/rspec/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-22 19:31:23 +02:00
Loris S
45ac440650
Modify S6721(secrets): Add samples (#3129)
## Review

A dedicated reviewer checked the rule description successfully for:

- [ ] logical errors and incorrect information
- [ ] information gaps and missing content
- [ ] text style and tone
- [ ] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-09-22 17:01:54 +02:00
Loris S
98d6ce5ed8
Modify S6710(secrets): Improve sample (#3131)
## Review

A dedicated reviewer checked the rule description successfully for:

- [ ] logical errors and incorrect information
- [ ] information gaps and missing content
- [ ] text style and tone
- [ ] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-09-22 17:00:16 +02:00
Fred Tingaud
85cd5be80e
Modify rule S995: LaYC - const pointers 2023-09-22 14:47:43 +00:00
Fred Tingaud
e261bd4b21
Fix Sonar warnings
Fix a bunch of Sonar warnings that somehow appear as "New warnings"
although they are a few years old.
2023-09-22 14:41:56 +00:00
Loris S
4d9f53d097
Modify S6710: Improve the sample (#3128)
## Review

A dedicated reviewer checked the rule description successfully for:

- [ ] logical errors and incorrect information
- [ ] information gaps and missing content
- [ ] text style and tone
- [ ] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-09-22 16:08:04 +02:00
Jonas Wielage
1fcecf9260
Modify rule S6587 Add more detailed explanation, split code examples (#3123) 2023-09-22 15:56:40 +02:00
github-actions[bot]
4e18d867c2
Create rule S6783(secrets): Infura API keys should not be disclosed (#3125)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6783/secrets)
(updated a few minutes after each push).

## Review

A dedicated reviewer checked the rule description successfully for:

- [ ] logical errors and incorrect information
- [ ] information gaps and missing content
- [ ] text style and tone
- [ ] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)

---------

Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com>
2023-09-22 14:49:05 +02:00
Loris S
b05b739359
Modify S6723(secrets): Improve code sample (#3126)
## Review

A dedicated reviewer checked the rule description successfully for:

- [ ] logical errors and incorrect information
- [ ] information gaps and missing content
- [ ] text style and tone
- [ ] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-09-22 14:17:57 +02:00
github-actions[bot]
f31215c37b
Create rule S1244: Floating point numbers should not be tested for equality (#2953)
Co-authored-by: Guillaume Dequenne <guillaume.dequenne@sonarsource.com>
2023-09-22 14:08:50 +02:00
github-actions[bot]
0f8c733e9b
Create rule S6727: The abs_tol parameter should be provided when using math.isclose to compare values to 0 (#2957)
Co-authored-by: Guillaume Dequenne <guillaume.dequenne@sonarsource.com>
2023-09-22 14:08:09 +02:00
github-actions[bot]
3a47405fd1
Create rule S6709: Results that depend on random number generation should be reproducible (#2922)
Co-authored-by: Guillaume Dequenne <guillaume.dequenne@sonarsource.com>
2023-09-22 14:07:41 +02:00
Loris S
cf35afd3dd
Modify S6698&S6703&S6697: Add a warning against default values (#3121)
## Review

A dedicated reviewer checked the rule description successfully for:

- [ ] logical errors and incorrect information
- [ ] information gaps and missing content
- [ ] text style and tone
- [ ] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)

---------

Co-authored-by: daniel-teuchert-sonarsource <141642369+daniel-teuchert-sonarsource@users.noreply.github.com>
2023-09-22 10:48:47 +00:00
github-actions[bot]
44e2e766ed
Create rule S6711: numpy.random.Generator should be preferred to numpy.random.RandomState (#2924)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6711/python)
(updated a few minutes after each push).

## Review

A dedicated reviewer checked the rule description successfully for:

- [ ] logical errors and incorrect information
- [ ] information gaps and missing content
- [ ] text style and tone
- [ ] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)

---------

Co-authored-by: guillaume-dequenne-sonarsource <guillaume-dequenne-sonarsource@users.noreply.github.com>
Co-authored-by: Guillaume Dequenne <guillaume.dequenne@sonarsource.com>
Co-authored-by: David Kunzmann <david.kunzmann@sonarsource.com>
2023-09-22 12:11:48 +02:00
github-actions[bot]
a62f01bd72
Create rule S6714: Passing a list to np.array should be preferred over passing a generator. (#2934)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6714/python)
(updated a few minutes after each push).

## Review

A dedicated reviewer checked the rule description successfully for:

- [ ] logical errors and incorrect information
- [ ] information gaps and missing content
- [ ] text style and tone
- [ ] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)

---------

Co-authored-by: joke1196 <joke1196@users.noreply.github.com>
Co-authored-by: David Kunzmann <david.kunzmann@sonarsource.com>
2023-09-22 12:10:54 +02:00
github-actions[bot]
7f827147d1
Create rule S6729: np.nonzero should be preferred over np.where when only the condition parameter is set. (#2966)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6729/python)
(updated a few minutes after each push).

## Review

A dedicated reviewer checked the rule description successfully for:

- [ ] logical errors and incorrect information
- [ ] information gaps and missing content
- [ ] text style and tone
- [ ] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)

---------

Co-authored-by: joke1196 <joke1196@users.noreply.github.com>
Co-authored-by: David Kunzmann <david.kunzmann@sonarsource.com>
2023-09-22 12:10:31 +02:00
github-actions[bot]
8bbfc36d29
Create rule S6730: Deprecated NumPy aliases of built-in types should not be used (#2970)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6730/python)
(updated a few minutes after each push).

## Review

A dedicated reviewer checked the rule description successfully for:

- [ ] logical errors and incorrect information
- [ ] information gaps and missing content
- [ ] text style and tone
- [ ] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)

---------

Co-authored-by: guillaume-dequenne-sonarsource <guillaume-dequenne-sonarsource@users.noreply.github.com>
Co-authored-by: David Kunzmann <david.kunzmann@sonarsource.com>
2023-09-22 12:09:54 +02:00
github-actions[bot]
4a8cbac06e
Create rule S6725: Equality checks should not be made against "numpy.nan" (#2955)
You can preview this rule [here](https://sonarsource.github.io/rspec/#/rspec/S6725/python) (updated a few minutes after each push).

## Review

A dedicated reviewer checked the rule description successfully for:

- [ ] logical errors and incorrect information
- [ ] information gaps and missing content
- [ ] text style and tone
- [ ] PR summary and labels follow [the guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)

Co-authored-by: maksim-grebeniuk-sonarsource <maksim-grebeniuk-sonarsource@users.noreply.github.com>
Co-authored-by: Maksim Grebeniuk <maksim.grebeniuk@sonarsource.com>
2023-09-22 12:09:04 +02:00
Rudy Regazzoni
d5421351e4
Modify rule S6584: apply LaYC format (#3114)
## Review

A dedicated reviewer checked the rule description successfully for:

- [ ] logical errors and incorrect information
- [ ] information gaps and missing content
- [ ] text style and tone
- [ ] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-09-22 10:06:59 +02:00
daniel-teuchert-sonarsource
3240e40cd3
APPSEC-1125: S6692 Adjust example to contain correct secret format (#3120)
## Review

A dedicated reviewer checked the rule description successfully for:

- [ ] logical errors and incorrect information
- [ ] information gaps and missing content
- [ ] text style and tone
- [ ] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-09-22 09:40:55 +02:00
Fred Tingaud
30eecd5a92
Modify rule S3457: LaYC format 2023-09-22 09:05:34 +02:00
Fred Tingaud
d557e135b5
Modify rule S1659: LaYC format 2023-09-22 08:51:01 +02:00
Fred Tingaud
bb0e7f4bfe
Modify rule S5276: LaYC format 2023-09-22 08:45:40 +02:00
SonarTech
e9a7aae10f update coverage information 2023-09-22 00:33:40 +00:00
Peter Trifanov
de8e059b1f
S6506, S6584, S6587 Change links to 3-rd party resources (#3122) 2023-09-21 17:20:01 +02:00