Compare commits

...

4954 Commits

Author SHA1 Message Date
hashicorp-vault-sonar-prod[bot]
efc8e97d40
update coverage information (#4859)
Co-authored-by: SonarTech <sonartech@sonarsource.com>
2025-03-29 02:48:10 +00:00
Egon Okerman
ae0dfb3126
Update rule S7409: Clarify rule title and rule text (SONARKT-637) (#4826)
* Update rule title and text according to previous discussion

* Fix typo

* Add references to S6362 and S7409 in both rules' descriptions
2025-03-28 12:55:14 +00:00
github-actions[bot]
cc01781c31
Create rule S6096: add Kotlin (SONARSEC-6157) (#4846)
* Add kotlin to rule S6096

* Add Kotlin rule description, update Java SE name

* Apply suggestions from code review

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

---------

Co-authored-by: christophe-zurn-sonarsource <christophe-zurn-sonarsource@users.noreply.github.com>
Co-authored-by: Christophe Zurn <christophe.zurn@sonarsource.com>
Co-authored-by: Christophe Zürn <36889251+christophe-zurn-sonarsource@users.noreply.github.com>
Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>
2025-03-28 10:48:21 +00:00
hashicorp-vault-sonar-prod[bot]
5acd6984d0
update coverage information (#4856)
Co-authored-by: SonarTech <sonartech@sonarsource.com>
2025-03-28 02:49:31 +00:00
github-actions[bot]
4e3c0d465a
Create rule S2083: add Kotlin (SONARSEC-6155) (#4838)
* Add kotlin to rule S2083

* Add Kotlin rule description, update Java SE name, minor java fix

* Apply review comments

---------

Co-authored-by: christophe-zurn-sonarsource <christophe-zurn-sonarsource@users.noreply.github.com>
Co-authored-by: Christophe Zurn <christophe.zurn@sonarsource.com>
2025-03-27 10:23:23 +00:00
Rudy Regazzoni
266cde4510
SONARGO-118 Update S2068 exception category (#4823) 2025-03-27 09:26:11 +00:00
hashicorp-vault-sonar-prod[bot]
538d0b0b4f
update coverage information (#4849)
Co-authored-by: SonarTech <sonartech@sonarsource.com>
2025-03-27 02:49:10 +00:00
Egon Okerman
6b9c19eceb
Update rule S7201: Disable rule and move rule text to S6363 (SONARKT-636) (#4802)
* Close S7201

* Update S6363 with updated descriptions

* Update OWASP categories with S7201 info
2025-03-26 10:57:39 +00:00
github-actions[bot]
1490c6d3f0
Modify rule S3776: Add Rust (#4825)
* Add rust to rule S3776

* Update rule.adoc

---------

Co-authored-by: sallaigy <sallaigy@users.noreply.github.com>
Co-authored-by: Gyula Sallai <gyula.sallai@sonarsource.com>
2025-03-26 09:36:59 +00:00
Arseniy Zaostrovnykh
110ce01fce
Modify rule S5443(cfamily): Fix src blocks highlighting (#4837) 2025-03-26 08:36:49 +00:00
Loïc Joly
d2964e7f0b
Revert "Fix frontend_tests job long running times (#4829)" (#4836)
This workaround should no longer be required, the initial bug in SCA analysis has been fixed.

This reverts commit 1012f37ffaf9774ad41f4826ea5854ae08893ec7.
2025-03-26 06:25:52 +00:00
hashicorp-vault-sonar-prod[bot]
ccef1ab5e6
update coverage information (#4835)
Co-authored-by: SonarTech <sonartech@sonarsource.com>
2025-03-26 02:48:47 +00:00
Peter Trifanov
d4177370f1
SONARIAC-1868 S6273 should support prefixes and not be in sonar-way (#4824) 2025-03-25 15:38:55 +00:00
github-actions[bot]
f15fa27234
SONARIAC-1869 Create rule S7452 AWS resource tags should have valid format (#4821)
* Create rule S7452

* SONARIAC-1869 Create rule S7452 AWS resource tags should have valid format

---------

Co-authored-by: petertrr <petertrr@users.noreply.github.com>
Co-authored-by: Peter Trifanov <peter.trifanov@sonarsource.com>
2025-03-25 15:32:07 +00:00
Pierre-Loup
84d701ffe5
Create rule S5344 for Kotlin (SONARKT-582) (#4803)
* Create rule S5344 for Kotlin

* Apply review suggestions
2025-03-25 15:04:15 +00:00
Arseniy Zaostrovnykh
1012f37ffa
Fix frontend_tests job long running times (#4829) 2025-03-25 13:57:34 +00:00
Arseniy Zaostrovnykh
f18135cc24
Adjust update_coverage GH Action to work with Merge Queue (#4806)
* Try merging with the queue

* Provide github token

* Fix syntax

* Get GITHUB_TOKEN from vault

* Add the PR label

* Wait for the new PR to merge

* Fix working dir

* Inline the script

* Checkout master

* Install python for slack notifications

* Fix logging

* install rspec-tools

* Log actual PR-merge status

* Final adjustments

* Set check interval to 20 seconds

* Test failure

* Fix pr close command

* Revert "Test failure"

This reverts commit c3c2b845feaa047a62ef19fb34c805bf3ef7a23f.

* Update .github/workflows/update_coverage.yml

---------

Co-authored-by: Fred Tingaud <95592999+frederic-tingaud-sonarsource@users.noreply.github.com>
2025-03-21 16:58:53 +00:00
Gyula Sallai
a8ad04a813
Modify rules S106,S126,S1612,S2148,S7411,S920 Remove from SonarWay (#4820) 2025-03-21 12:54:12 +00:00
hashicorp-vault-sonar-prod[bot]
c9b1950aa9
update coverage information (#4819)
Co-authored-by: SonarTech <sonartech@sonarsource.com>
2025-03-21 11:00:05 +00:00
Arseniy Zaostrovnykh
cff5da40b3
Add line to conflict with coverage update (#4816)
* Add line to conflict with coverage update

* Add another line to engender conflict
2025-03-21 10:18:21 +00:00
Arseniy Zaostrovnykh
1dca1a1b3f
Add line to conflict with coverage update (#4814) 2025-03-21 10:06:49 +00:00
hashicorp-vault-sonar-prod[bot]
3b7ef14b40
update coverage information (#4813)
Co-authored-by: SonarTech <sonartech@sonarsource.com>
2025-03-21 09:54:17 +00:00
Arseniy Zaostrovnykh
0a35748341
Revert "Update coverage information (#4808)" (#4811)
This reverts commit e240ba5d737b0b0a465ba23a6f99a2e0d41ba5bb.
2025-03-21 09:34:52 +00:00
hashicorp-vault-sonar-prod[bot]
e240ba5d73
Update coverage information (#4808)
* Try merging with the queue

* Provide github token

* Fix syntax

* Get GITHUB_TOKEN from vault

* Add the PR label

* update coverage information

---------

Co-authored-by: Arseniy Zaostrovnykh <necto.ne@gmail.com>
Co-authored-by: SonarTech <sonartech@sonarsource.com>
2025-03-21 08:16:22 +00:00
Pierre-Loup
dd52d59602
Modify rule S6249: update message (#935)
* S6249: Update issue message

* Add secondary location

* Update code example

Remove "mynoncompliant" from the resource names.
Add language specificators for code blocks

* Apply suggestions from code review

Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>

* Update secondary location issue message

---------

Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>
2025-03-20 14:11:28 +00:00
Pierre-Loup
84ac3f2f9f
Fix missing CWE link for S5542 (#4805) 2025-03-20 13:09:00 +00:00
Pavel Mikula
bfd616337b
Update Jira project keys for T-SQL, PL/SQL and VB6 (#4804) 2025-03-20 09:57:00 +00:00
GabinL21
cd6491db81
SONARTEXT-418 Create rules S7209 to S7402 (#4801)
* SONARTEXT-418 Create rules S7209 to S7402

* SONARTEXT-418 Create rules S7209 to S7402

* SONARTEXT-418 Add PKCE to OAuth2 secrets

* SONARTEXT-418 Fix validation
2025-03-19 20:11:43 +00:00
Antonio Aversa
1a1a60f52d
SONARKT-569 Modify rule S4830: add support for WebViews (#4673)
* SONARKT-569 Modify rule S4830: add support for WebViews

* Fix list of allowed frameworks

* Add Google Support link

* Have non-compliant and compliant code examples next to each other and in diff

* Update rules/S4830/kotlin/how-to-fix-it/android-webview.adoc

Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>

* Update rules/S4830/kotlin/how-to-fix-it/android-webview.adoc

Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>

---------

Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
2025-03-19 15:31:02 +00:00
Antonio Aversa
d41b77b623
DART-213 Modify rules S1161, S7055: update descriptions and messages (#4799)
* DART-213 Modify rule S1161: update message details

* S7055: Update description

* Update rule.adoc
2025-03-19 15:28:12 +00:00
github-actions[bot]
74068df10a
Create rule S1862: Related "if/else if" statements should not have the same condition (#4687)
* Add rust to rule S1862

* Add rule description

* Fix errors

* Add link to Clippy lint

---------

Co-authored-by: sallaigy <sallaigy@users.noreply.github.com>
Co-authored-by: Gyula Sallai <gyula.sallai@sonarsource.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 15:22:56 +00:00
github-actions[bot]
164b14aedc
Create rule S107: Functions should not have too many parameters (#4699)
* Add rust to rule S107

* Update RSPEC

* Remove tag

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
Co-authored-by: Yassin Kammoun <52890329+yassin-kammoun-sonarsource@users.noreply.github.com>
2025-03-19 14:54:18 +00:00
github-actions[bot]
2713aeaed6
Create rule S3498: Field init shorthand should be used (#4727)
* Add rust to rule S3498

* Update RSPEC

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 14:46:55 +00:00
github-actions[bot]
ef35f53a80
Create rule S4325: Redundant casts should be avoided (#4729)
* Add rust to rule S4325

* Update RSPEC

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 14:46:46 +00:00
Yassin Kammoun
c5bb992c80
Create rule S1858: "to_string()" should never be called on a String value (#4730)
* Add rust to rule S1858

* Update RSPEC

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
2025-03-19 14:42:54 +00:00
github-actions[bot]
06ad3ace6f
Create rule S106: Standard outputs should not be used directly to log anything (#4735)
* Add rust to rule S106

* Update RSPEC

* Fix RSPEC

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 14:40:00 +00:00
github-actions[bot]
bd332080f2
Create rule S7439 Comparisons with overlapping ranges that are always false should not be made (#4782)
* Create rule S7439

* Update rule.adoc

* Update metadata.json

* Update rule.adoc

* Update metadata.json

---------

Co-authored-by: sallaigy <sallaigy@users.noreply.github.com>
Co-authored-by: Gyula Sallai <gyula.sallai@sonarsource.com>
2025-03-19 14:10:52 +00:00
github-actions[bot]
1de188a9e5
Create rule S7443 Calls to std::mem::transmute should not be evaluated eagerly (#4786)
* Create rule S7443

* Update metadata.json

* Update rule.adoc

* Update metadata.json

---------

Co-authored-by: sallaigy <sallaigy@users.noreply.github.com>
Co-authored-by: Gyula Sallai <gyula.sallai@sonarsource.com>
2025-03-19 14:10:47 +00:00
github-actions[bot]
d4cbb1c40b
Create rule S7449 The #[inline] attribute should not be used on trait methods without implementation (#4793)
* Create rule S7449

* Update metadata.json

* Update rule.adoc

* Update rule.adoc

* Update rule.adoc

* Update metadata.json

---------

Co-authored-by: sallaigy <sallaigy@users.noreply.github.com>
Co-authored-by: Gyula Sallai <gyula.sallai@sonarsource.com>
2025-03-19 14:10:41 +00:00
github-actions[bot]
70168e8e61
Create rule S7450 Synchronization locks should not be dropped immediately after acquisition (#4794)
* Create rule S7450

* Update metadata.json

* Update rule.adoc

* Update rule.adoc

* Update metadata.json

---------

Co-authored-by: sallaigy <sallaigy@users.noreply.github.com>
Co-authored-by: Gyula Sallai <gyula.sallai@sonarsource.com>
2025-03-19 14:10:35 +00:00
github-actions[bot]
29af6f4517
Create rule S7438 Incompatible bit masks should not be used in comparisons (#4781)
* Create rule S7438

* Update rule.adoc

* Update metadata.json

* Update metadata.json

* Update metadata.json

* Update rule.adoc

* Update metadata.json

* Update rule.adoc

---------

Co-authored-by: sallaigy <sallaigy@users.noreply.github.com>
Co-authored-by: Gyula Sallai <gyula.sallai@sonarsource.com>
2025-03-19 14:10:14 +00:00
github-actions[bot]
00d540f5ed
Create rule S7437 Variables should be swapped using std::mem::swap (#4780)
* Create rule S7437

* Update rule.adoc

* Update metadata.json

* Update metadata.json

* Update metadata.json

* Update metadata.json

* Update metadata.json

---------

Co-authored-by: sallaigy <sallaigy@users.noreply.github.com>
Co-authored-by: Gyula Sallai <gyula.sallai@sonarsource.com>
2025-03-19 14:10:07 +00:00
github-actions[bot]
a02eec56d4
Create rule S7433 Raw pointers should not be casted to slices with differently sized elements (#4774)
* Create rule S7433

* Update metadata.json

* Update rule.adoc

* Update rule.adoc

* Update metadata.json

---------

Co-authored-by: sallaigy <sallaigy@users.noreply.github.com>
Co-authored-by: Gyula Sallai <gyula.sallai@sonarsource.com>
2025-03-19 14:10:01 +00:00
github-actions[bot]
7b234485eb
Create rule S7428 Case mismatches in pattern arms of match expressions should be avoided (#4769)
* Create rule S7428

* Update rule.adoc

* Update metadata.json

* Update metadata.json

* Update metadata.json

---------

Co-authored-by: sallaigy <sallaigy@users.noreply.github.com>
Co-authored-by: Gyula Sallai <gyula.sallai@sonarsource.com>
2025-03-19 14:09:52 +00:00
github-actions[bot]
8e35213fbb
Create rule S7426 C-like enums should not have unportable variants (#4767)
* Create rule S7426

* Update rule.adoc

* Update metadata.json

* Update metadata.json

---------

Co-authored-by: sallaigy <sallaigy@users.noreply.github.com>
Co-authored-by: Gyula Sallai <gyula.sallai@sonarsource.com>
2025-03-19 14:09:47 +00:00
github-actions[bot]
c83072239e
Create rule S7424 Avoid manual PartialEq implementation with a derived Hash (#4765)
* Create rule S7424

* Update rule.adoc

* Update metadata.json

---------

Co-authored-by: sallaigy <sallaigy@users.noreply.github.com>
Co-authored-by: Gyula Sallai <gyula.sallai@sonarsource.com>
2025-03-19 14:09:42 +00:00
github-actions[bot]
b16523921f
Create rule S7417 Manual PartialOrd implementation should be avoided when Ord is derived (#4757)
* Create rule S7417

* Update rule.adoc

* Update metadata.json

* Update metadata.json

---------

Co-authored-by: sallaigy <sallaigy@users.noreply.github.com>
Co-authored-by: Gyula Sallai <gyula.sallai@sonarsource.com>
2025-03-19 14:09:19 +00:00
github-actions[bot]
cdb05a081b
Create rule S7413 Await should be used for awaitable returns in async blocks and functions (#4752)
* Create rule S7413

* Update rule.adoc

* Update metadata.json

* Update rule.adoc

* Update rule.adoc

* Update metadata.json

---------

Co-authored-by: sallaigy <sallaigy@users.noreply.github.com>
Co-authored-by: Gyula Sallai <gyula.sallai@sonarsource.com>
2025-03-19 14:09:13 +00:00
github-actions[bot]
d17e141be3
Create rule S2198: Unnecessary mathematical comparisons should not be made (#4692)
* Add rust to rule S2198

* Add rule description

* Update rule.adoc

---------

Co-authored-by: sallaigy <sallaigy@users.noreply.github.com>
Co-authored-by: Gyula Sallai <gyula.sallai@sonarsource.com>
2025-03-19 14:09:07 +00:00
github-actions[bot]
feaf726b3a
Create rule S6164: Mathematical constants should not be hardcoded (#4690)
* Add rust to rule S6164

* Add rule description

* Update rule.adoc

* Add link to Clippy lint

---------

Co-authored-by: sallaigy <sallaigy@users.noreply.github.com>
Co-authored-by: Gyula Sallai <gyula.sallai@sonarsource.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 14:08:57 +00:00
github-actions[bot]
faeaec31d0
Modify rule S5856: Add language Rust (#4678)
* Add rust to rule S5856

* Add rule description

* Fix header

* Add Clippy tag and link to Clippy lint

---------

Co-authored-by: sallaigy <sallaigy@users.noreply.github.com>
Co-authored-by: Gyula Sallai <gyula.sallai@sonarsource.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 14:08:10 +00:00
github-actions[bot]
f93da5854a
Create rule S1764: Identical expressions should not be used on both sides of a binary operator (#4681)
* Add rust to rule S1764

* Add rule description

* Whitespace

* Update metadata.json

* Fix JSON syntax

* Update rule.adoc

* Update rule.adoc

---------

Co-authored-by: sallaigy <sallaigy@users.noreply.github.com>
Co-authored-by: Gyula Sallai <gyula.sallai@sonarsource.com>
2025-03-19 14:07:55 +00:00
github-actions[bot]
aa593087ba
Create rule S6466: Accessing an array element should not trigger a panic (#4684)
* Add rust to rule S6466

* Update RSPEC

* Remove tag

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:38:59 +00:00
github-actions[bot]
5def9014ed
Create rule S6913: Clamping values with cmp::min and cmp::max should use correct ranges (#4689)
* Add rust to rule S6913

* Update RSPEC

* Remove tag

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:38:53 +00:00
github-actions[bot]
0b6c98a1f0
Create rule S4962: "std::ptr::null" should be used to denote the null pointer (#4697)
* Add rust to rule S4962

* Remove tag

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:38:48 +00:00
github-actions[bot]
e34bf94e7d
Create rule S905: Non-empty statements should change control flow or have at least one side-effect (#4698)
* Add rust to rule S905

* Update RSPEC

* Remove tag

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:38:43 +00:00
github-actions[bot]
8d3cf1eee3
Create rule S1612: Closures should be replaced with function pointers (#4700)
* Add rust to rule S1612

* Update RSPEC

* Remove tag

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:38:32 +00:00
github-actions[bot]
45cc311cd2
Create rule S2260: Rust source files should not have syntax errors (#4701)
* Add rust to rule S2260

* Update RSPEC

* Add to SonarWay

* Improve rule title

* Remove from Sonar way

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:38:25 +00:00
github-actions[bot]
99086a587d
Create rule S1116: Empty statements should be removed (#4728)
* Add rust to rule S1116

* Update RSPEC

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:38:13 +00:00
github-actions[bot]
77af1ab66a
Create rule S1488: Local variables should not be declared and then immediately returned (#4732)
* Add rust to rule S1488

* Update RSPEC

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:38:03 +00:00
github-actions[bot]
6cf7f45131
Create rule S920: Match expression conditions should not have boolean type (#4733)
* Add rust to rule S920

* Update RSPEC

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:37:58 +00:00
github-actions[bot]
982f059788
Create rule S4275: Getters should access the expected fields (#4734)
* Add rust to rule S4275

* Update RSPEC

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:37:54 +00:00
github-actions[bot]
dc98004888
Create rule S2193: "while" loop counters should not have floating type (#4736)
* Add rust to rule S2193

* Update RSPEC

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:37:42 +00:00
github-actions[bot]
90a9b01d26
Create rule S7089: Inline vector literals should be preferred to chains of insertions (#4741)
* Add rust to rule S7089

* Update RSPEC

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:37:38 +00:00
github-actions[bot]
ff68a34119
Create rule S2148: Underscores should be used to make large numbers readable (#4742)
* Add rust to rule S2148

* Update RSPEC

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:37:35 +00:00
github-actions[bot]
6ca7dd2cc6
Create rule S2208: Wildcard imports should not be used (#4743)
* Add rust to rule S2208

* Update RSPEC

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:37:31 +00:00
github-actions[bot]
06526591dd
Create rule S7411: Shared code in all branches should be extracted (#4744)
* Create rule S7411

* Update RSPEC

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:37:27 +00:00
github-actions[bot]
91eadda5cf
Create rule S126: "if ... else if" constructs should end with "else" clauses (#4747)
* Add rust to rule S126

* Update RSPEC

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:37:23 +00:00
github-actions[bot]
e94e4d8143
Create rule S7425: MaybeUninit::uninit().assume_init() should not be used (#4766)
* Create rule S7425

* Update RSPEC

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:37:18 +00:00
github-actions[bot]
ea0dd90530
Create rule S7414: Avoid transmutes that can never be correct (#4753)
* Create rule S7414

* Update RSPEC

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:07:55 +00:00
github-actions[bot]
87a178f05b
Create rule S7412: Pointer arithmetic should not be performed on zero-sized types (#4751)
* Create rule S7412

* Update RSPEC

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:07:48 +00:00
github-actions[bot]
ec02230f32
Create rule S7415: Immutable variables should not be used in while loop conditions (#4754)
* Create rule S7415

* Update RSPEC

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:07:33 +00:00
github-actions[bot]
ca818ac21b
Create rule S7418: Lint attributes should not be used on crate imports (#4759)
* Create rule S7418

* Update RSPEC

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:07:29 +00:00
github-actions[bot]
7cf7c53935
Create rule S7419: I/O buffers should be processed entirely (#4760)
* Create rule S7419

* Update RSPEC

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:07:26 +00:00
github-actions[bot]
96bd90a6a9
Create rule S7420: Collections should not be transmuted to different types (#4761)
* Create rule S7420

* Update RSPEC

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:07:22 +00:00
github-actions[bot]
85d974977b
Create rule S7421: Closures of type Fn(...) -> Ord should not return the unit type (#4762)
* Create rule S7421

* Update RSPEC

* Change severity to Critical

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:07:18 +00:00
github-actions[bot]
1379adbc47
Create rule S7422: Unit values should not be hashed (#4763)
* Create rule S7422

* Update RSPEC

* Update snippets

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:07:14 +00:00
github-actions[bot]
66bae183f4
Create rule S7423: Unit values should not be compared (#4764)
* Create rule S7423

* Update RSPEC

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:07:11 +00:00
github-actions[bot]
e1ee16f500
Create rule S7427: Null pointers should not be transmuted (#4768)
* Create rule S7427

* Update RSPEC

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:07:03 +00:00
github-actions[bot]
31e8111116
Create rule S7429: Null function pointers should not be created through transmute (#4770)
* Create rule S7429

* Update RSPEC

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:06:59 +00:00
github-actions[bot]
ef9ace8117
Create rule S7430: splitn should not be used with a limit of 0 or 1 (#4771)
* Create rule S7430

* Update RSPEC

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:06:55 +00:00
github-actions[bot]
fd50acb2e3
Create rule S7431: size_of::<T> should not be used to count elements of type T (#4772)
* Create rule S7431

* Update RSPEC

* Update snippets

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:06:51 +00:00
github-actions[bot]
6edd31ee99
Create rule S7432: Reversed ranges and slices should not be empty (#4773)
* Create rule S7432

* Update RSPEC

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:06:47 +00:00
github-actions[bot]
26f042cc83
Create rule S7436: Redundant comparisons should be removed (#4779)
* Create rule S7436

* Update RSPEC

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:06:43 +00:00
github-actions[bot]
6919fdfd79
Create rule S7440: Formatting trait implementations should not be recursive (#4783)
* Create rule S7440

* Update RSPEC

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:06:39 +00:00
github-actions[bot]
314d4b0ed2
Create rule S7441: Lines read from the standard input should be trimmed (#4784)
* Create rule S7441

* Update RSPEC

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:06:36 +00:00
github-actions[bot]
32d452498a
Create rule S7442: unwrap() should only be used when there is a value to unwrap (#4785)
* Create rule S7442

* Update RSPEC

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:06:31 +00:00
github-actions[bot]
0360734651
Create rule S7444: checked_add and overflowing_add should be used to prevent overflows (#4788)
* Create rule S7444

* Update RSPEC

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:06:24 +00:00
github-actions[bot]
cb4497e15d
Create rule S7445: env! should be preferred over option_env! (#4789)
* Create rule S7445

* Update RSPEC

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:06:20 +00:00
github-actions[bot]
c008bdb1a8
Create rule S7446: Functions expecting raw pointer arguments should be marked as unsafe (#4790)
* Create rule S7446

* Update RSPEC

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:06:16 +00:00
github-actions[bot]
0b46bc20f9
Create rule S7447: File open options should be consistent (#4791)
* Create rule S7447

* Update RSPEC

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:06:12 +00:00
github-actions[bot]
b294a06b26
Create rule S7448: Unix file permissions should be set with octal values (#4792)
* Create rule S7448

* Update RSPEC

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:06:06 +00:00
github-actions[bot]
28e7cab961
Create rule S7451: Remainder operations with 1 or -1 should be avoided (#4797)
* Create rule S7451

* Update RSPEC

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 13:05:34 +00:00
github-actions[bot]
40b6cf5d12
Create rule S3723: Array elements should be separated by commas (#4688)
* Add rust to rule S3723

* Update RSPEC

* Remove tag

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 11:21:29 +00:00
github-actions[bot]
8ae7a510c0
Create rule S2589: Boolean expressions should not be gratuitous (#4683)
* Add rust to rule S2589

* Update RSPEC

* Remove tag

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 11:21:00 +00:00
github-actions[bot]
3c466262f6
Create rule S1656: Variables should not be self-assigned (#4679)
* Add rust to rule S1656

* Update RSPEC

* Remove tag

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2025-03-19 11:12:17 +00:00
guillem-bartrina-sonarsource
a9fc281e99
CPP-6230 Modify rule S1172: Mention new exceptional options introduced in C23 (#4750) 2025-03-19 08:23:22 +00:00
SonarTech
a4428806a8 update coverage information 2025-03-19 02:45:22 +00:00
Antonio Aversa
152a2d8c47
DART-124 Modify rules S3512, S7066, S7107, S7109: Update message (#4798) 2025-03-18 16:53:08 +00:00
Jonas Wielage
aa7f7e600d
Modify rule S4423 for Go: Add examples for HTTP servers (#4800)
* Revert "SONARGO-393 Modify rule S4423 for Go: remove examples for HTTP server…"

This reverts commit e7c5865c645d1d0268b89a1c9e6ec005c056545e.

* Adjusted text about go version
2025-03-18 15:34:53 +01:00
Egon Okerman
a025ef5394
Modify rule S7207: Add additional documentation (#4749)
* Add an extra reference

* Fix error due to reference placement
2025-03-18 14:37:50 +01:00
github-actions[bot]
3891361829
Create rule S7435: Processing persistent unique identifiers is security-sensitive (#4776) 2025-03-18 14:37:33 +01:00
Egon Okerman
c485ec3dc3
Modify rule S3330: Add FastAPI (APPSEC-1260) (#3414)
* Fix Flask docs

* Add FastAPI example
2025-03-18 14:37:05 +01:00
github-actions[bot]
f7e3f45cf3
Create rule S7200: Avoid resizing a vector to zero using vec.resize(0, value) (#4677) 2025-03-18 13:40:42 +01:00
Egon Okerman
734c90357c
Modify rule S2092: Add FastAPI (APPSEC-1260) (#3413)
* Fix Flask docs

* Add FastAPI example
2025-03-18 09:59:43 +00:00
Pierre-Loup
1dc3769b22
Modify rule S3649: Add databases support (APPSEC-1251) (#3381) 2025-03-18 09:31:43 +00:00
SonarTech
c02b8cfead update coverage information 2025-03-18 02:45:20 +00:00
github-actions[bot]
7be11bd842
Modify S3649: add Kotlin (SONARSEC-6147) (#4796) 2025-03-17 14:50:30 +00:00
Antonio Aversa
3d015e3518
Update rule S6474: Update message and highlighting (SONARKT-600) (#4723) 2025-03-17 13:59:11 +00:00
github-actions[bot]
697e49fc2c
Create rule S7410: Keyboard cache should be disabled for password inputs (SONARKT-583) (#4724) 2025-03-17 13:51:06 +00:00
Pierre-Loup
0884cdba3c Apply review suggestion 2025-03-17 14:32:34 +01:00
pierre-loup-tristant-sonarsource
99d5ce6339 Create rule S7416 2025-03-17 14:32:34 +01:00
Pierre-Loup
429661e018
Update issue messages for S6474 (#4758) 2025-03-17 12:43:15 +00:00
Pierre-Loup
d608b6dedb
Revert "Update S4507: Add kotlin code examples (SONARKT-580) (#4708)" (#4755)
This reverts commit d63f01a9b137c9a010f1f81a29cf800fba5cf438.
2025-03-17 12:36:22 +00:00
Eric Morand
7c9aad50bf
RULEAPI-836 - Add compatibleLanguages to javascript rule manifests (#4731) 2025-03-17 09:58:46 +00:00
lpilastri
693507a8ed
Modify rule S7190: improve code examples (#4795) 2025-03-17 10:53:53 +01:00
Ilia Kebets
c7f2158161
JS-641 Modify S3516 description: improve example (#4778) 2025-03-17 07:10:53 +01:00
SonarTech
f284ff36ad update coverage information 2025-03-15 02:43:13 +00:00
lpilastri
6507098d55
Modify rule S7180: improve description (#4777) 2025-03-14 16:50:45 +01:00
erwan-serandour
5b2ef9ae42
Modify rule S7186: update description to focus more explicitly on the Data Repository (#4787) 2025-03-14 16:30:40 +01:00
Massimo Paladin
85743bd38f GH actions: use ubuntu-latest instead of ubuntu-20.04 2025-03-14 16:19:47 +01:00
Egon Okerman
0c99d2979a
Change metadata (#4748) 2025-03-14 08:15:43 +00:00
SonarTech
13017974d0 update coverage information 2025-03-14 02:43:53 +00:00
SonarTech
69a0045069 update coverage information 2025-03-13 02:45:03 +00:00
github-actions[bot]
c6cbb0a4bd
Create rule S7134 (#4740)
Co-authored-by: Marco Kaufmann <marco.kaufmann@sonarsource.com>
2025-03-12 17:55:17 +01:00
github-actions[bot]
51dd4ca773
Create rule S7197 (#4739) 2025-03-12 17:44:22 +01:00
github-actions[bot]
b6559d9c46
Create rule S7409: Exposing Java interfaces in WebViews is security-sensitive (SONARKT-571) (#4721)
* Create rule S7409

* Initial commit

* Use double code tags everywhere

* Rephrase the Ask Yourself Whether section

---------

Co-authored-by: egon-okerman-sonarsource <egon-okerman-sonarsource@users.noreply.github.com>
Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
2025-03-12 10:05:03 +01:00
SonarTech
29c60e929f update coverage information 2025-03-12 02:44:08 +00:00
Peter Trifanov
db6114afab
SONARGO-126 S1764 Improve RSPEC to cover a check for NaN (#4738) 2025-03-11 13:04:12 +00:00
tomasz-tylenda-sonarsource
d204203515
SONARJAVA-5401 S6809 Fix incomplete code in an example (#4737) 2025-03-11 11:55:00 +01:00
SonarTech
dd3bb762aa update coverage information 2025-03-11 02:44:35 +00:00
Solal Pirelli
5b31409df5
COBOL S1289 (COBOL.UnusedDataItem): Ignore EXTERNAL data items (#3985) 2025-03-10 09:00:37 +00:00
SonarTech
3c16fb5a55 update coverage information 2025-03-10 02:31:28 +00:00
SonarTech
71238b6d5c update coverage information 2025-03-08 02:29:56 +00:00
Quentin Jaquier
e7c5865c64
SONARGO-393 Modify rule S4423 for Go: remove examples for HTTP servers (#4726) 2025-03-07 14:04:22 +01:00
Pavel Mikula
c9e1585367
Autoclose issues created by Jira integration (#4722)
This will enable the automation to close issues that it created, to keep things more cleaned up.

Manually created issues will not be affected.
2025-03-07 08:30:57 +00:00
SonarTech
805318ee1b update coverage information 2025-03-07 02:44:23 +00:00
github-actions[bot]
e9f98eab67
Create rule S7204: Obfuscation should be enabled for release builds (SONARKT-579) (#4691)
* Create rule S7204

* Add initial rule text

* Take out empty lines from example

* Implement suggested review changes

---------

Co-authored-by: egon-okerman-sonarsource <egon-okerman-sonarsource@users.noreply.github.com>
Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
2025-03-06 18:07:07 +01:00
github-actions[bot]
b34a35ee48
Create rule S7206: Implicit PendingIntents should be immutable (SONARKT-581) (#4710)
* Create rule S7206

* Initial commit

* Fix code tags

* Fix typo

---------

Co-authored-by: egon-okerman-sonarsource <egon-okerman-sonarsource@users.noreply.github.com>
Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
2025-03-06 15:03:31 +00:00
github-actions[bot]
1f6f5da0e3
Create rule S7207: Components should be explicitly exported (#4713) 2025-03-06 15:48:28 +01:00
github-actions[bot]
8dc1c62edd
Create rule S6474: Using remote artifacts without authenticity and integrity checks is security-sensitive (SONARKT-574) (#4720) 2025-03-06 11:18:16 +01:00
SonarTech
1ae4d71783 update coverage information 2025-03-06 02:44:11 +00:00
SonarTech
e032cf53ea update coverage information 2025-03-05 02:44:02 +00:00
teemu-rytilahti-sonarsource
8586551b59
Add newlines around includes in secrets template (#4718)
* Add newlines around includes in secrets template

* Mention that new lines are needed around includes

---------

Co-authored-by: Daniel Teuchert <daniel.teuchert@sonarsource.com>
Co-authored-by: daniel-teuchert-sonarsource <141642369+daniel-teuchert-sonarsource@users.noreply.github.com>
2025-03-04 09:50:45 +01:00
SonarTech
91feb0da97 update coverage information 2025-03-04 02:43:53 +00:00
github-actions[bot]
909d3d025a
Create rule S7199 (#4676)
* Create rule S7199

* Add initial draft

* Mark rule as beta

* Generalize the contents, add commented out include directives for all available commons

* Move variables on top of the file for easy editing, add descriptions to impacts, fix ordering of common fixes

* Add generic impact text from S6652

* Fix unwanted whitespace change

* Add missing mandatory newlines between comments and includes

---------

Co-authored-by: teemu-rytilahti-sonarsource <teemu-rytilahti-sonarsource@users.noreply.github.com>
Co-authored-by: Teemu Rytilahti <teemu.rytilahti@sonarsource.com>
2025-03-03 13:44:04 +01:00
teemu-rytilahti-sonarsource
d76bab68bd
SONARTEXT-328 Improve generic secret template (#4714)
* Revise the secret rspec template

* Set status=beta for new secrets

* Revert back to old values for example_{secret,name,env} vars
2025-03-03 10:25:53 +00:00
SonarTech
3077f8ce6e update coverage information 2025-03-01 02:44:45 +00:00
zglicz
f0986b7056
Update S6426 to scope Tests (#4716)
Noticed this through the new configs realignment
2025-02-28 16:48:16 +01:00
github-actions[bot]
df5229c7be
Create rule S7203: Java Keystore files should not disclose cryptographic private keys (#4685) 2025-02-28 08:05:15 +00:00
SonarTech
c3d5e7ae01 update coverage information 2025-02-28 02:43:49 +00:00
daniel-teuchert-sonarsource
76ccee7856
Fix multiple broken links (#4712)
* Fix multiple broken links

* Remove postman blog post because the link does not work properly

* Re add postman resource

* Undo postman changes
2025-02-27 16:05:39 +01:00
github-actions[bot]
7cd779c09a
Create rule S7201: Exposing the Android file system to WebViews is security-sensitive (#4680) 2025-02-27 14:46:30 +00:00
Pierre-Loup
d63f01a9b1
Update S4507: Add kotlin code examples (SONARKT-580) (#4708) 2025-02-27 14:09:15 +01:00
Ilia Kebets
8b10fbcbb5
Modify S1135: remove Flex (#4704) 2025-02-27 08:09:10 +00:00
SonarTech
8d2a7efa47 update coverage information 2025-02-27 02:43:30 +00:00
github-actions[bot]
afc4f2638a
SONARJAVA-5163 Create rule S7198: Path.of should be preferred to Paths.get (#4670) 2025-02-26 16:50:20 +01:00
daniel-teuchert-sonarsource
1dc40b1a64
Update S2053: Align recommended salt length (#4711) 2025-02-26 15:09:46 +01:00
Michael Jabbour
99e38a9163
CPP-6162 S1265 Require sized delete since C++14 and definitions in the same file
* CPP-6162 S1265 Require sized delete since C++14 and definitions in the same file

* Remove requirement to be in the same file

---------

Co-authored-by: Mostafa Mohammed <mostafa.mohammed@sonarsource.com>
2025-02-26 11:08:39 +00:00
Jonas Wielage
1060d8a1b4
Modify rule S6953, S7021: Fix MQR inconsistencies (#4705) 2025-02-26 08:40:40 +00:00
Anton Haubner
67416c1eec
Modify rule S6945: Add MAINTAINABILITY quality, increase severity and impact levels (#4707)
* Modify rule S6945: Add MAINTAINABILITY quality.

S6945 does not necessarily indicate a bug since COND might not be set on
purpose.
Hence, keeping the type as `CODE_SMELL` appears correct.

However, as a code smell, we need to qualify its `MAINTAINABILITY` impact.

At the same time, we keep the existing `RELIABILITY` impact:
Not setting COND is a practice that not only leads to harder to debug code but
it may also lead to bugs

* Modify rule S6945: Upgrade severity and impact to Critical and HIGH

Following the documentation, MAINTAINABILITY issues should have at least HIGH
impact, and Critical severity, if they can lead to the introduction of bugs.

RELIABILITY issues should have at least HIGH impact, and Critical severity,
if they can for example cause corrupted data.

Both applies here. Hence, we upgrade the `defaultSeverity` and impact
levels.

These are the documentation link:
https://docs.sonarsource.com/sonarqube-server/2025.1/extension-guide/adding-coding-rules/#setting-severities-in-mqr-mode
https://docs.sonarsource.com/sonarqube-server/2025.1/extension-guide/adding-coding-rules/#setting-severities-in-se-mode
2025-02-26 09:30:10 +01:00
Anton Haubner
3cb75f0c8b
Modify rule S6977: Change type to BUG (#4706)
S6977 definitely impacts RELIABILITY, but it was typed as a
`CODE_SMELL`.
However, if reliability is the main quality of an issue, then it should
be paired with the `BUG` type.

S6977 is not a BUG in the sense that correctness is affected.
At the same time, the previous MAINTAINABILITY quality is not impacted at all.
Also, the issue does negatively affect performance, so it is bug in that sense.

Thus, the decision was made to change the type to `BUG`.
See also
https://sonarsource.slack.com/archives/C026N4DMXNK/p1740474666962219?thread_ts=1740420785.011249&cid=C026N4DMXNK
for an internal discussion.
2025-02-26 09:16:22 +01:00
SonarTech
f191b1e114 update coverage information 2025-02-26 02:43:04 +00:00
Marharyta
66586c5c75
DART-210 Fix discrepancies between MQR and severity for Dart rules
Rules affected: S7058, S7064, S7066, S7083, S7095, S7103, S7104, S7105, S7120
2025-02-25 15:49:31 +00:00
github-actions[bot]
de3124561f
Create rule S5659: JWT should be signed and verified with strong cipher algorithms for Go (#4668)
* Add go to rule S5659

* SONARGO-211: Add RSPEC for S5659 for Go

* Improve code examples

* Update rules/S5659/go/rule.adoc

Co-authored-by: teemu-rytilahti-sonarsource <teemu.rytilahti@sonarsource.com>

---------

Co-authored-by: daniel-teuchert-sonarsource <daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: Daniel Teuchert <daniel.teuchert@sonarsource.com>
Co-authored-by: daniel-teuchert-sonarsource <141642369+daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: teemu-rytilahti-sonarsource <teemu.rytilahti@sonarsource.com>
2025-02-25 16:42:12 +01:00
David Kunzmann
5e6349e3a1
Modify S6660: Fix impacts and default severity (#4703) 2025-02-24 16:40:43 +01:00
SonarTech
410a9972af update coverage information 2025-02-23 02:43:30 +00:00
Fred Tingaud
f16efb2b5c RULEAPI-834 Update remaining rules where defaultSeverity is different from MQR 2025-02-21 17:18:02 +01:00
Fred Tingaud
753b21a566 RULEAPI-834 Update remaining rules where defaultSeverity is different from MQR 2025-02-21 16:19:27 +01:00
Fred Tingaud
d8c3c03e56 RULEAPI-832 Fix missing automatically updatable rules 2025-02-21 15:39:32 +01:00
Nils Werner
656f853238
RULEAPI-834 Update rules where defaultSeverity is different from MQR (#4686) 2025-02-21 15:28:32 +01:00
github-actions[bot]
59fba4deac
Create rule S5445: Insecure temporary file creation methods should not be used (#4671)
* Add go to rule S5445

* Initial draft

* Add examples for temporary directories

---------

Co-authored-by: teemu-rytilahti-sonarsource <teemu-rytilahti-sonarsource@users.noreply.github.com>
Co-authored-by: Teemu Rytilahti <teemu.rytilahti@sonarsource.com>
2025-02-21 12:02:48 +01:00
Fred Tingaud
972b0e39c2 Automatically migrate all rules where defaultSeverity is Blocker and MQR is High 2025-02-20 19:58:25 +01:00
Yassin Kammoun
ea1ac05c78
RULEAPI-833 Add a new langage identifier for Rust (#4675) 2025-02-20 11:45:47 +01:00
github-actions[bot]
ba18ae7f08
Create rule S7187: PySpark Pandas DataFrame columns should not use a reserved name (#4622)
* Create rule S7187: PySpark Pandas DataFrame columns should not use a
reserved name

---------

Co-authored-by: joke1196 <joke1196@users.noreply.github.com>
Co-authored-by: David Kunzmann <david.kunzmann@sonarsource.com>
2025-02-20 11:22:12 +01:00
github-actions[bot]
f26dc7084d
Create rule S7196: Complex logic provided to PySpark withColumn method should be refactored into a separate expression (#4642)
* Create rule S7196: Complex logic provided to PySpark withColumn method should be refactored into a separate expression


---------

Co-authored-by: thomas-serre-sonarsource <thomas-serre-sonarsource@users.noreply.github.com>
Co-authored-by: Thomas Serre <thomas.serre@sonarsource.com>
2025-02-20 11:21:29 +01:00
github-actions[bot]
9d7de6d39d
Create rule S7182: The subset argument should be provided when using PySpark DataFrame dropDuplicates (#4615)
* Create Rule S7182: The `subset` argument should be provided when using PySpark DataFrame `dropDuplicates`



---------

Co-authored-by: joke1196 <joke1196@users.noreply.github.com>
Co-authored-by: David Kunzmann <david.kunzmann@sonarsource.com>
2025-02-20 11:20:42 +01:00
Fred Tingaud
fdf295d151 Update rules/S7119/cfamily/metadata.json
Co-authored-by: Loïc Joly <loic.joly@sonarsource.com>
2025-02-20 10:23:49 +01:00
Fred Tingaud
f78837a2bc Also add S6620 2025-02-20 10:23:49 +01:00
Fred Tingaud
c4ad5da103 Fix two more rules 2025-02-20 10:23:49 +01:00
Fred Tingaud
97ea439a11 Increase severity of S7127 2025-02-20 10:23:49 +01:00
Fred Tingaud
adae29df8e Fix discrepencies between MQR and severity for CFamily rules 2025-02-20 10:23:49 +01:00
SonarTech
60cddc7cc9 update coverage information 2025-02-20 02:42:22 +00:00
github-actions[bot]
ae4e0661ea
Create rule S7191: PySpark "withColumns" should be preferred over "withColumn" when multiple columns are specified (#4633)
* Create rule S7191

* Create rule S7191: PySpark  should be preferred over  when multiple columns are specified

* Fix after review

---------

Co-authored-by: thomas-serre-sonarsource <thomas-serre-sonarsource@users.noreply.github.com>
Co-authored-by: Thomas Serre <thomas.serre@sonarsource.com>
Co-authored-by: Guillaume Dequenne <guillaume.dequenne@sonarsource.com>
2025-02-19 17:06:04 +00:00
Pierre-Loup
e769e586c9
Update security rules: add OWASP Mobile Top 10 2024 security standard (APPSEC-2383) (#4660) 2025-02-19 17:19:00 +01:00
github-actions[bot]
c046fc94c4
Create rule S7195: PySpark lit(None) should be used when populating empty columns (#4638) 2025-02-19 10:58:21 +00:00
SonarTech
9966f12d52 update coverage information 2025-02-19 02:41:59 +00:00
github-actions[bot]
13111e20e7
SONARPY-2489 Create rule S7189 PySpark DataFrames used multiple times should be cached or persisted (#4627)
* SONARPY-2489 Create rule S7189 PySpark DataFrames used multiple times should be cached or persisted

* Fix after review

* Add information on when the rule actually triggers

---------

Co-authored-by: guillaume-dequenne-sonarsource <guillaume-dequenne-sonarsource@users.noreply.github.com>
Co-authored-by: Guillaume Dequenne <guillaume.dequenne@sonarsource.com>
2025-02-18 09:28:22 +01:00
SonarTech
3049db59e8 update coverage information 2025-02-18 02:41:07 +00:00
github-actions[bot]
e2133270e7
Create rule S6437: Credentials should not be hard-coded (#4641)
* Add go to rule S6437

* Add description for S6437 for Go

---------

Co-authored-by: daniel-teuchert-sonarsource <daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: Daniel Teuchert <daniel.teuchert@sonarsource.com>
2025-02-17 15:53:59 +01:00
github-actions[bot]
a2320f1b8d
Create rule S4830: Server certificates should be verified during SSL/TLS connections (#4662)
* Add go to rule S4830

* Add examples

* Improve examples

* Update rules/S4830/go/rule.adoc

Co-authored-by: daniel-teuchert-sonarsource <141642369+daniel-teuchert-sonarsource@users.noreply.github.com>

---------

Co-authored-by: teemu-rytilahti-sonarsource <teemu-rytilahti-sonarsource@users.noreply.github.com>
Co-authored-by: Teemu Rytilahti <teemu.rytilahti@sonarsource.com>
Co-authored-by: daniel-teuchert-sonarsource <141642369+daniel-teuchert-sonarsource@users.noreply.github.com>
2025-02-17 15:53:21 +01:00
leonardo-pilastri-sonarsource
d22236c056 Modify S7190: change tags to target tests 2025-02-17 10:49:40 +01:00
zglicz
818f168bf5
Delete rules/S5742/javascript/metadata.json (#4667)
* Delete rules/S5742/javascript/metadata.json

* empty metadata.json
2025-02-17 10:43:29 +01:00
teemu-rytilahti-sonarsource
601aff6915
S6418/php: fix typo in variable name (#4665)
`description.adoc` is using `detections` and not `detectons` as a variable:
```
This rule detects {detections} having a name matching a list of words (secret, token, credential, auth, api[_.-]?key) being assigned a pseudorandom hard-coded value.
```

This PR makes the value rendered correctly on https://sonarsource.github.io/rspec/#/rspec/S6418/php
2025-02-17 09:52:55 +01:00
github-actions[bot]
29db082484
Create rule S6418: Hard-coded secrets are security-sensitive (#4661)
* Add go to rule S6418

* SONARGO-215: Add description for S6418 for Go

* Lower default entropy

* Simplify code examples

---------

Co-authored-by: daniel-teuchert-sonarsource <daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: Daniel Teuchert <daniel.teuchert@sonarsource.com>
Co-authored-by: daniel-teuchert-sonarsource <141642369+daniel-teuchert-sonarsource@users.noreply.github.com>
2025-02-17 09:24:39 +01:00
SonarTech
00213b7c50 update coverage information 2025-02-15 02:40:26 +00:00
Fred Tingaud
4a2fe22a72 Fix Secrets template rule 2025-02-14 16:12:09 +01:00
github-actions[bot]
7475e42c29
Create rule S7192: The "how" parameter should be specified when joining two PySpark DataFrames (#4634) 2025-02-13 17:25:01 +01:00
github-actions[bot]
a16475c830
SONARPY-2501 Create rule S7181 PySpark Window functions should always specify a frame (#4614) 2025-02-13 15:27:23 +01:00
github-actions[bot]
e3a3a43170
Create rule S4426: Cryptographic keys should be robust (#4659)
* Add go to rule S4426

* Add description for S4426 for Go

---------

Co-authored-by: daniel-teuchert-sonarsource <daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: Daniel Teuchert <daniel.teuchert@sonarsource.com>
Co-authored-by: daniel-teuchert-sonarsource <141642369+daniel-teuchert-sonarsource@users.noreply.github.com>
2025-02-13 14:25:30 +01:00
github-actions[bot]
2619fbcace
Create rule S5527: Server hostnames should be verified during SSL/TLS connections for go (#4656)
* Add go to rule S5527

* Add text

* Fix wording

* Fix wording++

* Update rules/S5527/go/how-to-fix-it/std.adoc

Co-authored-by: daniel-teuchert-sonarsource <141642369+daniel-teuchert-sonarsource@users.noreply.github.com>

* Move fix it section into the main adoc

* Fix non-compliant->noncompliant

---------

Co-authored-by: teemu-rytilahti-sonarsource <teemu-rytilahti-sonarsource@users.noreply.github.com>
Co-authored-by: Teemu Rytilahti <teemu.rytilahti@sonarsource.com>
Co-authored-by: daniel-teuchert-sonarsource <141642369+daniel-teuchert-sonarsource@users.noreply.github.com>
2025-02-12 18:31:46 +01:00
github-actions[bot]
4903879d09
Create rule S5344: Passwords should not be stored in plaintext or with a fast hashing algorithm (#4655)
* Add go to rule S5344

* Add description for S5344 for Go

* Add message

* Extend message

* Update rules/S5344/go/message.adoc

Co-authored-by: teemu-rytilahti-sonarsource <teemu.rytilahti@sonarsource.com>

* Update rules/S5344/go/message.adoc

Co-authored-by: teemu-rytilahti-sonarsource <teemu.rytilahti@sonarsource.com>

---------

Co-authored-by: daniel-teuchert-sonarsource <daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: Daniel Teuchert <daniel.teuchert@sonarsource.com>
Co-authored-by: daniel-teuchert-sonarsource <141642369+daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: teemu-rytilahti-sonarsource <teemu.rytilahti@sonarsource.com>
2025-02-12 10:44:28 +01:00
github-actions[bot]
c79083491d
Create rule S3329: Cipher Block Chaining IVs should be unpredictable (#4658)
* Add go to rule S3329

* Add description for S3329 for Go

* Update rules/S3329/go/rule.adoc

Co-authored-by: teemu-rytilahti-sonarsource <teemu.rytilahti@sonarsource.com>

---------

Co-authored-by: daniel-teuchert-sonarsource <daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: Daniel Teuchert <daniel.teuchert@sonarsource.com>
Co-authored-by: daniel-teuchert-sonarsource <141642369+daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: teemu-rytilahti-sonarsource <teemu.rytilahti@sonarsource.com>
2025-02-12 10:19:39 +01:00
github-actions[bot]
162d5baaf8
Create rule S5547: Cipher algorithms should be robust (#4652)
* Add go to rule S5547

* Add description for S5547 for Go

---------

Co-authored-by: daniel-teuchert-sonarsource <daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: Daniel Teuchert <daniel.teuchert@sonarsource.com>
2025-02-10 13:30:29 +01:00
Loïc Joly
19b9e223e1
Deprecate rule S1227 (CPP-6131 and NET-1116) 2025-02-10 12:16:09 +01:00
Pavel Mikula
6ef35e2a8c
S3385: Remove Exit For, Do, While and Try (#4654) 2025-02-10 08:39:26 +01:00
github-actions[bot]
d9e29030ae
Create rule S2053: Password hashing functions should use an unpredictable salt (#4648)
* Add go to rule S2053

* Add description for S2053 for Go

---------

Co-authored-by: daniel-teuchert-sonarsource <daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: Daniel Teuchert <daniel.teuchert@sonarsource.com>
Co-authored-by: daniel-teuchert-sonarsource <141642369+daniel-teuchert-sonarsource@users.noreply.github.com>
2025-02-06 13:14:34 +01:00
github-actions[bot]
1f6167eb91
Create rule S7197: Circular file imports should be resolved (#4645)
* Create rule S7197

* Create rule S7197: Circular file imports should be resolved

* Comments

---------

Co-authored-by: kaufco <kaufco@users.noreply.github.com>
Co-authored-by: Marco Kaufmann <marco.kaufmann@sonarsource.com>
Co-authored-by: zglicz <michal.zgliczynski@sonarsource.com>
2025-02-06 13:10:59 +01:00
github-actions[bot]
d9a7e045e9
Create rule S7134: Architectural constraints should not be violated (JavaScript) (#4646)
* Add javascript to rule S7134

* Create rule S7134: Architectural constraints should not be violated (JavaScript)

* Gab's comments

---------

Co-authored-by: kaufco <kaufco@users.noreply.github.com>
Co-authored-by: Marco Kaufmann <marco.kaufmann@sonarsource.com>
Co-authored-by: zglicz <michal.zgliczynski@sonarsource.com>
2025-02-06 08:29:54 +00:00
erwan-serandour
36d247fb3b
SONARJAVA-5322 Modify rule S7177: add tests to tags (#4651) 2025-02-05 15:38:28 +01:00
Ghislain Piot
c5efdf6797
SONARPY-2586 Point coverage script to the enterprise sonar-python repository (#4649) 2025-02-05 14:14:22 +01:00
daniel-teuchert-sonarsource
5be0d9daa7
Adjust language label for go (#4650) 2025-02-05 11:56:49 +01:00
leonardo-pilastri-sonarsource
1a4f63cc4d
Modify S7179: change scope from Tests to Main (#4647) 2025-02-03 16:48:01 +01:00
daniel-teuchert-sonarsource
071e229c14
Modify rule S4507: Add support for Flask-GraphQL (#3428)
* Added how to fix it section for flask-graphql

* Restructured code examples

* Adjusted format

* Change to allowed_framework_names not needed anymore

* Update rule.adoc

* Applied suggestion.
2025-02-03 12:08:40 +01:00
daniel-teuchert-sonarsource
fc7ed69d88
Add support for aiohttp (#3409) 2025-02-03 12:04:32 +01:00
daniel-teuchert-sonarsource
c1a6b0f5f5
Modify rule S4036: Fix Code Example (#4640) 2025-02-03 11:57:51 +01:00
github-actions[bot]
c99ad72c75
Create go rule S5542: Encryption algorithms should be used with secure mode and padding scheme (#4631)
* Add go to rule S5542

* SONARGO-136: Add S5542 for Go

* Improvements based on review

---------

Co-authored-by: daniel-teuchert-sonarsource <daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: Daniel Teuchert <daniel.teuchert@sonarsource.com>
Co-authored-by: daniel-teuchert-sonarsource <141642369+daniel-teuchert-sonarsource@users.noreply.github.com>
2025-02-03 11:46:24 +01:00
erwan-serandour
8c0356d55e
SONARJAVA-5285 Modify rule S7180: update wrong rule description (#4643) 2025-01-31 16:58:21 +01:00
Sebastien Marichal
1e63f6a274
Modify rule S4487: Fix error in code example (#4644) 2025-01-31 15:47:52 +01:00
github-actions[bot]
7e54acfafa
Create go rule S5443: Using publicly writable directories is security-sensitive (#4632)
* Add go to rule S5443

* Initial draft

* Improve examples

* Add intro texts to code examples

* Remove unwanted // compliant commentary from fixed examples

---------

Co-authored-by: Teemu Rytilahti <teemu.rytilahti@sonarsource.com>
2025-01-31 11:52:04 +01:00
Peter Trifanov
14c80b84d0
[NO-JIRA] Point coverage script to the enterprise sonar-go repository (#4635) 2025-01-30 10:19:54 +01:00
Massimo Paladin
1168630c4e
Update GitHub CODEOWNERS (#4630) 2025-01-29 10:43:20 +01:00
github-actions[bot]
be17e31527
Create rule S4036 (#4625)
* Add go to rule S4036

* Add S4036 for Go

---------

Co-authored-by: daniel-teuchert-sonarsource <daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: Daniel Teuchert <daniel.teuchert@sonarsource.com>
2025-01-29 09:48:53 +01:00
github-actions[bot]
8471f3d8a4
SONARJAVA-5301 Create rule S7190: Methods annotated with "@BeforeTransaction" or "@AfterTransaction" must respect the contract (#4629) 2025-01-28 17:14:19 +01:00
github-actions[bot]
d873f6b135
SONARJAVA-5288 Create rule S7186: Methods returning "Page" or "Slice" must take "Pageable" as an input parameter (#4620) 2025-01-28 16:36:02 +01:00
Nils Werner
5e12d3beff
SONARGO-175 ParsingError should be disabled by default (#4628) 2025-01-28 16:31:01 +01:00
leonardo-pilastri-sonarsource
4bfe5a01d7
SONARJAVA-5295 Modify rule S6809: add support for @Cacheable (#4626) 2025-01-28 16:15:52 +01:00
Alex Meseldzija
2dc3a33c3b
NET-1038 Add symbolic-execution tag to our rules (#4621) 2025-01-28 15:06:03 +01:00
github-actions[bot]
4c6681ee65
SONARJAVA-5294 Create rule S7185: @eventlistener methods should have one parameter (#4618) 2025-01-28 14:41:15 +01:00
leonardo-pilastri-sonarsource
ec2258b717
SONARJAVA-5293 Modify rule S6856 to also cover opposite case (#4619) 2025-01-28 13:24:04 +01:00
Sebastien Andrivet
2b798c3265
Modify rule S2092: Add Go language (#2760) 2025-01-28 11:16:42 +01:00
github-actions[bot]
35c4205143
SONARJAVA-5286 Create rule S7184: "@Scheduled" annotation should only be applied to no-arg methods (#4617) 2025-01-28 11:00:17 +01:00
leonardo-pilastri-sonarsource
8940eee53e
SONARJAVA-5291 Modify rule S7177: specify spring context (#4623) 2025-01-28 10:57:27 +01:00
github-actions[bot]
1e62d9fef8
SONARJAVA-5292 Create rule S7183: @InitBinder methods should have void return type (#4616) 2025-01-28 09:48:25 +01:00
SonarTech
74c4f4c8db update coverage information 2025-01-28 02:39:23 +00:00
github-actions[bot]
8aadee1de1
SONARJAVA-5291 Create rule S7177: @DirtiesContext should be properly configured (#4610) 2025-01-27 15:47:41 +01:00
github-actions[bot]
46eb087a63
SONARJAVA-5285 Create rule S7180: "@Cache*" annotations should only be applied on concrete classes (#4613) 2025-01-27 15:43:25 +01:00
github-actions[bot]
040c9dabef
SONARJAVA-5289 Create rule S7179: @Cacheable and @CachePut should not be combined (#4612) 2025-01-27 11:49:43 +01:00
github-actions[bot]
11dd942825
SONARJAVA-5284 Create rule S7178: Injecting data into static fields is not supported by Spring (#4611) 2025-01-27 11:26:42 +01:00
Sebastien Andrivet
9a672e7951
Modify rule S3330: Add Go language (#2770)
* Modify rule S2092: Add Go language

* Fixes following review of S2092

* Remove Compliant

* Fix tabs vs spaces

* Use 4 spaces

* To trigger the build

---------

Co-authored-by: Marcin Stachniuk <marcin.stachniuk@sonarsource.com>
2025-01-24 16:46:12 +01:00
SonarTech
74ed1fa393 update coverage information 2025-01-24 02:40:11 +00:00
Pierre-Loup
bd7f201e23
Apply missing android tags to rules that support Android APIs (#4603) 2025-01-23 10:12:26 +01:00
Pavel Mikula
59e278c497
NET-988 Remove S1197 from SonarWay for VB.NET (#4609) 2025-01-20 14:31:07 +01:00
GabinL21
2e155a926e
SONARIAC-1892 Modify rule S6975: Fix how to fix it section split (#4604) 2025-01-20 11:46:15 +01:00
Sebastien Marichal
398cc98f7c
Modify S2930: Fix typo (#4608) 2025-01-10 10:36:46 +01:00
Rudy Regazzoni
519c3bbd18
SONARIAC-1856 Modify S7019: remove second example id/diff (#4606) 2025-01-09 14:29:50 +01:00
Martin Strecker
9cdea89191
Add perftag back (#4605) 2025-01-09 11:44:51 +01:00
Martin Strecker
8536b2730e
NET-936 Modify S3247: Add benchmarks (#4596)
* Add benchmark

* Adopt benchmark

* Remove Ratio column
2025-01-09 10:00:20 +00:00
Pavel Mikula
8f2f6bee31
Add PullRequesteCreated.yml (#4584)
Co-authored-by: Marco Borgeaud <marco.borgeaud@sonarsource.com>
2025-01-09 10:13:47 +01:00
Sebastien Marichal
e39e8bb76d
NET-938 Modify S2629: Add benchmarks (#4602) 2025-01-08 17:31:17 +01:00
Martin Strecker
4be8383d89
NET-943 Modify rule S1215: Add benchmark (#4601)
* Add benchmark

* Update rules/S1215/csharp/rule.adoc

Co-authored-by: Sebastien Marichal <sebastien.marichal@sonarsource.com>

* Review

---------

Co-authored-by: Sebastien Marichal <sebastien.marichal@sonarsource.com>
2025-01-08 17:25:48 +01:00
Rudy Regazzoni
444c238059
SONARIAC-1856 Modify S7019: add EXEC alternatives and exceptions (#4597)
* SONARIAC-1856 Update S7019 content

* Remove script example

* Fix id

* Update rules/S7019/docker/rule.adoc

Co-authored-by: Jonas Wielage <jonas.wielage@sonarsource.com>

* Address review comment

---------

Co-authored-by: Jonas Wielage <jonas.wielage@sonarsource.com>
2025-01-08 15:19:38 +01:00
Sebastien Marichal
efd18e59bf
NET-934 Modify S1643: Use NetFx 4.8.1 in Brenchmark (#4600) 2025-01-08 13:54:10 +01:00
Martin Strecker
4e15f3d653
Modify S3169: Add benchmarks (#4595)
* Modify S3169: Add benchmarks

* Update rules/S3169/csharp/rule.adoc

Co-authored-by: Sebastien Marichal <sebastien.marichal@sonarsource.com>

* Update benchmark

* LAYC

* diff-id

---------

Co-authored-by: Sebastien Marichal <sebastien.marichal@sonarsource.com>
2025-01-08 12:15:50 +01:00
Sebastien Marichal
43247cd487
NET-933 Modify S1155: Add benchmarks (#4592) 2025-01-08 10:23:49 +01:00
Sebastien Marichal
a2aa406613
NET-934 Modify S1643: Add benchmarks (#4593) 2025-01-08 10:23:35 +01:00
SonarTech
383361a9e8 update coverage information 2025-01-08 02:42:08 +00:00
Loris S.
dff46bdcfd
Modify S3649(Python): Fix logic error (#4598) 2025-01-07 14:53:28 +01:00
github-actions[bot]
aa709674da
Create rule S7175: Linear API keys should not be disclosed (#4594) 2025-01-07 10:14:41 +01:00
github-actions[bot]
56cf51e747
Create rule S7174: Square API keys should not be disclosed (#4591) 2025-01-06 15:54:54 +01:00
tomasz-kaminski-sonarsource
8db2c956de
S6018 Add example showing use of inline out of line (CPP-4342) 2025-01-02 10:37:02 +00:00
Sebastien Marichal
e5a0528302
NET-920 Modify rule S125: Add dotnet example (#4589) 2024-12-24 14:55:44 +01:00
Sebastien Marichal
330156276c
NET-913 Modify rule S1264: Improve description to match the implementation (#4587) 2024-12-24 11:26:00 +01:00
SonarTech
deac0761b1 update coverage information 2024-12-24 02:42:28 +00:00
Sebastien Marichal
f96f4c8de7
NET-915 Modify rule S2930: Include tracked types in the description (#4588) 2024-12-23 15:37:47 +01:00
Sebastien Marichal
07d614dd5b
Modify rule S4039: Improve description to match the implementation (#4586) 2024-12-23 14:57:36 +01:00
SonarTech
bb47c97c62 update coverage information 2024-12-21 02:40:14 +00:00
Sebastien Marichal
434c3bf4df
Modify rule S1542: Prevent strong substitution (#4585) 2024-12-20 14:12:24 +01:00
github-actions[bot]
98e58e1e76
Create rule S7173: "GoSub" statements should not be used (#4580) 2024-12-20 09:11:58 +00:00
SonarTech
5adea709d2 update coverage information 2024-12-20 02:42:54 +00:00
SonarTech
de50069607 update coverage information 2024-12-19 02:45:01 +00:00
github-actions[bot]
38ffd02fc3
Create rule S6146: "Option Explicit" should be enabled (#4582)
* Add vb6 to rule S6146

* Add description

* Update description for LaYC

---------

Co-authored-by: thahnen <thahnen@users.noreply.github.com>
Co-authored-by: Tobi Hahnen <tobias.hahnen@sonarsource.com>
2024-12-18 16:32:34 +01:00
Tobias Hahnen
1d97909d90
Update description (#4583) 2024-12-18 16:26:24 +01:00
Sebastien Marichal
826213ed01
Modify rule S907: vb6 LaYC (#4581) 2024-12-18 15:06:04 +01:00
Mary Georgiou
5e18970336
Modify rule S6932: Update code example (#4563) 2024-12-17 17:28:30 +01:00
github-actions[bot]
77c4627ffb
Create rule S7154: Fastly API tokens should not be disclosed (#4489)
* Create rule S7154

* Add text

* Apply suggestions from code review

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

---------

Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com>
Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>
2024-12-17 10:48:05 +01:00
github-actions[bot]
5e5c00550d
Create rule S7166: Adobe OAuth credentials should not be disclosed (APPSEC-2237) (#4504) 2024-12-17 10:11:01 +01:00
erwan-serandour
8558f5ea6f
Modify rule S3749: Update rule description to add new javax and jakarta annotations (SONARJAVA-5036) (#4578)
Update rule description to add javax persistence annotations and jakarta inject and resource annotation
2024-12-16 18:03:21 +01:00
Dorian Burihabwa
f9cf7be4f3
Modify rule S1190: Replace misplaced NonCompliant comment (SONARJAVA-5029) (#4577) 2024-12-16 16:20:21 +01:00
Rudy Regazzoni
277554fc6b
S1448 Updating default value (#4560) 2024-12-16 15:38:32 +01:00
erwan-serandour
70e2b8e427
Modify rule S1075: Add more exceptions (SONARJAVA-5149) (#4570) 2024-12-16 13:51:41 +01:00
SonarTech
af2920e1a9 update coverage information 2024-12-13 02:48:42 +00:00
Fred Tingaud
5fb2c9dd39 RULEAPI-824 Sort tags by version number instead of commited date when computing coverage 2024-12-12 16:58:20 +01:00
Fred Tingaud
efa7462eae RULEAPI-823 Don't consider tags that are not version numbers in coverage computation 2024-12-12 16:58:20 +01:00
Fred Tingaud
741e23121b RULEAPI-822 Don't consider sonar-css that is deprecated, when computing coverage
sonar-css-plugin is no longer used and the sonar-css repository is archived. Rules that are only in
sonar-css should be considered as deleted and rules that are moved in sonarJS should be displayed
as in sonarJS.
The current coverage format cannot represent perfectly this repository change, so removing sonar-css
from the list seems like the simplest approach to get a good enough result.
2024-12-12 16:58:20 +01:00
Fred Tingaud
c480f9a4b0 RULEAPI-821 Skip all profile files, not only Sonar_way_profile 2024-12-12 16:58:20 +01:00
Fred Tingaud
a6f4f03031 RULEAPI-820 Don't indiscriminately crop rule names on "_" in coverage computation 2024-12-12 16:58:20 +01:00
Egon Okerman
dd3cecfbc8
Remove reference to AWS Access Key ID (#4573) 2024-12-12 15:37:29 +01:00
GabinL21
cfa48bfefd
Update rule S7031: add multi-stage build exceptions (#4574) 2024-12-12 13:41:42 +00:00
Loïc Joly
5675385d6b
Modify rule S3541: Deprecate the rule (CPP-5904) (#4559)
Also improve documentation of the deprecation process.
2024-12-11 11:30:05 +01:00
Loïc Joly
62c1e322df
Modify rule S1199 Remove tags after deprecation CPP-4895 (#4569) 2024-12-11 11:28:36 +01:00
GabinL21
fb328a5d36
Update rule S6437: add multi-stage build exceptions (#4566) 2024-12-10 16:52:32 +00:00
Loïc Joly
0cc91b7983
Modify rule S1172 Fix FP for Objective-C block definitions CPP-5916 2024-12-10 15:39:51 +01:00
David Kunzmann
92e1462656
Modify rule S6984: Update einsum link (#4565) 2024-12-10 14:15:55 +01:00
Loïc Joly
52d0dfa648
Modify rule S1199: Deprecate this rule with the intent of removing it when possible CPP-4895 2024-12-10 11:12:10 +01:00
Jonas Wielage
17fa0b539b
Modify rule S117: Add exception to kubernetes language (#4558) 2024-12-10 10:31:16 +01:00
Rudy Regazzoni
2bd1df5c66
SONARIAC-1701 Update RSPEC description for S6587 (#4562)
* SONARIAC-1701 Update RSPEC description for S6587

* Address review comments
2024-12-09 15:53:32 +00:00
Hendrik Buchwald
d1ee5fd369
Deprecate rule S5742 (#4561) 2024-12-09 10:28:25 +01:00
SonarTech
7bccb68f23 update coverage information 2024-12-06 02:47:18 +00:00
Rudy Regazzoni
11265c14c0
Update S6473 to add parameter ports to kubernetes (#4557) 2024-12-05 14:40:40 +01:00
tomasz-tylenda-sonarsource
8ab7b69c47
Modify rule S1948: clarify that only non-static fields are serialized. (#4556) 2024-12-05 14:32:08 +01:00
Marharyta
23a50090fa
Update severities in S6524, S6527, S6528 to be aligned with CCT 2024-12-04 17:26:58 +01:00
Maksim Grebeniuk
e0ab6ac55d
SONARPY-2399 update rules tags (#4553) 2024-12-04 14:08:49 +01:00
Jonas Wielage
604db8c2c3
[NO-JIRA] Fix rule coverage for Text and Secrets (#4555) 2024-12-04 12:39:47 +01:00
daniel-teuchert-sonarsource
485be38b87
Modify rule S6868: Make S6868 a Security Hotspot (#4340)
Co-authored-by: Jonas Wielage <jonas.wielage@sonarsource.com>
2024-12-03 16:25:11 +01:00
Tim Pohlmann
a007e43d9c
Modify rule S3168: Add more exceptions (#4547) 2024-12-02 14:42:14 +01:00
github-actions[bot]
55c1242657
Create rule S2253 Forbidden functions CPP-5857 2024-12-02 13:22:02 +00:00
SonarTech
b2b1cb99fe update coverage information 2024-11-30 02:44:12 +00:00
Victor
25af4a84c2
Close S3271 for javascript (#4552) 2024-11-29 17:30:57 +01:00
Loris S.
45f6278173
Deprecate S5594 (#4550) 2024-11-29 17:27:23 +01:00
Egon Okerman
fda9b1826d
Remove Kubernetes from Sonar Way (#4551) 2024-11-29 14:59:17 +01:00
tomasz-tylenda-sonarsource
7389f307e0
Modify rule S115: explain that CONST_CASE applies to String, primitives, and boxed types. (#4549) 2024-11-29 14:05:18 +01:00
Pierre-Loup
00517107f6
Remove S6255 from SonarWay (#4548) 2024-11-29 09:12:23 +01:00
SonarTech
7779572735 update coverage information 2024-11-29 02:45:49 +00:00
Sebastien Marichal
fef1801f40
Modify rule S2325: Add WinForms and WPF EventHandler excpetion (#4546) 2024-11-28 11:53:37 +01:00
SonarTech
735dd9133f update coverage information 2024-11-28 02:45:51 +00:00
Sebastien Marichal
0a7e283d1b
SONARPLSQL-805 S3921: Update RSPEC to mention data dictionary (#4544) 2024-11-27 14:11:29 +01:00
Loris S.
d04661341c
Modify S6327: Improve the recommended fix (#4543)
* Modify S6327: Improve the recommended fix

* Apply suggestions from code review

* add more info

* improvement
2024-11-27 12:04:48 +01:00
Yassin Kammoun
dc4e9af93c
Modify rule S2068: Focus on passwords only (#4542) 2024-11-27 10:19:39 +01:00
Pierre-Loup
c284c59986
Modify S6463: Update rule description (#4526) 2024-11-27 08:32:40 +00:00
SonarTech
c20a09e86d update coverage information 2024-11-27 02:46:03 +00:00
Loris S.
59d8084fe7
Deprecate S6299: Disabling Vue.js built-in escaping is security-sensitive (#4541) 2024-11-26 17:16:16 +01:00
Marco Kaufmann
87317d77c7 fixed title 2024-11-26 15:07:57 +01:00
Marco Kaufmann
f6ab7c9169 fixed typo 2024-11-26 15:07:57 +01:00
Marco Kaufmann
7416540093 Create rule S7134: Dependency constraints should not be violated 2024-11-26 15:07:57 +01:00
kaufco
bec1fbda8c Create rule S7134 2024-11-26 15:07:57 +01:00
github-actions[bot]
fecdd82012
Create rule S7091: Cyclic dependencies between cross-package classes should be resolved 2024-11-26 15:02:02 +01:00
tomasz-tylenda-sonarsource
a624f2612f
Modify rule S5411: explain that @NonNull values are ignored. (#4534)
Modify S5411 explaining that @NonNull values are ignored.

Co-authored-by: Dorian Burihabwa <75226315+dorian-burihabwa-sonarsource@users.noreply.github.com>

---------

Co-authored-by: Dorian Burihabwa <75226315+dorian-burihabwa-sonarsource@users.noreply.github.com>
2024-11-26 14:22:29 +01:00
Pavel Mikula
dcec0bccbf
NET-762 Remove S3649 mention from S2077 rspec (#4540) 2024-11-26 13:55:38 +01:00
Fred Tingaud
468053a319
Deprecate S3458 - CPP-5376 (#4536) 2024-11-26 10:35:29 +01:00
GabinL21
2e09e1da7d
Update rule S6587: add multi-stage build exceptions (#4539) 2024-11-26 10:03:58 +01:00
Egon Okerman
e0f73e0d96
Modify rule S6721: Fix description (#4535)
* Fix secret_type being undefined

* Remove Workflow for Teams description, as it is not detected by us

* Add missing empty line
2024-11-26 10:03:46 +01:00
erwan-serandour
81be66c490
Modify rule S2175: SONARJAVA-5186 Improve Test Code Support Part 3 (#4538) 2024-11-26 10:01:05 +01:00
Rudy Regazzoni
0b91d94617
Update S6584 and S6595 with gdebi package manager (#4537)
* Update S6584 and S6595 with gdebi package manager

* Suggestion from review

Co-authored-by: GabinL21 <67428953+GabinL21@users.noreply.github.com>

---------

Co-authored-by: GabinL21 <67428953+GabinL21@users.noreply.github.com>
2024-11-26 08:51:18 +00:00
github-actions[bot]
3138737f75
Create rule S6418 for JavaScript: Hard-coded secrets are security-sensitive (#4518) 2024-11-26 08:39:05 +00:00
SonarTech
40b87a4fde update coverage information 2024-11-26 02:45:22 +00:00
Loïc Joly
8a98529945
CPP-5889 S1820 Explain that several consecutive bit fields only count as one 2024-11-25 23:13:45 +01:00
Loïc Joly
0eae5398e1
Modify rule S6194 Improve rule description for coroutine cognitive complexity CPP-4992 2024-11-25 22:13:18 +00:00
Loïc Joly
5db83ed6c3
Modify rule S3490 Improve RSPEC: explain that = default can be in TU/out of line CPP-5407 2024-11-25 22:09:38 +00:00
github-actions[bot]
1649129d22
Create rule S1291: Track uses of "NOSONAR" comments (#4516)
* Add javascript to rule S1291

* Reuse existing description

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
Co-authored-by: Yassin Kammoun <52890329+yassin-kammoun-sonarsource@users.noreply.github.com>
2024-11-25 18:04:11 +01:00
Egon Okerman
e950dfd676
Modify rule S6258: Update S3 bucket examples (#4521)
* Update CloudFormation example

* Fix syntax errors

* Update Terraform
2024-11-25 17:10:39 +01:00
github-actions[bot]
dd61f0e6c5
Modify rule S3630: mark quick fix as "partial" (#4524)
Co-authored-by: AlexandreMessmer <AlexandreMessmer@users.noreply.github.com>
2024-11-25 15:51:32 +01:00
Marcin Stachniuk
5815d72fb9
Modify rule S6294: "Log Groups" should be declared explicitly (#4530)
* Modify rule S6294: "Log Groups" should be declared explicitly

* Code review remarks

Co-authored-by: GabinL21 <67428953+GabinL21@users.noreply.github.com>

---------

Co-authored-by: GabinL21 <67428953+GabinL21@users.noreply.github.com>
2024-11-25 11:34:24 +01:00
daniel-teuchert-sonarsource
411255ad6a
Modify rule S5148: Adjust description to fit improved detection (#3823) 2024-11-25 11:01:38 +01:00
Eric Morand
e240c8e7e6
JS-399 - Fix MQR / legacy severity discrepancies (#4529) 2024-11-25 10:22:06 +01:00
SonarTech
b205453bab update coverage information 2024-11-23 02:43:17 +00:00
Mary Georgiou
9a83e984d0
Modify S7133: Update rule description (#4528) 2024-11-22 16:45:54 +01:00
Yassin Kammoun
5d105088f2
Revert "SONARFLEX-176 Deprecate Flex rules (#4169)" (#4527)
This reverts commit 916a63f5ac11a999454a2d2be41c3d65d22ed34b.
2024-11-22 12:50:33 +01:00
Alban Auzeill
584dc78ee8
Modify rules S1612,S1640,S1643,S1656,S1710,S1751,S1849,S1858,S1862,S1871,S1872,S1940,S1994,S2093,S2130,S2133,S2140,S2147,S2153,S2154,S2168,S2178,S2183,S2185: SONARJAVA-5186 Improve Test Code Support Part 3 (#4525) 2024-11-22 09:51:54 +01:00
SonarTech
91efb203e5 update coverage information 2024-11-22 02:44:48 +00:00
Loïc Joly
5067b537e8
Change license of the repository from LGPL to SSAL. (#4523) 2024-11-21 10:06:38 +01:00
github-actions[bot]
c00516692e
Modify rule S824: mark quick fix as "partial" (#4522)
Co-authored-by: frederic-tingaud-sonarsource <frederic-tingaud-sonarsource@users.noreply.github.com>
2024-11-21 10:03:22 +01:00
Fred Tingaud
f0b8295b12
Fix link checker (#4519) 2024-11-20 17:57:55 +01:00
Mary Georgiou
402a45849d
NET-578 Update coverage.py script in RSpec repo to point to the new enterprise repository (#4520) 2024-11-20 16:41:32 +01:00
SonarTech
32948e319f update coverage information 2024-11-20 02:45:28 +00:00
Massimo Paladin
e0e9ecf750
Update cirrus-modules to v3 2024-11-19 14:56:05 +01:00
SonarTech
c383a324cd update coverage information 2024-11-19 02:45:28 +00:00
Pavel Mikula
14115715cd
NET-700 Modify S7133: Remove Monitor and events (#4515) 2024-11-18 12:09:18 +01:00
Pavel Mikula
99589d0af9
NET-682 Modify S7133: Add vbnet rspec (#4514) 2024-11-18 09:48:20 +01:00
SonarTech
40e39609de update coverage information 2024-11-16 02:44:48 +00:00
github-actions[bot]
831b770bfc
NET-680 Modify S7131: Add vbnet (#4511) 2024-11-15 17:44:24 +01:00
github-actions[bot]
3fca2aa4b8
Create rule S7171: Mailgun SMTP credentials should not be disclosed (#4512)
* Create rule S7171

* Add RSPEC content

* Remove comments from rule.adoc

---------

Co-authored-by: jamie-anderson-sonarsource <jamie-anderson-sonarsource@users.noreply.github.com>
Co-authored-by: Jamie Anderson <127742609+jamie-anderson-sonarsource@users.noreply.github.com>
2024-11-15 16:14:08 +00:00
github-actions[bot]
402e3ea5ef
Create rule S7162: Dropbox OAuth tokens should not be disclosed (#4498)
* Create rule S7162

* Add RSPEC content

* Update rule.adoc

Remove `diff-type` from an example to see if it passes the build checks.

---------

Co-authored-by: jamie-anderson-sonarsource <jamie-anderson-sonarsource@users.noreply.github.com>
Co-authored-by: Jamie Anderson <127742609+jamie-anderson-sonarsource@users.noreply.github.com>
2024-11-15 16:12:21 +00:00
github-actions[bot]
0b279b2bf2
Create rule S7164: Dropbox app credentials should not be disclosed (#4501)
* Create rule S7164

* Initial content

* Additional content

---------

Co-authored-by: jamie-anderson-sonarsource <jamie-anderson-sonarsource@users.noreply.github.com>
Co-authored-by: Jamie Anderson <127742609+jamie-anderson-sonarsource@users.noreply.github.com>
2024-11-15 16:12:02 +00:00
github-actions[bot]
8d1152d450
Create rule S7161: Tableau secrets should not be disclosed (#4497)
* Create rule S7161

* Add text

* Apply suggestions from code review

Co-authored-by: Jamie Anderson <127742609+jamie-anderson-sonarsource@users.noreply.github.com>

---------

Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com>
Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Jamie Anderson <127742609+jamie-anderson-sonarsource@users.noreply.github.com>
2024-11-15 16:56:28 +01:00
github-actions[bot]
21cc3400bd
NET-590 Create rule S7133: Locks should be released within the same method (#4449) 2024-11-15 16:21:18 +01:00
github-actions[bot]
470973e6d1
Create rule S7165: New Relic secrets should not be disclosed (APPSEC-2253) (#4503) 2024-11-15 16:09:31 +01:00
github-actions[bot]
9592b44aa4
Create rule S7170: HubSpot secrets should not be disclosed (#4510)
* Create rule S7170

* Add text

* Update rules/S7170/secrets/rule.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Update rules/S7170/secrets/rule.adoc

---------

Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com>
Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>
2024-11-15 14:59:58 +01:00
github-actions[bot]
03d5cf98e7
Create rule S7169: Coveo API keys should not be disclosed (#4508) 2024-11-15 11:47:55 +01:00
tomasz-kaminski-sonarsource
c83d7bff84
S5408 Remove constexpr static data members from rspec (CPP-5809) 2024-11-15 10:51:09 +01:00
SonarTech
953f1f0315 update coverage information 2024-11-15 02:45:59 +00:00
Alban Auzeill
251db04bc0
Modify rule S6418: Fix typo in a variable (#4513) 2024-11-14 18:11:49 +01:00
github-actions[bot]
41e6f81392
Create rule S7158: String.isEmpty() should be used to test for emptiness (#4493) 2024-11-14 17:03:15 +01:00
github-actions[bot]
423514e941
NET-589 Create rule S7131: You should not release a write lock when a read lock has been acquired and vice versa (#4433) 2024-11-14 16:43:14 +01:00
github-actions[bot]
064a3a01dd
Create rule S7167: Mergify application keys should not be disclosed (#4505) 2024-11-14 16:42:02 +01:00
github-actions[bot]
6c69789850
Create rule S7163: Mandrill API keys should not be disclosed (#4500) 2024-11-14 16:41:51 +01:00
GabinL21
19f97f60ba
Modify rule S6249: fix Terraform code examples (#4502) 2024-11-14 14:03:27 +01:00
github-actions[bot]
9f98b3b50d
Create rule S7155: CircleCI secrets should not be disclosed (APPSEC-2239) (#4490) 2024-11-14 13:45:36 +01:00
Pavel Mikula
a0be31ce67
NET-668 Modify S7130: Add vbnet rspec (#4499) 2024-11-14 13:25:46 +01:00
github-actions[bot]
f4690e5118
Create rule S7153 (#4488) 2024-11-14 11:33:24 +01:00
github-actions[bot]
007eef4362
Create rule S7150(secrets): Anthropic API keys should not be disclosed (#4484) 2024-11-13 16:32:24 +01:00
github-actions[bot]
51b85e712b
Create rule S7151: Hugging Face access tokens should not be disclosed (#4486) 2024-11-13 16:14:45 +01:00
github-actions[bot]
1d3e50e6e2
Create rule S7159: Replicate API tokens should not be disclosed (#4494) 2024-11-13 15:59:09 +01:00
Jonas Wielage
8093bf5e8a
Modify S2068: Description should not recommend customizing it with tokens (#4496) 2024-11-13 13:43:20 +01:00
github-actions[bot]
64ab6905ed
Create rule S7152: Datadog secrets should not be disclosed (APPSEC-2240) (#4487) 2024-11-13 12:30:24 +00:00
github-actions[bot]
cb5723187a
Create rule S7145: LaunchDarkly API tokens should not be disclosed (#4477)
* Create rule S7145

* Add skeleton

* added first version

---------

Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com>
Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>
2024-11-13 12:11:37 +01:00
github-actions[bot]
0f12c897a3
Create rule S7147: Atlassian secrets should not be disclosed (APPSEC-2238) (#4481) 2024-11-13 08:56:23 +00:00
SonarTech
a34b0af0cb update coverage information 2024-11-13 02:42:52 +00:00
github-actions[bot]
90bbc1c99e
Create rule S7149: Doppler auth tokens should not be disclosed (#4483) 2024-11-12 17:23:43 +01:00
Pierre-Loup
a7bff601e5
Remove mention to "pornographic material" in shared phising.adoc (#4480) 2024-11-12 12:27:14 +01:00
Jonas Wielage
d870aef0b5
SONARIAC-1789 Align software quality impact and defaultSeverities on IaC Rules (#4485) 2024-11-12 12:08:46 +01:00
github-actions[bot]
25b5633b36
Create rule S7148: Mailchimp API keys should not be disclosed (APPSEC-2242) (#4482) 2024-11-12 10:50:35 +00:00
github-actions[bot]
c36fc7cc5f
Create rule S7144: Bitbucket keys should not be disclosed (APPSEC-1864) (#4476) 2024-11-12 11:42:40 +01:00
github-actions[bot]
78497b8212
Create rule S7132 std::string_view::data() should not be passed to API expecting C-style strings CPP-5820 2024-11-12 08:40:58 +00:00
github-actions[bot]
b2e18a89be
Create rule S7116: The first element of an array should not be accessed implicitly CPP-5674 2024-11-12 09:32:50 +01:00
Martin Strecker
65c443e810
Update impact or defaultSeverity to match each other (#4444)
* Update impact or defaultSeverity to match each other

* Change S6776

* Update S6776
2024-11-11 10:40:51 +01:00
github-actions[bot]
06c42fd02c
Create rule S7146 (#4479) 2024-11-08 15:39:40 +01:00
github-actions[bot]
0a28d7405a
Create rule S7130: First/Single should be used instead of FirstOrDefault/SingleOrDefault on collections that are known to be not empty (#4432) 2024-11-08 10:08:55 +00:00
SonarTech
a15cfd94e2 update coverage information 2024-11-08 02:42:44 +00:00
github-actions[bot]
8c81f74b33
Create rule S7129: String literal should not be assigned to mutable char pointers (CPP-5659) 2024-11-07 17:11:38 +00:00
github-actions[bot]
2c08a31abb
Create rule S7118 String methods should be used to query content instead of C apis CPP-5790 2024-11-07 18:10:58 +01:00
github-actions[bot]
289e7cf5e9
Create rule S7121 Calls to c_str() should not implicitly recreate strings or string_views CPP-3435 2024-11-07 18:09:33 +01:00
github-actions[bot]
ee3e232e09
Create rule S7119: Global should not depend on possibly not yet initialized variables CPP-5655 2024-11-07 16:49:28 +00:00
github-actions[bot]
ed65d9debb
Create rule S7142: Supabase API keys should not be disclosed (APPSEC-2231) (#4474) 2024-11-07 15:53:20 +00:00
Pavel Mikula
d81f6652ed
Add Jira integration (#4426) 2024-11-07 16:41:20 +01:00
github-actions[bot]
e956bf1f91
Create rule S7138: crates.io API tokens should not be disclosed (#4465)
* Create rule S7138

* Update

---------

Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com>
Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>
2024-11-07 14:59:07 +01:00
github-actions[bot]
3763add872
Create rule S7141(secrets): Chief Tools API tokens should not be disclosed (#4471) 2024-11-07 14:55:53 +01:00
github-actions[bot]
ad2abcee0b
Create rule S7143 (#4475)
Co-authored-by: pierre-loup-tristant-sonarsource <pierre-loup-tristant-sonarsource@users.noreply.github.com>
2024-11-07 12:08:22 +01:00
github-actions[bot]
b790268421
Create rule S7140: SSLMate secrets should not be disclosed (APPSEC-2230) (#4468) 2024-11-07 10:09:40 +01:00
Rudy Regazzoni
65d1ffdb3c
Modify rule S6937: Extend support to other statements (#3746)
* Modify rule S6937: Extend support to other statements

* Add more documentation

* address review comment
2024-11-06 14:45:42 +01:00
erwan-serandour
f5651454a8
Modify S3281: Manual update of issue severities to MQR (#4456) 2024-11-06 13:19:10 +00:00
Loris S.
81fc47e203
Modify S6096: Improve the resources section (#4478) 2024-11-06 13:09:44 +00:00
github-actions[bot]
ff687582bd
Create rule S7139: redirect.pizza API tokens should not be disclosed (#4466) 2024-11-06 11:04:13 +00:00
github-actions[bot]
4dfe1364d7
Create rule S6418 (#4470)
* Add csharp to rule S6418

* initial commit

* update wording to be about c#

* revert greg's change

* Update Default detections/sensitivity

---------

Co-authored-by: alex-meseldzija-sonarsource <alex-meseldzija-sonarsource@users.noreply.github.com>
Co-authored-by: Alex Meseldzija <alexander.meseldzija@sonarsource.com>
Co-authored-by: Gregory Paidis <115458417+gregory-paidis-sonarsource@users.noreply.github.com>
2024-11-05 18:07:55 +00:00
Fred Tingaud
1b03c3fe91 Automatically migrate all rules where defaultSeverity and MQR are in agreement
Not migrated because of multiple qualities:
{'common': ['S1523', 'S2077', 'S6821', 'S6967'], 'xml': ['S3281', 'S3355'], 'cfamily': ['S5782', 'S6991', 'S7012', 'S7038', 'S7042'], 'python': ['S6709', 'S6714', 'S6727', 'S6729', 'S6734', 'S6740', 'S6741', 'S6882', 'S6883', 'S6887', 'S6890', 'S6894', 'S6900', 'S6903', 'S6919', 'S6925', 'S6928', 'S6929', 'S6971', 'S6973', 'S6974', 'S6982'], 'javascript': ['S6746', 'S6747', 'S6748', 'S6750', 'S6756', 'S6757', 'S6761', 'S6763', 'S6766', 'S6772', 'S6774', 'S6788', 'S6789', 'S6790', 'S6791', 'S6859', 'S6861', 'S7059', 'S7060'], 'java': ['S6804', 'S6806', 'S6813', 'S6818', 'S6829', 'S6831'], 'kubernetes': ['S6865', 'S6869', 'S6870', 'S6873', 'S6892', 'S6897', 'S6907'], 'csharp': ['S6932'], 'docker': ['S7018', 'S7019', 'S7023', 'S7029', 'S7030']}

Not migrated because of a contradiction between quality and severity, please migrate manually:
{'javascript': ['S1441', 'S2310', 'S3523', 'S5254', 'S6661', 'S6666', 'S6671', 'S6676', 'S6679', 'S6749', 'S6754', 'S6759', 'S6767', 'S6770', 'S6775', 'S6836', 'S6849'], 'common': ['S3723', 'S6620', 'S6667', 'S6668', 'S6669', 'S6670', 'S6672', 'S6674', 'S6675', 'S6776', 'S6930', 'S6931', 'S6934', 'S6960', 'S6964'], 'java': ['S6485', 'S6809', 'S6814', 'S6816', 'S6817', 'S6830', 'S6837', 'S6857', 'S6863', 'S6876', 'S6877', 'S6878', 'S6881', 'S6889', 'S6891', 'S6898', 'S6904', 'S6905', 'S6909', 'S6912', 'S6914', 'S6923', 'S6926', 'S7027'], 'kotlin': ['S6524', 'S6527', 'S6528'], 'python': ['S6660'], 'csharp': ['S6798', 'S6800', 'S6968'], 'cfamily': ['S6936', 'S6996', 'S7032', 'S7040'], 'docker': ['S7020', 'S7021', 'S7026', 'S7031']}

Migrated:
{'cfamily': ['S1032', 'S1036', 'S1232', 'S1760', 'S1912', 'S1914', 'S2806', 'S3491', 'S3519', 'S3520', 'S3529', 'S3584', 'S3588', 'S3590', 'S3654', 'S3657', 'S3692', 'S3729', 'S3936', 'S4997', 'S4999', 'S5000', 'S5018', 'S5020', 'S5184', 'S5267', 'S5302', 'S5404', 'S5417', 'S5486', 'S5487', 'S5489', 'S5502', 'S5553', 'S5639', 'S5798', 'S5912', 'S5999', 'S6025', 'S6223', 'S6427', 'S6493', 'S6655', 'S797', 'S798', 'S912', 'S916', 'S946', 'S961', 'S963', 'S969', 'S978', 'S998'], 'csharp': ['S1048', 'S2306', 'S3237', 'S6422', 'S6424'], 'vbnet': ['S1048'], 'plsql': ['S1058', 'S1074', 'S4577'], 'common': ['S1069', 'S1139', 'S1147', 'S1219', 'S128', 'S1309', 'S1314', 'S1451', 'S1493', 'S1527', 'S1590', 'S1614', 'S1669', 'S1845', 'S1909', 'S2007', 'S2068', 'S2095', 'S2096', 'S2178', 'S2187', 'S2189', 'S2190', 'S2275', 'S2368', 'S2387', 'S2437', 'S2689', 'S2695', 'S2699', 'S2857', 'S2930', 'S2931', 'S2953', 'S2970', 'S3046', 'S3060', 'S3360', 'S3427', 'S3433', 'S3443', 'S3464', 'S3516', 'S3618', 'S3827', 'S3862', 'S3869', 'S3875', 'S3877', 'S3884', 'S3889', 'S3931', 'S4159', 'S4462', 'S5496', 'S5632', 'S5708', 'S6265', 'S6270', 'S6302', 'S6304', 'S6329', 'S6333', 'S6373', 'S6418', 'S6472', 'S6781', 'S6839', 'S999'], 'java': ['S1190', 'S2168', 'S2188', 'S2229', 'S2236', 'S2276', 'S2693', 'S2975', 'S3014', 'S3546', 'S3753', 'S4602', 'S5786', 'S5793', 'S5979', 'S6208', 'S6212', 'S6539', 'S6541', 'S6548', 'S923'], 'pli': ['S131'], 'flex': ['S1446', 'S1466', 'S1468', 'S1469'], 'abap': ['S1496', 'S1508', 'S5117'], 'javascript': ['S1526', 'S2703', 'S2817', 'S3796', 'S6268', 'S6299'], 'php': ['S1599', 'S1799', 'S2014', 'S3333', 'S3334', 'S3336', 'S3337', 'S5335', 'S5911'], 'vb6': ['S1657'], 'cobol': ['S1967', 'S1969', 'S3481', 'S3938'], 'python': ['S2316', 'S2317', 'S2711', 'S2712', 'S2823', 'S2876', 'S3403', 'S5549', 'S5607', 'S5633', 'S5642', 'S5644', 'S5714', 'S5719', 'S5722', 'S5724', 'S5756', 'S5807', 'S5828', 'S5905', 'S5953', 'S6725', 'S6779', 'S930'], 'xml': ['S3282', 'S3374'], 'css': ['S4650', 'S4653', 'S4654', 'S4668'], 'apex': ['S5376', 'S5377', 'S5379', 'S5382', 'S5389'], 'secrets': ['S6292', 'S6334', 'S6335', 'S6336', 'S6337', 'S6338', 'S6652', 'S6684', 'S6686', 'S6687', 'S6688', 'S6689', 'S6690', 'S6691', 'S6692', 'S6693', 'S6694', 'S6695', 'S6696', 'S6697', 'S6698', 'S6699', 'S6700', 'S6701', 'S6702', 'S6703', 'S6704', 'S6705', 'S6706', 'S6708', 'S6710', 'S6713', 'S6717', 'S6718', 'S6719', 'S6720', 'S6721', 'S6722', 'S6723', 'S6731', 'S6732', 'S6733', 'S6736', 'S6739', 'S6751', 'S6752', 'S6753', 'S6755', 'S6758', 'S6760', 'S6762', 'S6764', 'S6765', 'S6768', 'S6769', 'S6771', 'S6773', 'S6777', 'S6782', 'S6783', 'S6910', 'S6987', 'S6988', 'S6989', 'S6990', 'S6992', 'S6993', 'S6995', 'S6997', 'S6998', 'S6999', 'S7000', 'S7001', 'S7002', 'S7003', 'S7004', 'S7006', 'S7007', 'S7008', 'S7009', 'S7010', 'S7011', 'S7013', 'S7014', 'S7015', 'S7016', 'S7017', 'S7022', 'S7024', 'S7025']}

Already good:
{'cfamily': ['S1000', 'S1001', 'S1002', 'S1003', 'S1006', 'S1011', 'S1013', 'S1016', 'S1017', 'S1035', 'S1039', 'S1042', 'S1044', 'S1046', 'S1051', 'S1052', 'S1055', 'S1079', 'S1081', 'S1198', 'S1231', 'S1235', 'S1236', 'S1242', 'S1259', 'S1265', 'S1271', 'S1705', 'S1706', 'S1708', 'S1709', 'S1712', 'S1749', 'S1750', 'S1761', 'S1762', 'S1767', 'S1768', 'S1771', 'S1773', 'S1831', 'S1836', 'S1878', 'S1911', 'S1913', 'S1915', 'S1916', 'S1917', 'S1986', 'S2107', 'S2216', 'S2303', 'S2305', 'S2323', 'S2324', 'S2393', 'S2665', 'S2668', 'S2753', 'S2754', 'S2807', 'S2808', 'S2813', 'S2815', 'S3135', 'S3229', 'S3230', 'S3231', 'S3432', 'S3468', 'S3469', 'S3470', 'S3471', 'S3485', 'S3486', 'S3490', 'S3522', 'S3539', 'S3540', 'S3541', 'S3542', 'S3548', 'S3549', 'S3574', 'S3576', 'S3608', 'S3609', 'S3624', 'S3628', 'S3636', 'S3642', 'S3646', 'S3656', 'S3659', 'S3685', 'S3687', 'S3691', 'S3698', 'S3708', 'S3715', 'S3719', 'S3726', 'S3728', 'S3730', 'S3731', 'S3732', 'S3743', 'S3744', 'S3805', 'S3806', 'S3807', 'S3935', 'S4263', 'S4334', 'S4962', 'S4963', 'S4998', 'S5008', 'S5019', 'S5025', 'S5028', 'S5180', 'S5205', 'S5213', 'S5259', 'S5262', 'S5263', 'S5265', 'S5266', 'S5269', 'S5270', 'S5271', 'S5272', 'S5273', 'S5274', 'S5275', 'S5276', 'S5277', 'S5278', 'S5279', 'S5280', 'S5281', 'S5283', 'S5293', 'S5297', 'S5298', 'S5303', 'S5305', 'S5306', 'S5307', 'S5308', 'S5309', 'S5311', 'S5312', 'S5313', 'S5314', 'S5316', 'S5318', 'S5319', 'S5350', 'S5356', 'S5357', 'S5358', 'S5381', 'S5408', 'S5409', 'S5414', 'S5415', 'S5419', 'S5421', 'S5422', 'S5425', 'S5485', 'S5488', 'S5491', 'S5494', 'S5495', 'S5500', 'S5501', 'S5506', 'S5507', 'S5523', 'S5524', 'S5536', 'S5566', 'S5570', 'S5658', 'S5801', 'S5812', 'S5813', 'S5814', 'S5815', 'S5816', 'S5817', 'S5820', 'S5824', 'S5825', 'S5827', 'S5832', 'S5945', 'S5946', 'S5950', 'S5951', 'S5952', 'S5954', 'S5955', 'S5962', 'S5964', 'S5965', 'S5966', 'S5972', 'S5978', 'S5981', 'S5982', 'S5995', 'S5997', 'S6000', 'S6003', 'S6004', 'S6005', 'S6006', 'S6007', 'S6008', 'S6009', 'S6010', 'S6011', 'S6012', 'S6013', 'S6015', 'S6016', 'S6017', 'S6018', 'S6020', 'S6021', 'S6022', 'S6023', 'S6024', 'S6026', 'S6029', 'S6030', 'S6031', 'S6032', 'S6033', 'S6045', 'S6069', 'S6147', 'S6164', 'S6165', 'S6166', 'S6168', 'S6169', 'S6171', 'S6172', 'S6177', 'S6178', 'S6179', 'S6180', 'S6181', 'S6183', 'S6184', 'S6185', 'S6186', 'S6187', 'S6188', 'S6189', 'S6190', 'S6191', 'S6192', 'S6193', 'S6195', 'S6197', 'S6200', 'S6214', 'S6221', 'S6222', 'S6225', 'S6226', 'S6228', 'S6229', 'S6230', 'S6231', 'S6232', 'S6234', 'S6236', 'S6352', 'S6365', 'S6366', 'S6367', 'S6369', 'S6372', 'S6391', 'S6456', 'S6458', 'S6459', 'S6460', 'S6461', 'S6462', 'S6482', 'S6483', 'S6484', 'S6487', 'S6488', 'S6489', 'S6490', 'S6491', 'S6492', 'S6494', 'S6495', 'S6621', 'S6636', 'S6871', 'S6872', 'S6994', 'S7033', 'S7034', 'S7035', 'S784', 'S793', 'S796', 'S799', 'S810', 'S811', 'S812', 'S813', 'S814', 'S817', 'S819', 'S824', 'S831', 'S833', 'S834', 'S835', 'S841', 'S845', 'S851', 'S853', 'S854', 'S855', 'S856', 'S859', 'S860', 'S868', 'S871', 'S872', 'S873', 'S874', 'S876', 'S877', 'S883', 'S886', 'S890', 'S892', 'S897', 'S919', 'S920', 'S922', 'S924', 'S926', 'S929', 'S936', 'S943', 'S945', 'S950', 'S953', 'S954', 'S955', 'S956', 'S958', 'S959', 'S960', 'S966', 'S967', 'S968', 'S977', 'S982', 'S984', 'S985', 'S986', 'S987', 'S988', 'S989', 'S990', 'S991', 'S994', 'S995'], 'common': ['S1005', 'S1006', 'S103', 'S104', 'S1041', 'S1045', 'S1048', 'S105', 'S1066', 'S1067', 'S1075', 'S1077', 'S108', 'S109', 'S110', 'S1103', 'S1104', 'S1105', 'S1106', 'S1107', 'S1108', 'S1109', 'S1110', 'S1117', 'S1119', 'S112', 'S1120', 'S1121', 'S1124', 'S1125', 'S1126', 'S1131', 'S1138', 'S114', 'S1141', 'S1142', 'S1144', 'S1151', 'S116', 'S1163', 'S1166', 'S1168', 'S117', 'S1170', 'S1176', 'S1181', 'S1188', 'S119', 'S1197', 'S1199', 'S1200', 'S1210', 'S1213', 'S1215', 'S1223', 'S1226', 'S1227', 'S1238', 'S124', 'S1244', 'S125', 'S1258', 'S126', 'S1264', 'S127', 'S1270', 'S1291', 'S1301', 'S131', 'S1312', 'S1313', 'S1321', 'S133', 'S134', 'S135', 'S138', 'S139', 'S140', 'S1438', 'S1439', 'S1440', 'S1444', 'S1448', 'S1449', 'S1450', 'S1472', 'S1479', 'S1488', 'S1492', 'S1498', 'S1499', 'S1515', 'S1516', 'S1536', 'S1537', 'S1542', 'S1543', 'S1545', 'S1546', 'S1548', 'S1573', 'S1583', 'S1601', 'S1607', 'S1615', 'S1619', 'S1631', 'S1639', 'S1642', 'S1643', 'S1645', 'S1654', 'S1656', 'S1659', 'S1694', 'S1695', 'S1696', 'S1698', 'S1699', 'S1700', 'S1707', 'S1735', 'S1737', 'S1738', 'S1739', 'S1741', 'S1742', 'S1745', 'S1751', 'S1763', 'S1764', 'S1772', 'S1774', 'S1784', 'S1788', 'S1820', 'S1821', 'S1848', 'S1858', 'S1862', 'S1872', 'S1899', 'S1905', 'S1939', 'S1940', 'S1941', 'S1944', 'S1952', 'S1990', 'S1994', 'S1996', 'S2004', 'S2005', 'S2011', 'S2024', 'S2039', 'S2042', 'S2047', 'S2092', 'S2094', 'S2097', 'S2108', 'S2114', 'S2122', 'S2123', 'S2139', 'S2145', 'S2147', 'S2148', 'S2151', 'S2156', 'S2164', 'S2166', 'S2177', 'S2183', 'S2184', 'S2193', 'S2197', 'S2198', 'S2201', 'S2208', 'S2209', 'S2219', 'S2221', 'S2222', 'S2223', 'S2225', 'S2228', 'S2234', 'S2245', 'S2250', 'S2251', 'S2252', 'S2253', 'S2257', 'S2259', 'S2301', 'S2302', 'S2304', 'S2309', 'S2321', 'S2325', 'S2326', 'S2327', 'S2333', 'S2335', 'S2339', 'S2340', 'S2342', 'S2343', 'S2344', 'S2345', 'S2346', 'S2357', 'S2360', 'S2365', 'S2372', 'S2373', 'S2376', 'S2384', 'S2386', 'S2429', 'S2436', 'S2440', 'S2445', 'S2479', 'S2490', 'S2523', 'S2527', 'S2551', 'S2583', 'S2589', 'S2629', 'S2637', 'S2638', 'S2639', 'S2658', 'S2674', 'S2688', 'S2692', 'S2701', 'S2738', 'S2760', 'S2814', 'S2830', 'S2925', 'S2951', 'S2955', 'S2959', 'S2966', 'S2997', 'S3010', 'S3011', 'S3038', 'S3047', 'S3052', 'S3059', 'S3063', 'S3065', 'S3087', 'S3215', 'S3218', 'S3222', 'S3235', 'S3236', 'S3241', 'S3242', 'S3244', 'S3249', 'S3252', 'S3254', 'S3261', 'S3263', 'S3317', 'S3330', 'S3346', 'S3353', 'S3363', 'S3366', 'S3376', 'S3397', 'S3398', 'S3400', 'S3403', 'S3414', 'S3415', 'S3416', 'S3431', 'S3440', 'S3449', 'S3453', 'S3457', 'S3458', 'S3466', 'S3518', 'S3543', 'S3577', 'S3598', 'S3603', 'S3604', 'S3626', 'S3630', 'S3633', 'S3641', 'S3643', 'S3650', 'S3651', 'S3655', 'S3696', 'S3699', 'S3717', 'S3752', 'S3801', 'S3830', 'S3871', 'S3872', 'S3874', 'S3878', 'S3887', 'S3890', 'S3898', 'S3900', 'S3902', 'S3903', 'S3904', 'S3906', 'S3908', 'S3921', 'S3925', 'S3926', 'S3927', 'S3937', 'S3958', 'S3966', 'S3972', 'S3973', 'S3981', 'S3984', 'S3985', 'S3990', 'S3992', 'S3993', 'S3994', 'S3995', 'S3996', 'S3997', 'S3998', 'S4004', 'S4005', 'S4015', 'S4018', 'S4022', 'S4023', 'S4025', 'S4026', 'S4030', 'S4036', 'S4040', 'S4054', 'S4060', 'S4109', 'S4136', 'S4143', 'S4144', 'S4158', 'S4165', 'S4188', 'S4196', 'S4200', 'S4201', 'S4210', 'S4220', 'S4225', 'S4260', 'S4274', 'S4275', 'S4277', 'S4413', 'S4428', 'S4456', 'S4457', 'S4487', 'S4502', 'S4507', 'S4508', 'S4524', 'S4545', 'S4581', 'S4583', 'S4586', 'S4635', 'S4639', 'S4721', 'S4738', 'S4787', 'S4790', 'S4792', 'S4797', 'S4801', 'S4828', 'S4970', 'S5034', 'S5042', 'S5122', 'S5141', 'S5148', 'S5245', 'S5247', 'S5256', 'S5257', 'S5260', 'S5261', 'S5264', 'S5320', 'S5322', 'S5324', 'S5359', 'S5361', 'S5443', 'S5603', 'S5604', 'S5679', 'S5689', 'S5691', 'S5693', 'S5713', 'S5725', 'S5728', 'S5730', 'S5732', 'S5734', 'S5736', 'S5739', 'S5742', 'S5743', 'S5753', 'S5757', 'S5759', 'S5766', 'S5770', 'S5779', 'S5780', 'S5781', 'S5783', 'S5785', 'S5797', 'S5802', 'S5804', 'S5842', 'S5843', 'S5845', 'S5846', 'S5850', 'S5852', 'S5855', 'S5857', 'S5860', 'S5863', 'S5867', 'S5868', 'S5869', 'S5915', 'S5939', 'S5958', 'S5994', 'S5996', 'S6001', 'S6002', 'S6019', 'S6035', 'S6112', 'S6145', 'S6146', 'S6194', 'S6202', 'S6203', 'S6218', 'S6245', 'S6249', 'S6252', 'S6258', 'S6273', 'S6275', 'S6281', 'S6288', 'S6291', 'S6293', 'S6300', 'S6303', 'S6308', 'S6319', 'S6323', 'S6326', 'S6327', 'S6328', 'S6330', 'S6331', 'S6332', 'S6350', 'S6353', 'S6354', 'S6359', 'S6362', 'S6363', 'S6364', 'S6374', 'S6375', 'S6376', 'S6378', 'S6379', 'S6380', 'S6381', 'S6383', 'S6387', 'S6388', 'S6395', 'S6396', 'S6397', 'S6401', 'S6402', 'S6403', 'S6405', 'S6407', 'S6412', 'S6413', 'S6414', 'S6417', 'S6444', 'S6463', 'S6469', 'S6470', 'S6471', 'S6474', 'S6500', 'S6502', 'S6504', 'S6506', 'S6507', 'S6513', 'S6561', 'S6562', 'S6563', 'S6566', 'S6575', 'S6580', 'S6585', 'S6588', 'S6602', 'S6603', 'S6605', 'S6607', 'S6608', 'S6609', 'S6610', 'S6612', 'S6613', 'S6617', 'S6618', 'S6656', 'S6664', 'S6673', 'S6677', 'S6678', 'S6958', 'S6966', 'S787', 'S818', 'S820', 'S864', 'S867', 'S878', 'S881', 'S888', 'S899', 'S905', 'S907', 'S909', 'S923', 'S925', 'S930', 'S935', 'S979', 'S997'], 'plsql': ['S1056', 'S1057', 'S1059', 'S1070', 'S1071', 'S141', 'S1478', 'S1703', 'S2221', 'S2491', 'S2492', 'S2517', 'S2519', 'S2520', 'S2538', 'S3874', 'S4062', 'S4081', 'S4421', 'S4575', 'S4576', 'S4584', 'S5047', 'S6467'], 'html': ['S1082', 'S1083', 'S1297', 'S1298', 'S1436', 'S1456', 'S1457', 'S1458', 'S1827', 'S4084', 'S4645', 'S5254', 'S5255', 'S5258'], 'javascript': ['S1082', 'S1090', 'S1528', 'S1529', 'S1530', 'S1533', 'S1534', 'S1535', 'S1539', 'S2137', 'S2138', 'S2392', 'S2424', 'S2427', 'S2428', 'S2430', 'S2685', 'S2692', 'S2713', 'S2870', 'S2871', 'S2990', 'S2999', 'S3001', 'S3003', 'S3402', 'S3498', 'S3499', 'S3500', 'S3504', 'S3513', 'S3514', 'S3524', 'S3525', 'S3531', 'S3533', 'S3579', 'S3616', 'S3686', 'S3735', 'S3757', 'S3758', 'S3760', 'S3782', 'S3785', 'S3786', 'S3798', 'S3799', 'S3800', 'S3812', 'S3834', 'S3854', 'S3863', 'S4043', 'S4084', 'S4124', 'S4125', 'S4137', 'S4138', 'S4139', 'S4140', 'S4156', 'S4157', 'S4204', 'S4322', 'S4323', 'S4324', 'S4325', 'S4326', 'S4327', 'S4328', 'S4335', 'S4619', 'S4621', 'S4622', 'S4623', 'S4624', 'S4634', 'S4782', 'S4798', 'S4822', 'S6079', 'S6080', 'S6092', 'S6324', 'S6325', 'S6351', 'S6426', 'S6435', 'S6438', 'S6439', 'S6440', 'S6441', 'S6442', 'S6443', 'S6477', 'S6478', 'S6479', 'S6480', 'S6481', 'S6486', 'S6509', 'S6522', 'S6523', 'S6534', 'S6544', 'S6550', 'S6551', 'S6557', 'S6564', 'S6565', 'S6568', 'S6569', 'S6571', 'S6572', 'S6578', 'S6583', 'S6590', 'S6594', 'S6598', 'S6635', 'S6637', 'S6638', 'S6643', 'S6644', 'S6645', 'S6647', 'S6650', 'S6653', 'S6654', 'S6657', 'S6660', 'S6854', 'S6855', 'S6957', 'S6959', 'S930'], 'java': ['S1111', 'S1113', 'S1130', 'S1132', 'S1149', 'S1150', 'S1153', 'S1157', 'S1158', 'S1160', 'S1162', 'S1165', 'S1171', 'S1174', 'S1175', 'S118', 'S1182', 'S1191', 'S1193', 'S1194', 'S1195', 'S1201', 'S1214', 'S1217', 'S1220', 'S1221', 'S1228', 'S1310', 'S1315', 'S1317', 'S1319', 'S1452', 'S1596', 'S1598', 'S1602', 'S1604', 'S1610', 'S1611', 'S1612', 'S1640', 'S1641', 'S1710', 'S1711', 'S1844', 'S1849', 'S1860', 'S1942', 'S1943', 'S1948', 'S1989', 'S2039', 'S2055', 'S2057', 'S2059', 'S2060', 'S2061', 'S2062', 'S2063', 'S2065', 'S2066', 'S2093', 'S2109', 'S2110', 'S2111', 'S2112', 'S2116', 'S2118', 'S2119', 'S2121', 'S2127', 'S2129', 'S2130', 'S2133', 'S2134', 'S2140', 'S2141', 'S2142', 'S2143', 'S2153', 'S2154', 'S2157', 'S2160', 'S2162', 'S2167', 'S2176', 'S2185', 'S2186', 'S2196', 'S2200', 'S2203', 'S2204', 'S2211', 'S2226', 'S2230', 'S2232', 'S2235', 'S2254', 'S2272', 'S2273', 'S2274', 'S2293', 'S2308', 'S2388', 'S2390', 'S2438', 'S2441', 'S2442', 'S2444', 'S2446', 'S2447', 'S2629', 'S2675', 'S2676', 'S2677', 'S2694', 'S2698', 'S2701', 'S2718', 'S2786', 'S2789', 'S2864', 'S2885', 'S2886', 'S2924', 'S2972', 'S2973', 'S2974', 'S3008', 'S3012', 'S3020', 'S3030', 'S3032', 'S3034', 'S3039', 'S3042', 'S3064', 'S3066', 'S3067', 'S3077', 'S3078', 'S3305', 'S3306', 'S3436', 'S3437', 'S3551', 'S3553', 'S3578', 'S3599', 'S3631', 'S3658', 'S3725', 'S3740', 'S3749', 'S3750', 'S3751', 'S3824', 'S3864', 'S3959', 'S3986', 'S4011', 'S4032', 'S4034', 'S4042', 'S4065', 'S4087', 'S4174', 'S4248', 'S4266', 'S4276', 'S4288', 'S4348', 'S4349', 'S4351', 'S4424', 'S4425', 'S4434', 'S4435', 'S4449', 'S4454', 'S4488', 'S4512', 'S4517', 'S4544', 'S4551', 'S4601', 'S4605', 'S4682', 'S4684', 'S4719', 'S4838', 'S4925', 'S4926', 'S4929', 'S4968', 'S4973', 'S5128', 'S5164', 'S5194', 'S5301', 'S5329', 'S5411', 'S5413', 'S5612', 'S5663', 'S5664', 'S5665', 'S5669', 'S5738', 'S5776', 'S5777', 'S5778', 'S5790', 'S5803', 'S5810', 'S5826', 'S5831', 'S5833', 'S5838', 'S5840', 'S5841', 'S5853', 'S5854', 'S5866', 'S5917', 'S5960', 'S5961', 'S5967', 'S5969', 'S5970', 'S5976', 'S5977', 'S5993', 'S5998', 'S6068', 'S6070', 'S6073', 'S6103', 'S6104', 'S6126', 'S6201', 'S6204', 'S6205', 'S6206', 'S6209', 'S6211', 'S6213', 'S6216', 'S6217', 'S6219', 'S6241', 'S6242', 'S6243', 'S6244', 'S6246', 'S6262', 'S6263', 'S6320', 'S6322', 'S6355', 'S6411', 'S6416', 'S6466', 'S6646', 'S6649', 'S6651', 'S6707', 'S6780', 'S6810', 'S6832', 'S6833', 'S6838', 'S6856', 'S6862', 'S6880', 'S6885', 'S6901', 'S6906', 'S6913', 'S6915', 'S6916', 'S6976'], 'python': ['S1129', 'S1244', 'S1716', 'S1720', 'S1722', 'S2318', 'S2319', 'S2320', 'S2710', 'S2772', 'S2836', 'S5655', 'S5685', 'S5704', 'S5706', 'S5707', 'S5709', 'S5712', 'S5717', 'S5720', 'S5727', 'S5747', 'S5754', 'S5795', 'S5796', 'S5799', 'S5806', 'S5864', 'S5886', 'S5890', 'S5899', 'S5906', 'S5914', 'S5918', 'S6464', 'S6465', 'S6466', 'S6468', 'S6537', 'S6538', 'S6540', 'S6542', 'S6543', 'S6545', 'S6546', 'S6552', 'S6553', 'S6554', 'S6556', 'S6559', 'S6560', 'S6711', 'S6730', 'S6735', 'S6742', 'S6785', 'S6786', 'S6792', 'S6794', 'S6795', 'S6796', 'S6799', 'S6886', 'S6899', 'S6908', 'S6911', 'S6918', 'S6969', 'S6972', 'S6978', 'S6979', 'S6983', 'S6984', 'S6985'], 'cobol': ['S1137', 'S1184', 'S1274', 'S1275', 'S1276', 'S1277', 'S1278', 'S1279', 'S1280', 'S1281', 'S1282', 'S1283', 'S1284', 'S1285', 'S1287', 'S1288', 'S1289', 'S1290', 'S1292', 'S1293', 'S1299', 'S1300', 'S1302', 'S1303', 'S1305', 'S1306', 'S1307', 'S1308', 'S1316', 'S1437', 'S1461', 'S1471', 'S1473', 'S1474', 'S1475', 'S1476', 'S1550', 'S1579', 'S1580', 'S1582', 'S1587', 'S1589', 'S1682', 'S1683', 'S1685', 'S1686', 'S1691', 'S1692', 'S1693', 'S1713', 'S1723', 'S1725', 'S1726', 'S1728', 'S1729', 'S1731', 'S1732', 'S1740', 'S1747', 'S1755', 'S1966', 'S2269', 'S3004', 'S3394', 'S3482', 'S3483', 'S3515', 'S3573', 'S3580', 'S3581', 'S3582', 'S3592', 'S3595', 'S3606', 'S3613', 'S3614', 'S3620', 'S3621', 'S3625', 'S3632', 'S3671', 'S3767', 'S3891', 'S3892', 'S3939', 'S4727', 'S4882', 'S4883', 'S4884'], 'csharp': ['S1192', 'S1313', 'S1944', 'S2290', 'S2291', 'S2292', 'S2328', 'S2330', 'S2743', 'S2934', 'S2952', 'S2995', 'S2996', 'S3005', 'S3168', 'S3169', 'S3172', 'S3216', 'S3217', 'S3220', 'S3234', 'S3246', 'S3247', 'S3251', 'S3253', 'S3256', 'S3260', 'S3262', 'S3264', 'S3265', 'S3267', 'S3343', 'S3441', 'S3442', 'S3444', 'S3445', 'S3447', 'S3450', 'S3451', 'S3456', 'S3459', 'S3532', 'S3597', 'S3600', 'S3610', 'S3876', 'S3880', 'S3881', 'S3885', 'S3897', 'S3909', 'S3928', 'S3956', 'S3963', 'S3967', 'S3971', 'S4000', 'S4002', 'S4017', 'S4019', 'S4027', 'S4035', 'S4039', 'S4041', 'S4047', 'S4049', 'S4050', 'S4052', 'S4055', 'S4056', 'S4057', 'S4058', 'S4059', 'S4061', 'S4069', 'S4070', 'S4211', 'S4212', 'S4226', 'S4261', 'S6419', 'S6420', 'S6421', 'S6423', 'S6640', 'S6797', 'S6802', 'S6803', 'S6961', 'S6962', 'S6965'], 'flex': ['S1320', 'S1321', 'S1434', 'S1435', 'S1445', 'S1447', 'S1455', 'S1462', 'S1463', 'S1464', 'S1465', 'S1467', 'S1470', 'S1982'], 'abap': ['S1485', 'S1486', 'S1487', 'S1491', 'S1494', 'S1500', 'S1501', 'S1502', 'S1505', 'S1506', 'S1507', 'S1510', 'S1511', 'S1512', 'S1540', 'S1547', 'S1549', 'S1597', 'S1655', 'S1668', 'S1670', 'S1671', 'S1672', 'S1673', 'S1675', 'S1676', 'S1715', 'S2237', 'S2239', 'S2240', 'S2241', 'S2242', 'S2243', 'S2809', 'S5115', 'S5118'], 'php': ['S1600', 'S1603', 'S1605', 'S1757', 'S1765', 'S1766', 'S1779', 'S1780', 'S1781', 'S1793', 'S1808', 'S1997', 'S1998', 'S2000', 'S2001', 'S2002', 'S2003', 'S2010', 'S2036', 'S2037', 'S2038', 'S2043', 'S2044', 'S2046', 'S2050', 'S2918', 'S3335', 'S4824', 'S4833', 'S5328', 'S5899', 'S5935', 'S6339', 'S6341', 'S6343', 'S6344', 'S6345', 'S6346', 'S6347', 'S6348', 'S6349', 'S6393', 'S6600'], 'rpg': ['S1608', 'S1617', 'S1618', 'S1620', 'S1621', 'S1622', 'S1624', 'S1625', 'S1626', 'S1627', 'S1629', 'S1630', 'S1632', 'S1633', 'S1634', 'S1752', 'S1753', 'S1816', 'S1880', 'S1895', 'S1900', 'S1901', 'S1902', 'S2016', 'S2025', 'S2031', 'S2202', 'S2793', 'S2795', 'S2798', 'S2803'], 'vb6': ['S1647', 'S1648', 'S1649', 'S1650', 'S1651', 'S1652', 'S1658', 'S1660', 'S1702'], 'xml': ['S1778', 'S3373', 'S3417', 'S3419', 'S3420', 'S3421', 'S3422', 'S3423', 'S3438', 'S3439', 'S3822', 'S5594', 'S6358', 'S6361'], 'kotlin': ['S2116', 'S5612', 'S6305', 'S6306', 'S6307', 'S6309', 'S6310', 'S6311', 'S6312', 'S6313', 'S6314', 'S6315', 'S6316', 'S6318', 'S6508', 'S6510', 'S6511', 'S6512', 'S6514', 'S6515', 'S6516', 'S6517', 'S6518', 'S6519', 'S6529', 'S6530', 'S6532', 'S6558', 'S6611', 'S6615', 'S6623', 'S6624', 'S6625', 'S6626', 'S6629', 'S6631', 'S6634'], 'vbnet': ['S2347', 'S2348', 'S2349', 'S2352', 'S2354', 'S2355', 'S2359', 'S2362', 'S2363', 'S2364', 'S2366', 'S2367', 'S2369', 'S2370', 'S2374', 'S2375', 'S3385', 'S3860', 'S3866', 'S5944'], 'swift': ['S2635', 'S2950', 'S2957', 'S2958', 'S2960', 'S2961', 'S2962', 'S2967', 'S2968', 'S2969', 'S3083', 'S3086', 'S3110', 'S3111', 'S3661', 'S4173', 'S4184', 'S4186', 'S4233'], 'tsql': ['S3643', 'S4075', 'S4078', 'S4094', 'S4102', 'S4103', 'S4104', 'S4108', 'S4149', 'S4154', 'S4155', 'S4819', 'S4820', 'S6498'], 'pli': ['S3982', 'S4208', 'S4806', 'S5348'], 'css': ['S4648', 'S4649', 'S4651', 'S4652', 'S4655', 'S4656', 'S4657', 'S4658', 'S4659', 'S4660', 'S4661', 'S4662', 'S4664', 'S4666', 'S4667', 'S4670'], 'apex': ['S5378', 'S5384', 'S5386', 'S5387', 'S5390', 'S5394', 'S5395'], 'terraform': ['S6255', 'S6400', 'S6404', 'S6406', 'S6408', 'S6409', 'S6410'], 'cloudformation': ['S6294', 'S6295'], 'text': ['S6389'], 'docker': ['S6476', 'S6497', 'S6505', 'S6570', 'S6573', 'S6574', 'S6579', 'S6581', 'S6584', 'S6586', 'S6587', 'S6589', 'S6595', 'S6597', 'S7028'], 'kubernetes': ['S6893']}
2024-11-05 16:33:31 +01:00
erwan.serandour
47956ba750 allow INFO and BLOCKER for CCT rule quality severity to support Multi-Quality Rule mode 2024-11-05 16:33:31 +01:00
Gregory Paidis
2a2c8c536b
S2068: Update description for C# (#4473) 2024-11-05 15:05:44 +01:00
github-actions[bot]
91873ea473
Create rule S7136: Clojars deploy tokens should not be disclosed (#4463) 2024-11-05 10:10:57 +00:00
SonarTech
4c937f7f7d update coverage information 2024-11-05 02:43:04 +00:00
Hendrik Buchwald
0093e1be20
Modify rule S6096: Update resources (#4467) 2024-11-04 17:27:34 +01:00
github-actions[bot]
5b31725f81
Create rule S7137: RubyGems.org API keys should not be disclosed (APPSEC-1862) (#4464) 2024-11-04 17:13:23 +01:00
Sebastien Andrivet
fd533682a3
Modify rule S5131: Fix dead link (#4461) 2024-11-04 13:24:06 +01:00
Mostafa Mohammed
419edfbf30
Modify rule S1155: Adopt standard library method names
Co-authored-by: Marco Borgeaud <marco.borgeaud@sonarsource.com>
Co-authored-by: Michael Jabbour <117195239+michael-jabbour-sonarsource@users.noreply.github.com>
2024-11-01 15:59:56 +01:00
Martin Strecker
56018c314b
NET-567 Modify rule S6605: Remove from SonarWay and update benchmarks (#4459) 2024-10-31 09:52:14 +01:00
daniel-teuchert-sonarsource
86ac8e6b42
Modify Rule S6287: Improve Message (#4455) 2024-10-31 09:41:16 +01:00
Egon Okerman
2268e54865
Modify rule S5334: Add noncompliant comment in C# (APPSEC-258) (#4439)
* Add noncompliant comment to noncompliant example

* add comment

---------

Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com>
2024-10-31 09:33:35 +01:00
SonarTech
7f3640afc5 update coverage information 2024-10-31 02:44:22 +00:00
Antonio Aversa
a8afb3842f
Modify rule S2260: Fix list of actions to deal with analyzer failures in the description (#4457) 2024-10-30 16:13:24 +00:00
Loris S.
d662fdf017
Modify S2053(C#): Improve code sample (#4452) 2024-10-30 16:46:47 +01:00
daniel-teuchert-sonarsource
041d90ff38
Modify Rule S5144: Add information on blacklisting (#4454)
* Modify Rule S5144: Add information on blacklisting
2024-10-30 14:57:46 +00:00
Hendrik Buchwald
7f4817c401
Modify rule S6377: Clarify C# compliant code sample (APPSEC-1731) (#4451) 2024-10-30 14:42:45 +01:00
SonarTech
d93d542b81 update coverage information 2024-10-30 02:43:58 +00:00
Martin Strecker
8beccff292
Remove from SoanrWay and update benchmarks (#4450) 2024-10-29 15:53:02 +01:00
Martin Strecker
3e93c74572
NET-407 Update S2551 rule description. (#4445)
* Update S2551 rule description.

* Add new line

* Newlines
2024-10-29 11:39:01 +00:00
Martin Strecker
823fcb14f6
Modify rule S6602: Update benchmark (#4438)
* Update benchmark

* Update why-dotnet.adoc

* Remove from SonarWay

* Apply suggestions from code review

Co-authored-by: Cristian <67206480+CristianAmbrosini@users.noreply.github.com>

---------

Co-authored-by: Cristian <67206480+CristianAmbrosini@users.noreply.github.com>
2024-10-29 12:33:52 +01:00
github-actions[bot]
4b89a9dddf
Create rule S6418 add PHP (#4447) 2024-10-29 10:41:43 +01:00
daniel-teuchert-sonarsource
a3028b8b58
Modify rule S2245: Clarify the naming of random number generators (#4446)
* Clarify the naming of random number generators
2024-10-29 10:36:18 +01:00
github-actions[bot]
57b08f6343
Create rule S7127: "std::size" should be used to determine the size of arrays (CPP-5791) 2024-10-28 16:10:14 +00:00
Hendrik Buchwald
3dd031e4f9
Modify rule S6870: Improve description (#4443) 2024-10-28 15:09:05 +00:00
SonarTech
2d59cc5136 update coverage information 2024-10-26 02:41:23 +00:00
github-actions[bot]
b835eba04d
Create rule S6596 add Ansible (#4442)
* Add ansible to rule S6596

* Create rule S6596 add Ansible

---------

Co-authored-by: mstachniuk <mstachniuk@users.noreply.github.com>
Co-authored-by: Marcin Stachniuk <marcin.stachniuk@sonarsource.com>
2024-10-25 16:50:41 +02:00
github-actions[bot]
3d0af4f45c
Create rule S6867: Add Ansible (#4441) 2024-10-25 16:06:43 +02:00
github-actions[bot]
11089511c6
Create rule S6431: Add Ansible (#4437) 2024-10-25 15:32:57 +02:00
github-actions[bot]
5cd49b86a1
Create rule S6429: Add Ansible (#4436)
Create rule S6429: Add Ansible
2024-10-25 14:25:52 +02:00
github-actions[bot]
77701ebe4c
Create rule S6868: Add Ansible (#4435) 2024-10-25 11:34:51 +02:00
Antonio Aversa
0da64f5961
Modify rule S2260: Improve title and description (#4440) 2024-10-25 08:50:13 +00:00
GabinL21
40d0b7b271
Modify rule S6473: Add parameter (#4434) 2024-10-25 09:02:44 +02:00
SonarTech
2a643a107e update coverage information 2024-10-25 02:43:54 +00:00
github-actions[bot]
8f70320640
Create rule S6418 Split S2068 into password and secrets (new rule S6418) CPP-5813 2024-10-24 11:36:10 +02:00
SonarTech
d1b2fe3283 update coverage information 2024-10-24 02:43:22 +00:00
Loris S.
3759f659ca
Modified S5144(C#): Use HttpClient instead of old WebRequest (#4431) 2024-10-23 15:34:00 +02:00
github-actions[bot]
fa06fa27c0
Modify rule S1541: Add Dart language (#4423)
Co-authored-by: antonioaversa <antonioaversa@users.noreply.github.com>
2024-10-23 14:46:20 +02:00
Martin Strecker
f4c4dd5a27
Modify rule S3878: Add collection expression and collection params to the description (#4430) 2024-10-23 11:27:29 +02:00
SonarTech
0c48561495 update coverage information 2024-10-23 02:43:25 +00:00
GabinL21
0c1d492146
Modify rule S6473: Fix Kubernetes service code example (#4429) 2024-10-22 17:10:47 +02:00
Guillaume Dequenne
cfcc2e6ea9
Ensure issue severities are consistent between old model and CCT (#4428) 2024-10-22 14:40:59 +02:00
Antonio Aversa
3837a175d3
Convention: use colon as separator in comments within code blocks (#4425)
Co-authored-by: Loïc Joly <loic.joly@sonarsource.com>
2024-10-21 08:27:29 +00:00
SonarTech
4d35623ab6 update coverage information 2024-10-19 02:42:25 +00:00
SonarTech
fd1d376848 update coverage information 2024-10-18 02:43:58 +00:00
Hendrik Buchwald
44534bc94e
Modify rule S7024 & S7025: Update example to trigger the rule (#4424) 2024-10-16 15:02:38 +00:00
github-actions[bot]
fab84d04b6
Modify rule S1990: mark quick fix as "covered" (#4421) 2024-10-16 09:34:32 +00:00
SonarTech
5570d7f9ea update coverage information 2024-10-16 02:44:04 +00:00
Loïc Joly
733ac96ca6
Add guidelines to format references to code elements 2024-10-15 22:29:53 +02:00
Jamie Anderson
82b94b9a0b
Modify rule S7007: Update example (#4418)
While validating this rule, it was found that the noncompliant example
in the RSPEC did not trigger. This is because the detection also looks
for the secret ID, which is missing from the example.

The example has now been updated to include a secret ID and it now
correctly triggers the rule.
2024-10-15 14:04:15 +01:00
SonarTech
c24b9fb275 update coverage information 2024-10-15 02:43:43 +00:00
Marco Borgeaud
33780b6d3a
Detect title as subsections (#4407) 2024-10-14 14:48:37 +00:00
David Kunzmann
a5e0c5cfd4
Modify rule S6929: Corrected quickfix metadata (#4416) 2024-10-14 14:09:46 +02:00
Marco Borgeaud
cee0ff447c
Modify rule S2699: Fix How to fix it section level (#4409) 2024-10-14 14:00:54 +02:00
Mike Swainston-Rainford
625764e2d5 SONARXML-194 S3422: Add Compliant code examples 2024-10-14 13:56:35 +02:00
Marco Borgeaud
2f448af0d6
Modify rules S2710,S5685: Fix How to fix it section level (#4408) 2024-10-14 10:24:14 +02:00
SonarTech
393206d32e update coverage information 2024-10-12 02:41:27 +00:00
Antonio Aversa
45732d5930
Modify rule S7120: Improve description and fix code example 2024-10-11 15:18:02 +02:00
Antonio Aversa
62d7b0373d
Modify rule S7124: fix non-compiling code example 2024-10-11 15:17:54 +02:00
David Kunzmann
8158b8b61a
Modify rule S2068: Update title to "Hard-coded passwords are security-sensitive" (#4411) 2024-10-11 11:31:20 +02:00
Marco Borgeaud
b16a5e7ee9
Add minimal config for Codespaces (#4406)
Make it easier to use Codespace to develop rspec-tools by reusing the Dockerfile for the CI.
2024-10-11 09:22:09 +02:00
github-actions[bot]
8dfa2ffff7
Create rule S7117: "SizedBox" should be used to add a whitespace to a layout
Co-authored-by: Marharyta <margarita.nedzelska@sonarsource.com>
2024-10-10 11:40:55 +00:00
mike-swainston-rainford-sonar
2aec911a18
Modify Rule S3422: Add Compliant code examples (#4399) 2024-10-10 11:17:35 +02:00
Antonio Aversa
b5f14301e9
Modify rule S7112: Add S7113 as related rule (#4396) 2024-10-10 11:14:37 +02:00
Antonio Aversa
1b7f6144a2
Modify rule S7113: Fix S7112 rule number in related rules (#4397) 2024-10-10 11:11:54 +02:00
Antonio Aversa
a3f71c447b
Modify rule S7109: Improve how to fix grammar (#4402) 2024-10-10 11:10:33 +02:00
Antonio Aversa
140a3f7882
Modify rule S7114: Improve "Why is this an issue" grammar (#4403) 2024-10-10 11:09:54 +02:00
github-actions[bot]
8b86eb6fa5
Create rule S7115: "mounted" should be checked when using a "BuildContext" after an async operation (use_build_context_synchronously) (#4368)
Co-authored-by: antonioaversa <antonioaversa@users.noreply.github.com>
2024-10-10 11:07:10 +02:00
SonarTech
9a5a951210 update coverage information 2024-10-10 08:20:02 +00:00
SonarTech
491cce69f0 update coverage information 2024-10-10 02:43:09 +00:00
github-actions[bot]
c107b359b6
Create rule S7124: "child" properties should be placed last in widget instantiation (sort_child_properties_last) (#4395)
Co-authored-by: antonioaversa <antonioaversa@users.noreply.github.com>
2024-10-09 18:05:34 +02:00
github-actions[bot]
4f920e9878
Create rule S7123: Literal constructors parameters of @immutable classes should be const (prefer_const_literals_to_create_immutables) (#4393)
Co-authored-by: antonioaversa <antonioaversa@users.noreply.github.com>
2024-10-09 17:33:50 +02:00
Alban Auzeill
fceead7e75
Modify rule S1190: Fix misinterpreted _ (#4401) 2024-10-09 17:12:31 +02:00
Angelo Buono
2f262c1640
Modify rule S1190 (#4400)
* Update S1190

* Updated link
2024-10-09 16:58:00 +02:00
github-actions[bot]
d3a2169e4d
Create rule S7122: Unnecessary widget containers should be removed (avoid_unnecessary_containers) (#4392)
Co-authored-by: antonioaversa <antonioaversa@users.noreply.github.com>
2024-10-09 14:15:40 +00:00
Marco Borgeaud
d7be1f6bef
Modify rule S5500: fix level of "How to fix it" section (CPP-5804) (#4398) 2024-10-09 15:55:35 +02:00
github-actions[bot]
50b13ef2d3
Create rule S7120: Widget constructors should have a key parameter (use_key_in_widget_constructors) (#4389)
Co-authored-by: antonioaversa <antonioaversa@users.noreply.github.com>
2024-10-09 13:03:41 +00:00
Antonio Aversa
d5cc1222f6
Modify rule S7107: Fix non-compliant example (#4382) 2024-10-09 14:44:32 +02:00
Antonio Aversa
7c3b887cf7
Modify rule S7112: Improve short description (#4388) 2024-10-09 14:43:35 +02:00
github-actions[bot]
978a22fe9f
Create rule S7114: Flutter widget "createState" should only return a new "State" (no_logic_in_create_state) (#4367)
Co-authored-by: antonioaversa <antonioaversa@users.noreply.github.com>
2024-10-09 12:43:16 +00:00
github-actions[bot]
5cbd4d8e7d
Create rule S7109: Web-only libraries should only be used in Flutter web plugins (avoid_web_libraries_in_flutter) (#4358)
Co-authored-by: antonioaversa <antonioaversa@users.noreply.github.com>
2024-10-09 14:37:11 +02:00
tomasz-kaminski-sonarsource
d162735cf0
CPP-5803 S7035 Add exception for casts to bool 2024-10-09 08:38:06 +00:00
github-actions[bot]
d071c05987
Modify rule S1264: mark quick fix as "covered" (#4390)
Co-authored-by: mostafa-mohammed-sonarsource <mostafa-mohammed-sonarsource@users.noreply.github.com>
Co-authored-by: Mostafa Mohammed <mostafa.mohammed@sonarsource.com>
2024-10-08 17:27:44 +02:00
github-actions[bot]
dddd173056
Create rule S5849: Setting capabilities is security-sensitive (#4374) 2024-10-08 16:20:57 +02:00
Antonio Aversa
ec99a6030e
Modify rule S7103: Remove from Sonar-Way (#4375) 2024-10-08 14:26:00 +02:00
github-actions[bot]
19df85c0ad
Modify rule S6437: add Ansible (APPSEC-2164) (#4373)
* Add ansible to rule S6437

* Copy over ARM text

* Complete Ansible text

* Fix typo

---------

Co-authored-by: egon-okerman-sonarsource <egon-okerman-sonarsource@users.noreply.github.com>
Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
2024-10-08 13:56:51 +02:00
Yassin Kammoun
a724ef1a6c
Modify rule S3776: Exclude short-circuiting and null coalescing altogether (#4386) 2024-10-08 11:49:24 +02:00
Sebastien Andrivet
51c5882cdf
Modify S2612: add Ansible (#4356) 2024-10-08 10:51:07 +02:00
Sebastian Zumbrunn
62638f5d69
SONARPY-2005 update wording to exclude in in not for-loops (#4380) 2024-10-08 10:40:53 +02:00
github-actions[bot]
bed254ea2a
Create rule S6433: Add support for Ansible (#4369)
* Add ansible to rule S6433

* Add rule for Ansible

* Fix path

* Add documentation links

---------

Co-authored-by: sebastien-andrivet-sonarsource <sebastien-andrivet-sonarsource@users.noreply.github.com>
Co-authored-by: Sebastien Andrivet <sebastien.andrivet@sonarsource.com>
2024-10-08 08:52:33 +02:00
Antonio Aversa
12b17b7cb9
Modify rule S7113: Fix link prefix under resources documentation (#4384) 2024-10-07 17:12:32 +00:00
Antonio Aversa
61b056455b
Modify rule S7108: Fix formatting and improve description (#4383) 2024-10-07 18:50:57 +02:00
github-actions[bot]
1ab0a36784
Modify rule S4830: add Ansible (APPSEC-2162) (#4365)
* Add ansible to rule S4830

* Add Ansible section

---------

Co-authored-by: egon-okerman-sonarsource <egon-okerman-sonarsource@users.noreply.github.com>
Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
2024-10-07 17:36:47 +02:00
David Kunzmann
28068d773a
Modify rule S6711: SONARPY-2016: Make rule examples for S6711 module-level (#4378) 2024-10-07 17:09:08 +02:00
github-actions[bot]
1a23b1f2e8
Add ansible to rule S6430 (#4372)
Co-authored-by: pierre-loup-tristant-sonarsource <pierre-loup-tristant-sonarsource@users.noreply.github.com>
2024-10-07 15:49:54 +02:00
github-actions[bot]
0d9930a426
Modify rule S6428: Add Ansible (APPSEC-2159) (#4357)
* Add ansible to rule S6428

* Add Ansible text

* Fix typo

* Fix typo in Kubernetes too

---------

Co-authored-by: egon-okerman-sonarsource <egon-okerman-sonarsource@users.noreply.github.com>
Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
2024-10-07 15:09:51 +02:00
Dorian Burihabwa
dcf8ddd32f [NO-JIRA] Fix rule coverage for Apex, Go, Ruby and Scala
Replaced the old reference to slang-enterprise with references to split
repos and JIRA projects for each of the former SLang languages (Apex, Go, Ruby and Scala).
2024-10-07 15:07:25 +02:00
github-actions[bot]
af1e607df5
Add ansible to rule S1135 (#4371)
Co-authored-by: petertrr <petertrr@users.noreply.github.com>
2024-10-07 09:47:38 +02:00
SonarTech
83c2b28511 update coverage information 2024-10-05 02:41:44 +00:00
github-actions[bot]
ea81fee645
Add ansible to rule S5332 (#4349)
Co-authored-by: pierre-loup-tristant-sonarsource <pierre-loup-tristant-sonarsource@users.noreply.github.com>
2024-10-04 15:47:01 +02:00
Antonio Aversa
23e23ae3f6
Modify rule S7112: Fix spelling in description (#4370) 2024-10-04 12:23:15 +00:00
github-actions[bot]
21c3a62798
Create rule S7113: @immutable classes should only have const constructors (prefer_const_constructors_in_immutables) (#4364)
Co-authored-by: antonioaversa <antonioaversa@users.noreply.github.com>
2024-10-04 14:10:12 +02:00
github-actions[bot]
f84f7cf441
Create rule S7112: Const constructors should be invoked with const (prefer_const_constructors) (#4363)
Co-authored-by: antonioaversa <antonioaversa@users.noreply.github.com>
2024-10-04 12:08:16 +00:00
github-actions[bot]
f77a5dac57
Create rule S7111: "part of" directives should be used with strings (use_string_in_part_of_directives) (#4361)
Co-authored-by: antonioaversa <antonioaversa@users.noreply.github.com>
2024-10-04 12:01:32 +00:00
github-actions[bot]
0a6a411f69
Create rule S7110: Unnecessary getters and setters should be removed (unnecessary_getters_setters) (#4359)
Co-authored-by: antonioaversa <antonioaversa@users.noreply.github.com>
2024-10-04 13:51:48 +02:00
github-actions[bot]
8dc86cc903
Create rule S7108: "void" variables should not be assigned a value (void_checks) (#4354)
Co-authored-by: antonioaversa <antonioaversa@users.noreply.github.com>
2024-10-04 11:48:56 +00:00
Loris S.
985ef74f45
Modify S6781(C#): Add alternative message (#4362)
* Modify S6781(C#): Add alternative message

* Apply suggestion

---------

Co-authored-by: Jamie Anderson <127742609+jamie-anderson-sonarsource@users.noreply.github.com>
2024-10-04 11:20:40 +00:00
github-actions[bot]
3a3815b0fe
Create rule S7107: Super-initializer parameters should be preferred to forwarding parameters to super (use_super_parameters) (#4352)
Co-authored-by: antonioaversa <antonioaversa@users.noreply.github.com>
2024-10-04 12:08:28 +02:00
SonarTech
0cf1a57539 update coverage information 2024-10-04 02:43:21 +00:00
Antonio Aversa
d52173ec6a
Modify rule S7105: Fix ellipses escaping in rule description (#4366) 2024-10-03 15:13:23 +00:00
github-actions[bot]
38ddcd316a
Create rule S6473: Exposing administration services is security-sensitive (#4347) 2024-10-02 16:26:28 +02:00
GabinL21
686c4056dc
Modify S2260: add Ansible (#4360) 2024-10-02 11:22:27 +02:00
github-actions[bot]
ebfa509965
Create rule S7103: Unnecessary nullable in final declaration should be removed (unnecessary_nullable_for_final_variable_declarations) (#4343)
Co-authored-by: antonioaversa <antonioaversa@users.noreply.github.com>
2024-10-01 14:22:47 +02:00
github-actions[bot]
b7b99233f3
Create rule S7104: Generic function type syntax should be preferred for parameters (use_function_type_syntax_for_parameters) (#4344)
Co-authored-by: antonioaversa <antonioaversa@users.noreply.github.com>
2024-10-01 14:21:56 +02:00
github-actions[bot]
b7cd8c2b52
Create rule S7100: Unnecessary use of "toList" with spread operator (unnecessary_to_list_in_spreads) (#4335)
Co-authored-by: antonioaversa <antonioaversa@users.noreply.github.com>
2024-10-01 14:15:00 +02:00
leonardo-pilastri-sonarsource
570e581908
Include "sonar-architecture" in the list of repos for updating rules coverage script (#4337) 2024-10-01 12:24:49 +02:00
github-actions[bot]
15e03eee8c
Create rule S7105: If-null operator shouldn't be used with "null"
Co-authored-by: Marharyta <margarita.nedzelska@sonarsource.com>
2024-10-01 08:54:23 +00:00
Philipp Dominik Schubert
4f89ce8ce4
Modify rule S5553: Add missing SE tag (#4355) 2024-10-01 10:03:12 +02:00
Sebastien Andrivet
5c2d48fba7
Modify S6321: Add Ansible (#4324)
* Add RSPEC for S6321 for Ansible
2024-10-01 09:40:58 +02:00
github-actions[bot]
9f6c27a71c
Create rule S7099: Unnecessary string interpolation (unnecessary_string_interpolations) (#4334)
Co-authored-by: antonioaversa <antonioaversa@users.noreply.github.com>
2024-10-01 09:30:59 +02:00
SonarTech
bd736b7577 update coverage information 2024-10-01 02:46:03 +00:00
leonardo-pilastri-sonarsource
0374f31c59
Modify rule S6485: quickfix set to covered (#4353) 2024-09-30 15:52:35 +02:00
David Kunzmann
f327e68410
Modify rule S5654: Fix a broken link (#4351) 2024-09-30 14:38:32 +02:00
github-actions[bot]
835a5d06dc
Create rule S7102: Null-aware assignments should make sense (unnecessary_null_aware_assignments)
Co-authored-by: Marharyta <margarita.nedzelska@sonarsource.com>
2024-09-30 14:29:51 +02:00
github-actions[bot]
529e1df1c1
Modify rule S3646: mark quick fix as "targeted" (#4294)
Co-authored-by: necto <necto@users.noreply.github.com>
2024-09-30 11:32:05 +02:00
github-actions[bot]
2e860fc97d
Modify rule S3458: mark quick fix as "targeted" (#4293)
Co-authored-by: necto <necto@users.noreply.github.com>
2024-09-30 11:31:33 +02:00
github-actions[bot]
9bd080e121
Modify rule S5825: mark quick fix as "targeted" (#4292)
Co-authored-by: necto <necto@users.noreply.github.com>
2024-09-30 11:20:45 +02:00
github-actions[bot]
b25db7cb08
Modify rule S2681: mark quick fix as "targeted" (#4291)
Co-authored-by: necto <necto@users.noreply.github.com>
2024-09-30 11:20:08 +02:00
github-actions[bot]
56beae5b82
Modify rule S3548: mark quick fix as "targeted" (#4290)
Co-authored-by: necto <necto@users.noreply.github.com>
2024-09-30 11:12:05 +02:00
github-actions[bot]
63314e3911
Modify rule S6180: mark quick fix as "targeted" (#4289)
Co-authored-by: necto <necto@users.noreply.github.com>
2024-09-30 11:11:13 +02:00
github-actions[bot]
7a7be7c4bd
Modify rule S994: mark quick fix as "targeted" (#4288)
Co-authored-by: necto <necto@users.noreply.github.com>
2024-09-30 11:10:38 +02:00
github-actions[bot]
6f2e5547fe
Modify rule S3574: mark quick fix as "targeted" (#4287)
Co-authored-by: necto <necto@users.noreply.github.com>
2024-09-30 10:54:26 +02:00
github-actions[bot]
9d6ad2f12a
Modify rule S1990: mark quick fix as "targeted" (#4286)
Co-authored-by: necto <necto@users.noreply.github.com>
2024-09-30 10:54:10 +02:00
github-actions[bot]
98393f4646
Modify rule S1264: mark quick fix as "targeted" (#4285)
Co-authored-by: necto <necto@users.noreply.github.com>
2024-09-30 10:53:28 +02:00
github-actions[bot]
d40250bbb3
Modify rule S5271: mark quick fix as "targeted" (#4283)
Co-authored-by: necto <necto@users.noreply.github.com>
2024-09-30 10:53:03 +02:00
github-actions[bot]
2eaddf5008
Modify rule S824: mark quick fix as "targeted" (#4282)
Co-authored-by: necto <necto@users.noreply.github.com>
2024-09-30 10:49:01 +02:00
github-actions[bot]
03dbb4c924
Modify rule S6045: mark quick fix as "targeted" (#4280)
Co-authored-by: necto <necto@users.noreply.github.com>
2024-09-30 10:37:15 +02:00
github-actions[bot]
be8c07a1a8
Modify rule S6200: mark quick fix as "targeted" (#4279)
Co-authored-by: necto <necto@users.noreply.github.com>
2024-09-30 10:36:42 +02:00
Antonio Aversa
724ad9d6da
Modify rule S7084: Remove from Sonar-Way (#4346) 2024-09-30 08:33:28 +00:00
Hendrik Buchwald
f481234ef0
Add a new language identifier for Ansible (#4332) 2024-09-30 08:27:51 +00:00
github-actions[bot]
13448127b0
Modify rule S1235: mark quick fix as "targeted"
Co-authored-by: necto <necto@users.noreply.github.com>
2024-09-30 10:11:29 +02:00
SonarTech
fa80770ef3 update coverage information 2024-09-28 02:42:33 +00:00
Antonio Aversa
3f4bf9b819
Modify rule S7089: Add S7090 to related rules in resources 2024-09-27 17:17:45 +02:00
github-actions[bot]
9ebf8f0f27
Create rule S7101: "new" keyword shouldn't be used
Co-authored-by: leveretka <leveretka@users.noreply.github.com>
2024-09-27 15:37:44 +02:00
daniel-teuchert-sonarsource
7a02f98ebb
Modify rule S6867: Adjust message (#4341) 2024-09-27 15:03:54 +02:00
github-actions[bot]
8918ab28f6
Create rule S7097: Unnamed constructor should be used instead of .new (unnecessary_constructor_name) (#4327)
Co-authored-by: antonioaversa <antonioaversa@users.noreply.github.com>
2024-09-27 12:39:18 +00:00
Antonio Aversa
29b82f7b38
Modify rule S7090: Fix formatting of inline code (#4339) 2024-09-27 13:52:32 +02:00
Ghislain Piot
b9b85c7a80
Modify rule S6929: add the PyTorch library (#3984) 2024-09-27 12:51:21 +02:00
Antonio Aversa
f9b1835f76
Modify rule S7079: Fix inline code formatting (#4338) 2024-09-27 11:42:20 +02:00
Antonio Aversa
445399c3da
Modify rule S5856: Improve resources 2024-09-27 10:47:46 +02:00
Antonio Aversa
5316e07ae7
Modify rules S101 and S7046: add related rules 2024-09-27 10:46:08 +02:00
SonarTech
b13845a1c6 update coverage information 2024-09-27 02:43:42 +00:00
github-actions[bot]
7f19e8f447
Create rule S7088: Pubspec urls should be secure (#4312)
Co-authored-by: Margarita Nedzelska <margarita.nedzelska@sonarsource.com>
2024-09-27 00:15:00 +02:00
github-actions[bot]
96e7bf82fe
Create rule S7098: "late" modifier shouldn't be unnecessary
Co-authored-by: Marharyta Nedzelska <margarita.nedzelska@sonarsource.com>
2024-09-26 15:57:16 +00:00
github-actions[bot]
68ff6774bb
Create rule S7094: Constant patterns should not be used with type literals (type_literal_in_constant_pattern) (#4323)
Co-authored-by: antonioaversa <antonioaversa@users.noreply.github.com>
2024-09-26 13:58:07 +00:00
github-actions[bot]
4f54acff6b
Create rule S7095: Unnecessary braces in string interpolation should be removed (unnecessary_brace_in_string_interps) (#4325)
Co-authored-by: antonioaversa <antonioaversa@users.noreply.github.com>
2024-09-26 15:49:47 +02:00
github-actions[bot]
8fe5b5cbbc
Create rule S7093: Triple slash should be used for documentation comments (slash_for_doc_comments) (#4321)
Co-authored-by: antonioaversa <antonioaversa@users.noreply.github.com>
2024-09-26 14:51:35 +02:00
github-actions[bot]
3075db2122
Create rule S7092: Initializing formals should be used (prefer_initializing_formals) (#4320)
Co-authored-by: Antonio Aversa <antonio.aversa@sonarsource.com>
2024-09-26 14:42:48 +02:00
Mostafa Mohammed
981a4f0006
Modify rule S6177: improve rule description (#4318)
* CPP-5191 S6177 improve rule description

* Streamline explanation

Co-authored-by: Alejandro Álvarez Ayllón <alejandro.alvarez@sonarsource.com>

* Add short how to fix it description

* Fix typo

Co-authored-by: Alejandro Álvarez Ayllón <alejandro.alvarez@sonarsource.com>

---------

Co-authored-by: Alejandro Álvarez Ayllón <alejandro.alvarez@sonarsource.com>
2024-09-26 12:21:15 +00:00
github-actions[bot]
b8c12bb564
Create rule S7090: Spread operator should be preferred to chaining an insertion (prefer_spread_collections) (#4315)
Co-authored-by: antonioaversa <antonioaversa@users.noreply.github.com>
2024-09-26 12:18:49 +00:00
github-actions[bot]
0477c4de5a
Create rule S7089: Inline list literals should be preferred to chains of insertions (prefer_inlined_adds) (#4313)
Co-authored-by: antonioaversa <antonioaversa@users.noreply.github.com>
2024-09-26 13:51:21 +02:00
Peter Trifanov
43d210e20b
Modify rule S7036: Remove from Sonar Way (#4331) 2024-09-26 13:47:57 +02:00
github-actions[bot]
3b4cb204d8
Create rule S7087: Referenced packages should be listed as dependencies (depend_on_referenced_packages) (#4311)
Co-authored-by: antonioaversa <antonioaversa@users.noreply.github.com>
2024-09-26 13:35:42 +02:00
github-actions[bot]
f29f356d22
Create rule S7084: Dependencies should be sorted (sort_pub_dependencies) (#4300)
Co-authored-by: Antonio Aversa <antonio.aversa@sonarsource.com>
2024-09-26 10:13:48 +00:00
Peter Trifanov
b73fda9cfd
Modify rule S7036: mark as beta (#4330) 2024-09-26 10:11:25 +00:00
github-actions[bot]
1c0b287163
Create rule S7079: Adjacent string concatenation should be preferred (prefer_adjacent_string_concatenation) (#4273)
Co-authored-by: antonioaversa <antonioaversa@users.noreply.github.com>
2024-09-26 11:25:18 +02:00
github-actions[bot]
f99253ea13
Create rule S7078: Fields should not be overridden (overridden_fields) (#4272)
Co-authored-by: Antonio Aversa <antonio.aversa@sonarsource.com>
2024-09-26 09:11:52 +00:00
Marco Kaufmann
6907a79131
Modify rule S7027: Update description and align with S7091 (#4319) 2024-09-26 10:40:54 +02:00
github-actions[bot]
197d1a1c07
Create rule S7096: Initialization formals shouldn't be unnecessarily type annotated
Co-authored-by: Marharyta Nedzelska <margarita.nedzelska@sonarsource.com>
2024-09-26 10:39:53 +02:00
github-actions[bot]
1fe06fc59c
Create rule S7075: Non-constant names should comply with a naming convention (#4267)
Co-authored-by: antonioaversa <antonioaversa@users.noreply.github.com>
2024-09-26 10:22:50 +02:00
SonarTech
3ef5ea56ae update coverage information 2024-09-26 02:43:05 +00:00
GabinL21
9492c8aa44
Modify rule S7036: Update rule description (#4322) 2024-09-25 16:15:10 +02:00
Marharyta
8ae6c27693
Include "sonar-dart" in the list of repos for updating rules coverage script (#4317) 2024-09-25 11:42:14 +02:00
SonarTech
7ade001680 update coverage information 2024-09-25 02:43:49 +00:00
Yassin Kammoun
8ba460243e
Modify rule S6847: Reduce the set of handlers to consider (#4314) 2024-09-24 10:53:59 +02:00
SonarTech
820bf725a2 update coverage information 2024-09-24 02:43:18 +00:00
github-actions[bot]
4172eb0c81
Create rule S7083: For elements should be preferred to Map.fromIterable (prefer_for_elements_to_map_fromIterable)
Co-authored-by: Antonio Aversa <antonio.aversa@sonarsource.com>
2024-09-23 17:17:52 +02:00
David Kunzmann
b9bf820777
Modify rule S6973: Adding PyTorch optimizers (#3956) 2024-09-23 16:53:33 +02:00
Antonio Aversa
d4c31580f3
Modify rule S1854: Remove from Sonar-Way 2024-09-23 15:42:56 +02:00
Yassin Kammoun
3ca5972d27
Modify rule S2933: Add to Sonar way quality profile (#4310) 2024-09-23 15:38:26 +02:00
Yassin Kammoun
a60b1725d4
Modify rule S3776: Clarify the behavior of function nesting (#4303) 2024-09-23 15:38:00 +02:00
Yassin Kammoun
68078b45e6
Modify rule S1301: Update the rule title to match the implementation behavior (#4308) 2024-09-23 15:37:40 +02:00
SonarTech
e30506c097 update coverage information 2024-09-21 02:39:16 +00:00
github-actions[bot]
6b75f53fc4
Create rule S7081: Context isolation should be enabled (#4296)
* Create rule S7081
* Add rule text
* Apply suggestions from code review
2024-09-20 17:29:36 +02:00
github-actions[bot]
206ec4612b
Create rule S7080: A Content Security Policy should be defined (#4277)
* Create rule S7080

* Add rule description for S7080

* Fixes following review

* Add securityStandards

---------

Co-authored-by: sebastien-andrivet-sonarsource <sebastien-andrivet-sonarsource@users.noreply.github.com>
Co-authored-by: Sebastien Andrivet <sebastien.andrivet@sonarsource.com>
2024-09-20 17:18:37 +02:00
Angelo Buono
b4c3455f8d
SONARJAVA-5091 mention Quarkus in the description (#4307) 2024-09-20 15:52:39 +02:00
github-actions[bot]
c2ba1a4a64
Create rule S7077: Dangerous Web Permissions should be filtered (#4270)
* Create rule S7077

* Add rule description

* Add message and highlighting

* Update rules/S7077/javascript/rule.adoc

Co-authored-by: Sebastien Andrivet <138577785+sebastien-andrivet-sonarsource@users.noreply.github.com>

---------

Co-authored-by: daniel-teuchert-sonarsource <daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: daniel-teuchert-sonarsource <141642369+daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: Daniel Teuchert <daniel.teuchert@sonarsource.com>
Co-authored-by: Sebastien Andrivet <138577785+sebastien-andrivet-sonarsource@users.noreply.github.com>
2024-09-20 12:12:56 +00:00
github-actions[bot]
a8fe186b1c
Create rule S7085: Missing Navigation Filtering (#4305)
* Create rule S7085

* Added rule description for S7085

---------

Co-authored-by: daniel-teuchert-sonarsource <daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: Daniel Teuchert <daniel.teuchert@sonarsource.com>
2024-09-20 13:58:21 +02:00
github-actions[bot]
82c24b65b4
Create rule S7071: Sandboxing should be enabled (#4304)
* Add html to rule S7071

* Add HTML to S7071

* Added message and highlighting

---------

Co-authored-by: daniel-teuchert-sonarsource <daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: Daniel Teuchert <daniel.teuchert@sonarsource.com>
2024-09-20 13:48:02 +02:00
github-actions[bot]
7a9bb0afce
Create rule S6978 (#3955)
* Create rule S6978

* First version of the rule

* Make it a bug

* Add example & typo

* Small correction

---------

Co-authored-by: ghislainpiot <ghislainpiot@users.noreply.github.com>
Co-authored-by: Ghislain Piot <ghislain.piot@sonarsource.com>
2024-09-20 13:29:44 +02:00
SonarTech
9063075082 update coverage information 2024-09-20 02:41:23 +00:00
github-actions[bot]
5a801735f7
Create rule S7074: webSecurity should be enabled (#4302)
* Add html to rule S7074

* Add html for S7074

---------

Co-authored-by: daniel-teuchert-sonarsource <daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: Daniel Teuchert <daniel.teuchert@sonarsource.com>
2024-09-19 16:03:28 +02:00
Yassin Kammoun
9debaf87d1
Modify rule S4782: Add an exception for when exactOptionalPropertyTypes is enabled (#4275) 2024-09-19 15:37:47 +02:00
github-actions[bot]
2a23d72c8f
Create rule S6982: model.eval() or model.train() should be called after loading a PyTorch model state (#3972)
* Create rule S6982

* Create rule S6982: model.eval() should be called after loading weights
of a PyTorch model

* Added implementation details

* Fix after review

---------

Co-authored-by: joke1196 <joke1196@users.noreply.github.com>
Co-authored-by: David Kunzmann <david.kunzmann@sonarsource.com>
2024-09-19 14:55:20 +02:00
zglicz
77157c470c
Update rules with missing tag (#4297) 2024-09-19 09:59:24 +02:00
github-actions[bot]
839ddbc9e8
Create rule S7072: Sensitive APIs should not be exposed directly to the renderer (#4254)
* Create rule S7072

* Add text

* Fix typo

* Add Electron as allowed framework name

* Apply suggestions from code review

Co-authored-by: daniel-teuchert-sonarsource <141642369+daniel-teuchert-sonarsource@users.noreply.github.com>

---------

Co-authored-by: egon-okerman-sonarsource <egon-okerman-sonarsource@users.noreply.github.com>
Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
Co-authored-by: daniel-teuchert-sonarsource <141642369+daniel-teuchert-sonarsource@users.noreply.github.com>
2024-09-18 16:20:15 +02:00
github-actions[bot]
da17c23d79
Create rule S7076: Custom protocols should be preferred over file:// (#4268)
* Create rule S7076

* Add rule text

* Add Electron as allowed framework name

---------

Co-authored-by: egon-okerman-sonarsource <egon-okerman-sonarsource@users.noreply.github.com>
Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
2024-09-18 14:55:43 +02:00
github-actions[bot]
d70c3c40c7
Create rule S7074: webSecurity should be enabled (#4265)
* Create rule S7074

* Rule description and fix the folder name

* Update rules/S7074/javascript/rule.adoc

Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>

* Simplify Impacts following review.

* Add missing message and highlight information.

---------

Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
2024-09-18 13:19:05 +02:00
Fred Tingaud
492dae1d8b Mark quickfix as infeasible for some shared rules 2024-09-18 13:01:20 +02:00
Fred Tingaud
3bd69c9c16 Mark quickfix as infeasible for some C++ rules 2024-09-18 13:01:20 +02:00
Michael Jabbour
765538f971
Explicit permissions for GITHUB_TOKEN where write is needed
The default GITHUB_TOKEN permissions will be set to read-only. See https://sonarsource.atlassian.net/browse/SSF-619 for background information.
2024-09-18 12:03:16 +02:00
Alex Meseldzija
3445da4ee7
S927: Add Exception for .NET (#4274) 2024-09-18 10:44:18 +02:00
SonarTech
d9092bc2ba update coverage information 2024-09-18 02:39:41 +00:00
github-actions[bot]
a9b8a71b3e
Create rule S6984 : Einops pattern should be valid 2024-09-17 16:19:19 +02:00
github-actions[bot]
7f75840e19
Create rule S6985 : Usage of "torch.load" can lead to untrusted code execution (#3976)
* Create rule S6985

* add implementation details

* Address review

* Update rule to include details about the wheights_only parameter

* Remove unnecessary example

---------

Co-authored-by: ghislainpiot <ghislainpiot@users.noreply.github.com>
Co-authored-by: Ghislain Piot <ghislain.piot@sonarsource.com>
Co-authored-by: Sebastian  Zumbrunn <sebastian.zumbrunn@sonarsource.com>
2024-09-17 14:59:12 +02:00
github-actions[bot]
58c6c084e6
Create rule S7073 (#4258)
* Create rule S7073

* Add description

* Adjust function names

---------

Co-authored-by: daniel-teuchert-sonarsource <daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: Daniel Teuchert <daniel.teuchert@sonarsource.com>
2024-09-17 13:18:36 +02:00
Marharyta
54b1d7ce0b
Modify S120: update Dart description 2024-09-17 09:50:58 +00:00
github-actions[bot]
012e2c7a1b
Create rule S7071 (#4253)
* Create rule S7071

* Initial draft

---------

Co-authored-by: daniel-teuchert-sonarsource <daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: Daniel Teuchert <daniel.teuchert@sonarsource.com>
Co-authored-by: daniel-teuchert-sonarsource <141642369+daniel-teuchert-sonarsource@users.noreply.github.com>
2024-09-17 10:17:36 +02:00
SonarTech
402a706522 update coverage information 2024-09-17 02:28:38 +00:00
github-actions[bot]
596ee15301
Create rule S6983 (#3973)
* Create rule S6983

* Address review comments

* Review comments 2

* Add tags

---------

Co-authored-by: ghislainpiot <ghislainpiot@users.noreply.github.com>
Co-authored-by: Ghislain Piot <ghislain.piot@sonarsource.com>
2024-09-16 15:26:57 +02:00
Eric Morand
f5daf909c7
JS-332 Add type-dependent tag to TypeScript variant of RSPEC 2301 (#4266) 2024-09-13 16:22:16 +02:00
Sebastien Marichal
529854b11a
Modify S3457: Fix link format (#4263) 2024-09-13 14:48:30 +02:00
Victor
f72b745f74
Remove S4328 from "Sonar way" profile (#4261) 2024-09-13 12:48:48 +02:00
Balázs Benics
6bba43c295
Modify Rule S3949: Add missing tag for CFamily (#4262) 2024-09-13 09:14:32 +02:00
SonarTech
5a30718c35 update coverage information 2024-09-13 02:40:04 +00:00
Sebastien Marichal
1b050f1560
Modify rule S3881: Remove typo in code example (#4264) 2024-09-12 14:24:37 +02:00
zglicz
034d2c3279
close S7063 for javascript (#4260) 2024-09-12 11:30:29 +00:00
SonarTech
aa0ed2a838 update coverage information 2024-09-12 02:39:26 +00:00
Victor
4b412cd92c
Add rule S4328 to Sonar way quality profile (#4251) 2024-09-11 11:14:42 +02:00
Egon Okerman
a3a2e69a45
Modify Rule S6382: Fix outdated properties (APPSEC-773) (#2514)
* Fix outdated property

* Swap Web Apps for Containers and App Service
2024-09-11 10:37:08 +02:00
GabinL21
0e30d8dfd4
Add rule S7026 exceptions (#4230) 2024-09-11 09:05:40 +02:00
SonarTech
7e63801e76 update coverage information 2024-09-11 02:38:38 +00:00
Marharyta
7c46fffb13
Modify rule S7054: fix typo in the Dart description 2024-09-10 15:52:44 +02:00
Marharyta
48df9b93a9
Modify rule S4647: fix typo in the Dart description 2024-09-10 15:36:24 +02:00
github-actions[bot]
e0a2495a2b
JS-322 Write the TypeScript variant of RSPEC S2301 (#4232)
* JS-322 Write the TypeScript variant of RSPEC S2301

* And S2301 JavaScript to Sonar Way

* Change argument to parameter

* Improve based on review

* Change back to paramater that sounds more correct

---------

Co-authored-by: Eric MORAND <eric.morand@sonarsource.com>
2024-09-10 12:02:07 +02:00
Fred Tingaud
3e3f54d821
Merge all rule validation scripts under a single task (#4255)
We shouldn't clone the whole repository three times to run three scripts that each take a few seconds.
2024-09-10 11:15:30 +02:00
Gyula Sallai
7dcdd7b23e
Modify rules S6651,S6649,S6646,S6555,S6976,S6707,S6780: Undo adding to SonarWay (#4252)
This reverts commit da7543e22ac16a09c055482858d4229747c8896f.
2024-09-10 08:33:36 +02:00
SonarTech
b49208bc08 update coverage information 2024-09-10 02:39:50 +00:00
github-actions[bot]
def99a20d4
Create rule S6979 (#3959)
* Create rule S6979

* First iteration of rule

* Review comment and typo

---------

Co-authored-by: ghislainpiot <ghislainpiot@users.noreply.github.com>
Co-authored-by: Ghislain Piot <ghislain.piot@sonarsource.com>
Co-authored-by: Sebastian  Zumbrunn <sebastian.zumbrunn@sonarsource.com>
2024-09-09 17:49:11 +02:00
github-actions[bot]
7021be3a27
Create rule S6627: Users should not use internal APIs (#4234)
* Add javascript to rule S6627

* add javascript language to rule

* improve js example

---------

Co-authored-by: ilia-kebets-sonarsource <ilia-kebets-sonarsource@users.noreply.github.com>
Co-authored-by: Ilia Kebets <ilia.kebets@sonarsource.com>
2024-09-09 15:55:10 +02:00
Johann Beleites
60187a8f6f
Modify rules S2259;S2583;S2589;S3518;S3655;S3959: undo deprecation (#4245)
* Revert "Modify rules S2259;S2583;S2589;S3518;S3655;S3959 Remove replacement rules and update description for deprecated SE rules (#4207)"

This reverts commit d4d145e532aa487392b1e273e205854f68eb1328.

* Revert "SONARJAVA-5102 Deprecate Java SE rules implemented by DBD (#4177)"

This reverts commit 952c1cab7b996d1a3e5060bc91745df6543d7eaf.
2024-09-09 15:29:06 +02:00
Fred Tingaud
3dacb3feb1
Avoid race condition on validate_links cache 2024-09-09 15:20:34 +02:00
Victor
67c5dcc7ae
Mark S2424 as duplicated of S2137 (#4249) 2024-09-09 13:25:42 +02:00
github-actions[bot]
b01fb79cd4
Create rule S7064: Library doc comments should be attached to library directive (#4231)
Co-authored-by: leveretka <leveretka@users.noreply.github.com>
2024-09-09 10:15:30 +02:00
github-actions[bot]
80f1eb37b6
Create rule S7066: Library annotations should be attached to library directive (#4236)
Co-authored-by: leveretka <leveretka@users.noreply.github.com>
2024-09-09 10:15:18 +02:00
github-actions[bot]
85f1fb28c3
Create rule S7062: Implementation imports shouldn't be used (#4227)
Co-authored-by: leveretka <leveretka@users.noreply.github.com>
2024-09-09 10:01:19 +02:00
github-actions[bot]
183f408fc5
Create rule S7067: Library prefixes should comply with naming conventions (#4237)
Co-authored-by: leveretka <leveretka@users.noreply.github.com>
2024-09-09 10:00:16 +02:00
github-actions[bot]
ee6d385e79
Create rule S7068: Private types shouldn't be used in public API (#4240)
Co-authored-by: leveretka <leveretka@users.noreply.github.com>
2024-09-09 09:59:18 +02:00
github-actions[bot]
55768bfc8d
Create rule S7069: Library prefixes shouldn't start with underscore (#4241)
Co-authored-by: leveretka <leveretka@users.noreply.github.com>
2024-09-09 09:56:47 +02:00
github-actions[bot]
a769db8a39
Create rule S7061: Implicit tearoff of "call" shouldn't be used (#4226)
Co-authored-by: leveretka <leveretka@users.noreply.github.com>
2024-09-09 09:55:51 +02:00
Yassin Kammoun
ef51d76f5f
Modify rule S1607: Allow to add an explanation comment after the test disabling (#4243)
Co-authored-by: Ilia Kebets <104737176+ilia-kebets-sonarsource@users.noreply.github.com>
2024-09-06 17:00:16 +02:00
daniel-teuchert-sonarsource
a2b0adf225
Modify rule S3329: Correct example code (#4242)
* Modify rule S3329: Correct example code

* Aligned compliant and noncompliant code

* Use AES/CBC/PKCS5Padding in all examples for Java and Kotlin
2024-09-06 15:47:04 +02:00
Evgeny Mandrikov
24a24fb675
Modify Rule S2260: update Dart metadata 2024-09-06 15:41:01 +02:00
github-actions[bot]
8ccde7d777
JS-65 Create rule S7063 - Module with exports should not include side effects (#4229)
* Create rule S7063

* Add content

* update example

* Update references

---------

Co-authored-by: zglicz <zglicz@users.noreply.github.com>
Co-authored-by: Michal Zgliczynski <michal.zgliczynski@sonarsource.com>
2024-09-06 15:31:29 +02:00
github-actions[bot]
26945dcd6a
Create rule S7060 (#4224)
Co-authored-by: saberduck <saberduck@users.noreply.github.com>
2024-09-06 15:20:51 +02:00
Marharyta
90d2d525d1
Modify Rule S2260: Add Dart language (#4158)
Co-authored-by: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
2024-09-06 15:02:24 +02:00
SonarTech
59eb7e0eed update coverage information 2024-09-05 02:38:24 +00:00
github-actions[bot]
cd5d048296
Create rule S7059 (#4223) 2024-09-04 17:33:22 +02:00
Arseniy Zaostrovnykh
0b9b390141
Modify rule S6147: refactor directory structure, set quickfix and code-snippet language 2024-09-04 14:08:15 +00:00
Rudy Regazzoni
d0757e5066
Fix dead link (#4239)
* Fix dead link

* more
2024-09-04 15:43:55 +02:00
Arseniy Zaostrovnykh
df884767da
Modify rule S2637(cfamily): CPP-5602 allow assigning nullptr to params 2024-09-04 13:00:55 +00:00
Pierre-Loup
fe6a4115ec
Modify rule S6249: Fix code CloudFormation code examples (APPSEC-50) (#2456) 2024-09-04 14:14:13 +02:00
Gyula Sallai
da7543e22a
Modify rules S6651,S6649,S6646,S6555,S6976,S6707,S6780: Add to SonarWay (#4228) 2024-09-04 12:59:02 +02:00
github-actions[bot]
21bf3f447a
Create rule S1607: Tests should not be skipped without providing a reason (#4218) 2024-09-04 11:17:09 +02:00
Hendrik Buchwald
e5ae27a560
Modify rule S2755: Simplify how to fix it section (#4215) 2024-09-03 17:52:33 +02:00
Marharyta
6baf583836
Update rule S7058: Add additional link to Dart Docs 2024-09-03 12:48:04 +00:00
github-actions[bot]
5273746944
Create rule S5797 (#4170)
* Add php to rule S5797

* Create PHP rule S5797

* Update PHP rule S5797 examples

* Update rule S5797 includes

---------

Co-authored-by: rudy-regazzoni-sonarsource <rudy-regazzoni-sonarsource@users.noreply.github.com>
Co-authored-by: GabinL21 <gabin.laigle21@gmail.com>
2024-09-03 12:13:36 +02:00
Marharyta Nedzelska
c6798c124a Update rule S7057: Add missing headers 2024-09-03 12:15:48 +03:00
leveretka
f9c89def36 Create rule S7058: Single cascade shouldn't be used 2024-09-03 12:15:48 +03:00
Ilia Kebets
3d6e106cad
Modify S6861: fix CC attribute (#4221) 2024-09-03 07:54:21 +00:00
Marharyta
240f52fc71
Modify Rule S1578: Update Dart description 2024-09-03 07:51:12 +00:00
github-actions[bot]
6bb5228540
Create rule S7057: Function literals shouldn't be used in foreach calls
Co-authored-by: Margarita Nedzelska <margarita.nedzelska@sonarsource.com>
2024-09-03 09:45:35 +02:00
github-actions[bot]
c3ed549e27
Create rule S7055: Wildcard variable shouldn't be used
Co-authored-by: Marharyta Nedzelska <margarita.nedzelska@sonarsource.com>
2024-09-03 09:42:11 +02:00
SonarTech
f925c9dbe0 update coverage information 2024-09-03 02:36:59 +00:00
daniel-teuchert-sonarsource
57efd786fe
Modify rule S6680: Add correct Clean Code Taxonomy attributes (#4216) 2024-09-02 15:34:23 +02:00
daniel-teuchert-sonarsource
58f256f85c
Modify rule S5146: Add fix for Blazor (APPSEC-1905) (#4128)
Co-authored-by: Thomas Serre <118730793+thomas-serre-sonarsource@users.noreply.github.com>
2024-09-02 14:56:08 +02:00
Sebastien Andrivet
22b1c621ad
Modify rule S6330: Default Queue encryption is now SSE-SQS (APPSEC-339) (#2626)
* Default Queue encryption is now SSE-SQS

* FIx typo
2024-09-02 12:03:57 +02:00
Loris S.
2783df88dd
Modify S6865(K8s): Rework Rule for realistic detection (#4212)
* Modify S6865(K8s): Rule rework for realistic detection

* fix diffé
2024-09-02 11:38:42 +02:00
github-actions[bot]
2427e0e717
Create rule S7053: Relative lib imports should not be used (avoid_relative_lib_imports) (#4206)
Co-authored-by: antonioaversa <antonioaversa@users.noreply.github.com>
2024-08-30 17:55:23 +02:00
Antonio Aversa
a50335221d
Modify rule S7047: Fix formatting of inline code and grammar (#4211) 2024-08-30 15:46:39 +02:00
github-actions[bot]
1cdcbab02e
Create rule S7054: "is!" should be used instead of "!is"
Co-authored-by: Marharyta Nedzelska <margarita.nedzelska@sonarsource.com>
2024-08-30 15:45:28 +02:00
Fred Tingaud
1f0f2b7a8e
Modify rule S6024: Remove useless paretheses 2024-08-30 14:19:28 +02:00
Loris S.
979c6d4b4a
[S4502|S5131] Add resources and fix resources style (#4203) 2024-08-30 12:01:23 +02:00
Antonio Aversa
fc207d97df
Modify rule S7046: Add a link to "camel case" in the rule description (#4210) 2024-08-29 16:49:45 +00:00
Antonio Aversa
c375649262
Modify rule S7045: fix underscore escaping in rule description (#4209) 2024-08-29 16:43:58 +00:00
github-actions[bot]
ebf22e3023
Create rule S7052: Uninitialized variables and fields should be explicitly typed (prefer_typing_uninitialized_variables) (#4205) 2024-08-29 18:41:51 +02:00
Johann Beleites
d4d145e532
Modify rules S2259;S2583;S2589;S3518;S3655;S3959 Remove replacement rules and update description for deprecated SE rules (#4207) 2024-08-29 17:27:25 +02:00
Johann Beleites
4e782555ed
Modify rule S6376: Fix broken link (#4208) 2024-08-29 16:59:57 +02:00
github-actions[bot]
db883d16c1
Create rule S7051: Types should not be used as parameter names (avoid_types_as_parameter_names) (#4204)
Co-authored-by: antonioaversa <antonioaversa@users.noreply.github.com>
2024-08-29 15:20:34 +02:00
Johann Beleites
952c1cab7b
SONARJAVA-5102 Deprecate Java SE rules implemented by DBD (#4177) 2024-08-29 12:03:11 +02:00
github-actions[bot]
9d1862194c
Create rule S7050: Void functions should not return null (avoid_returning_null_for_void)
Co-authored-by: antonioaversa <antonioaversa@users.noreply.github.com>
2024-08-28 22:26:35 +02:00
github-actions[bot]
689d02641d
Create rule S7049: Getters should not be recursive (recursive_getters)
Co-authored-by: antonioaversa <antonioaversa@users.noreply.github.com>
2024-08-28 22:22:43 +02:00
github-actions[bot]
78c452a5b4
Create rule S7048: Function declarations should be preferred over variables (prefer_function_declarations_over_variables)
Co-authored-by: antonioaversa <antonioaversa@users.noreply.github.com>
2024-08-28 22:18:39 +02:00
github-actions[bot]
6eda7ba687
Create rule S7047: Nullable type parameter values should not be null checked with ! (null_check_on_nullable_type_parameter)
Co-authored-by: antonioaversa <antonioaversa@users.noreply.github.com>
2024-08-28 10:24:01 +02:00
Antonio Aversa
26637d3f66
Modify rule S7045: fix list formatting in Why section (#4202) 2024-08-28 06:20:30 +00:00
SonarTech
8321a7d34f update coverage information 2024-08-28 02:35:44 +00:00
github-actions[bot]
70a41c4e0c
Create rule S7046: Extension identifiers should comply with a naming convention (camel_case_extensions) 2024-08-27 21:11:28 +02:00
github-actions[bot]
31b4765a6d
Create rule S7045: Local identifiers should not start with underscore (no_leading_underscores_for_local_identifiers) 2024-08-27 21:04:10 +02:00
Hendrik Buchwald
491c17525b
Modify rule S5131: Add fix for Blazor (APPSEC-1898) (#4116)
* Add fix for Blazor

* Update rules/S5131/csharp/how-to-fix-it/blazor.adoc
2024-08-27 09:37:06 +02:00
Antonio Aversa
9e83cd8308
Modify rule S5416: add spaces to the why section (#4195) 2024-08-26 15:46:27 +00:00
Antonio Aversa
c3dcea77c5
Modify rule S2175: add spaces to the why section (#4194) 2024-08-26 15:43:23 +00:00
Gyula Sallai
101cfde7a8
Modify rule S6651: fix erroneous inclusion in SonarWay (#4192) 2024-08-26 17:05:28 +02:00
chrislain-razafimahefa-sonarsource
5eebca6f88
Modify rules S6886, S2589, S5633, S6417: Fix examples (#4191) 2024-08-26 16:00:15 +02:00
Gyula Sallai
772f64b083
Modify rules S6320;S6416;S6555;S6707;S6976 Update examples (#4190) 2024-08-26 12:54:45 +02:00
SonarTech
580a49a7f4 update coverage information 2024-08-24 02:33:38 +00:00
github-actions[bot]
a3eacd6c35
Create rule S6418 (#4164) 2024-08-23 17:19:16 +00:00
Evgeny Mandrikov
7e7ce1af88
Modify Rule S107: Add Dart language (#4143) 2024-08-23 17:09:43 +02:00
Marharyta
1ec24bcaa5
Modify Rule S2358: Update Dart description (#4186) 2024-08-23 16:57:17 +02:00
github-actions[bot]
f47c7dfd34
Create rule S7044: Server-side requests should not be vulnerable to traversing attacks (#4162) 2024-08-23 12:38:37 +00:00
Antonio Aversa
2338e5e5f1
Modify rule S2432: Fix resources and add rspecator (#4189) 2024-08-23 14:26:17 +02:00
github-actions[bot]
54c37571c0
Create rule S7039: Content Security Policies should be restrictive (NET-24) (#4188) 2024-08-23 14:19:27 +02:00
Marharyta
b2b19cb731
Modify Rule S3689: Update Dart description 2024-08-23 14:19:10 +02:00
github-actions[bot]
504835d1bf
Create rule S5147(C#): NoSQL operations should not be vulnerable to injection attacks APPSEC-2024 (#4165)
* Add csharp to rule S5147

* Add the text

* Fixed filename

* Apply suggestions from code review

Co-authored-by: Hendrik Buchwald <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>

* Apply suggestions from code review

* Update rules/S5147/csharp/how-to-fix-it/mongodb-csharp-driver.adoc

* Update rules/S5147/common/fix/builder-pattern.adoc

Co-authored-by: Hendrik Buchwald <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>

---------

Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com>
Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Hendrik Buchwald <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>
2024-08-23 12:10:19 +00:00
github-actions[bot]
dc516927c6
Create rule S7044(JS): Server-side requests should not be vulnerable to traversing attacks APPSEC-2042 (#4175)
* Add javascript to rule S7044

* Added contents

* Apply suggestions from code review

* Update rules/S7044/javascript/how-to-fix-it/node.adoc

* Update rules/S7044/javascript/how-to-fix-it/node.adoc

Co-authored-by: daniel-teuchert-sonarsource <141642369+daniel-teuchert-sonarsource@users.noreply.github.com>

* Update rules/S7044/javascript/how-to-fix-it/node.adoc

* Update rules/S7044/javascript/how-to-fix-it/node.adoc

* Apply suggestions from code review

---------

Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com>
Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: daniel-teuchert-sonarsource <141642369+daniel-teuchert-sonarsource@users.noreply.github.com>
2024-08-23 11:15:35 +02:00
Antonio Aversa
2ffd6bfed6
Modify rule S1065: Fix resources (#4187) 2024-08-23 09:03:25 +00:00
Antonio Aversa
4e4811e5fe
Modify rule S3562: improve resources and add rspecator (#4178) 2024-08-23 08:44:21 +00:00
Marharyta
84c3e221a8
Modify Rule S5856: Update Dart description 2024-08-23 10:33:36 +02:00
Antonio Aversa
7ded42f122
Modify rule S5416: improve resources and add rspecator 2024-08-23 09:53:44 +02:00
Antonio Aversa
5a76b11ae3
Modify rule S2175: improve resources and add rspecator 2024-08-23 09:45:29 +02:00
Antonio Aversa
f97718f4dd
Modify rule S2471 Variables should not be initialized with "null" (avoid_init_to_null) 2024-08-23 09:41:07 +02:00
Antonio Aversa
87b52abefd
Modify rule S3512: Update Dart examples and resources 2024-08-23 09:35:03 +02:00
SonarTech
4e73a5c8a7 update coverage information 2024-08-23 02:34:36 +00:00
Marharyta
8ca326e547
Modify Rule S4647: Update Dart description 2024-08-22 18:40:38 +02:00
Marharyta
266eb76601
Modify Rule S2963: Update Dart description 2024-08-22 18:30:25 +02:00
Ghislain Piot
8552b794e1
Modify rule S2068: Update documentation to not recommend the customization (#4163) 2024-08-22 14:45:53 +02:00
github-actions[bot]
dfbe4baa5a
Create rule S7044: Server-side requests should not be vulnerable to traversing attacks (#4166) 2024-08-22 09:49:35 +00:00
github-actions[bot]
1c2ab2361a
Create rule S6776: Stack-traces should not be disclosed (#4133)
* Add csharp to rule S6776

* Add blazor content

* Add Blazor

* Add how to fix it in ASP.NET section

* Update rules/S6776/csharp/how-to-fix-it/blazor.adoc

Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>

* Update rules/S6776/csharp/how-to-fix-it/blazor.adoc

Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>

* Remove dash

---------

Co-authored-by: hendrik-buchwald-sonarsource <hendrik-buchwald-sonarsource@users.noreply.github.com>
Co-authored-by: Hendrik Buchwald <hendrik.buchwald@sonarsource.com>
Co-authored-by: Daniel Teuchert <daniel.teuchert@sonarsource.com>
Co-authored-by: daniel-teuchert-sonarsource <141642369+daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>
2024-08-22 11:17:16 +02:00
Marharyta
e738a460ae
Modify Rule S3962: Update Dart description 2024-08-22 11:05:32 +02:00
Marco Borgeaud
63be5d2666 Do not validate drupal.org links 2024-08-22 09:59:26 +02:00
Marco Borgeaud
4e0e265d9e Update links to securecoding.cert.org
They redirect to https://wiki.sei.cmu.edu.
Fix broken links for open rules.
Remove broken links from closed rules.
Remove links in Java rules for CERT C rules with no obvious replacement.
Expand broken tinyurl to CERT.
2024-08-22 09:59:26 +02:00
Marco Borgeaud
e035587614 Improve validate_metadata.sh
Address shellcheck issues and visually separate outputs
2024-08-22 09:59:26 +02:00
Marco Borgeaud
3afafafcb9 Do not validate CERT links 2024-08-22 09:59:26 +02:00
Marco Borgeaud
00eee176da Improve probing frequency to reduce time spent on CI
Checks links every two to three days instead of every 24h to 25h40.
This improve the distribution of checks on CI runs.
2024-08-22 09:59:26 +02:00
Marco Borgeaud
71fa9cb6d3 Print statistics about cache hit/miss 2024-08-22 09:59:26 +02:00
Marco Borgeaud
997bd49f75 Improve cirrus-cache.sh
Print md5 as part of cache scripts.
Address spellcheck issues (quote variables).
Remove dead variables.
Improve output in general and pipe errors to stderr.
Fully spell out curl options for better readability.
Always show error with curl.
2024-08-22 09:59:26 +02:00
Fred Tingaud
62a8196ac9
Modify rule S6004: CPP-5608 don't raise for for-range 2024-08-21 19:17:55 +02:00
Marharyta
ed08720fc3
Modify Rule S3240: Update Dart description 2024-08-21 17:39:41 +02:00
Marharyta
2224a6e81d
Modify Rule S1118: Add Dart language 2024-08-21 17:38:48 +02:00
Michael Jabbour
b053b7cd6c
Modify rule S3715: Mention empty initializer before C23 2024-08-21 15:15:51 +00:00
Loïc Joly
41f1111fdd
Modify rule S2335: Make more characters properly terminate an escape sequence CPP-5564 (#4115) 2024-08-21 11:50:37 +00:00
Ilia Kebets
916a63f5ac
SONARFLEX-176 Deprecate Flex rules (#4169)
* Deprecate Flex rules
* fix validation check failing
2024-08-21 12:04:12 +02:00
github-actions[bot]
2742dcd14d
Create rule S6549: Accessing files should not lead to filesystem oracle attacks (#4156)
* Add csharp to rule S6549

* Add RSPEC for S6549 for C#

* Update rules/S6549/csharp/how-to-fix-it/asp.net.adoc

Co-authored-by: Hendrik Buchwald <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>

* Update rules/S6549/csharp/how-to-fix-it/asp.net.adoc

Co-authored-by: Hendrik Buchwald <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>

* Update rules/S6549/csharp/how-to-fix-it/asp.net.adoc

Co-authored-by: Hendrik Buchwald <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>

* Correct function name

---------

Co-authored-by: daniel-teuchert-sonarsource <daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: Daniel Teuchert <daniel.teuchert@sonarsource.com>
Co-authored-by: daniel-teuchert-sonarsource <141642369+daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: Hendrik Buchwald <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>
2024-08-20 17:57:41 +02:00
github-actions[bot]
abe74fddcb
Create rule S7044: Server-side requests should not be vulnerable to traversing attacks (#4151) 2024-08-20 14:02:00 +00:00
Antonio Aversa
78333c73cb Modify rule S1854: Add Dart language 2024-08-19 16:31:59 +03:00
Marco Borgeaud
d275c64a11
Deprecate rule S1772 (CPP-4874) (#4138) 2024-08-19 14:44:47 +02:00
github-actions[bot]
10d639e557
Create rule S6651: Conditionally executed code should be reachable (#2267) 2024-08-16 17:39:55 +02:00
Hendrik Buchwald
7b737d6c55
Modify rule S7039: Change language from csharp to html (#4161) 2024-08-16 17:11:59 +02:00
Antonio Aversa
e1ba8e5cdf
Modify rule S6619: Add Dart language (#4154) 2024-08-16 11:07:58 +02:00
Marco Borgeaud
8291066716
Modify rules S1314,S7035,S7040: small improvements (CPP-5503) (#4145) 2024-08-16 10:49:40 +02:00
Antonio Aversa
48a70a9e03
Modify rule S4123: remove ref to other RSPEC (#4157) 2024-08-16 06:04:38 +00:00
Antonio Aversa
f117aa19cd
Modify rule S3257: add rspecator and fix resources layout (#4155) 2024-08-15 17:28:04 +02:00
Marharyta Nedzelska
11592f2fde Modify Rule S3257: Add Dart language 2024-08-15 16:06:20 +03:00
Antonio Aversa
b0ec3215a1
Modify rule S2159: Add Dart language (#4153) 2024-08-15 15:03:58 +02:00
Antonio Aversa
84cbbd8357 Modify rule S4123: Add Dart language 2024-08-15 10:46:26 +02:00
Antonio Aversa
388ed01384 Modify rule S6207: Add Dart language 2024-08-15 10:42:31 +02:00
Antonio Aversa
e3348463ae Modify rule S2971: Add Dart language 2024-08-15 10:40:56 +02:00
Antonio Aversa
8aef3f27bd Modify rule S3358: Add Dart language 2024-08-15 10:35:27 +02:00
Antonio Aversa
f05c4e61a3 Modify rule S3776: add Dart 2024-08-15 10:34:19 +02:00
Jamie Anderson
7ccfb7cb15
Modify rule S7003: Rename STIG metadata section (#4147)
The STIG metadata section name was changed in PR #4098 but the PR for rule S7003 was not merged until afterwards. This fixes the metadata name.
2024-08-14 15:54:08 +01:00
Jamie Anderson
749ada480b
Modify rule S7001: Rename STIG metadata section (#4144)
The STIG metadata section name was changed in PR #4098 but the PR for rule S7001 was not merged until afterwards. This fixes the metadata name.
2024-08-14 15:34:57 +01:00
chrislain-razafimahefa-sonarsource
047f1dcfae
Modify rule S6646: Fix non compliant examples (#4137) 2024-08-14 14:36:51 +02:00
chrislain-razafimahefa-sonarsource
e246641dfa
Modify rule S6649: Fix rule-id (#4122) 2024-08-14 14:28:38 +02:00
github-actions[bot]
0905074604
Create rule S7044: Server-side requests should not be vulnerable to traversing attacks (#4139) 2024-08-14 11:52:34 +02:00
github-actions[bot]
261d3151c7
Create rule S6555: Null pointers should not be dereferenced (#1703) 2024-08-14 09:49:53 +02:00
SonarTech
27f9347d7b update coverage information 2024-08-14 02:33:56 +00:00
Marharyta Nedzelska
d16db2b7ef Modify Rule S1192: Add Dart language 2024-08-13 10:42:19 +03:00
github-actions[bot]
8e037685f0
Create rule S7027: Dependency cycles between classes should be removed (#4077)
Co-authored-by: leonardo-pilastri-sonarsource <leonardo-pilastri-sonarsource@users.noreply.github.com>
Co-authored-by: Leonardo Pilastri <leonardo.pilastri@sonarsource.com>
Co-authored-by: Gabriel Vivas <103954349+gabriel-vivas-sonarsource@users.noreply.github.com>
2024-08-12 15:25:41 +02:00
Marco Borgeaud
106927beaf
Modify rules S6169,S6171,S1314,S2335 (CPP-5503)
Co-authored-by: Loïc Joly <loic.joly@sonarsource.com>
2024-08-12 15:13:25 +02:00
Sebastien Marichal
c4511dd37f
Modifiy S2325 & S2674: Fix typo and missing links (#4140) 2024-08-12 13:34:34 +02:00
github-actions[bot]
40f97ef690
Create rule S6976: Consumed Stream pipelines should not be reused (#3913) 2024-08-12 11:13:18 +02:00
github-actions[bot]
cc9aeddb3d
Create rule S7042 "std::views::as_const" should be used to iterate on writable ranges without modifying them (CPP-5061) 2024-08-12 08:43:08 +02:00
Zsolt Kolbay
74f661bb3e
Modify S2325: Promote C# rule to Sonar-Way (#4123) 2024-08-09 16:51:37 +02:00
Sebastien Marichal
dce07c6f35
Modify S4050: Promote C# rule to SonarWay (#4135) 2024-08-09 16:46:04 +02:00
Rudy Regazzoni
78f32ca6fe
Modify rule S1781: add drupal conventions support (#4132) 2024-08-09 16:26:15 +02:00
Zsolt Kolbay
f4259f2a28
Promote S4052 to Sonar way (#4134) 2024-08-09 16:15:11 +02:00
github-actions[bot]
a36ad0a025
Create rule S6707: Optional value should only be accessed after calling isPresent() (#2896) 2024-08-09 14:33:07 +02:00
github-actions[bot]
d9b0dfabc0
Create rule S6780: Assertion conditions should not evaluate to false (#3094)
---------

Co-authored-by: andreaguarino <andreaguarino@users.noreply.github.com>
Co-authored-by: Gyula Sallai <gyula.sallai@sonarsource.com>
2024-08-09 14:27:51 +02:00
Rudy Regazzoni
fcf0c89e3e
Modify rule S100: adapt PHP explanation to include Drupal exception (#4131) 2024-08-09 14:06:26 +02:00
Zsolt Kolbay
33e7a76421
Modify S3993: Promote C# rule to Sonar-way (#4130)
* Promote S3993 to Sonar-way and convert to LayC format

* Add missing newline to S2674

* Address comments
2024-08-09 13:40:23 +02:00
Sebastien Marichal
716a7aa85d
Modify S3431: Promote C# rule to SonarWay (#4127) 2024-08-09 10:58:55 +02:00
github-actions[bot]
8f7fcf7047
Create rule S6646: Boolean expressions should not be gratuitous (#2223) 2024-08-08 17:28:53 +02:00
Egon Okerman
8630818ded
Modify rule S2053: Update salt length to be 32 bytes everywhere (#4094)
* Update salt length to be 32 bytes everywhere

* Fix typo in VB.NET

* Add Java
2024-08-08 14:32:01 +02:00
github-actions[bot]
3fc71e1444
S7035: The underlying type of an enum should be accessed through "to_underlying" 2024-08-08 10:43:54 +02:00
Egon Okerman
afdfdf77d0
Update URLs to point to mas.owasp.org (#4126) 2024-08-08 09:50:21 +02:00
github-actions[bot]
c06926321c
Create rule S7038: "std::stringstream" or "std::spanstream" should be used instead of "std::strstream" (CPP-4998) 2024-08-08 09:43:56 +02:00
SonarTech
f5d478e3e5 update coverage information 2024-08-08 02:33:26 +00:00
Marharyta
c3c046ff3e
Modify Rule S1155: Improve description for Dart 2024-08-07 14:07:42 +00:00
Marharyta Nedzelska
cea6f025f6 Modify Rule S1155: Improve description for Dart 2024-08-07 16:33:32 +03:00
Sebastien Marichal
d6ad5e3c48
Modifiy S2674: Promote it to SonarWay (#4120) 2024-08-07 11:06:24 +02:00
Sebastien Marichal
e2937173ac
Deprecate rule S2387 (#4109) 2024-08-07 11:01:26 +02:00
github-actions[bot]
96c5350187
Create rule S7040 Escape sequences should use the delimited form (\\u{}, \\o{}, \\x{}) (CPP-5019) 2024-08-06 17:28:12 +00:00
Loïc Joly
02d29a500a
CPP-4967 S1314 Cover C++23 escape syntax in RSPEC 2024-08-06 16:05:05 +00:00
Marharyta Nedzelska
d836e73941 Modify Rule S1679: fix Dart example, add implementation details 2024-08-06 18:55:18 +03:00
github-actions[bot]
b2a890068d
Create rule S6649: Zero should not be a possible denominator (#2252) 2024-08-06 16:57:44 +02:00
Peter Trifanov
6882a6b33d
Modify rule S7036: Add tags (#4119) 2024-08-06 16:30:25 +02:00
Marharyta
475b188cb3
Modify Rule S927: Add implementation detail to the Dart rule description 2024-08-06 14:00:10 +00:00
SonarTech
64a4f6648f update coverage information 2024-08-06 02:32:46 +00:00
Marharyta Nedzelska
fc82f5ce69 Modify Rule S6582: Add link to the rule prefer_null_aware_method_calls 2024-08-05 16:52:08 +03:00
Marharyta Nedzelska
61c47c4571 Modify Rule S6582: Update description for Dart 2024-08-05 16:06:01 +03:00
github-actions[bot]
0f722e6d0b
Create rule S7034: "contains" should be used to test whether a substring is part of a string (CPP-4996) (#4096) 2024-08-05 11:50:59 +02:00
Marharyta Nedzelska
0f8af61051 Modify Rule S6606: Update description for Dart 2024-08-05 11:36:05 +03:00
github-actions[bot]
efe0f45239
Create rule S7033: "if consteval" should be used instead of "if (std::is_constant_evaluated())" (CPP-4960) (#4092) 2024-08-05 10:07:15 +02:00
github-actions[bot]
1fb5ee760b
Create rule S7032 init-statement in if/switch/for-range should declare a variable (CPP-5020) 2024-08-02 19:02:20 +02:00
github-actions[bot]
1447906551
Create rule S7036: Don't use offensive language (#4100) 2024-08-02 15:53:08 +02:00
Arseniy Zaostrovnykh
f3bd1c7b1c
Update rule S2807: typos (#4107) 2024-08-02 15:13:19 +02:00
github-actions[bot]
a05bc3b14e
Create rule S7039: Content Security Policies should be restrictive (#4104) 2024-08-02 15:09:08 +02:00
Antonio Aversa
d5f68da6f8 Modify rule S6531: fix URI format to conform to LaYC 2024-08-02 12:39:13 +03:00
Antonio Aversa
b59e3ad55b Modify rule S1134: remove unnecessary empty line in code example 2024-08-02 12:39:13 +03:00
Antonio Aversa
25adcc6daa Modify rule S1116: fix message in rspecator 2024-08-02 12:39:13 +03:00
Antonio Aversa
458d45228a Modify rule S106: fix name of print method 2024-08-02 12:39:13 +03:00
Antonio Aversa
430ebc0ad0 Modify rule S101: fix code examples highlighting 2024-08-02 12:39:13 +03:00
SonarTech
fdeb110671 update coverage information 2024-07-31 02:25:18 +00:00
Antonio Aversa
9864ab02c0 Modify rule S4977: Type parameters should not shadow other type parameters (avoid_shadowing_type_parameters) 2024-07-30 18:53:09 +02:00
Antonio Aversa
d8cc228277 Modify rule S2486: Exceptions should not be ignored (empty_catches) 2024-07-30 18:53:09 +02:00
Antonio Aversa
ef9d012edb Modify rule S115: Constant names should comply with a naming convention (constant_identifier_names) 2024-07-30 18:53:09 +02:00
Antonio Aversa
bb9b39d640 Modify rule S101: Class names should comply with a naming convention (camel_case_types) 2024-07-30 18:53:09 +02:00
Antonio Aversa
e10f73edac Modify rule S1143: Jump statements should not occur in "finally" blocks (control_flow_in_finally) 2024-07-30 18:53:09 +02:00
Antonio Aversa
f7e4334515 Modify rule S1065: Unused labels should be removed (WarningCode.UNUSED_LABEL) 2024-07-30 18:53:09 +02:00
Antonio Aversa
ca50289cd6 Modify rule S1185: Overriding methods should do more than simply call the same method in the super class (unnecessary_overrides) 2024-07-30 18:53:09 +02:00
Antonio Aversa
32a8fb8116 Modify rule S106: Standard outputs should not be used directly to log anything (avoid_print) 2024-07-30 18:53:09 +02:00
Antonio Aversa
d9e8af8a8e Modify rule S6531: Redundant type casts should be removed (WarningCode.UNNECESSARY_CAST, WarningCode.UNNECESSARY_TYPE_CHECK*) 2024-07-30 18:53:09 +02:00
Antonio Aversa
0c666c6b55 Modify rule S1135: Track uses of "TODO" tags (TodoCode.TODO) 2024-07-30 18:53:09 +02:00
Antonio Aversa
fd10c121eb Modify rule S1481: Unused local variables should be removed (unused_local_variable) 2024-07-30 18:53:09 +02:00
Antonio Aversa
4b834646d1 Modify rule S1128: Unnecessary imports should be removed (duplicate_import, unnecessary_import, unused_import) 2024-07-30 18:53:09 +02:00
Antonio Aversa
abcf7a1edf Modify rule S1206: "equals(Object obj)" and "hashCode()" should be overridden in pairs (hash_and_equals) 2024-07-30 18:53:09 +02:00
Antonio Aversa
81a624d470 Modify rule S1116 Empty statements should be removed (avoid_empty_else, empty_statements) 2024-07-30 18:53:09 +02:00
Antonio Aversa
9dd0010557 Modify rule S1874: Code annotated as deprecated should not be used (HintCode.DEPRECATED_MEMBER_USE) 2024-07-30 18:53:09 +02:00
Antonio Aversa
ff3ef0a22d Modify rule S6535: Unnecessary character escapes should be removed (unnecessary_string_escapes) 2024-07-30 18:53:09 +02:00
Antonio Aversa
d173dfb031 Modify rule S121: Control structures should use curly braces (curly_braces_in_flow_control_structures) 2024-07-30 18:53:09 +02:00
Antonio Aversa
a9dbd9f246 Modify rule S1161: "@override" should be used on overriding members (annotate_overrides) 2024-07-30 18:53:09 +02:00
Antonio Aversa
b70eb0aed1 Modify rule S1123: Deprecated elements should include explanations (provide_deprecation_message) 2024-07-30 18:53:09 +02:00
Jamie Anderson
d255072981
Modify rules: Rename STIG version in metadata (#4098)
The Security Technical Implementation Guide security standard is being
renamed from its release date (`2023-06-08`) to its official version and
revision number (`V5R3`). This helps to align with the version number
being used internally for reporting purposes.
2024-07-30 16:10:03 +02:00
SonarTech
915b23ebab update coverage information 2024-07-30 02:32:17 +00:00
github-actions[bot]
4261aba65f
Create rule S7003: Detect Azure Functions Secrets (APPSEC-1847) (#4040)
* Create rule S7003

* Add first draft

* Apply suggestions from code review

Co-authored-by: Hendrik Buchwald <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>

* Apply suggestions from code review

* Update rules/S7003/secrets/rule.adoc

* Update rules/S7003/secrets/rule.adoc

* Update rules/S7003/secrets/rule.adoc

Co-authored-by: Hendrik Buchwald <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>

---------

Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com>
Co-authored-by: Loris S <91723853+loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Hendrik Buchwald <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>
2024-07-29 14:05:20 +01:00
github-actions[bot]
68dc61f469
Create rule S7001: Detect Azure App Service Secrets APPSEC-1846 (#4037)
* Create rule S7001

* Add everything

* Apply suggestions from code review

* Update rules/S7001/secrets/rule.adoc

* Update rules/S7001/secrets/rule.adoc

* Update rules/S7001/secrets/rule.adoc

---------

Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com>
Co-authored-by: Loris S <91723853+loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Hendrik Buchwald <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>
2024-07-29 14:04:38 +01:00
SonarTech
bd44ac7802 update coverage information 2024-07-26 02:32:03 +00:00
github-actions[bot]
31b0e03754
Create rule S7030: Malformed JSON in Exec form leads to unexpected behavior (#4083) 2024-07-25 16:33:20 +02:00
Peter Trifanov
893fe62bcc
Modify rule S7018: change title, make applicable for single-line instructions (#4095) 2024-07-25 14:26:12 +02:00
SonarTech
90b9c2a573 update coverage information 2024-07-25 02:32:13 +00:00
Marco Borgeaud
b9ef7c27f0
Modify rules S6994,S6996: add missing since-c++11 tags (#4093) 2024-07-24 13:52:28 +02:00
hashicorp-vault-sonar-prod[bot]
1505b7a8ea
Create rule S7017: Detect Azure Bot Framework secrets (APPSEC-1854) (#4064)
* Create rule S7017

* Update RSPEC

* Add contents

* Update rules/S7017/secrets/rule.adoc

---------

Co-authored-by: hendrik-buchwald-sonarsource <hendrik-buchwald-sonarsource@users.noreply.github.com>
Co-authored-by: Hendrik Buchwald <hendrik.buchwald@sonarsource.com>
Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com>
Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>
2024-07-24 08:39:50 +00:00
Rudy Regazzoni
e6561ec95b
Modify rule S7021: improve text (#4091)
* Modify rule S7021: improve text

* Add message details

* Update rules/S7021/docker/rule.adoc

Co-authored-by: Jonas Wielage <jonas.wielage@sonarsource.com>

---------

Co-authored-by: Jonas Wielage <jonas.wielage@sonarsource.com>
2024-07-24 08:50:52 +02:00
SonarTech
ec76b66ed2 update coverage information 2024-07-24 02:32:19 +00:00
Sebastien Marichal
f39f18d8d1
Modify S3168: Fix error in compliant code example (#4090) 2024-07-23 15:21:02 +02:00
Fred Tingaud
a20a45637b
Fix coverage script when there is no new coverage
The previous change to the task 'Push the updated coverage to master' made it passthrough because it used {{ as part of the condition, which seems to be forbidden.
Changing the condition to what we usually use to check default_branch in other workflow scripts throughout our repositories.
2024-07-23 11:46:38 +02:00
Peter Trifanov
07577d88cb
Modify rule S6587: Describe a soltuion with a cache mount (#4085) 2024-07-22 09:23:13 +00:00
SonarTech
d7aa28defe update coverage information 2024-07-20 02:31:05 +00:00
hashicorp-vault-sonar-prod[bot]
ce16b3dca3
Create rule S7010: Databricks access tokens should not be disclosed (#4054)
* Create rule S7010

* Add Databricks content

---------

Co-authored-by: jamie-anderson-sonarsource <jamie-anderson-sonarsource@users.noreply.github.com>
Co-authored-by: Jamie Anderson <127742609+jamie-anderson-sonarsource@users.noreply.github.com>
2024-07-19 18:33:39 +01:00
github-actions[bot]
fa88deb297
Create rule S7025: IBM Cloudant service passwords should not be disclosed (#4075)
* Create rule S7025

* Add content for IBM Cloudant

---------

Co-authored-by: jamie-anderson-sonarsource <jamie-anderson-sonarsource@users.noreply.github.com>
Co-authored-by: Jamie Anderson <127742609+jamie-anderson-sonarsource@users.noreply.github.com>
2024-07-19 18:15:09 +01:00
github-actions[bot]
cb1c486082
Create rule S7024: IBM Cloud Object Storage access keys should not be disclosed (#4074)
* Create rule S7024

* Add content for IBM Cloud Object Storage

---------

Co-authored-by: jamie-anderson-sonarsource <jamie-anderson-sonarsource@users.noreply.github.com>
Co-authored-by: Jamie Anderson <127742609+jamie-anderson-sonarsource@users.noreply.github.com>
2024-07-19 18:15:01 +01:00
hashicorp-vault-sonar-prod[bot]
276f177af9
Create rule S7022: Detect Azure ML keys (#4072)
* Create rule S7022

* add contents

* Apply suggestions from code review

Co-authored-by: Jamie Anderson <127742609+jamie-anderson-sonarsource@users.noreply.github.com>

* Improved the compliant sample

---------

Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com>
Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Jamie Anderson <127742609+jamie-anderson-sonarsource@users.noreply.github.com>
2024-07-19 18:18:48 +02:00
hashicorp-vault-sonar-prod[bot]
f033cba397
Create rule S7011: Detect Azure EventGrid SAS (#4055)
* Create rule S7011

* Add text

* Add specific definitions

* Apply suggestions from code review

* Update rules/S7011/secrets/rule.adoc

---------

Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com>
Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>
2024-07-19 18:01:17 +02:00
hashicorp-vault-sonar-prod[bot]
f19a1f3eb4
Create rule S7008: Detect Azure Logic App secrets APPSEC-1848 (#4048)
* Create rule S7008

* Add a bit more text

* improved the code

* fixed missing title

* add improved sample

* improved code sampels

---------

Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com>
2024-07-19 17:59:36 +02:00
github-actions[bot]
8d1e860b94
Create rule S6998: Terraform API Tokens should not be disclosed APPSEC-1843 (#4031)
* Create rule S6998

* Add rationale

* add doc links

* Apply suggestions from code review

Co-authored-by: Hendrik Buchwald <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>

---------

Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com>
Co-authored-by: Loris S <91723853+loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Hendrik Buchwald <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>
2024-07-19 17:42:49 +02:00
github-actions[bot]
36a30348a8
Create rule S6993: Detect Vultr API Tokens leaks in code (APPSEC-1833) (#4024)
* Create rule S6993

* Add Vultr-specific text

* Update rules/S6993/secrets/rule.adoc

* Add missing variable

---------

Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com>
Co-authored-by: Loris S <91723853+loris-s-sonarsource@users.noreply.github.com>
2024-07-19 17:40:11 +02:00
github-actions[bot]
c0e5eaec21
Create rule S7031: Limit the amount of RUN instructions (#4084)
* Create rule S7031

* Add rules details

* update metadata

* gramarly fix

* Adding implementation details

* Ading more details

---------

Co-authored-by: rudy-regazzoni-sonarsource <rudy-regazzoni-sonarsource@users.noreply.github.com>
Co-authored-by: Rudy Regazzoni <110470341+rudy-regazzoni-sonarsource@users.noreply.github.com>
2024-07-19 14:56:43 +00:00
Rudy Regazzoni
0314fe7cf3
Update rule S7028: change example and implementation details (#4082) 2024-07-19 14:46:33 +02:00
Marharyta
1f8bb90e65
Add remaining rules from Dart recommended profile
* Modify rule S2358: Add Dart language

* Modify rule S3689: Add Dart language

* Modify rule S5856: Add Dart language

* Modify rule S2963: Add Dart language

* Modify rule S113: Add Dart language

* Modify rule S4647: Add Dart language
2024-07-19 11:14:29 +02:00
Mate Molnar
96a10a4174
BUILD-4175 Fix permission issue when canceling the update coverage action (#4081)
* Add missing permission to cancel the action
* Enable manual testing
2024-07-19 11:00:29 +02:00
github-actions[bot]
140e595134
Create rule S7029: Prefer COPY over ADD for copying local resources (#4080) 2024-07-19 10:09:02 +02:00
github-actions[bot]
3bee3faeb1
Create rule S7028: Descriptive labels are mandatory (#4078)
* Create rule S7028

* Add rule details

* Modify rule S121: activate in Dart by default (#4060)

* Modify rule S6398: Add How to fix it in Spring (#3857)

* Modify rule S6398: Add How to fix it in Spring

* Update rules/S6398/java/how-to-fix-it/spring.adoc

Co-authored-by: gaetan-ferry-sonarsource <112399173+gaetan-ferry-sonarsource@users.noreply.github.com>

---------

Co-authored-by: gaetan-ferry-sonarsource <112399173+gaetan-ferry-sonarsource@users.noreply.github.com>

* Adding implementation etails

* Create rule S7028

* Add rule details

* Adding implementation etails

---------

Co-authored-by: rudy-regazzoni-sonarsource <rudy-regazzoni-sonarsource@users.noreply.github.com>
Co-authored-by: Rudy Regazzoni <110470341+rudy-regazzoni-sonarsource@users.noreply.github.com>
Co-authored-by: Marharyta <margarita.nedzelska@sonarsource.com>
Co-authored-by: daniel-teuchert-sonarsource <141642369+daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: gaetan-ferry-sonarsource <112399173+gaetan-ferry-sonarsource@users.noreply.github.com>
2024-07-19 09:45:46 +02:00
daniel-teuchert-sonarsource
7ef77a2844
Modify rule S6398: Add How to fix it in Spring (#3857)
* Modify rule S6398: Add How to fix it in Spring

* Update rules/S6398/java/how-to-fix-it/spring.adoc

Co-authored-by: gaetan-ferry-sonarsource <112399173+gaetan-ferry-sonarsource@users.noreply.github.com>

---------

Co-authored-by: gaetan-ferry-sonarsource <112399173+gaetan-ferry-sonarsource@users.noreply.github.com>
2024-07-18 16:45:11 +02:00
Marharyta
c66ba75bfa
Modify rule S121: activate in Dart by default (#4060) 2024-07-18 15:48:42 +02:00
github-actions[bot]
02e39c6adc
Create rule S7026: Use ADD to retrieve remote resources (#4076) 2024-07-18 12:35:19 +00:00
github-actions[bot]
debd0a0325
Create rule S7023: Use digest to pin versions of base images (#4073) 2024-07-18 11:39:03 +00:00
Marharyta
c3aa4b07c5
Add more Dart rules (#4062)
* Modify rule S6582: Add Dart language

* Modify rule S6606: Add Dart language

* Modify rule S6207: Add Dart language

* Modify rule S1116: Add Dart example with empty "else"

* Modify rule S927: Add Dart language

* Modify rule S1155: Add Dart language

* Modify rule S2933: Add Dart language

* Modify rule S2971: Add Dart language

* Modify rule S4123: Add Dart language

* Modify rule S120: Add Dart language

* Modify rule S1679: Add Dart language

* Modify rule S2159: Add Dart language

* Modify rule S3257: Add Dart language

* Modify rule S6619: Add Dart language

* Modify rule S3562: Add Dart language

* Modify rule S3240: Add Dart language

* Modify rule S5416: Add Dart language

* Modify rule S2175: Add Dart language

* Modify rule S3962: Add Dart language

* Modify rule S2471: Add Dart language

* Modify rule S3512: Add Dart language

* Modify rule S2432: Add Dart language
2024-07-18 13:20:47 +02:00
hashicorp-vault-sonar-prod[bot]
4c378e9766
Create rule S7021: WORKDIR instruction should only be used with absolute path (#4070)
* Create rule S7021

* start

* add details

* update rule

* change impact

* Update rules/S7021/docker/rule.adoc

Co-authored-by: Peter Trifanov <peter.trifanov@sonarsource.com>

* Update rules/S7021/docker/rule.adoc

Co-authored-by: Peter Trifanov <peter.trifanov@sonarsource.com>

* Address review comment

---------

Co-authored-by: rudy-regazzoni-sonarsource <rudy-regazzoni-sonarsource@users.noreply.github.com>
Co-authored-by: Rudy Regazzoni <110470341+rudy-regazzoni-sonarsource@users.noreply.github.com>
Co-authored-by: Peter Trifanov <peter.trifanov@sonarsource.com>
2024-07-18 11:52:08 +02:00
hashicorp-vault-sonar-prod[bot]
26cd1ce79c
Create rule S7020: Split this RUN instruction into multiple lines (#4069)
* Create rule S7020

* Add rule details

* Improve rule description

* Update metadata

* Fix code example

* Add implementation details

* add title

* remove absent file

* Update rules/S7020/docker/rule.adoc

Co-authored-by: Peter Trifanov <peter.trifanov@sonarsource.com>

* Address review comments

---------

Co-authored-by: rudy-regazzoni-sonarsource <rudy-regazzoni-sonarsource@users.noreply.github.com>
Co-authored-by: Rudy Regazzoni <110470341+rudy-regazzoni-sonarsource@users.noreply.github.com>
Co-authored-by: Peter Trifanov <peter.trifanov@sonarsource.com>
2024-07-18 11:51:50 +02:00
hashicorp-vault-sonar-prod[bot]
8ed869228a
Create rule S7019: Prefer Exec form for ENTRYPOINT and CMD instructions (#4067) 2024-07-17 14:51:31 +00:00
SonarTech
7566122a45 update coverage information 2024-07-17 08:44:00 +00:00
Mate Molnar
c0a5024363 BUILD-4175: use secrets from Vault
* Fix SQ issue Unexpected string concatenation
* Allow testing of the coverage update workflow by checking out all
  branches and referencing the SHA of the triggering event
* Fix repository url for coverage update
* Add a manual trigger for coverage update
2024-07-17 10:38:43 +02:00
Mate Molnar
0f8222f73b Revert "BUILD-4733: update secrets to use vault instead of github (#4006)"
This reverts commit 1afa0580c46d66881eacaa202a92e49c96a46fac.
2024-07-17 10:38:43 +02:00
Mate Molnar
91afce33c6 Revert "BUILD-4733: Use vault secrets instead of github"
This reverts commit 2cf7447245c572b0e4f9869db588430e987ff014.
2024-07-17 10:38:43 +02:00
Mate Molnar
62870a2202 Revert "BUILD-4733: update clone command to use a github access-token"
This reverts commit 8a20fdca5e8a16320f7864c2fbe2052dc932a917.
2024-07-17 10:38:43 +02:00
Mate Molnar
cf35ea3595 Revert "BUILD-4733: Use the correct url format for cloning with an access token"
This reverts commit 72febdb50709c0edba5ead3d6b139812cb557f8c.
2024-07-17 10:38:43 +02:00
Mate Molnar
7d64c96a75 Revert "BUILD-4733: Use COVERAGE_GITHUB_TOKEN from the vault instead of the default GITHUB_TOKEN"
This reverts commit 9a14e956754adfffdfb53bd22d4a230cb97acaae.
2024-07-17 10:38:43 +02:00
Mate Molnar
41422bc2cb Revert "BUILD-5580: Add missing id-token: write permissions for the Vault action and update the action to v3"
This reverts commit 1c285ade7a6638afc8d00893d9756b567fd9c60c.
2024-07-17 10:38:43 +02:00
Mate Molnar
ac0dfabb00 Revert "BUILD-5580: add missing pages:write permission to Build and Deploy"
This reverts commit 6bc94bea019a0dafb4f78933bbe943d74fc329c5.
2024-07-17 10:38:43 +02:00
hashicorp-vault-sonar-prod[bot]
dd70d2cc44
Create rule S7016: Detect Kairos secrets (APPSEC-1853) (#4063) 2024-07-17 10:11:51 +02:00
hashicorp-vault-sonar-prod[bot]
d6aa1d587c
Create rule S7014: Detect Cloudera secrets (APPSEC-1852) (#4059) 2024-07-17 10:09:07 +02:00
hashicorp-vault-sonar-prod[bot]
e0ff22ed4a
Create rule S7018: Arguments in multi-line RUN instructions should be sorted (#4066) 2024-07-16 15:11:56 +02:00
hashicorp-vault-sonar-prod[bot]
86f9ff0887
Create rule S7015: Detect DigitalOcean Spaces secrets (APPSEC-1836) (#4061) 2024-07-16 10:17:09 +02:00
hashicorp-vault-sonar-prod[bot]
a159128a47
Create rule S7013: Detect OpenAI secrets (APPSEC-1851) (#4057) 2024-07-16 09:09:38 +02:00
hashicorp-vault-sonar-prod[bot]
648f7419da
Create rule S7009: Detect Scaleway secrets (APPSEC-1837) (#4051) 2024-07-15 09:41:06 +02:00
Margarita Nedzelska
636eef0dec Modify rule S4977: Add Dart language 2024-07-12 11:57:36 +02:00
Margarita Nedzelska
159dc46592 Modify rule S2486: Add Dart language 2024-07-12 11:57:36 +02:00
Margarita Nedzelska
6c682d56c9 Modify rule S1578: Add Dart language 2024-07-12 11:57:36 +02:00
Margarita Nedzelska
9a6bc1829d Modify rule S115: Add Dart language 2024-07-12 11:57:36 +02:00
Margarita Nedzelska
78a79f452a Modify rule S101: Add Dart language 2024-07-12 11:57:36 +02:00
Marharyta Nedzelska
4d8a4567d6 Add missing links for Dart rules 2024-07-12 11:57:36 +02:00
Marharyta Nedzelska
3f0b1782e7 Modify rule S1068: Fix example 2024-07-12 11:57:36 +02:00
Marharyta Nedzelska
ebf084f5fc Modify rule S1143: Add Dart language 2024-07-12 11:57:36 +02:00
Marharyta Nedzelska
fc29625b72 Modify rule S1135: Add Dart language 2024-07-12 11:57:36 +02:00
Marharyta Nedzelska
b0681b9064 Modify rule S1068: Add Dart language 2024-07-12 11:57:36 +02:00
Marharyta Nedzelska
d0e28a6c60 Modify rule S1065: Add Dart language 2024-07-12 11:57:36 +02:00
Marharyta Nedzelska
4bcb4b6389 Modify rule S106: Add Dart language 2024-07-12 11:57:36 +02:00
Marharyta Nedzelska
071824716a Modify rule S1185: Add Dart language 2024-07-12 11:57:36 +02:00
Marharyta Nedzelska
58cd0e7058 Modify rule S1134: Add Dart language 2024-07-12 11:57:36 +02:00
Marharyta Nedzelska
3e9e0e28e6 Modify rule S6531: Add Dart language 2024-07-12 11:57:36 +02:00
Marharyta Nedzelska
205aca197b Modify rule S1481: Add Dart language 2024-07-12 11:57:36 +02:00
Marharyta Nedzelska
91d7b8b085 Modify rule S1128: Add Dart language 2024-07-12 11:57:36 +02:00
Marharyta Nedzelska
8e7e803159 Modify rule S1133: Add Dart language 2024-07-12 11:57:36 +02:00
Marharyta Nedzelska
242d61bf1a Modify rule S1206: Add Dart language 2024-07-12 11:57:36 +02:00
Marharyta Nedzelska
2b5c305a6d Modify rule S1116: Add Dart language 2024-07-12 11:57:36 +02:00
Marharyta Nedzelska
f581a56ea2 Modify rule S1874: Add Dart language 2024-07-12 11:57:36 +02:00
Marharyta Nedzelska
f34e144d7b Modify rule S6535: Add Dart language 2024-07-12 11:57:36 +02:00
Marharyta Nedzelska
3155d0ef12 Modify rule S1161: Add Dart language 2024-07-12 11:57:36 +02:00
Marharyta Nedzelska
cb625f7ae0 Modify rule S121: Add Dart language 2024-07-12 11:57:36 +02:00
Marharyta Nedzelska
ed6892753e Modify rule S1123: Add Dart language 2024-07-12 11:57:36 +02:00
Marcin Stachniuk
e5db843a67
Modify rule S6893 Ensure whitespace in-between braces (#4058)
* SONARIAC-1304 S6893: Ensure whitespace in-between braces

* Change code highlighting to yaml
2024-07-12 11:06:42 +02:00
hashicorp-vault-sonar-prod[bot]
5e1cf4332d
Create rule S7012 "assert" condition should not be trivially true 2024-07-11 17:00:43 +02:00
Loïc Joly
20820a610d
Modify rule S6200 Don't allow local volatile variables (M23_387) (CPP-5140) 2024-07-11 14:51:39 +00:00
github-actions[bot]
0202d981cd
Create rule S6994 Use static_assert for compile-time constants CPP-5134 2024-07-11 16:50:17 +02:00
Sebastien Marichal
5281ff503a
Modify S2699: Add Moq as a valid assertions framework (#4052)
Co-authored-by: Mary Georgiou <89914005+mary-georgiou-sonarsource@users.noreply.github.com>
2024-07-11 16:30:49 +02:00
github-actions[bot]
59ca94a495
Create rule S6996 Integer-literal of type 'long long' should use double 'LL' suffix (CPP-5130) 2024-07-11 15:11:53 +02:00
Loïc Joly
913b735952
Modify rule S841 Update with the specification from M23_154 (CPP-5136) 2024-07-11 14:11:47 +02:00
Hendrik Buchwald
e08427bcf6
Modify rule S3649: Add Couchbase example (#3897) 2024-07-11 11:45:54 +00:00
Pierre-Loup
d8c45777df
Modify S5147: Add context specific code examples for Spring Data MongoDB (#3912)
Co-authored-by: Thomas Serre <118730793+thomas-serre-sonarsource@users.noreply.github.com>
2024-07-11 11:35:10 +02:00
Hendrik Buchwald
4a50193c56
Modify rule S3649: Add Neo4j example (#3911)
* Add neo4j

* Rename Neo4j to Spring Data Neo4j

---------

Co-authored-by: Thomas Serre <118730793+thomas-serre-sonarsource@users.noreply.github.com>
2024-07-11 08:53:54 +02:00
Pierre-Loup
d9da9fbcd4
Modify S3649: Add context specific code examples for Spring Data Cassandra (APPSEC-1566) (#3885)
Co-authored-by: gaetan-ferry-sonarsource <112399173+gaetan-ferry-sonarsource@users.noreply.github.com>
2024-07-11 08:46:09 +02:00
hashicorp-vault-sonar-prod[bot]
87a08b5b89
Create rule S7007: Tencent Cloud secrets should not be disclosed (#4046)
* Create rule S7007

* Add rule content

---------

Co-authored-by: jamie-anderson-sonarsource <jamie-anderson-sonarsource@users.noreply.github.com>
Co-authored-by: Jamie Anderson <127742609+jamie-anderson-sonarsource@users.noreply.github.com>
2024-07-10 16:19:56 +01:00
hashicorp-vault-sonar-prod[bot]
61855ffd1b
Create rule S7006: Detect Heroku secrets (APPSEC-1845) (#4045) 2024-07-10 17:07:57 +02:00
github-actions[bot]
09ac17157d
Create rule S7004: Huawei Cloud application secrets should not be disclosed (#4041)
* Create rule S7004

* Add content for Huawei Cloud

* Add documentation link

* Adjust RSPEC content to account for more use cases

* Remove references to API gateway

I had initially found some documentation that seemed to indicate that API Gateway may use the same format secret. However, I cannot find that documentation any more.

I'm going to remove anything related to API Gateway and just focus on the main APIs, with Push Kit being called out because that has the most examples on SourceGraph.

* Use shared phishing content

---------

Co-authored-by: jamie-anderson-sonarsource <jamie-anderson-sonarsource@users.noreply.github.com>
Co-authored-by: Jamie Anderson <127742609+jamie-anderson-sonarsource@users.noreply.github.com>
Co-authored-by: Loris S <91723853+loris-s-sonarsource@users.noreply.github.com>
2024-07-10 16:06:54 +01:00
Marco Borgeaud
4b2ab1f46d
Modify rule S1003: Update description CPP-5404 (#4016) 2024-07-10 10:08:40 +02:00
Fred Tingaud
0fd7e2c4b0
Fix language in rule creation script 2024-07-09 17:07:27 +02:00
Marharyta
782cae5eca
RULEAPI-809 Add a new language identifier for Dart (#4020) 2024-07-09 16:43:50 +02:00
Hendrik Buchwald
f740f91b5e
Modify rule S6992/S6999: Add missing variables (APPSEC-1885) (#4047) 2024-07-09 09:39:30 +00:00
github-actions[bot]
9c0b794d64
Create rule S7000: Detect Pulumi secrets (APPSEC-1840) (#4034) 2024-07-09 11:34:05 +02:00
github-actions[bot]
8774e596aa
Create rule S7002: Detect Linode secrets (APPSEC-1844) (#4038) 2024-07-09 11:21:46 +02:00
Mate Molnar
6bc94bea01
BUILD-5580: add missing pages:write permission to Build and Deploy
work-flow and fix the usage of github-pages-deploy-action
2024-07-08 16:59:31 +02:00
Mate Molnar
1c285ade7a
BUILD-5580: Add missing id-token: write permissions for the Vault action and update the action to v3 2024-07-08 14:58:38 +02:00
github-actions[bot]
8bfe3b7de1
Create rule S6997: Sidekiq download credentials should not be disclosed (#4030)
* Create rule S6997

* Add information about Sidekiq download credentials

* Update example and add link to Sidekiq FAQ

---------

Co-authored-by: jamie-anderson-sonarsource <jamie-anderson-sonarsource@users.noreply.github.com>
Co-authored-by: Jamie Anderson <127742609+jamie-anderson-sonarsource@users.noreply.github.com>
2024-07-08 13:20:41 +01:00
github-actions[bot]
6caddcf0f7
Create rule S6995: Splunk tokens should not be disclosed (#4026)
* Create rule S6995

* Update RSPEC with Splunk token information

* Remove unneeded comments

---------

Co-authored-by: jamie-anderson-sonarsource <jamie-anderson-sonarsource@users.noreply.github.com>
Co-authored-by: Jamie Anderson <127742609+jamie-anderson-sonarsource@users.noreply.github.com>
2024-07-08 09:30:59 +01:00
Tom
9a14e95675 BUILD-4733: Use COVERAGE_GITHUB_TOKEN from the vault instead of the default GITHUB_TOKEN 2024-07-05 17:01:17 +02:00
github-actions[bot]
f744e90452
Create rule S6999: Detect OVH secrets (APPSEC-1839) (#4032) 2024-07-05 16:00:19 +02:00
tomverin
72febdb507
BUILD-4733: Use the correct url format for cloning with an access token 2024-07-04 16:05:28 +02:00
tomverin
8a20fdca5e
BUILD-4733: update clone command to use a github access-token 2024-07-04 15:48:47 +02:00
Peter Trifanov
abec878530
Modify rule S117: Fix incorrect example for Kubernetes (#4033) 2024-07-04 15:38:12 +02:00
github-actions[bot]
750708a20a
Create rule S6992: Detect Equinix secrets (APPSEC-1832) (#4023) 2024-07-04 13:22:53 +02:00
github-actions[bot]
6c2f002e21
Create rule S6991: Macro arguments should not contain preprocessing directives (CPP-5132) 2024-07-04 09:44:24 +00:00
Fred Tingaud
c8d61cbd00
Modify rule S955: Mention // (CPP-5129) 2024-07-04 11:30:13 +02:00
Loïc Joly
21c1778258
Modify rule S824: Clarify the most vexing parse (CPP-5122) 2024-07-03 15:06:38 +02:00
Loïc Joly
39f2903c9b
Modify rule S5259: Document #pragma once (CPP-5133) 2024-07-03 09:31:38 +00:00
tomverin
2cf7447245
BUILD-4733: Use vault secrets instead of github 2024-07-01 15:28:02 +00:00
Sebastien Marichal
fee05d9f21
Modify S3247: Improve description and update example (#4019) 2024-07-01 13:37:24 +00:00
Jonas Wielage
adc791cf2b
Modify rule S6897: Add examples for LimitRange (#4018) 2024-06-28 15:52:05 +02:00
Peter Trifanov
ec95fec7a9
Modify rule S6892: Add examples for LimitRange (#4017) 2024-06-28 13:25:20 +00:00
github-actions[bot]
7e2174bd6f
Create rule S6989: Adafruit IO API keys should not be disclosed (#4009)
* Create rule S6989

* Add content for S6989

* Add documentation link

---------

Co-authored-by: jamie-anderson-sonarsource <jamie-anderson-sonarsource@users.noreply.github.com>
Co-authored-by: Jamie Anderson <127742609+jamie-anderson-sonarsource@users.noreply.github.com>
2024-06-28 11:17:39 +01:00
github-actions[bot]
ba9bab2a5e
Create rule S6990: Ubidots API secrets should not be disclosed (#4010) 2024-06-28 11:17:52 +02:00
github-actions[bot]
c61e87ceda
Create rule S6988 (#3991)
* Create rule S6988

* Add initial rule content

* Generalize content and move it to a shared location.

---------

Co-authored-by: jamie-anderson-sonarsource <jamie-anderson-sonarsource@users.noreply.github.com>
Co-authored-by: Jamie Anderson <jamie.anderson@sonarsource.com>
2024-06-28 09:53:36 +01:00
Peter Trifanov
56beff2e4d
Modify rule S6869: Add examples for LimitRange (#4004) 2024-06-28 07:22:32 +00:00
Marcin Stachniuk
818dd102d8
SONARIAC-1228 S6870: Should not raise with LimitRange in the same namespace setting Storage Limits (#4014) 2024-06-27 14:55:26 +02:00
Zsolt Kolbay
75bbd8eb2d
Update S1542: Change default regex for PL/SQL (#4012) 2024-06-27 14:24:19 +02:00
github-actions[bot]
8ceaab02f4
Create rule S6987: Docker swarm tokens should not be disclosed (APPSEC-1800) (#3988) 2024-06-27 14:13:02 +02:00
Sebastien Marichal
90f15e5811
Modifiy S1144: Improve C# exception (#4005) 2024-06-27 12:08:26 +00:00
Jonas Wielage
2d06669565
Modify rule S6873: Add examples for LimitRange (#4015) 2024-06-27 14:04:38 +02:00
Alban Auzeill
7a7c79e39d
Modify rule S6914: Remove "timeero.com" because CI see it as a broken link (#4013) 2024-06-27 12:04:15 +02:00
Fred Tingaud
81b87b7b36
Modify rule S2807: Add a longer explanation of the hidden friend pattern 2024-06-27 11:31:01 +02:00
Peter Trifanov
629afcca90
Modify rule S6864: Add examples for LimitRange (#4002) 2024-06-26 15:39:19 +00:00
leonardo-pilastri-sonarsource
bb109c9a31
Modify rule S6909: Fix errors in code examples (#4008) 2024-06-26 12:18:18 +02:00
Jamie Anderson
bed74da521
Create specialized single-language rules (#3996) 2024-06-26 09:52:29 +01:00
tomverin
1afa0580c4
BUILD-4733: update secrets to use vault instead of github (#4006) 2024-06-26 09:02:57 +02:00
Hendrik Buchwald
9b486fd862
Modify rule S5334: Add JSP example (#3773) 2024-06-24 16:51:51 +02:00
Antonio Aversa
5bff87abb4
Modify rule S1479: allow statements with single-line clauses only (#3970)
* Modify rule S1479: allow statements with single-line clauses only

* Improve compliant example

* Improve description to match implementation

* Address comments

---------

Co-authored-by: Sebastien Marichal <sebastien.marichal@sonarsource.com>
2024-06-24 15:00:14 +02:00
SonarTech
22edb27f8d update coverage information 2024-06-21 02:29:59 +00:00
Irina Batinic
0dd59d889a
Modify rule S1135: Update rule scope to All (#4003) 2024-06-20 17:25:48 +02:00
SonarTech
7437d7c63f update coverage information 2024-06-20 02:29:53 +00:00
leonardo-pilastri-sonarsource
cc4f916e89
Update metadata using script, taking parent scope into account (#4000)
Co-authored-by: valentin.aebi <valentin.aebi@sonarsource.com>
2024-06-19 14:12:52 +02:00
Loïc Joly
c6e5b8ba59
Modify rule S2259: Correct the impact 2024-06-19 12:45:12 +02:00
SonarTech
ec2ce29386 update coverage information 2024-06-19 02:30:30 +00:00
Cristian
45b84689ad
Update dead link (#3999) 2024-06-18 14:48:54 +02:00
Marco Borgeaud
3b54c6ea30
Modify rules S1236,S3490: Remove reference to deprecated S4963 (#3998) 2024-06-18 11:55:22 +02:00
SonarTech
7210a9e34f update coverage information 2024-06-18 02:30:23 +00:00
Fred Tingaud
9e18e895bc
Modify rule S3624: fix error in documentation visibility 2024-06-14 11:54:53 +02:00
Marco Borgeaud
9ba40b9a47
Modify rule S3624: fix rendering and capitalization (#3994) 2024-06-13 13:35:59 +00:00
Zsolt Kolbay
3b36897ed7
Update S1144: Add exception for DynamicallyAccessedMembersAttribute (#3992) 2024-06-13 14:46:04 +02:00
Fred Tingaud
834d5a0579
Modify rule S4963 (CPP-5113)
* Update deprecated rule reference
* Remove metadata from deprecated rule
2024-06-13 12:22:54 +00:00
Fred Tingaud
43f5ea875a
Modify Rule S3624 description and deprecate S4963 (CPP-5113) 2024-06-13 10:07:38 +00:00
Hendrik Buchwald
e5c64bafa8
Modify rule S5334: Add Spring example (#3764) 2024-06-13 08:23:38 +02:00
Mary Georgiou
da39ab4903
Modify rule S4201: Update rule title (#3957) 2024-06-12 11:00:41 +02:00
SonarTech
1bf8f18139 update coverage information 2024-06-12 02:30:43 +00:00
Sebastien Marichal
f1e00031d1
Modify S1871: Improve codes examples (#3989) 2024-06-11 15:20:23 +00:00
Johann Beleites
e2c4c4b8fe
RULEAPI-770 Fix bug due to multiple sonarpedia.json files (#3983)
When there are multiple sonarpedia.json files for the same language, the rules
picked up for the next sonarpedia.json file will override the ones picked up
previously. With this fix, the rules are not overwritten but all are collected,
so one repository can have multiple sonarpedia.json files for the same language.
2024-06-11 12:15:51 +02:00
Karim El Ouerghemmi
665476af86
Modify rule S5769: Remove dead link (#3987) 2024-06-11 11:07:12 +02:00
Sebastien Andrivet
daf0320d42
Fix link (#3986) 2024-06-11 09:28:41 +02:00
Pavel Mikula
c871969325
S1694: Promote C# to SonarWay and remove protected constructor (#3960) 2024-06-10 15:32:12 +02:00
tomasz-kaminski-sonarsource
d11ae7bdd1
CPP-5375 S6459 Add exception for std::convertible_to concept 2024-06-07 08:23:42 +02:00
Costin Zaharia
75e4db7871
S6608: Update benchmarks code sample and results (#3980) 2024-06-06 16:54:22 +02:00
tomasz-kaminski-sonarsource
0e09fb74a2
CPP-5374 S1709 Introduce exception for "std::initializer_list" constructor 2024-06-06 15:43:45 +02:00
tomasz-kaminski-sonarsource
01b801de64
CPP-5126 S3630 Add exceptions and updated description 2024-06-06 08:39:31 +02:00
SonarTech
5dffc88ab6 update coverage information 2024-06-06 02:30:02 +00:00
David Kunzmann
ca6130bd92
Modify rule S6711: Corrected impacts (#3974) 2024-06-05 16:22:01 +02:00
Yassin Kammoun
a5c028ada6
Modify rule S5122: Update code snippets about user-controlled origin (#3963) 2024-06-05 11:22:12 +02:00
Costin Zaharia
70bdb31f51
Logging rules: add "how to fix" section (#3969)
* S6674: add how to fix section

* S6677: add how to fix section

* S2629: add how to fix section

* S6670: add how to fix section

* S1312: add how to fix section

* S6672: add how to fix section

* S6670: add compliant/noncompliant headers

* S6669: add how to fix section

* S6668: add how to fix section

* S2629: remove method definition

* S6669: update formatting

* S6670: add links

* Fix formatting
2024-06-05 10:39:56 +02:00
Loïc Joly
098ef7e52b
Modify rule S960 Make an exception for code location macros and # and ## operators (CPP-5112) 2024-06-04 22:57:24 +00:00
Antonio Aversa
2b7feafa17
Modify rule S2094: add exception for classes ending with Query (#3964) 2024-06-04 17:27:47 +02:00
Ghislain Piot
7a9924ef23
Modify rule S6974: fix grammar (#3967) 2024-06-04 16:25:00 +02:00
tomasz-kaminski-sonarsource
5658c142d1
CPP-4070 S2807 Make rule SonarWay and enforce hidden friends and cover free func operators 2024-06-04 11:53:07 +00:00
Yassin Kammoun
08b71e737e
Modify rule S5254: Remove dead link (#3962) 2024-06-04 12:18:07 +02:00
Marco Borgeaud
8c2eb7d3b2
Modify rule S1699: Improve rule description for CPP-5114 (#3949) 2024-06-04 09:55:53 +02:00
SonarTech
32e5481ab7 update coverage information 2024-06-01 02:31:11 +00:00
Loïc Joly
4f26fad189
Modify rule S1265: Add support for sized delete (M23_358) and globally improve the rule (CPP-5138 CPP-1313 ) 2024-05-31 23:44:01 +00:00
Costin Zaharia
8da8a3ea84
Fix typo and insert space in nocompliant comments (#3952) 2024-05-31 17:08:01 +02:00
Mary Georgiou
dad239b488
Modify rule S6966: Remove asp.net tag #3951 2024-05-31 16:14:50 +02:00
Mary Georgiou
1fd5a4a753
Modify rules S6962, S6966: Add asp.net tag (#3950) 2024-05-31 15:18:15 +02:00
github-actions[bot]
dbdea71699
Create rule S6932: Use model binding instead of reading raw request data (#3668) 2024-05-31 10:06:32 +02:00
Antonio Aversa
f81cf313aa
Modify rule S6946: change CCT attribute (#3947) 2024-05-30 15:02:28 +02:00
Mary Georgiou
dfe6de9121
Modify rule S6964: Add more entries to the exceptions (#3948) 2024-05-30 14:41:43 +02:00
Antonio Aversa
5210f2cd7a
Modify rule S6945: fix typo in title (#3940) 2024-05-30 11:16:35 +02:00
SonarTech
8a73d26930 update coverage information 2024-05-30 02:29:40 +00:00
github-actions[bot]
9e7f366fa5
Create rule S4347: Secure random number generators must not output predictable values (#3837)
* Add csharp to rule S4347

* Add C# content for BouncyCastle

* Use a better seed source.

* Update highlighting and message

* Change documentation URLs to be specific per language

---------

Co-authored-by: jamie-anderson-sonarsource <jamie-anderson-sonarsource@users.noreply.github.com>
Co-authored-by: Jamie Anderson <jamie.anderson@sonarsource.com>
Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
Co-authored-by: Gregory Paidis <115458417+gregory-paidis-sonarsource@users.noreply.github.com>
2024-05-29 17:47:42 +02:00
Martin Strecker
7f8087a4cf
Remove VB deprecation (#3945) 2024-05-29 17:04:29 +02:00
Loïc Joly
71ebff529f
Modify rule S3539: Make the rule accept redundant specifiers when one is for functions, the other for variables (CPP-5221) 2024-05-29 07:13:34 +00:00
Arseniy Zaostrovnykh
d1e98e9eb9
Modify Rule S4423[cfamily]: add nullptr check for libcurl examples
Co-authored-by: Arseniy Zaostrovnykh <necto.ne@gmail.com>
2024-05-28 14:46:07 +02:00
SonarTech
bd355a1e03 update coverage information 2024-05-28 02:29:45 +00:00
Mary Georgiou
3b522aab06
Modify rule S6964: Update message and description (#3942) 2024-05-27 15:46:17 +02:00
Rudy Regazzoni
ab4c36fbdc
Update S6273: Re-organize and simplify description (#3943)
* Update S6273: Re-organize and simplify description

* Remove redundant sentance from summary

* switch sentance place

* Address review comment

* Put regex in code block
2024-05-27 11:23:16 +02:00
Hendrik Buchwald
7485ba66d3
Deprecate rule S6869 (#3944) 2024-05-27 11:18:33 +02:00
SonarTech
ceb221be85 update coverage information 2024-05-25 02:28:29 +00:00
Sebastien Marichal
0ef2f90ef5
Modify S2221: Improve compliant example (#3946) 2024-05-24 11:02:24 +02:00
SonarTech
e98c6d6b3f update coverage information 2024-05-24 02:29:09 +00:00
Marco Borgeaud
fbcc8c7056
Modify rule S5500: mention std::ranges::move and rewrite RSPEC (CPP-5219) (#3933) 2024-05-23 14:52:12 +02:00
Egon Okerman
da58171bf4
Modify rule S4423: Add "How to fix" sections for all Azure resources (APPSEC-383) (#2676)
Co-authored-by: sebastien-andrivet-sonarsource <138577785+sebastien-andrivet-sonarsource@users.noreply.github.com>
Co-authored-by: Peter Trifanov <peter.trifanov@sonarsource.com>
2024-05-22 16:35:51 +02:00
Marco Borgeaud
a8089d8b96
Modify rule S5421: CPP-5205 Update RSPEC and add exception for volatile (#3938) 2024-05-22 15:31:56 +02:00
Peter Trifanov
c3f76e477f
Modify rule S6330: Default Queue encryption is now SSE-SQS (#3941)
Co-authored-by: sebastien-andrivet-sonarsource <sebastien.andrivet@sonarsource.com>
2024-05-22 14:42:32 +02:00
Sebastien Andrivet
078287d9ad
Modify rule S4423: Remove instructions that are not relevant for API Gateway V2 (#2520) 2024-05-21 14:03:34 +02:00
Gregory Paidis
3f9e28f94b
S5344: Fix 2**12 -> 2^12 (#3937) 2024-05-17 08:53:13 +00:00
SonarTech
ef3182fb7c update coverage information 2024-05-17 02:28:49 +00:00
Gregory Paidis
933189cd8e
Minor cleanup/refactoring on S5344 for C# and Python (#3936)
* Fix S5344 numbers 100 000 -> 100,000

* Refactor the message for SCrypt.Generate on C#

* Review 1

* Review 1
2024-05-16 14:03:24 +00:00
github-actions[bot]
f616902d5f
Create rule S5344(xml): Web.Config, LayC-compliant (#3710)
* Add xml to rule S5344

* Add the text

* Apply suggestions from code review

Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>

* Apply suggestions from code review

* Apply suggestions from code review

---------

Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com>
Co-authored-by: Loris S <91723853+loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
2024-05-16 15:32:43 +02:00
Ghislain Piot
45e484e68d
Modify rule S6974: Don't reference an unimplemented rule (#3935) 2024-05-16 09:52:51 +00:00
Gregory Paidis
cdf9fcb632
Fix typo in S5344 (#3931) 2024-05-16 11:08:15 +02:00
Renaud T
8fb483c726
Modify rule S1871: remove RPG exceptions (#3934) 2024-05-16 09:49:16 +02:00
SonarTech
9264aca9ed update coverage information 2024-05-16 02:28:49 +00:00
Karim El Ouerghemmi
32b7982d41
Modify rule S104, S138, S1151, S1752, S1753: Adapt titles and messages (#3932) 2024-05-15 19:59:11 +02:00
Costin Zaharia
bd5a06a98b
Rule S6781: Remove redundant code from net-core snippet (#3930)
* Rule S6781: Remove redundant code from net-core snippet

* Add back comment

---------

Co-authored-by: Gregory Paidis <115458417+gregory-paidis-sonarsource@users.noreply.github.com>
2024-05-15 17:26:45 +02:00
Irina Batinic
19a216c36e
Modify rule S2226: Remove broken link (#3929) 2024-05-15 15:37:34 +02:00
Fred Tingaud
50b4d12a75
Forbid adding direct links to rules.sonarsource.com 2024-05-15 15:10:41 +02:00
github-actions[bot]
14fd3e16ba
Create rule S6946: Incompatible parameters should not be used (#3747) 2024-05-15 10:54:09 +02:00
SonarTech
b4ce142059 update coverage information 2024-05-14 02:28:42 +00:00
SonarTech
41cf7b99fb update coverage information 2024-05-11 02:28:00 +00:00
tomasz-kaminski-sonarsource
b3d9e803f9
CPP-5096 S1236 Explain covered cases and exception 2024-05-10 16:45:23 +02:00
Mary Georgiou
50ea36f918
Modify rule S5786: Fix rule link 2024-05-10 09:36:58 +02:00
Martin Strecker
b81aff2c5c
Modify rule S6962: Fix rule link (#3926) 2024-05-10 09:26:36 +02:00
github-actions[bot]
103880b09c
Modify rule S3923: add language JCL (#3731) 2024-05-08 17:19:51 +02:00
github-actions[bot]
ca85e930b9
Create rule S6971 : Transformers should not be accessed directly when a Scikit-Learn Pipeline uses caching (#3876) 2024-05-08 15:56:32 +02:00
github-actions[bot]
e46041cdcd
Create rule S6977: RLSE should be used in SPACE directive (#3922)
---------

Co-authored-by: antonioaversa <antonioaversa@users.noreply.github.com>
Co-authored-by: Antonio Aversa <antonio.aversa@sonarsource.com>
Co-authored-by: Gyula Sallai <gyula.sallai@sonarsource.com>
2024-05-08 14:48:15 +02:00
github-actions[bot]
6179dde9d5
Create rule S6969 : "memory" parameter should be specified for Scikit-Learn Pipeline (#3868) 2024-05-08 13:50:39 +02:00
Ilia Kebets
b924af5a65
Modify rule S3358 for JS: clarify exception (#3924) 2024-05-08 09:32:03 +02:00
github-actions[bot]
57144cbf64
Create rule S6973: Specify important hyperparameters when instantiating a Scikit-learn estimator (#3888) 2024-05-07 15:36:56 +02:00
github-actions[bot]
2ad4854daf
Create rule S6974: Subclasses of Scikit-Learn's "BaseEstimator" should not set attributes ending with "_" in the "__init__" method (#3891) 2024-05-07 14:28:36 +02:00
David Kunzmann
86d6b7c75b
Modify rule S6709: Add how to fix it for Scikit-learn (#3883) 2024-05-07 14:21:34 +02:00
github-actions[bot]
621b7ce90e
Create rule S6972: Nested estimator parameters adjustment in a Pipeline should refer to valid parameters (#3884) 2024-05-07 14:14:10 +02:00
Sebastien Marichal
855bb4ce44
Modify S2365: Fix code examples (#3923) 2024-05-07 12:27:01 +02:00
SonarTech
c47139af05 update coverage information 2024-05-07 02:29:59 +00:00
Jamie Anderson
9ee16daa47
Modify rules: Add STIG AS&D 2023-06-08 mappings (#3914)
* Update JSON schema to include STIG ASD 2023-06-08 mapping

* Update rules to add STIG metadata mappings

---------

Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com>
2024-05-06 08:56:31 +02:00
SonarTech
9f471b6739 update coverage information 2024-05-04 02:27:40 +00:00
Sebastien Marichal
c00b00cf3f
SONARPLSQL-842 Fix encoding issue (#3921) 2024-05-03 18:07:03 +02:00
Mary Georgiou
ed5d1e09f8
Modify S6960: Fix typo (#3920) 2024-05-03 15:27:38 +02:00
github-actions[bot]
4ec4bb3f9d
Create rule S6966: Awaitable method should be used (#3854) 2024-05-03 13:55:11 +02:00
github-actions[bot]
21225209cd
Create rule S6968: Actions that return a value should be annotated with ProducesResponseTypeAttribute containing the return type (#3865)
* Create rule S6968

* First implementation

* Review 1

* Review 2

---------

Co-authored-by: gregory-paidis-sonarsource <gregory-paidis-sonarsource@users.noreply.github.com>
Co-authored-by: Gregory Paidis <gregory.paidis@sonarsource.com>
2024-05-03 07:58:26 +00:00
github-actions[bot]
1cc1063f89
Create rule S6964: The value type properties of a model class should be nullable or marked as "Required" to avoid under-posting. (#3850) 2024-05-03 09:32:59 +02:00
github-actions[bot]
af37eec4ac
Create rule S6967: ModelState.IsValid should be called in controller actions (#3856) 2024-05-03 09:31:51 +02:00
github-actions[bot]
e6453d5e7b
Create rule S6965: You should use HttpAttribute in API controller actions (#3851) 2024-05-03 09:23:46 +02:00
github-actions[bot]
0c27b86a7a
Create rule S6960: Controllers should not have too many responsibilities (#3845) 2024-05-03 09:16:59 +02:00
SonarTech
68a8c98bf0 update coverage information 2024-05-03 02:28:58 +00:00
SonarTech
647bc38264 update coverage information 2024-05-01 02:29:16 +00:00
SonarTech
67fe3807d0 update coverage information 2024-04-30 02:27:54 +00:00
SonarTech
c19c19562c update coverage information 2024-04-25 02:29:04 +00:00
github-actions[bot]
a446adc1e1
Create rule S6962: You should pool HTTP connections with HttpClientFactory (#3847) 2024-04-24 14:12:29 +02:00
Mary Georgiou
0dc667373d
Deprecate S6803 (#3910) 2024-04-24 13:37:29 +02:00
Pavel Mikula
ae5e8db3d4
Close S2353 (#3902) 2024-04-24 10:13:58 +02:00
Victor
8f18cbd013
Fix S5822: wrong escaping (#3906)
* Fix S6822: Missing resources

* Fix S5822: wrong escaping

* Fix
2024-04-23 14:49:53 +02:00
Victor
53df9ce0f6
Fix S4784: Wrong escaping (#3907) 2024-04-23 14:49:40 +02:00
Victor
ff00ed21c4
Fix S6822: Missing resources (#3905) 2024-04-23 14:21:01 +02:00
Victor
6f40329a15
Fix S3402: Wrong escaping (#3908) 2024-04-23 14:20:10 +02:00
Victor
73d7ae7f25
Fix S2699: Fix list format (#3909) 2024-04-23 14:19:49 +02:00
Victor
ed43d82a2b
Fix S5254: Wrong RSPEC on metadata.json (#3904) 2024-04-23 14:19:38 +02:00
gaetan-ferry-sonarsource
ab6bf73b3f
Modify rule S5496: Add an how to fix session for Java and Groovy (APPSEC-1587) (#3900) 2024-04-23 14:15:29 +02:00
Marcin Stachniuk
def7b6c0ee
SONARIAC-1429 S1192: String literals should be raised less often (#3903)
* SONARIAC-1429 S1192: String literals should be raised less often

* Code review remarks

Co-authored-by: Peter Trifanov <peter.trifanov@sonarsource.com>

---------

Co-authored-by: Peter Trifanov <peter.trifanov@sonarsource.com>
2024-04-23 11:00:18 +02:00
Pavel Mikula
399f313abf
S2951: Rename (#3901) 2024-04-23 08:40:33 +02:00
SonarTech
e4ed970491 update coverage information 2024-04-23 02:28:21 +00:00
SonarTech
f11b756dc4 update coverage information 2024-04-20 02:27:06 +00:00
Victor
9ab2702f26
Modify rule S1093: Add <menu> as allowed parent element for <li> (#3890)
* Modify rule S1093: Add `<menu>` as allowed parent element for `<li>`

* Add compliant example
2024-04-19 17:09:53 +02:00
Marco Kaufmann
4f43403029
Modify rule S3740: added examples and explanation about "cast", "instanceof" and wildcards (#3899) 2024-04-19 13:51:27 +02:00
github-actions[bot]
fb5ed78cc6
Create rule S5260 (#3887)
* Add javascript to rule S5260

* JS-6 Add rspec for S5260

---------

Co-authored-by: zglicz <zglicz@users.noreply.github.com>
Co-authored-by: Michal Zgliczynski <michal.zgliczynski@sonarsource.com>
2024-04-19 11:12:27 +02:00
Victor
71474b3b21
Rename rule S6855 to S4084 (#3895) 2024-04-19 09:41:26 +02:00
Victor
210c908a01
Rename rule S6854 to S1090 (#3894) 2024-04-19 09:41:14 +02:00
Victor
b759f8b026
Rename rule S6849 to S5254 (#3896) 2024-04-19 09:41:00 +02:00
github-actions[bot]
b91030a2d1
Create rule S6961: API Controllers should derive from ControllerBase instead of Controller (#3846) 2024-04-19 08:59:27 +02:00
SonarTech
e752503a97 update coverage information 2024-04-19 02:28:15 +00:00
github-actions[bot]
848e7c2048
Create rule S6975 (#3892)
* Create rule S6975

* SONARIAC-1424 Split S6956 RSPEC into 2 rules

* Code review remarks

---------

Co-authored-by: mstachniuk <mstachniuk@users.noreply.github.com>
Co-authored-by: Marcin Stachniuk <marcin.stachniuk@sonarsource.com>
2024-04-18 16:58:16 +02:00
gaetan-ferry-sonarsource
173a43b3dd
Modify rule S5147: Adding a how to fix section for Spring Data Redis (APPSEC-1565) (#3870) 2024-04-18 14:09:08 +00:00
github-actions[bot]
846d6c7568
Create rule S5496: Server-side templates should not be vulnerable to injection attacks (#3861)
* Add java to rule S5496

* Add S5496 for Java

* Adjustments based on review

* Fix to make asciidoc tests pass

---------

Co-authored-by: daniel-teuchert-sonarsource <daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: Daniel Teuchert <daniel.teuchert@sonarsource.com>
Co-authored-by: daniel-teuchert-sonarsource <141642369+daniel-teuchert-sonarsource@users.noreply.github.com>
2024-04-18 15:26:08 +02:00
Ghislain Piot
2a35b19260
Modify rule S935: fix typo (#3893) 2024-04-18 13:24:22 +00:00
github-actions[bot]
b64b26b71a
Create rule S5256 (#3886)
* Add javascript to rule S5256

* [JS-3] Add Rspec

---------

Co-authored-by: zglicz <zglicz@users.noreply.github.com>
Co-authored-by: Michal Zgliczynski <michal.zgliczynski@sonarsource.com>
2024-04-18 11:38:03 +02:00
SonarTech
5324878eed update coverage information 2024-04-18 02:27:59 +00:00
github-actions[bot]
2e71406bdc
Create rule S5264 (#3889)
* Add javascript to rule S5264

* Add rule S5264 to JS

---------

Co-authored-by: vdiez <vdiez@users.noreply.github.com>
Co-authored-by: Victor <victor.diez@sonarsource.com>
2024-04-17 15:24:34 +02:00
SonarTech
491634b8e4 update coverage information 2024-04-17 02:27:56 +00:00
Eric Morand
9e171fa100
Add S1082 HTML variant to the "Sonar way" profile (#3881) 2024-04-16 16:44:24 +02:00
Eric Morand
d906701736
Mark S1086 HTML variant as deprecated (#3879)
As required by SONARHTML-234
2024-04-16 16:43:49 +02:00
Eric Morand
a42c984138
Mark S1089 HTML variant as deprecated (#3878)
As required by SONARHTML-233
2024-04-16 16:10:23 +02:00
Eric Morand
a04035d924
Mark S1091 HTML variant as deprecated (#3880)
As required by SONARHTML-235
2024-04-16 15:54:37 +02:00
github-actions[bot]
0e7442f08f
Create rule S5257 (#3882)
* Add javascript to rule S5257

* Add S5257 to JS

* add react tag

---------

Co-authored-by: vdiez <vdiez@users.noreply.github.com>
Co-authored-by: Victor <victor.diez@sonarsource.com>
2024-04-16 15:54:20 +02:00
Eric Morand
3f8b524a39
Resolve SONARHTML-232 (Deprecate S1092) (#3877) 2024-04-16 15:28:17 +02:00
Eric Morand
32d21525d3
Resolve SONARHTML-231 - Deprecate S1085:html (#3874)
* Resolve SONARHTML-231

* Remove the rule from SonarWay profile
2024-04-15 16:57:10 +02:00
Marcin Stachniuk
cffa338ea2
SONARIAC-1381 S6956 improve description (#3875)
* SONARIAC-1381 S6956 improve description

* Code review remarks

Co-authored-by: Jonas Wielage <jonas.wielage@sonarsource.com>

---------

Co-authored-by: Jonas Wielage <jonas.wielage@sonarsource.com>
2024-04-15 16:56:41 +02:00
Nils Werner
7e0731106a
Modify rule S6437: Fix JSON code examples (#3873) 2024-04-15 15:29:42 +02:00
Tim Pohlmann
2f851ec442
Modify rule S2094: Add an exception (#3867) 2024-04-15 10:51:00 +02:00
Nils Werner
a603a39cd8
Modify rule S1192: Add exception for ARM (#3871) 2024-04-15 08:42:09 +00:00
Tim Pohlmann
eda6b67051
Modify rule S1104: Add exception for [Serializable] (#3539) 2024-04-15 07:32:55 +00:00
SonarTech
d355964194 update coverage information 2024-04-13 02:23:11 +00:00
github-actions[bot]
ac24b76b0f
Create rule S6899 (#3589) 2024-04-12 16:03:12 +02:00
github-actions[bot]
473c6826ad
Create rule S6819 (#3866)
* Add html to rule S6819

* Add rule S6819 for html

* add noncompliant comments

---------

Co-authored-by: vdiez <vdiez@users.noreply.github.com>
Co-authored-by: Victor <victor.diez@sonarsource.com>
2024-04-12 11:18:00 +02:00
github-actions[bot]
4250db6bfc
Create rule S6824: Add the rule implementation for html (#3852)
* Add html to rule S6824

* Update PR with shared message

---------

Co-authored-by: zglicz <zglicz@users.noreply.github.com>
Co-authored-by: Michal Zgliczynski <michal.zgliczynski@sonarsource.com>
2024-04-12 09:52:52 +02:00
SonarTech
f1aee8c33c update coverage information 2024-04-12 02:28:07 +00:00
github-actions[bot]
6ab887f6fb
Create rule S6886 (#3572)
* Create rule S6886

* Specify rule

* CR fixes

* CR fixes

* Modify rule classification and impacts

* Invert two words

---------

Co-authored-by: maksim-grebeniuk-sonarsource <maksim-grebeniuk-sonarsource@users.noreply.github.com>
Co-authored-by: Maksim Grebeniuk <maksim.grebeniuk@sonarsource.com>
Co-authored-by: Ghislain Piot <ghislain.piot@sonarsource.com>
2024-04-11 17:54:23 +02:00
github-actions[bot]
3c5fedce9e
Create rule S6811 (#3858)
* Add html to rule S6811

* add html to rule S6811

---------

Co-authored-by: vdiez <vdiez@users.noreply.github.com>
Co-authored-by: Victor <victor.diez@sonarsource.com>
2024-04-11 09:30:19 +00:00
github-actions[bot]
289d34d78c
Create rule S6821: Implement rule in html (#3855)
* Add html to rule S6821

* Update with html rspec

* Share rationale

* Address comments

* Comments

---------

Co-authored-by: zglicz <zglicz@users.noreply.github.com>
Co-authored-by: Michal Zgliczynski <michal.zgliczynski@sonarsource.com>
Co-authored-by: Victor <victor.diez@sonarsource.com>
2024-04-11 09:27:08 +02:00
SonarTech
582885b7c4 update coverage information 2024-04-11 02:28:18 +00:00
Martin Strecker
4d43f1038e
Deprecate VB for S6931 (#3864) 2024-04-10 16:48:19 +02:00
github-actions[bot]
59117e1524
Add HTML to rule S6807 (#3863)
* Add html to rule S6807

* Add S6807 HTML variant

Also restructure the resources to make the documentation modular.

* Fix the file structure to match the standard

---------

Co-authored-by: ericmorand-sonarsource <ericmorand-sonarsource@users.noreply.github.com>
Co-authored-by: Eric MORAND <eric.morand@sonarsource.com>
2024-04-10 15:04:21 +02:00
Johann Beleites
349c456231
Modify rules S6830, S1452: Update dead links (#3862) 2024-04-10 14:01:51 +02:00
Arseniy Zaostrovnykh
e1e31dcb07
Document local deployment of the search page
The existing README.md file was just a template created in the very beginning of the GitHub RSpec project. It is severely outdated. I've recovered the proper deployment sequence.
2024-04-10 07:21:47 +00:00
Marcin Stachniuk
10b4c2cec6
Fix Azure Resource Manager rules coverage (#3853)
* Fix Azure Resource Manager rules coverage

* Fix Azure Resource Manager rules coverage
2024-04-10 08:50:17 +02:00
github-actions[bot]
18811ba352
Create rule S6822 (#3859)
* Add html to rule S6822

* Add relevant adoc

---------

Co-authored-by: zglicz <zglicz@users.noreply.github.com>
Co-authored-by: Michal Zgliczynski <michal.zgliczynski@sonarsource.com>
2024-04-09 16:08:29 +02:00
Ilia Kebets
d4d9b7e150
Modify rule S2699: add support for supertest (#3830) 2024-04-08 14:54:17 +02:00
Egon Okerman
25977fe737
Fix compliant message (#3848) 2024-04-05 16:14:36 +00:00
github-actions[bot]
2b30d4d2bf
Create rule S6929: The axis argument should be specified when using TensorFlow's reduction operations (#3644)
* Create rule S6929

* Create rule S6929: The axis argument should be specified when using TensorFlow's reduction operations

* Fix after review

---------

Co-authored-by: joke1196 <joke1196@users.noreply.github.com>
Co-authored-by: David Kunzmann <david.kunzmann@sonarsource.com>
2024-04-04 15:17:07 +00:00
github-actions[bot]
c6d7ba2fa6
Create rule S6830: Bean names should adhere to the naming conventions (#3351)
Co-authored-by: johann-beleites-sonarsource <johann-beleites-sonarsource@users.noreply.github.com>
Co-authored-by: Johann Beleites <johann.beleites@sonarsource.com>
Co-authored-by: Johann Beleites <sdefend_9jftz8pq@esnail.de>
2024-04-04 15:20:57 +02:00
github-actions[bot]
5f72418577
Create rule S6781: JWT secret keys should not be disclosed (#3838)
* Add csharp to rule S6781

* Update RSPEC for .NET

* Address review comments

* Apply suggestions from code review

* Apply suggestions from code review

---------

Co-authored-by: sebastien-andrivet-sonarsource <sebastien-andrivet-sonarsource@users.noreply.github.com>
Co-authored-by: sebastien-andrivet-sonarsource <sebastien.andrivet@sonarsource.com>
Co-authored-by: Jamie Anderson <jamie.anderson@sonarsource.com>
Co-authored-by: Loris S <91723853+loris-s-sonarsource@users.noreply.github.com>
2024-04-03 17:33:30 +01:00
gaetan-ferry-sonarsource
394d19b554
Modify rule S5344: Set 100k as PBKDF reco & update highlights (APPSEC-1631) (#3843) 2024-04-03 12:28:20 +00:00
Jonathan Vila
27071d39e7
Modify rules S6906: remove "native" from title (#3844) 2024-04-03 08:05:32 +00:00
Jonathan Vila
979849e347
Modify rules S6878,S6913,S6915: add tag java21 (#3842) 2024-04-02 19:20:04 +02:00
Massimo Paladin
9c91450191
Update CODEOWNERS (#3841) 2024-04-02 16:47:14 +02:00
Jonas Wielage
d9d70ceb6f
Deprecate rule S6339 (#3840) 2024-04-02 10:51:13 +02:00
github-actions[bot]
762a21bfa7
Create rule S5344: Passwords should not be stored in plain-text or with a fast hashing algorithm (APPSEC-1631) (#3839) 2024-04-02 09:43:24 +02:00
github-actions[bot]
ec43c826fa
Create rule S6377: XML signatures should be validated securely (APPSEC-1649) (#3814) 2024-04-02 09:40:01 +02:00
SonarTech
0abb823651 update coverage information 2024-03-30 02:25:54 +00:00
Jamie Anderson
373d9537ed
Modify rule S4347: Change rule to be programming language agnostic (#3836)
* Modify rule S4347: Change rule to be programming language agnostic
* Change 'random generator' to 'random number generator'
* Adjust wording following review
2024-03-29 17:40:04 +00:00
Loïc Joly
35115fa7ba
Make sure a label is added to each PR 2024-03-29 10:47:44 +01:00
leonardo-pilastri-sonarsource
a564c1b500
Update quickfix status for Java rules (#3835) 2024-03-28 16:09:04 +01:00
Pierre-Loup
db048f1bf5
Deprecate rule S6497 (#3832) 2024-03-28 15:21:20 +01:00
github-actions[bot]
79601bae6a
Create rule S6816: Nullable injected fields and parameters should provide a default value (#3252) 2024-03-28 15:00:30 +01:00
Arseniy Zaostrovnykh
a4126cc80c
Avoid hitting "Next" downtime by postponing the job later in the night
The frontend SQ analysis frequently fails during the night likely because
it runs soon after SQ is redeployed. Move the update_coverage job 2h
later to avoid that.
2024-03-28 13:41:59 +00:00
Loris S
33d2e6dbc8
Modify S2076(python): Improve code samples (#3833)
* Modify S2076(python): Improve code samples

* Apply suggestions from code review
2024-03-28 14:13:13 +01:00
SonarTech
536480b8a1 update coverage information 2024-03-28 07:46:50 +00:00
Fred Tingaud
29a225484e
Modify rule S3470: Clarify that we allow std class specialization 2024-03-27 14:59:41 +00:00
Loris S
bfb697d3a1
Modify S5135(Python): Fix code samples (#3829)
* Modify S5135(Python): Fix code samples

* Update rules/S5135/python/how-to-fix-it/python.adoc
2024-03-27 15:57:47 +01:00
github-actions[bot]
c91455dc8f
Modify rule S3688: Add JCL (#3810)
---------

Co-authored-by: sallaigy <sallaigy@users.noreply.github.com>
Co-authored-by: Gyula Sallai <gyula.sallai@sonarsource.com>
Co-authored-by: Rudy Regazzoni <110470341+rudy-regazzoni-sonarsource@users.noreply.github.com>
2024-03-27 15:53:34 +01:00
Loïc Joly
5b3351fc1c
Modify rule S6495 Avoid "cout << format" and use std::print (CPP-5028) (#3825) 2024-03-27 15:47:33 +01:00
github-actions[bot]
1df4ed507a
Create rule S6958: Literals should not be used as functions (#3812) 2024-03-27 15:38:38 +01:00
Marco Borgeaud
ee3c65138d
Modify rule S5425: Update RSPEC to mention forward_like (CPP-5031) 2024-03-27 12:03:05 +01:00
Marco Borgeaud
b46c38154d
Modify rules S6185,S6484,S6494,S6495: RSPEC improvements (CPP-5056) (#3816) 2024-03-27 10:58:36 +00:00
github-actions[bot]
18f43c5f7f
Create rule S6959: "Array.reduce()" calls should include an initial value (#3818) 2024-03-27 11:51:11 +01:00
Marco Borgeaud
05d0bcc1e3
Modiful rules S5281,S2275: Mention the safer std::print alternative in the RSPEC (CPP-5027) (#3820) 2024-03-27 10:41:54 +00:00
Jonathan Vila
1472750a3e
Modify rule S5194: change specified Java version from 12 to 14 (#3827) 2024-03-27 10:09:06 +00:00
github-actions[bot]
d998d4019e
Create rule S6941: Names should not be too long (#3739)
* Create rule S6941

* Add jcl details

* adding more example

* format lists

* Address review comment

* Fix display

---------

Co-authored-by: rudy-regazzoni-sonarsource <rudy-regazzoni-sonarsource@users.noreply.github.com>
Co-authored-by: Rudy Regazzoni <110470341+rudy-regazzoni-sonarsource@users.noreply.github.com>
2024-03-27 10:28:03 +01:00
github-actions[bot]
72ec3279ba
Create rule S6957: Deprecated React APIs should not be used (#3811) 2024-03-27 09:56:39 +01:00
SonarTech
2cb23109fc update coverage information 2024-03-27 08:18:08 +00:00
daniel-teuchert-sonarsource
9a2a6c72b0
Revert "Adjust description to fit improved detection (#3786)" (#3822)
This reverts commit 49c5b1f46ba4fce5ec8abb94d5de241f8c195205.
2024-03-26 17:26:32 +01:00
daniel-teuchert-sonarsource
49c5b1f46b
Adjust description to fit improved detection (#3786) 2024-03-26 17:04:10 +01:00
github-actions[bot]
e20a3fdd3e
Create rule S6951: Track uses of forbidden data set names (#3787)
---------
Co-authored-by: sallaigy <sallaigy@users.noreply.github.com>
Co-authored-by: Gyula Sallai <gyula.sallai@sonarsource.com>
Co-authored-by: Rudy Regazzoni <110470341+rudy-regazzoni-sonarsource@users.noreply.github.com>
2024-03-26 16:50:12 +01:00
Yassin Kammoun
723e5b7053
Modify rule S6654: Fix a few typos (#3821) 2024-03-26 16:32:53 +01:00
github-actions[bot]
2ec613b03a
Modify rule S1186: add language JCL (#3726)
---------

Co-authored-by: rudy-regazzoni-sonarsource <rudy-regazzoni-sonarsource@users.noreply.github.com>
Co-authored-by: Rudy Regazzoni <110470341+rudy-regazzoni-sonarsource@users.noreply.github.com>
2024-03-26 16:23:19 +01:00
github-actions[bot]
6521c2385f
Create rule S6945: COND code should be used from certain step (#3744)
---------

Co-authored-by: sallaigy <sallaigy@users.noreply.github.com>
Co-authored-by: Gyula Sallai <gyula.sallai@sonarsource.com>
2024-03-26 16:01:21 +01:00
github-actions[bot]
37e0e44115
Create rule S6950: Track uses of forbidden statement parameters (#3784)
---------

Co-authored-by: sallaigy <sallaigy@users.noreply.github.com>
Co-authored-by: Gyula Sallai <gyula.sallai@sonarsource.com>
2024-03-26 15:39:33 +01:00
Philipp Dominik Schubert
1f2f087864
Modify rule S2589,S3516,S3626: Remove them from CFamily (CPP-5165) 2024-03-26 14:06:25 +00:00
Yassin Kammoun
0386eec454
Fix S3735 link (#3819) 2024-03-26 10:42:43 +00:00
Jamie Anderson
b6dd26c7a1
Deprecate rule S2647 (#3793) 2024-03-25 18:05:24 +00:00
Loris S
b031dd36b8
Modify S6432: Add conciseness and clear actionability to the message (#3805)
* Modify S6432: Add conciseness to the message

* Apply suggestions from code review

Co-authored-by: daniel-teuchert-sonarsource <141642369+daniel-teuchert-sonarsource@users.noreply.github.com>

---------

Co-authored-by: daniel-teuchert-sonarsource <141642369+daniel-teuchert-sonarsource@users.noreply.github.com>
2024-03-25 15:24:54 +01:00
Marco Borgeaud
e5c3ee3b14
Modify rule S6045: Use LaYC format and update description for C++23 (CPP-5024) (#3797) 2024-03-25 11:21:10 +01:00
SonarTech
1eaaa7d980 update coverage information 2024-03-23 00:33:04 +00:00
Loïc Joly
9608f67c32
Modify rule S6229 Add example with locale (CPP-5045)
- Add an example with a local locale
- Add links to documentation
- Correct a few typos
- I did not add an independent example using the global locale but added a comment
2024-03-22 18:00:53 +01:00
Loghin Vlad-Andrei
ceb93e2399
Modify rule S106: Add std::print to language standard outputs (CPP-5025) 2024-03-22 18:05:59 +02:00
leonardo-pilastri-sonarsource
9d8058a2cd
Modify rule S6876: fix wrong tag (#3809)
Co-authored-by: Leonardo Pilastri <yellowdogprod@gmail.com>
2024-03-22 17:00:35 +01:00
Zsolt Kolbay
f228a3879c
Update S1144: add exception to C# RSPEC (#3808) 2024-03-22 16:50:07 +01:00
github-actions[bot]
8aeb54ae5d
Create rule S6931: ASP.NET controller actions should not have a route template starting with "/" (#3666) 2024-03-22 16:31:43 +01:00
github-actions[bot]
71960b568a
Create rule S6934: A Route attribute should be added to the controller when a route template is specified at the action level (#3676) 2024-03-22 16:16:42 +01:00
github-actions[bot]
6798817826
Modify rule S6437: Credentials should not be hard-coded, add ARM (#3807) 2024-03-22 15:49:22 +01:00
Johann Beleites
ffaf4a051c
Modify rule S6881: SONARJAVA-4832 Modify description of S6881 to reflect reduced scope (#3780) 2024-03-22 15:43:04 +01:00
Marco Kaufmann
24c2f0e5a1
Modify rule S6906: Refined issue explanation + removed mentioning of native methods (#3779) 2024-03-22 15:40:24 +01:00
github-actions[bot]
d036b082d1
Create rule S6925 (#3634) 2024-03-22 15:03:17 +01:00
github-actions[bot]
ff7d018f38
Create rule S6954: Elements should not be empty or null (#3798) 2024-03-22 14:54:28 +01:00
github-actions[bot]
554f7db36c
Create rule S4507: Delivering code in production with debug features activated is security-sensitive, add ARM (#3802)
Co-authored-by: Peter Trifanov <peter.trifanov@sonarsource.com>
2024-03-22 13:10:41 +00:00
github-actions[bot]
c2b941e33c
Create rule S6956: The properties and elements inside a template should appear in the recommended order (#3801) 2024-03-22 11:29:12 +01:00
github-actions[bot]
ebe406bcae
Create rule S6955: Unused parameters should be removed (#3800) 2024-03-22 10:32:05 +01:00
github-actions[bot]
3591830b4b
Create rule S6953: Don't use allowedValues for a location parameter (#3796)
Co-authored-by: Peter Trifanov <peter.trifanov@sonarsource.com>
2024-03-22 08:49:38 +00:00
Marcin Stachniuk
cf24e2eb6d
Fix builds of frontend_tests & tooling_tests (#3803) 2024-03-22 09:36:54 +01:00
github-actions[bot]
d9e9720f88
Create rule S1192 String literals should not be duplicated, add ARM (#3789) 2024-03-22 09:33:45 +01:00
github-actions[bot]
f24a1fb8a2
Create rule S6928: Python side effects should not be used inside a "tf.function" (#3638) 2024-03-21 16:52:21 +01:00
Loris S
6197098897
Modify S6786(python): Improve description (#3792) 2024-03-21 14:43:07 +01:00
Loïc Joly
e7bcbd7691
Modify rule S1706: Mention std::expected as an alternative to exceptions (CPP-5054) (#3799) 2024-03-21 11:46:33 +01:00
github-actions[bot]
292676a7b0
Create rule S6874: Use a hard-coded value for the apiVersion (#3795) 2024-03-21 11:13:36 +01:00
github-actions[bot]
44581efe85
Create rule S6952: Don't use redundant dependencies between resources (#3788)
Co-authored-by: Peter Trifanov <peter.trifanov@sonarsource.com>
2024-03-21 09:53:36 +00:00
github-actions[bot]
86ef4faa5e
Create rule S6911: "tf.function" should not depend on global or free Python variables (#3611) 2024-03-21 09:12:26 +01:00
github-actions[bot]
0dfb981d0a
Create rule S1481: Unused local variables should be removed (#3790) 2024-03-21 08:55:12 +01:00
SonarTech
5cc4f345f1 update coverage information 2024-03-21 00:32:46 +00:00
github-actions[bot]
559448c03e
Create rule S6919 (#3620) 2024-03-20 16:23:32 +01:00
github-actions[bot]
15d9064b86
Create rule S6908: "tf.function" should not be recursive (#3607)
* Create rule S6908

* Create rule S6908: "tf.function" should not be recursive.

---------

Co-authored-by: joke1196 <joke1196@users.noreply.github.com>
Co-authored-by: David Kunzmann <david.kunzmann@sonarsource.com>
2024-03-20 16:12:11 +01:00
github-actions[bot]
9489f1c4a9
Create rule S6893: Use a constant value for the apiVersion (#3778) 2024-03-20 12:49:15 +01:00
github-actions[bot]
688ef12c01
Create rule S6949: Don't hardcode resource locations (#3783)
Co-authored-by: Peter Trifanov <peter.trifanov@sonarsource.com>
2024-03-20 11:34:42 +00:00
Gregory Paidis
68350b2879
Modify S2955 C#: Fix compliant solution (#3794)
* Modify S2955 C#: Fix compliant solution

* Review 1
2024-03-20 09:58:53 +00:00
Marco Borgeaud
d6584979a0
Modify rule S5205,S5213: Cover std::move_only_function (CPP-5047) (#3775)
Apply some general NFC improvements to S5213 and its companion rule
S5205. Apply LaYC format where relevant.

Remove link to C++ Core Guideline: it is mostly empty (no example) and
has an ambiguous point about std::function.
2024-03-20 09:26:31 +01:00
Loghin Vlad-Andrei
29c1837ae4
Modify rule S6494: Cover std::print interface family (CPP-5026)
* Modify rule S6494: Cover `std::print` interface family

* Asciidoc fix

* Links to cppref to mentioned families of functions

* Apply suggestions from code review

Co-authored-by: Marco Borgeaud <89914223+marco-antognini-sonarsource@users.noreply.github.com>

---------

Co-authored-by: Marco Borgeaud <89914223+marco-antognini-sonarsource@users.noreply.github.com>
2024-03-20 10:12:23 +02:00
github-actions[bot]
c0b70e0318
Create rule S117: Parameter and variable names should comply with a naming convention (#3782) 2024-03-19 16:54:37 +01:00
github-actions[bot]
02e886d7dd
Modify rule S1172: add language JCL (#3732)
* Add jcl to rule S1172

* Add rule description

---------

Co-authored-by: sallaigy <sallaigy@users.noreply.github.com>
Co-authored-by: Gyula Sallai <gyula.sallai@sonarsource.com>
2024-03-19 14:15:18 +01:00
Marco Kaufmann
b2d7a104ab
Modify rule S1068: Add parameter description (#3781) 2024-03-19 11:34:36 +01:00
Marco Borgeaud
b725e655ed
Modify rule S5500: Accept conditional move and C++23 new features (CPP-4621,CPP-4623) (#3762) 2024-03-19 07:09:37 +01:00
SonarTech
0c26298f8d update coverage information 2024-03-19 00:32:36 +00:00
github-actions[bot]
c5593190ce
Create rule S5344(python): Passwords should not be stored in plain-text or with a fast hashing algorithm (#3715) 2024-03-18 17:37:51 +01:00
github-actions[bot]
576a6152e0
Create rule S6377: XML signature should be verified securely (Python) (APPSEC-1588) (#3763) 2024-03-18 17:11:22 +01:00
Loghin Vlad-Andrei
260d4830b0
Modify rule S5566: Cover std::ranges::contains (CPP-5058)
* Edit specification to account for C++23 std::*::contains

* Addressed PR review

* Links to cppreference

* Apply suggestions from code review

Co-authored-by: Marco Borgeaud <89914223+marco-antognini-sonarsource@users.noreply.github.com>

---------

Co-authored-by: Marco Borgeaud <89914223+marco-antognini-sonarsource@users.noreply.github.com>
2024-03-18 17:50:43 +02:00
github-actions[bot]
afffac2329
Create rule S6947: Jobs should not have too many steps (#3757)
* Create rule S6947

* Add rule description

* Extend scope to procedure

* Hide implementation detail

---------

Co-authored-by: rudy-regazzoni-sonarsource <rudy-regazzoni-sonarsource@users.noreply.github.com>
Co-authored-by: Rudy Regazzoni <110470341+rudy-regazzoni-sonarsource@users.noreply.github.com>
2024-03-18 14:48:27 +01:00
Nils Werner
3dbbac4652
Modify rule S103: Remove from default profile for PHP (#3776) 2024-03-18 11:53:59 +01:00
gaetan-ferry-sonarsource
b39f6f5790
Modify rule S2053: Add better code examples and more how to fix sections (#3704) 2024-03-18 09:32:06 +01:00
SonarTech
f795d7d9d9 update coverage information 2024-03-16 00:33:06 +00:00
Jamie Anderson
23afb17784
Modify rule S5542: Change text for rule update (#3719) 2024-03-15 15:49:46 +00:00
Costin Zaharia
11db2b6549
Modify rule S3416: remove from SonarWay (#3774) 2024-03-15 16:17:40 +01:00
github-actions[bot]
fb584ec82a
Create rule S6918: "tf.Variable" objects should be singletons when created inside of a "tf.function" (#3619) 2024-03-15 16:06:59 +01:00
kevin.hinz
7bb601b5d7
Modify rule S2551: clarify example used in the description (#3713)
* Modify rule S2551: clarify example in description

* Modify rule S2551: improve word choice
2024-03-15 14:40:37 +01:00
kevin.hinz
fc68332d73
Modify rule S3927: Update rule description (#3712)
* Modify rule S3927: Update rule description

Changes suggested by the Docs Squad:
- use full word in place of short-hand text

* Update rule S3927: improve word choice

Co-authored-by: Tim Pohlmann <tim.pohlmann@sonarsource.com>

---------

Co-authored-by: Tim Pohlmann <tim.pohlmann@sonarsource.com>
2024-03-15 14:38:53 +01:00
Fred Tingaud
294be1e6df
Frontend: Display an icon next to the title if a rule has no default quality profile 2024-03-15 12:36:48 +01:00
Costin Zaharia
fbe0e1b7ff
C# Logging rules: add impact and attribute (#3766) 2024-03-15 11:52:16 +01:00
SonarTech
4fba47bc78 update coverage information 2024-03-15 00:33:07 +00:00
github-actions[bot]
e71053d356
Create rule S6675: Trace.WriteLineIf should not be used with TraceSwitch levels (#2575) 2024-03-14 17:56:25 +01:00
github-actions[bot]
5ca970e1ac
Create rule S6673: Log message template placeholders should be in the right order (#2563) 2024-03-14 17:45:06 +01:00
github-actions[bot]
fcafb3e6f0
Create rule S6670: Trace.Write and Trace.WriteLine should not be used (#2538) 2024-03-14 17:44:12 +01:00
github-actions[bot]
460fc9c64c
Create rule S6664: too many logging calls within a code block (#2494) 2024-03-14 15:53:27 +00:00
Irina Batinic
e858b2b862
Modify rule S6916: Update description to remove if case, because it is excluded from the implementation (#3758) 2024-03-14 14:41:39 +01:00
Antonio Aversa
951c7da4b7
Modify rule S3416: add C# and VB.NET (#2528)
* Modify rule S3416: add C# and VB.NET

* Add logging frameworks to the list of allowed frameworks

* Reverse adding logging frameworks

* Fix issues from adoc validation

* Review 1

* Fix tabbing

* Review 2

* Add list of supported frameworks

* Missed renames

* Add 'logging' tag

* Remove VB.NET

* Fix a minor typo

---------

Co-authored-by: Gregory Paidis <gregory.paidis@sonarsource.com>
Co-authored-by: Gregory Paidis <115458417+gregory-paidis-sonarsource@users.noreply.github.com>
2024-03-14 14:22:26 +01:00
guillem-bartina-sonarsource
3c1d615467
Modify rules S1871 and S3923: Update description in accordance with the new understanding (#3752)
* Update description of S3923

* Remove exception to the exception of S1871

* Fix typo

* Wording

* Wording

* Wording

* Resolve comments

* Resolve comments 2
2024-03-14 13:42:02 +01:00
leonardo-pilastri-sonarsource
0cbad92698
Modify rule S6878: Remove one exception (#3760) 2024-03-14 11:53:55 +01:00
github-actions[bot]
467a918de6
Create rule S6930: Backslash should be avoided in route templates (#3662) 2024-03-14 10:55:39 +01:00
github-actions[bot]
122087850e
Create rule S6936: Names of C standard library macros and functions should not be used as identifiers (split from S978) | Modify rule S978: remove parts covered by new rule (#3706)
* Create rule S6936

* first draft

* Wording

* modify old rule

* Fixes new rule

* Add related to new rule

* Refine examples and error message

* First batch of fixes

* Fix noncompliant example

* Remove MISRA C 2004 references + LaYC format

* Fixes

---------

Co-authored-by: guillem-bartina-sonarsource <guillem-bartina-sonarsource@users.noreply.github.com>
Co-authored-by: guillem-bartina-sonarsource <guillem.bartrina@sonarsource.com>
2024-03-14 10:46:09 +01:00
SonarTech
2b04a60e0e update coverage information 2024-03-14 00:33:00 +00:00
github-actions[bot]
efc6728641
Create rule S6938: Jobs number of steps should be below the hard limit of 255 (#3730)
* Create rule S6938

* Add rule description

* Only display Implementation spec on GitHub

* Update rules/S6938/jcl/rule.adoc

Co-authored-by: Rudy Regazzoni <110470341+rudy-regazzoni-sonarsource@users.noreply.github.com>

* Change to bug version and remove parameter

* Changing rule title

* Address review comments

* fix impact

---------

Co-authored-by: sallaigy <sallaigy@users.noreply.github.com>
Co-authored-by: Gyula Sallai <gyula.sallai@sonarsource.com>
Co-authored-by: Rudy Regazzoni <110470341+rudy-regazzoni-sonarsource@users.noreply.github.com>
2024-03-13 15:59:46 +01:00
github-actions[bot]
a1eebc5d98
Create rule S6940: Positional parameters must precede keyword parameters (#3738)
* Create rule S6940

* Put jcl spec

* Address review comment

---------

Co-authored-by: rudy-regazzoni-sonarsource <rudy-regazzoni-sonarsource@users.noreply.github.com>
Co-authored-by: Rudy Regazzoni <110470341+rudy-regazzoni-sonarsource@users.noreply.github.com>
2024-03-13 15:18:06 +01:00
Loris S
c8fc3ffe00
Modify S3649(js): Fix code samples (#3759) 2024-03-13 13:06:25 +00:00
github-actions[bot]
a1a88a27d0
Create rule S6939: DD DATA should be delimited (#3734)
* Create rule S6939

* Add rule description

* Update rules/S6939/jcl/rule.adoc

Co-authored-by: Rudy Regazzoni <110470341+rudy-regazzoni-sonarsource@users.noreply.github.com>

---------

Co-authored-by: sallaigy <sallaigy@users.noreply.github.com>
Co-authored-by: Gyula Sallai <gyula.sallai@sonarsource.com>
Co-authored-by: Rudy Regazzoni <110470341+rudy-regazzoni-sonarsource@users.noreply.github.com>
2024-03-13 11:06:53 +01:00
github-actions[bot]
a2241c39a3
Modify rule S100: add language JCL (#3723)
* Add jcl to rule S100

* Provide JCL details

* Address review comment

---------

Co-authored-by: rudy-regazzoni-sonarsource <rudy-regazzoni-sonarsource@users.noreply.github.com>
Co-authored-by: Rudy Regazzoni <110470341+rudy-regazzoni-sonarsource@users.noreply.github.com>
2024-03-12 14:53:36 +01:00
Vincenzo Pellegrini
150702c311
Modify rule S1764: Add CFamily exception for left shift operator (#3680)
Related to CPP-4234.
2024-03-12 14:49:53 +01:00
github-actions[bot]
68e9c93d57
Create rule S1312: Add C# and VB.NET (#2488)
* Add csharp to rule S1312

* First specification

* Fix ascii

* Improve description

* Address comments

* Add the list of supported frameworks

* Add links to supported frameworks

* Small fixes

* Add missing closing brace

* Add tag logging

* Remove VB.NET

* Fix code snippets

---------

Co-authored-by: cristian-ambrosini-sonarsource <cristian-ambrosini-sonarsource@users.noreply.github.com>
Co-authored-by: Cristian Ambrosini <cristian.ambrosini@sonarsource.com>
Co-authored-by: Gregory Paidis <gregory.paidis@sonarsource.com>
Co-authored-by: Gregory Paidis <115458417+gregory-paidis-sonarsource@users.noreply.github.com>
2024-03-12 13:59:26 +01:00
Marco Borgeaud
7d29a87523
Delete rule S802 (CPP-1002) 2024-03-12 12:07:34 +01:00
github-actions[bot]
4bb4693dda
Modify rule S1544: add language JCL (#3725)
* Add jcl to rule S1544

* feed jcl details

* fix parameter

* Address review comment

---------

Co-authored-by: rudy-regazzoni-sonarsource <rudy-regazzoni-sonarsource@users.noreply.github.com>
Co-authored-by: Rudy Regazzoni <110470341+rudy-regazzoni-sonarsource@users.noreply.github.com>
2024-03-12 11:03:58 +01:00
Johann Beleites
9e9a1a2ea5
Modify rule S6218: Correct typo (#3755) 2024-03-12 10:38:02 +01:00
SonarTech
17211b4e3d update coverage information 2024-03-12 00:32:42 +00:00
github-actions[bot]
cf7dd4781a
Create rule S6942: Procedures should not contain in-stream data (#3741)
* Create rule S6942

* Add rule description

---------

Co-authored-by: sallaigy <sallaigy@users.noreply.github.com>
Co-authored-by: Gyula Sallai <gyula.sallai@sonarsource.com>
2024-03-11 16:52:56 +01:00
Angelo Buono
47a517fc47
Modify rule S3457 with example using single quote (#3753) 2024-03-11 16:34:45 +01:00
github-actions[bot]
25e2d4c040
Create rule S6883 (#3569)
* Create rule S6883

* Specify rule

* CR fixes

---------

Co-authored-by: maksim-grebeniuk-sonarsource <maksim-grebeniuk-sonarsource@users.noreply.github.com>
Co-authored-by: Maksim Grebeniuk <maksim.grebeniuk@sonarsource.com>
Co-authored-by: Ghislain Piot <ghislain.piot@sonarsource.com>
2024-03-11 13:48:49 +01:00
github-actions[bot]
7330c5cad1
Create rule S6900 (#3591)
* Create rule S6900

* Specify rule

* CR fixes

* CR fixes

---------

Co-authored-by: maksim-grebeniuk-sonarsource <maksim-grebeniuk-sonarsource@users.noreply.github.com>
Co-authored-by: Maksim Grebeniuk <maksim.grebeniuk@sonarsource.com>
2024-03-11 13:41:36 +01:00
github-actions[bot]
33572f316c
Create rule S6882 (#3567)
* Create rule S6882

* Specify rule

* CR fixes

* CR fixes

* Remove extra comments

---------

Co-authored-by: maksim-grebeniuk-sonarsource <maksim-grebeniuk-sonarsource@users.noreply.github.com>
Co-authored-by: Maksim Grebeniuk <maksim.grebeniuk@sonarsource.com>
Co-authored-by: Ghislain Piot <ghislain.piot@sonarsource.com>
2024-03-11 13:26:40 +01:00
github-actions[bot]
fd4abe522e
Create rule S6890: zoneinfo should be preferred to pytz when using Python 3.9 and later (#3578)
* Create rule S6890: zoneinfo should be preferred to pytz when using Python 3.9 and later

* Fix after review

* Fix after review

---------

Co-authored-by: guillaume-dequenne-sonarsource <guillaume-dequenne-sonarsource@users.noreply.github.com>
Co-authored-by: David Kunzmann <david.kunzmann@sonarsource.com>
Co-authored-by: Guillaume Dequenne <guillaume.dequenne@sonarsource.com>
2024-03-11 11:57:19 +01:00
github-actions[bot]
6cef4fd8ca
Create rule S6903: Using timezone-aware "datetime" objects should be preferred over using "datetime.datetime.utcnow" and "datetime.datetime.utcfromtimestamp" (#3597)
* Create rule S6903

* Create rule S6903: Using timezone aware "datetime"s should be preferred over using "datetime.datetime.utcnow" and "datetime.datetime.utcfromtimestamp"

* Fix after review

* Minor updates

---------

Co-authored-by: joke1196 <joke1196@users.noreply.github.com>
Co-authored-by: David Kunzmann <david.kunzmann@sonarsource.com>
Co-authored-by: Guillaume Dequenne <guillaume.dequenne@sonarsource.com>
2024-03-11 11:53:04 +01:00
github-actions[bot]
acd7bf42a5
Create rule S6887: pytz.timezone should not be passed to the datetime.datetime constructor (#3573) 2024-03-11 11:15:08 +01:00
SonarTech
1ea0026393 update coverage information 2024-03-09 00:32:38 +00:00
github-actions[bot]
334e99d17a
Create rule S2139: Add C# (#2465) 2024-03-08 17:24:42 +01:00
Arseniy Zaostrovnykh
710031d3d8
Use the new channel name in update_coverage.yml 2024-03-08 16:39:14 +01:00
github-actions[bot]
df644a9db1
Create rule S6669: Logger field names should comply with a naming convention (#2533)
* Create rule S6669

* First specification

* Add backticks

* Add compliant and noncompliant comments

* Add properties

* Use standard RSPEC format for links

* Change the scope to "Main"

* Fix default format regex

* Remove VB.NET

* Add logging tag

* Fix asciidoc issues

---------

Co-authored-by: cristian-ambrosini-sonarsource <cristian-ambrosini-sonarsource@users.noreply.github.com>
Co-authored-by: Cristian Ambrosini <cristian.ambrosini@sonarsource.com>
Co-authored-by: Gregory Paidis <gregory.paidis@sonarsource.com>
Co-authored-by: Gregory Paidis <115458417+gregory-paidis-sonarsource@users.noreply.github.com>
2024-03-08 16:01:23 +01:00
github-actions[bot]
1ae135be36
Create rule S6672: Generic logger injection should match enclosing type (#2546)
* Create rule S6672

* Fix inclusion

* Fix rspecator inclusion

* Code review 1

* Add logger tag

* Remove VB.NET

---------

Co-authored-by: antonioaversa <antonioaversa@users.noreply.github.com>
Co-authored-by: Antonio Aversa <antonio.aversa@sonarsource.com>
Co-authored-by: Gregory Paidis <gregory.paidis@sonarsource.com>
Co-authored-by: Gregory Paidis <115458417+gregory-paidis-sonarsource@users.noreply.github.com>
2024-03-08 15:56:46 +01:00
Fred Tingaud
077d7213b7
Modify rule S6169: minor rewordings 2024-03-08 15:00:11 +01:00
Marco Borgeaud
fa678815a7
Modify rules S946,S2107,S3470,S3490,S5312,S6183: Fix links & minor grammar improvements (#3737) 2024-03-08 13:13:25 +01:00
Marco Borgeaud
2c7f2531a5
Modify C++ rules: CPP-4910 Fix links to C++ Core Guideline with double dashes (#3735) 2024-03-08 13:12:12 +01:00
Angelo Buono
0eff2938a4
Modify rule S2694: Add code example for local classes (#3748) 2024-03-08 11:05:57 +00:00
Sebastien Andrivet
d17c91715e
Modify rule S6781: Adjustments for Python (APPSEC-1693) (#3728)
* Update S6781 for JWT hardcoded secrets
2024-03-08 09:08:14 +01:00
SonarTech
7b8117cf1d update coverage information 2024-03-08 00:32:47 +00:00
Alban Auzeill
00dd57e9b7
Modify rule S1193: Fix typo (#3745) 2024-03-07 18:50:48 +01:00
gaetan-ferry-sonarsource
7ca7930228
Modify rule S2053: Add an exception section for key derivation use case of KDFs (#3700)
* Adding an exception section covering key derivation use cases.

* Updating recommended salt length to 256 bits as recommended by NIST

* Improve title to make it explicit we don't target KDF

* Altered some small points

---------

Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
2024-03-07 18:20:49 +01:00
Alban Auzeill
4c8a41e596
Modify Rule S6877: Fix tags and update description (#3690) 2024-03-07 16:19:38 +01:00
SonarTech
c5538bc831 update coverage information 2024-03-07 00:32:14 +00:00
Fred Tingaud
3e52a168ea
Modify Rule S796: fix typo 2024-03-06 19:26:56 +01:00
github-actions[bot]
85ea5a8786
Create rule S6894: A date should be formatted correctly when using "pandas.to_datetime" with "dayfirst" or "yearfirst" arguments (#3583) 2024-03-06 16:30:55 +01:00
Marco Borgeaud
e29edd12ed
Modify rule S1696: Fix link (#3736) 2024-03-06 16:10:30 +01:00
Loghin Vlad-Andrei
413b689086
Modify rule S1878: CPP-4986 Unnamed unions exclusion, union aliases inclusion 2024-03-06 12:00:02 +02:00
Alban Auzeill
f370de4213
Modify rule S6913: Update description to match implementation (#3729) 2024-03-06 09:22:48 +01:00
github-actions[bot]
aff3433d6b
Create rule S6937: Missing mandatory statement name (#3722) 2024-03-05 16:31:04 +01:00
SonarTech
c3b0ab272f update coverage information 2024-03-05 00:32:48 +00:00
Johann Beleites
992fc62fee
SONARJAVA-4814 Improved S1948 RSPEC to better explain why public collections are a problem (#3716) 2024-03-04 17:56:38 +01:00
Angelo Buono
b933a5e38c
Update S6889: Add leak tag (#3720)
The rule would be better implemented with DBD in the future
2024-03-04 14:26:17 +01:00
github-actions[bot]
c1df97b5cd
Create rule S6935: Do not use implicit SYSIN DD * statements (#3685) 2024-03-04 11:38:22 +01:00
tomasz-kaminski-sonarsource
907441949f
CPP-4962 S6169 Update rspec to cover if consteval and its effects on is_constant_evaluated 2024-03-04 09:28:34 +00:00
SonarTech
934498ed84 update coverage information 2024-03-02 00:32:46 +00:00
Loris S
a1f3709876
Modify S5344: Improve common text (#3714) 2024-03-01 09:57:51 +01:00
SonarTech
8091bfb9fa update coverage information 2024-03-01 00:33:04 +00:00
Zsolt Kolbay
bac1733705
Remove VBNET RSPEC (#3711) 2024-02-29 16:46:44 +01:00
Loris S
65898981f1
Modify S5344: Re-arrange the folder for new languages (#3709)
* Modify S5344: Re-arrange the folder for new languages

* modify a file name typo

* last tweaks

* changed diff

* reorg fixes

* Apply suggestions from code review
2024-02-29 15:36:57 +01:00
Egon Okerman
0931f48c1d
Clean up allowed Python framework names (#3708)
* Clean up Python framework names

* Add Request to Javascript frameworks
2024-02-29 12:48:27 +01:00
Egon Okerman
054e47fcb7
Modify rule S4423: Adjust Python compliant examples (APPSEC-1556) (#3688)
* Use recommended helper method in compliant solution

* Change minimal version to TLSv1.2 (to match other languages)
2024-02-29 12:36:15 +01:00
Egon Okerman
330667a0f3
Modify rule S4830: Add HTTPX support (APPSEC-1259) (#3411)
* Add HTTPX

* Fix diff IDs

* Update rules/S4830/python/how-to-fix-it/httpx.adoc

Co-authored-by: daniel-teuchert-sonarsource <141642369+daniel-teuchert-sonarsource@users.noreply.github.com>

---------

Co-authored-by: daniel-teuchert-sonarsource <141642369+daniel-teuchert-sonarsource@users.noreply.github.com>
2024-02-29 12:14:15 +01:00
daniel-teuchert-sonarsource
41bb87f256
Modified S4830 to support aiohttp (#3419) 2024-02-29 11:49:55 +01:00
github-actions[bot]
b15413d6bb
Create rule S6674: Log message template should be syntactically correct (#2574)
* Create rule S6674 for C#

---------

Co-authored-by: martin-strecker-sonarsource <martin-strecker-sonarsource@users.noreply.github.com>
Co-authored-by: Martin Strecker <martin.strecker@sonarsource.com>
Co-authored-by: Gregory Paidis <gregory.paidis@sonarsource.com>
Co-authored-by: Gregory Paidis <115458417+gregory-paidis-sonarsource@users.noreply.github.com>
2024-02-29 10:28:22 +00:00
Cristian Ambrosini
b653c4012a
Modify rule S1244: promote C# to SonarWay (#3707) 2024-02-29 11:21:06 +01:00
github-actions[bot]
761e26c2fd
Create rule S6668: Logging arguments should be passed to the correct parameter (#2530)
Co-authored-by: csaba-sagi-sonarsource <csaba-sagi-sonarsource@users.noreply.github.com>
Co-authored-by: Čaba Šagi <csaba.sagi@sonarsource.com>
Co-authored-by: Costin Zaharia <costin.zaharia@sonarsource.com>
2024-02-29 11:15:41 +01:00
gaetan-ferry-sonarsource
0006c98874
Modify rule S4426: Add how to fix it for cryptodome and pyOpenSSL and close gap with NIST (#3678) 2024-02-29 09:55:54 +01:00
Tim Pohlmann
6aed7888c4
Move dotnet keywords and concepts to shared_content (#3699) 2024-02-29 09:13:05 +01:00
SonarTech
d239eca197 update coverage information 2024-02-29 00:32:57 +00:00
Sebastien Marichal
0a04e8fc5e
Modify rule S2955: promote C# to SonarWay (#3698) 2024-02-28 16:48:56 +01:00
Cristian Ambrosini
d9619fcc9c
Modify rule S2701: promote C# to SonarWay (#3701) 2024-02-28 16:24:40 +01:00
daniel-teuchert-sonarsource
86fe56eceb
Minor fix in S3329 Java code example (#3705) 2024-02-28 16:16:08 +01:00
Angelo Buono
41757b8981
Update S1120: Add note about supported indentation settings (#3697) 2024-02-28 09:31:47 +00:00
Sebastien Marichal
5ed91eeb0f
Modify rule S1994: promote C# to SonarWay (#3694) 2024-02-28 09:37:58 +01:00
Johann Beleites
bda60fea99
Fix typo in S1171 (#3695) 2024-02-27 15:24:58 +00:00
Cristian Ambrosini
cbe555b7b8
Modify rule S1696: promote C# to SonarWay (#3693) 2024-02-27 15:49:13 +01:00
Irina Batinic
e6ecfb4d30
Modify rule S6916: Update description (#3692) 2024-02-27 15:25:30 +01:00
Cristian Ambrosini
fa06ecb088
Modify rule S127: promote C# to SonarWay (#3691) 2024-02-27 13:11:19 +01:00
tomasz-kaminski-sonarsource
8bcdb29a07
CPP-4968 S796 List all escape sequence from C99, C++11 and C++23 2024-02-27 11:54:55 +01:00
tomasz-kaminski-sonarsource
d747b76e63
CPP-4991 S5274 Rework rule to cover only optimization inhibiting moves and not all redundant move 2024-02-27 11:52:16 +01:00
SonarTech
0329489057 update coverage information 2024-02-27 00:32:49 +00:00
Angelo Buono
0a7352fa9a
Update S1113: exception case for the finalizer attack #3687 2024-02-26 16:10:45 +00:00
Cristian Ambrosini
5bea4e0f11
Modify rule S1192: promote C# and VB to SonarWay (#3686) 2024-02-26 14:03:40 +01:00
github-actions[bot]
7cce364ba5
Create rule S6678: Use PascalCase for named placeholders (#2601)
* Create rule S6678

* Draft rule specification

* Apply comments

* Add logging tag

---------

Co-authored-by: cristian-ambrosini-sonarsource <cristian-ambrosini-sonarsource@users.noreply.github.com>
Co-authored-by: Cristian Ambrosini <cristian.ambrosini@sonarsource.com>
Co-authored-by: Zsolt Kolbay <zsolt.kolbay@sonarsource.com>
2024-02-26 13:34:36 +01:00
github-actions[bot]
6fa7fbe87e
Create rule S6677: Named placeholders should be unique (#2584)
* Create rule S6677

* Specify rule

* Address comments

* Address comments 2

* Remove vbnet until it gets implemented

* Add logging tag

* Fix asciidoc parsing issue

---------

Co-authored-by: csaba-sagi-sonarsource <csaba-sagi-sonarsource@users.noreply.github.com>
Co-authored-by: Čaba Šagi <csaba.sagi@sonarsource.com>
Co-authored-by: Gregory Paidis <gregory.paidis@sonarsource.com>
2024-02-26 12:36:08 +01:00
github-actions[bot]
5374bcb4c8
Create rule S6898: Avoid high frame rates (#3588) 2024-02-26 11:55:06 +01:00
Costin Zaharia
d65d3b3b9e
Modify Rule S667: Update title (#3681) 2024-02-26 09:16:40 +01:00
tomasz-kaminski-sonarsource
215f6007ad
CPP-4951 S5500 Exception for return p since C++23 2024-02-26 08:57:12 +01:00
SonarTech
d4aa42f381 update coverage information 2024-02-25 00:32:56 +00:00
kevin.hinz
a46b16aa88
Modify rule: Update rule descriptions (#3655)
Changes suggested by the Docs Squad:

* Modify rule s2178: Update rule description
- formalize word selection to clarify the description

* Modify rule S2551: capitalize `String`
- follow the capitalization of a proper noun, in accordance with the referenced link

* Modify rule S3923: improve word choice

* Modify rule S2551: capitalize String
- `String` is used as a VB `object` in this example. 
- A new PR will be issued to make a more substantial improvement
2024-02-23 13:55:16 +01:00
github-actions[bot]
cfa09e0f55
Create rule S6845: Non-interactive DOM elements should not have the tabIndex property (#3667)
* Add html to rule S6845

* Share documentation with HTML

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2024-02-23 13:23:18 +01:00
Ilia Kebets
2f4d9c3825
Use common/ folder for ASCIIdoc parts shared between languages (#3679) 2024-02-23 12:55:57 +01:00
github-actions[bot]
1a0597fc41
Create rule S6847: Non-interactive elements shouldn't have event handlers (#3658)
* Add html to rule S6847

* Share description with HTML

* Use a common folder

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
Co-authored-by: Yassin Kammoun <52890329+yassin-kammoun-sonarsource@users.noreply.github.com>
2024-02-23 09:00:34 +00:00
github-actions[bot]
c9cbcb2a0c
Add HTML to rule S6823 (#3673)
* Add html to rule S6823

* Remove HTML mention in "How to fix it"

---------

Co-authored-by: ericmorand-sonarsource <ericmorand-sonarsource@users.noreply.github.com>
Co-authored-by: Eric MORAND <eric.morand@sonarsource.com>
2024-02-23 09:56:47 +01:00
github-actions[bot]
e81a653567
Create rule S6912: Use batch Processing in JDBC (#3612) 2024-02-23 09:32:59 +01:00
github-actions[bot]
2437702abb
Create rule S6825 for HTML: Focusable elements should not have "aria-hidden" attribute (#3672) 2024-02-23 08:31:26 +01:00
SonarTech
dc378956de update coverage information 2024-02-23 00:33:04 +00:00
github-actions[bot]
0b9652d49d
Create rule S2629: Add C# and VbNet (#2509)
Add csharp to rule S2629
2024-02-22 22:17:25 +01:00
Costin Zaharia
80476f3696
Update S6667: Remove VB.NET - it's not implemented (#3674) 2024-02-22 15:35:21 +00:00
github-actions[bot]
a6f17497f7
Create rule S6667: Exceptions should be passed as an argument when logging in a catch clause (#2516)
* Create rule S6667

* Add csharp description

* Add link to Serilog Serilog001: Exception Usage

* Review comments

* Add VB descriptions and samples

* Add VB

* Code review

* Add logging tag

---------

Co-authored-by: martin-strecker-sonarsource <martin-strecker-sonarsource@users.noreply.github.com>
Co-authored-by: Martin Strecker <martin.strecker@sonarsource.com>
Co-authored-by: Costin Zaharia <costin.zaharia@sonarsource.com>
2024-02-22 15:46:16 +01:00
github-actions[bot]
ab0c936eb0
Create rule S6848 for HTML: Non-interactive DOM elements should not have an interactive handler (#3664) 2024-02-22 14:39:38 +01:00
github-actions[bot]
3927b70e8d
Add html to rule S6844 (#3665)
Co-authored-by: ericmorand-sonarsource <ericmorand-sonarsource@users.noreply.github.com>
Co-authored-by: Ilia Kebets <104737176+ilia-kebets-sonarsource@users.noreply.github.com>
2024-02-22 14:20:39 +01:00
github-actions[bot]
cc941cc865
Create rule S6852: Elements with an interactive role should support focus (#3669)
* Add html to rule S6852

* Share description with HTML

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2024-02-22 14:10:37 +01:00
github-actions[bot]
45b603f164
Create rule S6914: Use Fused Location to optimize battery power (#3615)
Co-authored-by: ADarko22 <ADarko22@users.noreply.github.com>
Co-authored-by: Angelo Buono <angelo.buono@sonarsource.com>
Co-authored-by: Marco Kaufmann <marco.kaufmann@sonarsource.com>
2024-02-22 10:41:54 +01:00
github-actions[bot]
adf8054e05
Create rule S6909: Constant parameters in a PreparedStatement should not be set more than once (#3609)
Co-authored-by: ADarko22 <ADarko22@users.noreply.github.com>
Co-authored-by: Angelo Buono <angelo.buono@sonarsource.com>
Co-authored-by: Irina Batinic <117161143+irina-batinic-sonarsource@users.noreply.github.com>
2024-02-22 10:38:39 +01:00
github-actions[bot]
7039f47afb
Create rule S6891: Avoid the usage of exact Alarms on mobile apps (#3579)
Co-authored-by: ADarko22 <ADarko22@users.noreply.github.com>
Co-authored-by: Angelo Buono <angelo.buono@sonarsource.com>
Co-authored-by: Irina Batinic <117161143+irina-batinic-sonarsource@users.noreply.github.com>
Co-authored-by: Marco Kaufmann <marco.kaufmann@sonarsource.com>
2024-02-22 10:11:01 +01:00
SonarTech
418ec1b57e update coverage information 2024-02-22 00:32:55 +00:00
Gregory Paidis
f9b1bd8180
Modify S2328: Exclude value types (#3670) 2024-02-21 17:19:53 +01:00
github-actions[bot]
b4774f0acf
Add HTML language to rule S6840 (#3660)
* Add html to rule S6840

* Add HTML language to rule S6840

* Apply fixes suggested by the PR review

---------

Co-authored-by: ericmorand-sonarsource <ericmorand-sonarsource@users.noreply.github.com>
Co-authored-by: Eric MORAND <eric.morand@sonarsource.com>
2024-02-21 13:48:07 +01:00
github-actions[bot]
b475f8f4b2
Create rule S6843 for HTML: Interactive DOM elements should not have non-interactive ARIA roles (#3661) 2024-02-21 09:54:47 +01:00
SonarTech
6d88570197 update coverage information 2024-02-21 00:32:52 +00:00
github-actions[bot]
d6ce70cb9e
Create rule S6793: ARIA properties in DOM elements should have valid values (#3654)
* Add html to rule S6793

* Share description with HTML

* Fix after review

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2024-02-20 13:15:11 +00:00
github-actions[bot]
5c683743e7
Create rule S6842 for HTML: Non-interactive DOM elements should not have interactive ARIA roles (#3657) 2024-02-20 14:11:47 +01:00
tomasz-kaminski-sonarsource
30952d5fab
CPP-4982,CPP-4913 S871 Mention that copies are allowed. 2024-02-20 11:28:48 +01:00
github-actions[bot]
a8e2663eac
S6923: Motion Sensor should not use gyroscope (#3627) 2024-02-20 10:06:16 +01:00
kevin.hinz
4964a713ec
Modify rule S4428: improve sentence structure
- place the noun first to clarify the required action
2024-02-20 07:46:07 +01:00
SonarTech
c9e60ba4ff update coverage information 2024-02-20 00:32:59 +00:00
github-actions[bot]
e4fce14620
Create rule S6841: "tabIndex" values should be 0 or -1 (#3650)
* Add html to rule S6841

* Share JS description with HTML

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2024-02-19 14:45:03 +01:00
github-actions[bot]
4f796b77ee
Create rule S6926: Bluetooth should be configured to use low power (#3635) 2024-02-19 10:38:35 +00:00
github-actions[bot]
605c0c770c
Create rule S6904: SONARJAVA-4821 Avoid using FetchType.EAGER (#3600) 2024-02-19 11:09:13 +01:00
github-actions[bot]
9b269a17f8
Create rule S6905: SQL queries should retrieve only necessary fields (#3603)
Co-authored-by: Angelo Buono <angelo.buono@sonarsource.com>
Co-authored-by: Irina Batinic <117161143+irina-batinic-sonarsource@users.noreply.github.com>
2024-02-19 10:10:11 +01:00
SonarTech
fe6bf39ae4 update coverage information 2024-02-17 00:32:45 +00:00
github-actions[bot]
90b737362c
Create rule S6850 for HTML: Heading elements should have accessible content (#3652)
* Add html to rule S6850

* Add HTML documentation to S6850

Also improve the wording by replacing the term _header_ with the semantically correct _heading_ one.

* Split the rules tags

Also format the JavaScript sample with 2-spaces identation.

---------

Co-authored-by: ericmorand-sonarsource <ericmorand-sonarsource@users.noreply.github.com>
Co-authored-by: Eric MORAND <eric.morand@sonarsource.com>
Co-authored-by: Ilia Kebets <104737176+ilia-kebets-sonarsource@users.noreply.github.com>
2024-02-16 14:27:07 +01:00
github-actions[bot]
6ba18ae408
Create rule S6853 for HTML: Label elements should have a text label and an associated control (#3648) 2024-02-16 09:23:28 +01:00
github-actions[bot]
42b6781d17
Create rule S6851: Images should have a non-redundant alternate description (#3653)
* Add html to rule S6851

* Share description with HTML

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2024-02-16 09:21:52 +01:00
SonarTech
5c9489d918 update coverage information 2024-02-16 00:32:37 +00:00
github-actions[bot]
178168cc72
Create rule S6889: Proper Sensor Resource Management (#3577)
Co-authored-by: Irina Batinic <irina.batinic@sonarsource.com>
Co-authored-by: Angelo Buono <angelo.buono@sonarsource.com>
2024-02-15 10:58:58 +01:00
SonarTech
608d4dddff update coverage information 2024-02-15 00:32:58 +00:00
github-actions[bot]
0ab37ae9ca
Create rule S6827: Anchors should contain accessible content (#3647)
* Add html to rule S6827

* Make description language-agnostic

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
2024-02-14 16:59:54 +01:00
github-actions[bot]
414b41545e
Create rule S6846 for HTML: DOM elements should not use the "accesskey" property (#3646) 2024-02-14 16:04:36 +01:00
SonarTech
e01b75316d update coverage information 2024-02-14 00:33:00 +00:00
Andrei Epure
ea70073945
Fix typo in S6803 (#3559) 2024-02-13 16:00:09 +01:00
Yassin Kammoun
ffb5771c07
Modify rule S2004: Increase default threshold to four nested functions (#3643) 2024-02-12 17:58:19 +01:00
Marco Kaufmann
9fbbc8855b
Modify rule S6877: Refine wording in title and description for clearer distinction from S6876 (#3641) 2024-02-12 15:41:22 +01:00
Marco Kaufmann
b19c779a72
Modify rule S6876: Refine wording in title and description to make a clearer distinction between S6876 and S6877 (#3640) 2024-02-12 15:06:31 +01:00
Yassin Kammoun
52f2adfd58
Modify rule S3776: Ignore nested functions and default value patterns (#3639) 2024-02-12 14:30:36 +01:00
Egon Okerman
7632676854
Modify rule S5131: Fix Spring example (#3637)
* Fix Spring examples

* Remove unnecessary ResponseBody annotations
2024-02-12 13:33:08 +01:00
Yassin Kammoun
043b1fca0b
Modify rule S1186: Ignore noop-like functions, arrows, and constructors (#3608) 2024-02-12 09:42:29 +01:00
Yassin Kammoun
17a131f389
Modify rule S6582: Change severity to minor and improve description (#3626) 2024-02-12 09:42:19 +01:00
SonarTech
e450ac07f4 update coverage information 2024-02-10 00:32:41 +00:00
github-actions[bot]
acb83fd1a5
Create rule S2004: Functions should not be nested too deeply (#3623) 2024-02-09 15:21:09 +01:00
kevin.hinz
916019aa40
Modify rule S2178: Update rule description (#3598) 2024-02-09 11:49:30 +01:00
github-actions[bot]
4f7c396a7a
Create rule S6915: "String.indexOf" should be used with correct ranges (#3616) 2024-02-09 10:44:12 +01:00
github-actions[bot]
6f004fed1c
Create rule S6916: Use guard instead of if/else in pattern match body (#3617) 2024-02-09 10:42:44 +01:00
kevin.hinz
5c414c2bf1
Modify rule: Update rule descriptions (#3632)
* Modify rule S1110: Update rule description

Improve grammar and sentence structure.

* Modify rule S3603: Update rule description

Improve grammar in the sentence structure.

* Modify rule S3449: Update rule description

Clarify the sentence structure with minor word changes.

* Modify rule S3449: correct word in description

Correct spelling mistakes in two instances of one word.
2024-02-09 10:42:26 +01:00
daniel-teuchert-sonarsource
5d727147c3
Adjustment to make RSPEC consistent with Sonar Text (#3629) 2024-02-08 16:22:50 +01:00
github-actions[bot]
65ec930f11
Create rule S6910 (#3610)
* Create rule S6910

* Added description and metadata

---------

Co-authored-by: daniel-teuchert-sonarsource <daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: Daniel Teuchert <daniel.teuchert@sonarsource.com>
Co-authored-by: daniel-teuchert-sonarsource <141642369+daniel-teuchert-sonarsource@users.noreply.github.com>
2024-02-08 11:31:38 +01:00
github-actions[bot]
c34f7fdbc9
Create rule S6913: "Math.clamp" should be used with correct ranges (#3614) 2024-02-07 16:10:51 +01:00
github-actions[bot]
ca3631551c
Create rule S6906: Virtual threads should not run tasks that include synchronized or native code (#3605) 2024-02-07 15:20:30 +01:00
Rudy Regazzoni
718931dce3
Add language JCL as a supported language (#3604) 2024-02-07 10:10:43 +01:00
github-actions[bot]
708f427562
Create rule S6907: Environment variables names for a container should not be duplicated (#3606) 2024-02-07 09:08:59 +01:00
leonardo-pilastri-sonarsource
3dc67eee51
Delete rule S6896: rule is already implemented by S6322 (#3613) 2024-02-06 15:26:32 +00:00
github-actions[bot]
5378180701
Create rule S6901: setDaemon, setPriority and getThreadGroup should not be invoked on virtual threads (#3592) 2024-02-06 13:41:04 +00:00
github-actions[bot]
c7cf309c7b
Create rule S6878: Use record pattern instead of explicit field access (#3563)
Co-authored-by: Alban Auzeill <alban.auzeill@sonarsource.com>
2024-02-06 12:35:58 +01:00
github-actions[bot]
95b530d411
Create rule S6596: Specific version tag for image should be used in Kubernetes (#3601) 2024-02-06 10:59:29 +01:00
github-actions[bot]
67065e20e1
Create rule S6896: "add" and "addAll" should not be invoked on Maps keySets, values, and entries (#3585) 2024-02-06 10:25:52 +01:00
SonarTech
113959f62f update coverage information 2024-02-06 00:32:33 +00:00
github-actions[bot]
99b1bf6896
Create rule S6902: SequencedCollection methods should be used to get the first or last element (#3596)
* Create rule S6902: SequencedCollection methods should be preferred to get the first or last element

* fix from review

---------

Co-authored-by: alban-auzeill <alban-auzeill@users.noreply.github.com>
Co-authored-by: Alban Auzeill <alban.auzeill@sonarsource.com>
2024-02-05 15:27:23 +01:00
Yassin Kammoun
6df51a3098
Modify rule S4323: Ignore nullable types (#3587) 2024-02-05 13:42:13 +01:00
Martin Strecker
8e5fbac5fd
Modify rule S2386 and S3887: Add frozen collection types (#3594) 2024-02-05 13:40:57 +01:00
github-actions[bot]
60ffca256a
Create rule S6881: VirtualThreads should be used for tasks that include heavy blocking operations (#3566) 2024-02-05 12:14:57 +01:00
leonardo-pilastri-sonarsource
90dd1316f0
Add dbd to plugin list to compute rules coverage (#3602) 2024-02-05 12:03:14 +01:00
github-actions[bot]
c952ffba2f
Create rule S1874: Deprecated code should not be used in Kubernetes (#3593) 2024-02-05 11:10:25 +01:00
Ilia Kebets
5f9ac5556a
Modify rule S6661: clarify advantages of new syntax (#3575) 2024-02-05 08:45:57 +00:00
github-actions[bot]
0ac3ce59aa
Create rule S6897: Storage requests should be added (#3586) 2024-02-05 09:39:27 +01:00
SonarTech
4162c07a60 update coverage information 2024-02-03 00:32:38 +00:00
Loïc Joly
256535b1f6
Modify rule S1242(cfamily):CPP-4790 Improve documentation with 'using' 2024-02-02 22:08:20 +01:00
John-Clifton-SonarSource
058eecd419
Update description.adoc to allow for freeform text in 'how' tab
We allow for freeform text in the 'why' tab. We want to allow for this in the 'how' tab.

I have updated the language a bit to talk about 'story-telling' rather than 'blog style' because I think that better reflects how we expect this approach to be used. 

I have also removed the (optional) markers and just added in the one (mandatory) marker needed since the optional markers weren't correct anymore.
2024-02-02 17:59:17 +01:00
Fred Tingaud
1ebb437042
Allow free titles in 'How to fix it' 2024-02-02 16:57:26 +00:00
kevin.hinz
d9656053c0
Modify rule S927: Update rule description (#3599)
Suggested change by the Docs Squad:
- specify pronoun to clarify what "it" is
- fix plural possessives
2024-02-02 17:36:43 +01:00
github-actions[bot]
0cba61c7e5
CPP-4802 Create rule S6872: Aggregates should be initialized with braces in non-generic code 2024-02-02 10:48:05 +01:00
Ilia Kebets
f7c5606e71
Modify rule S4123: move hint about JSdoc to exception, specifying that it's about the @returns tag (#3582) 2024-02-01 15:25:39 +00:00
github-actions[bot]
1598ec12b6
Create rule S6893: Ensure whitespace in-between braces in template directives (#3581) 2024-02-01 16:04:40 +01:00
github-actions[bot]
fcf891083e
Create rule S6888: "case null" should be preferred over "if" pre-condition (#3574) 2024-02-01 15:43:26 +01:00
github-actions[bot]
46b2c9eba6
Create rule S6875: SequencedCollection method should be used to add or remove first or last element (#3560) 2024-02-01 15:11:52 +01:00
github-actions[bot]
a22f6348c1
Modify rule S117: Variable names should comply with a naming convention in Kubernetes (#3590) 2024-02-01 11:34:30 +01:00
github-actions[bot]
15ee5b3875
Create rule S6892: CPU requests should be enforced (#3580) 2024-02-01 11:15:39 +01:00
github-actions[bot]
e8879ca088
Create rule S6877: SequencedCollection reversed view should be used instead of Collections.reverse for read-only lists (#3562)
Co-authored-by: leonardo-pilastri-sonarsource <115481625+leonardo-pilastri-sonarsource@users.noreply.github.com>
2024-02-01 09:29:17 +01:00
SonarTech
b40a28cb46 update coverage information 2024-02-01 00:33:02 +00:00
Eric Morand
d2f786adb3
Modify rule S2871: Emphasize the necessity of using String.localeCompare to sort arrays of strings (#3576)
* Modify rule S2871: Add exception for arrays of strings

* S2871: Remove the exception mention and emphasize the usage of String.localeCompare
2024-01-31 17:27:47 +01:00
github-actions[bot]
d301b56761
Create rule S6876: SequencedCollection reversed view should be used for reverse iteration order (#3561)
Co-authored-by: leonardo-pilastri-sonarsource <115481625+leonardo-pilastri-sonarsource@users.noreply.github.com>
2024-01-31 14:04:46 +01:00
github-actions[bot]
e27296f3d1
Create rule S6874: Variable names should comply with a naming convention (#3557) 2024-01-31 12:48:22 +01:00
github-actions[bot]
92d1729857
Create rule S6873: Memory requests should be enforced (#3555) 2024-01-31 12:08:43 +01:00
github-actions[bot]
3612257f44
Create rule S6880, Use switch instead of if-else chain to compare a variable against multiple cases (#3565) 2024-01-31 11:50:54 +01:00
github-actions[bot]
e369ea0960
Create rule S6885 (#3571) 2024-01-31 11:22:19 +01:00
github-actions[bot]
529611e08b
CPP-4792 Create rule S6871: All the elements of an aggregate should be provided with an initial value 2024-01-31 11:18:24 +01:00
tomasz-kaminski-sonarsource
d8063fa808
Replace repox-npm-proxy with https://registry.npmjs.org 2024-01-31 09:56:30 +00:00
daniel-teuchert-sonarsource
b7c4d7a88c
Modify rule S6504: Clarify intention of rule (APPSEC-1350) (#3528)
* Adjust rule S6504

* Update rules/S6504/docker/rule.adoc

Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>

* Update rules/S6504/docker/rule.adoc

Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>

* Adjustments after review

* Added information to recommended secure coding practices

* Update rule.adoc

---------

Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
2024-01-31 10:37:36 +01:00
github-actions[bot]
6168ed121e
Create rule S6879: Thread.ofVirtual().start(Runnable task) method chain should not be used (#3564) 2024-01-30 16:59:39 +01:00
Eric MORAND
8f17ae938a
Modify rule S4123: Add clarification about returning a promise and JSdoc (#3556)
Co-authored-by: Ilia Kebets <ilia.kebets@sonarsource.com>
2024-01-30 14:21:10 +01:00
leonardo-pilastri-sonarsource
fae9f98957
Modify rule S6741: Fix broken pandas docs link (#3568) 2024-01-30 11:53:35 +01:00
SonarTech
dafeb03dd7 update coverage information 2024-01-30 00:32:43 +00:00
github-actions[bot]
33a29b7555
Create rule S5332 (#3526) 2024-01-29 15:16:07 +01:00
kevin.hinz
e898599466
Docs review patch 3 (#3544) 2024-01-29 14:28:14 +01:00
Cristian Ambrosini
7477890d87
S120: Add code examples for PLSQL (#3558) 2024-01-29 14:08:34 +01:00
SonarTech
44af686c39 update coverage information 2024-01-27 00:33:02 +00:00
Philipp Dominik Schubert
5c058a0fad
Modify Rule S2699: Fix Typos (#3482) 2024-01-26 15:46:17 +01:00
Jonas Wielage
488de63ab1
Modify S6473: Fix indentation (#3553) 2024-01-26 13:18:34 +01:00
Navendu Barua
e0a174381a
Modify rule S6865: Updated example, message and removed configuration part for now (#3551) 2024-01-26 10:52:39 +01:00
SonarTech
82406849e5 update coverage information 2024-01-26 00:32:37 +00:00
Antonio Aversa
1078d5de96
Modify rule S1126: Fix code example (#3552) 2024-01-25 18:01:26 +00:00
Loris S
96811524d7
Modify JVM Crypto rules: Change framework name (#3550)
* Modify JVM Crypto rules: Change title

* changed names

* Apply suggestions from code review

* fixed includes
2024-01-25 15:18:07 +01:00
SonarTech
61dd4e56e2 update coverage information 2024-01-25 00:32:46 +00:00
Loïc Joly
59263f6cba
Add case for link in code font 2024-01-25 01:08:04 +01:00
Yassin Kammoun
bc7b04a2e1
Modify rule S1126: Use the terms 'truthy' and 'falsy' (#3548) 2024-01-24 16:40:36 +01:00
Navendu Barua
0ed2d95292
Modify rule S6864: Update examples and removal of LimitRange for now (#3547) 2024-01-24 12:26:23 +01:00
Scomocouk
df457e22f2
Modify rule S4035: Fix typo in 'Why is this an issue' section - "IEquitable<T>" -> "IEquatable<T>" (#3535)
Co-authored-by: Scott Moore <scott.moore@viavisolutions.com>
2024-01-24 12:00:02 +01:00
Loïc Joly
d1fe2c3ef5
CPP-4873 S1001: Literals namespaces should be allowlisted from the rule 2024-01-23 01:58:20 +01:00
SonarTech
b97c7b845e update coverage information 2024-01-23 00:33:13 +00:00
Fred Tingaud
ba118db149
Modify Rule S6620: Fix title 2024-01-22 12:21:23 +01:00
SonarTech
55210bdb9b update coverage information 2024-01-22 00:32:46 +00:00
Cristian Ambrosini
5a8cb4555a
Fix S4027 C#: BinaryFormatter. Serialization constructors are obsolete and should not be required (#3541) 2024-01-18 14:09:20 +01:00
Gregory Paidis
a69589504d
Modify rules S3260,S6610,S6612,S6613,S6617,S6618: Fix benchmark table (#3532)
* Fix benchmarks for S3260,S6610,S6612,S6613,S6617,S6618

* Review 1
2024-01-18 09:26:58 +01:00
Pierre-Loup
24a9c85e59
Fix broken links from blogs.bing.com and testng.org (#3540)
* Fix testng.org broken links

* Fix blogs.bing.com broken link
2024-01-18 09:20:33 +01:00
Pierre-Loup
770348d041
Avoid OWASP Top 10 security-standard mismatch between metadata and description links (RULEAPI-798) (#3537)
* Add check for security standard mismatch

* Fix security standard mismatches

* Fix Resources/Standards links for secrets rules

* Fix check

* Fix links and update security standard mapping

* Fix maintanability issue

* Apply review suggestions

* Apply suggestions from code review

Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>

* Fix typo

Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>

---------

Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
2024-01-17 17:20:28 +01:00
Peter Trifanov
f6ac76fbb1
Fix links to Docker docs in S6437 and S6472 (#3536) 2024-01-17 14:41:59 +01:00
Egon Okerman
d1417e82f8
Modify CWE and OWASP Top 10 links to follow standard link format (APPSEC-1134) (#3529)
* Fix all CWE references

* Fix all OWASP references

* Fix missing CWE prefixes
2024-01-15 17:15:56 +01:00
Gregory Paidis
1aafc90f68
Fix benchmarks for S6602,S6603,S6605,S6607,S6608,S6609 (#3530) 2024-01-15 08:47:49 +01:00
Gregory Paidis
96fed93d7b
Benchmarks Guide: Update statistical term links (#3531) 2024-01-05 13:52:54 +01:00
Egon Okerman
6fe3e11073
Modify rule S5131: Add FastAPI (APPSEC-1250) (#3412) 2024-01-04 11:23:05 +01:00
Egon Okerman
6a8c878999
Fix Flask example (#3527) 2024-01-03 16:36:15 +01:00
SonarTech
5a6e7fd8cd update coverage information 2023-12-23 00:32:44 +00:00
github-actions[bot]
816372774e
Create rule S6870: Storage limits should be enforced (#3521) 2023-12-22 15:52:20 +01:00
github-actions[bot]
1f170595e5
Create rule S1444: Public "static" fields should be read-only (#3475) 2023-12-22 15:12:45 +01:00
Fred Tingaud
a1090dca6c
Clean warnings 2023-12-22 14:18:33 +01:00
Fred Tingaud
1012001409
RULEAPI-800 Detect usages of C++ instead of {cpp} in asciidoc 2023-12-22 13:58:58 +01:00
github-actions[bot]
c292108e16
Modify rule S6473: add Kubernetes (APPSEC-1395) (#3522)
* Add kubernetes to rule S6473

* Initial draft

---------

Co-authored-by: egon-okerman-sonarsource <egon-okerman-sonarsource@users.noreply.github.com>
Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
2023-12-22 11:54:01 +01:00
Nils Werner
fe93f7c6bd
Fix typo in S1125 description (#3518) 2023-12-22 10:07:51 +01:00
Marco Borgeaud
072e67b8d4
Fix asciidoc w.r.t. C++ (#3519)
"C++" spelled as-is can result in unexpected rendering, such as

    C++20 was released before C++17

renders as

    C20 was released before C17

Make consistent use of `[source,cpp]`.
2023-12-21 15:51:41 +01:00
Angelo Buono
8d14cd83c7
Update java:S1068 exceptions to mention classes with Lombok annotations (#3523)
Co-authored-by: Johann Beleites <sdefend_9jftz8pq@esnail.de>
2023-12-21 14:07:24 +00:00
kevin.hinz
d47197b23a
Update description.adoc (#3509) 2023-12-21 10:01:03 +01:00
kevin.hinz
014db5e0bd
Update rationale.adoc (#3520) 2023-12-21 09:09:34 +01:00
github-actions[bot]
50c8c02bc5
Create rule S6869: CPU limits should be enforced (#3515) 2023-12-20 12:07:04 +01:00
Fred Tingaud
22b4470f2a
Modify CFamily rules: CPP-4080 Refresh and standardize CppCoreGuidelines references (#3514)
Update all links to C++ Core Guidelines to `e49158a`.

Refresh done using the following script and some manual edits:
db76e34e74/personal/fred-tingaud/rspec/refresh-cppcoreguidelines.py

When re-using this script, be mindful that:
 - it does not cover `shared_content`
 - it does not properly escape inline code in links (e.g., "[=]" or "`mutex`es")
 - it does not change `C++` to `{cpp}` in link titles.

Co-authored-by: Marco Borgeaud <marco.borgeaud@sonarsource.com>
2023-12-20 10:08:18 +01:00
daniel-teuchert-sonarsource
6610704c1c
Added CWE (#3516) 2023-12-19 14:14:41 +01:00
github-actions[bot]
b5a13febc2
Create rule S6868: Allowing command execution is security sensitive (#3513)
* Create rule S6868

* Added description for S6868

* Removed title duplicate

* Adjusted code example language

* Update rules/S6868/kubernetes/rule.adoc

Co-authored-by: Sebastien Andrivet <138577785+sebastien-andrivet-sonarsource@users.noreply.github.com>

---------

Co-authored-by: daniel-teuchert-sonarsource <daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: Daniel Teuchert <daniel.teuchert@sonarsource.com>
Co-authored-by: daniel-teuchert-sonarsource <141642369+daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: Sebastien Andrivet <138577785+sebastien-andrivet-sonarsource@users.noreply.github.com>
2023-12-19 14:12:12 +01:00
github-actions[bot]
dcac6104e1
Create rule S6867 (#3511)
* Create rule S6867

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>
2023-12-19 13:16:14 +01:00
github-actions[bot]
7830f4aa98
Create rule S6865 (#3505)
* Create rule S6865

* Added description

* Improved description

* Fix layout to pass asciidoc tests

* Fix layout to pass asciidoc tests

* Some adjustments after review

---------

Co-authored-by: daniel-teuchert-sonarsource <daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: Daniel Teuchert <daniel.teuchert@sonarsource.com>
Co-authored-by: daniel-teuchert-sonarsource <141642369+daniel-teuchert-sonarsource@users.noreply.github.com>
2023-12-19 12:38:17 +01:00
hendrik-buchwald-sonarsource
8c10b08710
Modify rule S6864: Update text regarding namespaces (#3512) 2023-12-19 10:09:01 +01:00
SonarTech
26aa9b5d3b update coverage information 2023-12-19 00:32:38 +00:00
Pierre-Loup
241c6bbf54
Modify rule S6287: Add FastAPI support (APPSEC-1252) (#3390) 2023-12-18 11:17:43 +01:00
github-actions[bot]
8d5e029e90
Create rule S6864: Memory limits should be enforced (#3491) 2023-12-18 09:41:50 +01:00
Gregory Paidis
0f0aabf9da
Add documentation about benchmark results (#3508) 2023-12-15 17:39:01 +01:00
github-actions[bot]
1dcfab1348
Create rule S6857: SpEL expression should have valid syntax (#3463) 2023-12-15 13:48:43 +01:00
Sebastien Andrivet
e65855198a
Deprecate rule S6245 (#3501) 2023-12-15 09:16:02 +01:00
Sebastien Andrivet
10876b1236
Modify rule S1876: No more a hotspot, now a code smell (APPSEC-1400) (#3495)
* Deprecate rule S876

* The rule is not deprecated, it is changed to a code smell

* Add missing quickfix

* Update the title
2023-12-14 17:16:37 +01:00
Egon Okerman
1f6366ebd7
Close rule S5750 (#3507) 2023-12-14 17:02:35 +01:00
Egon Okerman
73c697e14f
Deprecate rule S5743 (#3504) 2023-12-14 15:18:24 +01:00
Egon Okerman
979b78197d
Update rule S4792 to deprecated (#3498) 2023-12-14 15:17:36 +01:00
Pavel Mikula
563d745a80
Modify rule S3928: Update exceptions (#3500)
Modify S3928: Update exceptions
2023-12-14 15:13:03 +01:00
Loïc Joly
4c24467534
CPP-4803 S3630: Clarify in RSPEC what is expected from users before C++20 2023-12-14 15:01:44 +01:00
Marharyta
75c6ede0e3
Fix compliant example (#3503) 2023-12-14 11:52:12 +01:00
Marharyta
bf5320781b
Add Java interop section (#3502) 2023-12-14 11:39:45 +01:00
SonarTech
82b586d33d update coverage information 2023-12-14 00:33:00 +00:00
github-actions[bot]
6f7aa63261
Create rule S6863: Set appropriate Status Codes on HTTP responses (#3485) 2023-12-13 15:28:06 +01:00
Ilia Kebets
7c1099e676
Modify S3358: add link to blog post (#3493) 2023-12-13 10:32:03 +01:00
SonarTech
3561b4f680 update coverage information 2023-12-12 00:32:35 +00:00
Sylvain Kuchen
2032442679
Modify rule S3518: Correct examples to be valid python code (#3490) 2023-12-11 15:04:59 +00:00
SonarTech
c391438737 update coverage information 2023-12-09 00:32:37 +00:00
SonarTech
347b5a6375 update coverage information 2023-12-08 07:48:25 +00:00
github-actions[bot]
55ab74a601
Create rule S6838: @Bean methods for Singleton should not be invoked in @Configuration when proxyBeanMethods is false (#3367) 2023-12-07 16:19:04 +01:00
Arseniy Zaostrovnykh
3535e4a89f
Use NodeJS 16 to run Sonar analysis 2023-12-07 16:14:58 +01:00
Malte Skoruppa
dfc3b3a48e
Modify rule S6839: Fix typos in Python code snippets in description 2023-12-06 13:21:40 +01:00
Philipp Dominik Schubert
02ac884d27
Modify Rule S5485: Fix Typos 2023-12-06 11:19:40 +00:00
Philipp Dominik Schubert
da1eb8d6bb
Modify Rule S5308: Fix Typo 2023-12-06 11:13:28 +00:00
Arseniy Zaostrovnykh
162b408c10
Use newer sonar-scanner to get Java 17 required for Sonar analysis 2023-12-06 09:35:32 +00:00
github-actions[bot]
5e17a63bf7
Create rule S6862: Beans in "@Configuration" class should have different names (#3474) 2023-12-05 14:41:32 +01:00
Guillaume Dequenne
02e49cb0d9
Modify S1172 (Python): Document exceptions (#3481) 2023-12-04 16:21:34 +01:00
Egon Okerman
a3fd54b8a4
Modify rule S5144: Add HTTPX support (APPSEC-1247) (#3410)
* Add HTTPX

* Enhance compliant code sample

* Keep samples consistent

* Simplify compliant example somewhat
2023-12-03 12:32:40 +01:00
github-actions[bot]
4ed4c84f4c
Create rule S6856: "@PathVariable" annotation should be present if a path variable is used (#3462) 2023-12-01 13:44:04 +01:00
Guillaume Dequenne
21a6f21304
Modify S5899 (Python): Add to default quality profile (#3478) 2023-12-01 11:32:56 +01:00
Guillaume Dequenne
2ce02c69fb
Modify S5906 (Python): Add to default quality profile (#3477) 2023-12-01 11:32:45 +01:00
Guillaume Dequenne
17c305c893
Modify S5918 (Python): Add to default quality profile (#3476) 2023-12-01 11:32:27 +01:00
Guillaume Dequenne
17d5583d9b
Modify S5915 (Python): Add to default quality profile (#3473) 2023-12-01 11:32:16 +01:00
Marco Kaufmann
eb8107b9ca
Modify S4551(java): repaired broken link (#3480) 2023-12-01 10:05:28 +01:00
SonarTech
f2d7c10262 update coverage information 2023-12-01 00:33:17 +00:00
Loris S
f0db71d524
Modify S2083(java): Improve the compliant sample (#3472) 2023-11-30 19:07:23 +01:00
github-actions[bot]
7cb81aa05a
Create rule S2187: Test files should contain tests (#3470)
* Add javascript to rule S2187

* Update metadata and description

* Update rules/S2187/javascript/rule.adoc

Co-authored-by: Ilia Kebets <104737176+ilia-kebets-sonarsource@users.noreply.github.com>

* Update rules/S2187/javascript/rule.adoc

Co-authored-by: Ilia Kebets <104737176+ilia-kebets-sonarsource@users.noreply.github.com>

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
Co-authored-by: Yassin Kammoun <52890329+yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: Ilia Kebets <104737176+ilia-kebets-sonarsource@users.noreply.github.com>
2023-11-30 10:30:54 +01:00
erwan-serandour-sonarsource
43e205da3d update documentation to reflect the raised issues on @RestController annotation 2023-11-29 14:48:28 +01:00
github-actions[bot]
5fe99f8f71
Create rule S5973 (#3469) 2023-11-29 14:42:05 +01:00
SonarTech
20f66a35e9 update coverage information 2023-11-29 00:32:34 +00:00
Arseniy Zaostrovnykh
78c83870e6
Modify rule S3743(cfamily): remove a dead link 2023-11-28 22:41:39 +01:00
github-actions[bot]
8954db60ca
Create rule S6861: Mutable variables should not be exported (#3467)
* Create rule S6861

* Update metadata and description

* Update rules/S6861/javascript/rule.adoc

Co-authored-by: Ilia Kebets <104737176+ilia-kebets-sonarsource@users.noreply.github.com>

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
Co-authored-by: Yassin Kammoun <52890329+yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: Ilia Kebets <104737176+ilia-kebets-sonarsource@users.noreply.github.com>
2023-11-28 16:59:46 +01:00
github-actions[bot]
1dff1a8345
Create rule S6859: Imports should not use absolute paths (#3465) 2023-11-28 11:50:49 +01:00
Johann Beleites
1d90037682
Modify rule S6619: Improve rule description (SONARJAVA-286) (#3456) 2023-11-28 11:09:31 +01:00
SonarTech
484a2c3808 update coverage information 2023-11-28 00:33:04 +00:00
github-actions[bot]
af8db317de
Create rule S6524: Collection should be immutable if contents is not changed (#1637) 2023-11-27 17:27:49 +01:00
SonarTech
30d8955f58 update coverage information 2023-11-25 00:32:31 +00:00
github-actions[bot]
2730041272
Create rule S6826: Sample rule that showcases potential image features in Sonar products (#3287)
Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com>
Co-authored-by: Loris S <91723853+loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Fred Tingaud <95592999+frederic-tingaud-sonarsource@users.noreply.github.com>
2023-11-24 16:30:45 +01:00
Marco Kaufmann
56276731ad
Modify rule S6809: Software Quality should only have Maintainability attribute (#3459) 2023-11-24 15:24:43 +01:00
Marco Kaufmann
4e664a03de
Modify rule S2230: Software Quality should only have Reliability attribute (#3460) 2023-11-24 15:24:20 +01:00
daniel-teuchert-sonarsource
6eeb994f8d
Improve code example (#3461) 2023-11-24 14:27:13 +01:00
Guillaume Dequenne
d12dd22884
Modify rule S5247: Remove examples of non covered engines (#3458) 2023-11-24 11:17:48 +01:00
SonarTech
e8dda65c0b update coverage information 2023-11-24 00:32:31 +00:00
Victor
541fad5776
Fix S1077: Correct sqKey for JS/TS (#3457) 2023-11-23 14:48:36 +01:00
tomasz-kaminski-sonarsource
098f48a680
CPP-4815 Make rule applicable to CFamily and add taxonomy 2023-11-23 09:04:43 +01:00
Pierre-Loup
bb2fb68e33
Modify S6785: Update the Set limits section (#3453) 2023-11-22 16:29:40 +01:00
Sebastien Marichal
8c9a9185de
Modify rule S6802: Add a code example (#3452) 2023-11-22 16:12:20 +01:00
github-actions[bot]
2f2a81079a
Create rule S6839 (#3421) 2023-11-22 10:45:39 +01:00
Ilia Kebets
563803ac97
Modify S1788: change CC attribute to ADAPTABLE (#3455) 2023-11-22 09:09:01 +01:00
SonarTech
12f3babbe3 update coverage information 2023-11-22 00:32:39 +00:00
daniel-teuchert-sonarsource
6febd2245a
Modify rule S5148: Adjust code example format (#3454) 2023-11-21 15:59:01 +01:00
github-actions[bot]
cc2ec5b930
Create rule S6852: Elements with an interactive role should support focus (#3444) 2023-11-21 15:58:06 +01:00
github-actions[bot]
113572535d
Create rule S6785: GraphQL queries should not be vulnerable to Denial of Service attacks (#3157) 2023-11-21 14:52:33 +01:00
Yassin Kammoun
69fcf2f5cc
Modify rule S1456: Fix JavaScript spelling in the title (#3451) 2023-11-21 13:50:21 +01:00
Irina Batinic
8f99898b76
Modify rule S6548: Improve RSPEC to show the most recent recommended Singleton implementations first (#3449) 2023-11-21 10:51:01 +01:00
github-actions[bot]
21267b0fd4
Create rule S6528: "find" should be replaced with "any", "none" or "contains" (#1646)
Co-authored-by: kaufco <kaufco@users.noreply.github.com>
Co-authored-by: Marco Kaufmann <marco.kaufmann@sonarsource.com>
Co-authored-by: Angelo Buono <angelo.buono@sonarsource.com>
2023-11-21 09:37:05 +01:00
SonarTech
39bdd8b1f8 update coverage information 2023-11-21 00:32:57 +00:00
hendrik-buchwald-sonarsource
0a2ce982ba
Modify rule S4790: Remove tag spring (#3450) 2023-11-20 17:11:40 +01:00
github-actions[bot]
55302cdae9
Create rule S6853: Label elements should have a text label and an associated control (#3445) 2023-11-20 14:55:45 +01:00
github-actions[bot]
415758f304
Create rule S6855: Media elements should have captions (#3448)
* Create rule S6855

* Update metadata and description

* Update rules/S6855/javascript/metadata.json

Co-authored-by: Ilia Kebets <104737176+ilia-kebets-sonarsource@users.noreply.github.com>

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
Co-authored-by: Yassin Kammoun <52890329+yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: Ilia Kebets <104737176+ilia-kebets-sonarsource@users.noreply.github.com>
2023-11-20 14:55:23 +01:00
Marco Kaufmann
3d50a18f52
Modify rule S3353: Added Kotlin (Use val instead of var if local variable is never re-assigned) (#1640) 2023-11-20 11:00:49 +01:00
SonarTech
5bf0f20b04 update coverage information 2023-11-18 00:32:42 +00:00
github-actions[bot]
0303498ae9
Create rule S6854: iFrames must have a title (#3446) 2023-11-17 17:25:27 +01:00
github-actions[bot]
03512e691e
Create rule S6851: Images should have a non-redundant alternate description (#3441)
* Create rule S6851

* Update metadata and description

* Update rules/S6851/javascript/metadata.json

Co-authored-by: Ilia Kebets <104737176+ilia-kebets-sonarsource@users.noreply.github.com>

* Update rules/S6851/javascript/rule.adoc

Co-authored-by: Ilia Kebets <104737176+ilia-kebets-sonarsource@users.noreply.github.com>

* Update rules/S6851/javascript/rule.adoc

Co-authored-by: Ilia Kebets <104737176+ilia-kebets-sonarsource@users.noreply.github.com>

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
Co-authored-by: Yassin Kammoun <52890329+yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: Ilia Kebets <104737176+ilia-kebets-sonarsource@users.noreply.github.com>
2023-11-17 14:05:18 +01:00
github-actions[bot]
fe00bf40c8
Create rule S6797: Blazor query parameter type should be supported (#3209) 2023-11-17 07:23:06 +01:00
SonarTech
7a6c5caf70 update coverage information 2023-11-17 00:32:34 +00:00
github-actions[bot]
583741fc5c
Extend rule S1077 for JavaScript (#3442) 2023-11-16 16:48:10 +01:00
github-actions[bot]
82cc53e6dd
Create rule S6847 (#3436) 2023-11-16 14:28:11 +01:00
github-actions[bot]
f1048d214d
Create rule S6802: Using lambda expressions in loops should be avoided in Blazor markup section (#3215) 2023-11-16 13:48:58 +01:00
github-actions[bot]
213d0888fb
Create rule S6844: Anchor tags should not be used as buttons (#3433) 2023-11-16 08:42:49 +00:00
SonarTech
845d423fc1 update coverage information 2023-11-16 00:32:41 +00:00
github-actions[bot]
68a958f5cc
Create rule S6803: Parameters with SupplyParameterFromQuery attribute should be used only in routable components (#3216) 2023-11-15 17:57:47 +01:00
github-actions[bot]
da5a5e1b8d
Create rule S6800: Component parameter type should match the route parameter type constraint (#3213) 2023-11-15 15:55:12 +00:00
github-actions[bot]
92f4ccc66b
Create rule S6850: Header elements should have accessible content (#3440) 2023-11-15 14:55:23 +01:00
github-actions[bot]
b0a2aa17eb
Create rule S6848: Non-interactive DOM elements should not have an interactive handler (#3437)
* Create rule S6848

* Update metadata and description

* Update rules/S6848/javascript/rule.adoc

Co-authored-by: Ilia Kebets <104737176+ilia-kebets-sonarsource@users.noreply.github.com>

* Update rules/S6848/javascript/metadata.json

Co-authored-by: Ilia Kebets <104737176+ilia-kebets-sonarsource@users.noreply.github.com>

* Update rules/S6848/javascript/metadata.json

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
Co-authored-by: Yassin Kammoun <52890329+yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: Ilia Kebets <104737176+ilia-kebets-sonarsource@users.noreply.github.com>
2023-11-15 11:01:31 +01:00
github-actions[bot]
05040d20fe
Create rule S6849: HTML elements should have a valid language attribute (#3439) 2023-11-15 09:47:49 +01:00
github-actions[bot]
c8c52e8716
Create rule S6843: Interactive DOM elements should not have non-interactive ARIA roles (#3427) 2023-11-15 07:48:03 +01:00
SonarTech
73679021ed update coverage information 2023-11-15 00:32:37 +00:00
github-actions[bot]
be9567fa71
Create rule S6845: Non-interactive DOM elements should not have the tabIndex property (#3434) 2023-11-14 12:22:18 +01:00
github-actions[bot]
e6ac36b0c6
Create rule S6846: DOM elements should not use the "accesskey" property (#3435) 2023-11-14 09:54:40 +01:00
SonarTech
e03055cbb8 update coverage information 2023-11-14 00:32:39 +00:00
hendrik-buchwald-sonarsource
146e2fa2ee
Modify rule S5547: Add ssl module (#3113) 2023-11-13 13:52:29 +01:00
Jamie Anderson
5e8734386e
Modify rule S4507: Add examples for Python Flask (#3042) 2023-11-13 12:01:48 +01:00
github-actions[bot]
ad5fe749c8
Create rule S6527: Function chain using "filter" should be simplified (#1645)
Co-authored-by: Marco Kaufmann <marco.kaufmann@sonarsource.com>
Co-authored-by: Angelo Buono <angelo.buono@sonarsource.com>
2023-11-13 11:10:49 +01:00
SonarTech
743cf27c9c update coverage information 2023-11-11 00:32:58 +00:00
John-Clifton-SonarSource
db01067c27
Modify rule S5524: Small language tweaks following docs team review (#3432) 2023-11-10 14:43:17 +00:00
github-actions[bot]
024f761667
Create rule S6776: Stack-traces should not be disclosed (APPSEC-1130) (#3087) 2023-11-10 13:12:28 +01:00
Alban Auzeill
c0ea5828a0
Modify rule S6745(Java): Update rule description (#3431) 2023-11-10 10:47:02 +01:00
SonarTech
c82a1c5de4 update coverage information 2023-11-10 00:33:25 +00:00
Alban Auzeill
7e7b83f50a
Modify rule S6745(Java): Update rule description about FP and reduce severity (#3430) 2023-11-09 17:26:47 +01:00
github-actions[bot]
eff4696008
Create rule S6840: DOM elements should use the "autocomplete" attribute correctly (#3423) 2023-11-09 17:24:44 +01:00
github-actions[bot]
08a27b4d07
Create rule S6842: Non-interactive DOM elements should not have interactive ARIA roles (#3425) 2023-11-09 17:10:35 +01:00
Loris S
9f8e3502df
Modify S3394(COBOL): Remove compliant samples (#3415)
## Why

b4812424ee (r131831666)
This code sample will raise, as the COBOL logic is pretty simple. The
idea is to make this rule a "review" rule instead of a vulnerability. We
do not have the bandwidth to convert it to a hotspot but that's ok.

## 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-11-09 15:34:37 +01:00
github-actions[bot]
1abd400898
Create rule S6841: "tabIndex" values should be non-positive (#3424) 2023-11-09 11:08:04 +01:00
SonarTech
81f8bbc081 update coverage information 2023-11-09 00:33:26 +00:00
SonarTech
0812a18060 update coverage information 2023-11-08 00:33:19 +00:00
Victor
45cb94c97a
Fix S6790: Use method definition in code snippets (#3420) 2023-11-07 10:34:46 +00:00
daniel-teuchert-sonarsource
c79e30a528
Modify Rule S4830: Revert aiohttp support (APPSEC-1361) (#3418)
## 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-11-07 11:23:37 +01:00
Marco Borgeaud
245f048f31
Modify rule S6012: fix some typos (#3416) 2023-11-07 09:28:04 +01:00
SonarTech
27656c27c0 update coverage information 2023-11-07 00:33:23 +00:00
Fred Tingaud
aa079ad714
Don't crash when the asciidoc logger receives a string
The asciidoc documentation states that the logger will receive objects
with a given interface, but sometimes we receive simple strings that
crash the documented code.
2023-11-06 18:12:17 +01:00
Egon Okerman
6417c38013
Modify rule S2092, S3330, S4830, S5131, S5144: Revert FastAPI changes (#3408)
The PRs #3365, #3374, #3386, #3391 and #3392 were merged before
implementation. This reverts them, to be merged only once implemented.

## 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-11-06 15:58:47 +00:00
daniel-teuchert-sonarsource
552a0984cf
Modify Rule S5144: Revert Changes (APPSEC-1248) (#3405)
This PR reverts some changes made in
https://github.com/SonarSource/rspec/pull/3373 to ensure that the
documentation will only be shown do users once the detection logic is
implemented.

## 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-11-06 16:51:27 +01:00
Loris S
2fcc531384
Modify S3394(COBOL): Fix wording and typos (#3404)
## 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-11-06 15:33:13 +00:00
Yassin Kammoun
47ddcb2afa
Modify rule S6789: Fix code snippet with parsing error (#3403) 2023-11-06 16:26:00 +01:00
Egon Okerman
67d91725f0
Modify rule S5131: Add FastAPI (APPSEC-1250) (#3386)
## 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-11-06 11:04:22 +01:00
github-actions[bot]
6bf88596e1
Create rule S6832: Non-singleton Spring beans should not be injected in a Singleton bean (#3355) 2023-11-06 10:51:01 +01:00
github-actions[bot]
ed11f03f52
Create rule S6833: @Controller should be replaced with @RestController (#3356) 2023-11-06 10:50:42 +01:00
github-actions[bot]
28bf7530f8
Create rule S6831: @Qualifier should not be used on @Bean methods (#3352) 2023-11-06 10:50:17 +01:00
Fred Tingaud
0cfa2cb41f
Fix Sonar warning. 2023-11-06 10:19:09 +01:00
Egon Okerman
89b4a93dcb
Modify rule S2092: Add FastAPI (APPSEC-1260) (#3391)
## 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-11-06 09:57:06 +01:00
Egon Okerman
6429a96b02
Modify rule S3330: Add FastAPI (APPSEC-1260) (#3392)
## 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-11-06 09:56:54 +01:00
SonarTech
2c7f43c449 update coverage information 2023-11-04 00:33:38 +00:00
daniel-teuchert-sonarsource
18dd843e83
Modify rule S5659: Add python-jose (APPSEC-1262) (#3399)
## 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-11-03 15:30:06 +01:00
SonarTech
0aa9e9ee37 update coverage information 2023-11-03 00:33:13 +00:00
Karim El Ouerghemmi
af4ed144fa
Modify rule S6680: Adapt rule message (#3397)
## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-11-02 10:06:34 +01:00
SonarTech
3a27c9ab4e update coverage information 2023-11-02 00:32:54 +00:00
Dorian Burihabwa
251ff1ba15
Modify rule S6806: Update rule title to match guidelines (#3395)
Co-authored-by: Johann Beleites <johann.beleites@sonarsource.com>
2023-11-01 16:10:07 +01:00
Dorian Burihabwa
580db51a12 Modify rule S6818: Update rule title to match guidelines
See https://docs.sonarsource.com/sonarqube/latest/extension-guide/adding-coding-rules/#titles
2023-11-01 15:58:18 +01:00
Dorian Burihabwa
2ad95d221a Modify rule S6813: Update title to match guidelines
See https://docs.sonarsource.com/sonarqube/latest/extension-guide/adding-coding-rules/#titles
2023-11-01 15:57:44 +01:00
Dorian Burihabwa
b990b66569 Modify rule S6813: Document potential NPE risk 2023-11-01 15:57:44 +01:00
Antonio Aversa
419d53464b
Modify rule S6798: remove example razor file, breaking master CI (#3394) 2023-11-01 13:54:56 +00:00
github-actions[bot]
ecf80ddbd1
Create rule S6798: [JSInvokable] attribute should only be used on public methods (#3210) 2023-11-01 14:40:32 +01:00
github-actions[bot]
a36f03cb64
Create rule S6795: Generic type statement should not use TypeVars. (#3204)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6795/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-11-01 12:01:48 +01:00
github-actions[bot]
c70acb68e9
Create rule S6792: Generic classes should be defined using the type parameter syntax (#3197)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6792/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>
2023-11-01 11:42:29 +01:00
Victor
3cdb331282
Fix S1082: Split metadata.json for HTML and JS (#3393) 2023-11-01 11:42:14 +01:00
github-actions[bot]
8671a03f6a
Create rule S6794: Type aliases should be declared with a "type" statement. (#3201)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6794/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-11-01 11:41:30 +01:00
github-actions[bot]
92dcd7a942
Create rule S6796: Generic functions should be defined using the type parameter syntax. (#3206)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6796/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-11-01 11:32:32 +01:00
github-actions[bot]
a128217967
Create rule S6799: f-strings should not be nested too deeply (#3211)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6799/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-11-01 11:32:07 +01:00
github-actions[bot]
0cf3478c3f
Create rule S6817 (#3253) 2023-11-01 11:22:57 +01:00
github-actions[bot]
86a5c66f4b
Create rule S6829: @Autowired should be used when multiple constructors are provided (#3350) 2023-11-01 11:22:32 +01:00
SonarTech
6c75bc9ddb update coverage information 2023-11-01 00:33:05 +00:00
github-actions[bot]
ff6e32433a
Create rule S6837: Superfluous "@ResponseBody" annotations should be removed (#3366)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6837/java) (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: johann-beleites-sonarsource <johann-beleites-sonarsource@users.noreply.github.com>
Co-authored-by: Johann Beleites <johann.beleites@sonarsource.com>
Co-authored-by: Johann Beleites <sdefend_9jftz8pq@esnail.de>
2023-10-31 16:45:13 +00:00
github-actions[bot]
6325626c2e
Create rule S125: Sections of code should not be commented out (#3388) 2023-10-31 16:06:04 +01:00
daniel-teuchert-sonarsource
53c90eecdc
Modify Rule S4830: Add aiohttp support (APPSEC-1361) (#3383)
## 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-10-31 15:43:03 +01:00
Ilia Kebets
1daf5f7c6a
Modify rule S2699: add vitest library (#3385) 2023-10-31 14:07:34 +01:00
Philipp Dominik Schubert
eb26a48564
Modify rule S5487: Fix example code 2023-10-31 08:56:30 +01:00
Fred Tingaud
317e4a044a
Modify rule S5487: Adapt to LaYC format
Co-authored-by: Arseniy Zaostrovnykh <necto.ne@gmail.com>
Co-authored-by: Arseniy Zaostrovnykh <arseniy.zaostrovnykh@sonarsource.com>
Co-authored-by: Philipp Dominik Schubert <philipp.schubert@sonarsource.com>
Co-authored-by: Philipp Dominik Schubert <119606487+pdschbrt@users.noreply.github.com>
2023-10-31 07:05:43 +00:00
Yassin Kammoun
698fa0bb47
Modify rule S5869: Mention character class escapes (#3382)
## 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-10-31 07:52:07 +01:00
SonarTech
fbae1661a8 update coverage information 2023-10-31 00:33:50 +00:00
Egon Okerman
d735db063f
Modify rule S4830: Add HTTPX support (APPSEC-1259) (#3374)
## 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-10-30 17:07:15 +01:00
Fred Tingaud
d3cfe19d7e
Fix broken or dangerous backquotes
Co-authored-by: Marco Borgeaud <89914223+marco-antognini-sonarsource@users.noreply.github.com>
2023-10-30 10:33:56 +01:00
Tibor Blenessy
7e46053974
Modify S109 for JS: document exclusions (#3380)
## 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: Ilia Kebets <104737176+ilia-kebets-sonarsource@users.noreply.github.com>
2023-10-30 08:17:25 +00:00
SonarTech
c02de84bd5 update coverage information 2023-10-28 00:32:51 +00:00
Jamie Anderson
856a1ccf70
Modify rule S6359: Change text to education framework format (APPSEC-1239) (#3379)
## 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-10-27 16:11:43 +01:00
daniel-teuchert-sonarsource
32a9027c5b
Modify rule S5144: Add aiohttp support (APPSEC-1248) (#3373)
## 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: Egon Okerman <egon.okerman@sonarsource.com>
2023-10-27 16:57:53 +02:00
Irina Batinic
0985aec222 Modify rule S6809: Update rule title 2023-10-27 14:34:07 +02:00
Loris S
b4812424ee
Modify S3394(COBOL): Migrate to LayC (#3376)
## 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: Sebastien Andrivet <138577785+sebastien-andrivet-sonarsource@users.noreply.github.com>
2023-10-27 14:26:10 +02:00
github-actions[bot]
be387332dc
Create rule S6818: Avoid Using "@Autowired" on Multiple Constructors in a Spring Component (#3254) 2023-10-27 11:08:26 +02:00
Sebastien Andrivet
e057fbb128
Modify rule S5594: Change text to education framework format (APPSEC-1238) (#3377)
## 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-10-27 10:21:48 +02:00
Loris S
56c3bfef18
Modify S3281(xml): Migrate to LayC (#3372)
## 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: gaetan-ferry-sonarsource <112399173+gaetan-ferry-sonarsource@users.noreply.github.com>
2023-10-27 10:12:29 +02:00
Egon Okerman
75e4b4815d
Modify rule S5144: Add HTTPX support (APPSEC-1247) (#3365)
## 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-10-27 09:47:43 +02:00
leonardo-pilastri-sonarsource
effc29754f
Modify S113: rephrase title and description (#3375) 2023-10-27 09:30:18 +02:00
gaetan-ferry-sonarsource
16b55929c4
Modify S3374: Change text to LayC (APPSEC-1241) (#3371) 2023-10-27 09:29:39 +02:00
Loris S
1ad5902a8d
Modify S3355(xml): Migrate to LayC (#3370)
## 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: Sebastien Andrivet <138577785+sebastien-andrivet-sonarsource@users.noreply.github.com>
2023-10-26 13:19:47 +00:00
leonardo-pilastri-sonarsource
3ba09d2443
Modify S1860: migrate to LayC (#3364) 2023-10-26 12:04:46 +02:00
Loris S
c90bc7b80b
Modify S6469(docker): Migrate to LayC (#3368)
## 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: Sebastien Andrivet <138577785+sebastien-andrivet-sonarsource@users.noreply.github.com>
2023-10-26 09:32:31 +00:00
Loris S
936d78a18d
Modify S5547(PL/SQL): Migrate to LayC - code re-creation (#3358)
## 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-10-26 08:35:54 +00:00
gaetan-ferry-sonarsource
b8f1f649db
Modify S6385: Change text to LayC (APPSEC-1234) (#3353) 2023-10-26 09:21:09 +02:00
gaetan-ferry-sonarsource
ed90dcc0d1
Modify S3333: Change text to LaYC (APPSEC-1221) (#3347) 2023-10-25 17:24:03 +02:00
Sebastien Andrivet
4c25a89425
Modify rule S5832: Change text to education framework format (APPSEC-1213) (#3363)
## 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-10-25 17:05:47 +02:00
Jamie Anderson
7566c4e468
Modify rule S6410: Change text to education format (APPSEC-1235) (#3362)
## 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-10-25 15:56:42 +01:00
gaetan-ferry-sonarsource
b8cc2d2232
Modify S3335: Change text to LayC (#3342) 2023-10-25 13:16:04 +00:00
Sebastien Andrivet
440a63b67e
Modify rule S1081: Change text to education framework format (APPSEC-1210) (#3341)
## 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: Jamie Anderson <127742609+jamie-anderson-sonarsource@users.noreply.github.com>
2023-10-25 13:43:01 +02:00
Sebastien Andrivet
2347e7325e
Modify rule S4211: Change text to education framework format (APPSEC-1206) (#3328)
## 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-10-25 09:57:55 +02:00
gaetan-ferry-sonarsource
e5d2583038
Modify S3334: Change text to LaYC (APPSEC-1219) (#3334) 2023-10-25 09:38:17 +02:00
gaetan-ferry-sonarsource
9d40fe11bd
Modify S3336: Change text to LaYC (APPSEC-1217) (#3340) 2023-10-25 09:37:44 +02:00
SonarTech
294cc1f089 update coverage information 2023-10-25 00:33:37 +00:00
Loris S
e0beab8f70
Modify S6339(php): Deprecate rule (#3349)
## 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-10-24 16:46:38 +02:00
github-actions[bot]
7891aa4209
Create rule S6836: "case" and "default" clauses should not contain lexical declarations (#3361)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6836/javascript)
(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: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
Co-authored-by: Yassin Kammoun <52890329+yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: Ilia Kebets <104737176+ilia-kebets-sonarsource@users.noreply.github.com>
2023-10-24 16:16:38 +02:00
Sebastien Andrivet
e5e7204f41
Modify rule S5782: Change text to education framework format (APPSEC-1211) (#3346)
## 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: gaetan-ferry-sonarsource <112399173+gaetan-ferry-sonarsource@users.noreply.github.com>
2023-10-24 16:10:06 +02:00
Victor
784e3efc0d
Modify S1871: Migrate To LayC (#3315) 2023-10-24 12:02:02 +00:00
Yassin Kammoun
ffa9fc6bb2
Tag RSPECs of JS/TS rules relying on type information (#3354)
## 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-10-24 09:17:27 +00:00
gaetan-ferry-sonarsource
25bd64b16c
Modify S3337: Change text to LayC (#3343) 2023-10-24 10:57:36 +02:00
Marco Borgeaud
feb5aada64 Modify rule S5798: Add reference and fix typos 2023-10-24 10:22:50 +02:00
Marco Borgeaud
6c3678ec3a Modify rule S3776: Minor improvements
* Use 2 spaces for indentation for consistency with other CFamily rules.
* Minor grammar improvements.
* Fix link format
2023-10-24 10:22:50 +02:00
Marco Borgeaud
607e14b27a Modify rule S6004: add syntax highlighting
The description needs more improvement. This is a quick improvement for
now, given the quick fix for this rule is used a lot.
2023-10-24 10:22:50 +02:00
Sebastien Andrivet
9155d3ac55
Modify rule S2819: Change text to education framework format (APPSEC-1208) (#3339)
## 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-10-24 09:05:18 +02:00
SonarTech
8939e2bac4 update coverage information 2023-10-24 00:33:08 +00:00
Jamie Anderson
d7bd8f45a6
Modify rule S5798: Change text to education framework format (APPSEC-1212) (#3345)
## 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-10-23 18:03:51 +01:00
Jamie Anderson
ebfbfd421c
Modify rule S1079: Change text to education framework format (APPSEC-1209) (#3331)
## 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-10-23 18:03:08 +01:00
Marco Borgeaud
d7a3e75db7
Modify rule S3457: rewrite description (#3326) 2023-10-23 16:28:04 +02:00
github-actions[bot]
a7522a3ca1
Create rule S6810: Async methods should return void or Future (#3243) 2023-10-23 15:17:17 +02:00
Rudy Regazzoni
9aca4314df
Modify S2259: Migrate to LaYC - null dereference (#3337)
## 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 <91723853+loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: leonardo-pilastri-sonarsource <115481625+leonardo-pilastri-sonarsource@users.noreply.github.com>
2023-10-23 12:29:59 +00:00
SonarTech
b9a6cd3d3d update coverage information 2023-10-21 00:32:59 +00:00
gaetan-ferry-sonarsource
206114f4b4
Modify S5847: Change text to LayC format (APPSEC-1214) (#3316) 2023-10-20 15:39:40 +00:00
Renaud T
45539edd13
Modify S3776: Migrate To LayC - reduce cognitive complexity (#3273) 2023-10-20 17:10:07 +02:00
Zsolt Kolbay
08881af66d
Modify S1144: Migrate to LaYC (#3332) 2023-10-20 15:29:34 +02:00
Ilia Kebets
258940a8ae
Fix links format and tag names in React accessibility rules of MMF-2996 (#3348)
Fixes https://github.com/SonarSource/SonarJS/issues/4295
2023-10-20 11:50:30 +00:00
github-actions[bot]
3ddf51837e
Create rule S1082: Mouse events should have corresponding keyboard events (#3314)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S1082/javascript)
(updated a few minutes after each push).

## 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
- [x ] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)

---------

Co-authored-by: alexander-kamushkin-sonarsource <alexander-kamushkin-sonarsource@users.noreply.github.com>
Co-authored-by: Tibor Blenessy <saberduck@users.noreply.github.com>
Co-authored-by: Ilia Kebets <104737176+ilia-kebets-sonarsource@users.noreply.github.com>
2023-10-20 11:44:45 +00:00
Loris S
fd254814b7
Modify S4212(C#): Deprecation (#3318)
## 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-10-20 10:56:23 +02:00
SonarTech
f024cf9241 update coverage information 2023-10-20 00:33:06 +00:00
nicolas-gauthier-sonarsource
fbd1da4881
Modify S6353: correct typo (#3344)
## 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-10-19 16:11:06 +00:00
github-actions[bot]
4432ea2ae7
Create rule S6827: Anchors should contain accessible content (#3304)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6827/javascript)
(updated a few minutes after each push).
2023-10-19 15:25:12 +00:00
leonardo-pilastri-sonarsource
96f936d8b7
Modify S3415: migrate to LayC (#3338) 2023-10-19 15:48:44 +02:00
Yassin Kammoun
1007cc1b15
Modify S1155: Migrate to LaYC
Co-authored-by: nicolas-gauthier-sonarsource <121794895+nicolas-gauthier-sonarsource@users.noreply.github.com>
Co-authored-by: Fred Tingaud <95592999+frederic-tingaud-sonarsource@users.noreply.github.com>
2023-10-19 13:33:00 +00:00
Alexander Kamushkin
b8751a435c
Modify S1125: Remove strict comparison operators for javascript (#3336)
Reported by [community
thread](https://community.sonarsource.com/t/typescript-mistake-in-noncompliant-code-example/102806)
2023-10-19 15:12:50 +02:00
Victor
0a745f9ddc
Modify S6353: Migrate To LayC (#3303) 2023-10-19 14:46:34 +02:00
Renaud T
a1eb0d95e2
Update of developer.android.com links (#3335) 2023-10-19 14:15:34 +02:00
Yassin Kammoun
531e4225da
Migrate links from JavaScript RSPECs to the LaYC format (#3309) 2023-10-19 11:46:59 +02:00
erwan-serandour-sonarsource
3f6f2155da
Modify S6804: fix some typos in the rule description (#3333) 2023-10-19 11:40:26 +02:00
github-actions[bot]
01406d14f4
Create rule S6806 (#3221) 2023-10-19 11:37:18 +02:00
leonardo-pilastri-sonarsource
67790723b3
Modify S1075: Fix resources link format (#3323) 2023-10-19 10:59:51 +02:00
erwan-serandour-sonarsource
fd307950ba
Modify S2230: extends with all Spring proxy (#3313) 2023-10-19 10:41:59 +02:00
Rudy Regazzoni
42e27b9916
Modify S1774: Migrate to LayC - remove ternary expression (#3288)
## 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-10-19 10:28:33 +02:00
SonarTech
8de1effb0c update coverage information 2023-10-19 00:32:59 +00:00
github-actions[bot]
4371239af9
Create rule S6814: Optional REST parameters should have an object type (#3250) 2023-10-18 23:17:36 +02:00
Rudy Regazzoni
1763d7fe2b
Modify S1186: Migrate to LayC - empty methods (#3285)
## 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-10-18 18:21:32 +02:00
github-actions[bot]
594218e198
Create rule S6825: Focusable elements should not have aria-hidden attribute (#3286)
https://github.com/SonarSource/SonarJS/issues/4240
2023-10-18 17:19:42 +02:00
Marco Borgeaud
c6a5a82aea Modify rule S3252: Remove compliant part from noncompliant example
It's trivial enough not to be referred explicitly
2023-10-18 16:04:55 +02:00
Marco Borgeaud
79267f4e61 Modify rule S3252: Use consistent indentation with CFamily rules 2023-10-18 16:04:55 +02:00
Marco Borgeaud
440616a492 Modify rule S2589: Fix small grammar issue 2023-10-18 16:04:55 +02:00
Marco Borgeaud
9093162659 Modify rule S117: Remove Geeksforgeeks link
Its content is too opinionated -- C++ conventions vary a lot from
project to project and the Wikipedia article provides already enough
content.
2023-10-18 16:04:55 +02:00
Guillaume Dequenne
a9840a0c5f
Modify S905: Migrate to LaYC - Non-empty statements should change control flow or have at least one side-effect (#3294) 2023-10-18 15:52:00 +02:00
Marco Borgeaud
c31a14e293
Normalize Open Group links in CFamily (#3324) 2023-10-18 15:38:14 +02:00
Peter Trifanov
82964976ca
Modify S3457: Migrate to LayC - printf-style format string are misused (#3305) 2023-10-18 13:35:51 +00:00
Marco Borgeaud
34814f787b
Remove links to SANS Top 25 CWEs (#3322)
These links are no longer relevant since SANS now just link to CWE, and we already have links to CWEs.
2023-10-18 13:16:00 +00:00
github-actions[bot]
c6c104d066
Create rule S6813: Avoid field dependency injection (#3249) 2023-10-18 15:11:26 +02:00
github-actions[bot]
a67c69e31e
Create rule S6804: "@Value" annotation should inject property or SpEL expression (#3217) 2023-10-18 14:59:03 +02:00
github-actions[bot]
f3151a5623
Create rule S6809: "@Async" annotated methods should not be called via "this" (#3226) 2023-10-18 14:38:21 +02:00
Peter Trifanov
7b201a79df
Modify S3252: Migrate to LayC - "static" base class members should not be accessed via derived types (#3310) 2023-10-18 12:29:04 +00:00
Marco Borgeaud
41ee3f5305
Normalize Wikipedia and Microsoft links in CFamily (#3321)
Update docs.microsoft.com to learn.microsoft.com.
2023-10-18 12:28:32 +00:00
nicolas-gauthier-sonarsource
ab6d0f08b7
Modify S2589: Migrate to LaYC (#3297)
## 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-10-18 14:26:59 +02:00
Yassin Kammoun
af51542e42
Modify S1116: Migrate to LayC (#3320)
## 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: Angelo Buono <angelo.buono@sonarsource.com>
2023-10-18 13:53:57 +02:00
Marco Borgeaud
76791bbfe8
Remove link to CERT Java from CFamily (#3296)
Remove irrelevant links from C/C++ descriptions. No effort was made to
replace them when there wasn't already a link to CERT C. This will be
done as part of a separate effort, one day.
2023-10-18 10:49:02 +00:00
Marco Borgeaud
cd424756a0
Validate asciidoc ifdef/endif (#3311)
Fix kotlin:S6511
2023-10-18 09:43:40 +00:00
leonardo-pilastri-sonarsource
d7138f5ef4
Modify S1075: migrate to LayC (#3312) 2023-10-18 11:18:09 +02:00
Renaud T
63e5b7219b
Modify S2208: Migrate To LayC - wildcard imports (#3279)
## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-10-18 11:00:07 +02:00
leonardo-pilastri-sonarsource
03e072b689
Modify S1118: migrate to LayC (#3308) 2023-10-18 08:16:10 +00:00
Sebastien Marichal
06d4b591a9
Modify S5693: Fix issue in noncompliant code example (#3299)
Also update default value for parameter to match the description
2023-10-18 09:28:02 +02:00
SonarTech
47cabe929d update coverage information 2023-10-18 00:33:02 +00:00
Yassin Kammoun
65743cb622
Modify S3353: Migrate To LayC (#3302)
## 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: Zsolt Kolbay <121798625+zsolt-kolbay-sonarsource@users.noreply.github.com>
2023-10-17 17:44:58 +00:00
Loris S
cd7c6fc72f
Modify S5147(python): Improved the description (#3317)
## 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-10-17 15:57:18 +00:00
github-actions[bot]
9cef907c34
Create rule S6823: DOM elements with the aria-activedescendant property should be accessible via the tab key (#3275)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6823/javascript)
(updated a few minutes after each push).
2023-10-17 16:05:15 +02:00
Marco Borgeaud
ec58c48c37
Normalize links to C++ reference (#3298) 2023-10-17 14:17:15 +02:00
Angelo Buono
544ee3f97d
Modify rule S1176: Migrate to LayC - Public types, methods and field (API) should be documented (#3307)
Co-authored-by: Peter Trifanov <peter.trifanov@sonarsource.com>
2023-10-17 11:39:01 +00:00
Yassin Kammoun
ea7a20b8bc
Modify S1488: Migrate to LayC (#3306)
## 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: Peter Trifanov <peter.trifanov@sonarsource.com>
2023-10-17 11:56:12 +02:00
github-actions[bot]
fb2e41e06a
Create rule S6822: No redundant ARIA role (#3271)
https://github.com/SonarSource/SonarJS/issues/4241
2023-10-17 11:39:20 +02:00
Peter Trifanov
13076367bc
Modify S5738: Migrate to LayC - @Deprecated code marked for removal should never be used (#3276) 2023-10-17 09:11:02 +00:00
pynicolas
446437ee50
Modify rule S1683: remove SELECT from the scope of the rule (#3295) 2023-10-17 10:48:01 +02:00
leonardo-pilastri-sonarsource
db7ba6be09
Modify S120: migrate to LayC (#3277) 2023-10-17 10:34:22 +02:00
Loris S
3b1f9991d5
Modify docs: Add showcase rules (#3300)
## 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: nicolas-gauthier-sonarsource <121794895+nicolas-gauthier-sonarsource@users.noreply.github.com>
2023-10-17 07:59:24 +00:00
Arseniy Zaostrovnykh
3dd5a4950c
Update ts-node to fix the build 2023-10-17 09:58:33 +02:00
nicolas-gauthier-sonarsource
c5507032cc
Modify S117: Migrate to LaYC (#3263)
## 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-10-17 09:45:51 +02:00
Amelie Renard
8b648fe5db Modify rule S2479: add examples of control characters and documentation link 2023-10-17 08:54:38 +02:00
Amelie Renard
c56fb7c740 Modify rule S1185: add multiple diff 2023-10-17 08:54:38 +02:00
Amelie Renard
fc7b8e858d Modify rule S2156: add diff view and documentation link 2023-10-17 08:54:38 +02:00
Amelie Renard
06a4d260fa Modify rule S2190: fix typo and move to CFamily folder 2023-10-17 08:54:38 +02:00
Yassin Kammoun
bac0cd305a
Modify S3524: Migrate to LayC (#3284)
## 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-10-17 08:22:56 +02:00
SonarTech
2e0f6b61cd update coverage information 2023-10-17 00:33:54 +00:00
Angelo Buono
e8cd1b485d
Modify rule S106: Migrate to LayC - Standard outputs should not be used directly to log anything (#3280)
Co-authored-by: Marco Borgeaud <89914223+marco-antognini-sonarsource@users.noreply.github.com>
Co-authored-by: Zsolt Kolbay <121798625+zsolt-kolbay-sonarsource@users.noreply.github.com>
2023-10-16 18:57:06 +00:00
Zsolt Kolbay
41ffd7e39b
Modify S2971: Migrate To LayC (#3282) 2023-10-16 17:04:12 +02:00
Fred Tingaud
6f24cc0632
Clean rule at root
In some cases, the `rule.adoc` at root of a rule is never included
anywhere and thus is dead code.
It's a maintenance cost by itself, but also it misses opportunities to
inline code that seems used by two documents when in fact only one
document is actually rendered. And this missed opportunity, in turn,
stops us from applying the correct language tag on the code samples.
2023-10-16 16:34:38 +02:00
Arseniy Zaostrovnykh
acdfc35f45
Update NPM packages
This is an automatic update of the package + a fix for a type error that
is detected with the newer typescript compiler.
I did this hoping to address the Dependabot concerns, but the update
didn't go far enough.
The type fix changes the type or error in `useFetch` from "unknown" to a
boolean (has error / no error), which is how we use it as far as I can
tell.
2023-10-16 16:01:08 +02:00
Marco Borgeaud
ccf6472c46 Modify rule S1905: Remove link
The Geeksforgeeks article promotes the C-style casts without any note on
its dangerousness. The C++ alternative are presented as an adoc thing,
missing the point again.
2023-10-16 15:51:00 +02:00
Marco Borgeaud
5ee8ae68cf Modify rule S1481: Mention [[maybe_unused]] 2023-10-16 15:51:00 +02:00
Marco Borgeaud
8918478946 Modify rule S112: Improve grammar and asciidoc 2023-10-16 15:51:00 +02:00
Marco Borgeaud
92ba587f4f Modify rule S109: minor grammatical improvement
Avoid contractions, simplify sentence and fix typo.
2023-10-16 15:51:00 +02:00
Marco Borgeaud
1cc87de1dd Modify rule S1068: use consistent indentation 2023-10-16 15:51:00 +02:00
Marco Borgeaud
439408f60f Modify rule S1066: fix typo 2023-10-16 15:51:00 +02:00
Arseniy Zaostrovnykh
5c3437e99d
Update Pipfile.lock to latest package versions
To address Dependabot reports
2023-10-16 12:28:49 +00:00
Marco Borgeaud
d3eb6a2412
Modify rule S1110: Migrate To LayC - redundant parentheses (#3281)
Provide consistent examples for CFamily, CSharp, and Java.

Make JS, PHP, Apex, Go, Kotlin, and Scala consistent.

Python has its own syntax so inline relevant bits.

Other languages are not updated: their description is considered good
enough and it would require a significant investment to not mess up the
syntax in their examples.
2023-10-16 13:31:15 +02:00
Marco Borgeaud
98517de0ff
Modify rule S1117: Migrate To LayC - shadow variables (#3270)
The languages for this rule fall into two categories:

* CFamily, JS, and PLSQL: "Variables should not be shadowed" (general
case of shadowing)
* C#, Flex, Java, PHP, Swift: "Local variables should not shadow
field/property/enum case/..." (narrow case of shadowing)

For CFamily, these tickets are also handled: CPP-2785 CPP-3589
2023-10-16 12:04:08 +02:00
Fred Tingaud
62a4840a6a
Modify S1066: Migrate to LayC - merge if 2023-10-16 09:46:41 +00:00
github-actions[bot]
016434b60a
Create rule S6824: No ARIA role or property for unsupported DOM elements (#3283)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6824/javascript)
(updated a few minutes after each push).
2023-10-16 09:40:32 +00:00
Victor
95d63e2cec
Modify S3257: Migrate to LayC (#3267) 2023-10-16 09:06:00 +00:00
Guillaume Dequenne
e887caa47f
Modify S6660: Fix typo in code snippet (#3278) 2023-10-16 09:49:36 +02:00
Rudy Regazzoni
42bce2ac2d
Modify S125: Migrate to LayC - commented code (#3258) 2023-10-16 09:17:24 +02:00
SonarTech
a892865ee3 update coverage information 2023-10-14 00:33:59 +00:00
Peter Trifanov
d953a8c265
Modify S1121: Migrate to LayC - Assignments should not be made from within sub-expressions
Co-authored-by: Fred Tingaud <frederic.tingaud@sonarsource.com>
2023-10-13 19:17:01 +02:00
Guillaume Dequenne
5f3c3c5da7
Modify S112: Migrate to LaYC - Generic exceptions should never be thrown (#3242) 2023-10-13 14:57:41 +02:00
github-actions[bot]
1f68ed2442
Create rule S6819: : Prefer tag over ARIA role (#3259)
https://github.com/SonarSource/SonarJS/issues/4242
2023-10-13 14:51:23 +02:00
github-actions[bot]
0f96a5b265
Create rule S6821: DOM elements with ARIA roles should have a valid non-abstract role (#3268)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6821/javascript)
(updated a few minutes after each push).
2023-10-13 11:50:54 +00:00
leonardo-pilastri-sonarsource
fd418f9f77
Modify S1125: migrate to LayC (#3265) 2023-10-13 13:50:06 +02:00
Zsolt Kolbay
37030a89dd
Modify S1854: Migrate to LayC (#3274) 2023-10-13 12:26:37 +02:00
nicolas-gauthier-sonarsource
828e2d54cc
Modify S1481: Migrate to LaYC (#3245)
## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-10-13 11:59:36 +02:00
Victor
49f3562d64
Modify S4649: Migrate to LayC (#3272) 2023-10-13 11:31:39 +02:00
Angelo Buono
febb2d2152
Modify rule S116: Migrate to LayC - Field names should comply with a naming convention (#3266)
Co-authored-by: Fred Tingaud <95592999+frederic-tingaud-sonarsource@users.noreply.github.com>
2023-10-13 10:06:09 +02:00
Yassin Kammoun
e8d14c4eb4
Modify S2933: Migrate to LayC (#3261)
## 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: Zsolt Kolbay <121798625+zsolt-kolbay-sonarsource@users.noreply.github.com>
2023-10-13 08:05:03 +02:00
SonarTech
cd90f33d6a update coverage information 2023-10-13 00:33:41 +00:00
Renaud T
873ad08b36
Modify S1104: Migrate To LayC - avoid public field (#3238) 2023-10-12 18:11:39 +02:00
Peter Trifanov
55e10f0d8d
Modify S1172: Migrate to LayC - unused function parameters should be removed (#3257) 2023-10-12 14:12:10 +00:00
github-actions[bot]
4733f37b19
Create rule S6791: Disallow usage of unsafe lifecycle methods (react/no-unsafe) (#3188) 2023-10-12 15:12:54 +02:00
github-actions[bot]
b7c2c63f95
Create rule S6811: DOM elements with ARIA role should only have supported properties (#3244)
https://github.com/SonarSource/SonarJS/issues/4244
2023-10-12 14:31:32 +02:00
github-actions[bot]
a422950ed5
Create rule S6793: ARIA properties in DOM elements should have valid values (#3200)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6793/javascript)
(updated a few minutes after each push).
2023-10-12 14:12:47 +02:00
Amelie Renard
04b1bdb263 Modify rule S5274: reword, add diff view and documentation links 2023-10-12 11:09:15 +02:00
Amelie Renard
0c4b5381de Modify rule S6180: add diff view and documentation link 2023-10-12 11:09:15 +02:00
Amelie Renard
b04a8579b6 Modify rule S6016: fix grammar 2023-10-12 11:09:15 +02:00
Amelie Renard
753b85db2e Modify rule S6187: reformat code examples 2023-10-12 11:09:15 +02:00
Amelie Renard
52030d1728 Modify rule S6190: add documentation link and reformat code examples 2023-10-12 11:09:15 +02:00
Amelie Renard
9e3420b525 Modify rule S6168: add documentation link and diff view 2023-10-12 11:09:15 +02:00
Amelie Renard
917b07db46 Modify rule S6195: explicit acronym and add documentation links 2023-10-12 11:09:15 +02:00
Amelie Renard
fe78934952 Modify rule S5018: add diff view 2023-10-12 11:09:15 +02:00
Amelie Renard
b351bef154 Modify rule S1836: reformat links 2023-10-12 11:09:15 +02:00
Amelie Renard
5108b75b75 Modify rule S3471: add diff view 2023-10-12 10:05:16 +02:00
Amelie Renard
9327e7c639 Modify rule S5414: move exception code example 2023-10-12 10:05:16 +02:00
Amelie Renard
db6fa43955 Modify rule S5421: add "noncompliant" comments 2023-10-12 10:05:16 +02:00
Amelie Renard
326641875c Modify rule S5409: add diff view 2023-10-12 10:05:16 +02:00
Amelie Renard
3f433464ed Modify rule S3642: add documentation link 2023-10-12 10:05:16 +02:00
Amelie Renard
9783f1834f Modify rule S5945: explicit acronym 2023-10-12 10:05:16 +02:00
Amelie Renard
32681b7498 Modify rule S6005: add diff view and documentation link 2023-10-12 10:05:16 +02:00
SonarTech
3d870ed0e1 update coverage information 2023-10-12 00:33:36 +00:00
Victor
e65d456d23
Modify S1874: Migrate to LayC (#3241) 2023-10-11 19:48:17 +02:00
Peter Trifanov
923f9ff0f9
Modify S134: Migrate to LayC - nested control flow statements shouldn't be too deep (#3237) 2023-10-11 14:43:59 +00:00
Fred Tingaud
5879d3546c
Modify S878: Migrate to LayC - comma operator
Co-authored-by: Marco Borgeaud <89914223+marco-antognini-sonarsource@users.noreply.github.com>
Co-authored-by: Yassin Kammoun <52890329+yassin-kammoun-sonarsource@users.noreply.github.com>
2023-10-11 14:34:18 +00:00
Yassin Kammoun
d556411608
Modify S4666: Migrate To LayC (#3256)
## 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-10-11 16:27:57 +02:00
Guillaume Dequenne
1323fbe9c4
Modify S1135: Fix typo (#3255) 2023-10-11 16:00:07 +02:00
Rudy Regazzoni
bc15ffe77e
Modify S109: Migrate To LayC (#3235)
## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-10-11 13:58:56 +02:00
Angelo Buono
ccbf7d7edc
Modify rule S1905: Migrate to LayC - Redundant casts should not be used (#3236)
Co-authored-by: Zsolt Kolbay <121798625+zsolt-kolbay-sonarsource@users.noreply.github.com>
2023-10-11 10:03:57 +00:00
leonardo-pilastri-sonarsource
a117458bd2
Modify S1192: Migrate to LayC (#3234) 2023-10-11 11:41:24 +02:00
leonardo-pilastri-sonarsource
44f4c80062
Modify S5256: Migrate to LayC (#3240) 2023-10-11 10:52:18 +02:00
github-actions[bot]
d908ea498e
Create rule S6790: Disallow using string references (react/no-string-refs) (#3187) 2023-10-11 07:56:57 +00:00
github-actions[bot]
3ce9506566
Create rule S6789: Disallow usage of isMounted (react/no-is-mounted) (#3186) 2023-10-11 07:53:27 +00:00
Victor
20254396dd
Modify S1827: Migrate To LayC (#3229) 2023-10-11 09:50:28 +02:00
Fred Tingaud
9c4273eca1
Modify S1131: Migrate to LayC - trailing spaces 2023-10-11 09:16:21 +02:00
github-actions[bot]
7f48ca92cd
Create rule S6788: Disallow usage of findDOMNode (react/no-find-dom-node) (#3185) 2023-10-11 07:15:35 +00:00
Angelo Buono
c24d13b88a
Modify S1199: Migrate to LayC - Nested code blocks should not be used (#3233)
Co-authored-by: Marco Borgeaud <89914223+marco-antognini-sonarsource@users.noreply.github.com>
2023-10-11 06:59:57 +00:00
github-actions[bot]
5ed9a4f18a
Create rule S6807: DOM elements with ARIA roles should have the required properties (#3224)
https://github.com/SonarSource/SonarJS/issues/4243
2023-10-11 08:47:14 +02:00
SonarTech
7ca31fbd53 update coverage information 2023-10-11 00:33:00 +00:00
Fred Tingaud
281206d0f4
Modify S1068: Migrate to LayC - unused private fields
Co-authored-by: Renaud T. <125455319+renaud-tognelli-sonarsource@users.noreply.github.com>
2023-10-10 18:27:17 +02:00
Zsolt Kolbay
82ea93b92a
Modify S1128: Migrate To LayC (#3227) 2023-10-10 16:26:46 +02:00
Yassin Kammoun
daff220c8c
Modify S1440: Migrate To LayC (#3231)
## 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-10-10 16:18:03 +02:00
Yassin Kammoun
50aa10ee82
Modify S3498: Migrate To LayC (#3232)
## 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-10-10 16:17:39 +02:00
Yassin Kammoun
3690f3f602
Modify S4204: Migrate To LayC (#3230)
## 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-10-10 16:17:26 +02:00
Philipp Dominik Schubert
688ece04b0
Modify rule S1854: Update 'quickfix' field (#3223) 2023-10-09 17:27:23 +02:00
David Kunzmann
4ec8a289b7
Modify rule S6742: allow for up to 6 chained operation on pandas (#3218) 2023-10-09 15:31:10 +02:00
Amelie Renard
03fddd2caa Modify rule S6197: add diff view and documentation link 2023-10-09 13:50:05 +02:00
Amelie Renard
bf4d80da9e Modify rule S2808: add diff view and documentation link 2023-10-09 13:50:05 +02:00
Amelie Renard
60713ff114 Modify rule S6179: add documentation links 2023-10-09 13:50:05 +02:00
Amelie Renard
da6cde9fd0 Modify rule S6172: fix typo and add diff view 2023-10-09 13:50:05 +02:00
Amelie Renard
2b7da997d2 Modify rule S6178: fix typo and reword 2023-10-09 13:50:05 +02:00
Amelie Renard
5e831aed2f Modify rule S3252: add diff view 2023-10-09 13:50:05 +02:00
Amelie Renard
faf38605f7 Modify rule S5259: add diff view 2023-10-09 13:50:05 +02:00
Cristian Ambrosini
ea83931eb0
Add CI task to validate file extension (#3196)
The dotnet squad would like to improve the rule specification sprint
process requiring some UTs to be temporarily added under the rule folder
on RSPEC repository. These test case files (`.cs` and `.vb`) will be
copied to the sonar-dotnet repository during the initial phases of
implementation and will serve as an initial test bed.
However, before merging the PR on the RSPEC side we need to make sure
that these test case files are deleted and they don't end up on master.

The goal of this PR would be to add a check on the pipeline that will
fail if `.cs` or `.vb` files are detected (it's acceptable if it's red
until the implementation is done).
2023-10-09 10:37:38 +02:00
Philipp Dominik Schubert
7c129a0f1b
Modify rule S6183: Expand and adjust for LaYC
## 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: Arseniy Zaostrovnykh <arseniy.zaostrovnykh@sonarsource.com>
2023-10-06 16:23:25 +02:00
Egon Okerman
fbef2e2b77
Modify rule S6700: Fix broken link (#3212)
## 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-10-06 14:29:49 +02:00
github-actions[bot]
7153f91dd5
Create rule S6740: dtype parameter should be provided when using pandas.read_csv or pandas.read_table (#2989)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6740/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>
Co-authored-by: Guillaume Dequenne <guillaume.dequenne@sonarsource.com>
2023-10-06 11:50:49 +02:00
github-actions[bot]
66489e514e
Create rule S6741: The 'pandas.DataFrame.to_numpy()' method should be preferred to the 'pandas.DataFrame.values' attribute (#2992)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6741/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>
Co-authored-by: Guillaume Dequenne <guillaume.dequenne@sonarsource.com>
2023-10-06 11:49:46 +02:00
github-actions[bot]
d0f831d4f6
Create rule S6735: When using pandas.merge or pandas.join, the parameters on, how and validate should be specified (#2982)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6735/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>
Co-authored-by: Guillaume Dequenne <guillaume.dequenne@sonarsource.com>
2023-10-06 11:48:43 +02:00
github-actions[bot]
75804cf4ad
Create rule S6742: pandas.pipe method should be preferred over long chains of instructions (#2995)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6742/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-10-06 11:39:00 +02:00
github-actions[bot]
c43d5c93de
Create rule S6734: inplace=True should not be used when modifying a Pandas DataFrame (#2979)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6734/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>
2023-10-06 11:24:42 +02:00
SonarTech
fbac893db7 update coverage information 2023-10-06 00:33:55 +00:00
Yassin Kammoun
4de0494a66
Modify rule S6774: Add missing "How to fix it" section (#3208) 2023-10-05 16:43:51 +02:00
Yassin Kammoun
acdf38834c
Modify rule S6767: Fix syntax highlighting (#3207) 2023-10-05 16:43:41 +02:00
Yassin Kammoun
a828fe93e6
Fix attribute and impact classification of MMF-2857 rules (#3205) 2023-10-05 16:14:49 +02:00
Philipp Dominik Schubert
b5aa5659d0
Modify rule S3519: Expand and adjust for LaYC
## 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: Arseniy Zaostrovnykh <arseniy.zaostrovnykh@sonarsource.com>
Co-authored-by: Balázs Benics <108414871+balazs-benics-sonarsource@users.noreply.github.com>
2023-10-05 13:59:39 +00:00
Amelie Renard
d324d16572 Modify rule S6228: reword and add documentation link 2023-10-05 15:02:59 +02:00
Amelie Renard
a5ce9d9a28 Modify rule S6226: add diff view and documentation link 2023-10-05 15:02:59 +02:00
Amelie Renard
dfa7f018ae Modify rule S5266: add documentation link 2023-10-05 15:02:59 +02:00
Amelie Renard
020f1d2f98 Modify rule S5263: add diff view and add documentation links 2023-10-05 15:02:59 +02:00
Amelie Renard
8c40222b3c Modify rule S6230: reformat and add documentation link 2023-10-05 15:02:59 +02:00
Amelie Renard
aeef7056f6 Modify rule S5381: add documentation link 2023-10-05 15:02:59 +02:00
Philipp Dominik Schubert
08b073a28a
Modify rule S946: Expand and adjust for LaYC
## 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: Fred Tingaud <95592999+frederic-tingaud-sonarsource@users.noreply.github.com>
Co-authored-by: Balázs Benics <108414871+balazs-benics-sonarsource@users.noreply.github.com>
2023-10-05 14:04:03 +02:00
SonarTech
18dd3bee0e update coverage information 2023-10-05 00:33:02 +00:00
Sylvain Kuchen
1507896f09
Modify rule S2583: Migrate Python description to LaYC format (#3198) 2023-10-04 17:33:26 +02:00
Anton Haubner
e12217fbc8
Modify rule S115: Extend LaYC content (#3199) 2023-10-04 16:39:18 +02:00
Philipp Dominik Schubert
f45132d5aa
Modify rule S2637: Expand and adjust for LaYC
## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)

---------

Co-authored-by: Arseniy Zaostrovnykh <arseniy.zaostrovnykh@sonarsource.com>
2023-10-04 13:02:47 +02:00
Sylvain Kuchen
03b6321d0f
Modify rule S1120: Migrate to LaYC format (#3195)
Co-authored-by: Anton Haubner <anton.haubner@sonarsource.com>
2023-10-04 12:30:43 +02:00
John-Clifton-SonarSource
7015855f79
Add additional LayC guidance in docs (#3193)
Adding in additional material and a bit of refactoring for clarity.

## 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. <91723853+loris-s-sonarsource@users.noreply.github.com>
2023-10-04 11:19:33 +01:00
Sylvain Kuchen
31d9a8ce3f
Modify rule S3740: Migrate to LaYC format (#3191) 2023-10-04 10:01:40 +02:00
Philipp Dominik Schubert
3d55ef2283
Modify rule S3518: Expand and adjust for LaYC
## 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: Arseniy Zaostrovnykh <arseniy.zaostrovnykh@sonarsource.com>
2023-10-04 07:16:23 +00:00
github-actions[bot]
a8e483f1fb
Create rule S6786: GraphQL introspection should not be allowed (#3170)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6786/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: jamie-anderson-sonarsource <jamie-anderson-sonarsource@users.noreply.github.com>
Co-authored-by: Jamie Anderson <jamie.anderson@sonarsource.com>
2023-10-03 17:20:48 +01:00
Amelie Renard
9474d7d41d Modify rule S6013: reword 2023-10-03 09:59:15 +02:00
Amelie Renard
258f2055da Modify rule S6010: add diff view and add documentation link 2023-10-03 09:59:15 +02:00
Amelie Renard
54626a31b9 Modify rule S6011: reword 2023-10-03 09:59:15 +02:00
Amelie Renard
c81ad8013a Modify rule S6006: reword and add diff view 2023-10-03 09:59:15 +02:00
Amelie Renard
6366a32909 Modify rule S6003: fix typo and add diff view 2023-10-03 09:59:15 +02:00
Amelie Renard
c9129191e8 Modify rule S6024: add diff view 2023-10-03 08:23:15 +02:00
Amelie Renard
c80935f152 Modify rule S6022: add diff view and documentation link 2023-10-03 08:23:15 +02:00
Amelie Renard
3d87500226 Modify rule S6029: fix grammar and add diff highlighting 2023-10-03 08:23:15 +02:00
Amelie Renard
c04b059734 Modify rule S5825: fix typos and add documentation links 2023-10-03 08:23:15 +02:00
Amelie Renard
77dee24e77 Modify rule S3636: fix typo and add diff view 2023-10-03 08:23:15 +02:00
Amelie Renard
4b388386fe Modify rule S5817: add diff view 2023-10-03 08:23:15 +02:00
Amelie Renard
e104cb5948 Modify rule S3608: fix punctuation and add link to related rule 2023-10-03 08:23:15 +02:00
Amelie Renard
cfb92b35ce Modify rule S1669: add documentation links 2023-10-03 08:23:15 +02:00
Amelie Renard
d9bef1a112 Modify rule S936: add diff view 2023-10-03 08:23:15 +02:00
Amelie Renard
921d6b0a2c Modify rule S5997: add diff view and documentation link 2023-10-03 08:23:15 +02:00
SonarTech
5a6cd5b046 update coverage information 2023-10-03 00:32:49 +00:00
Anton Haubner
0db46f8c47
Modify rule S2190: Extend LaYC content for Java (#3189) 2023-10-02 15:48:58 +02:00
Loris S
988a6d92be
Modify S6471(docker): Improve fix section (#3183)
## 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: Egon Okerman <egon.okerman@sonarsource.com>
2023-10-02 15:30:45 +02:00
John-Clifton-SonarSource
a07adc5397
Modify rule S3776: Add cog complexity blog post link (#3169)
Added the cognitive complexity blog post link so that it shows up in the
'more info' tab for all languages.

## 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-10-02 10:46:19 +02:00
SonarTech
a10aa486c2 update coverage information 2023-09-30 00:32:42 +00:00
Sebastien Andrivet
6a11e47682
Modify rule S6377: Change text to education framework format (APPSEC-1110) (#3164)
## 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-29 15:47:49 +02:00
Sebastien Andrivet
38c07d1d12
Modify rule S5679: Change text to education framework format (APPSEC-1107) (#3159)
## 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: gaetan-ferry-sonarsource <112399173+gaetan-ferry-sonarsource@users.noreply.github.com>
2023-09-29 15:45:34 +02:00
Sebastien Andrivet
624fbe318f
Modify rule S5773: Change text to education framework format (APPSEC-1112) (#3166)
## 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-29 15:43:53 +02:00
gaetan-ferry-sonarsource
2b814963d3
Modify S6437: Change text to LaYC format (APPSEC-1111) (#3165) 2023-09-29 14:44:00 +02:00
Cristian Ambrosini
86607c7d86
Modify rule S3241: Add C# snippet (#3182) 2023-09-29 14:40:11 +02:00
Sebastien Andrivet
cdf572bb12
Modify rule S6376: Change text to education framework format (APPSEC-1109) (#3161)
## 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-29 14:39:25 +02:00
gaetan-ferry-sonarsource
0f18b04ab8
Modify S4601: Change text to LaYC format (APPSEC-1150) (#3172) 2023-09-29 12:26:39 +00:00
Anton Haubner
3bfd5bcb3c
Modify rule S2259: Extend LaYC content for Python (#3178) 2023-09-29 13:44:06 +02:00
Sylvain Kuchen
a115a74fbe
Modify rule S5786: Migrate to LaYC format (#3181) 2023-09-29 12:35:22 +02:00
Sylvain Kuchen
e52e294049
Modify rule S6416: Adapt to LaYC format (#3168) 2023-09-29 10:11:43 +02:00
github-actions[bot]
b5ba51c0d4
Create rule S6784 (#3154) 2023-09-29 10:11:04 +02:00
Sebastien Andrivet
1a5894a5a2
Add texts that were not merged. (#3180)
## 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-29 09:36:30 +02:00
Sebastien Andrivet
9666fd7c0e
Modify rule S5344: Change text to education framework format (APPSEC-1106) (#3152)
## 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: gaetan-ferry-sonarsource <112399173+gaetan-ferry-sonarsource@users.noreply.github.com>
2023-09-29 09:07:00 +02:00
SonarTech
f99e5a6044 update coverage information 2023-09-29 00:32:55 +00:00
Anton Haubner
193a94f32f
Modify rule S2589: Extend LaYC content for Python (#3173) 2023-09-28 17:34:32 +02:00
Fred Tingaud
9303db1099
Modify rule S3471: LaYC - virtual / override 2023-09-28 15:07:15 +00:00
Amelie Renard
73c22664d7 Modify rule S1006: add diff view 2023-09-28 16:48:29 +02:00
Amelie Renard
821b1c0063 Modify rule S4998: add diff view and add documentation link 2023-09-28 16:48:29 +02:00
Amelie Renard
c43814ac81 Modify rule S3539: add diff view 2023-09-28 16:48:29 +02:00
Amelie Renard
280e2c8c9a Modify rule S5955: add diff view and fix wording 2023-09-28 16:48:29 +02:00
Amelie Renard
423bfd6ca2 Modify rule S3656: add diff view and fix wording 2023-09-28 16:48:29 +02:00
Amelie Renard
8a300746b2 Modify rule S3624: fix wording and add documentation link 2023-09-28 16:48:29 +02:00
Amelie Renard
269c631565 Modify rule S5506: fix typos and add documentation link 2023-09-28 16:48:29 +02:00
Amelie Renard
fad37ccef0 Modify rule S5502: fix punctuation and add documentation link 2023-09-28 16:48:29 +02:00
Amelie Renard
383e6437f7 Modify rule S6367: fix typo and add documentation link 2023-09-28 16:48:29 +02:00
Sylvain Kuchen
e2d2dd14f2
Modify rule S6322: Migrate to LaYC format (#3171) 2023-09-28 16:22:47 +02:00
Philipp Dominik Schubert
66d4fe3a0d
Modify rule S1854: Expand and adjust for LaYC
## 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: Arseniy Zaostrovnykh <arseniy.zaostrovnykh@sonarsource.com>
2023-09-28 13:25:53 +00:00
Fred Tingaud
03a7ce526c
Modify rule S4962: LaYC format 2023-09-28 15:21:02 +02:00
gaetan-ferry-sonarsource
f1c356477b
Modify S6373: Change text to the LaYC format (APPSEC-1108) (#3162) 2023-09-28 12:57:40 +00:00
gaetan-ferry-sonarsource
8ab8c5bf10
Modify S4684: Change text to education framework format (APPSEC-1104) (#3149) 2023-09-28 14:44:41 +02:00
gaetan-ferry-sonarsource
828d958459
Modify S5301: Change text for LaYC (APPSEC-1105) (#3151) 2023-09-28 14:03:57 +02:00
Anton Haubner
9b3b79f51c
Modify rule S3518: More LaYC Content for Python and Java (#3167) 2023-09-28 11:35:02 +02:00
Amelie Renard
b965af0518 Modify rule S5950: Move exception code example and update links 2023-09-28 09:52:23 +02:00
Amelie Renard
e5b3e078f3 Modify rule S1155: Update title and add diff view 2023-09-28 09:52:23 +02:00
Amelie Renard
603a496666 Modify rule S797: Add documentation link 2023-09-28 09:52:23 +02:00
Amelie Renard
6695f11a46 Modify rule S1912: add diff view 2023-09-28 09:52:23 +02:00
Amelie Renard
a310fd0ffe Modify rule S6023: add documentation link 2023-09-28 09:52:23 +02:00
Amelie Renard
9bfcd05b89 Modify rule S2303: fix punctuation 2023-09-28 09:52:23 +02:00
Amelie Renard
4c7311ab8d Modify rule S6018: add documentation link 2023-09-28 09:52:23 +02:00
Amelie Renard
cb800586a9 Modify rule S6494: fix typos 2023-09-28 09:52:23 +02:00
github-actions[bot]
e310d84369
Create rule S6680: Loop boundaries should not be vulnerable to injection attacks (#3140) 2023-09-28 09:10:12 +02:00
github-actions[bot]
7dd10827b3
Create rule S6639: Memory allocations should not be vulnerable to Denial of Service attacks (#3153) 2023-09-28 09:09:02 +02:00
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
Fred Tingaud
b50eeb561b
Modify rule S1301: LaYC - switch replacable by if 2023-09-21 16:45:49 +02:00
Marcin Stachniuk
550aea9c16
Modify rule S6584: Environment variables should not be unset on a different layer than they were set (#3117)
## 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-21 16:35:05 +02:00
Amelie Renard
4bef0bbcc7 Modify rule S1181: fix typos and add diff view 2023-09-21 16:29:51 +02:00
Amelie Renard
85b3266b1e Modify rule S6234: reorder code examples 2023-09-21 16:29:51 +02:00
Amelie Renard
bf9d14adc7 Modify rule S6171: fix typo and add diff view 2023-09-21 16:29:51 +02:00
Amelie Renard
b9cf5c5103 Modify rule S6462: add diff view 2023-09-21 16:29:51 +02:00
Amelie Renard
aadcc931dc Modify rule S6495: add missing spaces and move exception example 2023-09-21 16:29:51 +02:00
Amelie Renard
a5c131dc3d Modify rule S4997: add diff view and add documentation link 2023-09-21 16:29:51 +02:00
Amelie Renard
5bbbe3cd89 Modify rule S6489: Add link to documentation 2023-09-21 16:29:51 +02:00
Amelie Renard
a2625d277b Modify rule S6181: Add link to documentation 2023-09-21 16:29:51 +02:00
Mary Georgiou
04826dcd27
Modify S4829: Delete (#3116) 2023-09-21 15:25:41 +02:00
Mary Georgiou
89370f7c45
Modify S4823: Delete (#3115)
Deleting S4823 as it has been deprecated.
Deprecated since:

sonar-dotnet 8.9.0.19135, released on Jun 26, 2020
SQ 8.4.0.35506 on Jul 3, 2020.
2023-09-21 15:23:58 +02:00
Fred Tingaud
32fcbebbd7
Modify rule S1871: LaYC format 2023-09-21 14:53:16 +02:00
Marco Borgeaud
85fd6c60dc
Modify (fake) rule S6620: Document limitation with multiple compliant solutions in diff-view (#3112) 2023-09-21 09:55:10 +00:00
Fred Tingaud
b64dbf06d6
Modify rule S5827: LaYC - auto on redundant type 2023-09-21 11:12:28 +02:00
Egon Okerman
ba6e52e303
Modify rule S6317: Fix missing diff view (#3032)
## 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-21 10:04:41 +02:00
SonarTech
d707dfa2d2 update coverage information 2023-09-21 00:33:01 +00:00
github-actions[bot]
6aa9715732
Create rule S6779: Flask secret keys should not be disclosed (#3093) 2023-09-20 17:35:54 +02:00
github-actions[bot]
4ea97c7e0e
Create rule S6760: Yandex (APPSEC-1068) (#3044)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6760/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: sebastien-andrivet-sonarsource <sebastien-andrivet-sonarsource@users.noreply.github.com>
Co-authored-by: sebastien-andrivet-sonarsource <sebastien.andrivet@sonarsource.com>
2023-09-20 17:21:24 +02:00
github-actions[bot]
f4a5207fb8
Create rule S6777: Shippo tokens should not be disclosed (#3088)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6777/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: sebastien-andrivet-sonarsource <sebastien-andrivet-sonarsource@users.noreply.github.com>
Co-authored-by: sebastien-andrivet-sonarsource <sebastien.andrivet@sonarsource.com>
2023-09-20 15:19:39 +02:00
daniel-teuchert-sonarsource
732ed4108f
APPSEC-1090: S4423 Improved RSPEC example (#3096)
## 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-20 14:46:42 +02:00
daniel-teuchert-sonarsource
14dbf9d5f3
APPSEC-1088: S6385 Improve RSPEC (#3092)
## 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. <91723853+loris-s-sonarsource@users.noreply.github.com>
2023-09-20 14:45:38 +02:00
Amelie Renard
ae2e610d5c Modify rule S6200: Fix punctuation 2023-09-20 14:18:08 +02:00
Amelie Renard
5c4b06514b Modify rule S5269: Fix spelling 2023-09-20 14:18:08 +02:00
Amelie Renard
0f9166a21c Modify rule S3726: Add link to documentation 2023-09-20 14:18:08 +02:00
Amelie Renard
c83dde690d Modify rule S5999: Add link to documentation 2023-09-20 14:18:08 +02:00
Amelie Renard
e004416efc Modify rule S5302: Fix spelling + add diff view 2023-09-20 14:18:08 +02:00
Amelie Renard
c50c0e5e0e Modify rule S5417: Add diff view 2023-09-20 14:18:08 +02:00
Amelie Renard
977028ea27 Modify rule S2216: Make the description more accessible 2023-09-20 14:18:08 +02:00
Amelie Renard
b1e8675ac0 Modify rule S5501: Fix grammar and typo 2023-09-20 14:18:08 +02:00
Amelie Renard
2f12a6a728 Modify rule S3135: Update Noncompliant code example 2023-09-20 14:18:08 +02:00
Yassin Kammoun
3918a1a702
Modify rule S6759: Restrict the scope to functional components (#3102) 2023-09-20 11:22:36 +02:00
github-actions[bot]
06238c1243
Create rule S6782: Docker Hub tokens should not be disclosed (APPSEC-1129) (#3103)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6782/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: egon-okerman-sonarsource <egon-okerman-sonarsource@users.noreply.github.com>
Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
2023-09-20 10:12:55 +02:00
github-actions[bot]
168f231de8
Create rule S6769: Shopify tokens should not be disclosed (APPSEC-1076) (#3068)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6769/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: egon-okerman-sonarsource <egon-okerman-sonarsource@users.noreply.github.com>
Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
2023-09-20 10:12:37 +02:00
github-actions[bot]
42b25db4ca
Create rule S6771: Postman tokens should not be disclosed (#3074)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6771/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: sebastien-andrivet-sonarsource <sebastien-andrivet-sonarsource@users.noreply.github.com>
Co-authored-by: sebastien-andrivet-sonarsource <sebastien.andrivet@sonarsource.com>
2023-09-20 10:11:25 +02:00
github-actions[bot]
7fbb1cf2ac
Create rule S6752: Artifactory tokens should not be disclosed (#3023) 2023-09-20 07:31:15 +00:00
SonarTech
f3df25cbfb update coverage information 2023-09-20 00:33:05 +00:00
github-actions[bot]
95d7e2c516
Create rule S6755: DigitalOcean tokens should not be disclosed (APPSEC-1063) (#3029)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6755/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: egon-okerman-sonarsource <egon-okerman-sonarsource@users.noreply.github.com>
Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
Co-authored-by: gaetan-ferry-sonarsource <112399173+gaetan-ferry-sonarsource@users.noreply.github.com>
2023-09-19 17:40:09 +02:00
github-actions[bot]
08a359a6ae
Create rule S6765: Figma tokens should not be disclosed (APPSEC-1075) (#3055)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6765/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: egon-okerman-sonarsource <egon-okerman-sonarsource@users.noreply.github.com>
Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
2023-09-19 16:55:08 +02:00
Alexander Kamushkin
ed2d2171f3
Modify rule S6766: Remove ' and " from the list of forbidden entitiles (#3099)
https://github.com/SonarSource/SonarJS/issues/4178
2023-09-19 16:21:48 +02:00
github-actions[bot]
496edb7d4a
Create rule S6753: Zuplo (APPSEC-1067) (#3026)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6753/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: sebastien-andrivet-sonarsource <sebastien-andrivet-sonarsource@users.noreply.github.com>
Co-authored-by: sebastien-andrivet-sonarsource <sebastien.andrivet@sonarsource.com>
2023-09-19 15:32:25 +02:00
Alejandro Álvarez Ayllón
7e7b20a0c5
Modify rule S1763: Adapt to LaYC
Co-authored-by: Fred Tingaud <95592999+frederic-tingaud-sonarsource@users.noreply.github.com>
2023-09-19 10:35:46 +02:00
Marco Borgeaud
ebe334e961
Modify rule S4999,S5000: LaYC format (#2712) 2023-09-19 08:14:39 +02:00
SonarTech
9c913cc26f update coverage information 2023-09-19 00:32:45 +00:00
github-actions[bot]
09a3ffc000
Create rule S6768: Typeform tokens should not be disclosed (APPSEC-1071) (#3066)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6768/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: egon-okerman-sonarsource <egon-okerman-sonarsource@users.noreply.github.com>
Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
2023-09-18 18:55:38 +02:00
Loris S
7b4a60b537
Modify S6337: Validation (#3085)
## 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-18 17:43:12 +02:00
daniel-teuchert-sonarsource
aa1d8509a5
APPSEC-1087: S6413 Improve RSPEC (#3091)
## 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. <91723853+loris-s-sonarsource@users.noreply.github.com>
2023-09-18 17:25:58 +02:00
github-actions[bot]
a8bb67f631
Create rule S6762: Grafana tokens should not be disclosed (APPSEC-1065) (#3046)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6762/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: egon-okerman-sonarsource <egon-okerman-sonarsource@users.noreply.github.com>
Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
2023-09-18 12:09:53 +02:00
github-actions[bot]
5045a4910c
Create rule S6774: React components should validate prop types (#3078) 2023-09-18 11:46:47 +02:00
github-actions[bot]
40561d6627
Create rule S6775: All defaultProps should have non-required PropType (#3082)
https://github.com/SonarSource/SonarJS/issues/4134
2023-09-18 11:31:32 +02:00
github-actions[bot]
87b1749628
Create rule S6778: Showcase RSPEC with 2 frameworks 2023-09-17 00:35:11 +02:00
SonarTech
fddd2674b8 update coverage information 2023-09-16 00:32:42 +00:00
github-actions[bot]
f86fdce98e
Create rule S6620 Sample rule that showcases advanced features of Asciidoc in rules 2023-09-15 16:35:15 +02:00
daniel-teuchert-sonarsource
064ed8c8f1
APPSEC-1049: S6388 Improve code examples (#3084)
This PR improves the examples for S6388.
## 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-15 16:18:29 +02:00
github-actions[bot]
d386e4a699
Create rule S6764: WakaTime (APPSEC-1069) (#3052)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6764/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: sebastien-andrivet-sonarsource <sebastien-andrivet-sonarsource@users.noreply.github.com>
Co-authored-by: sebastien-andrivet-sonarsource <sebastien.andrivet@sonarsource.com>
2023-09-15 15:34:28 +02:00
github-actions[bot]
054bdfb71c
Create rule S6751: PyPI tokens should not be disclosed (APPSEC-1073) (#3021)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6751/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: egon-okerman-sonarsource <egon-okerman-sonarsource@users.noreply.github.com>
Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
2023-09-15 15:25:35 +02:00
Peter Trifanov
83c164cac3
Modify rule S6584: Add message and highlighting, remove apk in favor of apt (#3071) 2023-09-15 15:21:37 +02:00
Loris S
aeb61ecc7d
Modify S6335: Validation (#3083)
## 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-15 15:07:15 +02:00
github-actions[bot]
e98468bc98
Create rule S6772: Spacing between inline elements should be explicit (#3075)
https://github.com/SonarSource/SonarJS/issues/4143
2023-09-15 14:37:46 +02:00
github-actions[bot]
5e318dfb5b
Create rule S6773: Hashicorp tokens should not be disclosed (#3077)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6773/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: sebastien-andrivet-sonarsource <sebastien-andrivet-sonarsource@users.noreply.github.com>
Co-authored-by: sebastien-andrivet-sonarsource <sebastien.andrivet@sonarsource.com>
2023-09-15 14:31:33 +02:00
github-actions[bot]
06e4b6313d
Create rule S6758: NPM access tokens should not be disclosed (APPSEC-1064) (#3041)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6758/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: egon-okerman-sonarsource <egon-okerman-sonarsource@users.noreply.github.com>
Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
2023-09-15 14:20:15 +02:00
Alejandro Álvarez Ayllón
d22709e54f
Modify rule S905: Adapt for LaYC
Co-authored-by: Balázs Benics <108414871+balazs-benics-sonarsource@users.noreply.github.com>
2023-09-15 09:03:39 +00:00
SonarTech
cc61ca8dfa update coverage information 2023-09-15 00:32:48 +00:00
Loris S
8df177e2a1
Modify S6334: Make the description consistent and add sample (#3069)
## 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-14 17:45:21 +02:00
Loris S
80179dd99b
Modify S6290(secrets): Validation (#3079)
## 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-14 15:10:18 +00:00
Peter Trifanov
89c4343dd1
Modify rule S6581: Update message, rephrase wording for LaYC format (#3076) 2023-09-14 16:11:59 +02:00
Michael Jabbour
cc7bfe8518
Modify rule S5523: Correct spec and update metadata (#3054)
- Metadata is updated so that it is consistent with the metadata of the
new MISRA rule M23_321. See SonarSource/sonar-cpp#3006.
- Correct the spec since the implementation has been updated later so
that it raises only on built-in and pointer types. See
SonarSource/sonar-cpp#684.

## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-09-14 15:52:18 +02:00
github-actions[bot]
5ad8095d83
Create rule S6770: User-defined JSX components should use Pascal case (#3073) 2023-09-14 15:18:20 +02:00
Marco Borgeaud
915ef808a2
RULEAPI-788 Turn diff-view validation on (#2883) 2023-09-14 12:03:01 +02:00
Loris S
84d9a3c065
Modify S6338: Improve samples (#3072)
## 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-14 11:50:10 +02:00
daniel-teuchert-sonarsource
c8a953286f
APPSEC-1083: S6382 Fixed incorrect ARM examples (#3056)
## 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. <91723853+loris-s-sonarsource@users.noreply.github.com>
2023-09-14 11:41:28 +02:00
github-actions[bot]
e61222637f
Create rule S6766: JSX special characters should be escaped (#3057)
https://github.com/SonarSource/SonarJS/issues/4139
2023-09-14 11:15:57 +02:00
Rudy Regazzoni
30036c6eb4
Modify rule S6388: Remove diff-id on compliant example without non-compliant equivalent (#3070)
## 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)

[Related
issue](https://github.com/SonarSource/rspec/pull/1925#pullrequestreview-1624869461)
2023-09-14 09:56:56 +02:00
github-actions[bot]
e4e7d4738e
Create rule S6767: Unused React typed props should be removed (#3059) 2023-09-14 09:39:26 +02:00
SonarTech
70f705394d update coverage information 2023-09-14 00:33:59 +00:00
Egon Okerman
a9c9fb99ff
Modify rule S4423, S6378, S6387, S6656: Fix diff view errors in ARM examples (#3067)
## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-09-13 17:48:09 +02:00
Marco Borgeaud
3075880d75
Modify rule S127: fix diff-id and diff-type (#3035) 2023-09-13 16:44:16 +02:00
Marco Borgeaud
11a2f3acbd
Modify rule S2251: fix diff-id (#3036) 2023-09-13 16:39:32 +02:00
github-actions[bot]
a630b5dd26
Create rule S6759: React props should be read-only (#3043) 2023-09-13 15:58:40 +02:00
daniel-teuchert-sonarsource
9a888ec176
APPSEC-1082 Validate S6381 ARM (#3022)
## 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-13 15:50:36 +02:00
daniel-teuchert-sonarsource
c02882ec9f
APPSEC-1082: S6381 Adjust code examples so that they can be scanned by Sonarqube (#3050)
This PR adjusts the JSON code examples and adds a name field that is
needed for the files to be recognized by sonar-iac-plugin.

## 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-13 15:49:57 +02:00
daniel-teuchert-sonarsource
b22dae5811
APPSEC-1080: S6364 Adjust the retention period of the compliant examples (#3049)
This PR adjusts the retention period from the compliant examples so that
they do not raise security hotspots when scanned with the Sonarway
profile.

## 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-13 15:49:15 +02:00
daniel-teuchert-sonarsource
9f5a87c298
Arm/make examples schema compliant (#3047)
This PR changes the JSON examples for ARM rules to make sure that the
code samples will be scanned by sonar-iac-plugin.
To ensure this all resources need a name field and the schema URL has to
be an https and not http URL.

## 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-13 15:48:50 +02:00
daniel-teuchert-sonarsource
2b6572864d
APPSEC-1077: S6329 Improve examples fso that they can be scanned with sonar-iac (#3048)
This PR fixes the code examples for ARM for rule S6329 so that they can
be scanned with Sonarqube.
The schema URL for the JSON examples has to be https and for the bicep
examples, the correct quotes need to be used.

## 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-13 15:48:25 +02:00
Rudy Regazzoni
d2c8e2fdad
Modify rule S6388: Add language AzureResourceManager (Bicep) (#1925)
Specification ticket:
https://sonarsource.atlassian.net/browse/SONARIAC-759
2023-09-13 15:29:57 +02:00
github-actions[bot]
bc5795a24c
Create rule S6761: children and dangerouslySetInnerHTML should not be used together (#3045)
https://github.com/SonarSource/SonarJS/issues/4136
2023-09-13 11:36:36 +02:00
Angelo
c4bf7e1391
Fix typo in S1774 rule.adoc and remove broken link in S6411 rule.adoc (#3053) 2023-09-13 10:28:37 +02:00
Egon Okerman
905365e865
Modify rule S6380: Add language AzureResourceManager (Bicep) (#2298) 2023-09-13 10:27:43 +02:00
Egon Okerman
17040a154f
Modify rule S6656: add language AzureResourceManager (Bicep) (#2356) 2023-09-13 10:27:13 +02:00
Egon Okerman
bc2c537f49
Modify rule S6378: Add language AzureResourceManager (Bicep) (#2255) 2023-09-13 10:26:31 +02:00
Egon Okerman
ebc3f49dd0
Modify rule S6364: Add language AzureResourceManager (Bicep) (#1913) 2023-09-13 10:25:38 +02:00
Egon Okerman
4c61cfe3b9
Modify rule S6387: Add language AzureResourceManager (Bicep) (#1907) 2023-09-13 10:25:18 +02:00
Egon Okerman
897bb45fbf
Modify rule S4423: Add language AzureResourceManager (Bicep) (#1879) 2023-09-13 10:25:04 +02:00
github-actions[bot]
9b3de2dd1f
Create rule S6763: "shouldComponentUpdate" should not be defined when extending "React.PureComponent" (#3051) 2023-09-13 09:28:25 +02:00
SonarTech
84d49d5c29 update coverage information 2023-09-13 00:32:47 +00:00
github-actions[bot]
320b22a2fb
Create rule S6757: this should not be used in functional components (#3040)
https://github.com/SonarSource/SonarJS/issues/4133
2023-09-12 16:36:10 +02:00
Marco Borgeaud
b7ad927009
Modify rule S6600: remove extra diff-view (#3039) 2023-09-12 15:21:04 +02:00
Marco Borgeaud
367e056eaf
Modify rule S2004: remove extra diff-view (#3038) 2023-09-12 15:20:48 +02:00
Marco Borgeaud
65e74c0a9e
Modify rule S1599: remove extra diff-view (#3037) 2023-09-12 15:20:32 +02:00
Marco Borgeaud
7f98f4246c
RULEAPI-788 Allow multiple compliant solutions (#3034)
See https://discuss.sonarsource.com/t/layc-diff-view-validation/15392/7
2023-09-12 13:16:52 +02:00
Marco Borgeaud
aecbd213d7
Modify rule S1048: remove extra space in code snippet 2023-09-12 11:08:49 +02:00
github-actions[bot]
6e57fd6621
Create rule S6754: The return value of "useState" should be destructured and named symmetrically (#3027) 2023-09-12 09:53:37 +02:00
github-actions[bot]
bad897989e
Create rule S6748: React children should not be passed as prop (#3014)
https://github.com/SonarSource/SonarJS/issues/4129
2023-09-12 09:48:05 +02:00
github-actions[bot]
f441c79d18
Create rule S6756: \"setState\" should use a callback when referencing the previous state (#3031) 2023-09-12 09:38:39 +02:00
SonarTech
99d7952a2b update coverage information 2023-09-12 00:32:32 +00:00
github-actions[bot]
eafd5fac25
Create rule S6750: The return value of \"ReactDOM.render\" should not be used (#3017) 2023-09-11 11:52:43 +02:00
daniel-teuchert-sonarsource
36f172fa8a
APPSEC-1053 Validate S6648 ARM default value for secret (#3019)
## 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-11 10:02:45 +02:00
daniel-teuchert-sonarsource
8e2f0268bd
APPSEC-1049 Validate S6382 for ARM (#3024)
## 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-11 09:07:59 +02:00
SonarTech
823100a75b update coverage information 2023-09-09 00:33:07 +00:00
Marcin Stachniuk
babdfd5c94
Modify rule S6597: "WORKDIR" instruction should be used instead of "cd" commands (#3028)
## 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: Jonas Wielage <127737854+jonas-wielage-sonarsource@users.noreply.github.com>
2023-09-08 21:40:09 +02:00
Mary Georgiou
fa3a50811e
Pull requests list Modify S4818: Delete (#3001)
Deleting S4818 as it has been deprecated.
Deprecated since:

sonar-dotnet 8.9.0.19135, released on Jun 26, 2020
SQ 8.4.0.35506 on Jul 3, 2020.
2023-09-08 13:45:00 +02:00
daniel-teuchert-sonarsource
a91542370a
APPSEC-1056 Modify S6336(secrets): Make text compliant (#3013)
## 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. <91723853+loris-s-sonarsource@users.noreply.github.com>
2023-09-08 10:00:48 +02:00
daniel-teuchert-sonarsource
fcda64cd35
APPSEC-1050 Modify S6378(ARM): Fix typo and adjust code examples (#3010)
## 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-07 17:36:14 +02:00
daniel-teuchert-sonarsource
66d3ddb728
APPSEC-1015 Validate S6379(secrets): ARM (#3018)
## 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-07 17:35:51 +02:00
Loris S
f2bf838cde
Modify S6388(ARM): Fix diffs (#3025)
## 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-07 17:30:00 +02:00
Loris S
23fc89f4e5
APPSEC-1061 Modify S6292(secrets): Make text compliant (#3008)
## 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-07 16:57:08 +02:00
SonarTech
1eb17f2185 update coverage information 2023-09-07 00:32:48 +00:00
github-actions[bot]
cb28ce6141
Create rule S6749: Redundant React fragments should be removed (#3016) 2023-09-06 15:58:00 +02:00
Michael Jabbour
52a3774c6e
CPP-4618 Use consistent CCT attributes for rules similar to MISRA 2023 (#3015)
Change the CCT attribute for some Sonar rules such that they are
consistent with the attribute chosen for similar MISRA 2023 rules.
2023-09-06 14:26:36 +02:00
github-actions[bot]
4cb2e9d55b
Create rule S6747: JSX elements should not use unknown properties and attributes (#3012) 2023-09-06 12:36:13 +02:00
Mary Georgiou
14757fa3a4
Modify S4787: Delete (#3000)
Deleting S4787 as it has been deprecated.
Deprecated since:

sonar-dotnet 8.9.0.19135, released on Jun 26, 2020
SQ 8.4.0.35506 on Jul 3, 2020.
2023-09-06 09:20:27 +02:00
github-actions[bot]
a9ed8edc19
Create rule S6746: In React this.state should not be mutated directly (#3009)
https://github.com/SonarSource/SonarJS/issues/4128
---------

Co-authored-by: alexander-kamushkin-sonarsource <alexander-kamushkin-sonarsource@users.noreply.github.com>
2023-09-06 09:05:32 +02:00
Alejandro Álvarez Ayllón
e19f2c951d
Modify rule S1764: update to LaYC and sync with implementation
## 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
- [x] PR summary and labels follow the guidelines

---------

Co-authored-by: Amélie Renard <44666826+amelie-renard-sonarsource@users.noreply.github.com>
2023-09-05 16:37:24 +02:00
Egon Okerman
29e3105062
Modify rule S2254: update to LaYC format (APPSEC-1043) (#3003)
## 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-05 15:49:01 +02:00
Egon Okerman
0abf66041f
Update rule S5808: update to LaYC format (APPSEC-972) (#2991)
## 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-05 15:48:54 +02:00
Egon Okerman
0aa80c7af2
Modify rule S2647: Update to LaYC format (APPSEC-970) (#2917)
## 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-05 13:46:16 +00:00
sebastien-andrivet-sonarsource
db126ee15c
Deprecate rule S3884 (#3011)
## 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-05 13:27:15 +02:00
SonarTech
1cf71ae475 update coverage information 2023-09-05 00:33:57 +00:00
Loris S
e6506c521c
Modify S6388(IAC): Fix diff IDs (#3004)
## Why
https://cirrus-ci.com/task/4983664824549376?logs=asciidoc_tests#L117

## Outcome


https://github.com/SonarSource/rspec/blob/master/rules/S6388/azureresourcemanager/examples/Microsoft.Compute_disks.noncompliant.adoc
is empty for no reason

## 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-04 14:36:39 +02:00
Egon Okerman
e0b8bea72f
Modify rule S2612, S4423 (Go): fix diff-view errors (#3005)
## 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-04 14:23:47 +02:00
Loris S
4a579ed656
Modify S6173(Java): Improve samples (#3002)
## 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: Egon Okerman <egon.okerman@sonarsource.com>
2023-09-04 09:25:45 +00:00
SonarTech
687e024ef1 update coverage information 2023-09-01 00:34:02 +00:00
Loris Sierra
ea613bb1ae add daniel's suggestion 2023-08-31 16:09:32 +02:00
Loris Sierra
7227478644 Modify S6723(secrets): Fix docs links 2023-08-31 16:09:32 +02:00
Egon Okerman
b0968585b4
Modify rule S6432: update to LaYC format (APPSEC-974) (#2972)
## 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-08-31 15:05:45 +02:00
github-actions[bot]
ec657c23c8
APPSEC-1040: S6739(secrets) Detect Redis credentials (#2988)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6739/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: daniel-teuchert-sonarsource <daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: Daniel Teuchert <daniel.teuchert@sonarsource.com>
2023-08-31 13:34:15 +02:00
github-actions[bot]
62c5e35e40
Create rule S6736(secrets): AMQP Credentials should not be disclosed (#2985)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6736/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: daniel-teuchert-sonarsource <daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: Daniel Teuchert <daniel.teuchert@sonarsource.com>
Co-authored-by: daniel-teuchert-sonarsource <141642369+daniel-teuchert-sonarsource@users.noreply.github.com>
2023-08-31 10:23:54 +02:00
github-actions[bot]
d87780b1f3 Create rule S6732(secrets): Stripe Keys should not be hardcoded (#2977)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6732/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 S <91723853+loris-s-sonarsource@users.noreply.github.com>
2023-08-31 09:58:50 +02:00
github-actions[bot]
d9e2823570 Create rule S6733(secrets): Airtable API Keys should not be disclosed (#2978)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6733/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 S <91723853+loris-s-sonarsource@users.noreply.github.com>
2023-08-31 09:58:50 +02:00
Loris S
b3284f8e93
Modify S5335(php): Title update (#2990)
## 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-08-30 17:29:28 +02:00
Egon Okerman
d408fe4dd9
Modify rule S6301: update to LaYC format (APPSEC-973) (#2984)
## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-08-30 13:55:19 +02:00
Egon Okerman
efcf2bdd1a
Modify rule S6317: Update to LayC format (APPSEC-968) (#2949)
## 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-08-30 11:56:31 +02:00
sebastien-andrivet-sonarsource
2d4813b028
Modify rule S5876: Update to LayC format (APPSEC-969) (#2967)
## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)

---------

Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
2023-08-30 09:09:58 +02:00
David Kunzmann
b16ef47d90
Modify rule S6661(Python): Fixing typo in title (#2980) 2023-08-30 09:09:00 +02:00
SonarTech
dc98d476c7 update coverage information 2023-08-30 00:32:39 +00:00
github-actions[bot]
392e33a6f7 Create rule S6718(secrets): Stripe Keys should not be disclosed (#2943)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6718/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>
Co-authored-by: Loris S <91723853+loris-s-sonarsource@users.noreply.github.com>
2023-08-29 16:01:09 +02:00
github-actions[bot]
f283b8c276 Create rule S6731(secrets): Slack Bot Tokens should not be disclosed (#2973)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6731/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>
Co-authored-by: Loris S <91723853+loris-s-sonarsource@users.noreply.github.com>
2023-08-29 16:01:09 +02:00
github-actions[bot]
990ffb5be5 Create rule S6723(secrets): Mailgun API keys should not be disclosed (#2948)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6723/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-08-29 16:01:09 +02:00
github-actions[bot]
8919bc0cbe Create rule S6710(secrets): Firebase Cloud Messaging keys should not be disclosed (#2923)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6710/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>
Co-authored-by: Loris S <91723853+loris-s-sonarsource@users.noreply.github.com>
2023-08-29 16:01:09 +02:00
github-actions[bot]
557efaf3eb Create rule S6719(secrets): Alchemy keys should not be disclosed (#2944)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6719/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-08-29 16:01:09 +02:00
Loris S
d95396c132
Modify S6437(docker): Improve the samples (#2975) 2023-08-29 14:52:20 +02:00
github-actions[bot]
a1e6719485
Create rule S6722(secrets): PlanetScale database passwords should not be disclosed (#2947)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6722/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-08-29 14:34:32 +02:00
Loris S
1be862d28d
Modify S7000&S2091: Fix resource links (#2976) 2023-08-29 10:22:18 +02:00
github-actions[bot]
57e9ea916f Create rule S6717(secrets): Slack Workflow Webhook URLs should not be disclosed (#2942)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6717/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>
Co-authored-by: Loris S <91723853+loris-s-sonarsource@users.noreply.github.com>
2023-08-28 14:53:45 +02:00
github-actions[bot]
ec4643680c Create rule S6720(secrets): Zapier keys should not be disclosed (#2945)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6720/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-08-28 14:53:45 +02:00
github-actions[bot]
e131b6b2db Create rule S6721(secrets): Microsoft Teams webhooks URLs should not be disclosed (#2946)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6721/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-08-28 14:53:45 +02:00
github-actions[bot]
89aa9daaf1 Create rule S6713(secrets): Slack Incoming Webhook URLs should not be disclosed (#2928)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6713/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: daniel-teuchert-sonarsource <daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: Daniel Teuchert <daniel.teuchert@sonarsource.com>
Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com>
Co-authored-by: Loris S <91723853+loris-s-sonarsource@users.noreply.github.com>
2023-08-28 14:53:45 +02:00
Loghin Vlad-Andrei
e6ecadff0f
Modify rule S3590: LaYC format
## 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: Philipp Dominik Schubert <119606487+pdschbrt@users.noreply.github.com>
2023-08-28 14:50:46 +02:00
Loris S
875d39a1ee
Modify S5693: Add syntax highlighting (#2971) 2023-08-28 07:47:38 +00:00
SonarTech
c1d3b46306 update coverage information 2023-08-26 00:32:47 +00:00
Loris S
a0a00c4cba
Modify S5689: Clarify the rule stakes (#2911)
For review, have a look to our docs:
https://docs.sonarsource.com/sonarqube/9.8/extension-guide/adding-coding-rules/#coding-rule-guidelines

This should not be merged by an AppSec member, because it contains
message information. It should be merged by someone from SonarJS.

---------

Co-authored-by: daniel-teuchert-sonarsource <141642369+daniel-teuchert-sonarsource@users.noreply.github.com>
2023-08-25 19:32:17 +02:00
sebastien-andrivet-sonarsource
89de4d7476
Modify rule S2115: Update to LaYC format (APPSEC-799) (#2927)
## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-08-25 14:34:42 +02:00
Rudy Regazzoni
53ed3f06b4
Modify rule S5785: add examples with boolean literals (#2926)
## 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-08-25 13:55:18 +02:00
Peter Trifanov
9511a4a1b6
Modify rule S4144: Add more exceptions for PHP (#2969)
Co-authored-by: Jonas Wielage <127737854+jonas-wielage-sonarsource@users.noreply.github.com>
2023-08-25 09:51:18 +00:00
Philipp Dominik Schubert
1595dcd062
Modify rule S2095: Expand and adjust for LaYC
## 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-08-25 11:40:35 +02:00
SonarTech
6c7a0f2fea update coverage information 2023-08-25 00:32:48 +00:00
Antonio Aversa
ef664eee67
Modify rule S2566: Fix code example (#2963) 2023-08-24 18:56:29 +02:00
Peter Trifanov
1752e83ce8
Modify rule S117: Update regular expression for PHP (#2960) 2023-08-24 16:47:43 +02:00
Dorian Burihabwa
06c82f57cf
Modify rule S5384: Replace broken GitHub link with webarchive reference (#2965) 2023-08-24 16:44:01 +02:00
Yassin Kammoun
246716be78
Modify rule S6326: Add support for quick fixes (#2962) 2023-08-24 15:56:49 +02:00
Loris S
4fc653c99f
Modify S6497(docker): Remove from SonarWay (#2959)
Related ticket:
[**SONARIAC-1075**](https://sonarsource.atlassian.net/browse/SONARIAC-1075).
2023-08-24 15:20:35 +02:00
Ilia Kebets
25fc761644
Modify rule S2699: add support for sinon.JS library (#2961) 2023-08-24 14:59:15 +02:00
Jonas Wielage
89423ef606
Modify rule S1200 Remove mention of Single Responsibility Principle in title (#2954)
## 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-08-24 14:58:20 +02:00
Costin Zaharia
9ad140f1ee
Modify rule S3776: use default remediation (#2935) 2023-08-24 14:29:46 +02:00
Loris S
1f304e54ca
Create Shared content: Make impacts consistents across messenger secrets (#2950)
## 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-08-24 14:27:22 +02:00
Philipp Dominik Schubert
5c74fc7ebf
Modify rule S3588: Expand and adjust for LaYC
Removed code example which contains a FN. A corresponding Jira ticket
has been created at https://sonarsource.atlassian.net/browse/CPP-4655


## 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-08-24 10:47:20 +02:00
Andrea Guarino
88a814b01e
Adjust clean code attributes for DBD rules (#2952) 2023-08-24 10:05:19 +02:00
tomasz-kaminski-sonarsource
be4265a91f
Modify rule S2259: Expand and adjust for LaYC 2023-08-24 09:32:24 +02:00
SonarTech
c87359e2d4 update coverage information 2023-08-24 00:32:30 +00:00
github-actions[bot]
0e4746e235
Create rule S6708(secrets): Discord Webhook URLs should not be disclosed (#2919)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6708/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: daniel-teuchert-sonarsource <daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: Daniel Teuchert <daniel.teuchert@sonarsource.com>
Co-authored-by: daniel-teuchert-sonarsource <141642369+daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>
2023-08-23 15:37:47 +02:00
Philipp Dominik Schubert
1e2bf05e5b
Modify rule S5280: Update quickfix status
## 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-08-23 15:28:39 +02:00
Philipp Dominik Schubert
00d10a799e
Modify rule S5280: Expand and adjust for LaYC
## 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-08-23 14:27:08 +02:00
Philipp Dominik Schubert
acaeb943cf
Modify rule S5273: Expand and adjust for LaYC
**Caution:** our analyzer currently does not correctly detect the issue
in the first code example in section `Why is this an issue?`.


## 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-08-23 13:59:14 +02:00
Egon Okerman
ee3a611ce2
Modify rule S4347: Update to LayC format (APPSEC-975) (#2903)
## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-08-23 13:18:37 +02:00
Mary Georgiou
a4b68c982b
Modify S2255: Delete (#2930)
Deleting S2255 as it has been deprecated.
Deprecated since:
-  sonar-dotnet 8.9.0.19135, released on Jun 26, 2020
- SQ 8.4.0.35506 on Jul 3, 2020.
2023-08-23 10:58:18 +02:00
Tibor Blenessy
fa56bf4c9c
Modify rule S3699: Remove duplicated MDN prefix from links (#2932) 2023-08-23 10:25:03 +02:00
Anton Haubner
b5a123e90f
Modify rule S6416: Also check for IllegalStateException (#2826) 2023-08-23 10:10:34 +02:00
Antonio Aversa
f8b02f1be9
Modify rule S2589: fix missing diff-id (#2931)
Related to [this discuss
post](https://discuss.sonarsource.com/t/layc-diff-view-validation/15392/2?u=antonio.aversa).
2023-08-23 08:53:31 +02:00
Philipp Dominik Schubert
74e699cf15
Modify rule S3588: Expand and adjust for LaYC
## 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-08-22 14:33:47 +02:00
Philipp Dominik Schubert
70be86ab51
Modify rule S5308: Expand and adjust for LaYC (#2916)
## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)

---------

Co-authored-by: tomasz-kaminski-sonarsource <79814193+tomasz-kaminski-sonarsource@users.noreply.github.com>
2023-08-22 08:54:59 +00:00
Philipp Dominik Schubert
fa9676ea16
Modify rule S5488: Expand and adjust for LaYC
## 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-08-22 10:04:47 +02:00
SonarTech
e2e2f6525a update coverage information 2023-08-22 00:33:10 +00:00
Yassin Kammoun
881f0fd245
Modify rule S6661: Quote the method's name in the title (#2915)
## 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-08-21 16:33:29 +02:00
Marco Borgeaud
8209548e54
Diff blocks: fix incorrect use for python (#2795)
Improvement identified in #2790.

Add a prefix to the diff-id when it is used multiple times in different
"how to fix it in XYZ" sections to avoid ambiguity and pedantically
follow the spec:

> A single and unique diff-id should be used only once for each type of
code example as shown in the description of a rule.

Obvious typos around `diff-type` were fixed.

An obvious extra use of diff blocks was removed.
2023-08-21 15:22:49 +02:00
Cristian Ambrosini
08247967e0
S2931: fix spacing (#2913)
Fixing tabs on Compliant solution snippet (it was showing `$nbsp;`)

## 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-08-21 11:22:22 +02:00
dependabot[bot]
a905672e30
[dependabot] Bump gitpython from 3.1.30 to 3.1.32 in /rspec-tools (#2870)
Bumps [gitpython](https://github.com/gitpython-developers/GitPython)
from 3.1.30 to 3.1.32.
<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>v3.1.32 - with another security update</h2>
<h2>What's Changed</h2>
<ul>
<li>Bump cygwin/cygwin-install-action from 3 to 4 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1572">gitpython-developers/GitPython#1572</a></li>
<li>Fix up the commit trailers functionality by <a
href="https://github.com/itsluketwist"><code>@​itsluketwist</code></a>
in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1576">gitpython-developers/GitPython#1576</a></li>
<li>Name top-level exceptions as private variables by <a
href="https://github.com/Hawk777"><code>@​Hawk777</code></a> in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1590">gitpython-developers/GitPython#1590</a></li>
<li>fix pypi long description by <a
href="https://github.com/eUgEntOptIc44"><code>@​eUgEntOptIc44</code></a>
in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1603">gitpython-developers/GitPython#1603</a></li>
<li>Don't rely on <strong>del</strong> by <a
href="https://github.com/r-darwish"><code>@​r-darwish</code></a> in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1606">gitpython-developers/GitPython#1606</a></li>
<li>Block insecure non-multi options in clone/clone_from by <a
href="https://github.com/Beuc"><code>@​Beuc</code></a> in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1609">gitpython-developers/GitPython#1609</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/Hawk777"><code>@​Hawk777</code></a> made
their first contribution in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1590">gitpython-developers/GitPython#1590</a></li>
<li><a
href="https://github.com/eUgEntOptIc44"><code>@​eUgEntOptIc44</code></a>
made their first contribution in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1603">gitpython-developers/GitPython#1603</a></li>
<li><a href="https://github.com/r-darwish"><code>@​r-darwish</code></a>
made their first contribution in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1606">gitpython-developers/GitPython#1606</a></li>
<li><a href="https://github.com/Beuc"><code>@​Beuc</code></a> made their
first contribution in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1609">gitpython-developers/GitPython#1609</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/gitpython-developers/GitPython/compare/3.1.31...3.1.32">https://github.com/gitpython-developers/GitPython/compare/3.1.31...3.1.32</a></p>
<h2>3.1.31</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix Sphinx rendering errors by <a
href="https://github.com/stephan-cr"><code>@​stephan-cr</code></a> in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1524">gitpython-developers/GitPython#1524</a></li>
<li>tests: Use <code>command -v</code> instead of third-party
<code>which</code> program by <a
href="https://github.com/mgorny"><code>@​mgorny</code></a> in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1525">gitpython-developers/GitPython#1525</a></li>
<li>fix/add allow_unsafe_* params in docstrings + fix typo by <a
href="https://github.com/obfusk"><code>@​obfusk</code></a> in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1530">gitpython-developers/GitPython#1530</a></li>
<li>use tempfile.TemporaryDirectory &amp; fix clone_from_unsafe_protocol
tests by <a href="https://github.com/obfusk"><code>@​obfusk</code></a>
in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1531">gitpython-developers/GitPython#1531</a></li>
<li>Fix some resource leaks by open file handles by <a
href="https://github.com/marlamb"><code>@​marlamb</code></a> in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1532">gitpython-developers/GitPython#1532</a></li>
<li>fix files list on file rename by <a
href="https://github.com/teknoraver"><code>@​teknoraver</code></a> in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1537">gitpython-developers/GitPython#1537</a></li>
<li>Declare support for Python 3.11 by <a
href="https://github.com/hugovk"><code>@​hugovk</code></a> in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1541">gitpython-developers/GitPython#1541</a></li>
<li>Fix ignored by <a
href="https://github.com/Lightborne"><code>@​Lightborne</code></a> in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1545">gitpython-developers/GitPython#1545</a></li>
<li>Fix timezone parsing functions for non-hour timezones by <a
href="https://github.com/jcowgill"><code>@​jcowgill</code></a> in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1547">gitpython-developers/GitPython#1547</a></li>
<li>Enable user to override default diff -M arg by <a
href="https://github.com/mellowed100"><code>@​mellowed100</code></a> in
<a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1551">gitpython-developers/GitPython#1551</a></li>
<li>Remove optional from two member variables by <a
href="https://github.com/Sineaggi"><code>@​Sineaggi</code></a> in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1550">gitpython-developers/GitPython#1550</a></li>
<li>Fix RecursionError when iterating streams by <a
href="https://github.com/eric-wieser"><code>@​eric-wieser</code></a> in
<a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1554">gitpython-developers/GitPython#1554</a></li>
<li>Fix get_values() so it correctly loads section names by <a
href="https://github.com/Codym48"><code>@​Codym48</code></a> in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1555">gitpython-developers/GitPython#1555</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/stephan-cr"><code>@​stephan-cr</code></a> made
their first contribution in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1524">gitpython-developers/GitPython#1524</a></li>
<li><a href="https://github.com/obfusk"><code>@​obfusk</code></a> made
their first contribution in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1530">gitpython-developers/GitPython#1530</a></li>
<li><a href="https://github.com/marlamb"><code>@​marlamb</code></a> made
their first contribution in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1532">gitpython-developers/GitPython#1532</a></li>
<li><a
href="https://github.com/teknoraver"><code>@​teknoraver</code></a> made
their first contribution in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1537">gitpython-developers/GitPython#1537</a></li>
<li><a
href="https://github.com/Lightborne"><code>@​Lightborne</code></a> made
their first contribution in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1545">gitpython-developers/GitPython#1545</a></li>
<li><a href="https://github.com/jcowgill"><code>@​jcowgill</code></a>
made their first contribution in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1547">gitpython-developers/GitPython#1547</a></li>
<li><a
href="https://github.com/mellowed100"><code>@​mellowed100</code></a>
made their first contribution in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1551">gitpython-developers/GitPython#1551</a></li>
<li><a href="https://github.com/Sineaggi"><code>@​Sineaggi</code></a>
made their first contribution in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1550">gitpython-developers/GitPython#1550</a></li>
<li><a href="https://github.com/Codym48"><code>@​Codym48</code></a> made
their first contribution in <a
href="https://redirect.github.com/gitpython-developers/GitPython/pull/1555">gitpython-developers/GitPython#1555</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/gitpython-developers/GitPython/compare/3.1.30...3.1.31">https://github.com/gitpython-developers/GitPython/compare/3.1.30...3.1.31</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="5d45ce243a"><code>5d45ce2</code></a>
prepare 3.1.32 release</li>
<li><a
href="ca965ecc81"><code>ca965ec</code></a>
Merge pull request <a
href="https://redirect.github.com/gitpython-developers/GitPython/issues/1609">#1609</a>
from Beuc/block-insecure-options-clone-non-multi</li>
<li><a
href="5c59e0d63d"><code>5c59e0d</code></a>
Block insecure non-multi options in clone/clone_from</li>
<li><a
href="c09a71e2ca"><code>c09a71e</code></a>
Merge pull request <a
href="https://redirect.github.com/gitpython-developers/GitPython/issues/1606">#1606</a>
from r-darwish/no-del</li>
<li><a
href="a3859ee6f7"><code>a3859ee</code></a>
fixes</li>
<li><a
href="8186159af1"><code>8186159</code></a>
Don't rely on <strong>del</strong></li>
<li><a
href="741edb5430"><code>741edb5</code></a>
Merge pull request <a
href="https://redirect.github.com/gitpython-developers/GitPython/issues/1603">#1603</a>
from eUgEntOptIc44/eugenoptic44-fix-pypi-long-descri...</li>
<li><a
href="0c543cd0dd"><code>0c543cd</code></a>
Improve readability of README.md</li>
<li><a
href="9cd7ddb960"><code>9cd7ddb</code></a>
Improve the 'long_description' displayed on pypi</li>
<li><a
href="6fc11e6e36"><code>6fc11e6</code></a>
update README to reflect the status quo on <code>git</code> command
usage</li>
<li>Additional commits viewable in <a
href="https://github.com/gitpython-developers/GitPython/compare/3.1.30...3.1.32">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.30&new-version=3.1.32)](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-08-21 11:07:47 +02:00
Loris S
cd03a1dd3d
Modify S5144&S6547: Improve fixes (#2912)
## 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-08-21 10:51:21 +02:00
Ilia Kebets
4db020b283
Modify rule S1488: add code example when returning awaited promise (#2909)
Fixes https://github.com/SonarSource/eslint-plugin-sonarjs/issues/413
2023-08-21 10:28:17 +02:00
dependabot[bot]
c841e81ad5
[dependabot] Bump certifi from 2023.5.7 to 2023.7.22 in /rspec-tools (#2646)
Bumps [certifi](https://github.com/certifi/python-certifi) from 2023.5.7
to 2023.7.22.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="8fb96ed81f"><code>8fb96ed</code></a>
2023.07.22</li>
<li><a
href="afe77220e0"><code>afe7722</code></a>
Bump actions/setup-python from 4.6.1 to 4.7.0 (<a
href="https://redirect.github.com/certifi/python-certifi/issues/230">#230</a>)</li>
<li><a
href="2038739ad5"><code>2038739</code></a>
Bump dessant/lock-threads from 3.0.0 to 4.0.1 (<a
href="https://redirect.github.com/certifi/python-certifi/issues/229">#229</a>)</li>
<li><a
href="44df761f4c"><code>44df761</code></a>
Hash pin Actions and enable dependabot (<a
href="https://redirect.github.com/certifi/python-certifi/issues/228">#228</a>)</li>
<li>See full diff in <a
href="https://github.com/certifi/python-certifi/compare/2023.05.07...2023.07.22">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=certifi&package-manager=pip&previous-version=2023.5.7&new-version=2023.7.22)](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 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-08-21 10:00:59 +02:00
Loris S
5a15b560fd
APPSEC-843 Modify S3329: Mention FIPS-compliant PRNG (#2904)
## 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-08-21 07:55:20 +00:00
dependabot[bot]
b17cbdd8d3
[dependabot] Bump aiohttp from 3.8.4 to 3.8.5 in /rspec-tools (#2593)
Bumps [aiohttp](https://github.com/aio-libs/aiohttp) from 3.8.4 to
3.8.5.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/aio-libs/aiohttp/releases">aiohttp's
releases</a>.</em></p>
<blockquote>
<h2>3.8.5</h2>
<h2>Security bugfixes</h2>
<ul>
<li>
<p>Upgraded the vendored copy of llhttp_ to v8.1.1 -- by
:user:<code>webknjaz</code>
and :user:<code>Dreamsorcerer</code>.</p>
<p>Thanks to :user:<code>sethmlarson</code> for reporting this and
providing us with
comprehensive reproducer, workarounds and fixing details! For more
information, see
<a
href="https://github.com/aio-libs/aiohttp/security/advisories/GHSA-45c4-8wx5-qw6w">https://github.com/aio-libs/aiohttp/security/advisories/GHSA-45c4-8wx5-qw6w</a>.</p>
<p>.. _llhttp: <a href="https://llhttp.org">https://llhttp.org</a></p>
<p>(<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/7346">#7346</a>)</p>
</li>
</ul>
<h2>Features</h2>
<ul>
<li>
<p>Added information to C parser exceptions to show which character
caused the error. -- by :user:<code>Dreamsorcerer</code></p>
<p>(<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/7366">#7366</a>)</p>
</li>
</ul>
<h2>Bugfixes</h2>
<ul>
<li>
<p>Fixed a transport is :data:<code>None</code> error -- by
:user:<code>Dreamsorcerer</code>.</p>
<p>(<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/3355">#3355</a>)</p>
</li>
</ul>
<hr />
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/aio-libs/aiohttp/blob/v3.8.5/CHANGES.rst">aiohttp's
changelog</a>.</em></p>
<blockquote>
<h1>3.8.5 (2023-07-19)</h1>
<h2>Security bugfixes</h2>
<ul>
<li>
<p>Upgraded the vendored copy of llhttp_ to v8.1.1 -- by
:user:<code>webknjaz</code>
and :user:<code>Dreamsorcerer</code>.</p>
<p>Thanks to :user:<code>sethmlarson</code> for reporting this and
providing us with
comprehensive reproducer, workarounds and fixing details! For more
information, see
<a
href="https://github.com/aio-libs/aiohttp/security/advisories/GHSA-45c4-8wx5-qw6w">https://github.com/aio-libs/aiohttp/security/advisories/GHSA-45c4-8wx5-qw6w</a>.</p>
<p>.. _llhttp: <a href="https://llhttp.org">https://llhttp.org</a></p>
<p><code>[#7346](https://github.com/aio-libs/aiohttp/issues/7346)
&lt;https://github.com/aio-libs/aiohttp/issues/7346&gt;</code>_</p>
</li>
</ul>
<h2>Features</h2>
<ul>
<li>
<p>Added information to C parser exceptions to show which character
caused the error. -- by :user:<code>Dreamsorcerer</code></p>
<p><code>[#7366](https://github.com/aio-libs/aiohttp/issues/7366)
&lt;https://github.com/aio-libs/aiohttp/issues/7366&gt;</code>_</p>
</li>
</ul>
<h2>Bugfixes</h2>
<ul>
<li>
<p>Fixed a transport is :data:<code>None</code> error -- by
:user:<code>Dreamsorcerer</code>.</p>
<p><code>[#3355](https://github.com/aio-libs/aiohttp/issues/3355)
&lt;https://github.com/aio-libs/aiohttp/issues/3355&gt;</code>_</p>
</li>
</ul>
<hr />
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="9c13a52c21"><code>9c13a52</code></a>
Bump aiohttp to v3.8.5 a security release</li>
<li><a
href="7c02129567"><code>7c02129</code></a>
 Bump pypa/cibuildwheel to v2.14.1</li>
<li><a
href="135a45e9d6"><code>135a45e</code></a>
Improve error messages from C parser (<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/7366">#7366</a>)
(<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/7380">#7380</a>)</li>
<li><a
href="9337fb3f2a"><code>9337fb3</code></a>
Fix bump llhttp to v8.1.1 (<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/7367">#7367</a>)
(<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/7377">#7377</a>)</li>
<li><a
href="f07e9b44b5"><code>f07e9b4</code></a>
[PR <a
href="https://redirect.github.com/aio-libs/aiohttp/issues/7373">#7373</a>/66e261a5
backport][3.8] Drop azure mention (<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/7374">#7374</a>)</li>
<li><a
href="01d9b70e54"><code>01d9b70</code></a>
[PR <a
href="https://redirect.github.com/aio-libs/aiohttp/issues/7370">#7370</a>/22c264ce
backport][3.8] fix: Spelling error fixed (<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/7371">#7371</a>)</li>
<li><a
href="3577b1e371"><code>3577b1e</code></a>
[PR <a
href="https://redirect.github.com/aio-libs/aiohttp/issues/7359">#7359</a>/7911f1e9
backport][3.8]  Set up secretless publishing to PyPI (<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/7360">#7360</a>)</li>
<li><a
href="8d45f9c995"><code>8d45f9c</code></a>
[PR <a
href="https://redirect.github.com/aio-libs/aiohttp/issues/7333">#7333</a>/3a54d378
backport][3.8] Fix TLS transport is <code>None</code> error (<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/7357">#7357</a>)</li>
<li><a
href="dd8e24e773"><code>dd8e24e</code></a>
[PR <a
href="https://redirect.github.com/aio-libs/aiohttp/issues/7343">#7343</a>/18057581
backport][3.8] Mention encoding in <code>yarl.URL</code> (<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/7355">#7355</a>)</li>
<li><a
href="40874103eb"><code>4087410</code></a>
[PR <a
href="https://redirect.github.com/aio-libs/aiohttp/issues/7346">#7346</a>/346fd202
backport][3.8]  Bump vendored llhttp to v8.1.1 (<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/7352">#7352</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/aio-libs/aiohttp/compare/v3.8.4...v3.8.5">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=aiohttp&package-manager=pip&previous-version=3.8.4&new-version=3.8.5)](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 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-08-21 09:49:51 +02:00
dependabot[bot]
28eb6865eb
Bump word-wrap from 1.2.3 to 1.2.4 in /frontend (#2541)
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3
to 1.2.4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/jonschlinkert/word-wrap/releases">word-wrap's
releases</a>.</em></p>
<blockquote>
<h2>1.2.4</h2>
<h2>What's Changed</h2>
<ul>
<li>Remove default indent by <a
href="https://github.com/mohd-akram"><code>@​mohd-akram</code></a> in <a
href="https://redirect.github.com/jonschlinkert/word-wrap/pull/24">jonschlinkert/word-wrap#24</a></li>
<li>🔒fix: CVE 2023 26115 (2) by <a
href="https://github.com/OlafConijn"><code>@​OlafConijn</code></a> in <a
href="https://redirect.github.com/jonschlinkert/word-wrap/pull/41">jonschlinkert/word-wrap#41</a></li>
<li>🔒 fix: CVE-2023-26115 by <a
href="https://github.com/aashutoshrathi"><code>@​aashutoshrathi</code></a>
in <a
href="https://redirect.github.com/jonschlinkert/word-wrap/pull/33">jonschlinkert/word-wrap#33</a></li>
<li>chore: publish workflow by <a
href="https://github.com/OlafConijn"><code>@​OlafConijn</code></a> in <a
href="https://redirect.github.com/jonschlinkert/word-wrap/pull/42">jonschlinkert/word-wrap#42</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/mohd-akram"><code>@​mohd-akram</code></a> made
their first contribution in <a
href="https://redirect.github.com/jonschlinkert/word-wrap/pull/24">jonschlinkert/word-wrap#24</a></li>
<li><a
href="https://github.com/OlafConijn"><code>@​OlafConijn</code></a> made
their first contribution in <a
href="https://redirect.github.com/jonschlinkert/word-wrap/pull/41">jonschlinkert/word-wrap#41</a></li>
<li><a
href="https://github.com/aashutoshrathi"><code>@​aashutoshrathi</code></a>
made their first contribution in <a
href="https://redirect.github.com/jonschlinkert/word-wrap/pull/33">jonschlinkert/word-wrap#33</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4">https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="f64b188c72"><code>f64b188</code></a>
run verb to generate README</li>
<li><a
href="03ea08256b"><code>03ea082</code></a>
Merge pull request <a
href="https://redirect.github.com/jonschlinkert/word-wrap/issues/42">#42</a>
from jonschlinkert/chore/publish-workflow</li>
<li><a
href="420dce9a24"><code>420dce9</code></a>
Merge pull request <a
href="https://redirect.github.com/jonschlinkert/word-wrap/issues/41">#41</a>
from jonschlinkert/fix/CVE-2023-26115-2</li>
<li><a
href="bfa694edf5"><code>bfa694e</code></a>
Update .github/workflows/publish.yml</li>
<li><a
href="ace0b3c78f"><code>ace0b3c</code></a>
chore: bump version to 1.2.4</li>
<li><a
href="6fd7275946"><code>6fd7275</code></a>
chore: add publish workflow</li>
<li><a
href="30d6daf60f"><code>30d6daf</code></a>
chore: fix test</li>
<li><a
href="655929cabe"><code>655929c</code></a>
chore: remove package-lock</li>
<li><a
href="49e08bbc32"><code>49e08bb</code></a>
chore: added an additional testcase</li>
<li><a
href="9f626935f3"><code>9f62693</code></a>
fix: cve 2023-26115</li>
<li>Additional commits viewable in <a
href="https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=word-wrap&package-manager=npm_and_yarn&previous-version=1.2.3&new-version=1.2.4)](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 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-08-21 09:49:30 +02:00
Arseniy Zaostrovnykh
55720d6cda
Fix rule coverage on a rule page: include all rule keys to metadata
For some rules, rule-specific metadata.json overridden the `sqKey` for
all languages, so when the predeployment script collected all keys, it
did not list the actual, most canonical key "S****".
This leads to the incorrect display of coverage information on a rule
page that relies on the `allKeys` precomputed property to retrieve the
version of the analyzer that implements the rule.

The fix includes the generic rule metadata.json file into the aggregator
that computes `allKeys`, thus propagating it to every language-specific
metadata.
2023-08-21 07:45:14 +00:00
SonarTech
db2433195f update coverage information 2023-08-21 00:32:40 +00:00
SonarTech
c60968571e update coverage information 2023-08-19 00:33:14 +00:00
cynthiabethea
33d408cbfd
cyn/modify-S2696-layc-ltypo (#2910)
## 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-08-18 16:52:42 +01:00
Marco Kaufmann
52a0ee1b41
Modify rule S106: reworked rule description for LaYC format, SONARJAVA-4570 (#2907) 2023-08-18 16:39:19 +02:00
Alban Auzeill
f57852ffb7
Modify rule S2189: Fix diff-id (#2908) 2023-08-18 16:01:09 +02:00
github-actions[bot]
de5d7d9043
Create rule S6485: Hash-based collections should be initlizialized with the related static method for better performance (#1441) 2023-08-18 16:00:26 +02:00
Alban Auzeill
a25eaee927
Modify rule S4838: Fix typos (#2906) 2023-08-18 13:55:15 +00:00
leonardo-pilastri-sonarsource
2808713f12
Modify rule S3020: better rule title (#2852) 2023-08-18 15:12:42 +02:00
Marco Kaufmann
92b3f17c07
Modify rule S5413: reworked rule description for LaYC format (#2905) 2023-08-18 14:16:29 +02:00
Yassin Kammoun
289a124d78
Modify rule S107: Do not count TypeScript parameter properties (#2898)
## 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-08-18 14:01:14 +02:00
Dorian Burihabwa
9ce1a8de8e
Modify rule S2589: Fix typo and formatting in code examples [SONARJAVA-4463] (#2902) 2023-08-18 12:09:07 +02:00
github-actions[bot]
64f9977e49
Create rule S6399(C#): XML operations should not be vulnerable to injection attacks (#2860)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6399/csharp)
(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: daniel-teuchert-sonarsource <daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: Daniel Teuchert <daniel.teuchert@sonarsource.com>
Co-authored-by: daniel-teuchert-sonarsource <141642369+daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>
2023-08-18 11:31:42 +02:00
Loris S
a0abb99f76
Modify S2596(javascript): Convert to LayC (#2901)
This PR also removes the java folder because it is not implemented and
has no implementation plan. This PR was made spontaneously during
Daniel's onboarding.

---------

Co-authored-by: daniel-teuchert-sonarsource <141642369+daniel-teuchert-sonarsource@users.noreply.github.com>
2023-08-18 09:31:06 +00:00
SonarTech
0d571ab062 update coverage information 2023-08-18 00:34:02 +00:00
Irina Batinic
61b3938fc0
Modify rule S6073: reworked rule description for LaYC format (#2892) 2023-08-17 16:53:46 +02:00
Marco Kaufmann
7e57722182
Modify rule S127: reworked rule description for LaYC format (#2894) 2023-08-17 16:30:56 +02:00
erwan-serandour-sonarsource
ad0f7fd6dc
SONARJAVA-4463 add significant example to rule S2589 (#2900) 2023-08-17 15:53:33 +02:00
Irina Batinic
cb9bb3162a
Modify rule S1264: Update rule description according to the LaYC (#2891) 2023-08-17 15:25:56 +02:00
Marco Kaufmann
a8a91b23f7
Modify rule S1994: reworked rule description for LaYC format (#2889) 2023-08-17 14:54:01 +02:00
Marco Kaufmann
7e11ea7299
Modify rule S2251: reworked rule description for LaYC format (#2886) 2023-08-17 14:53:18 +02:00
github-actions[bot]
ae93071324
Create rule S2245: Add "Using pseudorandom number generators (PRNGs) is security-sensitive" to Go (#2824)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S2245/go) (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: sebastien-andrivet-sonarsource <sebastien-andrivet-sonarsource@users.noreply.github.com>
Co-authored-by: sebastien-andrivet-sonarsource <sebastien.andrivet@sonarsource.com>
2023-08-17 14:25:58 +02:00
github-actions[bot]
b5aa16faa3
Create rule S4507: Add "Delivering code in production with debug features activated is security-sensitive" to Go (#2858)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S4507/go) (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: sebastien-andrivet-sonarsource <sebastien.andrivet@sonarsource.com>
Co-authored-by: sebastien-andrivet-sonarsource <138577785+sebastien-andrivet-sonarsource@users.noreply.github.com>
Co-authored-by: Jamie Anderson <127742609+jamie-anderson-sonarsource@users.noreply.github.com>
2023-08-17 14:25:28 +02:00
erwan-serandour-sonarsource
ef25af53bc
SONARJAVA-4563 S1258 update documentation to support new annotation (#2899) 2023-08-17 14:18:19 +02:00
github-actions[bot]
a15c1733db
Create rule S6547(C#): Environment variables should not be defined from untrusted input (#2875)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6547/csharp)
(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: daniel-teuchert-sonarsource <daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: Daniel Teuchert <daniel.teuchert@sonarsource.com>
Co-authored-by: daniel-teuchert-sonarsource <141642369+daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>
2023-08-17 12:58:46 +02:00
Anton Haubner
52b830187d
Modify rule S935: Fix ruleSpecification value in metadata (#2895) 2023-08-17 10:55:56 +02:00
Irina Batinic
5829684329
Modify rule S135: Update rule description according to the LaYC (#2888) 2023-08-16 15:21:28 +02:00
github-actions[bot]
10cb45778a
Create rule S4423: add Go (APPSEC-905) (#2830)
Research ticket:
[APPSEC-905](https://sonarsource.atlassian.net/browse/APPSEC-905)

You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S4423/go) (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)



[APPSEC-905]:
https://sonarsource.atlassian.net/browse/APPSEC-905?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

---------

Co-authored-by: egon-okerman-sonarsource <egon-okerman-sonarsource@users.noreply.github.com>
Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
2023-08-16 13:53:27 +02:00
chrislain-razafimahefa-sonarsource
d6296c69f4
Modify rule S6466: Fix typos (#2890) 2023-08-16 13:35:16 +02:00
github-actions[bot]
adac450cab
Create rule S2612: add Go (APPSEC-908) (#2869)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S2612/go) (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: egon-okerman-sonarsource <egon-okerman-sonarsource@users.noreply.github.com>
Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
2023-08-16 11:42:20 +02:00
Antonio Aversa
1288ef29bf
Modify rules S1186, S2589, S2953: Fix incorrect use of diff blocks (#2884)
Related to
https://discuss.sonarsource.com/t/layc-diff-view-validation/15392

Fixes remaining issues for C#, VB.NET and VB6.

## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-08-16 10:45:12 +02:00
Marco Kaufmann
d27acc7bf1
Modify rule S4838: reworked rule description for LayC format [SONARJAVA-4578] (#2885) 2023-08-16 10:26:18 +02:00
Leonardo Pilastri
898f00a110 Diff blocks: fix incorrect use for kotlin 2023-08-16 10:09:30 +02:00
SonarTech
702f3eb797 update coverage information 2023-08-16 00:33:49 +00:00
github-actions[bot]
4532785786
Create rule S5332: Using clear-text protocols is security-sensitive (Go support) (#2874)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S5332/go) (updated a
few minutes after each push).

Related tickets:
* Research ticket:
[APPSEC-898](https://sonarsource.atlassian.net/browse/APPSEC-898)
* Implementation ticket (HTTP):
[SONARSLANG-605](https://sonarsource.atlassian.net/browse/SONARSLANG-605)
* Implementation ticket (FTP):
[SONARSLANG-604](https://sonarsource.atlassian.net/browse/SONARSLANG-604)
* Implementation ticket (SMTP):
[SONARSLANG-603](https://sonarsource.atlassian.net/browse/SONARSLANG-603)

## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-08-15 17:11:21 +01:00
Irina Batinic
e2dec3882d
Modify rule S1751: Update rule description according to the LaYC (#2881)
Co-authored-by: Marco Kaufmann <83189575+kaufco@users.noreply.github.com>
2023-08-15 17:28:14 +02:00
Marco Kaufmann
ff2b22601a
Modify rule S2272: reworked rule description for LaYC format (#2872) 2023-08-15 15:20:53 +00:00
Marco Kaufmann
74437e0a15
Modify rule S4348: reworked rule description for LaYC format (#2873) 2023-08-15 17:18:52 +02:00
Irina Batinic
76c34b093a
Modify rule S2189: Update rule description according to the LaYC (#2880) 2023-08-15 16:49:04 +02:00
Marco Borgeaud
1c405e4c3a
Diff blocks: fix incorrect use for vbnet (#2807) 2023-08-15 14:22:05 +02:00
Marco Borgeaud
57c303541e
Diff blocks: fix some incorrect use for csharp (#2799) 2023-08-15 14:19:27 +02:00
Marco Borgeaud
ffde1ebd9a
Diff blocks: fix some incorrect use for kotlin (#2803)
Improvement identified in #2790.

Add a prefix to the diff-id when it is used multiple times in different
"how to fix it in XYZ" sections to avoid ambiguity and pedantically
follow the spec:

> A single and unique diff-id should be used only once for each type of
code example as shown in the description of a rule.

Obvious typos around `diff-id` were fixed.
2023-08-15 13:34:10 +02:00
Marco Borgeaud
dde2f675f7
Diff blocks: fix incorrect use for CFamily
Fix the remaining issues in the CFamily.
2023-08-15 12:07:06 +02:00
Marco Borgeaud
4aee7ce2d6
Diff blocks: fix incorrect use for swift (#2805)
Improvement identified in #2790.

Add a prefix to the diff-id when it is used multiple times in different
"how to fix it in XYZ" sections to avoid ambiguity and pedantically
follow the spec:

> A single and unique diff-id should be used only once for each type of
code example as shown in the description of a rule.
2023-08-15 11:52:10 +02:00
github-actions[bot]
00bca507ba
Create rule S6466: Accessing array element should not trigger an ArrayIndexOutOfBoundException (#2409) 2023-08-15 11:01:26 +02:00
Marco Borgeaud
210246f5d8
Diff blocks: fix incorrect use for CFamily
Improvement identified in #2790.

Add a prefix to the diff-id when it is used multiple times in different
"how to fix it in XYZ" sections to avoid ambiguity and pedantically
follow the spec:

> A single and unique diff-id should be used only once for each type of
code example as shown in the description of a rule.

Obvious typos around `diff-type` were fixed.
2023-08-15 10:14:59 +02:00
Marco Kaufmann
ebbaeba526
Modify rule S6632: fixed tags (#2879) 2023-08-15 10:12:10 +02:00
Marco Kaufmann
ee26f0b837
Modify rule S6629: fixed tags (#2878) 2023-08-15 10:11:41 +02:00
Marco Kaufmann
7e054f70c1
Modify rule S6627: fixed tags (#2877) 2023-08-15 10:11:16 +02:00
Marco Kaufmann
8b3ce97956
Modify rule S6628: fixed tags (#2876) 2023-08-15 10:10:46 +02:00
Marco Borgeaud
95ce8c6119
Diff blocks: fix some incorrect use for javascript (#2802)
Improvement identified in #2790.

Add a prefix to the diff-id when it is used multiple times in different
"how to fix it in XYZ" sections to avoid ambiguity and pedantically
follow the spec:

> A single and unique diff-id should be used only once for each type of
code example as shown in the description of a rule.

Obvious typos around `diff-type` were fixed.
2023-08-15 09:43:48 +02:00
hendrik-buchwald-sonarsource
6d2e23d4c5
Add multiple impacts for CCT (#2871) 2023-08-14 14:50:11 +02:00
SonarTech
442194d295 update coverage information 2023-08-12 00:33:06 +00:00
github-actions[bot]
b352c03033
Create rule S6706: Cryptographic private keys should not be disclosed (#2867) 2023-08-11 17:33:20 +02:00
github-actions[bot]
43ff9aa289
Create rule S6704: Riot API keys should not be disclosed (#2864) 2023-08-11 15:27:14 +00:00
leonardo-pilastri-sonarsource
969a566a0d
Diff blocks: fix some incorrect use for java (#2866) 2023-08-11 16:49:04 +02:00
github-actions[bot]
ed58ecf2da
Create rule S6705: OpenWeather API keys should not be disclosed (#2865) 2023-08-11 14:42:25 +00:00
Johann Beleites
8ea71addf5
Modify rule S2274: Improve compliant solution (#2868) 2023-08-11 16:35:13 +02:00
github-actions[bot]
7da41a60be
Create rule S6701: Telegram bot keys should not be disclosed (#2861) 2023-08-11 13:57:33 +00:00
github-actions[bot]
79647231c4
Create rule S6702: SonarQube tokens should not be disclosed (#2862) 2023-08-11 15:53:39 +02:00
github-actions[bot]
5939aa918f
Create rule S6703: Database passwords should not be disclosed (#2863) 2023-08-11 15:35:42 +02:00
leonardo-pilastri-sonarsource
5e84629ded
Modify rule S2273: LaYC format (#2849) 2023-08-11 15:13:07 +02:00
Johann Beleites
873716a431
Modify rule S2274: Update in line with LayC (SONARJAVA-4495) (#2841) 2023-08-11 12:15:57 +00:00
github-actions[bot]
d54de6f117
Create rule S6699: Spotify API secrets should not be disclosed (#2855) 2023-08-11 12:17:49 +02:00
github-actions[bot]
5377fe4f2e
Create rule S6700: RapidAPI keys should not be disclosed (#2859) 2023-08-11 08:20:30 +00:00
github-actions[bot]
ac8f751835
Create rule S2589: Add VB.NET (#2856) 2023-08-11 09:57:19 +02:00
github-actions[bot]
d228e7d40b
Create rule S6698: PostgreSQL database passwords should not be disclosed (#2854) 2023-08-11 07:56:54 +00:00
github-actions[bot]
bfb7e0e907
Create rule S2583: Add VB.NET (#2857) 2023-08-11 09:56:44 +02:00
github-actions[bot]
7043cfd458
Create rule S6697: MySQL database passwords should not be disclosed (#2851) 2023-08-11 09:53:59 +02:00
Marco Borgeaud
49e8995b41
Modify rule S5912: LaYC format (#2714) 2023-08-11 07:03:11 +00:00
Amélie Renard
4698df5e2e
CPP-3691 Remove "MISRA C++ 2008 recommended" and "MISRA C++ 2008" quality profiles from all RSPECs 2023-08-10 17:32:11 +02:00
github-actions[bot]
5de8858f3c
Create rule S6694: MongoDB database passwords should not be disclosed (#2846) 2023-08-10 15:20:44 +00:00
Marco Borgeaud
7da1e57a15
Diff blocks: fix some incorrect use for java (#2801) 2023-08-10 17:12:37 +02:00
Amélie Renard
6a2c8bdd14
Modify rule S107: LaYC format 2023-08-10 16:54:47 +02:00
github-actions[bot]
ff9da85448
Create rule S6696: SendGrid keys should not be disclosed (#2848) 2023-08-10 13:59:16 +00:00
Marco Borgeaud
ce07d261a4
Diff blocks: fix some incorrect use for terraform (#2806)
Improvement identified in #2790.

Add a prefix to the diff-id when it is used multiple times in different
"how to fix it in XYZ" sections to avoid ambiguity and pedantically
follow the spec:

> A single and unique diff-id should be used only once for each type of
code example as shown in the description of a rule.
2023-08-10 15:57:41 +02:00
Marco Borgeaud
6550e65756
Diff blocks: fix some incorrect use for php (#2804)
Improvement identified in #2790.

Add a prefix to the diff-id when it is used multiple times in different
"how to fix it in XYZ" sections to avoid ambiguity and pedantically
follow the spec:

> A single and unique diff-id should be used only once for each type of
code example as shown in the description of a rule.

Obvious typos around `diff-type` were fixed.
2023-08-10 15:57:24 +02:00
Marco Borgeaud
8729d7a38c
Diff blocks: fix some incorrect use for docker (#2800)
Improvement identified in #2790.

Add a prefix to the diff-id when it is used multiple times in different
"how to fix it in XYZ" sections to avoid ambiguity and pedantically
follow the spec:

> A single and unique diff-id should be used only once for each type of
code example as shown in the description of a rule.

Obvious typos around `diff-id` were fixed.
2023-08-10 15:57:01 +02:00
Marco Borgeaud
ecf191e992
Diff blocks: fix incorrect use for cloudformation (#2798)
Improvement identified in #2790.

Add a prefix to the diff-id when it is used multiple times in different
"how to fix it in XYZ" sections to avoid ambiguity and pedantically
follow the spec:

> A single and unique diff-id should be used only once for each type of
code example as shown in the description of a rule.
2023-08-10 15:56:42 +02:00
Marco Borgeaud
fe06d23670
Diff blocks: fix some incorrect use for azureresourcemanager (#2796)
Improvement identified in #2790.

Add a prefix to the diff-id when it is used multiple times in different
"how to fix it in XYZ" sections to avoid ambiguity and pedantically
follow the spec:

> A single and unique diff-id should be used only once for each type of
code example as shown in the description of a rule.

Obvious typos around `diff-type` and `diff-id` were fixed.
2023-08-10 15:56:15 +02:00
leonardo-pilastri-sonarsource
02f4340fcf
Modify rule S3034: added some missing backticks (#2853) 2023-08-10 15:25:37 +02:00
leonardo-pilastri-sonarsource
c33ad50d09
Modify rule S3012: fix code diff view (#2850) 2023-08-10 15:06:59 +02:00
github-actions[bot]
bf94bd8520
Create rule S6695: WeChat app keys should not be disclosed (#2847) 2023-08-10 14:56:15 +02:00
github-actions[bot]
d3adabefbf
Create rule S6693: SSH private keys should not be disclosed (#2844) 2023-08-10 12:47:33 +00:00
github-actions[bot]
3dc24ded5f
Create rule S6690: GitLab tokens should not be disclosed (#2839) 2023-08-10 14:41:48 +02:00
Peter Trifanov
ba2c5c0a6a
Modify rule S6321: Add language AzureResourceManager (Bicep) (#2781) 2023-08-10 13:54:24 +02:00
hendrik-buchwald-sonarsource
55da3e8734
Use new link format for secret resources (#2845) 2023-08-10 11:26:56 +02:00
github-actions[bot]
25852958a1
Create rule S6692: reCaptcha secret keys should not be disclosed (#2842) 2023-08-10 09:20:19 +00:00
github-actions[bot]
9a7f5b1709
Create rule S6691: Google OAuth client secrets should not be disclosed (#2840) 2023-08-10 09:16:14 +00:00
github-actions[bot]
067b05e6c4
Create rule S6688: Facebook app keys should not be disclosed (#2835) 2023-08-10 11:13:46 +02:00
leonardo-pilastri-sonarsource
cd51b7c20d
Modify rule S3034: LaYC format (#2843) 2023-08-10 11:08:14 +02:00
github-actions[bot]
37a828ab3e
Create rule S6689: GitHub tokens should not be disclosed (#2836) 2023-08-10 08:57:01 +00:00
Amélie Renard
176fab24d5
Modify rule S1265: LaYC format 2023-08-10 10:17:43 +02:00
Marco Borgeaud
f57a9805b5
RULEAPI-788 Validate use of diff-id and diff-type (#2790)
The validation is not yet enabled on CI checks because there exist too many errors in existing rule descriptions at the moment.
2023-08-10 09:59:44 +02:00
SonarTech
9326a648b6 update coverage information 2023-08-10 00:33:17 +00:00
Johann Beleites
c34d9d9db6
Modify rule S2388: Update in line with LayC (SONARJAVA-4495) (#2821) 2023-08-09 17:01:02 +02:00
hendrik-buchwald-sonarsource
a278258b88
Modify rule S6338: Use common text (#2832) 2023-08-09 14:49:28 +02:00
github-actions[bot]
80315ac17f
Create rule S6684: Azure Subscription Keys should not be disclosed (#2816) 2023-08-09 14:49:12 +02:00
github-actions[bot]
2d75969d3c
Create rule S6687: Django secret keys should not be disclosed (#2831) 2023-08-09 14:27:09 +02:00
github-actions[bot]
91b004957f
Create rule S6686: Clarifai API keys should not be disclosed (#2819) 2023-08-09 14:26:46 +02:00
Johann Beleites
ebeed4bb38
Modify rule S2293: Update in line with LayC (SONARJAVA-4495) (#2823) 2023-08-09 14:20:23 +02:00
Johann Beleites
df09afbbab
Modify rule S2276: Update in line with LaYC (SONARJAVA-4495) (#2833) 2023-08-09 14:20:06 +02:00
daniel-teuchert-sonarsource
746fb38099
Modify S5335(PHP): Migrate to LayC (#2825)
## 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. <91723853+loris-s-sonarsource@users.noreply.github.com>
2023-08-09 11:56:05 +02:00
leonardo-pilastri-sonarsource
8cb0215435
Modify rule S3020: LaYC format (#2822) 2023-08-09 10:02:18 +02:00
SonarTech
6c823c9400 update coverage information 2023-08-09 00:32:20 +00:00
Amélie Renard
b2306ac0bd
CPP-4615 Delete S1908,S1704,S1311,S1250 that were already deprecated in SQ LTS 8.9 (#2809)
Related PR: https://github.com/SonarSource/sonar-cpp/pull/2928
2023-08-08 18:07:10 +02:00
github-actions[bot]
4a31d0ec22
Create rule S2077: add Go (APPSEC-911) (#2754)
Specification ticket:
https://sonarsource.atlassian.net/browse/APPSEC-911

You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S2077/go) (updated a
few minutes after each push).

## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)

---------

Co-authored-by: egon-okerman-sonarsource <egon-okerman-sonarsource@users.noreply.github.com>
Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
2023-08-08 17:55:49 +02:00
Johann Beleites
fdbb9d7145
SONARJAVA-4495 Update S2175 in line with LayC. (#2813) 2023-08-08 17:31:40 +02:00
Johann Beleites
0e4a0925f9
SONARJAVA-4495 Update S2168 in line with LayC. (#2817) 2023-08-08 17:31:04 +02:00
Johann Beleites
aaab6fea1b
SONARJAVA-4495 Update S2185 in line with LayC. (#2818) 2023-08-08 17:30:36 +02:00
Yassin Kammoun
0056c3861a
Modify rule S6643: Remove diff-tag, noncompliant and how to fix it sections (#2829) 2023-08-08 15:47:32 +02:00
leonardo-pilastri-sonarsource
7b79b4f303
Modify rule S3012: LaYC format (#2812) 2023-08-08 15:46:37 +02:00
Loris S
b6ada3241d
Modify S5496(Python): Migrate to LayC (#2815)
## 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-08-08 15:40:08 +02:00
leonardo-pilastri-sonarsource
ba7fea9066
Modify rule S3014: LaYC format (#2814) 2023-08-08 14:47:30 +02:00
hendrik-buchwald-sonarsource
93479de5a1
Modify rule S6652: Separate resources in multiple files (#2828) 2023-08-08 12:26:10 +00:00
Loris S
17f6634cc9
Modify S3466,S3598,S3927(vbnet): Fix diff typos (#2827)
## 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-08-08 14:23:00 +02:00
Maksim Grebeniuk
5aa384f99e
Modify rule S2317: LaYC format (#2677) 2023-08-08 11:11:03 +02:00
Maksim Grebeniuk
75bfbc1ea2
Modify rule S5706: LaYC format (#2665) 2023-08-08 11:10:03 +02:00
David Kunzmann
dae6424f43
Modify rule S5720: LaYC format (#2609) 2023-08-08 11:03:54 +02:00
Jonas Wielage
b4fa02a24c
Added secrets language to LANG_TO_SOURCE dict (#2820) 2023-08-08 09:44:10 +02:00
David Kunzmann
631cd3f412
Modify rule S5655: LaYC format (#2610) 2023-08-08 09:08:50 +02:00
Maksim Grebeniuk
d8cc7d31e7
Modify rule S5780: LaYC format (#2632) 2023-08-08 09:07:21 +02:00
Guillaume Dequenne
381aefe090
Modify rule S5717: LaYC format (#2659) 2023-08-08 09:05:22 +02:00
SonarTech
b65096271e update coverage information 2023-08-08 00:32:16 +00:00
Loris S
8f47d187ae
Modify S2083(js): Fix code samples (#2811)
## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-08-07 14:18:28 +00:00
hendrik-buchwald-sonarsource
32bbe863a4
Modify rule S6652: Move content to shared directory (#2810) 2023-08-07 15:49:00 +02:00
David Kunzmann
beacd99c9d
Modify rule S2318: LaYC format (#2690) 2023-08-07 15:16:04 +02:00
Guillaume Dequenne
3af5ae6c62
Modify rule S5914: LaYC format (#2651) 2023-08-07 14:58:26 +02:00
David Kunzmann
457e6c3dc3
Modify rule S2772: LaYC format (#2666) 2023-08-07 14:46:53 +02:00
Guillaume Dequenne
badadc5cb3
Modify rule S5806: LaYC format (#2673) 2023-08-07 14:45:53 +02:00
Tim Pohlmann
e0131c9ad1
Modify rule S4004: Fix code samples (#2808)
## 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-08-07 11:51:07 +02:00
Antonio Aversa
7211ea294d
Modify rule S3871: fix orthography (#2716) 2023-08-07 11:49:02 +02:00
Rudy Regazzoni
a474e70d82
Modify rule S6385: Add language AzureResourceManager (Bicep) (#1901)
Research ticket: https://sonarsource.atlassian.net/browse/SONARIAC-757
Implementation ticket:
https://sonarsource.atlassian.net/browse/SONARIAC-772

PR https://github.com/SonarSource/rspec/pull/1829 Added support for
AzureResourceManager (JSON). This PR extends that work to add Bicep
support. This PR cannot be merged until we support the Bicep language.

---------

Co-authored-by: Marcin Stachniuk <marcin.stachniuk@sonarsource.com>
2023-08-07 08:49:21 +02:00
SonarTech
b004b015f1 update coverage information 2023-08-06 00:34:09 +00:00
Loghin Vlad-Andrei
ddd6e235e2
Modify rule S3520: Convert to LaYC format
## 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: Arseniy Zaostrovnykh <arseniy.zaostrovnykh@sonarsource.com>
2023-08-04 15:19:51 +00:00
Antonio Aversa
a02bf814d4
Clean Code Taxonomy: add "code" to all non-obsolete metadata.json (#2793) 2023-08-04 17:19:38 +02:00
Maksim Grebeniuk
7b1f4256c4
Modify rule S5890: LaYC format (#2613) 2023-08-04 17:16:27 +02:00
Guillaume Dequenne
00efcc4085
Modify rule S2316: LaYC format (#2657) 2023-08-04 17:15:31 +02:00
Maksim Grebeniuk
a2990623ba
Modify rule S2320: LaYC format (#2679) 2023-08-04 17:10:39 +02:00
David Kunzmann
f5003ff8b7
Modify rule S6466: LaYC format (#2709) 2023-08-04 17:10:05 +02:00
Nils Werner
6759eb82b7
Modify rule S6294: LaYC format (#2791) 2023-08-04 15:06:33 +00:00
Michael Jabbour
32232051fd
Add clean code taxonomy properties to metadata schema (#2792) 2023-08-04 16:55:03 +02:00
David Kunzmann
c1656db6ee
Modify rule S5754: LaYC format (#2662) 2023-08-04 16:50:19 +02:00
Maksim Grebeniuk
68cf9e04c1
Modify rule S1845: LaYC format (#2778) 2023-08-04 16:47:57 +02:00
Guillaume Dequenne
4280ad6f42
Modify S6417: LaYC format (#2756) 2023-08-04 16:47:45 +02:00
Maksim Grebeniuk
bd0e169466
Modify rule S3403: LaYC format (#2765) 2023-08-04 16:46:24 +02:00
Maksim Grebeniuk
5de743ed99
Modify rule S5709: LaYC format (#2636) 2023-08-04 16:45:15 +02:00
Maksim Grebeniuk
26b9c8a9e3
Modify rule S5685: LaYC format (#2635) 2023-08-04 16:44:20 +02:00
Maksim Grebeniuk
3c941265a3
Modify rule S5797: LaYC format (#2634) 2023-08-04 16:43:49 +02:00
Maksim Grebeniuk
7c9607510c
Modify rule S2710: LaYC format (#2671) 2023-08-04 16:42:00 +02:00
Maksim Grebeniuk
0e6dd28428
Modify rule S2836: LaYC format (#2670) 2023-08-04 16:41:02 +02:00
Maksim Grebeniuk
fc65f77aaf
Modify rule S5633: LaYC format (#2758) 2023-08-04 16:39:20 +02:00
Guillaume Dequenne
eaeb688782
Modify S5855: LaYC format (#2763) 2023-08-04 16:18:23 +02:00
David Kunzmann
7ed93874de
Modify rule S5799: LaYC format (#2627) 2023-08-04 16:15:13 +02:00
Maksim Grebeniuk
7dbca266e5
Modify rule S2638: LaYC format (#2782) 2023-08-04 16:14:12 +02:00
Guillaume Dequenne
f174ab003a
Modify S6002: LaYC format (#2771) 2023-08-04 16:12:40 +02:00
tomasz-kaminski-sonarsource
dfe3824ab3
Modify rule S5283: Adapt to LaYC 2023-08-04 15:46:42 +02:00
Maksim Grebeniuk
f3bcb12833
Modify rule S1542: LaYC format (#2667) 2023-08-04 15:35:18 +02:00
Maksim Grebeniuk
62830872f3
Modify rule S3985: LaYC format (#2780) 2023-08-04 15:34:27 +02:00
Arseniy Zaostrovnykh
3d75b1285e
Modify rule S3584: Expand to cover LaYC 2023-08-04 13:31:50 +00:00
Marcin Stachniuk
4cfc0247d3
SONARIAC-761 Rule S6383 Disable RBAC on AKS ad Bicept (#2745)
## 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-08-04 13:55:06 +02:00
Philipp Dominik Schubert
f2920fa60d
Modify rule S5485: Expand and adjust for LaYC (#2779)
## 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-08-04 13:54:42 +02:00
Loghin Vlad-Andrei
330fde5308
Modify rule S6214: Convert to LaYC format
## 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: Arseniy Zaostrovnykh <arseniy.zaostrovnykh@sonarsource.com>
2023-08-04 11:53:34 +00:00
Nils Werner
0c5c8c9ca7
Modify rule S6295: LaYC format (#2785) 2023-08-04 13:33:41 +02:00
github-actions[bot]
1c73733e2e
Modify rule S1135: Add language AzureResourceManager (Bicep) (#2788) 2023-08-04 13:28:28 +02:00
Maksim Grebeniuk
e92fcdc57f
Modify rule S6465: LaYC format (#2708) 2023-08-04 13:21:13 +02:00
Maksim Grebeniuk
43ff047f88
Modify rule S3699: LaYC format (#2759) 2023-08-04 12:58:46 +02:00
David Kunzmann
041ffd78e4
Modify rule S6464: LaYC format (#2707) 2023-08-04 12:57:58 +02:00
Balázs Benics
9969140048
Modify rule S5486: Adapt to LaYC (#2751) 2023-08-04 10:26:08 +00:00
Martin Strecker
f0f54b8f7a
Modify rule S100: Revert accidental change (#2789)
Revert an accidental change introduced in #2713.
2023-08-04 11:54:05 +02:00
Philipp Dominik Schubert
8dba3caae0
Modify rule S5272: Expand and adjust for LaYC (#2752)
## 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: Arseniy Zaostrovnykh <arseniy.zaostrovnykh@sonarsource.com>
2023-08-04 09:40:34 +00:00
Marco Borgeaud
c8cb1f6fb0
Modify rule S1048,S3654: LaYC format 2023-08-04 09:38:26 +02:00
Pierre-Loup
149a133550
Modify rule S3749: update issue type to Code-Smell (APPSEC-523) (#2485) 2023-08-04 09:26:25 +02:00
Rudy Regazzoni
d5a38ab485
Modify rule S6381: Add language AzureResourceManager (Bicep) (#1922) 2023-08-04 08:53:48 +02:00
tomasz-kaminski-sonarsource
dac53897f5
S3870 Update metadata (#2786)
Few updates I have missed during review, and just realized when saw
sonar-cpp PR:
* we should check quickfix, and mark if infeasible if we think that one
could be provided
 * metadata now contains links to security standards, so I updated it
* pre
https://github.com/SonarSource/rspec/blob/master/docs/link_formatting.adoc,
CWE should start with CWE
* I think that CWE and CERT are put under standard, external conding
guidelines are use for MISRA and CoreGuidlines.

## 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: Tomasz Kamiński <tomasz.kamiński@sonarsource.com>
2023-08-04 07:58:49 +02:00
SonarTech
3f93d28a53 update coverage information 2023-08-04 00:34:58 +00:00
Marco Kaufmann
3d1f6649f4
SONARJAVA-4552 Deprecate rule S6374 (#2783) 2023-08-03 17:55:52 +02:00
Marco Borgeaud
6398acacd9
Add CI task to test CI tests (#2768)
Extract the bits using the custom asciidoctor to a dedicated file.
This new script uses `set -e` to catch unexpected errors.
It is also covered with integration tests that get executed on the CI.

This serves as the groundwork to integrate more advanced validation
tests.
2023-08-03 17:21:40 +02:00
Anton Haubner
f6dfcca980
Modify rule S2734: Python: Don't replace with S935 (#2774)
S935 has been merged with S6658.
As part of that merge, S935 has been restricted to a specific set of
special functions for now, not including `__init__`.

Hence, we keep S2734 at the moment, until S935 is extended to cover more
functions.

See also
* https://github.com/SonarSource/sonar-python/pull/1529#discussion_r1282759218
* https://github.com/SonarSource/sonar-python/pull/1528
* https://sonarsource.slack.com/archives/CFUS31LRE/p1690534750237959
2023-08-03 17:09:14 +02:00
Jamie Anderson
5c10d8b93c
Modify rule S6382: Add language AzureResourceManager (Bicep) (#1921)
Specification ticket:
https://sonarsource.atlassian.net/browse/SONARIAC-762
Implementation ticket: TBC

This PR builds on top of #1920 to add examples using the Bicep language.

---------

Co-authored-by: Rudy Regazzoni <110470341+rudy-regazzoni-sonarsource@users.noreply.github.com>
2023-08-03 16:52:32 +02:00
tomasz-kaminski-sonarsource
da1e6f4fc5
S3519: Add notes for migration to LaYC
Adding very useful LaYC migration notes from Balazs.
2023-08-03 16:51:44 +02:00
Philipp Dominik Schubert
d45bde0019
Modify rule S3807: Expand and adjust for LaYC (#2750)
## 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-08-03 16:26:31 +02:00
tomasz-kaminski-sonarsource
c5cf32fc30
Modify rule S3529: Adapt to LaYC 2023-08-03 14:20:30 +00:00
github-actions[bot]
7fe7e1eda0
Create rule S4790: Using weak hashing algorithms is security-sensitive: add Go (#2753)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S4790/go) (updated a
few minutes after each push).

## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-08-03 16:06:34 +02:00
Nils Werner
acb068e9de
Modify rule S6476: LaYC format (#2777) 2023-08-03 14:04:17 +00:00
Martin Strecker
49bcb7ce8a
Modify rule S3925: Adopt exception description to the new behavior (#2713)
Add the new behavior to the RSpec introduced by
https://github.com/SonarSource/sonar-dotnet/pull/7673

## 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-08-03 15:41:46 +02:00
Anton Haubner
5dc6e2c8c9
Modify rule S1128: Python: Remove rule from Sonar way (#2773) 2023-08-03 13:55:22 +02:00
Anton Haubner
286ec65543
Modify rule S6661: Python: Remove from Sonar Way (#2772) 2023-08-03 13:54:45 +02:00
David Kunzmann
df23b9bec7
Modify Rule S5795: LaYC Format (#2648) 2023-08-03 13:46:37 +02:00
Nils Werner
56f4517906
Modify rule S1135: LaYC format (#2715) 2023-08-03 10:58:53 +00:00
Irina Batinic
8d41165dad
Modify rule S2039: SONARJAVA-4467 Add note for exceptions (#2766) 2023-08-03 09:30:22 +00:00
Marco Borgeaud
e565837487
Modify rule S1913: LaYC format (#2747) 2023-08-03 09:18:37 +00:00
Jamie Anderson
69b3569c65
Modify rule S6329: Add language AzureResourceManager (Bicep) (#1889)
Research ticket: https://sonarsource.atlassian.net/browse/SONARIAC-754
Implementation ticket:
https://sonarsource.atlassian.net/browse/SONARIAC-790

PR #1872 Added support for AzureResourceManager (JSON). This PR extends
that work to add Bicep support. This PR cannot be merged until we
support the Bicep language.
2023-08-03 11:02:22 +02:00
Maksim Grebeniuk
805c41c2bb
Modify rule S5704: LaYC format (#2640) 2023-08-03 11:01:28 +02:00
Guillaume Dequenne
6bdec50957
Modify S5886: LaYC format (#2625) 2023-08-03 10:58:37 +02:00
hendrik-buchwald-sonarsource
b626a82de9
Create rule S5332: Add BICEP for AzureResourceManager (#1872)
PR #1839 added the JSON format for Azure Resource Manager. This PR adds
BICEP. Since BICEP support will follow later, it can not be merged yet.

---------

Co-authored-by: Rudy Regazzoni <110470341+rudy-regazzoni-sonarsource@users.noreply.github.com>
2023-08-03 10:26:18 +02:00
David Kunzmann
9b7a715203
Modify rule S5781: LaYC format (#2615) 2023-08-03 09:54:15 +02:00
Guillaume Dequenne
d5bc6aa709
Modify S5727: LaYC format (#2616) 2023-08-03 09:44:48 +02:00
Amélie Renard
1e063872a9
Modify rule S3935: LaYC format 2023-08-03 09:11:13 +02:00
Martin Strecker
d84dc21774
Add VS code schema support for manifest.json (#2767)
Adds json schema support for VS Code (especially [IntelliSense and
validation](https://code.visualstudio.com/docs/languages/json#_intellisense-and-validation)):


![image](https://github.com/SonarSource/rspec/assets/103252490/45145852-08d2-4bf3-af82-7f176afb29c6)
2023-08-03 09:02:47 +02:00
Marcin Stachniuk
8dbe0e2ed2
Modify rule S6413: Defining a short log retention duration is security-sensitive, add Bicep format (#2743)
## 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-08-03 08:42:07 +02:00
SonarTech
b9614645f8 update coverage information 2023-08-03 00:31:08 +00:00
Balázs Benics
fb00cb04fd
Modify rule S5314: Expand and adjust for LaYC (#2748) 2023-08-02 17:22:40 +02:00
Maksim Grebeniuk
7bca7afd5d
Create rule S6659: 'startswith' or 'endswith' methods should be used instead of string slicing in condition expressions (#2476) 2023-08-02 17:20:30 +02:00
Irina Batinic
87a286cd90
Modify rule S2039: SONARJAVA-4467 Remove deprecation S2039 for Java (#2762) 2023-08-02 17:07:01 +02:00
Anton Haubner
714ee0bb94
Merge S6658 into S935 (#2761)
This merges S6658 into S935, see also this discussion on slack:
https://sonarsource.slack.com/archives/CFUS31LRE/p1690534750237959

This is the previous PR for merging S6658 which this PR is based on:
https://github.com/SonarSource/rspec/pull/2450

---------

Original S6658 rule authored-by: Maksim Grebeniuk <maksim.grebeniuk@sonarsource.com>
2023-08-02 16:55:20 +02:00
Arseniy Zaostrovnykh
46a58e80ca
Modify rule S2107: Expand and adjust for LaYC
I moved and closed the Java rule description because they do not plan to
implement it, but it is nice to preserve the description for posterity.
2023-08-02 14:52:06 +00:00
Amélie Renard
2cc06788de
Modify rule S5489: modernize example 2023-08-02 16:34:08 +02:00
github-actions[bot]
d644d018db
Create rule S6662: Set members and dictionary keys should be hashable (#2477)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6662/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>
2023-08-02 14:12:20 +00:00
github-actions[bot]
45c9727f72
Create rule S6663: Sequence indexes must have an __index__ method (#2487)
Authored-by: guillaume-dequenne-sonarsource <guillaume-dequenne-sonarsource@users.noreply.github.com>
2023-08-02 15:49:32 +02:00
Pierre-Loup
4ba4fc489e
Modify rule S6379: Add language AzureResourceManager (Bicep) (#2244)
## 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-08-02 15:34:14 +02:00
github-actions[bot]
3d7b200c37
Create rule S6379: Add language AzureResourceManager (APPSEC-776) (#2242)
[Specification
ticket](https://sonarsource.atlassian.net/browse/APPSEC-776)
[Implementation
ticket](https://sonarsource.atlassian.net/browse/SONARIAC-885)
[RSPEC
Preview](https://sonarsource.github.io/rspec/#/rspec/S6379/azureresourcemanager)

PR for adding Bicep code examples
https://github.com/SonarSource/rspec/pull/2244

## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)

---------

Co-authored-by: pierre-loup-tristant-sonarsource <pierre-loup-tristant-sonarsource@users.noreply.github.com>
Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>
Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
2023-08-02 15:18:05 +02:00
Pierre-Loup
2336aba6a7
Modify rule S6648: Add language AzureResourceManager (Bicep) (#2277)
[Specification
ticket](https://sonarsource.atlassian.net/browse/APPSEC-803)
[Implementation
ticket](https://sonarsource.atlassian.net/browse/SONARIAC-896)

Main PR for ARM templates:
https://github.com/SonarSource/rspec/pull/2250

## 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: pierre-loup-tristant-sonarsource <pierre-loup-tristant-sonarsource@users.noreply.github.com>
Co-authored-by: Rudy Regazzoni <110470341+rudy-regazzoni-sonarsource@users.noreply.github.com>
2023-08-02 15:17:24 +02:00
Maksim Grebeniuk
da1a2a77e3
Create rule S6660: isinstance() should be preferred to direct type comparisons (#2480) 2023-08-02 14:13:04 +02:00
Maksim Grebeniuk
78a77b9d50
Create rule S6661: Assignments of lambdas to variables should be replaced by function definitions. (#2483) 2023-08-02 14:11:14 +02:00
Marco Borgeaud
6cae06f38c
Modify rule S1916: LaYC format (#2711)
Share content with S2323.
2023-08-02 09:47:38 +00:00
Martin Strecker
ebcace66f8
Modify rule S4023: Fix spelling (#2755) 2023-08-02 09:57:53 +02:00
Marco Borgeaud
8c7e94cd08
Run include and cross-references validation on all files (#2685)
The previous validation code was taking about 3 minutes when running on
all rules, which is the case when modifying anything outside rules/,
including shared_content/.

The runtime was marginal when only the content specific to one rule was
modified, e.g. only rules/S100/cfamily/rule.adoc is modified.

The new validation code always takes about 30 seconds on the CI. This is
a slight increase for small PR but a large reduction for PR affecting
the whole system.

Furthermore, the new approach validates includes and cross-references
properly. An issue is now raised when:
 * The last include to shared_content/lang/foo.adoc is removed.
 * A shared_content doc includes a file from another rule, e.g.
   rules/S100/lang/rule.adoc includes shared_content/lang/foo.adoc,
   which includes rules/S200/bar.adoc.

This is achieved with proper Asciidoc extensions written in Ruby.
See https://docs.asciidoctor.org/asciidoctor/latest/extensions/
2023-08-02 09:21:56 +02:00
Marco Borgeaud
a523a5d6e4
Do not clone the repo in all_required_checks_task
Save about 20s of CPU time on each commit/PR.
2023-08-02 09:03:03 +02:00
SonarTech
8f76da4f61 update coverage information 2023-08-02 00:30:36 +00:00
Martin Strecker
7de7c899ae
Modify rule S4023: LayC and improve rule description (#2691)
see also
https://github.com/SonarSource/sonar-dotnet/issues/7633#issuecomment-1653156163

---------

Co-authored-by: Cristian Ambrosini <114916336+cristian-ambrosini-sonarsource@users.noreply.github.com>
2023-08-01 18:23:30 +02:00
Irina Batinic
643dc1ff45
Modify rule S6625: Fix typo (#2749) 2023-08-01 10:39:34 +02:00
Yassin Kammoun
ba3d54e57f
Modify rule S6650: Add diff-tag (#2741) 2023-08-01 08:49:22 +02:00
Yassin Kammoun
10b328a50d
Modify rule S3799: Use let instead of var in noncompliant snippet (#2730) 2023-08-01 08:49:12 +02:00
Yassin Kammoun
625613d7c1
Modify rule S1763: Fix compliant diff-tag (#2724) 2023-08-01 08:48:59 +02:00
Yassin Kammoun
737826dea9
Modify rule S6637: Quote method's name in rule title (#2740) 2023-08-01 08:31:45 +02:00
Yassin Kammoun
902df156aa
Modify rule S6645: Fix noncompliant comments and links' titles (#2742) 2023-08-01 08:31:36 +02:00
Yassin Kammoun
610de1f332
Modify rule S6635: Fix link title (#2729) 2023-08-01 08:05:56 +02:00
Yassin Kammoun
9f95a6f49c
Modify rule S6676: Quote methods' names in rule title (#2739) 2023-08-01 08:05:46 +02:00
Yassin Kammoun
2b50c336db
Modify rule S6647: Add diff-tag and fix noncompliant comment (#2744) 2023-08-01 08:05:25 +02:00
Yassin Kammoun
00ea7bea23
Modify rule S1128: Fix related rules section (#2738) 2023-08-01 08:05:14 +02:00
Yassin Kammoun
2cd7fc725e
Modify rule S6671: Fix related rules section (#2732) 2023-08-01 07:27:35 +02:00
Yassin Kammoun
7fb97094c8
Modify rule S108: Fix exceptions section and replace 'var' with 'let' (#2733) 2023-08-01 07:27:26 +02:00
Yassin Kammoun
4922fc9fc5
Modify rule S6551: Fix documentation section (#2734) 2023-08-01 07:27:18 +02:00
Yassin Kammoun
d3cb89c529
Modify rule S6657: Replace 'var' with 'let' in snippets and fix case (#2735) 2023-08-01 07:27:11 +02:00
Yassin Kammoun
eeda8468ea
Modify JS/TS rules: Uniform links to TypeScript and MDN references (#2736) 2023-08-01 07:27:02 +02:00
Yassin Kammoun
b338b61b84
Modify rule S6666: Quote method's name in rule title (#2746) 2023-07-31 20:59:28 +02:00
Yassin Kammoun
5d5bdb92e2
Modify rule S6509: Fix links' titles (#2731) 2023-07-31 20:59:17 +02:00
Yassin Kammoun
6b8f65c342
Modify rule S6092: Prefix documentation links with bullet points (#2727) 2023-07-31 20:59:04 +02:00
Yassin Kammoun
6533b0165f
Modify rule S4143: Remove leading space in code snippets (#2728) 2023-07-31 19:51:50 +02:00
Yassin Kammoun
7a83669eb3
Modify rule S4043: Delimite consecutive snippets with a description (#2725) 2023-07-31 19:51:39 +02:00
Yassin Kammoun
5dec24baf9
Modify rule S6654: Add diff-tag and fix noncompliant comments (#2723) 2023-07-31 18:17:05 +02:00
Yassin Kammoun
fbd75c6f86
Modify rule S6594: Fix link and remove extra section (#2722) 2023-07-31 18:16:55 +02:00
Yassin Kammoun
351047c3df
Modify rule S2692: Fix snippet and documentation section (#2721) 2023-07-31 18:16:41 +02:00
Yassin Kammoun
ec0a9ae6d6
Modify rule S4619: Fix code snippets (#2720) 2023-07-31 18:01:52 +02:00
Yassin Kammoun
dd75e8143b
Modify rule S4524: Add link to documentation (#2719) 2023-07-31 18:01:31 +02:00
Yassin Kammoun
c2bc16f386
Modify rule S2737: Add links to documentation (#2718) 2023-07-31 18:01:10 +02:00
Marco Borgeaud
02dae8e652
Clean ci/validate_asciidoc.sh
* Regroup read-only variable declaration. `declare -xr` is used for
an exported read-only variable.
 * Use more accurate log messages.
 * Use consistent indentation of 2 spaces.
 * Fail fast if dependencies cannot be installed.
 * Regroup HTML generation & its validation.
 * Document the main validation points.
 * Simplify some commands and address some ShellCheck warnings.
2023-07-31 15:37:06 +02:00
Marco Borgeaud
f6a887100c
Revert "Clean ci/validate_asciidoc.sh (09a2902fe3b86)"
This reverts commit 09a2902fe3b8688ca6bc818c7c6055e2307e6235. It
introduced some regressions.
2023-07-31 13:11:14 +00:00
Marco Borgeaud
09a2902fe3
Clean ci/validate_asciidoc.sh (#2684)
* Regroup readonly variable declaration. `declare -xr` is used for exported readonly variable.
 * Use more accurate log messages.
 * Use consistent indentation of 2 spaces.
 * Fail fast if dependencies cannot be installed.
 * Regroup HTML generation & its validation.
 * Document the main validation points.
 * Simplify some commands and address some ShellCheck warnings.
2023-07-31 14:41:51 +02:00
Guillaume Dequenne
0f7c424200
Modify S2876: LaYC format (#2471) 2023-07-31 14:19:01 +02:00
Guillaume Dequenne
56e1e85beb
Modify S5642: LaYC format (#2458) 2023-07-31 14:18:28 +02:00
Nils Werner
a7c717ca75
Modify rule S6273: LaYC format (#2710) 2023-07-31 10:14:53 +00:00
Marco Borgeaud
44fb7ab949
Remove unused asciidoctor script
The asciidoctor binary we use is installed in the Docker image.
The JS frontend gets it from NPM.
2023-07-31 11:59:27 +02:00
Guillaume Dequenne
aa77e68ea4
Modify S1128; Add Python description (#2469) 2023-07-31 11:52:51 +02:00
Zsolt Kolbay
ed2604877c
Modify rule S1186: Fix exception type (#2694)
Related to [this community
PR](https://github.com/SonarSource/sonar-dotnet/pull/7587).
2023-07-31 10:53:06 +02:00
Egon Okerman
9c1875bc3c
Modify rule S6656: Add missing message and highlighting info (#2668)
## 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-07-31 10:43:08 +02:00
Guillaume Dequenne
00dc8d7c72
Modify S5650: LaYC format (#2442) 2023-07-31 10:18:28 +02:00
SonarTech
e63ac797f4 update coverage information 2023-07-29 00:32:59 +00:00
github-actions[bot]
25191f2751
Create rule S6173: Reflection should not be vulnerable to injection attacks (C#), move to LaYC format (#2644)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6173/csharp)
(updated a few minutes after each push).

## 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
- [x] 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>
Co-authored-by: Loris S <91723853+loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Jamie Anderson <127742609+jamie-anderson-sonarsource@users.noreply.github.com>
2023-07-28 17:38:46 +02:00
Marco Borgeaud
b9d95c8adf
Modify rule S2323: LaYC format 2023-07-28 16:31:58 +02:00
Yassin Kammoun
ad0bfb2c7a
Modify rule S2999: Improve rule's title (#2706)
Co-authored-by: Victor <106590915+victor-diez-sonarsource@users.noreply.github.com>
2023-07-28 15:27:36 +02:00
Yassin Kammoun
8b5543fcb0
Modify rule S4822: Improve rule's title (#2705) 2023-07-28 15:10:10 +02:00
Yassin Kammoun
244850e041
Modify rule S3500: Improve rule's title (#2704) 2023-07-28 15:09:57 +02:00
Yassin Kammoun
ffcde510af
Modify rule S2310: Improve rule's title (#2703) 2023-07-28 15:09:45 +02:00
Yassin Kammoun
9046f3e170
Modify rule S4030: Improve rule's title (#2702) 2023-07-28 15:09:28 +02:00
Yassin Kammoun
b8e3fd6502
Modify rule S3981: Improve rule's title (#2701) 2023-07-28 15:09:17 +02:00
github-actions[bot]
95759e40c2
Create rule S6680(C#): Loop boundaries should not be vulnerable to injection attacks (#2607)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6680/csharp)
(updated a few minutes after each push).

## 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
- [x] 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>
Co-authored-by: Loris S <91723853+loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Jamie Anderson <127742609+jamie-anderson-sonarsource@users.noreply.github.com>
2023-07-28 14:58:24 +02:00
John-Clifton-SonarSource
1d2bb1748f
Modify S1710: fix a typo (#2699)
## 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-07-28 13:28:20 +01:00
Amélie Renard
c5cd901f92
Modify rule S1035: LaYC format (#2696) 2023-07-28 13:10:31 +02:00
Victor
38626b0c08
Modify rule S4335: Adapt to LaYC (#2693)
Co-authored-by: Yassin Kammoun <52890329+yassin-kammoun-sonarsource@users.noreply.github.com>
2023-07-28 11:10:41 +02:00
Arseniy Zaostrovnykh
e79e3ba6e0
Modify rule S1232: Expand and comply with LaYC format 2023-07-28 10:53:21 +02:00
Yassin Kammoun
b9583ffac5
Modify rule S4325: Adapt to LaYC (#2695) 2023-07-28 09:22:31 +02:00
Victor
59516e9a7e
Modify rule S4124: Adapt to LaYC (#2692)
Co-authored-by: Yassin Kammoun <52890329+yassin-kammoun-sonarsource@users.noreply.github.com>
2023-07-28 07:10:53 +00:00
SonarTech
4387797de4 update coverage information 2023-07-28 00:30:31 +00:00
Victor
569f9ae375
Modify rule S4622: Adapt to LaYC (#2689)
Co-authored-by: Yassin Kammoun <52890329+yassin-kammoun-sonarsource@users.noreply.github.com>
2023-07-27 16:07:07 +02:00
cynthiabethea
6ad932e661
cyn/modify-S3456-layc-language-edit (#2688)
## 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-07-27 14:53:42 +01:00
Amélie Renard
7431ca0969
Modify rule S1044: LaYC format 2023-07-27 15:18:13 +02:00
Egon Okerman
ea7cefd5a9
Modify rule S6380: Fix message inconsistencies (ARM) (#2687)
## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-07-27 14:29:27 +02:00
Yassin Kammoun
061e70baaf
Modify rule S4623: Adapt to LaYC (#2682) 2023-07-27 13:28:22 +02:00
Victor
b71d0c8495
Modify rule S4782: Adapt to LaYC (#2681)
Co-authored-by: Yassin Kammoun <52890329+yassin-kammoun-sonarsource@users.noreply.github.com>
2023-07-27 09:45:31 +00:00
Yassin Kammoun
9bc53c806b
Modify rule S4323: Adapt to LaYC (#2680) 2023-07-27 11:13:38 +02:00
Victor
bb8bed89e6
Modify rule S4156: Adapt to LaYC (#2678)
Co-authored-by: Yassin Kammoun <52890329+yassin-kammoun-sonarsource@users.noreply.github.com>
2023-07-27 09:01:55 +00:00
github-actions[bot]
8d4a040a1d
Create rule S6679: Number.isNaN() should be used to check for NaN value (#2603)
https://github.com/SonarSource/SonarJS/issues/3921
2023-07-27 08:55:40 +00:00
Yassin Kammoun
b8246997c0
Modify rule S4621: Adapt to LaYC (#2675) 2023-07-27 09:22:35 +02:00
SonarTech
fcd7359032 update coverage information 2023-07-27 00:30:40 +00:00
Michael Jabbour
4064752803
Modify rule S6458: LaYC format (#2557) 2023-07-26 17:42:05 +02:00
Yassin Kammoun
50be54105a
Modify rule S1862: Adapt to LaYC (#2669) 2023-07-26 16:18:28 +02:00
Victor
33e029d4f1
Modify rule S2259: Adapt to LaYC (#2672) 2023-07-26 16:00:44 +02:00
Martin Strecker
a21bdc1b9d
Modiffy rule S2190: Fix link formats (#2660) 2023-07-26 15:40:41 +02:00
Yassin Kammoun
d7a21cf83b
Modify rule S5850: Adapt to LaYC (#2664) 2023-07-26 15:27:22 +02:00
Martin Strecker
f5f12731ba
Modify rule S6422: Fix rule links (#2661) 2023-07-26 15:11:17 +02:00
Victor
cc050dd370
Modify rule S5843: Adapt to LaYC (#2663)
Co-authored-by: Yassin Kammoun <52890329+yassin-kammoun-sonarsource@users.noreply.github.com>
2023-07-26 13:04:09 +00:00
cynthiabethea
2983348e74
Modify rule S2190: fix typo (#2645)
## Review

A dedicated reviewer checked the rule description successfully for:

- [ ] logical errors and incorrect information
- [ ] information gaps and missing content
- [ ] text style and tone
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-07-26 13:43:41 +01:00
Yassin Kammoun
b52596513b
Modify rule S2251: Adapt to LaYC (#2652) 2023-07-26 14:08:06 +02:00
Victor
af13888bc3
Modify rule S1264: Adapt to LaYC (#2653) 2023-07-26 12:06:32 +00:00
Victor
20d3bbbc43
Modify rule S2189: Adapt to LaYC (#2656) 2023-07-26 14:00:47 +02:00
Marco Borgeaud
4cc3355a7b
Modify rule S6223: LaYC format (#2553) 2023-07-26 13:59:50 +02:00
Martin Strecker
4a255a8310
Modify S4433: Formatting is broken due to line break in emphased words. (#2655) 2023-07-26 13:56:28 +02:00
Martin Strecker
7359290c48
Modify rule S2995: Fix broken link to other rule (#2654) 2023-07-26 13:55:48 +02:00
Gregory Paidis
2c6a072860
Modify S125: Set quickfix field for C# (#2658) 2023-07-26 13:47:36 +02:00
Victor
a9e5d1bd54
Modify rule S2201: Adapt to LaYC (#2649)
Co-authored-by: Yassin Kammoun <52890329+yassin-kammoun-sonarsource@users.noreply.github.com>
2023-07-26 09:42:46 +00:00
Yassin Kammoun
0db6d021f1
Modify rule S1301: Adapt to LaYC (#2650) 2023-07-26 11:24:45 +02:00
Victor
cc7dd64785
Modify rule S1763: Adapt to LaYC (#2642)
Co-authored-by: Yassin Kammoun <52890329+yassin-kammoun-sonarsource@users.noreply.github.com>
2023-07-26 07:56:48 +00:00
Victor
e387aa3a3b
Modify rule S1126: Adapt to LaYC (#2643)
Co-authored-by: Yassin Kammoun <52890329+yassin-kammoun-sonarsource@users.noreply.github.com>
2023-07-26 07:51:21 +00:00
Yassin Kammoun
044af59cc8
Modify rule S1143: Adapt to LaYC (#2639) 2023-07-26 09:39:10 +02:00
SonarTech
2939698cb1 update coverage information 2023-07-26 00:34:12 +00:00
Alexander Kamushkin
16ab3fba76
Modify rule S1523: Raise issue for javascript: URLs (#2641)
https://github.com/SonarSource/SonarJS/issues/3920
2023-07-25 16:53:08 +02:00
Victor
f5e24197a2
Modify rule S1186: Adapt to LaYC (#2638)
Co-authored-by: Yassin Kammoun <52890329+yassin-kammoun-sonarsource@users.noreply.github.com>
2023-07-25 14:06:59 +00:00
Loris S
29258e3a79
Modify S3649(C#): Fix samples (#2622)
## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-07-25 15:53:23 +02:00
Yassin Kammoun
1bacde0d90
Modify rule S6328: Remove Noncompliant section (#2637)
## 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-07-25 15:22:41 +02:00
Yassin Kammoun
0a0e92902a
Modify rule S2970: Adapt to LaYC (#2631) 2023-07-25 14:57:12 +02:00
Amélie Renard
62e4ab6489
Modify rule S1679: LaYC format 2023-07-25 14:54:25 +02:00
Victor
1ad0958f83
Modify rule S5958: Adapt to LaYC (#2630)
Co-authored-by: Yassin Kammoun <52890329+yassin-kammoun-sonarsource@users.noreply.github.com>
2023-07-25 12:34:27 +00:00
github-actions[bot]
dd467c515b
Create rule S1068: Unused private class members should be removed (#2608)
https://github.com/SonarSource/SonarJS/issues/3904
2023-07-25 12:11:28 +00:00
Victor
0bfde76c0a
Modify rule S3415: Adapt to LaYC (#2628) 2023-07-25 13:42:49 +02:00
Yassin Kammoun
206fde072a
Modify rule S6328: Adapt to LaYC (#2617) 2023-07-25 13:40:32 +02:00
Arseniy Zaostrovnykh
97690bab20
Modify rule S6232: review LaYC format 2023-07-25 08:32:10 +00:00
Amélie Renard
0a052576ee
Modify rule S1039: LaYC format 2023-07-25 09:59:58 +02:00
Amélie Renard
1258289710
Modify rule S1046: LaYC format 2023-07-25 08:58:35 +02:00
SonarTech
99d6a7eeef update coverage information 2023-07-25 00:34:14 +00:00
Marco Borgeaud
f4a34b8a1b
Modify rule S6490: LaYC format (#2503) 2023-07-24 17:01:26 +02:00
Victor
4de660d8b5
Modify rule S1226: Adapt to LaYC (#2618)
Co-authored-by: Yassin Kammoun <52890329+yassin-kammoun-sonarsource@users.noreply.github.com>
2023-07-24 14:54:27 +00:00
Zsolt Kolbay
dd620580d4
Update S3329: Change quickfix field (#2620) 2023-07-24 16:54:14 +02:00
Zsolt Kolbay
252f48c417
Modify Rule S5773: Add VB.NET rule description (#2481) 2023-07-24 15:51:13 +02:00
Yassin Kammoun
ab4db0ac34
Modify rule S3516: Adapt to LaYC (#2611) 2023-07-24 14:25:42 +02:00
tomasz-kaminski-sonarsource
de09e21a39
Modify rule S836: Adapt to LaYC 2023-07-24 12:43:35 +02:00
Yassin Kammoun
3516d7d24a
Modify rule S2699: Adapt to LaYC (#2606)
## 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-07-24 11:15:24 +02:00
Yassin Kammoun
f07ebb0a79
Modify rule S5863: Adapt to LaYC (#2604) 2023-07-24 10:15:05 +02:00
SonarTech
01002a7465 update coverage information 2023-07-22 00:34:15 +00:00
Marco Kaufmann
e69756515e
Marco2/modify rspec s2229 (#2602)
Co-authored-by: Dorian Burihabwa <75226315+dorian-burihabwa-sonarsource@users.noreply.github.com>
2023-07-21 18:15:07 +02:00
Marco Kaufmann
725f68c098
Modify rule S2167: reworked rule description for LayC format [SONARJAVA-4490] (#2590) 2023-07-21 18:03:29 +02:00
Loris S
2aae85812d
Modify S2078(java+common): Improved fix (#2600) 2023-07-21 17:56:20 +02:00
Marco Kaufmann
580f70f508
Modify rule S2232: reworked rule description for LayC format [SONARJAVA-4490] (#2580)
Co-authored-by: Dorian Burihabwa <75226315+dorian-burihabwa-sonarsource@users.noreply.github.com>
2023-07-21 17:42:23 +02:00
Dorian Burihabwa
6fc02bc69d
Modify ryle S2254: LaYC review [SONARJAVA-4490] (#2591) 2023-07-21 17:41:51 +02:00
Dorian Burihabwa
083977aded
Modify rule S2272: LaYC review [SONARJAVA-4490] (#2592)
Reviewed for typos, and added a link to Javadoc.
2023-07-21 17:22:30 +02:00
Marco Kaufmann
417d2d9651
Modify rule S2154: reworked rule description for LayC format [SONARJAVA-4490] (#2598)
Co-authored-by: Dorian Burihabwa <75226315+dorian-burihabwa-sonarsource@users.noreply.github.com>
2023-07-21 17:09:19 +02:00
github-actions[bot]
fee7cf1b47
Create rule S6676: Calls to .call() and .apply() methods should not be redundant (#2579)
https://github.com/SonarSource/SonarJS/issues/3905
2023-07-21 14:53:02 +00:00
Loghin Vlad-Andrei
59737afda2
Modify rule S3400: CPP-3455 Delete this rule for CFamily 2023-07-21 15:46:16 +02:00
Victor
8601385d25
Modify rule S4158: Adapt to LaYC (#2599)
Co-authored-by: Yassin Kammoun <52890329+yassin-kammoun-sonarsource@users.noreply.github.com>
2023-07-21 15:45:46 +02:00
Victor
ca3945697f
Modify rule S2990: Fix typo (#2597)
## 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-07-21 12:35:16 +00:00
Michael Jabbour
9c261eba6b
Modify rule S6459: LaYC format 2023-07-21 14:04:01 +02:00
github-actions[bot]
d603b99be9
Create rule S1199: Nested code blocks should not be used (#2554)
https://github.com/SonarSource/SonarJS/issues/3915
2023-07-21 12:59:11 +02:00
Loris S
79702fd1a7
Modify S6413(tf): Add AWS Cloudwatch (#2551)
## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-07-21 10:14:14 +02:00
Loris S
b979fdd6e5
Modify S6321(Cfn): Improve samples (#2588)
## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-07-21 10:06:22 +02:00
Loris S
4bc0772aef
Modify S6294(Cfn): Improve samples (#2587)
## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-07-21 10:06:13 +02:00
Loris S
310134371b
Modify S6302(Cfn): Improve samples (#2586)
## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-07-21 10:05:58 +02:00
Loris S
d31327b287
Modify S6304(Cfn): Improve samples (#2573)
## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-07-21 10:05:42 +02:00
Loris S
ab2420d47e
Modify S6329(Cfn): Improve samples (#2572)
## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-07-21 10:05:33 +02:00
Loris S
c64bccc7e8
Modify S6471(docker): Improve overall rule (#2570)
## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)

---------

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>
2023-07-21 10:03:53 +02:00
SonarTech
c7b8191934 update coverage information 2023-07-21 00:34:02 +00:00
Yassin Kammoun
678c7187e2
Modify rule S3403: Adapt to LaYC (#2582) 2023-07-20 20:49:53 +02:00
cynthiabethea
316d39c88b
modify-S4524-minor-edit (#2595)
## 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-07-20 18:12:04 +01:00
cynthiabethea
e0d75f026a
Cyn/modify s104 layc language edits (#2594)
small language changes 

## 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-07-20 18:08:19 +01:00
hendrik-buchwald-sonarsource
d5f1cbee3c
Modify rule S6258: Fix indentation (#2589) 2023-07-20 17:00:27 +02:00
Victor
874ac8ffe0
Modify rule S2234: Adapt to LaYC (#2581)
Co-authored-by: Yassin Kammoun <52890329+yassin-kammoun-sonarsource@users.noreply.github.com>
2023-07-20 14:42:56 +00:00
hendrik-buchwald-sonarsource
0a3a3b7f2a
Modify rule S6303: Fix invalid code samples (#2585) 2023-07-20 16:36:25 +02:00
Loris S
32d7567acf
Modify S6333(Cfn): Improve samples (#2571)
## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-07-20 14:14:58 +00:00
Loris S
bef49d6a16
Modify S4423(Azure): Add MSSQL sample (#2532)
## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-07-20 16:09:48 +02:00
Loris S
2305a03968
Modify S6303: Add more risks (#2556)
## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-07-20 16:09:28 +02:00
Loris S
bde7354fc7
Modify S6505(docker): Improve samples (#2566)
## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-07-20 16:09:08 +02:00
Loris S
dd061defe3
Modify S6500(docker): Improve samples (#2569)
## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-07-20 16:08:52 +02:00
Fred Tingaud
c5b58af4bc
Fix mistake in doc update 2023-07-20 15:58:55 +02:00
Dorian Burihabwa
e225e9eade
Modify rule S2230: LaYC review [SONARJAVA-4490] (#2547)
Co-authored-by: Marco Kaufmann <83189575+kaufco@users.noreply.github.com>
2023-07-20 15:12:52 +02:00
Yassin Kammoun
639f9878ee
Modify rule S1128: Adapt to LaYC (#2578) 2023-07-20 15:10:01 +02:00
Victor
a278b31507
Modify rule S3626: Adapt to LaYC (#2577) 2023-07-20 14:37:23 +02:00
Yassin Kammoun
0b345c0772
Modify rule S1515: Adapt to LaYC (#2576) 2023-07-20 14:34:18 +02:00
cynthiabethea
92896e4956
Modify-S4131-layc (#2537)
Small wording change

## 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-07-20 13:15:30 +01:00
Fred Tingaud
dc89dd499c
Create a shared_content folder at root 2023-07-20 12:17:32 +02:00
Victor
ac85477ba6
Modify rule S1125: Adapt to LaYC (#2555)
Co-authored-by: Yassin Kammoun <52890329+yassin-kammoun-sonarsource@users.noreply.github.com>
2023-07-20 09:52:58 +00:00
Victor
7dfe815dfb
Modify rule S3735: Adapt to LaYC (#2568) 2023-07-20 11:50:27 +02:00
Yassin Kammoun
8d399746fb
Modify rule S6426: Adapt to LaYC (#2567) 2023-07-20 11:46:48 +02:00
Yassin Kammoun
ae719d7562
Modify rule S1439: Adapt to LaYC (#2565) 2023-07-20 11:46:15 +02:00
Loris S
2444f0a49e
Modify S6502: Improve description (#2560)
## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)

---------

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>
2023-07-20 09:33:12 +00:00
Loris S
09bf5b7423
Modify S1135(k8s): Improve the code sample (#2559)
## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-07-20 11:27:20 +02:00
Loris S
e7742337b4
Modify S6431(k8s): Improve sample (#2558)
## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-07-20 11:26:54 +02:00
Yassin Kammoun
da455d55e8
Modify rule S6325: Adapt to LaYC (#2564) 2023-07-20 11:25:45 +02:00
Victor
6db59a7275
Modify rule S2639: Adapt to LaYC (#2562) 2023-07-20 11:17:29 +02:00
Amélie Renard
24356a5ce5
Modify rule S956: LaYC format 2023-07-20 09:36:46 +02:00
Marco Kaufmann
2846b78814
Modify rule S2200: reworked rule description for LayC format [SONARJAVA-4490] (#2518) 2023-07-20 09:21:35 +02:00
Marco Borgeaud
1de29af364
Modify rule S6491: LaYC format 2023-07-20 09:19:08 +02:00
Marco Borgeaud
b42c41a038
Modify rule S5267: LaYC format (#2534) 2023-07-20 09:12:47 +02:00
SonarTech
1591d7abd2 update coverage information 2023-07-20 00:33:27 +00:00
Marco Kaufmann
f22cbbb29d
Modify rule S2226: reworked rule description for LayC format [SONARJAVA-4490] (#2544) 2023-07-19 18:55:58 +02:00
Marco Kaufmann
3efc91daa6
Modify rule S2204: reworked rule description for LayC format [SONARJAVA-4490] (#2527) 2023-07-19 18:53:17 +02:00
Dorian Burihabwa
5a1de59695
Modify rule S2186: Review rule description [SONARJAVA-4490] (#2511) 2023-07-19 18:41:52 +02:00
Dorian Burihabwa
534e17587d
Modify rule S2188: LayC review [SONARJAVA-4490] (#2542) 2023-07-19 18:39:53 +02:00
Zsolt Kolbay
2cb1203925
Modify Rule S3329: Add VB.NET rule description (#2473) 2023-07-19 18:06:56 +02:00
github-actions[bot]
2b19d99cc8
Create rule S6671: Literals should not be used for promise rejection (#2545)
https://github.com/SonarSource/SonarJS/issues/3912
2023-07-19 17:44:30 +02:00
Victor
f7b8c82f5f
Modify rule S1788: Adapt to LaYC (#2552)
Co-authored-by: Yassin Kammoun <52890329+yassin-kammoun-sonarsource@users.noreply.github.com>
2023-07-19 14:04:23 +00:00
Loris S
c6dbbd0e0c
Modify S6333: Improve the general text (#2522)
## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)

---------

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>
2023-07-19 14:03:29 +00:00
Victor
49a1de9a6d
Modify rule S1848: Adapt to LaYC (#2550)
Co-authored-by: Yassin Kammoun <52890329+yassin-kammoun-sonarsource@users.noreply.github.com>
2023-07-19 13:48:38 +00:00
Loris S
b5785edd23
Modify S6414: Fix Ask-yourself (#2536)
## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-07-19 13:34:51 +00:00
github-actions[bot]
50ff0c65d6
Create rule S6666: Spread syntax should be used instead of apply() (#2496)
https://github.com/SonarSource/SonarJS/issues/3913
2023-07-19 15:34:05 +02:00
Loris S
266701ee7f
Modify S6329: Make GCP sample safer (#2529) 2023-07-19 13:26:54 +00:00
Loris S
0fe428ee63
Modify S6317: Compliant-ized the text (#2531)
## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-07-19 15:22:32 +02:00
Yassin Kammoun
be82ab5cf0
Modify rule S2688: Adapt to LaYC (#2548) 2023-07-19 15:19:34 +02:00
Yassin Kammoun
91b345ebf2
Modify rule S1119: Adapt to LaYC (#2549) 2023-07-19 15:18:26 +02:00
Yassin Kammoun
ae159f9692
Modify rule S3699: Adapt to LaYC (#2543) 2023-07-19 14:50:33 +02:00
Yassin Kammoun
5db38a27d7
Modify rule S930: Adapt to LaYC (#2539) 2023-07-19 10:45:41 +02:00
Yassin Kammoun
d69612314d
Modify rule S1321: Adapt to LaYC (#2540) 2023-07-19 10:38:54 +02:00
Victor
3db7590390
Modify rule S2999: Adapt to LaYC (#2535) 2023-07-19 08:00:26 +00:00
Yassin Kammoun
349d0e4a90
Modify rule S1529: Adapt to LaYC (#2519) 2023-07-19 08:08:45 +02:00
SonarTech
ca2b15d1d0 update coverage information 2023-07-19 00:54:00 +00:00
hendrik-buchwald-sonarsource
b897a845c7
Modify rule S6401: Fix typo in code sample (#2526) 2023-07-18 16:33:42 +02:00
Victor
adce3a9eec
Modify rule S3796: Adapt to LaYC (#2525) 2023-07-18 13:52:22 +00:00
Yassin Kammoun
b67f9eee5c
Modify rule S2871: Fix snippet format (#2524) 2023-07-18 15:39:08 +02:00
Yassin Kammoun
8ca0676c93
Modify rule S2871: Adapt to LaYC (#2523) 2023-07-18 15:23:10 +02:00
Yassin Kammoun
60cfd07e31
Modify rule S3854: Fix resource link (#2521) 2023-07-18 14:34:40 +02:00
Yassin Kammoun
f04c7c5196
Modify rule S1516: Adapt to LaYC (#2517) 2023-07-18 14:17:43 +02:00
Victor
8a92960c62
Modify rule S3854: Adapt to LaYC (#2513) 2023-07-18 11:41:36 +00:00
Victor
58a7f2d8f5
Modify rule S2685: Adapt to LaYC (#2508) 2023-07-18 11:39:57 +00:00
Victor
3af5bf78fd
Modify rule S1533: Adapt to LaYC (#2510)
Co-authored-by: Yassin Kammoun <52890329+yassin-kammoun-sonarsource@users.noreply.github.com>
2023-07-18 08:55:05 +00:00
SonarTech
2294c48b46 update coverage information 2023-07-18 00:53:20 +00:00
Amélie Renard
ee4a68de02
Modify rule S955: LaYC format (#2502) 2023-07-17 17:42:54 +02:00
cynthiabethea
1705a42285
modify-rule-layc-S3923 (#2507)
Small typo fix

## 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-07-17 15:55:41 +01:00
Jonas Wielage
d10723fc6d
Modify rule S6552: Change Language from text to secrets (#2506) 2023-07-17 16:14:22 +02:00
Marharyta
917748b55d
Update rule S6626: Change the gradle tag to not start with a capital letter (#2504) 2023-07-17 13:46:08 +00:00
github-actions[bot]
c5c8d5c3fe
Create rule S6623: "tasks.register()" should be preferred over "tasks.create()" (#1864) 2023-07-17 15:24:35 +02:00
github-actions[bot]
4f8c77a35f
Create rule S6625: "rootProject.name" should always be present in Gradle settings (#1866) 2023-07-17 15:24:16 +02:00
github-actions[bot]
869e9a54f8
Create rule S6624: Dependency versions shouldn't be hard-coded (#1865) 2023-07-17 15:23:03 +02:00
github-actions[bot]
9bee75cb87
Create rule S6631: Gradle settings file should always be present (#1875) 2023-07-17 15:20:48 +02:00
github-actions[bot]
b37b52d09c
Create rule S6634: Core plugins IDs should be replaced by their shortcuts (#1886) 2023-07-17 15:20:13 +02:00
Amélie Renard
c98be01ff8
Modify rule S6427: LaYC format (#2449) 2023-07-17 14:04:01 +02:00
Victor
f023c53df9
Modify rule S4043: Adapt to LaYC (#2500) 2023-07-17 12:03:04 +00:00
Yassin Kammoun
8a00f95742
Modify rule S2814: Adapt to LaYC (#2501) 2023-07-17 13:48:40 +02:00
Victor
52ad37ca25
Modify rule S4822: Adapt to LaYC (#2499)
Co-authored-by: Yassin Kammoun <52890329+yassin-kammoun-sonarsource@users.noreply.github.com>
2023-07-17 11:38:56 +00:00
Yassin Kammoun
eda72a2f32
Modify rule S3686: Adapt to LaYC (#2498) 2023-07-17 12:04:32 +02:00
Amélie Renard
f1f3f149a2
Modify rule S5972: LaYC format (#2493) 2023-07-17 09:02:50 +02:00
dependabot[bot]
4c40bcdbb2
[dependabot] Bump requests from 2.28.2 to 2.31.0 in /rspec-tools (#1932)` 2023-07-17 08:57:11 +02:00
dependabot[bot]
e6eb542fd6
Bump webpack from 5.66.0 to 5.76.1 in /frontend (#1644) 2023-07-17 08:56:38 +02:00
dependabot[bot]
cbaec86f7e
Bump loader-utils from 1.4.0 to 1.4.2 in /frontend (#1398) 2023-07-17 08:56:07 +02:00
SonarTech
e9275fbca0 update coverage information 2023-07-15 00:35:53 +00:00
Johann Beleites
b1bab198cf
Modify rule S2093: improve rule within the context of LaYC (#2482) 2023-07-14 16:44:25 +02:00
Johann Beleites
12b8ca259a
Modify rule S2065: improve rule in the scope of LayC (#2468) 2023-07-14 13:35:54 +00:00
Johann Beleites
56d2ecdf6e
Modify rule S2066: Improve rule within the scope of LayC (#2470) 2023-07-14 15:28:43 +02:00
Alban Auzeill
a9e766b265
Modify rule S2097: Update rule according to the LayC (#2438) 2023-07-14 15:22:38 +02:00
Johann Beleites
0caad4242c
Modify rule S2062: improve rule within the scope of LayC (#2467) 2023-07-14 15:12:35 +02:00
Johann Beleites
8b54b301f1
Modify rule S2061: improve according to LayC (#2466) 2023-07-14 12:44:04 +00:00
Johann Beleites
d82cc9b52f
Modify rule S3042: Improve according to LayC (#2459) 2023-07-14 12:41:50 +00:00
Johann Beleites
cc505a316d
Modify rule S3039: Improve S3039 to comply to LayC (#2447) 2023-07-14 14:37:59 +02:00
Alban Auzeill
db95c90447
Modify rule S2176(Java): Update rule according to the LayC (#2445) 2023-07-14 14:17:45 +02:00
Alban Auzeill
b2b0e883ea
Modify rule S2109(Java): Update rule according to the LayC (#2436) 2023-07-14 14:15:06 +02:00
Yassin Kammoun
17d68fb5ee
Modify rule S3812: Adapt to LaYC (#2490) 2023-07-14 14:06:17 +02:00
Victor
b64f0d6017
Modify rule S3500: Adapt to LaYC (#2489) 2023-07-14 14:03:20 +02:00
Victor
3e9f9d6f8b
Modify rule S1314: Adapt to LaYC (#2492) 2023-07-14 14:02:36 +02:00
Yassin Kammoun
aa085277ff
Modify rule S6351: Adapt to LaYC (#2491) 2023-07-14 13:59:32 +02:00
Victor
50cb5350e7
Modify rule S3001: Adapt to LaYC (#2486)
Co-authored-by: Yassin Kammoun <52890329+yassin-kammoun-sonarsource@users.noreply.github.com>
2023-07-14 09:10:55 +00:00
github-actions[bot]
7c0cc6589b
Create rule S6661: Object spread syntax should be used instead of Object.assign (#2474)
https://github.com/SonarSource/SonarJS/issues/3911
2023-07-14 10:46:53 +02:00
Amélie Renard
b724d1f7c4
RULEAPI-791 LaYC: add "External coding guidelines" subtitle in the "Resources" section (#2454) 2023-07-13 18:18:01 +02:00
Victor
6c110347fc
Modify rule S3800: Adapt to LaYC (#2484) 2023-07-13 13:48:04 +00:00
Yassin Kammoun
c5599eca6e
Modify rule S2703: Adapt to LaYC (#2475)
## 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-07-13 15:46:21 +02:00
Yassin Kammoun
838bc7b026
Modify rule S2310: Adapt to LaYC (#2478) 2023-07-13 15:40:21 +02:00
Yassin Kammoun
d4a3e279eb
Modify rule S3984: Adapt to LaYC (#2479) 2023-07-13 15:39:43 +02:00
github-actions[bot]
96155fb71f
Create rule S6660: If statements should not be the only statement in else blocks (#2383)
https://github.com/SonarSource/SonarJS/issues/3916
2023-07-13 15:14:45 +02:00
github-actions[bot]
817af72c6c
Create rule S6655: Variables should not be accessed outside of their scope (CPP-4466) 2023-07-13 09:52:09 +00:00
Jamie Anderson
92251c2740
Modify rule S6641: Add missing comma to code example (#2472)
Adds a single missing comma to a code example.

## Review

- [x] logical errors and incorrect information
- [ ] N/A information gaps and missing content
- [ ] N/A text style and tone
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-07-13 09:51:34 +01:00
SonarTech
10c0c7f37e update coverage information 2023-07-13 00:35:38 +00:00
Arseniy Zaostrovnykh
b2e8d8ea56
Focus the search input on search-page load 2023-07-12 16:43:28 +02:00
Victor
fc9e18a0b2
Modify rule S2990: Adapt to LaYC (#2460) 2023-07-12 16:29:32 +02:00
Yassin Kammoun
aba3c4cd25
Modify rule S2432: Adapt to LaYC (#2464) 2023-07-12 16:05:45 +02:00
Yassin Kammoun
1ef94b7fdb
Modify rule S3579: Adapt to LaYC (#2463) 2023-07-12 15:45:58 +02:00
Victor
c53ea484f9
Modify rule S3782: Adapt to LaYC (#2457) 2023-07-12 11:31:37 +02:00
Yassin Kammoun
ad48f98eb9
Modify rule S4634: Adapt to LaYC (#2452) 2023-07-12 11:05:03 +02:00
Victor
37b24f13ff
Modify rule S3799: Adapt to LaYC (#2455) 2023-07-12 09:29:20 +02:00
SonarTech
48e6200806 update coverage information 2023-07-12 00:38:30 +00:00
Victor
bd7e15c89a
Modify rule S3863: Adapt to LaYC (#2451) 2023-07-11 15:08:46 +00:00
github-actions[bot]
a03e670f8b
Create rule S6653: Use Object.hasOwn static method instead of hasOwnProperty (#2280)
https://github.com/SonarSource/SonarJS/issues/3910
2023-07-11 16:52:29 +02:00
Yassin Kammoun
cf2fb491d5
Modify rule S4140: Adapt to LaYC (#2440) 2023-07-11 14:44:45 +02:00
Cristian Ambrosini
cf4de76484
Deprecate S2373 in favor of S119 (#2403) 2023-07-11 14:36:28 +02:00
github-actions[bot]
0fc2dca0b4
Create rule S119: add VBNET (#2410) 2023-07-11 14:36:14 +02:00
Victor
b258d9fce0
Modify rule S4030: Adapt to LaYC (#2446) 2023-07-11 12:33:15 +00:00
Yassin Kammoun
9401d4da82
Modify rule S3834: Adapt to LaYC (#2437) 2023-07-11 14:03:46 +02:00
Amélie Renard
1acd365d3c
Modify rule S961: LaYC format 2023-07-11 13:33:40 +02:00
Marco Borgeaud
39009f48d8
Modify rule S6487: LaYC format 2023-07-11 13:32:20 +02:00
Čaba Šagi
36d95e483f
Modify rule S6563: Add missing char in title (#2448) 2023-07-11 12:52:43 +02:00
Amélie Renard
4d6fd3752a
Modify rule S935: LaYC format 2023-07-11 11:39:58 +02:00
Victor
016304ea22
Modify rule S2392: Adapt to LaYC (#2435) 2023-07-11 08:46:05 +00:00
Victor
e12716215f
Modify rule S4619: Adapt to LaYC (#2434) 2023-07-11 10:42:13 +02:00
Marco Borgeaud
3caf52608d
Cross reference guides and cosmetics improvements (#2432)
Indent sections in the rule description guide to improve readability.
Cross-reference the link standard in the rule description guide.

## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-07-11 08:18:38 +01:00
Sebastien Marichal
5d433c2017
Modify rule S1751: Fix diff typo (#2428) 2023-07-11 09:10:50 +02:00
Yassin Kammoun
eb3000a4b8
Modify rule S2870: Adapt to LaYC (#2433) 2023-07-11 08:27:38 +02:00
Yassin Kammoun
025e87409b
Modify rule S4123: Adapt to LaYC (#2431) 2023-07-11 08:27:11 +02:00
Yassin Kammoun
1f611b1c8e
Modify rule S1536: Adapt to LaYC (#2429) 2023-07-11 08:26:40 +02:00
Victor
39d5883313
Modify rule S6441: Adapt to LaYC (#2426) 2023-07-10 17:50:08 +02:00
SonarTech
7f38d6e694 update coverage information 2023-07-08 00:35:32 +00:00
Victor
e1164823cf
Modify rule S6440: Adapt to LaYC (#2427) 2023-07-07 13:47:35 +00:00
Yassin Kammoun
958d36ced9
Modify rule S3504: Adapt to LaYC (#2421) 2023-07-07 13:58:27 +02:00
Alexander Kamushkin
d5b938d8c2
Modify rule S3834: add BigInt, rewrite the description (#2422)
https://github.com/SonarSource/SonarJS/issues/3917
2023-07-07 13:47:33 +02:00
Irina Batinic
8efff1d20b
Modify rule S3008: Update rule according to the LayC (#2425) 2023-07-07 10:59:04 +02:00
Irina Batinic
d1b9190d34
Modify rule S2925: Update rule according to the LayC (#2424) 2023-07-07 10:16:42 +02:00
Victor
8fa2d1d985
Modify rule S4275: Fix compliant tag (#2423) 2023-07-07 07:47:59 +00:00
SonarTech
8bbc40414e update coverage information 2023-07-07 00:35:49 +00:00
Victor
7f54fdd48a
Modify rule S6324: Adapt to LaYC (#2420) 2023-07-06 17:09:57 +02:00
gaetan-ferry-sonarsource
16f1da2057
Modify rule S5445: LaYC format (APPSEC-802) (#2337) 2023-07-06 17:05:53 +02:00
Angelo
3141efff10
Modify rule S2924: Update rule according to the LayC (#2412) 2023-07-06 14:22:50 +00:00
Victor
b8e6fe467c
Modify rule S6443: Adapt to LaYC (#2418) 2023-07-06 15:34:47 +02:00
Yassin Kammoun
01b89bb6d4
Modify rule S3785: Adapt to LaYC (#2419) 2023-07-06 15:01:22 +02:00
Sebastien Marichal
d7ed0b98be
Modify rule S1751: LaYC format (#2405) 2023-07-06 14:31:26 +02:00
Yassin Kammoun
e4ae0e202f
Modify rule S4624: Adapt to LaYC (#2399) 2023-07-06 12:27:08 +02:00
Sebastien Marichal
b65de45ec4
Modify rule S2995: Remove S3898 link (#2417) 2023-07-06 11:17:29 +02:00
Sebastien Marichal
29ad149df9
Modify rule S2259: Remove anchor link (#2415) 2023-07-06 11:15:14 +02:00
Gregory Paidis
596a5085ce
Fix S3887+S3603+S3927 minor issues after validation (#2416) 2023-07-06 11:15:01 +02:00
github-actions[bot]
a064be87be
Create rule S6562: Always set the DateTimeKind when creating a new DateTime object (#1712) 2023-07-06 11:12:06 +02:00
Sebastien Marichal
cbf5d9d38e
Modify rule S3453: Remove link to S1118 (#2414) 2023-07-06 10:57:27 +02:00
hendrik-buchwald-sonarsource
a2e277ab30
Modify rule S2053: LaYC format (#2335) 2023-07-06 10:32:19 +02:00
Sebastien Marichal
93fb5b95be
Modify rule S1048: Update VB.NET example (#2413) 2023-07-06 10:28:14 +02:00
Zsolt Kolbay
198c5e4440
Modify Rule S6580: Move text from Description to Why (#2411) 2023-07-06 10:14:57 +02:00
Yassin Kammoun
abd8d6fa55
Modify rule S3531: Adapt to LaYC (#2402) 2023-07-06 09:42:03 +02:00
Yassin Kammoun
7ff4f550bf
Modify rule S3696: Adapt to LaYC (#2400) 2023-07-06 09:34:55 +02:00
SonarTech
34a1521117 update coverage information 2023-07-06 00:37:03 +00:00
github-actions[bot]
818bc02707
Create rule S6563: Use UTC when recoding DateTime instants. (#1713) 2023-07-05 16:55:28 +02:00
Zsolt Kolbay
bcf4d20626
Modify Rule S3363: Add VB.NET description (#2285) 2023-07-05 16:54:50 +02:00
github-actions[bot]
a3e31a4f45
Create rule S6580: Use a format provider when parsing date and time (#1737) 2023-07-05 16:54:03 +02:00
Gregory Paidis
0c9b93b241
Modify rule S2123: LaYC format (#2404) 2023-07-05 16:46:07 +02:00
Arseniy Zaostrovnykh
543d93befd
Fix the rule-id link format (#2408)
Rule IDs are [automatically
transformed](https://github.com/SonarSource/sonar-rule-api/blob/master/src/main/java/com/sonarsource/ruleapi/asciidoctor/AsciiDoctorConverter.java#L111)
into link placeholders by rule-api. These placeholders are translated
into autolinks by the products.
If these IDs appear within other links, it might [break some
products](https://discuss.sonarsource.com/t/cross-rule-references-inside-a-tags-in-html-rule-descriptions/14971/4).

Moreover, the generated autolinks are product-specific, and cannot be
encoded statically in the rule description.
2023-07-05 14:30:33 +00:00
Irina Batinic
41dd7a1cc3
Modify rule S2886: Update rule according to the LayC (#2407) 2023-07-05 16:22:57 +02:00
Irina Batinic
5dce2b23eb
Modify rule S2885: Update rule according to the LayC (#2406) 2023-07-05 15:32:49 +02:00
Cristian Ambrosini
22f5532575
Modify rule S6610: Update quickfix field to covered (#2401)
See code-fix implementation here:
https://github.com/SonarSource/sonar-dotnet/pull/7507
2023-07-05 14:17:45 +02:00
Sebastien Marichal
b96ac64b45
Modify rule S1048: LaYC format (#2396) 2023-07-05 13:49:21 +02:00
Čaba Šagi
37eaaddc50
Modify rule S6588: Update quickfix field to covered (#2398) 2023-07-05 13:36:41 +02:00
Sebastien Marichal
8124a55e6d
Modify rule S1848: LaYC format (#2392) 2023-07-05 11:31:02 +00:00
Yassin Kammoun
18a937e55d
Modify rule S3616: Adapt to LaYC (#2394) 2023-07-05 12:26:51 +02:00
Irina Batinic
adfa021b2d
Modify rule S2864: Update rule according to the LayC (#2397) 2023-07-05 12:07:54 +02:00
Angelo
4a6ac45dd7
Modify rule S2789: Update rule according to the LayC (#2395) 2023-07-05 11:27:09 +02:00
Yassin Kammoun
721147819e
Modify rule S6092: Adapt to LaYC (#2393) 2023-07-05 11:19:44 +02:00
Yassin Kammoun
cb07b5ed74
Modify rule S6435: Adapt to LaYC (#2378)
## 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-07-05 11:10:29 +02:00
github-actions[bot]
13e7a91320
Create rule S6566: Use DateTimeOffset instead of DateTime (#1717) 2023-07-05 10:57:33 +02:00
Guillaume Dequenne
0ee2608971
Modify S6468: Fix wording (#2387) 2023-07-05 10:44:22 +02:00
Guillaume Dequenne
4861f95fc7
Modify S1716: Add missing description (#2386) 2023-07-05 10:43:59 +02:00
Angelo
e06c78027c
Modify rule S2786: Update rule according to the LayC (#2390) 2023-07-05 10:24:44 +02:00
SonarTech
0f67eb928a update coverage information 2023-07-05 00:37:03 +00:00
gaetan-ferry-sonarsource
66000e5511
Modify rule S4507: Adding support for web.config error handling parameters (XML)(APPSEC-700) (#1938) 2023-07-04 18:38:07 +02:00
github-actions[bot]
ea1d71f510
Create rule S6656: add language AzureResourceManager (JSON) (#2322)
Specification ticket:
[APPSEC-805](https://sonarsource.atlassian.net/browse/APPSEC-805)
Implementation ticket:
[SONARIAC-930](https://sonarsource.atlassian.net/browse/SONARIAC-930)
[RSPEC
Preview](https://sonarsource.github.io/rspec/#/rspec/S6656/azureresourcemanager)

Bicep PR for S6656: #2356

## 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)



[APPSEC-805]:
https://sonarsource.atlassian.net/browse/APPSEC-805?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[SONARIAC-930]:
https://sonarsource.atlassian.net/browse/SONARIAC-930?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

---------

Co-authored-by: egon-okerman-sonarsource <egon-okerman-sonarsource@users.noreply.github.com>
Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
2023-07-04 18:10:44 +02:00
Sebastien Marichal
fe7676e39a
Modify rule S3984: LaYC format (#2391) 2023-07-04 15:54:34 +00:00
github-actions[bot]
c483d002a7
Create rule S6561: Do not use DateTime.Now for benchmarking or timing operations (#1711) 2023-07-04 17:35:59 +02:00
github-actions[bot]
72c257b2c9
Create rule S6588: Use UnixEpoch instead of creating DateTime instances that point to the unix epoch time (#1747) 2023-07-04 17:35:16 +02:00
Mary Georgiou
06dcb80993
Modify rule S4260: LaYC format (#2384) 2023-07-04 17:17:33 +02:00
Sebastien Marichal
8684601101
Modify rule S3168: LaYC format (#2382) 2023-07-04 14:21:06 +00:00
Gregory Paidis
e1056bde9c
Modify rule S2183: LaYC format (#2372) 2023-07-04 15:35:17 +02:00
Mary Georgiou
d6f9a29f0e
Modify rule S3927: LaYC format (#2381) 2023-07-04 15:32:38 +02:00
Guillaume Dequenne
1887eb52aa
Modify S5722: Add missing capitalization (#2385) 2023-07-04 15:31:14 +02:00
Gregory Paidis
24a16c6419
S3610: Set quickfix field to targeted (#2380) 2023-07-04 14:35:39 +02:00
Guillaume Dequenne
96fb3a3b43
Modify S6556: Add diff highlighting (#2373) 2023-07-04 14:24:55 +02:00
David Kunzmann
a5073c0232
Modify rule S5712: LaYC format (#2325) 2023-07-04 13:41:26 +02:00
Mary Georgiou
be9c0bc4e8
Modify rule S4428: LaYC format (#2346) 2023-07-04 13:39:40 +02:00
Mary Georgiou
0444d4df30
Modify rule S1656: Update VB.NET code examples (#2375) 2023-07-04 13:37:09 +02:00
Sebastien Marichal
a6072cf5c1
Modify rule S3453: Update rule link format (#2377)
## 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-07-04 13:35:35 +02:00
Gregory Paidis
203d5383c9
Modify rule S3610: LaYC format (#2371) 2023-07-04 13:24:03 +02:00
Victor
7304adc339
Modify rule S6438: Adapt to LaYC (#2369)
Co-authored-by: Yassin Kammoun <52890329+yassin-kammoun-sonarsource@users.noreply.github.com>
2023-07-04 10:16:24 +00:00
Angelo
42ce93f91d
Modify rule S2718: Update rule according to the LayC (#2376) 2023-07-04 12:05:03 +02:00
Victor
fddd055fb7
Modify rule S6439: Adapt to LaYC (#2368)
Co-authored-by: Yassin Kammoun <52890329+yassin-kammoun-sonarsource@users.noreply.github.com>
2023-07-04 11:54:01 +02:00
github-actions[bot]
4d5467c15d
Create rule S6575: Use TimeZoneInfo.FindSystemTimeZoneById instead of TimezoneConverter (#1729) 2023-07-04 11:29:36 +02:00
Angelo
b76978caf3
Modify rule S2695: Update rule according to the LayC (#2374) 2023-07-04 11:21:44 +02:00
David Kunzmann
1724098d0e
Modify rule S5714: LaYC format (#2262) 2023-07-04 11:11:55 +02:00
David Kunzmann
09d961bfe1
Modify rule S1045: LaYC format (#2308) 2023-07-04 10:50:29 +02:00
David Kunzmann
59921e04bd
Modify rule S2319: LaYC format (#2317) 2023-07-04 10:41:26 +02:00
SonarTech
38bda2460d update coverage information 2023-07-04 00:35:59 +00:00
Gregory Paidis
66268dcf37
Modify rule S2934: LaYC format (#2365) 2023-07-03 18:22:04 +02:00
github-actions[bot]
4ec7f8ed07
Create rule S6380: add language AzureResourceManager (JSON) (#2274)
Specification ticket:
[APPSEC-775](https://sonarsource.atlassian.net/browse/APPSEC-775)
Implementation ticket:
[SONARIAC-899](https://sonarsource.atlassian.net/browse/SONARIAC-899)
[RSPEC
Preview](https://sonarsource.github.io/rspec/#/rspec/S6378/azureresourcemanager)

Bicep PR for S6380: #2298 
## 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)



[APPSEC-775]:
https://sonarsource.atlassian.net/browse/APPSEC-775?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[SONARIAC-899]:
https://sonarsource.atlassian.net/browse/SONARIAC-899?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

---------

Co-authored-by: egon-okerman-sonarsource <egon-okerman-sonarsource@users.noreply.github.com>
Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
Co-authored-by: Jamie Anderson <127742609+jamie-anderson-sonarsource@users.noreply.github.com>
2023-07-03 18:04:53 +02:00
github-actions[bot]
b11bd37556
Create rule S6648: Secure strings and objects should not have default values (APPSEC-803) (#2250)
[Specification
ticket](https://sonarsource.atlassian.net/browse/APPSEC-803)
[Implementation
ticket](https://sonarsource.atlassian.net/browse/SONARIAC-896)
[RSPEC
Preview](https://sonarsource.github.io/rspec/#/rspec/S6648/azureresourcemanager)

Bicep PR: https://github.com/SonarSource/rspec/pull/2277

## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)

---------

Co-authored-by: pierre-loup-tristant-sonarsource <pierre-loup-tristant-sonarsource@users.noreply.github.com>
Co-authored-by: Pierre-Loup Tristant <pierre-loup.tristant@sonarsource.com>
Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
2023-07-03 17:54:12 +02:00
Irina Batinic
9e5706900b
Modify rule S2689: Update rule according to the LayC (#2370) 2023-07-03 17:33:12 +02:00
Sebastien Marichal
fa669b3c8e
Modify rule S2259: LaYC format (#2294) 2023-07-03 17:26:15 +02:00
Mary Georgiou
a2946381b5
Modify rule S3887: LaYC format (#2364) 2023-07-03 17:23:17 +02:00
John-Clifton-SonarSource
0aa6cea0ff
Update link_formatting.adoc (#2362)
Added in CWE as pre-defined link.

## 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-07-03 16:05:22 +01:00
David Kunzmann
0032ef22ce
Modify rule S2711: LaYC format (#2321) 2023-07-03 16:41:15 +02:00
David Kunzmann
f031a49f5a
Modify rule S5607: LaYC format (#2273) 2023-07-03 16:40:19 +02:00
Angelo
354a71a942
Modify rule S2677: Update rule according to the LayC (#2367) 2023-07-03 16:32:07 +02:00
github-actions[bot]
24b01fdb16
Create rule S6657: Octal escape sequences should not be used (#2329)
https://github.com/SonarSource/SonarJS/issues/3918
2023-07-03 16:30:40 +02:00
Angelo
3486586fbf
Modify rule S2676: Update rule according to the LayC (#2363) 2023-07-03 16:12:20 +02:00
Victor
6b887150a6
Modify rule S4138: Adapt to LaYC (#2359) 2023-07-03 15:55:39 +02:00
Mary Georgiou
f254d648b9
Modify rule S3603: LaYC format (#2354) 2023-07-03 15:45:51 +02:00
Gregory Paidis
2d0ec89bf3
Modify rule S3244: LaYC format (#2344) 2023-07-03 15:45:11 +02:00
Mary Georgiou
071f93aafe
Modify rule S2997: LaYC format (#2353) 2023-07-03 15:18:16 +02:00
Amélie Renard
ee50358ea1
Update LaYC "More info" section with "Related rules" subtitle 2023-07-03 15:10:21 +02:00
Sebastien Marichal
17a6d54a1d
Modify rule S2995: LaYC format (#2347) 2023-07-03 15:09:28 +02:00
Sebastien Marichal
69a8fa4995
Modify rule S3925: LaYC format (#2361)
## 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-07-03 15:05:55 +02:00
Sebastien Marichal
0ae0cb53dd
Modify rule S2252: LaYC format (#2340) 2023-07-03 14:45:25 +02:00
Tim Pohlmann
816550ad28
Modify rule S3466: LayC format (#2343)
## 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-07-03 14:07:16 +02:00
Yassin Kammoun
b4e2cf709f
Modify rule S6079: Adapt to LaYC (#2352) 2023-07-03 14:04:09 +02:00
Yassin Kammoun
36bd5ccd11
Modify rule S6080: Adapt to LaYC (#2355) 2023-07-03 14:03:32 +02:00
Angelo
bdaeaf4a7c
Angelo/layc s2675 (#2358) 2023-07-03 13:46:55 +02:00
github-actions[bot]
2559bc0c13
Create rule S6652: Sensitive secrets should not be disclosed (APPSEC-794) (#2276) 2023-07-03 13:46:41 +02:00
Angelo
58d5fc78d3
Modify rule S2655: Update rule according to the LayC (#2357) 2023-07-03 12:13:12 +02:00
John-Clifton-SonarSource
13b37adc81
Update link_formatting.adoc (#2341)
Fixed rule link example so that rule number was also part of the
underlined link.

## 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-07-03 10:38:22 +01:00
Guillaume Dequenne
175d3dc1c2
Modify S2823: LaYC format (#2278) 2023-07-03 11:35:19 +02:00
Guillaume Dequenne
9fbaa6cdf7
Modify S5747: LaYC format (#2338) 2023-07-03 09:48:41 +02:00
Guillaume Dequenne
3bb822a245
Modify S5807: LaYC format (#2320) 2023-07-03 09:02:23 +02:00
David Kunzmann
f61c8ffd83
Modify rule S5708: LaYC format (#2287) 2023-07-03 09:01:04 +02:00
David Kunzmann
381b5d6c0a
Modify rule S5713: LaYC format (#2327) 2023-07-03 08:57:33 +02:00
Mary Georgiou
efd46a983b
Modify rule S3005: LaYC format (#2330) 2023-06-30 15:49:54 +02:00
Victor
21516599cb
Modify rule S6478: Adapt to LaYC (#2306) 2023-06-30 13:44:20 +00:00
Sebastien Marichal
e92bc0b003
Modify rule S3453: LaYC format (#2334)
## 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-06-30 15:34:50 +02:00
Tim Pohlmann
50541eb6bf
Modify rule S3598: LayC format (#2319) 2023-06-30 14:10:09 +02:00
Gregory Paidis
467c7813af
S2688: Fix a broken link (#2336) 2023-06-30 14:05:01 +02:00
Marcin Stachniuk
27eebb75c4
SONARIAC-915 Fix formatting and fields names (#2339) 2023-06-30 14:02:37 +02:00
Mary Georgiou
4334594739
Modify rule S3249: LaYC format (#2323) 2023-06-30 13:59:51 +02:00
Yassin Kammoun
a9903e8226
Modify rule S4125: Adapt to LaYC (#2332) 2023-06-30 13:51:41 +02:00
Mary Georgiou
5e890c4329
Modify rule S2201: Update links, improve wording. (#2342) 2023-06-30 13:40:09 +02:00
Yassin Kammoun
6005273767
Modify rule S6442: Adapt to LaYC (#2331) 2023-06-30 13:29:28 +02:00
Arseniy Zaostrovnykh
564db1116d
Modify rule S5553: CPP-4409 new cases + LayC 2023-06-30 11:16:23 +00:00
github-actions[bot]
3e97fbfa38
Create rule S6654: __proto__ property should not be used (#2312)
https://github.com/SonarSource/SonarJS/issues/3919
2023-06-30 10:59:13 +02:00
Guillaume Dequenne
834a679689
Modify S5796: LaYC format (#2292) 2023-06-30 10:36:32 +02:00
David Kunzmann
22464a7224
Modify rule S5722: LaYC format (#2263) 2023-06-30 10:35:27 +02:00
David Kunzmann
0f8e8b26f7
Modify rule S5724: LaYC format (#2264) 2023-06-30 10:35:05 +02:00
David Kunzmann
fe0265f995
Modify Rule S5719: LaYC format (#2257) 2023-06-30 09:37:42 +02:00
Guillaume Dequenne
b545853971
Modify S2734: LaYC format (#2297) 2023-06-30 09:16:17 +02:00
David Kunzmann
8de10e92d6
Modify rule S5828: LaYC format (#2289) 2023-06-30 09:16:01 +02:00
David Kunzmann
bab3870bf7
Modify rule S5707: LaYC format (#2286) 2023-06-30 09:15:12 +02:00
Guillaume Dequenne
1d590035d6
Modify S5905: LaYC format (#2284) 2023-06-30 09:14:26 +02:00
Guillaume Dequenne
49e7414ee8
Modify S5644: LaYC format (#2283) 2023-06-30 09:13:57 +02:00
Guillaume Dequenne
02ba7aa957
Modify S5632: LaYC format (#2281) 2023-06-30 09:13:39 +02:00
Guillaume Dequenne
37e55fea73
Modify S5756: LaYC format (#2279) 2023-06-30 09:13:07 +02:00
David Kunzmann
fb9f47bba2
Modify rule S6468: LaYC format (#2246) 2023-06-30 09:11:18 +02:00
David Kunzmann
bf7d8086b8
Modify rule S5603: LaYC format (#2333) 2023-06-30 09:10:13 +02:00
David Kunzmann
03aebba5da
Modify rule S5549: LaYC format (#2313) 2023-06-30 09:07:33 +02:00
SonarTech
5411092203 update coverage information 2023-06-30 00:35:44 +00:00
gaetan-ferry-sonarsource
117d6b9c7e
[APPSEC-801] Migrate S4433 to LaYC format. (#2307) 2023-06-29 16:45:36 +02:00
Peter Trifanov
fe5c2e4c2f
Modify rule S6385: Change resource type, fix formatting (#2326)
* Change the resource type name from the one copied from Terraform to the one applicable in ARM
* Fix formatting in the bullet point list
2023-06-29 16:15:34 +02:00
github-actions[bot]
9619fe4284
Create rule S6378: Add language AzureResourceManager (JSON) (#2237)
[Specification
ticket](https://sonarsource.atlassian.net/browse/APPSEC-777)
[Implementation
ticket](https://sonarsource.atlassian.net/browse/SONARIAC-889)
[RSPEC
Preview](https://sonarsource.github.io/rspec/#/rspec/S6378/azureresourcemanager)

Bicep PR for S6378: #2255 

## 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: egon-okerman-sonarsource <egon-okerman-sonarsource@users.noreply.github.com>
Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
2023-06-29 15:58:37 +02:00
John-Clifton-SonarSource
4861cfa476
Modify rule S5146: Fix invalid Python sample (#2239)
I couldn't get Sonarcloud to trigger this issue using the provided
noncompliant code example.

I think the code examples as written end up being circular because the
local function 'redirect()' will call itself rather than the imported
'redirect()' function of the same name. The fix is to change the local
function name to be redirecting(). I changed the API endpoint name as
well so that it matched. Once I had made this change, the noncompliant
code example did lead to Sonarcloud spotting the issue.

## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-06-29 14:57:46 +01:00
John-Clifton-SonarSource
55e9cb9961
Create link formatting.adoc (#2324)
Added in formatting guidance for links that appear in rules.

## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)

---------

Co-authored-by: Martin Strecker <103252490+martin-strecker-sonarsource@users.noreply.github.com>
2023-06-29 14:04:43 +01:00
Gregory Paidis
dd9def2840
Modify rule S2114: LaYC format (#2316) 2023-06-29 14:07:20 +02:00
Mary Georgiou
e16d3e9ff0
Modify rule S1656: LaYC format (#2303) 2023-06-29 13:18:24 +02:00
Mary Georgiou
c72ae30438
Modify rule S2345: LaYC format (#2318) 2023-06-29 13:08:46 +02:00
David Kunzmann
02a2cb80b0
Modify rule S3862: LaYC format (#2304) 2023-06-29 12:19:58 +02:00
David Kunzmann
6462c8ac85
Modify rule S1716: LaYC format (#2305) 2023-06-29 10:16:45 +02:00
SonarTech
9d0c5585ee update coverage information 2023-06-29 00:36:08 +00:00
Loris S
981e54d330
Modify S3329: Learn-As-You-Code migration (#2293)
## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)

---------

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>
2023-06-28 17:25:56 +02:00
Loris S
c622e8e4d3
Modify S5527: Learn-As-You-Code migration (#2269)
## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)

---------

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>
2023-06-28 17:11:41 +02:00
hendrik-buchwald-sonarsource
40e915bf59
Modify rule S5659: LaYC format (#2272) 2023-06-28 16:26:16 +02:00
cynthiabethea
2aef3c051d
Cyn/layc-s1439-redo (#2275)
Co-authored-by: vilchik.elena <elena.vilchik@sonarsource.com>
2023-06-28 13:57:06 +00:00
cynthiabethea
940523dcbc
Modify rule S3735: LaYC format (#2268)
Co-authored-by: vilchik.elena <elena.vilchik@sonarsource.com>
2023-06-28 13:37:57 +00:00
Mary Georgiou
f9c9d0f8aa
Modify rule S3456: LaYC format (#2291) 2023-06-28 14:02:20 +02:00
Victor
c81f804dcc
Modify rule S6481: Adapt to LaYC (#2254) 2023-06-28 11:55:47 +00:00
Gregory Paidis
f3b12fea32
Modify rule S2688: LaYC format (#2299) 2023-06-28 13:54:49 +02:00
Gregory Paidis
8b7ef24bbe
Modify S1862: LaYC format (#2311) 2023-06-28 13:52:34 +02:00
Gregory Paidis
abf1b0fea9
Modify rule S3343: LaYC format (#2288) 2023-06-28 13:30:29 +02:00
Mary Georgiou
3561b4a4fa
Modify rule S1764: LaYC format (#2310) 2023-06-28 11:51:48 +02:00
Jonas Wielage
2a037201f3
Modify rule S5332: Add additional implementation message (#2309) 2023-06-28 10:23:52 +02:00
Martin Strecker
2ea2899a46
Modify S3346: LaYC format (#2295)
https://sonarsource.github.io/rspec/#/rspec/S3346/csharp

## 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-06-28 10:19:30 +02:00
Mary Georgiou
c6678cc5ed
Modify rule S2201: LaYC format (#2301)
## 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-06-28 09:35:16 +02:00
SonarTech
62d10cce77 update coverage information 2023-06-28 00:34:51 +00:00
Yassin Kammoun
87ac00e344
Modify rule S1527: Adapt to LaYC (#2302) 2023-06-27 15:23:42 +02:00
Gregory Paidis
508c213285
Modify rule S2251: LaYC format (#2300) 2023-06-27 15:03:47 +02:00
Gregory Paidis
c26c96751c
Modify rule S1206: LaYC format (#2290) 2023-06-27 14:35:41 +02:00
Marcin Stachniuk
fbe18d2faf
Modify rule S6413: ARM improve tags and message (#2296) 2023-06-27 13:58:20 +02:00
SonarTech
e7f3cad8c1 update coverage information 2023-06-27 00:36:04 +00:00
github-actions[bot]
b6bbc08595
Create rule S6650: Renaming import, export, and destructuring assignments should not be to the same name (#2266)
https://github.com/SonarSource/SonarJS/issues/3907
2023-06-26 11:30:24 +02:00
Victor
2c0830e998
Modify rule S6479: Adapt to LaYC (#2260) 2023-06-26 09:37:25 +02:00
SonarTech
0d75b6695d update coverage information 2023-06-24 00:37:19 +00:00
Loris S
3e4f410da2
Modify S4830(php): Fix code sample (#2282) 2023-06-23 15:33:41 +02:00
github-actions[bot]
ed4e841df9
Modify rule S3363: Add C# description (#1751) 2023-06-23 12:17:50 +02:00
github-actions[bot]
18e3031f9e
Create rule S6585: Don't hardcode the format provider when turning dates and times to string (#1743) 2023-06-23 12:16:36 +02:00
Victor
889b30e2e0
Modify rule S6486: Adapt to LaYC (#2259) 2023-06-23 07:38:57 +00:00
SonarTech
b91b9826f7 update coverage information 2023-06-23 00:35:28 +00:00
Fred Tingaud
9cb6b98e41
Remove unimplemented languages/rules tagged as 'SECURITY_HOTSPOT' or 'VULNERABILITY'
Languages for which some unique descriptions remain are kept.

This cleaning removes the following rules that were implemented in no
language:
[S1947, S2085, S2086, S2609, S2610, S2614, S2643, S2773, S2776, S3268,
S3272, S3361]
2023-06-22 19:13:37 +02:00
Guillaume Dequenne
7d5ded1c39
Modify rule S2761: fix typo (#2248) 2023-06-22 17:24:32 +02:00
Guillaume Dequenne
c46884e348
Modify rule S3923: update code example for Python (#2256) 2023-06-22 17:24:10 +02:00
Victor
f79cb6898b
Modify rule S6477: Adapt to LaYC (#2249) 2023-06-22 14:15:10 +02:00
Fred Tingaud
ad4a486e52
Modify Rule S2737: LaYC catch rethrow
Co-authored-by: Amélie Renard <44666826+amelie-renard-sonarsource@users.noreply.github.com>
Co-authored-by: Dorian Burihabwa <75226315+dorian-burihabwa-sonarsource@users.noreply.github.com>
2023-06-22 14:04:34 +02:00
Fred Tingaud
83c54f9795
Handle variables *inside* an include
The point of this branch is the second commit that changes
validate_asciidoc.sh. The first one is taken from another PR and should
not be reviewed.

The previous version of the validation could handle the following case:
```asciidoc
:path: path/to/file.adoc
include::{path}[]
```

This new validation also adds support for the case of a variable inside
a path:
```asciidoc
:language: csharp
include::rules/S1000/{language}/file.adoc[]
```
2023-06-22 11:45:41 +02:00
hendrik-buchwald-sonarsource
a8961d6437
Modify rule S2755: LaYC format (#2245) 2023-06-22 11:25:00 +02:00
Marco Borgeaud
26601d83fe
Remove CFamily rules that were never implemented (#2271)
We do not plan to implement these rules as-is. Some have better
alternatives. Some will be covered by MISRA C++:2023 rules.

Co-authored-by: Fred Tingaud <frederic.tingaud@sonarsource.com>
2023-06-22 11:15:23 +02:00
Fred Tingaud
51369b610e
Make sure that includes are always surrounded by empty lines (#2270)
When an include is not surrounded by empty lines, its content is inlined
on the same line as the adjacent content. That can lead to broken tags
and other display issues.
This PR fixes all such includes and introduces a validation step that
forbids introducing the same problem again.
2023-06-22 10:38:01 +02:00
Jonas Wielage
7a3a445b51
Modify rule S1475: Fixed typo in implementation message (#2258) 2023-06-22 09:39:40 +02:00
SonarTech
83f64f8e5b update coverage information 2023-06-22 00:34:47 +00:00
Fred Tingaud
53536099a2
Fix various asciidoc mistakes 2023-06-21 16:55:34 +02:00
github-actions[bot]
ac8cd23e5b
Create rule S6647: Unnecessary constructors should be removed (#2243)
https://github.com/SonarSource/SonarJS/issues/3906
2023-06-21 16:42:01 +02:00
Tim Pohlmann
7a2b6606ba
S6640: Set quickfix to infeasible (#2261)
Modify rule S6640: Set quickfix field to infeasible
2023-06-21 15:01:27 +02:00
Tim Pohlmann
f91effd9ca
S6640 - Make code samples follow code conventions (#2253)
Modify rule S6640: Make code samples follow code conventions
2023-06-21 11:09:51 +02:00
SonarTech
86caa078a5 update coverage information 2023-06-21 00:35:56 +00:00
Loris S
1a84c758e1
Modify S4423: Learn-As-You-Code Migration (#2097)
Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>
2023-06-20 15:36:01 +00:00
Victor
e6923ac8bd
Modify rule S5860: Adapt to LaYC (#2236) 2023-06-20 15:13:26 +00:00
Pavel Mikula
aba29c829d
S2925: Fix typos (#2251) 2023-06-20 16:16:29 +02:00
Antonio Aversa
1911181608
Modify rule S3776: fix why and resources (#2247) 2023-06-20 15:00:45 +02:00
hendrik-buchwald-sonarsource
d825cbc5b9
Modify rule S4830: LaYC format (#2176) 2023-06-20 13:26:14 +02:00
Loris S
e09d505103
Modify S4426: Learn-As-You-Code Migration (#2166)
## 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
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)

---------

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>
2023-06-20 12:08:25 +02:00
cynthiabethea
236e35ae99
Modify rule S3735: Adapt to LaYC 2023-06-20 11:20:09 +02:00
cynthiabethea
2429edf9ce
Modify rule S6325: Adapt to LaYC 2023-06-20 10:43:42 +02:00
cynthiabethea
3b655b6b90
layc-S1439-JS (#2238)
## 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: Victor <106590915+victor-diez-sonarsource@users.noreply.github.com>
2023-06-20 09:35:51 +01:00
Loris S
9e9c990658
Modify S5542: Learn-As-You-Code migration (#2011)
Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>
2023-06-20 10:27:53 +02:00
SonarTech
020754b63e update coverage information 2023-06-20 00:33:46 +00:00
Dorian Burihabwa
20fe42abfa Modify rule S2168: Add design and singleton tags to metadata
Add the missing `design` and `singleton` tags to make the rule easier to lookup.
2023-06-19 18:18:45 +02:00
Marco Borgeaud
aefdb89382
Remove CFamily rules that are irrelevant
These rules do not make sense in C++ or are already covered by other
rules.

  S140 -- XPath, not relevant
  S1166 -- Java, we also have S2486
  S1168 -- Java
  S1444 -- Java
  S1698 -- Java
  S1944 -- Other rules: S855, S856, S859
  S2189 -- Covered by S5271
S2201 -- Relevant, although could be rephrase: Pure function should be
marked nodiscard, which is S6007
  S2251 -- The issue can detected by other means (like OOB)
  S2384 -- Java
  S3366 -- Java
  S3931 -- S1121 is more general
2023-06-19 18:18:21 +02:00
Dorian Burihabwa
74365c81fe Deprecate rule S2165 2023-06-19 18:16:55 +02:00
github-actions[bot]
a3be39441e
Create rule S6645: Variables should not be initialized to undefined (#2218)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6645/javascript)
(updated a few minutes after each push).

https://github.com/SonarSource/SonarJS/issues/3922

## 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: alexander-kamushkin-sonarsource <alexander-kamushkin-sonarsource@users.noreply.github.com>
Co-authored-by: Alexander Kamushkin <alexander.kamushkin@sonarsource.com>
2023-06-19 17:00:04 +02:00
github-actions[bot]
c92c4660be
Create rule S6644: Ternary operator should not be used instead of simpler alternatives (#2187)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6644/javascript)
(updated a few minutes after each push).

https://github.com/SonarSource/SonarJS/issues/3923

## 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: alexander-kamushkin-sonarsource <alexander-kamushkin-sonarsource@users.noreply.github.com>
Co-authored-by: Alexander Kamushkin <alexander.kamushkin@sonarsource.com>
2023-06-19 15:15:30 +02:00
Antonio Aversa
931f28b2e1
Modify rule S2198: change silly by unnecessary (#2234) 2023-06-19 14:26:20 +02:00
Alban Auzeill
6e6aa5a4e8
Modify rule S1849(Java): Revert title change (#2233) 2023-06-19 11:58:25 +02:00
Alban Auzeill
36dfadb131
Modify rule S2975(Java): Fix links to other rules (#2228) 2023-06-19 11:58:12 +02:00
Alban Auzeill
1dcb5c39c4
Modify rule S2390(Java): Fix typo (#2232) 2023-06-19 11:45:41 +02:00
Cristian Ambrosini
d29b35f7ef
Modify rule S122: Add resources section (#2231) 2023-06-19 10:02:55 +02:00
Victor
abf5f18af8
Modify rule S1534: Adapt to LaYC (#2179) 2023-06-19 09:58:49 +02:00
Antonio Aversa
7f1f037201
Modify rule S4487: fix code example (#2230) 2023-06-19 09:42:33 +02:00
SonarTech
78e2b45775 update coverage information 2023-06-17 00:33:47 +00:00
Alban Auzeill
8ab07f1740
Modify rule S2446(Java): Fix typo (#2227) 2023-06-16 17:41:58 +02:00
Sebastien Marichal
1eaefdee30
Modify rule S4635: Update title (#2197) 2023-06-16 17:23:00 +02:00
Fred Tingaud
025936fdfb
Modify Rule S2681: LaYC comment blocks
Co-authored-by: Amélie Renard <44666826+amelie-renard-sonarsource@users.noreply.github.com>
2023-06-16 16:55:05 +02:00
Martin Strecker
9611bbdf98
Modify rule S4586: Add how to fix it section (#2220) 2023-06-16 16:15:39 +02:00
Fred Tingaud
84f1ddd588
Modify rule S2761: LaYC multiple unary operators
Co-authored-by: Amélie Renard <44666826+amelie-renard-sonarsource@users.noreply.github.com>
2023-06-16 16:00:06 +02:00
Sebastien Marichal
c5e313703c
Modify rule S3966: Separate examples (#2226) 2023-06-16 15:59:27 +02:00
Antonio Aversa
98d9084439
Modify rule S3451: fix wrong link (#2225) 2023-06-16 15:47:49 +02:00
Victor
fdb4696469
Modify rule S6509: Adapt to LaYC (#2174) 2023-06-16 13:44:46 +00:00
Antonio Aversa
c6e12bbf8d
Modify rule S3776: LaYC format (#2215) 2023-06-16 15:42:52 +02:00
Antonio Aversa
f7f5c521b6
Modify rule S4487: fix missing space in code example (#2224) 2023-06-16 15:42:30 +02:00
Amélie Renard
bc97d7b4ca
Modify rule S122: LaYC format 2023-06-16 13:38:45 +00:00
Antonio Aversa
057071b616
Modify rule S2198: LaYC format (#2156) 2023-06-16 15:37:20 +02:00
Čaba Šagi
53c580c9e7
Modify rule S2445: Fix java diff tag (#2221) 2023-06-16 15:21:46 +02:00
Čaba Šagi
4a0501a187
Modify rule S4277: Fix vbnet diff tag (#2222) 2023-06-16 15:13:15 +02:00
Čaba Šagi
3f380c4974
Modify rule S4158: Fix vb.net compliant solution formatting (#2219) 2023-06-16 14:56:08 +02:00
Martin Strecker
05590ca33f
Modify rule S2583: Fix quickfix field (#2216) 2023-06-16 12:57:15 +02:00
Martin Strecker
e409c102f2
Modify rule S2583: LaYC format (#2196)
[S2583](https://sonarsource.github.io/rspec/#/rspec/S2583/csharp)

## 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-06-16 12:27:54 +02:00
Gregory Paidis
2aa6cde667
Modify rule S2190: LaYC format (#1962)
Also remove unused languages.

---------

Co-authored-by: vilchik.elena <elena.vilchik@sonarsource.com>
2023-06-16 12:23:50 +02:00
Čaba Šagi
3598b25d49
Modify rule S1110: Update dotnet part of the rule to LayC (#2214) 2023-06-16 11:18:11 +02:00
Antonio Aversa
d70b5b5faf
Modify rule S3464: fix VB.NET code example (#2212) 2023-06-16 11:03:44 +02:00
Amélie Renard
fcd323ebd3
Modify rule S108: fix Kotlin LaYC format 2023-06-16 10:35:12 +02:00
Mary Georgiou
48e3edab0a
Modify S3966: Fix broken argument (#2210) 2023-06-16 09:52:11 +02:00
Fred Tingaud
0bbdb53a0c
Modify Rule S2692: LaYC indexOf
Co-authored-by: Amélie Renard <44666826+amelie-renard-sonarsource@users.noreply.github.com>
2023-06-16 09:50:40 +02:00
Sebastien Marichal
9657591468
Modify rule S2589: LaYC format (#2195) 2023-06-16 09:28:19 +02:00
Fred Tingaud
49e4aff3ec
Modify Rule S2757: LaYC =+
Co-authored-by: Amélie Renard <44666826+amelie-renard-sonarsource@users.noreply.github.com>
2023-06-15 19:30:44 +02:00
Amélie Renard
4a48939718
Modify rule S108: LaYC format 2023-06-15 19:03:19 +02:00
Čaba Šagi
8bd7d95bdb
Modify S4158: LayC format (#2208)
## 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-06-15 17:37:19 +02:00
Mary Georgiou
6726dcc4b6
Modify rule S3966: Migrate to LaYC (#2135) 2023-06-15 17:26:30 +02:00
Cristian Ambrosini
fd97e50b11
Modify rule S1117: Update to LaYC (#2207) 2023-06-15 17:09:18 +02:00
cynthiabethea
09e3db2ac9
modify_S2639_layc_js_only (#2122)
Made some updates to rule text for Java, Javascript, and the general
description for the other languages.

## Review

A dedicated reviewer checked the rule description successfully for:

- [ ] logical errors and incorrect information
- [ ] information gaps and missing content
- [ ] text style and tone

---------

Co-authored-by: Elena Vilchik <elena.vilchik@sonarsource.com>
2023-06-15 15:56:08 +01:00
Gregory Paidis
cfb6eb88f4
Modify S1479: LAYC format (#2205) 2023-06-15 16:30:42 +02:00
Čaba Šagi
540bcd001c
Modify rule S1118: Update to LaYC (#2206)
## 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-06-15 15:32:44 +02:00
Martin Strecker
f95d517a7c
Modify rule S4586: LaYC format (#2155)
Update rule content and descriptions to LaYC format.
https://sonarsource.github.io/rspec/#/rspec/S4586

## 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-06-15 15:08:57 +02:00
Pavel Mikula
fe3d15fdc6
Modify rule S4158: Improve C# and VB.NET examples (#2181) 2023-06-15 13:54:49 +02:00
Amélie Renard
a5545cf46e
Modify rule S121: LaYC format 2023-06-15 11:57:45 +02:00
Martin Strecker
e77be4d8ae
Modify rule S2114: LaYC format (#2190) 2023-06-15 11:09:43 +02:00
Costin Zaharia
ea3ad82654
Modify rule S3655: LaYC format (#2204)
## 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-06-15 11:08:34 +02:00
Sebastien Marichal
f34d52a1e1
Modify rule S1944: Fix detail in VB.NET example (#2203) 2023-06-15 10:52:04 +02:00
Gregory Paidis
ef35d53ede
Modify rule S2291: LAYC format (#2169) 2023-06-15 10:20:09 +02:00
Costin Zaharia
e6db263ce7
Modify rule 3442: apply LaYC format (#2194)
## 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-06-15 09:34:26 +02:00
Victor
e150501da3
Modify rule S2137: Adapt to LaYC (#2167) 2023-06-15 09:33:20 +02:00
Antonio Aversa
6c5bfd51f6
Modify rule S2692: align C# and VB.NET examples (#2201) 2023-06-15 08:58:50 +02:00
Antonio Aversa
d4b7a21cc3
Modify rule S3464: fix code example (#2199) 2023-06-15 08:55:51 +02:00
Antonio Aversa
ec89f9dcd0
Modify rule S4487: LaYC format (#2198) 2023-06-15 08:54:48 +02:00
Čaba Šagi
c34296e707
Modify rule S2290: Update to LaYC (#2178) 2023-06-14 17:17:39 +02:00
Čaba Šagi
9b7e0791b4
Modify rule S2445: Update to LayC (#2184) 2023-06-14 15:58:29 +02:00
Cristian Ambrosini
dafa102cc0
Modify rule S4583: Update to LaYC (#2185)
## 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-06-14 15:44:31 +02:00
Čaba Šagi
285e392afb
Modify rule S4277: Update to LaYC (#2177) 2023-06-14 15:13:08 +02:00
Costin Zaharia
823c9677c9
Modify rule S3445: LaYC format (#2151) 2023-06-14 15:00:43 +02:00
Martin Strecker
b2ead97d57
Modify rule S4275: LaYC format (#2168)
Update rule content and descriptions to LaYC format.
[S4275: Getters and setters should access the expected
fields](https://sonarsource.github.io/rspec/#/rspec/S4275)

## 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-06-14 14:59:18 +02:00
Fred Tingaud
2cf7d97fd2
Remove languages that were never implemented for shared rules
Rules that were never implemented for any language are also removed.

Removing, per language:

## cobol
[S103, S1068, S1075, S1125, S1139, S1151, S126, S1301, S1488, S1607,
S1614, S1615, S1639, S1751, S1763, S1820, S1821, S1909, S1940, S1968,
S2024, S2145, S2189, S2190, S2197, S2251, S2252, S2760, S3047, S3269,
S3516, S3635, S3638, S3639, S3645, S3650, S3651, S3776, S3830, S3931,
S4109, S4143, S4158, S4165, S4632, S4663, S5871, S6194, S6273]

## csharp
[S1034, S1103, S1105, S1106, S1107, S1108, S1126, S1131, S1142, S115,
S1166, S117, S119, S1223, S124, S1247, S1312, S1314, S139, S140, S1448,
S1578, S1695, S1707, S1820, S1872, S1874, S1941, S1968, S1987, S2095,
S2107, S2108, S2139, S2145, S2147, S2149, S2159, S2177, S2189, S2205,
S2250, S2301, S2334, S2373, S2490, S2544, S2588, S2596, S2597, S2690,
S2691, S2702, S2752, S2833, S3041, S3044, S3047, S3062, S3065, S3075,
S3076, S3087, S3222, S3239, S3269, S3317, S3325, S3359, S3375, S3414,
S3473, S3516, S3518, S4030, S4165, S4470, S4632, S4977, S5359, S5871,
S6061, S6147, S6194, S864, S867, S899, S997]

## flex
[S1034, S104, S105, S1067, S1075, S109, S1103, S1104, S1105, S1106,
S1107, S1108, S1109, S1110, S1119, S1121, S1126, S113, S1131, S1141,
S1143, S1168, S1192, S1200, S121, S1226, S1247, S126, S1264, S1291,
S139, S1450, S1479, S1488, S1546, S1607, S1656, S1659, S1751, S1763,
S1764, S1782, S1845, S1854, S1858, S1862, S1872, S1905, S1940, S1941,
S1987, S1990, S1994, S2039, S2123, S2139,2145, S2149, S2156, S2159,
S2189, S2190, S2197, S2198, S2201, S2205, S2234, S2251, S2252, S2259,
S2301, S2387, S2440, S2583, S2588, S2589, S2596, S2597, S2639, S2681,
S2691, S2737, S2752, S2757, S2760, S2761, S2887, S2963, S3031, S3041,
S3047, S3065, S3075, S3076, S3222, S3239, S3241, S3242, S3269, S3358,
S3370, S3440, S3458, S3516, S3518, S3776, S3872, S3981, S4025, S4143,
S4144, S4158, S4165, S4632, S4663, S5871, S6194, S878, S881, S899]

## java
[S1034, S1131, S1247, S1453, S1707, S1772, S1782, S1888, S1968, S1990,
S2107, S2108, S2145, S2149, S2198, S2205, S2327, S2373, S2436, S2490,
S2526, S2588, S2596, S2597, S2690, S2691, S2702, S2738, S2752, S2760,
S2814, S2833, S2963, S2997, S3018, S3019, S3031, S3041, S3044, S3062,
S3075, S3076, S3087, S3222, S3239, S3241, S3249, S3263, S3269, S3317,
S3353, S3359, S3370, S3375, S3397, S3440, S3458, S3473, S3604, S3872,
S3887, S3949, S4025, S4030, S4136, S4158, S4632, S4663, S5780, S5781,
S5871, S6194, S787]

## php
[S1034, S109, S1104, S1107, S1119, S1120, S1128, S1143, S1199, S1213,
S1247, S1450, S1694, S1707, S1845, S1858, S1872, S1905, S1941, S1952,
S1968, S1987, S1994, S2095, S2108, S2114, S2139, S2145, S2149, S2156,
S2159, S2177, S2189, S2190, S2197, S2205, S2252, S2259, S2301, S2387,
S2583, S2588, S2589, S2596, S2597, S2639, S2691, S2752, S2760, S2814,
S2833, S3010, S3041, S3047, S3065, S3075, S3239, S3254, S3269, S3400,
S3440, S3458, S3466, S3516, S3518, S3872, S3931, S4030, S4165, S4188,
S4275, S4632, S4663, S5797, S5871, S6194, S864, S899]

## pli
[S104, S105, S1066, S1067, S1068, S1075, S108, S1110, S1135, S1151,
S1172, S1186, S1247, S125, S126, S1291, S1301, S138, S1451, S1479,
S1481, S1488, S1607, S1614, S1615, S1656, S1737, S1745, S1751, S1763,
S1764, S1821, S1854, S1862, S1871, S1909, S1940, S2527, S2583, S2589,
S2681, S2757, S3516, S3633, S3635, S3637, S3638, S3639, S3640, S3641,
S3643, S3644, S3645, S3647, S3650, S3651, S3652, S3776, S3890, S3923,
S3973, S4632, S4663, S5871, S6194, S864]

## abap
[S1045, S1075, S1135, S1144, S1186, S1226, S1291, S138, S1448, S1451,
S1479, S1601, S1607, S1763, S1820, S1821, S1854, S1905, S1909, S1940,
S2147, S2189, S2190, S2387, S2527, S2583, S2589, S2737, S2760, S3047,
S3269, S3358, S3516, S3635, S3637, S3638, S3639, S3640, S3641, S3644,
S3645, S3647, S3650, S3651, S3652, S4109, S4165, S4632, S4663, S5871,
S6194, S864]

## plsql
[S105, S1067, S1075, S1120, S1139, S1186, S1226, S1247, S138, S1488,
S1578, S1607, S1639, S1737, S1738, S1909, S2234, S2583, S2589, S2814,
S3269, S3270, S3358, S3516, S3518, S3635, S3637, S3638, S3639, S3640,
S3644, S3645, S3647, S3650, S3652, S3776, S3890, S3931, S3981, S4109,
S4165, S4413, S4632, S4663, S5871, S6194, S864]

## python
[S105, S1067, S1075, S109, S1125, S1126, S1128, S115, S1155, S1247,
S126, S1314, S1448, S1450, S1488, S1695, S1696, S1820, S1872, S1905,
S1941, S1952, S1987, S1996, S2095, S2114, S2139, S2145, S2149, S2166,
S2189, S2197, S2205, S2251, S2252, S2301, S2321, S2588, S2596, S2597,
S2639, S2691, S2752, S2760, S2833, S2963, S3041, S3047, S3065, S3075,
S3239, S3241, S3254, S3269, S3440, S3458, S3466, S3696, S3717, S3723,
S3872, S4030, S4158, S4165, S4632, S4663, S5871, S6194, S864, S899,
S907]

## javascript
[S1065, S1068, S1103, S1104, S1106, S1107, S1108, S1109, S1142, S1144,
S1147, S115, S1151, S116, S1199, S1200, S1247, S1291, S140, S1448,
S1450, S1578, S1607, S1659, S1707, S1820, S1845, S1872, S1905, S1941,
S1952, S1968, S1987, S1996, S2039, S2108, S2145, S2149, S2159, S2190,
S2205, S2252, S2301, S2326, S2372, S2387, S2588, S2596, S2597, S2691,
S2752, S2830, S2887, S2959, S3041, S3047, S3065, S3075, S3235, S3239,
S3325, S3440, S3458, S3518, S3872, S4025, S4487, S4632, S4663, S5603,
S5871, S6194, S864, S899]

## rpg
[S1066, S107, S1075, S1110, S1135, S1172, S1186, S124, S1247, S1291,
S1301, S131, S1448, S1479, S1481, S1578, S1607, S1614, S1615, S1735,
S1739, S1741, S1745, S1751, S1763, S1821, S1854, S1909, S1940, S1968,
S2189, S2190, S2197, S2251, S2252, S2260, S2527, S2583, S2589, S2757,
S2760, S3047, S3269, S3516, S3635, S3637, S3638, S3639, S3640, S3641,
S3643, S3644, S3645, S3647, S3650, S3651, S3652, S3776, S3890, S3923,
S4109, S4158, S4165, S4632, S4663, S5871, S6194, S864]

## rust
[S1066, S1067, S1172, S125, S1763, S2757, S2761, S3358, S3776, S3923,
S3981, S4143, S4144, S4663, S5871, S6194]

## solidity
[S1066, S1067, S125, S2757, S3776, S3923, S3981, S4143, S4144, S5871,
S6194]

## vbnet
[S1068, S1104, S1105, S1106, S1126, S1131, S1142, S1143, S1144, S116,
S119, S124, S1247, S125, S127, S140, S1448, S1488, S1578, S1607,1669,
S1694, S1695, S1696, S1698, S1707, S1763, S1820, S1845, S1854, S1858,
S1872, S1905, S1941, S1968, S1987, S2096, S2108, S2139, S2145, S2149,
S2159, S2189, S2190, S2197, S2198, S2201, S2205, S2250, S2251, S2301,
S2334, S2583, S2588, S2589, S2596, S2597, S2691, S2760, S3041, S3047,
S3236, S3239, S3242, S3269, S3376, S3440, S3458, S3516, S3518, S3626,
S3688, S3872, S3902, S3906, S3908, S3925, S3993, S3994, S3995, S3996,
S3997, S4004, S4005, S4018, S4022, S4023, S4026, S4030, S4040, S4158,
S4165, S4220, S4456, S4457, S4462, S4470, S4632, S5871, S6061, S6194,
S864, S899]

## html
[S1075, S1143, S1291, S1707, S1952, S2166, S2197, S2201, S2205, S2251,
S2588, S2596, S2597, S4632, S4663, S5871]

## tsql
[S1075, S1125, S1226, S1741, S1854, S2234, S2524, S2544, S2583, S2589,
S2757, S3270, S3618, S3651, S3776, S3830, S3981, S4158, S4165, S4632,
S4663, S5245, S5871, S6194, S864]

## vb6
[S1075, S1110, S1144, S1172, S1192, S1226, S125, S126, S127, S1291,
S134, S1448, S1451, S1481, S1578, S1607, S1656, S1707, S1751, S1763,
S1764, S1854, S1858, S1862, S1871, S1909, S1940, S1941,1987, S2145,
S2149, S2189, S2190, S2197, S2198, S2205, S2234, S2251, S2252, S2259,
S2301, S2583, S2588, S2596, S2597, S2760, S2761, S3047, S3269, S3440,
S3458, S3516, S3626, S3776, S3923, S3981, S4143, S4144, S4158, S4165,
S4632, S4663, S5871, S6145, S6146, S6194, S899]

## swift
[S109, S1103, S1119, S1121, S1185, S1226, S1247, S127, S1270, S1291,
S1448, S1450, S1537, S1545, S1578, S1607, S1707, S1874, S1968, S2039,
S2114, S2123, S2177, S2234, S2253, S2301, S2373, S2440, S2490, S2583,
S2588, S2589, S2596, S2597, S2639, S2691, S2752, S2833, S2931, S3019,
S3031, S3041, S3044, S3047, S3065, S3075, S3076, S3239, S3241, S3242,
S3244, S3254, S3269, S3317, S3353, S3366, S3370, S3397, S3398, S3440,
S3458, S3466, S3516, S3518, S3688, S3872, S3931, S3949, S4025, S4030,
S4158, S4165, S4200, S4275, S4487, S4503, S4632, S4663, S5359, S5871,
S6194, S864, S867, S925]

## cfamily
[S1104, S1105, S1106, S1107, S1108, S1109, S1124, S1125, S1126, S114,
S115, S119, S1192, S1200, S1247, S1312, S1450, S1453, S1488, S1595,
S1607, S1782, S1845, S1888, S1899, S1941, S1952, S1968, S2039, S2096,
S2108, S2139, S2149, S2159, S2164, S2166, S2177, S2198, S2205, S2252,
S2326, S2327, S2440, S2490, S2588, S2596, S2597, S2639, S2691, S2752,
S2760, S2833, S2963, S3031, S3038, S3044, S3047, S3065, S3075, S3076,
S3235, S3239, S3241, S3242, S3269, S3317, S3353, S3370, S3397, S3398,
S3440, S3466, S3872, S3878, S3981, S3984, S3985, S4025, S4158, S4165,
S4275, S4503, S4632, S4663, S4970, S5871]

## xml
[S1128, S1291, S1707, S4632, S4663]

## kotlin
[S113, S2583, S3011, S3973, S4143, S5871, S6194]

## scala
[S113, S2583, S2757, S2761, S3011, S3358, S3981, S4143, S5871, S6194]

## go
[S1155, S125, S127, S2114, S2197, S2583, S3626, S4487, S4632, S5871,
S6194, S899]

## ruby
[S125, S2583, S3973, S3981, S4143, S5871, S6194]

## apex
[S2761, S3358, S3981, S4143, S5871, S6194]

## css
[S4632, S5871]
2023-06-14 14:43:06 +02:00
Cristian Ambrosini
aaa468bf3a
Modify rule S1134: Update to LaYC (#2189)
I removed abap, flex, pli and rpg dummy implementations since they're
not implemented in the corresponding analyzer and there are no tickets
open to do so.
2023-06-14 14:23:44 +02:00
Costin Zaharia
afefc85dac
Modify rule S1144: LaYC format (#2183) 2023-06-14 14:04:05 +02:00
Arseniy Zaostrovnykh
5d36aa982f
Fix the preview page deployment: require write access for the action 2023-06-14 10:16:57 +00:00
Sebastien Marichal
2a6106862e
Modify rule S1944: Improve VB.NET example (#2182)
## 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-06-14 11:13:10 +02:00
Fred Tingaud
a3f81b0b6c
Modify rule S3358: LaYC for Nested ternaries
Co-authored-by: Amélie Renard <44666826+amelie-renard-sonarsource@users.noreply.github.com>
2023-06-14 08:47:35 +00:00
Čaba Šagi
4b843bf87a
Modify rule S5034: Update to LaYC (#2152)
## 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-06-14 10:23:06 +02:00
Johann Beleites
a664bedde9
Deprecate rule S1610 [SONARJAVA-4485] (#2161) 2023-06-14 10:05:19 +02:00
SonarTech
520a6dc896 update coverage information 2023-06-14 00:34:20 +00:00
Fred Tingaud
a08c3bbd23
Modify Rule S3011: LaYC reflection
Co-authored-by: Nils Werner <nils.werner@sonarsource.com>
2023-06-13 19:24:21 +02:00
Fred Tingaud
35036fffff
Add check that each section is used only once
There was already a check for section duplication, but only in "How to
fix it". This changes the test to cover all sections.
And fixing the rules that this new validation fails on.

Also making test_modify_rule.py run on Windows.

---------

Co-authored-by: Christophe Zürn <36889251+christophe-zurn-sonarsource@users.noreply.github.com>
2023-06-13 18:03:28 +02:00
Arseniy Zaostrovnykh
a3b1a2445d
Improve PR-scan rate limiting behavior when listing all new rules under specification
Propagate the GITHUB_TOKEN to the `predeploy` action to enable
authorized read access to the list of open PRs.
Also specify explicitly that the action requires read access to PRs
2023-06-13 17:13:23 +02:00
Čaba Šagi
e2d06c1e1c
Modify rule S3217: Adapt to LaYC (#2175) 2023-06-13 17:09:18 +02:00
Amélie Renard
04d2e44657
Modify rule S110: LaYC format 2023-06-13 16:32:31 +02:00
Amélie Renard
6ebac03a85
Modify rule S100: fix LaYC for Java and JS/TS (#2165) 2023-06-13 16:27:23 +02:00
Sebastien Marichal
f3e1b88f9d
Modify rule S2234: LaYC format (#2172) 2023-06-13 16:14:37 +02:00
Gregory Paidis
cbbe7126e5
Modify rule S2225: LaYC format (#2173) 2023-06-13 16:11:53 +02:00
Sebastien Marichal
e8c9d1d972
Modify rule S4635: Improve code example (#2143) 2023-06-13 16:01:46 +02:00
cynthiabethea
24f34c42dd
Modify rule S6426: LaYC format (#2121) 2023-06-13 16:01:15 +02:00
Victor
24763c9ddc
Modify rule S1472: Adapt to LaYC (#2153) 2023-06-13 13:06:23 +00:00
Antonio Aversa
63c46d9b4b
Modify rule S3464: fix grammar, links, resources, rspecator (#2164) 2023-06-13 14:08:13 +02:00
Gregory Paidis
e1d18a26b3
S4015: Migrate to LAYC level 2 (#2134) 2023-06-13 12:23:03 +02:00
Sebastien Marichal
950617a825
Modify rule S3265: LaYC format (#2150) 2023-06-13 11:36:14 +02:00
Dorian Burihabwa
089fad36d5
Deprecate rule S1114 (#2162) 2023-06-13 11:31:26 +02:00
Antonio Aversa
f1a5a79e73
Modify rule S2692: fix non-compliant code example (#2158) 2023-06-13 11:14:41 +02:00
Antonio Aversa
630df42477
Modify rule S3451: fix non-compliant block (#2157) 2023-06-13 11:11:31 +02:00
Antonio Aversa
0cf7742d2e
Modify rule S2437: fix VB.NET links and rspecator (#2159) 2023-06-13 11:05:22 +02:00
Sebastien Marichal
800c2f647c
Modify rule S1944: LaYC format (#2131) 2023-06-13 10:52:19 +02:00
Cristian Ambrosini
5e048dd441
Modify rule S4019: LaYC format (#2141) 2023-06-13 09:45:25 +02:00
Victor
63488517d8
Modify rule S4275: Adapt to LaYC (#2105) 2023-06-13 09:16:19 +02:00
Antonio Aversa
112b5c8134
Modify rule S1215: LaYC format (#2128) 2023-06-13 08:18:53 +02:00
SonarTech
55d325debb update coverage information 2023-06-13 00:32:55 +00:00
Marco Kaufmann
c5f4f33c6d
Modify rule S2975: Reworked into new educational format (#2107) 2023-06-12 18:36:39 +02:00
Marco Kaufmann
8973e2be96
Modify rule S2165: Reworked into new educational format (#2149) 2023-06-12 18:10:51 +02:00
Marco Kaufmann
4ac3e2c027
Modify rule S2160: Reworked into new educational format (#2126) 2023-06-12 18:10:24 +02:00
Marco Kaufmann
d6ffc40042
Modify rule S2157: Reworked into new educational format (#2101) 2023-06-12 18:09:33 +02:00
hendrik-buchwald-sonarsource
d3b00511bb
Modify rule S5547: LaYC format (#2023) 2023-06-12 15:58:19 +02:00
Čaba Šagi
91d028fdb6
Modify rule S3871: Update to LaYC (#2138)
## 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
2023-06-12 15:18:25 +02:00
Fred Tingaud
28657dcc74
Modify rule S4143: Adapt to LaYC (#1931) 2023-06-12 14:18:01 +02:00
Sebastien Marichal
9e3cc3533a
Modify rule S3973: Remove unsupported languages (#2118) 2023-06-12 12:30:49 +02:00
Arseniy Zaostrovnykh
d4f555ef9c
Add a checkbox for the PR title guidelines 2023-06-12 11:57:47 +02:00
leonardo-pilastri-sonarsource
06cf53d7a8
SONARJAVA-4492 Add missing space after backtick for S2441 (#2147) 2023-06-12 11:17:30 +02:00
Alban Auzeill
283866408b
Modify rule S2055(Java): Update rule according to the LayC (#2084) 2023-06-12 10:40:53 +02:00
Sebastien Marichal
31a1f3c8f8
Modify rule S2222: Update code examples diff type (#2142) 2023-06-12 10:24:02 +02:00
Alban Auzeill
869c168284
Modify rule S2060(Java): Update rule according to the LayC (#2127) 2023-06-12 10:02:23 +02:00
Sebastien Marichal
a9b8e55ae6
Modify rule S2187: Improve title format (#2144)
## 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
2023-06-12 09:40:46 +02:00
Antonio Aversa
2902b6da64
Modify rule S3451: LaYC format (#2104) 2023-06-12 09:25:07 +02:00
Cristian Ambrosini
090cd7b6db
Modify rule S1163: LaYC format (#2091) 2023-06-12 09:22:59 +02:00
Gregory Paidis
32bf576764
S3904: Migrate to layc level 2 (#2129)
## Review

A dedicated reviewer checked the rule description successfully for:

- [ ] logical errors and incorrect information
- [ ] information gaps and missing content
- [ ] text style and tone

https://sonarsource.github.io/rspec/#/rspec/S3904/csharp
2023-06-09 17:19:16 +02:00
Dorian Burihabwa
441fd4a91c SONARJAVA-4488 Modify S2153: Fix typo and use diff'd code samples 2023-06-09 17:16:41 +02:00
Dorian Burihabwa
d0962408af SONARJAVA-4488 Modify S2151: Use diff'd code samples 2023-06-09 17:16:41 +02:00
Dorian Burihabwa
0e5ccaf506 SONARJAVA-4488 Modify S2142: Fix phrasing 2023-06-09 17:16:41 +02:00
Dorian Burihabwa
d6fc5d5ba7 SONARJAVA-4488 Modify S2140: Fix typo and use diff'd code samples 2023-06-09 17:16:41 +02:00
Dorian Burihabwa
5b6c7a1b88 SONARJAVA-4488 Modify S2133: Use diff'd code samples 2023-06-09 17:16:41 +02:00
Dorian Burihabwa
b348b64d71 SONARJAVA-4488 Modify S2130: Use diff'd code samples 2023-06-09 17:16:41 +02:00
Dorian Burihabwa
8b9df80c13 SONARJAVA-4488 Modify S2129: Fix typos and use diff'd code samples 2023-06-09 17:16:41 +02:00
John-Clifton-SonarSource
a3fc55943b
Update expressjs.adoc (#2139)
Fixing a typo in the noncompliant code example. I think this is now
right, but please double-check me.

## 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
2023-06-09 15:45:56 +01:00
Cristian Ambrosini
86dcb93f8b
Modify rule S3972: LaYC format (#2123) 2023-06-09 16:37:07 +02:00
leonardo-pilastri-sonarsource
ad74d82e21
SONARJAVA-4482 Add diff notation to code examples (#2137) 2023-06-09 16:36:32 +02:00
leonardo-pilastri-sonarsource
202b45f7ac
SONARJAVA-4492 Modify rule S2441: rewrite title and description (#2103) 2023-06-09 16:19:31 +02:00
Sebastien Marichal
02b6cb6e44
Modify rule S927: LaYC format (#2114) 2023-06-09 16:17:40 +02:00
Cristian Ambrosini
fa52bf6a00
Removing unused variable in code snippet (#2136) 2023-06-09 15:28:24 +02:00
leonardo-pilastri-sonarsource
e4a6f0b2bc
SONARJAVA-4492 Modify rule S2390: Change to BUG and rewrite title and description (#2096) 2023-06-09 14:53:45 +02:00
leonardo-pilastri-sonarsource
9737f1f5ec
SONARJAVA-4492 Modify rule S2438: rewrite title and description, simplified code samples (#2100) 2023-06-09 14:53:08 +02:00
Sebastien Marichal
a42c849e3b
Modify rule S1186: LaYC format (#2095) 2023-06-09 14:51:36 +02:00
Loris S
1a8d33d656
Modify S2068: Fix Typo (#2132) 2023-06-09 14:31:04 +02:00
Victor
d9ff48dc96
Modify rule S6523: Adapt to LaYC (#2007) 2023-06-09 12:42:47 +02:00
Victor Diez
6b442d4a90 fix error 2023-06-09 12:41:19 +02:00
Victor Diez
8d03a4aa4d differentiate primitives and global objects 2023-06-09 12:41:19 +02:00
Victor Diez
0420f9defc add code examples sections 2023-06-09 12:41:19 +02:00
Victor Diez
b468a02725 add code examples sections 2023-06-09 12:41:19 +02:00
Victor Diez
62fac8a3d3 remove subtitles 2023-06-09 12:41:19 +02:00
Victor Diez
d7a148016e Changes after review 2023-06-09 12:41:19 +02:00
Victor
04b21f522c improvements after review 2023-06-09 12:41:19 +02:00
Victor
01f040d577 Improved description 2023-06-09 12:41:19 +02:00
Victor
b2bd23d01a Modify rule S6534: Adapt to LaYC 2023-06-09 12:41:19 +02:00
Cristian Ambrosini
b50a3f324f
Modify rule S3218: LaYC format (#2089) 2023-06-09 11:33:53 +02:00
Cristian Ambrosini
5f13c2cd13
Modify rule S1699: LaYC format (#2109) 2023-06-09 11:07:55 +02:00
Gregory Paidis
f28bcba936
S2306: Fix some whitespace (#2125) 2023-06-09 10:52:14 +02:00
Čaba Šagi
6d2015c1fe
Modify S3447: Fix indentation of code snippets (#2124) 2023-06-09 10:47:40 +02:00
Victor
a1545ff100
Modify rule S6522: Adapt to LaYC (#2009) 2023-06-09 09:34:59 +02:00
SonarTech
c5ea75a607 update coverage information 2023-06-09 00:34:07 +00:00
Dorian Burihabwa
7449c1114a
SONARJAVA-4492 Modify S2447: Modify description and code examples (#2116) 2023-06-08 15:32:39 +00:00
Angelo
cf629387a4
Modify rule S2236: Update rule according to the LayC (#2120) 2023-06-08 17:20:36 +02:00
Dorian Burihabwa
9787c7a33a
SONARJAVA-4492 Modify S2629: Rework first sentence and code samples (#2119) 2023-06-08 17:19:08 +02:00
Fred Tingaud
1d958ef229
Modify rule S3923: LaYC identical branches
Co-authored-by: Amélie Renard <44666826+amelie-renard-sonarsource@users.noreply.github.com>
2023-06-08 17:06:21 +02:00
Fred Tingaud
1b5bb2d7cf
Modify rule S4663: Adapt to LaYC 2023-06-08 17:03:41 +02:00
Gregory Paidis
8cad96a5f8
Modify rule S3998: Migrate to new educational format (#2111) 2023-06-08 16:53:12 +02:00
Antonio Aversa
ed1c6003b7
Modify rule S4524: LaYC format (#2071)
Adapts the [rule](https://sonarsource.github.io/rspec/#/rspec/S4524) to
LaYC format level 2, for csharp.
2023-06-08 16:49:55 +02:00
Gregory Paidis
1f7b894f02
Modify rule S2365: Migrate to new educational format (#2085) 2023-06-08 16:46:44 +02:00
Čaba Šagi
5a1eeabf0f
Modify S3217: Migrate it to the Learn-As-You-Code (#2098) 2023-06-08 16:36:51 +02:00
Dorian Burihabwa
c1769aa7f6
SONARJAVA-4492 Modify rule S2442: rewrite title and description (#2113) 2023-06-08 15:57:16 +02:00
Dorian Burihabwa
0327ad3bef
SONARJAVA-4492 Modify S2446 Modify description and code examples (#2115) 2023-06-08 15:55:22 +02:00
Arseniy Zaostrovnykh
13e8efe9f3
Update rule S935(cfamily): fix typo 2023-06-08 13:51:18 +00:00
Gregory Paidis
093ecc0d4d
Modify rule S2551: LaYC format (#2108) 2023-06-08 15:36:00 +02:00
Irina Batinic
395e870f93
Modify rule S2127: Update rule according to the LayC (#2094) 2023-06-08 15:13:04 +02:00
John-Clifton-SonarSource
83e74e9318
Update description.adoc for S6249 (#2112)
Fixing a couple of tiny typos.

## 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
2023-06-08 13:47:34 +01:00
leonardo-pilastri-sonarsource
5be80140d4
Add eclipse generated project files to .gitignore (#2110) 2023-06-08 12:14:25 +02:00
Čaba Šagi
26230fcd0a
Modify S3600: Migrate it to the Learn-As-You-Code (#2099) 2023-06-08 12:09:10 +02:00
Amélie Renard
f626b97108
Modify rule S104: LaYC format 2023-06-08 08:24:50 +00:00
Amélie Renard
eb6577562e
Modify rule S103: LaYC format 2023-06-08 08:09:43 +00:00
Antonio Aversa
273f9d5438
Modify rule S2692: LaYC format (#2080) 2023-06-08 09:50:39 +02:00
Victor Diez
98dcce097e changes after review 2023-06-08 09:10:19 +02:00
Victor Diez
efb172be97 Modify rule S6535: Adapt to LaYC 2023-06-08 09:10:19 +02:00
Amélie Renard
01a984a899
Modify rule S101: LaYC format 2023-06-08 06:03:28 +00:00
SonarTech
d6f326aaff update coverage information 2023-06-08 00:33:02 +00:00
Johann Beleites
39d1de8b2c
SONARJAVA-4485 Modify rule S1612: Update rule in line with LayC (#1986) 2023-06-07 17:26:25 +02:00
Johann Beleites
90d1746393
SONARJAVA-4485 Modify rule S1948: Update rule in line with LayC (#2070) 2023-06-07 17:18:14 +02:00
Johann Beleites
2eb853da5d
SONARJAVA-4485 Modify rule S1860: Update rule in line with LayC (#2061) 2023-06-07 17:17:58 +02:00
Johann Beleites
121f5917fd
SONARJAVA-4485 Modify rule S1849: Update rule in line with LayC (#2059) 2023-06-07 17:17:38 +02:00
Johann Beleites
92ca7b4a74
SONARJAVA-4485 Modify rule S1844: Update rule in line with LayC (#2058) 2023-06-07 17:17:22 +02:00
Johann Beleites
10df08bb9a
SONARJAVA-4485 Modify rule S1710: Update rule in line with LayC (#2013) 2023-06-07 17:17:03 +02:00
Johann Beleites
64a35afef9
SONARJAVA-4485 Modify rule S1640: Update rule in line with LayC (#1996) 2023-06-07 17:16:40 +02:00
Johann Beleites
a8b95d3ea2
SONARJAVA-4485 Modify rule S1611: Update rule in line with LayC (#1984) 2023-06-07 17:13:55 +02:00
Johann Beleites
6f958bf170
[SONARJAVA-4485] Modify rule S1604: Update rule in line with LayC (#1978) 2023-06-07 17:13:11 +02:00
Irina Batinic
32b4450609
Modify rule S2235: Update rule according to the LayC (#2102) 2023-06-07 17:09:02 +02:00
Čaba Šagi
26709862e0
Modify rule S1006: Migrate to new educational format (#2083) 2023-06-07 16:45:33 +02:00
Sebastien Marichal
b54525b655
Address comments in #2033 (#2090) 2023-06-07 15:41:34 +02:00
Irina Batinic
17319eec88
Modify rule S2122: Update rule according to the LayC (#2093) 2023-06-07 15:23:41 +02:00
Amélie Renard
8427078324
Modify rule S105: LaYC format (#2077) 2023-06-07 14:55:48 +02:00
Irina Batinic
5a5f3c3a61
Modify rule S2122: Update rule according to the LayC (#2092) 2023-06-07 14:50:47 +02:00
John-Clifton-SonarSource
603acc3d7b
Create tone_guide.adoc (#2088)
Created a tone guide to help rules authors make their content as
compelling for their users as possible.

## 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
2023-06-07 12:32:04 +01:00
Gregory Paidis
81a7be57e5 Modify rule S3449: LAYC format (#2067) 2023-06-07 12:01:33 +02:00
Cristian Ambrosini
d3c0976f86 Modify rule S3869: Migrate to new educational format (#2068) 2023-06-07 12:01:33 +02:00
Sebastien Marichal
a549ff28d4 Modify rule S2187: LaYC format (#2042) 2023-06-07 12:01:33 +02:00
Čaba Šagi
407b1bb9e5 Modify rule S3447: LayC format (#2073) 2023-06-07 12:01:33 +02:00
Sebastien Marichal
2f18688942 Modify rule S2222: LaYC format (#2046) 2023-06-07 12:01:33 +02:00
Cristian Ambrosini
d18a0f74ab Modify rule S2699: Migrate to new educational format (#1956) 2023-06-07 12:01:33 +02:00
Antonio Aversa
69044ba7f4 Modify rule S2346: LaYC format (#2045) 2023-06-07 12:01:33 +02:00
Gregory Paidis
ed515c4f93 Modify rule S2479: LaYC format (#2054)
https://sonarsource.github.io/rspec/#/rspec/S2387
2023-06-07 12:01:33 +02:00
Gregory Paidis
02b5716156 Modify rule S5856: LaYC format (#2047) 2023-06-07 12:01:33 +02:00
Antonio Aversa
58e927b8a2 Modify rule S2223: LaYC format (#2041) 2023-06-07 12:01:33 +02:00
Sebastien Marichal
133205d40e Modify rule S2930: LaYC format (#2037) 2023-06-07 12:01:33 +02:00
Antonio Aversa
1c002dd48b Modify rule S3060: LaYC format (#2032)
Adapts the [rule](https://sonarsource.github.io/rspec/#/rspec/S3060) to
LaYC format level 2, for csharp.

Co-authored-by: Gregory Paidis <115458417+gregory-paidis-sonarsource@users.noreply.github.com>
2023-06-07 12:01:33 +02:00
Antonio Aversa
9711d241b9 Modify rule S4159: LaYC format (#2036)
Adapts the rule to LaYC format level 2, for dotnet languages (csharp,
vbnet).
2023-06-07 12:01:33 +02:00
Sebastien Marichal
8c5932bf08 Modify rule S2368: LaYC format (#1981) 2023-06-07 12:01:33 +02:00
Antonio Aversa
a16144cc62 Modify rule S2953: LaYC format (#2019) 2023-06-07 12:01:33 +02:00
Antonio Aversa
e15f971467 Modify rule S2178: LaYC format (#2020)
Adapts the rule to LaYC format level 2, for dotnet languages (csharp,
vbnet).
Also, removes the directories for the following languages (rule not
implemented):
- flex
2023-06-07 12:01:33 +02:00
Gregory Paidis
ea2ff814e9 Modify rule S6422: LaYC format (#2026) 2023-06-07 12:01:33 +02:00
Gregory Paidis
f7ffaf4f6b Modify rule S3889: LAYC format (#1997) 2023-06-07 12:01:33 +02:00
Antonio Aversa
6ec984ee5b Modify rule S2437: LaYC format (#1991) 2023-06-07 12:01:33 +02:00
Antonio Aversa
134a1ce8cc Modify rule S3464: LaYC format (#1966)
RSpec: https://sonarsource.github.io/rspec/#/rspec/S3464
2023-06-07 12:01:33 +02:00
Gregory Paidis
65d0330ffc Modify rule S3875: LaYC format (#1988) 2023-06-07 12:01:33 +02:00
Cristian Ambrosini
6fb50e5b67 Modify rule S3877: LaYC format (#1993) 2023-06-07 12:01:33 +02:00
Gregory Paidis
2da93fad0d Modify rule S2306: LaYC format (#1994) 2023-06-07 12:01:33 +02:00
Cristian Ambrosini
8eccd9334d Modify rule S3433: Migrate to new educational format (#1955) 2023-06-07 12:01:33 +02:00
Cristian Ambrosini
82e7c93900 Modify rule S2970: LaYC format (#1985) 2023-06-07 12:01:33 +02:00
Sebastien Marichal
8cf81b0999 Modify rule S3443: LaYC format (#1971) 2023-06-07 12:01:33 +02:00
Gregory Paidis
4be90168eb Modify rule S2857: LaYC format (#1979) 2023-06-07 12:01:33 +02:00
Cristian Ambrosini
0203bde840 Modify rule S2275: LaYC format (#1975) 2023-06-07 12:01:33 +02:00
Cristian Ambrosini
eef8a8cfa2 Modify rule S3427: Migrate to new educational format (#1957) 2023-06-07 12:01:33 +02:00
Cristian Ambrosini
bcb7467ef7
Modify rule S2696: Migrate to new educational format (#2082) 2023-06-07 10:58:26 +02:00
Angelo
598bf9c75c
Modify rule S2121 for LaYC (#2086) 2023-06-07 09:23:44 +02:00
Pavel Mikula
5ddfa2b7d1
Update S1944: Remove nullable cast from C# in favor of S3655 (#2066) 2023-06-07 09:10:48 +02:00
SonarTech
d71b5a1446 update coverage information 2023-06-07 00:33:34 +00:00
Loghin Vlad-Andrei
4226e80586
Modify rule S6232: CPP-3254 Well defined alternatives to union type-punning
Co-authored-by: Arseniy Zaostrovnykh <arseniy.zaostrovnykh@sonarsource.com>
2023-06-06 20:28:53 +02:00
Marco Kaufmann
f703bd0f59
Modify rule S1221: Reworked into new educational format (#2005) 2023-06-06 19:08:33 +02:00
Marco Kaufmann
f03151be5d
Modify rule S1317: Reworked into new educational format (#2021) 2023-06-06 19:08:13 +02:00
Marco Kaufmann
6186521ab8
Modify rule S1319: Reworked into new educational format (#2031) 2023-06-06 19:07:57 +02:00
Marco Kaufmann
1a40ede036
Modify rule S1452: Reworked into new educational format (#2065) 2023-06-06 19:07:26 +02:00
Marco Kaufmann
73dc06aec4
Modify rule S1596: Reworked into new educational format (#2044) 2023-06-06 19:07:11 +02:00
Marco Kaufmann
a960077304
Modify rule S1598: Reworked into new educational format (#2053) 2023-06-06 19:06:54 +02:00
Marco Kaufmann
c0ce5a0b4f
Modify rule S1602: Reworked into new educational format (#2056) 2023-06-06 19:06:38 +02:00
Amélie Renard
aa331b9b5e
Modify rule S100: LaYC format 2023-06-06 17:27:22 +02:00
hendrik-buchwald-sonarsource
a315e5de4c
Add review checklist
This PR adds a small checklist for new PRs that will make it more
visible what parts of the RSPEC were reviewed.
2023-06-06 17:04:39 +02:00
Sebastien Marichal
d189c21fd7
Modify rule S4635: LaYC format (#2078) 2023-06-06 16:57:59 +02:00
Irina Batinic
d814c4725c
Modify rule S2119: Update rule according to the LayC (#2079) 2023-06-06 16:52:07 +02:00
Irina Batinic
2516268044
Modify rule S2118: Update rule according to the LayC (#2076) 2023-06-06 16:40:25 +02:00
leonardo-pilastri-sonarsource
7bc1ebaf1a
SONARJAVA-4482 Review LaYC format migration changes (#2072) 2023-06-06 16:33:23 +02:00
github-actions[bot]
a1dd90243d
Create rule S6643: Prototypes of builtin objects should not be modified (#2074) 2023-06-06 16:12:47 +02:00
Dorian Burihabwa
58ad45f37d
SONARJAVA-4888 Modify rules S2129, S2130, S2142 (#2069) 2023-06-06 15:53:52 +02:00
github-actions[bot]
93a982316b
Create rule S6641(C#): Connection strings should not be vulnerable to injections attacks (#1949)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6641/csharp)
(updated a few minutes after each push).

See:
* Research ticket: https://sonarsource.atlassian.net/browse/APPSEC-732
* New rule ticket: https://sonarsource.atlassian.net/browse/APPSEC-748
* Implementation ticket:
https://sonarsource.atlassian.net/browse/SONARSEC-3863
2023-06-06 14:31:44 +01:00
Fred Tingaud
4dcb3c509e
Modify rule S4524: Adapt to LaYC (#1927)
Co-authored-by: vilchik.elena <elena.vilchik@sonarsource.com>
2023-06-06 13:02:30 +00:00
Irina Batinic
14717f36d2
Modify rule S2116: Update rule according to the LayC (#2057) 2023-06-06 15:01:44 +02:00
Gregory Paidis
75539dc1a7
S2925: Add c# and vbnet specifications (#2016) 2023-06-06 14:52:33 +02:00
Alban Auzeill
4baafda9aa
Modify rule S1989(Java): Update rule according to the LayC (#2014) 2023-06-06 11:23:47 +02:00
Gregory Paidis
65008d6b56
S3260: Move C# benchmarks to resources (#2060) 2023-06-06 11:04:23 +02:00
SonarTech
843bc2fd17 update coverage information 2023-06-06 00:33:01 +00:00
leonardo-pilastri-sonarsource
db91c6469b
SONARJAVA-4488 Modify rule S2153: reformulate description and code examples (#2055) 2023-06-05 15:56:34 +00:00
Dorian Burihabwa
3e5e2cbeaf
SONARJAVA-4488 Modify S2134: Rewrite title and entire rule to integrate exceptions (#2024) 2023-06-05 15:47:30 +00:00
Dorian Burihabwa
b0bfc2536b
SONARJAVA-4488 Modify S2140: Rework rule description and examples (#2025) 2023-06-05 17:47:24 +02:00
Sebastien Marichal
8632f42ef1
Modify rule S3260: Update rule to include file access modifier (#1798) 2023-06-05 17:37:15 +02:00
Fred Tingaud
32593aad3b
Modify rule S4144: Adapt to LaYC format (#1935)
Co-authored-by: Quentin Jaquier <quentin.jaquier@sonarsource.com>
2023-06-05 17:24:05 +02:00
leonardo-pilastri-sonarsource
16d41524f1
SONARJAVA-4488 Modify rule S2151: reformulate description, fix code examples (#2051) 2023-06-05 16:34:49 +02:00
Fred Tingaud
6eb60ef881
Modify rule S3972: LaYC (Conditional on new line) 2023-06-05 16:32:25 +02:00
github-actions[bot]
36c5c7a1d9
Create rule S6638: Binary expressions should not always return the same value (#1939)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6638/javascript)
(updated a few minutes after each push).

https://github.com/SonarSource/SonarJS/issues/3888

---------

Co-authored-by: alexander-kamushkin-sonarsource <alexander-kamushkin-sonarsource@users.noreply.github.com>
Co-authored-by: Alexander Kamushkin <alexander.kamushkin@sonarsource.com>
2023-06-05 16:14:23 +02:00
Irina Batinic
48f9a31942
Modify rule S2112: Update rule according to the LayC (#2043) 2023-06-05 15:22:34 +02:00
Gregory Paidis
81ef411b49
S1909: Remove C# since the rule is not applicable (#1965) 2023-06-05 13:14:28 +02:00
Sebastien Marichal
e23289a726
Modify rule S6617: Remove exception code snippet (#2039) 2023-06-05 10:57:04 +02:00
Sebastien Marichal
5bfc5ec56e
Modify rule S6605: Remove exception code snippet (#2038) 2023-06-05 10:47:28 +02:00
Fred Tingaud
bffcad6e53
Modify rule S3973: LaYC Indenting if (#1947)
Co-authored-by: vilchik.elena <elena.vilchik@sonarsource.com>
2023-06-05 08:31:02 +00:00
SonarTech
081bdcffc4 update coverage information 2023-06-03 00:35:49 +00:00
Fred Tingaud
3c08bcb34b
Support inclusions through variables 2023-06-02 17:10:20 +00:00
Sebastien Marichal
ccfd171621
Modify rule S6617: Add Exception section (#2029) 2023-06-02 17:13:01 +02:00
Sebastien Marichal
7bd8e2486d
Modify rule S6605: Add Exception section (#2027) 2023-06-02 17:11:43 +02:00
leonardo-pilastri-sonarsource
29ffd3dca9
SONARJAVA-4488 Modify rule S2142: rewrite in new education format (#2030) 2023-06-02 17:04:44 +02:00
Marco Kaufmann
7569fdb857
Modify rule S1220: Reworked into new educational format (#2001) 2023-06-02 15:54:42 +02:00
Marco Kaufmann
4902e36f28
Modify rule S1217: Reworked into new educational format (#1990) 2023-06-02 15:54:01 +02:00
Marco Kaufmann
5b376da518
Modify rule S1214: Reworked into new educational format (#1967) 2023-06-02 15:53:30 +02:00
github-actions[bot]
b01e74d15d
Modify rule S2133: mark quick fix as "targeted" (#2018) 2023-06-02 12:52:21 +00:00
github-actions[bot]
ccb31e8dc1
Create rule S6640: unsafe code block (C#) (#1945)
[Specification
ticket](https://sonarsource.atlassian.net/browse/APPSEC-729)
[AppSec PoC](https://github.com/SonarSource/appsec-poc/pull/147)
[Implementation
ticket](https://github.com/SonarSource/sonar-dotnet/issues/7290)

[RSPEC
Preview](https://sonarsource.github.io/rspec/#/rspec/S6640/csharp)

---------

Co-authored-by: egon-okerman-sonarsource <egon-okerman-sonarsource@users.noreply.github.com>
Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
2023-06-02 14:28:59 +02:00
Dorian Burihabwa
03be5789fa
SONARJAVA-4488 Modify S2130: Add more examples of non-compliant code (#2015) 2023-06-02 11:46:22 +02:00
Dorian Burihabwa
ed1ecb67b9
SONARJAVA-4488 Modify S2133: Update rule title and formatting (#2017) 2023-06-02 08:28:54 +00:00
Dorian Burihabwa
2f45daf330
SONARJAVA-4488 Modify S2129: Rework Why is this an issue section (#2012) 2023-06-01 17:47:44 +02:00
ADarko22
716bcbf51d
Modify rule s2111 (#2010) 2023-06-01 17:02:30 +02:00
Dorian Burihabwa
d15d215b81
SONARJAVA-4482 Modify S1161: Rework Why is this an issue section (#2008) 2023-06-01 16:39:18 +02:00
github-actions[bot]
eac025f559
Modify rule S1153: mark quick fix as "targeted" (#2002) 2023-06-01 13:53:15 +00:00
ADarko22
6e4bc94336
Modify rule S1201: Update rule according to the LayC (#2006)
Co-authored-by: Irina Batinic <irina.batinic@sonarsource.com>
2023-06-01 15:44:26 +02:00
leonardo-pilastri-sonarsource
8d6bee7398
SONARJAVA-4482 Modify rule S1158: refactor code examples (#2004) 2023-06-01 15:43:53 +02:00
Irina Batinic
1527b398e6
Modify rule S1195: Update rule according to the LayC (#1999)
Co-authored-by: ADarko22 <angelo.buono@sonarsource.com>
2023-06-01 15:26:51 +02:00
leonardo-pilastri-sonarsource
4e278ff18e
SONARJAVA-4482 Modify rule S1157: small refactor (#2000) 2023-06-01 15:06:48 +02:00
leonardo-pilastri-sonarsource
cdb1e86dc2
SONARJAVA-4482 Modify rule S1153: simplify code examples (#1998) 2023-06-01 14:30:56 +02:00
Nils Werner
cc62be2485
Revert "Create rule S6418 (#1821)" (#1995)
This reverts commit c9577afe581cc8010cd8831b423374ace562cf62.
2023-06-01 14:05:46 +02:00
github-actions[bot]
86ef2a4116
Create rule S6639: Memory allocations should not be vulnerable to Denial of Service attacks (APPSEC-730) (#1944) 2023-06-01 13:58:18 +02:00
Irina Batinic
bf85b795d7
Modify rule S1193: Update rule according to the LayC (#1982) 2023-06-01 08:41:29 +02:00
SonarTech
ef5a9de83a update coverage information 2023-06-01 00:39:22 +00:00
Gregory Paidis
3ce3b71511
S6608: Refactor the position of benchmark results (#1989) 2023-05-31 18:21:16 +02:00
leonardo-pilastri-sonarsource
ab064806d2
SONARJAVA-4482 Modify S1130: rewrite Why is this an issue in LaYC form, refactor exceptions (#1987) 2023-05-31 15:20:51 +00:00
Irina Batinic
3f07a5a080
Modify rule S1191: Update rule according to the LayC (#1977) 2023-05-31 16:31:06 +02:00
Balázs Benics
55d88e9e4d
Modify rule S836: mark quickfix as infeasible 2023-05-31 14:26:57 +00:00
Dorian Burihabwa
c74cddea80
Modify rule S1149: Rewrite Why is this an issue, update code samples (#1972) 2023-05-31 16:20:47 +02:00
Irina Batinic
a8b80afeaa
Modify rule S1190: Update rule according to the LayC (#1973) 2023-05-31 16:04:32 +02:00
Irina Batinic
b89d127aa3
Irina/modify rule s1182 (#1968) 2023-05-31 15:35:45 +02:00
Dorian Burihabwa
f183ddb999
Modify rule S1150: Rewrite why is this an issue (#1974) 2023-05-31 15:29:42 +02:00
leonardo-pilastri-sonarsource
f6638d3d81
Modify rule S1113: more context on Why is this an issue and potential impact (#1964) 2023-05-31 15:18:21 +02:00
Yassin Kammoun
9fcd22ce22
Modify rule S4622: Add exception for TypeScript Utility Types (#1969) 2023-05-31 14:03:56 +02:00
Irina Batinic
482aebb9f1
Modify rule S1165: Add and update 'How to fix it' and 'Code examples'… (#1954) 2023-05-30 17:09:03 +02:00
leonardo-pilastri-sonarsource
66c1938cc7
Modify rule S1111: more context to Why is this an issue (#1961) 2023-05-30 16:36:33 +02:00
Irina Batinic
89332698e5
Irina/modify rule s1171 (#1963) 2023-05-30 16:06:53 +02:00
Dorian Burihabwa
8d151af5d2
Modify rule S2755: Add missing space between asciidoc inclusion and header (#1959) 2023-05-30 14:04:31 +02:00
Cristian Ambrosini
9fe3f47203
Modify rule S6613: quickfix covered (#1953) 2023-05-30 13:33:47 +02:00
Christophe Zürn
fb4ba0d61d
Update README and validation to reflect new guidelines (#1951)
Co-authored-by: Elena Vilchik <elena.vilchik@sonarsource.com>
2023-05-30 11:00:48 +02:00
Costin Zaharia
80ff27bc64
Modify rule S6603: Fix typo (#1958) 2023-05-30 09:02:48 +02:00
Fred Tingaud
d972b63b14
Modify rule S3981: Adapt to LaYC 2023-05-29 18:37:58 +02:00
Fred Tingaud
0d2d5a7cab
Modify rule S4487: Adapt to LaYC 2023-05-29 18:35:17 +02:00
SonarTech
2ed1467f10 update coverage information 2023-05-27 00:32:39 +00:00
Pavel Mikula
9e831998bb
Modify rule S3949: Remove CBDE from C#, add VB.NET (#1825)
Fixes https://github.com/SonarSource/sonar-dotnet/issues/7139
2023-05-26 17:17:28 +02:00
Alban Auzeill
c411192237
Modify rule S2384: Revert accidental changes in csharp directory (#1952) 2023-05-26 17:14:58 +02:00
Evgeny Mandrikov
1bcb77ca16
Remove unused gcp_credentials
This was forgotten in e6ca2653ca7145ee71ddd37bac3ff6def7f69e81
2023-05-26 16:14:25 +02:00
tomverin
ead234e825
BUILD-1970 Use Vault 2023-05-26 15:29:37 +02:00
Mary Georgiou
873ada6b76
Modify rule S3237: Migrate to new educational format (#1851) 2023-05-26 09:44:57 +02:00
Mary Georgiou
3e987ce5ac
Modify rule S1048: Migrate to new educational format (#1850) 2023-05-26 09:18:28 +02:00
SonarTech
8ecdfa3735 update coverage information 2023-05-26 00:33:28 +00:00
github-actions[bot]
cecde11a71
Create rule S6636: CPP-3457 unhandled_exception should not be empty
Co-authored-by: Loghin Vlad-Andrei <vlad.loghin@sonarsource.com>
Co-authored-by: tomasz-kaminski-sonarsource <79814193+tomasz-kaminski-sonarsource@users.noreply.github.com>
Co-authored-by: Arseniy Zaostrovnykh <arseniy.zaostrovnykh@sonarsource.com>
2023-05-25 18:42:55 +02:00
ADarko22
7142d28c2a
Modify rule S2384: Update metadata to clarify the rule scope (#1943)
The rule scope is limited only to private mutable mebers
2023-05-25 17:46:59 +02:00
Ilia Kebets
90bb21d09a
Modify rule S3796: add new array methods (#1946) 2023-05-25 16:40:03 +02:00
Fred Tingaud
16f6c0aecf
Inline adoc when include has no additional value (#1940)
Inline adoc files when they are included exactly once.

Also fix language tags because this inlining gives us better information
on what language the code is written in.
2023-05-25 14:18:12 +02:00
Yassin Kammoun
eaf0537490
Revert "Modify rule S4043: Cover the method Array.prototype.splice() … (#1941)
…(#1929)"

This reverts commit 1f6f3691958dd54207a418831452634f3e52bf56.
2023-05-25 11:38:57 +02:00
alexander-kamushkin-sonarsource
6f8bf9cf5a
Modify rule S1528: add quickfix (#1933)
https://github.com/SonarSource/SonarJS/issues/3887
2023-05-24 16:41:02 +02:00
github-actions[bot]
c0c9ea2f0e
Create rule S6617: "Contains" should be used instead of "Any" for simple equality checks (#1808) 2023-05-24 15:19:05 +02:00
github-actions[bot]
e17c8e32e8
Create rule S6602: Find method should be used instead of the FirstOrDefault extension (#1781) 2023-05-24 15:18:10 +02:00
github-actions[bot]
cd617a35c9
Create rule S6610: Prefer "StartsWith" and "EndsWith" overloads that take a "char" instead of "string" (#1794) 2023-05-24 15:16:57 +02:00
github-actions[bot]
df6137bb9c
Create rule S6609: Min/Max properties of Set types should be used instead of the Enumerable extension methods (#1790) 2023-05-24 15:15:55 +02:00
github-actions[bot]
7a6b4a8ec4
Create rule S6608: Prefer indexing instead of "Enumerable" methods on types implementing "IList" (#1787) 2023-05-24 15:14:26 +02:00
github-actions[bot]
ccccd954a8
Create rule S6607: Prefer filtering your collection before sorting it, by using Where before OrderBy (#1786) 2023-05-24 15:13:23 +02:00
github-actions[bot]
b264b60d7d
Create rule S6603: Prefer using the collection-specific TrueForAll method instead of the All extension (#1782) 2023-05-24 15:10:43 +02:00
github-actions[bot]
0ec4bbc964
Create rule S6612: Prefer the lambda parameter instead of capturing in "ConcurrentDictionary" methods (#1801) 2023-05-24 15:07:08 +02:00
Yassin Kammoun
1f6f369195
Modify rule S4043: Cover the method Array.prototype.splice() (#1929) 2023-05-24 14:44:35 +02:00
SonarTech
6edbd00c7c update coverage information 2023-05-24 00:32:55 +00:00
github-actions[bot]
ba0855033f
Create rule S6637: Unnecessary calls to .bind() should not be used (#1917)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6637/javascript)
(updated a few minutes after each push).

Impl: https://github.com/SonarSource/SonarJS/issues/3890

---------

Co-authored-by: alexander-kamushkin-sonarsource <alexander-kamushkin-sonarsource@users.noreply.github.com>
Co-authored-by: Alexander Kamushkin <alexander.kamushkin@sonarsource.com>
2023-05-23 16:25:42 +02:00
github-actions[bot]
3a17c6f769
Create rule S6621: Constexpr literal operators should be consteval.
Co-authored-by: Loghin Vlad-Andrei <vlad.loghin@sonarsource.com>
Co-authored-by: Loïc Joly <loic.joly@sonarsource.com>
Co-authored-by: Arseniy Zaostrovnykh <arseniy.zaostrovnykh@sonarsource.com>
2023-05-23 10:31:20 +02:00
Rudy Regazzoni
c9e6765770
Fix JSON example virtualMachineScaleSets for rule S6388 (#1923) 2023-05-22 10:20:51 +02:00
github-actions[bot]
09b5bd2a99
Modify rule S6382: Add language AzureResourceManager (JSON) (#1920)
Specification ticket:
https://sonarsource.atlassian.net/browse/SONARIAC-762
Implementation ticket:
https://sonarsource.atlassian.net/browse/SONARIAC-814
2023-05-22 10:19:30 +02:00
github-actions[bot]
e0f375b62c
Modify rule S6381: Add language AzureResourceManager (JSON) (#1902)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6381/azureresourcemanager)
(updated a few minutes after each push).

---------

Co-authored-by: rudy-regazzoni-sonarsource <rudy-regazzoni-sonarsource@users.noreply.github.com>
Co-authored-by: Rudy Regazzoni <rudy.regazzoni@sonarsource.com>
2023-05-22 09:01:38 +02:00
SonarTech
922a0bcd35 update coverage information 2023-05-20 00:32:35 +00:00
github-actions[bot]
a2cb22285b
Create rule S3518: Zero should not be a possible denominator (#1772)
Co-authored-by: chrislain-razafimahefa-sonarsource <chrislain-razafimahefa-sonarsource@users.noreply.github.com>
2023-05-19 17:19:56 +02:00
Fred Tingaud
94f3f6fb43
Modify rule S5489: Adapt for LaYC format
Co-authored-by: Amélie Renard <44666826+amelie-renard-sonarsource@users.noreply.github.com>
2023-05-19 14:58:24 +00:00
Yassin Kammoun
ba74911a61
Modify rule S4043: Add quickfix support (#1916) 2023-05-19 13:19:10 +02:00
Arseniy Zaostrovnykh
d206474dd2
Fix the bugs and codesmells reported by SC on the search page 2023-05-19 08:57:30 +02:00
SonarTech
4c4a2d2900 update coverage information 2023-05-18 00:33:12 +00:00
Jamie Anderson
dc3fb1c154
Modify rule S6502: Improve grammar and readability of Docker security hotspot (#1746) 2023-05-17 17:52:43 +02:00
github-actions[bot]
81b58aa934
Modify rule S6364: Add language AzureResourceManager (JSON) (#1912)
[Specification
ticket](https://sonarsource.atlassian.net/browse/SONARIAC-768)
[Implementation
ticket](https://sonarsource.atlassian.net/browse/SONARIAC-810)
[RSPEC
Preview](https://sonarsource.github.io/rspec/#/rspec/S6364/azureresourcemanager)

Bicep PR for S6364: #1913

---------

Co-authored-by: egon-okerman-sonarsource <egon-okerman-sonarsource@users.noreply.github.com>
Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
2023-05-17 17:16:37 +02:00
github-actions[bot]
7be014417f
Create rule S6618: Use string.Create instead of FormattableString (#1819) 2023-05-17 15:57:13 +02:00
github-actions[bot]
561dda05ea
Create rule S6388: add language AzureResourceManager (#1846)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6388/azureresourcemanager)
(updated a few minutes after each push).

---------

Co-authored-by: rudy-regazzoni-sonarsource <rudy-regazzoni-sonarsource@users.noreply.github.com>
Co-authored-by: Rudy Regazzoni <rudy.regazzoni@sonarsource.com>
2023-05-17 15:33:26 +02:00
github-actions[bot]
a4ba829a14
Modify rule S6387: Add language AzureResourceManager (JSON) (#1842)
[Specification
ticket](https://sonarsource.atlassian.net/browse/SONARIAC-760)
[Implementation
ticket](https://sonarsource.atlassian.net/browse/SONARIAC-797)
[RSPEC
Preview](https://sonarsource.github.io/rspec/#/rspec/S6387/azureresourcemanager)

Bicep PR for S6387: #1907

---------

Co-authored-by: egon-okerman-sonarsource <egon-okerman-sonarsource@users.noreply.github.com>
Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
2023-05-17 14:34:51 +02:00
Fred Tingaud
631fe79ea7
Modify rule S5000: LaYC format
Co-authored-by: Amélie Renard <44666826+amelie-renard-sonarsource@users.noreply.github.com>
2023-05-17 11:31:46 +00:00
Egon Okerman
831c79c646
Modify rule S5384: fix broken URL (#1910)
This PR fixes a broken URL in S5384 by replacing it with an Internet
Archive link to the same page.

[Preview](https://sonarsource.github.io/rspec/#/rspec/S5384/apex)
2023-05-17 11:59:41 +02:00
github-actions[bot]
03b8178324
Create rule S6635: Constructors should not return values (#1905)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6635/javascript)
(updated a few minutes after each push).

Impl: https://github.com/SonarSource/SonarJS/issues/3889

---------

Co-authored-by: alexander-kamushkin-sonarsource <alexander-kamushkin-sonarsource@users.noreply.github.com>
Co-authored-by: Alexander Kamushkin <alexander.kamushkin@sonarsource.com>
Co-authored-by: alexander-kamushkin-sonarsource <132259666+alexander-kamushkin-sonarsource@users.noreply.github.com>
Co-authored-by: Yassin Kammoun <52890329+yassin-kammoun-sonarsource@users.noreply.github.com>
2023-05-17 11:26:41 +02:00
SonarTech
30849ed9ee update coverage information 2023-05-17 07:57:59 +00:00
Nils Werner
e9d79d907c
Modify rule S1155: Migrate to new educational format (#1911) 2023-05-16 16:29:20 +02:00
Amélie Renard
8ad820aada
Modify rule S6487: LaYC format 2023-05-16 15:24:58 +02:00
Amélie Renard
07562c260f
Modify rule S6493: LaYC format 2023-05-16 15:19:37 +02:00
Amélie Renard
90c3168d82
Modify rule S3654: LaYC format 2023-05-16 13:07:02 +00:00
Amélie Renard
dd2a2cef71
Modify rule S6191: LaYC format 2023-05-16 11:55:14 +02:00
github-actions[bot]
55f24df0fd
Create rule S6321: Add language AzureResourceManager (and education format) (#1877) 2023-05-16 08:47:16 +02:00
SonarTech
5a4fda4176 update coverage information 2023-05-16 00:32:36 +00:00
Jamie Anderson
737c7da52b
Modify rule S6329: Add language AzureResourceManager (JSON) (#1887)
Research ticket: https://sonarsource.atlassian.net/browse/SONARIAC-754
Implementation ticket:
https://sonarsource.atlassian.net/browse/SONARIAC-790
2023-05-15 16:26:02 +02:00
tomasz-kaminski-sonarsource
402c7a2f33
PR-preveiw: Propery handle situation when there is more than 100 PRs (#1885)
The result is automatically paginated if the number is greater than the
maximum per_page count, which is 100.
2023-05-15 12:55:29 +02:00
Čaba Šagi
67102251e4
Modify rule S6424: Migrate to new educational format (#1867) 2023-05-15 11:58:47 +02:00
Jonas Wielage
02086b65a5
Modify rule S1603: Migration to new educational format (#1900) 2023-05-15 10:44:52 +02:00
Nils Werner
37ad5efc08
Modify rule S1605: Migrate to new educational format (#1899) 2023-05-15 08:40:57 +00:00
Nils Werner
d81f0f9a2c
Modify rule S3360: Migrate to new educational format (#1898) 2023-05-15 10:20:32 +02:00
github-actions[bot]
2821d23673
Create rule S6605: Prefer using the collection-specific Exists method instead of the Any extension (#1784) 2023-05-15 08:37:45 +02:00
SonarTech
ec32946a62 update coverage information 2023-05-13 00:32:40 +00:00
Phil Nash
0a4ae379df
Modify rule S4043: suggest ES2023 Array.toReversed() and Array.toSorted() functions (#1820)
Also updates `var` to `const`.
2023-05-12 17:46:16 +02:00
Nils Werner
7e0a90f53b
Modify rule S2041: Change rule status to superseded (#1897) 2023-05-12 17:01:46 +02:00
Jonas Wielage
0180b0b7db
Modify rule S2014: Migration to new educational format (#1896) 2023-05-12 16:22:15 +02:00
Jonas Wielage
7874aa96d3
Modify rule S2010: Migration to new educational format (#1892) 2023-05-12 16:21:47 +02:00
Nils Werner
d04b24e24c
Modify rule S1600: Migrate to new educational format (#1895) 2023-05-12 14:18:55 +00:00
Jonas Wielage
151c28b7ec
Modify rule S6344: Update for educational format (#1847) 2023-05-12 16:17:18 +02:00
Jonas Wielage
bba6bd6b68
Modify rule S2004: Migration to new educational format (#1891) 2023-05-12 16:12:19 +02:00
Nils Werner
02793852ec
Modify rule S1765: Migrate to new educational format (#1890) 2023-05-12 14:10:27 +00:00
Nils Werner
1940882ea6
Modify rule S1793: Migrate to new educational format (#1893) 2023-05-12 14:04:03 +00:00
Nils Werner
b514c48ce6
Modify rule S1766: Migrate to new educational format (#1894) 2023-05-12 16:00:27 +02:00
Jonas Wielage
8d41301200
Modify rule S5911: Update for educational format (#1853) 2023-05-12 15:38:45 +02:00
Nils Werner
51a08b0315
Modify rule S1781: Migrate to new educational format (#1883) 2023-05-12 12:57:59 +00:00
Nils Werner
55828d9294
Modify rule S1757: Migrate to new educational format (#1884) 2023-05-12 14:56:03 +02:00
Nils Werner
a7f7895886
Modify rule S1784: Migrate to new educational format (#1881) 2023-05-12 14:55:47 +02:00
alexander-kamushkin-sonarsource
46887cfbd6
Modify rule S2430: add to default profile, change quickfix to infeasible (#1888)
The rule was not part of the default quality profile (Sonar way), so we
want to fix that
2023-05-12 14:21:34 +02:00
github-actions[bot]
76ddb05622
Create rule S6632: Custom tasks and plugins should be placed in "buildSrc" directory (#1876)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6632/kotlin)
(updated a few minutes after each push).

---------

Co-authored-by: kaufco <kaufco@users.noreply.github.com>
Co-authored-by: Marco Kaufmann <marco.kaufmann@sonarsource.com>
2023-05-12 10:40:36 +02:00
github-actions[bot]
ec43b050c0
Create rule S6629: Dependencies should be grouped by destination (#1871)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6629/kotlin)
(updated a few minutes after each push).

---------

Co-authored-by: kaufco <kaufco@users.noreply.github.com>
Co-authored-by: Marco Kaufmann <marco.kaufmann@sonarsource.com>
2023-05-12 10:18:26 +02:00
github-actions[bot]
7e324674ba
Create rule S6385: add language AzureResourceManager (#1829)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6385/azureresourcemanager)
(updated a few minutes after each push).

---------

Co-authored-by: rudy-regazzoni-sonarsource <rudy-regazzoni-sonarsource@users.noreply.github.com>
Co-authored-by: Rudy Regazzoni <rudy.regazzoni@sonarsource.com>
2023-05-12 09:02:37 +02:00
SonarTech
ec10d1befa update coverage information 2023-05-12 00:32:57 +00:00
github-actions[bot]
2b78b7dab7
Create rule S6628: Logic in configuration phase should be minimized (#1870) 2023-05-11 17:24:02 +02:00
Egon Okerman
42f4fbdd5a
Create rule S4423: add language AzureResourceManager (#1835)
[Specification
ticket](https://sonarsource.atlassian.net/browse/SONARIAC-755)
[Implementation
ticket](https://sonarsource.atlassian.net/browse/SONARIAC-781)
[RSPEC
Preview](https://sonarsource.github.io/rspec/#/rspec/S4423/azureresourcemanager)

Bicep PR for S4423: #1879
2023-05-11 17:14:01 +02:00
github-actions[bot]
40d09d212e
Create rule S6627: Users should not use internal APIs (#1869) 2023-05-11 17:09:33 +02:00
github-actions[bot]
9e91faac04
Create rule S6383 SONARIAC-761 Disable RBAC on AKS (#1852) 2023-05-11 17:03:30 +02:00
Sebastien Vermeille
5437c58656
BUILD-2950 Use GITHUB_OUTPUT instead of deprecated set-output 2023-05-11 16:51:10 +02:00
Nils Werner
11dc4e5cc4
Modify rule S4833: Migrate to new educational format (#1878) 2023-05-11 14:38:19 +00:00
github-actions[bot]
f41344ba60
SONARIAC-758 Rule S6413 add ARM Defining a short log retention duration is security-sensitive (#1840) 2023-05-11 16:30:02 +02:00
Jonas Wielage
fa95fad4ae
Modify rule S6393: Update for educational format (#1844) 2023-05-11 16:02:32 +02:00
Jonas Wielage
a9c36c03aa
Modify rule S1998: Migration to new educational format (#1862) 2023-05-11 14:40:53 +02:00
Jonas Wielage
1c2ba0b121
Modify rule S1599: Migration to new educational format (#1860) 2023-05-11 14:07:39 +02:00
Jonas Wielage
476c13df5b
Modify rule S2003: Migration to new educational format (#1863) 2023-05-11 14:02:13 +02:00
Jonas Wielage
64890207e6
Modify rule S1808: Migration to new educational format (#1861) 2023-05-11 13:34:40 +02:00
github-actions[bot]
f39791c9f8
Create rule S6626: Tasks should define "group" and "description" (#1868) 2023-05-11 12:10:24 +02:00
Nils Werner
8e84025baf
Modify rule S1779: Remove rule from Sonar Way (#1874) 2023-05-11 10:09:01 +00:00
Jonas Wielage
c61ffbd764
Modify rule S6347: Update for educational format (#1849) 2023-05-11 12:03:27 +02:00
Jonas Wielage
26571359de
Modify rule S4824: Update for educational format (#1855) 2023-05-11 12:02:15 +02:00
github-actions[bot]
df2733c2c1
Create rule S6613: LinkedList First and Last properties should be used instead of the First() and Last() extension methods (#1803) 2023-05-11 11:01:13 +02:00
Nils Werner
d2059fa717
Modify rule S1780: Migrate to new educational format (#1854) 2023-05-11 10:40:24 +02:00
Jonas Wielage
98a4f7ad7e
Modify rule S6349: Update for educational format (#1845) 2023-05-11 10:26:42 +02:00
SonarTech
7327b31905 update coverage information 2023-05-11 00:33:58 +00:00
github-actions[bot]
3fb0db77cd
Create rule S5332: Add language AzureResourceManager (#1839) 2023-05-10 14:49:07 +02:00
SonarTech
0001c20d63 update coverage information 2023-05-10 00:32:48 +00:00
Phil Nash
086875d63a
Modify rule S2871: Add Array.toSorted() (#1831)
This goes with https://github.com/SonarSource/SonarJS/pull/3873.
`toSorted()` is a new, copying method for arrays that otherwise behaves
the same as `sort()`.
2023-05-09 10:36:56 +02:00
SonarTech
8ccdec8e7f update coverage information 2023-05-09 00:35:45 +00:00
leonardo-pilastri-sonarsource
a03f566e95
Add missing tags on java specific rule metadata (#1841) 2023-05-08 16:50:41 +02:00
maksim-grebeniuk-sonarsource
ef97908adb
SONARPY-1304 update QF metadata for S6326 python (#1668) 2023-05-08 15:31:57 +02:00
maksim-grebeniuk-sonarsource
d9e2e3b59a
SONARPY-1306 update QF metadata for S6397 python (#1670) 2023-05-08 15:31:42 +02:00
Ilia Kebets
67ca1c1381
Modify rule S6544: remove mention of error handling, which we will not cover anymore (#1834) 2023-05-08 11:34:47 +02:00
Rudy Regazzoni
2f521d1490
Modify LANG_TO_SOURCE map to have azureresourcemanager to bicep (#1838) 2023-05-08 10:53:52 +02:00
SonarTech
2ec45ea5f2 update coverage information 2023-05-06 00:33:20 +00:00
github-actions[bot]
db358b2857
Create rule S6619: Null checks should be useful (#1823) 2023-05-05 17:50:20 +02:00
github-actions[bot]
087f783799
Create rule S6611: "Map" values should be accessed safely (#1799) 2023-05-05 17:47:15 +02:00
github-actions[bot]
dd7a490ffe
Create rule S6516: Functional interface implementations should use lambda expressions (#1627) 2023-05-05 17:44:59 +02:00
Victor
fe961619f9 migrate rule descriptions to new education format 2023-05-05 16:29:04 +02:00
Christophe Zurn
62f01f07fe Update documentation, disallow standard rule format, add allowed sections in 'Why is it an issue?' 2023-05-05 16:29:04 +02:00
Christophe Zürn
0195cdabdd Update docs/description.adoc
Co-authored-by: Victor <106590915+victor-diez-sonarsource@users.noreply.github.com>
2023-05-05 16:29:04 +02:00
Christophe Zurn
daea3fea27 RULEAPI-785 RSPEC: education format "How to fix it" section should be optional 2023-05-05 16:29:04 +02:00
leonardo-pilastri-sonarsource
8e459cca14
Modify SE engine rules to add "symbolic-execution" tag (#1832) 2023-05-05 14:46:46 +02:00
github-actions[bot]
b0742c3e3c
Create rule S6560: The "safe" flag should be set to "False" when serializing non-dictionary objects in Django JSON-encoded responses. (#1710) 2023-05-05 13:55:31 +02:00
github-actions[bot]
7f890693f2
Create rule S6553: "null=True": should not be used on string-based fields in Django models. (#1700) 2023-05-05 13:55:03 +02:00
Loghin Vlad-Andrei
f7d6054b33
Modify rule S1912: CPP-4028 Take namespace into consideration 2023-05-05 13:31:02 +02:00
github-actions[bot]
2d8ac8b990
Create rule S6556: "locals()" should not be passed to a Django "render()" function (#1704) 2023-05-05 11:16:01 +02:00
github-actions[bot]
16956d8f02
Create rule S6552: Django signal handler functions should have the '@receiver' decorator on top of all other decorators (#1699) 2023-05-05 11:13:03 +02:00
Rudy Regazzoni
d6a6439e46
Add bicep and json for language support in code example (#1830) 2023-05-05 11:12:16 +02:00
github-actions[bot]
2d05428763
Create rule S6554: Django models should define a "__str__" method (#1701) 2023-05-05 11:11:48 +02:00
SonarTech
8a133038fa update coverage information 2023-05-05 00:32:25 +00:00
github-actions[bot]
3481875247
Create rule S6615: Variables assigned values should be read (#1805) 2023-05-04 16:42:22 +02:00
github-actions[bot]
dd8eded953
Create rule S6515: Singleton pattern should use object declarations or expressions (#1626) 2023-05-04 16:41:14 +02:00
github-actions[bot]
09e88a583f
Create rule S6558: Implicit "it" lambda parameter should not be declared (#1707) 2023-05-04 16:39:11 +02:00
Jamie Anderson
bce2ff34ca
Modify rule S6506: Add examples for wget (#1777) 2023-05-04 16:09:43 +02:00
Rudy Regazzoni
31f3a23b45
Add language AzureResourceManager as a supported language (#1827) 2023-05-04 11:55:34 +02:00
gaetan-ferry-sonarsource
87ae044584
Modify rule S6437: Change the issue message for Docker and secret generation (APPSEC-628) (#1760) 2023-05-04 11:07:33 +02:00
github-actions[bot]
5abc6e40d0
Create rule S6531: Redundant type casts and type checks should be removed (#1649) 2023-05-03 14:05:01 +02:00
github-actions[bot]
ca5b7a7293
Create rule S6530: Type casts and type checks that can never succeed should be removed (#1648) 2023-05-03 14:04:35 +02:00
github-actions[bot]
67801dc934
Create rule S6529: Expression should be simplified with "isEmpty", "isNotEmpty" or "isNullOrEmpty" (#1647) 2023-05-03 14:02:20 +02:00
github-actions[bot]
df3fc5dcb6
Create rule S6559: Fields of a Django ModelFom should be defined explicitly (#1709) 2023-05-03 09:47:55 +02:00
SonarTech
8327d20fbd update coverage information 2023-05-03 00:33:07 +00:00
github-actions[bot]
bee7d2fd70
Create rule S6532: Check for preconditions should be simplified (#1650) 2023-05-02 11:46:54 +02:00
SonarTech
c28072f8a4 update coverage information 2023-05-02 00:32:34 +00:00
Dorian Burihabwa
3cb704d321
Modify rule S2589: Remove CERT tag (#1791)
Remove CERT tag as no link to the CERT is present in the documentation.
2023-05-01 11:53:19 +02:00
Dorian Burihabwa
57a4ef2302
Modify rule S2326: Remove CERT tag (#1789) 2023-05-01 11:52:50 +02:00
SonarTech
a1c8fa83db update coverage information 2023-04-29 00:34:14 +00:00
Ilia Kebets
d7824d65a3
Modify rule S6544: Fix code example (#1824) 2023-04-28 08:19:33 +02:00
SonarTech
ad714e2436 update coverage information 2023-04-28 00:32:46 +00:00
github-actions[bot]
c9577afe58
Create rule S6418 (#1821) 2023-04-27 13:11:55 +02:00
Costin Zaharia
5352da5b03
Add Benchmarks as a supported section on Resources (#1812) 2023-04-27 10:07:31 +02:00
Rudy Regazzoni
417657ca60
Deprecate rule S2041 (#1806) 2023-04-27 08:34:13 +02:00
SonarTech
3756ee87ee update coverage information 2023-04-27 00:34:36 +00:00
github-actions[bot]
db66f80f07
Create rule S6547: Environment variables should not be defined from untrusted input (APPSEC-541) (#1685)
Implementation ticket:
[SONARSEC-3702](https://sonarsource.atlassian.net/browse/SONARSEC-3702)
Specification ticket:
[APPSEC-541](https://sonarsource.atlassian.net/browse/APPSEC-541)
2023-04-26 17:32:09 +02:00
Ilia Kebets
4e2eb2893b
Modify rule S6544: Make pseudo header visible and fix list (#1818) 2023-04-26 16:14:27 +02:00
Ilia Kebets
c7667b44e7
Modify rule S6578: Add resources link to enums (#1814) 2023-04-26 16:09:59 +02:00
Ilia Kebets
2ab73ffe61
Modify rule S6590: Add code example and documentation header (#1815) 2023-04-26 16:09:14 +02:00
Ilia Kebets
5a9f5bdc23
Modify rule S6594: Add documentation header (#1817) 2023-04-26 15:27:25 +02:00
Ilia Kebets
d3facc8fbd
Modify rule S6583: Add documentation header (#1816) 2023-04-26 15:27:12 +02:00
Ilia Kebets
9587d52d64
Modify rule S6572: Add documentation link and minor fix (#1813) 2023-04-26 14:39:01 +02:00
Ilia Kebets
728b24db9a
Modify rule S2094: improve JS rule definition (#1811) 2023-04-26 14:18:27 +02:00
Yassin Kammoun
49093964ab
Revert "Create rule S6601: Boolean expressions should be safe (#1779)" (#1810)
This reverts commit ed2c86e1ebec9992b982388a54423b52d90c07f0.
2023-04-26 13:33:21 +02:00
github-actions[bot]
23b26aace1
Create rule S6571: Type constituents of unions and intersections should not be redundant (#1724) 2023-04-26 13:32:02 +02:00
Yassin Kammoun
96cb1b9e61
Modify rule S6598: Add missing sections (#1809) 2023-04-26 11:54:16 +02:00
SonarTech
c0507824b3 update coverage information 2023-04-26 00:32:48 +00:00
Dorian Burihabwa
f043a8517b
Modify rule S5659: Remove CERT tag (#1792)
Remove CERT tag as no link to the CERT is present in the documentation.
2023-04-25 11:27:07 +02:00
SonarTech
fa3bd270a8 update coverage information 2023-04-25 00:32:45 +00:00
Marcin Stachniuk
6cc55d9048
Small fixes in Docker rules (#1802)
Add RUN prefix in case of shell execution
Improve code highlighting
2023-04-24 16:51:51 +02:00
Costin Zaharia
c56491a97c
S1155, S3216, S3260, S3353: Add the performance tag (#1800) 2023-04-24 15:28:55 +02:00
Yassin Kammoun
930ac77273
Modify rule S6606: Mention TSConfig's strictNullChecks requirement (#1796) 2023-04-24 12:34:16 +02:00
Loghin Vlad-Andrei
b78e301311
Modify rule S986: CPP-4211 Align the RSPEC title with the implementation 2023-04-24 12:02:11 +02:00
Dorian Burihabwa
21c580e232 Modify rule S923: Add link to CERT 2023-04-24 11:25:43 +02:00
github-actions[bot]
9272228a78
Create rule S6606: Nullish coalescing should be preferred (#1785) 2023-04-24 09:54:22 +02:00
Ilia Kebets
c5bd90a73d
Modify rule S6544: include cases where promises are not resolved or error handled (#1780) 2023-04-24 09:28:46 +02:00
Loghin Vlad-Andrei
e029d7209d
Modify rule S5506: Fix typo in issue message 2023-04-24 06:54:46 +00:00
SonarTech
207c3a92bb update coverage information 2023-04-22 00:33:15 +00:00
Dorian Burihabwa
a7a94ab076
Modify rule S5693: Add syntax highlighting and remove Java specific tags (#1793) 2023-04-21 16:06:41 +02:00
github-actions[bot]
ed2c86e1eb
Create rule S6601: Boolean expressions should be safe (#1779) 2023-04-21 14:23:08 +02:00
Gregory Paidis
46f04a6ab4
Modify rule S2492: Fix the noncompliant example (PLSQL-S2492) (#1775) 2023-04-20 11:11:05 +02:00
github-actions[bot]
87cd5a8d6c
Create rule S6600: Unnecessary parentheses should not be used for constructs (#1778) 2023-04-20 11:01:53 +02:00
SonarTech
c7580cf996 update coverage information 2023-04-20 00:32:33 +00:00
Jamie Anderson
97c07f604f
Modify rule S6506: Add examples for not following redirects (#1776)
https://sonarsource.atlassian.net/browse/APPSEC-631
2023-04-19 18:03:27 +02:00
github-actions[bot]
ce2ab0a1fd
Create rule S6598: Function types should be preferred (#1773) 2023-04-19 15:54:03 +02:00
SonarTech
68eb989562 update coverage information 2023-04-19 00:33:26 +00:00
Jonas Wielage
ab04f2c385
Modify rule S6579: Fix typos in the description (#1771) 2023-04-18 09:47:39 +02:00
SonarTech
0aecb93463 update coverage information 2023-04-18 00:33:38 +00:00
Jonas Wielage
d1bd6bd254
Modify rule S6589: Change documentation to appear as list (#1770) 2023-04-17 17:34:53 +02:00
Jonas Wielage
fd2162b6a4
Modify rule S6597: Change documentation to appear as list (#1769) 2023-04-17 17:34:36 +02:00
Jonas Wielage
9a7417da76
Modify rule S6587: Change documentation to appear as list (#1768) 2023-04-17 17:34:24 +02:00
Jonas Wielage
6319544d09
Modify rule S6586: Change documentation to appear as list (#1767) 2023-04-17 17:34:14 +02:00
Jonas Wielage
5a897725ce
Modify rule S6581: Change documentation to appear as list (#1766) 2023-04-17 17:34:01 +02:00
Jonas Wielage
7aaef1a33d
Modify rule S6574: Change documentation to appear as list (#1765) 2023-04-17 17:33:19 +02:00
github-actions[bot]
d3a4dfa346
Create rule S6596: Specific version tag for image should be used (#1758) 2023-04-17 15:24:17 +00:00
Loïc Joly
c704f7b287
Modify rule S2198
Make MISRA-related information CFamily-specific
2023-04-17 17:22:40 +02:00
github-actions[bot]
22df9503af
Create rule S6589: Dockefiler should only have one ENTRYPOINT and CMD instruction (#1749)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6589/docker)
(updated a few minutes after each push).

---------

Co-authored-by: rudy-regazzoni-sonarsource <rudy-regazzoni-sonarsource@users.noreply.github.com>
Co-authored-by: Rudy Regazzoni <rudy.regazzoni@sonarsource.com>
Co-authored-by: Rudy Regazzoni <110470341+rudy-regazzoni-sonarsource@users.noreply.github.com>
Co-authored-by: Marcin Stachniuk <marcin.stachniuk@sonarsource.com>
2023-04-17 16:38:27 +02:00
github-actions[bot]
ae6f80d464
Create rule S6597 (#1763) 2023-04-17 15:05:40 +02:00
github-actions[bot]
028322219b
Create rule S6594: "RegExp.exec()" should be preferred over "String.match()" (#1756) 2023-04-17 14:42:26 +02:00
Jonas Wielage
eb82379207
Modify rule S6570: Change description to avoid duplication (#1762) 2023-04-17 09:56:28 +02:00
Zsolt Kolbay
40cc42f678
Modify rule S3900: Add method invocation to code sample (#1761) 2023-04-17 08:53:39 +02:00
SonarTech
7fc40f3f5f update coverage information 2023-04-15 00:34:39 +00:00
Tim Pohlmann
29db74c881
Modify rule S3655: Streamlining for C# and VB (#1759) 2023-04-14 17:26:06 +02:00
github-actions[bot]
27a9cea076
Create rule S6595: Package update should not be executed without installing it (#1757) 2023-04-14 16:52:13 +02:00
github-actions[bot]
a112923f78
Create rule S6584: Consent flag should be set to avoid manual input (#1741) 2023-04-14 13:20:49 +00:00
github-actions[bot]
2c63a763f4
Create rule S6590: "as const" assertions should be preferred (#1752) 2023-04-14 11:01:59 +02:00
github-actions[bot]
2613cb49bf
Create rule S6587: Cache should not be set for package installation (#1745) 2023-04-14 10:44:18 +02:00
SonarTech
4bfa87f545 update coverage information 2023-04-14 00:32:13 +00:00
github-actions[bot]
5604c05ad1
Create rule S6573: Expanded filenames should not become options (#1727) 2023-04-13 16:48:27 +02:00
github-actions[bot]
622fbdd335
Create rule S6586: Deprecated instruction should not be used (#1744) 2023-04-13 16:47:34 +02:00
github-actions[bot]
42bbb37078
Create rule S6548: The Singleton design pattern should be used with care (#1687) 2023-04-13 15:30:59 +02:00
gaetan-ferry-sonarsource
9221f4d7af
Modify rule S2612: Change the message for docker related permission issues. (APPSEC-621) (#1748) 2023-04-13 15:28:47 +02:00
github-actions[bot]
88273ac629
Update rule S6544: cover additionnal cases from typescript-eslint's no-misused-promises (#1733) 2023-04-13 15:20:59 +02:00
github-actions[bot]
f8e8478f48
Create rule S6541: Methods should not perform too many operations (aka Brain Method) (#1664) 2023-04-13 15:08:31 +02:00
github-actions[bot]
83826d9517
Create rule S6539: Classes should not depend on an excessive number of classes (aka Monster Class) (#1662) 2023-04-13 13:03:12 +00:00
hendrik-buchwald-sonarsource
a0df103104
Modify rule S6500: Adjust title and wording (#1742) 2023-04-13 14:12:47 +02:00
maksim-grebeniuk-sonarsource
b45dbd3461
S1481 update rule description for python (#1750) 2023-04-13 14:00:03 +02:00
Pavel Mikula
dddd92990d
Rule S3900: Add VB.NET (#1731) 2023-04-13 11:50:57 +02:00
Zsolt Kolbay
527b2bc9ca
S3900: Update rule description and message (#1597)
https://github.com/SonarSource/sonar-dotnet/issues/2643
2023-04-13 10:48:47 +02:00
github-actions[bot]
2b3d53a261
Create rule S6583: Enum members should not mix value types (#1740) 2023-04-13 09:43:48 +02:00
SonarTech
3b654a4f7f update coverage information 2023-04-13 00:33:22 +00:00
Antonio Aversa
ed187f9276
Modify rule S3655: Include cast scenario for C# (#1620) 2023-04-12 15:29:42 +00:00
github-actions[bot]
1f696a7f8e
Create rule S6579: Access variable which is not available in current scope (#1736) 2023-04-12 16:06:40 +02:00
github-actions[bot]
fd416e656c
Create rule S6582: Optional chaining should be preferred (#1739) 2023-04-12 14:41:25 +02:00
github-actions[bot]
16799d98c6
Create rule S6581: Environment variables should not be unset on a different layer than they were set (#1738) 2023-04-12 14:06:28 +02:00
github-actions[bot]
a6657295d3
Create rule S6574: A space before the equal sign in key-value pair may lead to unintended behavior (#1728)
SONARIAC-711 New Rule: KeyValuePair space before equal sign may lead to unintended behavior
2023-04-12 10:54:32 +02:00
github-actions[bot]
2e32375c36
Create rule S6578: Enum values should be unique (#1735) 2023-04-12 10:30:29 +02:00
SonarTech
831fd7485b update coverage information 2023-04-12 00:32:43 +00:00
github-actions[bot]
eeae809ef4
Create rule S6572: Enum member values should be either all initialized or none (#1726) 2023-04-11 10:52:15 +02:00
SonarTech
b0e2bc72aa update coverage information 2023-04-07 00:32:43 +00:00
Johann Beleites
a601d88871
Create rule S1206[kotlin]: "equals(Any?)" and "hashCode()" should be overridden in pairs (#340) 2023-04-06 17:49:25 +02:00
github-actions[bot]
1436cf13b1
Create rule S6518: Element access should use indexed access operators (#1629) 2023-04-06 17:29:17 +02:00
Nils Werner
7d9da451e0 Modify rule S6506: Fix rule keys in metadata 2023-04-06 17:18:12 +02:00
github-actions[bot]
f81ebe483a
Create rule S6514(Kotlin): Delegator pattern should use "by" clause (#1625) 2023-04-06 17:17:59 +02:00
Johann Beleites
14aca5bb4d
Create rule S2175[kotlin]: Inappropriate collection calls should not be made (#349) 2023-04-06 17:02:56 +02:00
Sebastien Marichal
6b59dbe8c7
Modify rule S4070: Fix improper usage of FlagsAttribute in the examples (#1732) 2023-04-06 16:18:18 +02:00
github-actions[bot]
58d9678c48
Modify rule S2094: Add JavaScript language (#1720) 2023-04-06 15:58:14 +02:00
github-actions[bot]
0aedc4e91d
Create rule S6512: Getter and setter pattern should use property getters and setters (#1623) 2023-04-06 15:10:18 +02:00
github-actions[bot]
5187507da1
Create rule S6570: Detect missing double quote to prevent globbing and word splitting (#1723) 2023-04-06 13:20:26 +02:00
SonarTech
58a9537b23 update coverage information 2023-04-06 00:33:27 +00:00
github-actions[bot]
f5ae5e4917
Create rule S6549: Accessing files should not lead to filesystem oracle attacks (APPSEC-540) (#1695) 2023-04-05 16:08:56 +02:00
Gyula Sallai
2ff969da29
Modify rule S6545: fix incorrect examples in the "How to fix it" section (#1725) 2023-04-05 12:41:26 +02:00
github-actions[bot]
7e0f521088
Create rule S6569: Unnecessary type constraints should be removed (#1722) 2023-04-05 12:12:05 +02:00
github-actions[bot]
beda41bbe7
Create rule S6546: Union type expressions should be preferred over "typing.Union" in type hints (#1679) 2023-04-05 11:14:23 +02:00
github-actions[bot]
6b66a300bf
Create rule S6545: Built-in generic types should be preferred over the typing module in type hints (#1678) 2023-04-05 11:13:53 +02:00
github-actions[bot]
d61fecb5d1
Create rule S6568: Non-null assertions should not be used misleadingly (#1719) 2023-04-05 10:39:51 +02:00
SonarTech
2d5903582e update coverage information 2023-04-05 00:32:05 +00:00
github-actions[bot]
35747ace22
Create rule S6564: Redundant type aliases should not be used (#1714) 2023-04-04 15:25:16 +02:00
Ilia Kebets
bed9ace665
Add diff view properties to new rule templates (#1721) 2023-04-04 15:14:28 +02:00
github-actions[bot]
0b2c1cc0af
Create rule S6565: Prefer the return type this in fluent interfaces (#1715)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6565/javascript)
(updated a few minutes after each push).

---------

Co-authored-by: francoismora <francois.mora@sonarsource.com>
2023-04-04 14:57:15 +02:00
SonarTech
d9df6213fb update coverage information 2023-04-04 00:34:35 +00:00
Nils Werner
99d3509fad Modify rule S2260: Add Kubernetes 2023-04-03 16:33:25 +02:00
Amélie Renard
ac08b8cbcd
Modify rule S5950: Fix typos + rewording (CPP-4142) 2023-04-03 06:17:44 +00:00
SonarTech
3ce688af41 update coverage information 2023-04-01 00:33:45 +00:00
github-actions[bot]
5e93466918
Create rule S6551: Objects and classes converted or coerced to strings should define a "toString()" method (#1697) 2023-03-31 15:59:44 +02:00
github-actions[bot]
56cfbf0f69
Create rule S6543: Type hints of generic types should have a type parameter (#1666) 2023-03-31 11:50:44 +02:00
github-actions[bot]
c3220440a3
Create rule S6557: Ends of strings should be checked with "startsWith()" and "endsWith()" (#1706) 2023-03-31 09:35:29 +02:00
SonarTech
8786d4c5f2 update coverage information 2023-03-31 00:34:11 +00:00
francoismora
8bb89ae066
Update S2871 (no-alphabetical-sort): Cover cases from require-array-sort-compare (#1705) 2023-03-30 17:02:13 +02:00
github-actions[bot]
d46a837630
Create rule S6542: Any should not be used as a type hint (#1665) 2023-03-30 14:35:12 +02:00
Yassin Kammoun
ff13bc5f4f
Modify rule S131: Ignore exhaustive switches on unions and enums (#1702) 2023-03-30 12:33:09 +02:00
github-actions[bot]
172b7c5844
Create rule S6550: All enum members should be literals (#1696)
Co-authored-by: Yassin Kammoun <52890329+yassin-kammoun-sonarsource@users.noreply.github.com>
2023-03-30 09:17:02 +02:00
SonarTech
ee4fc2bcb3 update coverage information 2023-03-30 00:32:26 +00:00
Jamie Anderson
2d52a31a16
Modify rules: Remove deprecated sans-top25-* tags (#1694) 2023-03-29 15:31:59 +02:00
Yassin Kammoun
26025b52dc
Modify rule S3402: Consider the addition assignment operator (#1698) 2023-03-29 15:18:35 +02:00
Guillaume Dequenne
c418f84d92
SONARPY-1312 Rule S5882: Adapt metadata for Python (#1680) 2023-03-29 14:00:31 +02:00
maksim-grebeniuk-sonarsource
62276681d3
Modify rule S5860: Add description for Python (SONARPY-1302) (#1682) 2023-03-29 10:41:03 +02:00
SonarTech
e2609afe87 update coverage information 2023-03-29 00:33:57 +00:00
github-actions[bot]
08265c75b9
Create rule S6517: Single function interfaces should be functional interfaces (#1628) 2023-03-28 14:59:17 +02:00
github-actions[bot]
a749cd3e83
Create rule S6508: "Unit" should be used instead of "Void" (#1611) 2023-03-28 14:56:40 +02:00
github-actions[bot]
781680132d
Create rule S6511: "when" statements should be used instead of chained "if" statements (#1622) 2023-03-28 14:38:35 +02:00
Jamie Anderson
664d3c5a0f
Modify rules: Remove deprecated owasp-mX tags (#1692) 2023-03-28 11:14:25 +02:00
Guillaume Dequenne
76fc77cdf6
Update rule S5637: Remove full stop in rule title (#1693) 2023-03-28 09:46:20 +02:00
SonarTech
525d64d78f update coverage information 2023-03-28 00:33:49 +00:00
github-actions[bot]
b5ec694d70
Create rule S6537: Octal escape sequences should not be used in regular expressions (#1659) 2023-03-27 18:18:03 +02:00
SonarTech
f0841f2661 update coverage information 2023-03-25 00:34:05 +00:00
github-actions[bot]
b2fedfdff4
Create rule S6540: Function parameters should have type hints (#1663) 2023-03-24 15:29:17 +01:00
github-actions[bot]
4370a17609
Create rule S6538: Function returns should have type hints (#1660) 2023-03-24 15:12:48 +01:00
Irina Batinic
e0e1415b75
Modify rule S5831: Fix typo in noncompliant code example (#1671) 2023-03-24 14:22:14 +01:00
SonarTech
2d06884b7f update coverage information 2023-03-24 00:33:44 +00:00
Yassin Kammoun
7560bd2fd6
Modify rule S4326: Add quickfix support (#1683) 2023-03-23 16:52:16 +01:00
Yassin Kammoun
62827351a5
Modify rule S4023: Exclude extensions of TypeScript utility types (#1684) 2023-03-23 16:51:14 +01:00
Alban Auzeill
0e7aa1ad27
Modify rule S6519(Kotlin): Support != in addition to == (#1677) 2023-03-23 15:30:36 +01:00
maksim-grebeniuk-sonarsource
3b204e1b65
SONARPY-1303 add metadata for Python for S6001 (#1672) 2023-03-23 14:57:03 +01:00
Pavel Mikula
74a89000f1
Modify rule S2222: Update description (#1681) 2023-03-23 13:27:17 +01:00
SonarTech
9ed996ce08 update coverage information 2023-03-23 00:32:18 +00:00
github-actions[bot]
983d8c3b1b
Create rule S3655 for VB: Empty nullable value should not be accessed (#1657) 2023-03-22 16:11:32 +01:00
github-actions[bot]
85e172ddc6
Create rule S6544: Promise executor functions should not be async (#1676)
Co-authored-by: Ilia Kebets <ilia.kebets@sonarsource.com>
2023-03-22 16:03:39 +01:00
Pavel Mikula
a8c0d761a8
S5856: Add C# and VB.NET (#1528) 2023-03-22 15:25:58 +01:00
maksim-grebeniuk-sonarsource
51b0652467
SONARPY-1301 rule S5994 update for python (#1673) 2023-03-22 12:12:32 +01:00
maksim-grebeniuk-sonarsource
1ff32d8639
SONARPY-1305 update QF metadata for S6395 python (#1669) 2023-03-22 11:52:57 +01:00
SonarTech
7896c7948d update coverage information 2023-03-22 00:32:37 +00:00
github-actions[bot]
f70e19219b
Create rule S2486: Exceptions should not be ignored (#1667)
Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
2023-03-21 15:08:24 +01:00
Arseniy Zaostrovnykh
71af260baf
Fix Build&Deploy action: update package list before installing libkrb5-dev 2023-03-21 13:52:55 +01:00
github-actions[bot]
e2e03e117d
Create rule S6519(Kotlin): Structural equality tests should use "==" (#1630) 2023-03-21 10:20:03 +01:00
github-actions[bot]
c5f9eb2b0c
Create rule S6510(Kotlin): "return" statements should be lifted before "if" or "when" statement (#1621) 2023-03-20 17:53:20 +01:00
SonarTech
527ce26082 update coverage information 2023-03-18 00:33:25 +00:00
github-actions[bot]
e30c84f1b4
Create rule S6535: Unnecessary character escapes should be removed (#1654)
Co-authored-by: Ilia Kebets <104737176+ilia-kebets-sonarsource@users.noreply.github.com>
2023-03-16 16:58:09 +01:00
github-actions[bot]
f9ddabacec
Create rule S6534: Numbers should not lose precision (#1653) 2023-03-16 15:58:02 +01:00
Jamie Anderson
2d8892defb
Modify rules: Remove "owasp-aX" tag (#1655) 2023-03-16 15:25:13 +01:00
SonarTech
1fffca0125 update coverage information 2023-03-16 00:32:39 +00:00
francoismora
95ee6ed929
Modify rule S4275: Update code samples (#1643)
* Modify rule S4275: Update code samples

* Apply changes suggested in PR review
2023-03-15 15:00:05 +01:00
github-actions[bot]
fa4959af23
Create rule S6523: No optional chaining where undefined is forbidden (#1636) 2023-03-15 14:37:37 +01:00
Martin Strecker
41bb545c92
metadata.adoc: add link to the Coding rule guidelines on SonarQube (#1641) 2023-03-15 13:13:35 +00:00
Martin Strecker
bd9bcae0a9
Update description.adoc (#1642) 2023-03-15 13:34:47 +01:00
hendrik-buchwald-sonarsource
ed1c833d10
Modify rule S3649: Fix typo in code samples (#1651) 2023-03-15 09:55:33 +00:00
SonarTech
d6fa3677da update coverage information 2023-03-15 00:32:20 +00:00
github-actions[bot]
3f7eb85729
Create rule S6522: No assigning values to variables used for imports (#1635) 2023-03-14 16:37:47 +01:00
github-actions[bot]
4fc10589a4
Create rule S6513: ExcludeFromCodeCoverage attributes should include a justification (#1624) 2023-03-14 15:55:28 +01:00
Yassin Kammoun
318e14a62b
Modify rule S1862: Consider identical cases of switch statements (#1634) 2023-03-14 13:27:46 +00:00
SonarTech
de800766cd update coverage information 2023-03-11 00:33:08 +00:00
Ilia Kebets
d7103794f2
Update "create new rule" action template to education format (#1632) 2023-03-10 16:17:05 +01:00
SonarTech
1232fbc992 update coverage information 2023-03-10 00:32:52 +00:00
github-actions[bot]
ee8cb13a08
Create rule S6509: Extra boolean casts should be removed (#1619)
Co-authored-by: Ilia Kebets <104737176+ilia-kebets-sonarsource@users.noreply.github.com>
2023-03-09 15:02:22 +01:00
SonarTech
01cd9a1365 update coverage information 2023-03-09 00:32:29 +00:00
Yassin Kammoun
68e3b7ba0d
Modify rule S1534: Extend the scope to all kinds of class members (#1618) 2023-03-08 15:15:12 +01:00
Yassin Kammoun
37ff7726fb
Modify rule S2639: Restrict the scope to empty classes only for JavaScript (#1613) 2023-03-08 15:13:49 +01:00
Christophe Zürn
62a99b38c5
Update education rule description documentation with more details (#1610) 2023-03-08 14:27:59 +01:00
francoismora
2d6701452b
Modify rule S1472: Add tagged template literals (#1616)
* Modify rule S1472: Add tagged template literals

* Copy general descrition to javascript description to add the template literal use-case

* Update rules/S1472/javascript/rule.adoc

Co-authored-by: Yassin Kammoun <52890329+yassin-kammoun-sonarsource@users.noreply.github.com>
2023-03-08 14:11:18 +01:00
francoismora
2e6f5a0d6f
Modify rule S2137: Change text to include JavaScript standard builtins (#1615)
* Modify rule S2137: Change text to include JavaScript standard built-in objects

* Apply changes suggested in PR review
2023-03-08 14:09:34 +01:00
Ilia Kebets
c1740a163f
Modify rule S1481: move line under other header (#1617) 2023-03-08 11:44:23 +01:00
Elena Vilchik
fee0463e41
Modify rule S1481: provide education description (#1590) 2023-03-08 09:49:12 +01:00
SonarTech
60849623d2 update coverage information 2023-03-08 00:32:26 +00:00
Ilia Kebets
c80d7f3b4c
Add checks for education format (#1607) 2023-03-07 17:16:47 +01:00
maksim-grebeniuk-sonarsource
1f58b86e53
SONARPY-1296 Update quickfix metadata for Python rules (#1599) 2023-03-07 13:14:19 +01:00
Nils Werner
c5663979d8 Modify Rule S5042: Remove invalid reference for PHP 2023-03-07 10:37:54 +01:00
SonarTech
21c463b6ed update coverage information 2023-03-07 00:34:01 +00:00
Loris S
a51217c6d9
Modify rule S6470(Docker): Improve message (#1495) 2023-03-06 13:17:03 +01:00
github-actions[bot]
2cf782e3e6
Create rule S6507 with "lock on local variable" check moved from S2445 (#1608) 2023-03-06 13:14:48 +01:00
github-actions[bot]
f8d3f43fdf
Create rule S6437(Python): Credentials should not be hard-coded (#1609) 2023-03-03 17:34:43 +01:00
Christophe Zürn
45e7d3b4e0
Frontend deployment ignores the 'common' utility folder in rules directories (#1606) 2023-03-03 13:49:24 +01:00
SonarTech
4becf0c8bb update coverage information 2023-03-03 02:08:16 +00:00
gaetan-ferry-sonarsource
ee0a3dc8f0 Modify rule S6384: Change text to the progressive education format (APPSEC-424) (#1535) 2023-03-02 19:03:03 +01:00
Egon Okerman
d34e1f86dd Modify rule S5696: Change text to progressive education format (APPSEC-423) (#1529)
* Move metadata

* Move message

* Add text

* Clarify text

* Reword method to property in context of innerHTML
2023-03-02 19:03:03 +01:00
gaetan-ferry-sonarsource
b71fb2b114 Modify rule S6399: Switch text to progressive education format (APPSEC-425) (#1522) 2023-03-02 19:03:03 +01:00
gaetan-ferry-sonarsource
12ecb6aa63 Modify rule S6390: Change text to the progressive education format (APPSEC-427) (#1527) 2023-03-02 19:03:03 +01:00
Egon Okerman
1f4aed2865 Modify S6105: Move to progressive education format (APPSEC-422) (#1519)
* Move metadata to root

* Define S6105 for JS/TS

* Move message.adoc

* Fix incorrect autolink

* Fix standards header

* Add "noncompliant" to code sample

* Change header styling

* Apply suggestions from code review

Co-authored-by: gaetan-ferry-sonarsource <112399173+gaetan-ferry-sonarsource@users.noreply.github.com>

* Update rules/S6105/common/fix/how-does-this-work.adoc

Co-authored-by: gaetan-ferry-sonarsource <112399173+gaetan-ferry-sonarsource@users.noreply.github.com>

* Update rules/S6105/common/pitfalls/starts-with.adoc

Co-authored-by: gaetan-ferry-sonarsource <112399173+gaetan-ferry-sonarsource@users.noreply.github.com>

* Remove reference to javascript pseudo-protocol

* Update rules/S6105/common/fix/how-does-this-work.adoc

Co-authored-by: gaetan-ferry-sonarsource <112399173+gaetan-ferry-sonarsource@users.noreply.github.com>

* Rewrite startsWith text

* Change framework name

Co-authored-by: gaetan-ferry-sonarsource <112399173+gaetan-ferry-sonarsource@users.noreply.github.com>
2023-03-02 19:03:03 +01:00
gaetan-ferry-sonarsource
3481cef5d1 Modify rule S6398: Switch text to progressive education format (APPSEC-426) (#1507) 2023-03-02 19:03:03 +01:00
Loris S
8a800594ae Modify S3649(JS): Add Education Framework (#1500) 2023-03-02 19:03:03 +01:00
gaetan-ferry-sonarsource
85950f5296 Modify rule S5144: Change the education framework code example sink (APPSEC-310) (#1451) 2023-03-02 19:03:03 +01:00
gaetan-ferry-sonarsource
885bf0e968 Modify Multiple Rules: Add consistency accross S2076, S5334 and S5883 rules impact descriptions (APPSEC-340) (#1457) 2023-03-02 19:03:03 +01:00
pedro-oliveira-sonarsource
7a277cf1b4 Modify rule S2078: Change text to the education framework format [Python][APPSEC-269] (#1393) 2023-03-02 19:03:03 +01:00
pedro-oliveira-sonarsource
0ba8e669ea Modify rule S5147: Change text to the education framework format [Python][APPSEC-232] (#1389) 2023-03-02 19:03:03 +01:00
pedro-oliveira-sonarsource
2888e2ab67 Noncompliant annotation 2023-03-02 19:03:03 +01:00
Egon Okerman
18e9a4a7e4 [APPSEC-292] Modify rule S6287 (PHP): Change text to the education framework format (#1425)
* Add PHP files

* Add Symfony

* Add Laravel

* Add Core PHP

* Fix Laravel example

* Update Core PHP to use a function

* Fix Symfony imports

* Remove "taintable data" from common explanation
2023-03-02 19:03:03 +01:00
pedro-oliveira-sonarsource
170796da1e [APPSEC-287] Modify rule S5144 (JS/TS): Change text to the education framework format (#1423) 2023-03-02 19:03:03 +01:00
Pierre-Loup
79996e1a83 Modify rule S5144[PHP]: Change text to the education framework format (APPSEC-286) (#1424) 2023-03-02 19:03:03 +01:00
Egon Okerman
d17da6f6a6 [APPSEC-293] Modify rule S6287 (JS/TS): Change text to the education framework format (#1421)
* Add JS

* Add noncompliant comment

* Apply review changes
2023-03-02 19:03:03 +01:00
pedro-oliveira-sonarsource
e2224a008d [APPSEC-290] Modify rule S2631 (JavaScript): Change text to the education framework format (#1419) 2023-03-02 19:03:03 +01:00
Egon Okerman
78d0d063b9 [APPSEC-291] Modify rule S6287 (Python): Change text to the education framework format (#1415)
* Add Python rule

* Apply review changes
2023-03-02 19:03:03 +01:00
pedro-oliveira-sonarsource
473987e2d6 Modify rule S2631: Change text to the education framework format [Python][APPSEC-288] (#1406) 2023-03-02 19:03:03 +01:00
pedro-oliveira-sonarsource
c59fe93882 [APPSEC-289] Modify rule S2631 (PHP): Change text to the education framework format (#1408) 2023-03-02 19:03:03 +01:00
Pierre-Loup
afce946dbd Modify rule S5144[Python]: Change text to the education framework format (APPSEC-285) (#1401) 2023-03-02 19:03:03 +01:00
Egon Okerman
e60621dc83 [APPSEC-272] Modify rule S2091 (PHP): Change text to the education framework format (#1403)
* Add PHP education

* Fix metadata being empty

* Apply review suggestions

* Remove line breaks for spell check
2023-03-02 19:03:03 +01:00
Egon Okerman
f22ae4c3e2 [APPSEC-271] Modify rule S2091: Change text to the education framework format [Python] (#1396)
* Add rule information

* Add lxml

* Add Python stdlib

* Change the XPath queries such that they're correct

* Remove nonexistant highlighting reference

* Add lxml as allowed framework

* Split up parameterized queries and validation

* Fix typo

* Make changes in Java docs

* Fix .NET text

* Update rules/S2091/python/how-to-fix-it/python.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Update common texts

* Update code samples

* Fix typo

* Use correct syntax for lxml

* Apply code review fixes

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>
2023-03-02 19:03:03 +01:00
pedro-oliveira-sonarsource
5873b5bf33 Modify rule S2078: Change text to the education framework format [PHP][APPSEC-270] (#1400) 2023-03-02 18:48:41 +01:00
pedro-oliveira-sonarsource
042a03691e Modify rule S2078: Change text to the education framework format [Python][APPSEC-269] (#1393) 2023-03-02 18:48:41 +01:00
Roberto Orlandi
976fccee08 Fix format errors due to missing empty line in the .adoc files (#1404) 2023-03-02 18:48:41 +01:00
pedro-oliveira-sonarsource
a95e5405ad Modify rule S5147: Change text to the education framework format [Python][APPSEC-232] (#1389) 2023-03-02 18:48:41 +01:00
gaetan-ferry-sonarsource
5abd603068 Modify rule S5334: Change text to the education framework format [Python][APPSEC-234] (#1386) 2023-03-02 18:48:41 +01:00
gaetan-ferry-sonarsource
690b4554a8 Modify rule S5334: Change text to the education framework format [Javascript][APPSEC-235] (#1387) 2023-03-02 18:48:41 +01:00
Pierre-Loup
98874d53a2 Modify rule S5147[JS/TS]: Change text to the education framework format (APPSEC-233) (#1384) 2023-03-02 18:48:41 +01:00
gaetan-ferry-sonarsource
09ece5ca57 Modify rule S5334: Changing text to the education framework format[PHP][APPSEC-236] (#1383) 2023-03-02 18:48:41 +01:00
Loris S
b6306210cd Modify Rule S5334(Csharp): Fix sample typo (#1385) 2023-03-02 18:48:41 +01:00
gaetan-ferry-sonarsource
c8d2a90efb Modify rule S5135: Change text to the education framework format [PHP][APPSEC-230] (#1373) 2023-03-02 18:48:41 +01:00
Loris S
62788cdfcc Modify rule S2083(mult. lang): Add absolute path joining pitfall (APPSEC-213) (#1370) 2023-03-02 18:48:41 +01:00
pedro-oliveira-sonarsource
b4dbf2964d Modify rule S6096(JavaScript): Update text to the Education Framework structure (APPSEC-231) (#1372) 2023-03-02 18:48:41 +01:00
pedro-oliveira-sonarsource
be227b944f Modify rule S5145(Python): Update text to the Education Framework structure (APPSEC-226) (#1366) 2023-03-02 18:48:41 +01:00
pedro-oliveira-sonarsource
4a2a798f2e Modify rule S5145(PHP): Update text to the Education Framework structure (APPSEC-227) (#1367) 2023-03-02 18:48:41 +01:00
gaetan-ferry-sonarsource
ad240854e1 Modify rule S5135: Change text to the education framework format [Python][APPSEC-228] (#1365) 2023-03-02 18:48:41 +01:00
pedro-oliveira-sonarsource
dd2d2707ce Modify rule S5144: Fix Pitfall url asciidoc issue (#1368) 2023-03-02 18:22:24 +01:00
gaetan-ferry-sonarsource
b64c10e0bf Modify rule S2076: Change text to education framework structure (Py,JS,PHP) [APPSEC-186] (#1359) 2023-03-02 18:22:24 +01:00
pedro-oliveira-sonarsource
b48fbbc971 Modify S5146(multiple languages): Update to the education framework (APPSEC-185) (#1330) 2023-03-02 18:22:24 +01:00
Loris S
02af23c1b3 Modify S3649(multiple languages): Update to the education framework (APPSEC-184) (#1336) 2023-03-02 18:22:24 +01:00
Loris S
f8e412528e Modify S2083(multiple languages): Update to the education framework (APPSEC-188) (#1328) 2023-03-02 18:22:24 +01:00
gaetan-ferry-sonarsource
f1b8e3c152 Modify rule S5883: Update text to education framework structure(PHP,JS,Python)[APPSEC-187] (#1342) 2023-03-02 18:22:24 +01:00
Loris S
e52b9671b2 Education text Fix (#1338) 2023-03-02 18:22:24 +01:00
Christophe Zürn
c3d1c0251d S2078: remove extra empty line of code example 2023-03-02 18:22:24 +01:00
Loris S
c774044661 Modify Education Rules S514{4,6}: Add trailing slash pitfall (#1262) 2023-03-02 18:22:24 +01:00
Loris S
eae1d4bcfc Modify S6287: Severity and Title (APPSEC-123) (#1241) 2023-03-02 18:22:24 +01:00
pedro-oliveira-sonarsource
0340dd7ba1 [Education] Modify Rules: Fix OR operand character escape (#1259) 2023-03-02 18:22:24 +01:00
Loris S
8815e23ae8 Modify All Current Education Rules: Support intuitive view (#1256) 2023-03-02 18:22:24 +01:00
Loris S
16919a7fc1 Modify S2083&S6096(Education): Add Partial Path Traversal to pitfalls (#1243) 2023-03-02 18:22:24 +01:00
Loris S
cff3fc8804 Modify S5131(Multiple Languages): Add CSPs to 'Going The Extra Mile' (#1239) 2023-03-02 18:22:24 +01:00
Loris S
1253c0a013 Modify Multiple Rules(Education): Standardization of impact files (#1240) 2023-03-02 18:22:24 +01:00
Pierre-Loup
16aec5dd3e Modify rule S6096: Educational content (Java) (APPSEC-72) (#1191) 2023-03-02 18:22:24 +01:00
Loris S
4b485669fd Modify S2631(multiple languages): Update to the education framework (APPSEC-124) (#1215) 2023-03-02 18:22:24 +01:00
Loris S
44572efe96 Modify S2078(multiple languages): Update to the education framework (APPSEC-115) (#1209) 2023-03-02 18:22:24 +01:00
pedro-oliveira-sonarsource
162c3285fd [APPSEC-116] Modify rule S6287: Educational content (#1216) 2023-03-02 18:22:24 +01:00
Loris S
0d4a284cc0 Modify S2091(multiple languages): Update to the education framework (APPSEC-97) (#1197) 2023-03-02 18:22:24 +01:00
Loris S
cec8459153 Modify S5147(multiple languages): Update to the education framework (APPSEC-89) (#1192) 2023-03-02 18:22:24 +01:00
pedro-oliveira-sonarsource
2dfe91882c [APPSEC-90] Modify rule S5144: Educational content (#1205) 2023-03-02 18:22:24 +01:00
Loris S
7eaf8f08a8 Modify Rule S5135(Java): Education Framework (APPSEC-77) (#1185) 2023-03-02 18:22:24 +01:00
Loris S
1a8f4237ba Modify rule S5135[C#]: Update to Education Framework (APPSEC-76) (#1187) 2023-03-02 18:22:24 +01:00
Loris S
80fcd6ed49 Modify Rule S5135(common text): Education Framework (APPSEC-75) (#1171) 2023-03-02 18:22:24 +01:00
pedro-oliveira-sonarsource
b0563bd2cd [APPSEC-85] Modify rule S5145: Educational content (Java) (#1175) 2023-03-02 18:07:54 +01:00
pedro-oliveira-sonarsource
8b68e09d85 Noncompliant annotation 2023-03-02 18:07:54 +01:00
pedro-oliveira-sonarsource
a03ca14509 Logger declaration 2023-03-02 18:07:54 +01:00
pedro-oliveira-sonarsource
74d74b4bf7 Tab removal. 2023-03-02 18:07:54 +01:00
pedro-oliveira-sonarsource
a477460475 Add dotnet fix 2023-03-02 18:07:54 +01:00
pedro-oliveira-sonarsource
e035331d84 [APPSEC-73] Modify rule S6096: Educational content (C#) (#1190) 2023-03-02 18:07:54 +01:00
pedro-oliveira-sonarsource
51140da69a [APPSEC-84] Modify rule S5145: Educational content (Common) (#1173) 2023-03-02 18:07:54 +01:00
hendrik-buchwald-sonarsource
c7c5f04b1d [APPSEC-67] Modify rule S5334: Educational content (#1176) 2023-03-02 18:07:54 +01:00
Pierre-Loup
efe07e7e0d Modify Rule S6096: Common education content (APPSEC-71) (#1172) 2023-03-02 18:07:54 +01:00
hendrik-buchwald-sonarsource
ef80aeb0bf [Education] Modify rule S5131: Improve language (#1177) 2023-03-02 18:07:54 +01:00
Loris S
00023d6be0 Modify S2076(education): Add common text (#1169) 2023-03-02 18:07:54 +01:00
Loris S
9f062ab1d4 Modify Multiple Rules: Fix Asciidoc errors (#1152) 2023-03-02 18:07:54 +01:00
pedro-oliveira-sonarsource
67b3e1ce20 [APPSEC-56] Modify rule S2076: Educational content (Java) (#1150) 2023-03-02 18:07:54 +01:00
hendrik-buchwald-sonarsource
1333dcf98f [APPSEC-60] Modify rule S5883: Educational content (Commons) (#1149) 2023-03-02 18:07:54 +01:00
Pierre-Loup
511dd0d576 Modify Rule S5883(Java): Education Framework (APPSEC-62) (#1147) 2023-03-02 18:07:54 +01:00
Loris S
12290b0e5e Modify Rule S5883(C#): Education Framework (APPSEC-61) (#1143) 2023-03-02 18:07:54 +01:00
Loris S
312f87d35b Modify Rule S2076(common text): Education Framework (APPSEC-54) (#1120) 2023-03-02 18:07:54 +01:00
pedro-oliveira-sonarsource
88a429b10f [APPSEC-59] Modify rule S5146: Educational content (Java) (#1146) 2023-03-02 18:07:54 +01:00
hendrik-buchwald-sonarsource
135d4e8869 [APPSEC-58] Modify rule S5146: Educational content (C#) (#1138) 2023-03-02 18:07:54 +01:00
pedro-oliveira-sonarsource
babbfeceb6 [APPSEC-57] Modify rule S5146: Educational content (Commons) (#1132) 2023-03-02 18:07:54 +01:00
Pierre-Loup
5ae60ed305 Modify rule S2076[C#]: Educational content - How to fix it section (APPSEC-55) (#1133) 2023-03-02 18:07:54 +01:00
Pierre-Loup
d8170502f1 Revert "[APPSEC-55] Add C# code examples to S2076"
This reverts commit 5bae1a301c166179e128db294d3982b7707b10c1.
2023-03-02 18:07:54 +01:00
Pierre-Loup
2203ba0b7a [APPSEC-55] Add C# code examples to S2076 2023-03-02 18:07:54 +01:00
Loris S
770ad9756d Modify Rule S3649: Education Framework (APPSEC-46 & APPSEC-47) (#1109) 2023-03-02 18:07:54 +01:00
Pierre-Loup
dbca6ec12c Modify rule S2083[C#]: Educational content (APPSEC-49) (#1121) 2023-03-02 18:07:54 +01:00
Pierre-Loup
9d944403b4 [APPSEC-48] Modify rule S2083[java]: Educational content (#1112) 2023-03-02 18:07:54 +01:00
Christophe Zürn
47ba59f3b5 RULEAPI-766 Add documentation and integrity checks for new education rule descriptions format (#1098) 2023-03-02 18:07:54 +01:00
Christophe Zurn
7c36d2a006 SONARSEC-3113 Update code example layouts of S5131 (XSS) rule description 2023-03-02 18:07:54 +01:00
Christophe Zurn
bb64555a09 SONARSEC-3109 Merge all resources together 2023-03-02 18:07:54 +01:00
Christophe Zurn
e7cf1c030e SONARSEC-3109 S5131 XSS rule should contain context-specific patches 2023-03-02 18:07:54 +01:00
Christophe Zürn
e8563c6351 [Education] Update code example layout of S5131 (XSS) (#1018)
* Update code examples of data encoding to use more vertical space

* Compliant / Noncompliant code examples are one after the other
2023-03-02 18:07:54 +01:00
Christophe Zürn
8ee3e9e8c7 Remove headers for empty section (#1017) 2023-03-02 18:07:54 +01:00
Roberto Orlandi
47d95f6802 SONARSEC-3035 Adapt images of educational rule descriptions (#1010) 2023-03-02 18:07:54 +01:00
Roberto Orlandi
dc83422098 SONARSEC-3040 Update checks and documentation to fit new rule format (#1004) 2023-03-02 18:07:54 +01:00
Roberto Orlandi
83eefb94b5 Education s5131 one file per language (#1002) 2023-03-02 18:07:54 +01:00
github-actions[bot]
84283b7844
Create rule S6437: Credentials should not be hard-coded (#1600) 2023-03-02 15:55:56 +00:00
github-actions[bot]
f78b300dd0
Modify rule S1135: Add Docker (#1593) 2023-03-02 11:52:43 +01:00
Zsolt Kolbay
bb5403ec63
S3398: Add C# description (#1572)
* Add C# rule description

* Fix links
2023-03-02 11:08:03 +01:00
github-actions[bot]
91e637c8a5
Modify rule S1135: Add Kubernetes (#1594) 2023-03-02 10:52:51 +01:00
github-actions[bot]
67eb1dd694
Create rule S1135 (#1595) 2023-03-02 10:28:26 +01:00
github-actions[bot]
f91a518256
Create rule S1135 (#1596) 2023-03-02 10:14:39 +01:00
SonarTech
acb82bf594 update coverage information 2023-03-02 00:34:30 +00:00
Antonio Aversa
863b7861f6
Modify rule S2445: Add C# description and samples (#1570) 2023-03-01 11:52:37 +01:00
Antonio Aversa
d8afb223d8
Modify rule S4545: Add VB.NET specifics, Move C# specifics (#1571) 2023-03-01 10:42:00 +01:00
SonarTech
678acecae5 update coverage information 2023-03-01 00:34:53 +00:00
Roberto Orlandi
89912dadaa
Rule S3052 does not apply to PHP (#1592) 2023-02-28 16:02:12 +01:00
Ilia Kebets
4cdfa1ab5d
AsciiDoc Dos & Don'ts 2023-02-28 10:34:49 +00:00
Johann Beleites
aea8ddfc1f
Create rule S3958[kotlin]: Intermediate Sequence functions should not be left unused (#356) 2023-02-28 10:24:51 +01:00
SonarTech
bbcb90d4c4 update coverage information 2023-02-28 00:34:09 +00:00
Zsolt Kolbay
d68bafc932
Improve S2094: Add exceptions (#1575)
* Update VB description

* Add Exceptions section
2023-02-27 19:02:57 +01:00
github-actions[bot]
117fd26cf1
Create rule S6506: Allowing downgrades to a clear-text protocol is security-sensitive (APPSEC-489) (#1588)
* Create rule S6506

* Add rule docs

* Fix typo

* Apply suggestions from code review

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Fix URL in example being referenced as a legit URL

---------

Co-authored-by: egon-okerman-sonarsource <egon-okerman-sonarsource@users.noreply.github.com>
Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>
2023-02-27 16:07:40 +01:00
Mary Georgiou
ad7ac5ba98
Modify rule S131(PLSQL): Change title to fit implementation (#1589)
* update title to match the implementation

* Find replacement for link with broken certificate
2023-02-27 15:16:49 +01:00
Martin Strecker
04c9cc2c4f
Modify rule S2970: Improve description of supported test library functions (#1518) 2023-02-27 12:54:03 +01:00
SonarTech
9ee31b9a49 update coverage information 2023-02-24 00:33:02 +00:00
Egon Okerman
38b0750ac6
Modify rule S4423: Add Docker (APPSEC-460) (#1585)
* Add Docker rule

* Remove irrelevant metadata tag

* Update message
2023-02-23 14:27:11 +01:00
pedro-oliveira-sonarsource
f238f486d8
Modify rule S6437: Add Docker (APPSEC-458) (#1586) 2023-02-23 09:43:48 +01:00
SonarTech
c716dba1e4 update coverage information 2023-02-23 00:33:04 +00:00
github-actions[bot]
c58572f626
Create rule S6505: Allowing shell scripts execution during package installation is security-sensitive (APPSEC-483) (#1584) 2023-02-22 16:09:29 +00:00
Mary Georgiou
ffd8720ca0
Modify rule S2223: Update description to include also the case of global state (#1583) 2023-02-22 15:19:19 +01:00
github-actions[bot]
13174db6cd
Create rule S6504: Having executables not owned by root is security-sensitive (#1581) 2023-02-22 14:35:19 +01:00
SonarTech
28cb47c898 update coverage information 2023-02-22 13:16:55 +00:00
Mary Georgiou
369a47bb71
Modify rule S1444(C#): Add info on decision to not implement this rule for C# (#1578) 2023-02-21 16:34:52 +00:00
SonarTech
9b5475af23 update coverage information 2023-02-21 00:32:51 +00:00
Loïc Joly
af33fce1b9
Modify rule S6191 CPP-3876 Update the RSPEC with un-deprecation of these uses in C++23
And make the description more beginner-friendly.
2023-02-20 17:50:29 +00:00
SonarTech
5acb8a684a update coverage information 2023-02-18 00:33:42 +00:00
Marco Borgeaud
dbc0a4e295
Modify rule S6181: Fix typos (CPP-4112) (#1577) 2023-02-17 12:35:10 +01:00
Arseniy Zaostrovnykh
4a54cf1b62
Modify S4433: fix the broken link (#1582) 2023-02-17 12:15:56 +01:00
maksim-grebeniuk-sonarsource
2ab90fb789
Modify rule S5890: Add a message in case of None value assignment (SONARPY-790) (#1573) 2023-02-17 08:55:51 +01:00
github-actions[bot]
a44203e93d
Modify rule S6437: Add Docker (APPSEC-462) (#1574) 2023-02-17 08:33:20 +01:00
Andrea Guarino
cbd4a1bc85
Remove link in french (#1580) 2023-02-16 16:43:19 +01:00
Antonio Aversa
6a81c5e8bb
Add missing semicolon (#1579) 2023-02-16 13:23:33 +00:00
Gregory Paidis
972f4dc5fb
S2198: Add C# (#1534)
* Change description and add some comments

* Update the description of what the C# implementation actually does for now

* Fix a typo

* Small formatting change on S2198

* Small formatting changes on S2198

* Small formatting change on S2198
2023-02-15 15:00:19 +01:00
github-actions[bot]
a8b5a83add
Create rule S3063: Add vbnet language (#1524)
* Add vbnet to rule S3063

* Add adoc for CS/VB

* Add exceptions

* Add invocations exceptions

* Addressed PR comments

* Semplifications, better wording on the descriptions

* Small description fix

* Add indexer and .Length expression exceptions and fix description

* sub-list to inline

* Fix typos

---------

Co-authored-by: cristian-ambrosini-sonarsource <cristian-ambrosini-sonarsource@users.noreply.github.com>
Co-authored-by: Cristian Ambrosini <cristian.ambrosini@sonarsource.com>
2023-02-15 13:07:42 +01:00
SonarTech
eb541d7fbe update coverage information 2023-02-15 00:33:19 +00:00
github-actions[bot]
42c626fe79
Modify rule S4830: Add Docker (APPSEC-457) (#1566)
* Add docker to rule S4830

* Update Docker rule

* Fix compilation error

* Fix compilation error but for real this time

---------

Co-authored-by: egon-okerman-sonarsource <egon-okerman-sonarsource@users.noreply.github.com>
Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
2023-02-14 15:21:16 +01:00
github-actions[bot]
202faf5086
Modify rule S4790: Add Docker (APPSEC-459) (#1562)
* Add docker to rule S4790

* Add rule

* Add "sensitive" comment

* Fix compilation error

---------

Co-authored-by: egon-okerman-sonarsource <egon-okerman-sonarsource@users.noreply.github.com>
Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
2023-02-14 14:29:19 +01:00
pedro-oliveira-sonarsource
1b5fe36f3f
Modify Rule S6472: Add Docker (APPSEC-277) (#1569) 2023-02-14 10:43:24 +01:00
SonarTech
8a5ec882f1 update coverage information 2023-02-11 00:32:09 +00:00
pedro-oliveira-sonarsource
86c7a71144
Modify Rule S2612: Add Docker (APPSEC-440) (#1560) 2023-02-10 09:35:50 +01:00
Alban Auzeill
2d779725a5
Modify rule S3400: Clarify the exceptions (#1568) 2023-02-10 09:05:57 +01:00
SonarTech
74e8cdb98f update coverage information 2023-02-10 00:32:59 +00:00
nicolas-gauthier-sonarsource
8e81480093
Modify rule S5496: Fix typo and update message (#1567) 2023-02-09 17:31:36 +01:00
Zsolt Kolbay
c3a629adcb
Add rule description files for C# and VB.NET (#1561) 2023-02-09 14:20:43 +01:00
github-actions[bot]
0c88ad07a4
Create rule S6497[Docker]: Using a container image based on its digest is security-sensitive (APPSEC-443) (#1515) 2023-02-09 12:16:47 +01:00
Yassin Kammoun
8656528c00
Modify rule S4423: Update issue message (#1558) 2023-02-09 11:34:23 +01:00
Zsolt Kolbay
5c16542452
Update rule message and VB.NET sample code (#1565) 2023-02-09 08:37:20 +01:00
pedro-oliveira-sonarsource
457586d53c
Modify Rule S6431: Add Docker (APPSEC-437) (#1540) 2023-02-08 15:58:26 +01:00
github-actions[bot]
7fecd63449
Create rule S4507: add Docker support (APPSEC-441) (#1542) 2023-02-07 15:04:20 +01:00
dorian-burihabwa-sonarsource
048101e017 Modify rule S1066: mark quick fix as "covered" 2023-02-07 14:55:09 +01:00
Irina Batinic
bdc2dd32c6
Modify S1656: Update quickfix status (SONARJAVA-3959) (#1551) 2023-02-07 11:46:20 +01:00
chrislain-razafimahefa-sonarsource
d96dbe3076
Modify S1217: update 'quickfix' status (SONARJAVA-4311) (#1543) 2023-02-07 11:40:59 +01:00
github-actions[bot]
4bfb86149f
Create rule S6500: Installing unnecessary packages is security-sensitive (APPSEC-439) (#1525) 2023-02-07 11:30:23 +01:00
Johann Beleites
54d84f9260
SONARJAVA-4403 Add exception to S3553 (#1536) 2023-02-07 10:49:54 +01:00
github-actions[bot]
50e655601b
Create rule S6502: Disabling builder sandboxes is security-sensitive (#1547) 2023-02-07 10:32:16 +01:00
dorian-burihabwa-sonarsource
058a07036c Modify rule S1450: mark quick fix as "partial" 2023-02-07 10:17:21 +01:00
github-actions[bot]
376687dcba
Modify rule S2147: mark quick fix as "covered" (#1554) 2023-02-07 09:56:39 +01:00
github-actions[bot]
a49526ac39
Modify rule S2129: mark quick fix as "covered" (#1555) 2023-02-07 09:56:27 +01:00
github-actions[bot]
dbe76ea560
Modify rule S2225: mark quick fix as "covered" (#1556) 2023-02-07 09:56:13 +01:00
github-actions[bot]
3566bef2fd
Modify rule S1132: mark quick fix as "covered" (#1557) 2023-02-07 09:55:57 +01:00
Loïc Joly
62a82ec8f0
Modify rule S1699 Rewrite the RSPEC to use C++ vocabulary 2023-02-06 18:57:08 +01:00
Irina Batinic
d206ef3f61
Modify S2116: Update quickfix status (SONARJAVA-4319) (#1550) 2023-02-06 18:05:31 +01:00
Zsolt Kolbay
cc46195759
Fix HTML link (#1549)
Fix links to include rule description
2023-02-06 16:01:57 +01:00
Zsolt Kolbay
f3480df4d9
S2166: Add C# and VB.NET (#1548)
* Add rule description for C#

* Add rule description for VB.NET

---------

Co-authored-by: Andrei Epure <38876598+andrei-epure-sonarsource@users.noreply.github.com>
2023-02-06 14:10:38 +01:00
Johann Beleites
ff343a582b
SONARJAVA-4327 Improve rule description, add Java exception (#1533) 2023-02-06 14:00:13 +01:00
chrislain-razafimahefa-sonarsource
d0ea589f48
Modify S4719: update quickfix status (SONARJAVA-3938) (#1544) 2023-02-06 10:57:28 +01:00
Yassin Kammoun
7a72747c45
Modify rule S5860: Improve documentation (#1546) 2023-02-06 09:50:52 +01:00
dependabot[bot]
6076843bb3
[dependabot] Bump http-cache-semantics from 4.1.0 to 4.1.1 in /frontend (#1545)
Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/kornelski/http-cache-semantics/releases)
- [Commits](https://github.com/kornelski/http-cache-semantics/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-06 09:33:57 +01:00
SonarTech
65d0f0535f update coverage information 2023-02-04 00:31:58 +00:00
chrislain-razafimahefa-sonarsource
5e82eb9498 Update 'quickfix' field 2023-02-03 17:09:22 +01:00
maksim-grebeniuk-sonarsource
ac64e4de11
Modify rule S1110: Add custom python message (SONARPY-1259) (#1530) 2023-02-03 13:54:07 +01:00
Marco Kaufmann
7caaf5e4ce
Modify rule S3400: Methods should not return constants (#1531)
Co-authored-by: Alban Auzeill <alban.auzeill@sonarsource.com>
2023-02-03 09:23:55 +01:00
SonarTech
6876b0a3db update coverage information 2023-02-03 00:33:51 +00:00
Martin Strecker
699c61538d
Add vbnet and csharp samples (#1512) 2023-02-02 13:56:32 +01:00
Loïc Joly
851b6542e6
Modify rule S1181: Correct the "See" section
Split "See" section between C++&Java (#1538)
Restore the removed link in the Java version
2023-02-02 13:29:45 +01:00
github-actions[bot]
278e35dd7d
Create rule S3878: Add vbnet language (#1505) 2023-02-02 09:30:33 +01:00
SonarTech
8d4a73fbd3 update coverage information 2023-02-02 00:33:24 +00:00
Antonio Aversa
12f34504c2
Modify rule S1244: improve C# message for special floating point values (NaN, PositiveInfinity, ...) (#1509) 2023-02-01 15:52:37 +01:00
dependabot[bot]
44ada943ba
[dependabot] Bump ansi-regex from 3.0.0 to 5.0.1 in /frontend (#1532)
Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 3.0.0 to 5.0.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v3.0.0...v5.0.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-01 11:00:33 +01:00
Loris S
5e313be72b
Modify Rule S6474(Docker): Add ADD-originating artifacts to scope (#1514) 2023-02-01 10:23:29 +01:00
Zsolt Kolbay
d892fe5f3f
Modify rule S5935: Fix dead link (#1508)
* Fix for dead link

* New exception for certificate issue

* Revert checklinks.py
2023-02-01 10:20:48 +01:00
dependabot[bot]
6ea89500c1
[dependabot] Bump gitpython from 3.1.24 to 3.1.30 in /rspec-tools (#1517)
Bumps [gitpython](https://github.com/gitpython-developers/GitPython) from 3.1.24 to 3.1.30.
- [Release notes](https://github.com/gitpython-developers/GitPython/releases)
- [Changelog](https://github.com/gitpython-developers/GitPython/blob/main/CHANGES)
- [Commits](https://github.com/gitpython-developers/GitPython/compare/3.1.24...3.1.30)

---
updated-dependencies:
- dependency-name: gitpython
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-01 09:13:56 +01:00
SonarTech
fc5c40e3cd update coverage information 2023-02-01 00:34:39 +00:00
github-actions[bot]
926dc5545d
Create rule S6498: T-SQL - ANSI_WARNINGS and ARITHABORT parameters should be set to ON (#1520) 2023-01-31 08:59:49 +01:00
SonarTech
fb6acbe3a0 update coverage information 2023-01-31 00:32:44 +00:00
francoismora
a4374cd8d2
Modify rules MMF-2854: Update scopes from All to Main (#1526) 2023-01-30 17:29:13 +01:00
SonarTech
4511799d39 update coverage information 2023-01-28 00:33:12 +00:00
SonarTech
8cece0c60e update coverage information 2023-01-27 00:33:09 +00:00
Pavel Mikula
f2aff90170
S3898: Add VB.NET (#1510) 2023-01-26 10:24:38 +01:00
Zsolt Kolbay
c50a24061a
Modfiy Rule S2930: Include IAsyncDisposable in description (#1506)
* Update for IAsyncDisposable types

* Fix for line endings

* Fix formatting
2023-01-26 10:05:57 +01:00
Gregory Paidis
349708ef0f
Modify rule S4663: Add support for C# and VB.NET (#1513)
* Modify metadata for csharp

* Modify metadata for vbnet

* Fix some references

* Apply PR Review fixes

* Apply PR Review changes
2023-01-25 16:01:05 +01:00
Martin Strecker
2097c8e7f4
Fix whitespace (#1499) 2023-01-25 13:32:18 +01:00
dependabot[bot]
cf067a265c
Bump json5 from 1.0.1 to 1.0.2 in /frontend (#1496)
Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-25 11:36:25 +01:00
dependabot[bot]
206155ed8a
Bump express from 4.17.2 to 4.18.2 in /frontend (#1477)
Bumps [express](https://github.com/expressjs/express) from 4.17.2 to 4.18.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.17.2...4.18.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-25 11:36:13 +01:00
dependabot[bot]
003c72240e
Bump decode-uri-component from 0.2.0 to 0.2.2 in /frontend (#1467)
Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2.
- [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases)
- [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2)

---
updated-dependencies:
- dependency-name: decode-uri-component
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-25 11:35:59 +01:00
dependabot[bot]
2444379036
Bump certifi from 2022.5.18.1 to 2022.12.7 in /rspec-tools (#1469)
Bumps [certifi](https://github.com/certifi/python-certifi) from 2022.5.18.1 to 2022.12.7.
- [Release notes](https://github.com/certifi/python-certifi/releases)
- [Commits](https://github.com/certifi/python-certifi/compare/2022.05.18.1...2022.12.07)

---
updated-dependencies:
- dependency-name: certifi
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-25 11:35:36 +01:00
dependabot[bot]
9f30801044
Bump qs from 6.5.2 to 6.5.3 in /frontend (#1462)
Bumps [qs](https://github.com/ljharb/qs) from 6.5.2 to 6.5.3.
- [Release notes](https://github.com/ljharb/qs/releases)
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ljharb/qs/compare/v6.5.2...v6.5.3)

---
updated-dependencies:
- dependency-name: qs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-25 11:35:21 +01:00
dependabot[bot]
df3850f98c
Bump minimatch and recursive-readdir in /frontend (#1390)
Bumps [minimatch](https://github.com/isaacs/minimatch) and [recursive-readdir](https://github.com/jergason/recursive-readdir). These dependencies needed to be updated together.

Updates `minimatch` from 3.0.4 to 3.1.2
- [Release notes](https://github.com/isaacs/minimatch/releases)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2)

Updates `recursive-readdir` from 2.2.2 to 2.2.3
- [Release notes](https://github.com/jergason/recursive-readdir/releases)
- [Changelog](https://github.com/jergason/recursive-readdir/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jergason/recursive-readdir/commits/v2.2.3)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-type: indirect
- dependency-name: recursive-readdir
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-25 11:34:53 +01:00
Arseniy Zaostrovnykh
94fa5266ec
Remove unused legacy files 2023-01-25 10:34:01 +01:00
Gregory Paidis
cefd29ef14
Modify Rule S4457(C#): Remove from Sonar way Profile (#1511)
* Remove sonarway from default quality profile

* Revert "Remove sonarway from default quality profile"

This reverts commit 0efab47fb949a1c62272baabaf2fffba7bd6b5ed.

* Remove Sonarway from default quality profile for all languages

* Add a link in the comments

* Edit a comment
2023-01-24 15:07:55 +01:00
SonarTech
914e08adb0 update coverage information 2023-01-20 00:33:46 +00:00
Jonathan Wakely
4ccbd2ea86
Modify rule S6493: Fix confusion around user-defined types vs built-in 2023-01-17 15:38:55 +01:00
SonarTech
cb7f53c66a update coverage information 2023-01-17 00:32:24 +00:00
nicolas-gauthier-sonarsource
0979a5000c
Modify rule S3358: Add examples for T-SQL (#1501) 2023-01-16 16:02:44 +01:00
Zsolt Kolbay
dc26f15566
Modify rule S4018: modify message to make it clear the rule is about type inference (#1503)
* Fix S4018 message to make it clear it's about type inference.

* Added more comments to code sample.

* And more...

* Updated message to include refactoring.
2023-01-16 15:22:23 +01:00
Martin Strecker
331d20a5ef
Modify rule S4200: Improve documentation (#1490) 2023-01-16 09:01:20 +01:00
SonarTech
4c1f7cdab5 update coverage information 2023-01-13 00:33:38 +00:00
Gregory Paidis
6f93c1d804
Modify rule S1168: Raise on default and ternaries (#1476) 2023-01-12 17:06:28 +01:00
Tibor Blenessy
df685ea401
Modify rule S6442: Fix title and code sample (#1489) 2023-01-12 15:59:13 +01:00
SonarTech
3bd7b76530 update coverage information 2023-01-12 00:32:26 +00:00
Martin Strecker
027be50438
Fix title and rule formatting (#1498) 2023-01-11 16:18:58 +01:00
Stanislav
63f6e7e834
Modify Rule S6323: Fix for PHP (#779) 2023-01-11 12:32:28 +00:00
hendrik-buchwald-sonarsource
9bc6591eab
Modify multiple rules: Clean up texts of MMF-2503 (#1497) 2023-01-09 15:29:41 +01:00
Philipp Dominik Schubert
5701540a65
Modify rule S3628: Raw string literals should be used (#1484) 2023-01-09 12:31:52 +01:00
SonarTech
778fb19c93 update coverage information 2023-01-07 00:32:14 +00:00
Egon Okerman
38f3f57017
Update code example to be more descriptive (#1493) 2023-01-06 16:27:12 +01:00
leonardo-pilastri-sonarsource
9db73d254b
Modify rule S3329: update code example (#1494) 2023-01-06 16:17:10 +01:00
Ilia Kebets
abed396f1b
Modify rule S1527: Add mention about why we keep adopted future reserved words (#1491) 2023-01-06 15:39:24 +01:00
Ilia Kebets
740d6787ea
Modify rule S6480: Remove from the "Sonar way" profile (#1487) 2023-01-02 11:24:34 +01:00
SonarTech
29e33b1f1d update coverage information 2022-12-24 00:33:01 +00:00
Philipp Dominik Schubert
43548a8bdb
Modify rule S3539: Access specifiers should not be redundant #1485 2022-12-23 17:06:01 +01:00
github-actions[bot]
f72aa0dbe6
Create rule S6484: Concatenated "std::format" outputs should be replaced by a single invocation (CPP-3950) 2022-12-23 13:28:36 +01:00
github-actions[bot]
ccf847d422
Create rule Rule S6495 : \"std::format\" should be used instead of standard output manipulators (#1466) 2022-12-23 11:58:58 +01:00
tomasz-kaminski-sonarsource
2f951cf299
Create rule S6494: C++ formatting functions should be used instead of C printf-like functions 2022-12-23 10:45:51 +01:00
github-actions[bot]
ca5b18c351
Create rule S6493: The result of make_format_args should be passed directly as an argument (CPP-3973) (#1464) 2022-12-23 10:14:24 +01:00
SonarTech
d0a59c6487 update coverage information 2022-12-23 00:33:09 +00:00
Irina Batinic
c738842131 SONARJAVA-4381 S1135: Update metadata to be explicit about main code only scope 2022-12-22 17:20:27 +01:00
Nils Werner
eb3cf4dcc5
Modify Rule S6389: Update status (#1463) 2022-12-22 12:04:46 +01:00
SonarTech
e27719fbbe update coverage information 2022-12-22 00:32:15 +00:00
github-actions[bot]
39c2c0ab51
Create rule S6489: Calls to "std::format" with a locale should use the "L" flag (CPP-3953) 2022-12-21 09:48:40 +01:00
github-actions[bot]
50d0b7b828
Create rule S6492: Use std::format rather than std::vformat when the format string is known at compile time (CPP-3949) 2022-12-21 08:39:53 +01:00
SonarTech
a4aeb2d097 update coverage information 2022-12-21 00:32:24 +00:00
leonardo-pilastri-sonarsource
a6668ababd
Modify rule S1144: Added exception for methods with specific annotations on parameters (SONARJAVA-4347) (#1480) 2022-12-20 15:59:33 +01:00
pedro-oliveira-sonarsource
5862a4162d
Modify Multiple Rules: Remove Non-IAC-Based Standards in Metadata (#1481) 2022-12-20 15:43:42 +01:00
Philipp Dominik Schubert
6d8f177db1
Modify rule S3654: Improve on rule description (CPP-3734) (#1479) 2022-12-20 12:49:01 +01:00
SonarTech
77b63c58d1 update coverage information 2022-12-20 00:32:19 +00:00
github-actions[bot]
172095b394
Create rule S6483: Width, alignment, and padding format options should be used consistently (CPP-3951) 2022-12-19 15:42:16 +01:00
abbas-sabra-sonarsource
08d30a02e6
Modify Rule S3175: fix typo (#1478) 2022-12-17 15:11:08 +00:00
SonarTech
f8485bf887 update coverage information 2022-12-17 00:32:28 +00:00
SonarTech
301001536b update coverage information 2022-12-16 00:32:28 +00:00
github-actions[bot]
31ba751fdf
Create rule S6482: Explicit argument indexing in "std::format" should be used only for non-trivial ordering (CPP-3030) 2022-12-15 17:54:16 +01:00
leonardo-pilastri-sonarsource
78cbecccad
Modify Rule S1191: removed "com.sun.*" packages check from rule implementation (SONARJAVA-4382) (#1475) 2022-12-15 16:15:16 +01:00
github-actions[bot]
2bb1eb7ad2
Create rule S6488: "std::format" should not have unused arguments (CPP-3029) 2022-12-15 13:05:52 +01:00
github-actions[bot]
517063d2fb
Create rule S6487: "std::format" should not be missing indexes (CPP-3029) (#1448) 2022-12-15 13:05:27 +01:00
github-actions[bot]
c707bab628
Create rule S6444: RegEx evaluation should have a time out specified (#1188) 2022-12-15 11:55:35 +01:00
github-actions[bot]
19f01407cb
Create rule S6490: Arguments corresponding to the width and precision formatting options should be integers (CPP-3961) (#1453)
Co-authored-by: Tomasz Kamiński <tomasz.kamiński@sonarsource.com>
Co-authored-by: abbas-sabra-sonarsource <49131500+abbas-sabra-sonarsource@users.noreply.github.com>
2022-12-15 09:22:04 +01:00
github-actions[bot]
e16fb735fe
Create rule S6491: std::format numeric types should be 0-padded using the numerical padding and not the character padding (CPP-3952)
Co-authored-by: Fred Tingaud <frederic.tingaud@sonarsource.com>
Co-authored-by: abbas-sabra-sonarsource <49131500+abbas-sabra-sonarsource@users.noreply.github.com>
2022-12-15 08:25:20 +01:00
SonarTech
69b483c7c7 update coverage information 2022-12-15 00:32:15 +00:00
vlad-sonar
b57099ebe9 Update ci/frontend-tests-dockerfile
Co-authored-by: David Rautureau <david.rautureau@sonarsource.com>
2022-12-14 15:50:56 +01:00
Vladimír Kopčil
e6ca2653ca BUILD-2318: Migrate to CirrusCI on AWS 2022-12-14 15:50:56 +01:00
Sylvain Kuchen
e6f8cb33bd
Modify rule S1612 (Java): Short lambdas are considered compliant (#1471)
When a lambda function is shorter than its equivalent method reference, the code is considered compliant and no issue is raised
2022-12-14 08:58:21 +01:00
SonarTech
4db47858bf update coverage information 2022-12-14 00:32:20 +00:00
chrislain-razafimahefa-sonarsource
8f60d7eebc
Modify rule S5411: Stop having two sections for Compliant code (#1474) 2022-12-13 15:44:26 +01:00
Michael Jabbour
01e429f9ff
Modify rule S5270: Improve rule precision (CPP-3733) 2022-12-13 12:02:12 +01:00
Loris S
ffe62c05a5
Modify S5594(XML - Android): Improve text understandability (APPSEC-134) (#1433) 2022-12-12 18:38:23 +01:00
Johann Beleites
73f990a9a0
SONARJAVA-4374 Improve rule description, message, and title (#1468) 2022-12-12 09:38:58 +01:00
SonarTech
6fcbe85d81 update coverage information 2022-12-10 00:32:23 +00:00
Loris S
ed124be235
Modify Rule S5725: Improved its text (#1447) 2022-12-09 17:39:17 +01:00
Johann Beleites
297fb01fcf
Update rule S2097: "equals(other: Any?)" should test argument type (#342) 2022-12-09 14:34:27 +01:00
github-actions[bot]
e752e1387b
Create rule S6468: ExceptionGroup and BaseExceptionGroup should not be caught with except* (#1343) 2022-12-08 16:41:35 +01:00
hendrik-buchwald-sonarsource
ab9e5eca5f
Modify rule S1313: Add exceptions for ranges used for documentation purposes (#1178) 2022-12-08 15:00:24 +01:00
SonarTech
6cd1d41ee7 update coverage information 2022-12-07 00:33:40 +00:00
abbas-sabra-sonarsource
c6acefb37f
Modify rule S6185: improve description 2022-12-06 22:10:58 +00:00
chrislain-razafimahefa-sonarsource
c4e4c11313
Modify rule S5411: update documentation (#1458) 2022-12-06 15:54:00 +01:00
gaetan-ferry-sonarsource
be544bb597
Modify rule S4423: Update the detection logic to match the current deprecation state [PYTHON][APPSEC-12] (#1429) 2022-12-06 13:55:06 +01:00
SonarTech
910d8d7c5b update coverage information 2022-12-06 00:32:46 +00:00
Martin Strecker
238d87d528
Deprecate rule S4214 (replaced by S4200) (#1445) 2022-12-05 18:40:12 +01:00
Martin Strecker
5d9a5c210d
Modify rule S3353: Mark quickfix for CSharp as partially covered (#1456) 2022-12-05 15:38:58 +01:00
Tibor Blenessy
1e6340774d
Modify rule S6480: Add example when passing parameters (#1455) 2022-12-05 13:48:34 +01:00
github-actions[bot]
de4758e3f7
Create rule S6486: No uniq values as keys for JSX list components (#1443) 2022-12-05 12:27:17 +01:00
github-actions[bot]
75fcfe0606
Create rule S6480: Disallow .bind() and arrow functions in JSX props (#1426)
Co-authored-by: saberduck <saberduck@users.noreply.github.com>
2022-12-05 12:01:14 +01:00
Loris S
f976cacc35
Modify Rule S6474(Docker): Remove obsolete crypto hash reco (#1450) 2022-12-05 10:58:39 +01:00
SonarTech
36368529a6 update coverage information 2022-12-03 00:32:24 +00:00
Martin Strecker
6888916f35
Readme: Clarify rule deprecation (#1446) 2022-12-02 17:26:55 +01:00
leonardo-pilastri-sonarsource
7e6b7ebe1d
Changed title and description for Kotlin, since arrays have "size" instead or "length" (#1444) 2022-12-02 17:19:14 +01:00
github-actions[bot]
3f6a2c59ab
Create rule S6432 (#1024) 2022-12-02 14:53:09 +01:00
SonarTech
433d47ad3b update coverage information 2022-12-02 00:33:06 +00:00
Alban Auzeill
9b0fdea1c2
Modify rule S2629(Java): Fix java code example (#1437) 2022-12-01 11:39:55 +01:00
SonarTech
4eb6012736 update coverage information 2022-12-01 00:33:56 +00:00
Alban Auzeill
c5204c270c
Modify rule S899(Kotlin): Align Noncompliant and Compliant Code Example (#1436) 2022-11-30 22:23:35 +01:00
Gregory Paidis
bae4c2b0fd
Modify rule S3456: Raise on ReadOnlySpan.ToArray() (#1431) 2022-11-30 18:09:37 +01:00
github-actions[bot]
1c282c54c5
Create rule S6479: No array index for keys in JSX list components (#1420) 2022-11-30 18:04:01 +01:00
SonarTech
f9eafa38ed update coverage information 2022-11-30 00:32:47 +00:00
github-actions[bot]
43385778f1
Create rule S6481: React Context Provider values should not have non-stable identities (#1427) 2022-11-29 17:57:54 +01:00
Pavel Mikula
56c7f83299
Rule S1123: Add VB.NET (#1428) 2022-11-29 16:57:02 +01:00
Pierre-Loup
3c31fb8713
Modify rule S5542[kotlin]: Detect CBC mode when used with padding (APPSEC-30) (#1054) 2022-11-29 16:29:30 +01:00
github-actions[bot]
5f2457dd6a
Create rule S6477: Mandatory keys in JSX list components (#1412) 2022-11-29 13:34:28 +01:00
Johann Beleites
ff701f0299
Update rule S2114: Collections should not be passed as arguments to their own methods (#344) 2022-11-29 10:56:55 +01:00
Alban Auzeill
fd6e02fe26
Create rule S2116(Java): "hashCode" and "toString" should not be called on array instances (#1414) 2022-11-29 09:28:41 +01:00
SonarTech
f99ac0c891 update coverage information 2022-11-29 00:33:03 +00:00
Ilia Kebets
ef9b05e6a2
Unify "react", "reactjs" tags into "react" (#1430) 2022-11-28 16:31:19 +01:00
github-actions[bot]
20e1365113
Create rule S6478: React components should not be nested (#1413)
Co-authored-by: francoismora <francois.mora@sonarsource.com>
Co-authored-by: ilia-kebets-sonarsource <ilia.kebets@sonarsource.com>
2022-11-28 12:42:10 +01:00
SonarTech
083c86d955 update coverage information 2022-11-26 00:32:45 +00:00
github-actions[bot]
2fc736ef4b
Create rule S5332: Using clear-text protocols is security-sensitive (#1422) 2022-11-25 17:07:05 +01:00
github-actions[bot]
839e48cfa6
Create rule S6474(docker): Using remote artifacts without authenticity and integrity checks is security-sensitive (APPSEC-282) (#1405) 2022-11-25 17:02:31 +01:00
github-actions[bot]
f2f9b6e68e
Create rule S6471(docker): Running containers a privileged user is security-sensitive - APPSEC-280 (#1397) 2022-11-25 17:02:17 +01:00
github-actions[bot]
bb71475a31
Create rule S6473: Exposing administration services is security-sensitive (#1402) 2022-11-25 16:40:13 +01:00
github-actions[bot]
87bc6bb32c
Create rule S6472: Using ENV to handle secrets is security-sensitive (#1399) 2022-11-25 15:26:31 +01:00
SonarTech
5920fdd31f update coverage information 2022-11-25 00:32:08 +00:00
github-actions[bot]
a4c25cb1cd
Create rule S6461: "std::declval" should not be used within requires-expression 2022-11-24 14:38:16 +00:00
hendrik-buchwald-sonarsource
fc94425c95
Modify rule S1313: Add exceptions for ranges used for documentation purposes 2022-11-24 13:25:40 +01:00
github-actions[bot]
8083f8b2a4
Create rule S6458: Perfect forwarding constructors should be constrained 2022-11-24 12:06:27 +01:00
github-actions[bot]
0fa4d08e21
Create rule S6459: Type-constraints should not be used for forwarding reference parameters 2022-11-24 11:58:32 +01:00
github-actions[bot]
8d27d9dbe7
Create rule S6462: Generic iterator-based algorithms should be constrained 2022-11-24 11:55:05 +01:00
Michael Jabbour
2199941731
Modify rule S1155: Cover usages of length() 2022-11-24 11:42:59 +01:00
Thomas Serre
a405e94877
Deprecate rule S1100 (#1417) 2022-11-24 11:12:43 +01:00
SonarTech
8609643e38 update coverage information 2022-11-24 00:34:11 +00:00
github-actions[bot]
735d280e54
Create rule S6476 (#1411) 2022-11-23 14:04:08 +01:00
SonarTech
3c87d4b4fb update coverage information 2022-11-23 00:33:01 +00:00
Alejandro Álvarez Ayllón
31252ab509
Modify rule S1116: Change RSPEC to match current implementation (CPP-3875) (#1407) 2022-11-22 10:14:55 +00:00
SonarTech
902ce2f8ca update coverage information 2022-11-22 00:32:51 +00:00
github-actions[bot]
e4ad925f2e
Create rule S6469: Permissions of sensitive mount points should be restrictive (#1394) 2022-11-18 14:47:39 +01:00
SonarTech
36fa7142a2 update coverage information 2022-11-18 00:36:43 +00:00
github-actions[bot]
d3ae35083c
Create rule S6470: Recursively copying context directories is security-sensitive [Docker][APPSEC-275] (#1395) 2022-11-17 11:38:11 +01:00
SonarTech
2fe928212c update coverage information 2022-11-17 00:32:11 +00:00
Nils Werner
8059dc77b1
Modify rule S2260: Add Docker as new language (RULEAPI-773) (#1391) 2022-11-14 17:33:51 +01:00
Loris S
48e622bb03
Modify rule S6303: Text improvement suggestion (APPSEC-178) (#1374) 2022-11-14 10:51:48 +01:00
SonarTech
66d9eafd67 update coverage information 2022-11-12 00:36:00 +00:00
SonarTech
20e5958f8c update coverage information 2022-11-11 00:36:48 +00:00
SonarTech
a3e33e36d7 update coverage information 2022-11-10 00:33:32 +00:00
Pierre-Loup
b34a3e6d2a
Modify rule S5542[java]: Detect CBC mode when used with padding (APPSEC-31) (#1052)
* Remove langugages with no implementation

* Update description

* [APPSEC-31] Update rule description

* Apply suggestions from code review

Co-authored-by: pedro-oliveira-sonarsource <104737234+pedro-oliveira-sonarsource@users.noreply.github.com>

Co-authored-by: pedro-oliveira-sonarsource <104737234+pedro-oliveira-sonarsource@users.noreply.github.com>
2022-11-09 15:20:11 +01:00
SonarTech
4881ffa31b update coverage information 2022-11-08 00:33:52 +00:00
github-actions[bot]
f8b058e353
Create rule S6464: Non existent dictionary keys should not be accessed (#1296) 2022-11-07 17:51:08 +01:00
github-actions[bot]
efa80bc6b1
Create rule S6465: Unpacking should have the same number of elements of the iterable (#1297) 2022-11-07 17:23:24 +01:00
Egon Okerman
ad785de471
Modify rule S6304: update exceptions (#1381) 2022-11-07 11:52:12 +01:00
hendrik-buchwald-sonarsource
9059d354fe
Modify rule S6245: Add new Terraform code sample (#1380) 2022-11-07 10:43:43 +00:00
hendrik-buchwald-sonarsource
677ffc31c3
Modify rule S6255: Add new Terraform code sample (#1379) 2022-11-07 11:39:15 +01:00
hendrik-buchwald-sonarsource
9a4153ea15
Modify rule S6258: Add new Terraform code sample (#1378) 2022-11-07 11:38:54 +01:00
hendrik-buchwald-sonarsource
a1b4c040c5
Modify rule S6252: Add new Terraform code sample (#1377) 2022-11-07 11:38:46 +01:00
Pavel Mikula
21bf453473
Update S3871: Fix whitespace (#1382) 2022-11-07 10:01:24 +01:00
Pavel Mikula
969b3349ce
Modify rule S3871: Remove Java, add VB.NET (#1375) 2022-11-07 09:12:18 +01:00
SonarTech
42198ac7cd update coverage information 2022-11-05 00:36:03 +00:00
Pavel Mikula
6925797da7
Fix rspecator file names (#1376) 2022-11-04 19:28:12 +01:00
SonarTech
5b851058f5 update coverage information 2022-11-04 00:37:19 +00:00
francoismora
891cc48510
Modify rule S6304: Remove from the Sonar way profile (#1371) 2022-11-03 13:42:42 +01:00
SonarTech
8a37fd1e2e update coverage information 2022-11-03 00:35:58 +00:00
Roberto Orlandi
cbf3089b30 Modify rule S4507: Update RPG rule description 2022-11-02 11:29:00 +01:00
github-actions[bot]
0927ecde00
Create rule S6456: Requires-expression should not contain unevaluated concept checks or type predicates 2022-11-02 11:12:13 +01:00
Costin Zaharia
1094d865b3
Modify rule S1151 (dotnet): Update doc to reflect implementation (#1280) 2022-11-02 10:35:45 +01:00
SonarTech
aace3972b5 update coverage information 2022-11-02 00:39:14 +00:00
hendrik-buchwald-sonarsource
e6ad11b97e
Modify rule S1313: SONARKT-209, SONARKT-225 Add exceptions (#1179)
Ip ranges used for documentation purposes
Local IPv4-mapped IPv6 addresses
2022-11-01 10:55:46 +01:00
SonarTech
7a6b625ce3 update coverage information 2022-11-01 00:44:24 +00:00
github-actions[bot]
5ba1328d56
Create rule S6460: Template should not be constrained with ad-hoc requires-expression 2022-10-31 08:43:07 +01:00
SonarTech
c1ebb115f8 update coverage information 2022-10-29 00:32:46 +00:00
hendrik-buchwald-sonarsource
4947ab1954
Modify rule S1313: Add exceptions for ranges used for documentation purposes (#1219) 2022-10-28 07:42:06 +00:00
SonarTech
3192dc0019 update coverage information 2022-10-28 00:39:42 +00:00
Michael Gumowski
805714c964 Comment on rule S1132: Explain why it has been removed from Sonar Way 2022-10-27 15:33:34 +02:00
Michael Gumowski
489c9cd70b Modify rule S2190: fix typo in java compliant and non-compliant code examples 2022-10-27 15:24:45 +02:00
hendrik-buchwald-sonarsource
14c397c91b
Modify rule S1313: Add exceptions for ranges used for documentation purposes (#1222) 2022-10-27 12:54:22 +02:00
SonarTech
53f6947b4b update coverage information 2022-10-25 00:45:46 +00:00
chrislain-razafimahefa-sonarsource
3daaf77172
Modify rule S3776: Add exception to description for Java 2022-10-24 15:47:33 +02:00
leonardo-pilastri-sonarsource
89c7bcc329
Modify rule S107: Add exceptions to description for Java (SONARJAVA-4072) (#1362)
* Modify rule S107: Add exceptions to description for Java (SONARJAVA-4072)

* Fixed some formatting of the rule description, and exceptions were made clearer

* Added missing `+` symbol around annotation exception description
2022-10-24 14:51:00 +02:00
SonarTech
185f2dd9cd update coverage information 2022-10-22 00:44:48 +00:00
Mary Georgiou
eba78e90d6
Modify S5348: Update description, message and highlighting to match the rule implementation (#1353) 2022-10-21 15:43:26 +02:00
SonarTech
bba72480c4 update coverage information 2022-10-21 00:37:28 +00:00
Ilia Kebets
8d7947dc92
Undeprecate rule S3972 (#1354) 2022-10-20 16:18:52 +02:00
pedro-oliveira-sonarsource
2ed6c8e473
Modify rule S5332[javascript]: Using clear-text protocols is security-sensitive (#1317)
Fixed by https://github.com/SonarSource/SonarJS/issues/3456
2022-10-20 16:15:31 +02:00
github-actions[bot]
3d0135cb34
Create rule S6330 (#1301)
Fixed by https://github.com/SonarSource/SonarJS/issues/3434

Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: pedro-oliveira-sonarsource <104737234+pedro-oliveira-sonarsource@users.noreply.github.com>
2022-10-20 16:02:01 +02:00
github-actions[bot]
c13cfb7059
Create rule S6466: Accessing list elements should not trigger an IndexError (#1300) 2022-10-20 12:07:46 +02:00
SonarTech
625ab0382d update coverage information 2022-10-20 00:39:47 +00:00
github-actions[bot]
9a9d43deae
Create rule S6332(TS): Using unencrypted EFS file systems is security-sensitive (APPSEC-163) (#1289)
* Add javascript to rule S6332

* Modify rule S6332: Add JS/TS as covered language

* Highlighting specification adjust

* Apply suggestions from code review

Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>

Co-authored-by: pedro-oliveira-sonarsource <pedro-oliveira-sonarsource@users.noreply.github.com>
Co-authored-by: pedro-oliveira-sonarsource <pedro.oliveira@sonarsource.com>
Co-authored-by: pedro-oliveira-sonarsource <104737234+pedro-oliveira-sonarsource@users.noreply.github.com>
Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>
2022-10-19 11:44:13 +02:00
github-actions[bot]
54db8fac2c
Create rule S6319 (#1304)
* Add javascript to rule S6319

* Rule.adoc update

* Update web links

* Props is mandatory

* Declaration not used

* Fix import

* Apply suggestions from code review

Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>

Co-authored-by: pedro-oliveira-sonarsource <pedro-oliveira-sonarsource@users.noreply.github.com>
Co-authored-by: pedro-oliveira-sonarsource <pedro.oliveira@sonarsource.com>
Co-authored-by: pedro-oliveira-sonarsource <104737234+pedro-oliveira-sonarsource@users.noreply.github.com>
Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>
2022-10-19 11:43:39 +02:00
SonarTech
d5faf38b92 update coverage information 2022-10-19 07:23:51 +00:00
Corniel Nobel
d97e324e11
Modify rule S2225: Add VB.NET (#1062) 2022-10-18 12:11:58 +02:00
Leonardo Pilastri
1798aee443 Modify rule S4605(Java): Fix typo in @ComponentScan annotation name (SONARJAVA-4257) 2022-10-18 11:05:05 +02:00
Martin Strecker
c2a1a71caa
Modify rule S2222: Improve rule description (#1344) 2022-10-18 07:12:41 +00:00
SonarTech
be70678e73 update coverage information 2022-10-18 00:43:07 +00:00
github-actions[bot]
ce9501054b
Create rule S6275 Using unencrypted EBS volumes is security-sensitive (#1286)
Co-authored-by: pedro-oliveira-sonarsource <pedro.oliveira@sonarsource.com>
2022-10-17 16:08:27 +02:00
github-actions[bot]
284f2a6377
Create rule S6308(js): Using unencrypted Elasticsearch domains is security-sensitive (APPSEC-160) (#1285) 2022-10-17 10:28:22 +02:00
github-actions[bot]
d01914f4a7
Create rule S6303[JS/TS]: Using unencrypted RDS databases is security-sensitive (APPSEC-161) (#1294) 2022-10-17 10:28:06 +02:00
SonarTech
0714340eff update coverage information 2022-10-15 00:41:42 +00:00
Martin Strecker
2ff80c0ef6
Modify rule S1694 (CS): correct code comment in sample (#1341) 2022-10-14 12:59:01 +00:00
Johann Beleites
5d199fe6b5
Modify rule S1186(Java): Add exception for certain constructor types (SONARJAVA-4338) (#1340) 2022-10-14 10:49:50 +02:00
SonarTech
098964b531 update coverage information 2022-10-14 00:47:13 +00:00
Johann Beleites
a8871afd12 Modify rule S1186(Java): Add exception for @Pointcut annotation (SONARJAVA-3668) 2022-10-13 12:06:11 +02:00
Ilia Kebets
da2f423692
Deprecate Rule css:S5362 (function-calc-no-invalid) (#1333) 2022-10-13 10:12:07 +02:00
SonarTech
54da661c20 update coverage information 2022-10-13 00:43:14 +00:00
SonarTech
3761ebcd5c update coverage information 2022-10-12 00:49:20 +00:00
github-actions[bot]
138f01eee3
Create rule S6317: AWS IAM policies should not allow privilege escalation (APPSEC-174) (#1310) 2022-10-11 10:28:16 +02:00
github-actions[bot]
6fb6bccc80
Create rule S6270: Policies authorizing public access to resources are security-sensitive (APPSEC-172) (#1311) 2022-10-11 10:28:07 +02:00
github-actions[bot]
f99ec0215b
Create rule S6304: Policies granting access to all resources of an accounts are security-sensitive (APPSEC-175) (#1314) 2022-10-11 10:27:50 +02:00
github-actions[bot]
df16c80e31
Create rule S6302: Policies granting all privileges are security-sensitive (APPSEC-173) (#1313) 2022-10-11 10:26:45 +02:00
SonarTech
fd31095a4a update coverage information 2022-10-11 00:38:25 +00:00
Loris S
0b49b91f58
Modify S4423[JS]: Support of AWS CDK code (APPSEC-158) (#1315) 2022-10-10 18:04:24 +02:00
gaetan-ferry-sonarsource
a540d86aa6
Modify rule S6333: Creating public APIs is security sensitive - apigateway v1 python examples (#1327) 2022-10-10 16:18:19 +02:00
github-actions[bot]
84e9f1bd49
Create rule S6333: Creating public APIs is security sensitive [APPSEC-170] (#1308) 2022-10-10 15:50:22 +02:00
francoismora
0511edab95
Modify rule S1313: Add exceptions for IPv6 ranges used for documentation purposes (#1326) 2022-10-10 12:22:51 +02:00
Mary Georgiou
75eb82656f
remove extract (#1325) 2022-10-10 12:11:59 +02:00
Victor
5625dc0a09
Modify Rule S1226: Fix Typo (#1323) 2022-10-10 11:32:28 +02:00
github-actions[bot]
d11bc19b31
Create rule S6329: Allowing public network access to cloud resources is security-sensitive (APPSEC-169) (#1318) 2022-10-10 11:00:08 +02:00
Victor
2e88a05767
Modify Rule S1226: Add exception for argument reassignments inside if statements (#1322) 2022-10-10 09:30:29 +02:00
Alban Auzeill
7dc6b19b8f
Modify rule S5378: provide missing quickfixes information (#1321) 2022-10-07 17:38:55 +02:00
Mary Georgiou
4544a5595d
Modify rule S4421: Add more deprecated functions (#1320) 2022-10-07 16:33:19 +02:00
Ilia Kebets
86908137cd
Deprecate Formatting rules for JavaScript (#1319) 2022-10-07 16:30:34 +02:00
SonarTech
34c41dfff7 update coverage information 2022-10-07 00:49:15 +00:00
Ilia Kebets
6f1013c060
Modify rule S4326: Remove it from the "Sonar way" profile and fix its description (#1312) 2022-10-06 16:40:16 +02:00
github-actions[bot]
8e5dc32bde
Modify rule S6304: Add Python CDK (#1299) 2022-10-06 16:25:33 +02:00
github-actions[bot]
3115a13675
Create rule S6321: Administration services access should be restricted to specific IP addresses [JS][APPSEC-168] (#1306) 2022-10-06 12:56:45 +02:00
Victor
5754030bdd
Modify rule S1125: Remove second message (#1307) 2022-10-06 09:06:00 +02:00
SonarTech
af71585950 update coverage information 2022-10-06 00:40:10 +00:00
github-actions[bot]
e8d97e1dfd
Create rule S6467: Features deprecated in Oracle 18 should not be used (#1305) 2022-10-05 15:30:48 +02:00
Mary Georgiou
f89c780eeb
Improve rule description (#1309) 2022-10-05 09:28:40 +02:00
SonarTech
28cd99ac8f update coverage information 2022-10-05 00:44:13 +00:00
github-actions[bot]
e15305d3c1
Create rule S6417 (#1170)
* Add python to rule S6417

* Add rule description

Co-authored-by: johann-beleites-sonarsource <johann-beleites-sonarsource@users.noreply.github.com>
Co-authored-by: Johann Beleites <johann.beleites@sonarsource.com>
2022-10-04 11:26:34 +02:00
github-actions[bot]
8963b7a5f5
Create rule S6317: AWS IAM policies should not allow privilege escalation (#1284) 2022-10-04 09:27:58 +02:00
Ilia Kebets
8c3a2057cc
Modify rule S4138: Include warning about browser array-like collections in TypeScript (#1303) 2022-10-03 12:06:28 +02:00
github-actions[bot]
792b2cd487
Create rule S6327 (#1298) 2022-10-03 11:21:43 +02:00
SonarTech
14d5fb9bee update coverage information 2022-10-01 00:51:30 +00:00
Alban Auzeill
b65c1f1515 provide missing quickfixes information 2022-09-30 16:35:53 +02:00
github-actions[bot]
13cb1f6290
Create rule S6329: Allowing public network access to cloud resources is security-sensitive - Adding python (APPSEC-147)(#1288) 2022-09-30 16:30:17 +02:00
github-actions[bot]
0061c0f0ea
Create rule S6463: Allowing unrestricted outbound communications is security-sensitive (#1295) 2022-09-30 15:59:58 +02:00
github-actions[bot]
6ca012b7e1
Create rule S6302: Policies granting all privileges are security-sensitive (APPSEC-155) (#1293) 2022-09-30 15:17:04 +02:00
github-actions[bot]
01defcbe02
Create rule S6270: Policies authorizing public access to resources are security-sensitive (APPSEC-154) (#1287) 2022-09-30 15:16:31 +02:00
Yassin Kammoun
0a0b023661
Modify rule S107: Add exception for Angular component constructors (#1292) 2022-09-29 11:12:03 +02:00
hendrik-buchwald-sonarsource
38ebd9cac0
Modify rule S1313: Add exceptions for ranges used for documentation purposes (#1182)
Update exceptions for SLang.
2022-09-29 10:48:49 +02:00
hendrik-buchwald-sonarsource
831ea5347a
Modify rule S1192: Remove artifact (#1291) 2022-09-28 15:50:26 +02:00
Yassin Kammoun
b2c9d0a823
Modify rule S4327: Add exception for generators (#1290) 2022-09-28 13:41:06 +02:00
Loris S
4d7d9332c9
Modify S4828: Clarify recommendations (#1269) 2022-09-28 10:23:01 +02:00
github-actions[bot]
b1cd7d5a0f
Create rule S6333: Creating public APIs is security-sensitive (#1281) 2022-09-27 14:37:31 +02:00
github-actions[bot]
1d89475ea1
Create rule S6321: Administration services access should be restricted to specific IP addresses (APPSEC-146)(#1279) 2022-09-27 11:22:38 +02:00
SonarTech
fe5a831317 update coverage information 2022-09-27 00:39:11 +00:00
hendrik-buchwald-sonarsource
4444c8a59f
Modify rule S1313: Add exceptions for ranges used for documentation purposes (#1183)
Co-authored-by: Francois Mora <francois.mora@sonarsource.com>
2022-09-26 15:11:22 +02:00
Pierre-Loup
afcae498a5
Modify S4423[Python]: Support of AWS CDK code (APPSEC-103) (#1273) (#1278) 2022-09-26 14:04:15 +02:00
Andrea Guarino
5f36b8bd08
Modify rule S5633: Fix typo in description (#1283) 2022-09-26 10:41:16 +02:00
Andrea Guarino
da86a85713
Modify rule S2589: Make sure Python code raises expected issues (#1282) 2022-09-26 10:36:07 +02:00
SonarTech
8b62aae80d update coverage information 2022-09-25 00:35:30 +00:00
SonarTech
2155b6be48 update coverage information 2022-09-24 00:38:37 +00:00
SonarTech
cbaec60aa9 update coverage information 2022-09-23 00:41:38 +00:00
SonarTech
e989e2a6a5 update coverage information 2022-09-22 00:35:26 +00:00
SonarTech
0797442a76 update coverage information 2022-09-21 00:38:53 +00:00
Pierre-Loup
e6ead4ded2
Revert "Modify S4423[Python]: Support of AWS CDK code (APPSEC-103) (#1273)" (#1277)
This reverts commit 7aa3adc6bfbaf80456d85c27f858ce20b7200811.
2022-09-20 13:48:06 +00:00
Pierre-Loup
7aa3adc6bf
Modify S4423[Python]: Support of AWS CDK code (APPSEC-103) (#1273) 2022-09-20 15:44:27 +02:00
Martin Strecker
4227feabb1
Modify rules S3343, S3236: Add CallerArgumentExpression to the list of CallerInfoAttributes (#1153) 2022-09-19 16:06:29 +02:00
Martin Strecker
05940b6253
Modify rules: Add "azure" tag to "Azure Functions" rules (#1193) 2022-09-19 15:40:19 +02:00
Nils Werner
99f8bfd142
Drop PHP Drupal profile (#1274) 2022-09-19 12:54:21 +00:00
Nils Werner
4695209274
Modify S1117: Deprecate rule for PHP (#1271) 2022-09-19 14:27:04 +02:00
Nils Werner
6aacfef84f
Drop PHP profiles PSR-2 and Drupal (#1272) 2022-09-19 14:25:27 +02:00
github-actions[bot]
f960b37f9d
Create rule S6303: Using unencrypted RDS databases is security-sensitive (#1255) 2022-09-19 12:00:00 +02:00
github-actions[bot]
92d9e526b0
Create rule S6319: Using unencrypted SageMaker notebook instances is security-sensitive (APPSEC-109) (#1253)
* Add python to rule S6319

* Add code samples

* Add message

* Remove `RemovalPolicy` from code samples

* Apply formatting change

Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
2022-09-19 11:49:34 +02:00
SonarTech
387e48d15f update coverage information 2022-09-17 00:32:18 +00:00
github-actions[bot]
be29ce8975
Create rule S6332: Using unencrypted EFS file systems is security-sensitive (#1266) 2022-09-16 17:51:43 +02:00
hendrik-buchwald-sonarsource
da513f2afa
Modify rule S1313: Add exceptions for ranges used for documentation purposes (#1220) 2022-09-16 16:33:55 +02:00
gaetan-ferry-sonarsource
0adc826e00
Modify rule S5332: Adding AWS CDK support for the Python language (#1245) 2022-09-16 16:28:47 +02:00
hendrik-buchwald-sonarsource
2e120ef937
Modify rule S2068: Adjust samples to new rule behavior (#1268) 2022-09-16 13:49:50 +02:00
Loris S
59ab4a9a07
Modify Rule S6258(IAC): Add additionnal util recommendation (#1263) 2022-09-16 11:47:20 +02:00
pedro-oliveira-sonarsource
d16294d1e5
Modify Rule S6258(IAC): Remove azurerm_storage_account mentions (#1264) 2022-09-15 17:37:42 +02:00
Yassin Kammoun
00abc84fc9
Modify rule S107: Add an exception for TypeScript constructors (#1260) 2022-09-15 11:46:29 +02:00
github-actions[bot]
95b3ac16b6
Create rule S6308: Using unencrypted Elasticsearch domains is security-sensitive (APPSEC-107) (#1236) 2022-09-14 14:49:32 +02:00
pedro-oliveira-sonarsource
8fc7e3e3d8
[APPSEC-63] Modify Rules: Fix ASVS assignments (#1251) 2022-09-14 14:00:38 +02:00
Loris S
9d8b209353
Modify Multiple Rules(IAC): Remove Non-IAC-Based Standards in Metadata (APPSEC-5) (#1238) 2022-09-14 10:29:18 +02:00
Pierre-Loup
7194184e3a
Modify S4423: Fix See section for CF and TF (#1250) 2022-09-13 16:56:07 +02:00
Loris S
746e99677d
Modify All Current Education Rules: Add Security Principles (#1248) 2022-09-13 16:26:52 +02:00
hendrik-buchwald-sonarsource
74e602737f
Modify rule S1313: Add exceptions for ranges used for documentation purposes (#1180)
* Update exceptions for PHP

* Add dummy

* Remove dummy
2022-09-13 09:38:09 +02:00
hendrik-buchwald-sonarsource
250c718605
Modify rule S2068: Fix Apex sensitive code sample (#1247) 2022-09-13 09:25:33 +02:00
hendrik-buchwald-sonarsource
8f9692eaa6
Modify rule S1313: Add exceptions for ranges used for documentation purposes (#1184) 2022-09-12 18:02:20 +02:00
github-actions[bot]
621944c4c4
Create rule S6437: Credentials should not be hard-coded (#1080) 2022-09-12 11:29:36 +02:00
SonarTech
5e8edf0caf update coverage information 2022-09-10 00:35:33 +00:00
github-actions[bot]
d492a6f781
Create rule S6327: Using unencrypted SNS topics is security-sensitive (#1232) 2022-09-09 14:11:06 +02:00
Karim El Ouerghemmi
a0213d80bd
Modify rule S6173(PHP): Add more code examples 2022-09-08 11:35:12 +02:00
chrislain-razafimahefa-sonarsource
d8d4be1472
Remove and replace broken link (#1228) 2022-09-07 16:08:38 +02:00
Martin Strecker
091de3a300
Modify rule S3353: Add sample with "var" and interpolated string replacements (#1154) 2022-09-07 13:31:52 +02:00
github-actions[bot]
3a33cc52b6
Create rule S6330: Using unencrypted SQS queues is security-sensitive (#1214) 2022-09-07 11:52:42 +02:00
github-actions[bot]
bc6aa289aa
Create rule S6275: Using unencrypted EBS volumes is security-sensitive (#1204) 2022-09-07 11:48:04 +02:00
gaetan-ferry-sonarsource
30d2985c12
Modify rule S6275: Adding information regarding snapshots (#1211) 2022-09-06 10:54:26 +02:00
SonarTech
e7f09b730b update coverage information 2022-09-06 00:36:54 +00:00
Pavel Mikula
cf50119587
Rule S2259: Add VB.NET, improve C# (#1208) 2022-09-05 08:04:25 +02:00
Pierre-Loup
49ce836ac3
Update description.adoc (#1207) 2022-09-02 10:42:56 +02:00
SonarTech
57fb81d41c update coverage information 2022-09-02 00:33:26 +00:00
hendrik-buchwald-sonarsource
1e3c951934
Update exceptions for Python (#1181) 2022-09-01 14:11:22 +02:00
SonarTech
079c6687d0 update coverage information 2022-09-01 00:32:16 +00:00
SonarTech
baf6447308 update coverage information 2022-08-31 00:41:37 +00:00
SonarTech
a778c209ec update coverage information 2022-08-30 00:40:07 +00:00
Martin Strecker
94f637f126
checklinks.py Fix broken Accept header (#1194) 2022-08-29 19:17:24 +02:00
SonarTech
954a980663 update coverage information 2022-08-24 00:35:43 +00:00
Victor
36bf421f4b
Add exceptions for S1313 for ranges used for documentation purposes (#1167) 2022-08-19 07:40:31 +02:00
marco-bearzi-sonarsource
f1be25254d
Modify rule S5899: Add python as covered language (#1165) 2022-08-18 11:10:13 +02:00
Pierre-Loup
8920bd8e10
Fix CWE mapping (#1128) 2022-08-18 10:33:50 +02:00
SonarTech
a173719e2e update coverage information 2022-08-17 00:35:09 +00:00
SonarTech
2915e81c39 update coverage information 2022-08-16 00:39:37 +00:00
abbas-sabra-sonarsource
992522e8b6
S3135 Fix typo in the compliant example 2022-08-12 17:28:52 +02:00
SonarTech
b877172faf update coverage information 2022-08-12 00:32:39 +00:00
Čaba Šagi
e4779f834f
Add back common rule S1606 and change the status to closed 2022-08-11 22:26:34 +00:00
Čaba Šagi
45ddb8fdce
Add back common rule S1477 and change the status to closed 2022-08-12 00:03:35 +02:00
Čaba Šagi
08262201b1
Add back common rule S1484 and change the status to closed 2022-08-12 00:02:56 +02:00
Čaba Šagi
1667555dbc
Add back common rule S3424 and change the status to closed 2022-08-12 00:02:28 +02:00
Čaba Šagi
385c8e7649
Add back common rule S1483 and change the status to closed 2022-08-12 00:01:49 +02:00
Čaba Šagi
28e8afa71d
Add back common rule S1482 and change the status to closed 2022-08-12 00:01:07 +02:00
Fred Tingaud
f6a64c41de
CPP-2921 Update S6177: using enum class
Align description with implementation.
2022-08-11 17:00:47 +02:00
SonarTech
f85902b9d1 update coverage information 2022-08-11 00:34:07 +00:00
Michael Gumowski
942756582f Java: Fix description of S6244 2022-08-10 10:09:32 +02:00
Tibor Blenessy
c7ab0797da
Modify rule S1854: Add exception for increment-decrement and null (#1156) 2022-08-10 09:42:53 +02:00
Victor
bd5ae898a9
Modify rule S6436: Improve rule description (#1157) 2022-08-09 17:06:14 +02:00
Christophe Zürn
db2f440797
SONARSEC-3163 Add education principles to S5131 metadata json file (#1155) 2022-08-09 12:06:31 +02:00
SonarTech
c2b435001f update coverage information 2022-08-09 00:37:00 +00:00
francoismora
68e8d50815
Modify rule s4144: Add exception for identical functions. (#1151)
* Modify rule s4144: Add exception for identical functions.

* Update exception justification

Co-authored-by: Tibor Blenessy <tibor.blenessy@sonarsource.com>
2022-08-08 13:27:34 +00:00
github-actions[bot]
8df8965973
Create rule S6249: Authorizing HTTP communications with S3 buckets is security-sensitive (APPSEC-40) (#1095) 2022-08-08 10:49:02 +02:00
SonarTech
6e0fb0d290 update coverage information 2022-08-07 00:37:20 +00:00
francoismora
e62d370592
Modify rule S3317: Remove rule from the profile "Sonar way". (#1145) 2022-08-04 17:54:27 +02:00
francoismora
18b14c5857
Fix javascript code highlighting in javascript rule descriptions. (#1144) 2022-08-04 15:12:16 +02:00
francoismora
d58c163de0
Modify rule S1116: Add exception paragraph (#1141) 2022-08-04 14:16:24 +02:00
francoismora
9bc9d6adab
Modify rule S1186: Add exception for empty functions. (#1140) 2022-08-04 14:15:59 +02:00
francoismora
bc4ed3688d
Modify rule S3358: Add exception for JSX expressions. (#1139) 2022-08-04 14:15:14 +02:00
SonarTech
11cdc53067 update coverage information 2022-08-04 00:35:36 +00:00
francoismora
ef321a927a
Modify rule S1186: Add exception for empty functions. (#1134) 2022-08-03 17:41:05 +02:00
francoismora
b67ad4115e
Modify rule S1172: Remove rule from the profile "Sonar way". (#1135) 2022-08-03 17:40:31 +02:00
Yassin Kammoun
4d60c13833
Modify rule S6245: Fix typo (#1136) 2022-08-03 15:28:22 +02:00
SonarTech
472baaf274 update coverage information 2022-08-03 00:37:55 +00:00
Martin Strecker
6b695dfb02
Modify rules S6424 and S6420: Change titles (#1130) 2022-08-02 10:26:08 +02:00
hendrik-buchwald-sonarsource
1e8216f005
Modify rule S5146: Fix incorrect Java code sample (#1129) 2022-08-01 15:20:33 +02:00
SonarTech
2c156ce530 update coverage information 2022-07-30 00:33:29 +00:00
Loïc Joly
aa5a68be02
CPP-40 Make it clear that not using #pragma once is almost a stylistic choice 2022-07-29 16:24:19 +02:00
francoismora
88797ed932
Modify rule S1116: Add exception paragraph (#1124) 2022-07-29 15:11:24 +02:00
francoismora
03b9c3ce61
Modify rule S3358: Add an exception for JSX expressions. (#1125) 2022-07-29 15:11:01 +02:00
francoismora
579d4ea9a9
Modify rule S1117: Remove rule for JavaScript/TypeScript from profile The Sonar way. (#1126) 2022-07-29 15:10:31 +02:00
Alexandre Gigleux
01bad1b800
Map rules to OWASP ASVS 4 (#1110)
https://sonarsource.atlassian.net/browse/MMF-2794
2022-07-29 13:35:38 +02:00
Pavel Mikula
3a30249f7e
Modify rule S4060: Add VB.NET code snippets (#1122) 2022-07-29 10:45:19 +02:00
francoismora
7ed7dd707f
Remove S1488 for Javascript/Typescript from the Sonar way profile (#1123) 2022-07-29 09:46:00 +02:00
marco-bearzi-sonarsource
753be318ef
Modify rule S1192: Allow periods as part of exceptions (#1117) 2022-07-27 15:49:27 +02:00
Martin Strecker
db1ff7ae0a
Modify rule S6423: Swap arguments in LogError call in compliant solution (#1113) 2022-07-26 11:17:47 +02:00
Martin Strecker
62688911ab
Remove broken link (#1115) 2022-07-26 10:35:52 +02:00
Pierre-Loup
227ad4bbdd
Fix OWASP Cheat Sheet links (#1118) 2022-07-26 10:28:59 +02:00
SonarTech
96c727d3cd update coverage information 2022-07-26 00:36:54 +00:00
Arseniy Zaostrovnykh
84967d6c25
Prohibit non-ASCII characters in rule metadata.json files (#1119)
Triggered by the deployment failure that was caused by an invisible Unicode character in a rule's metadata.json.
This PR implements three conceptual changes:
- make the deployment parse error more informative
- prohibit the use of non-ASCII characters in the metadata.json files
- remove the existing non-ASCII characters from the existing rules
2022-07-25 17:19:53 +02:00
Corniel Nobel
fedead313e
Modify rule S4225: Add VB.NET (#1063) 2022-07-25 13:40:35 +02:00
SonarTech
f0371e808a update coverage information 2022-07-23 00:34:56 +00:00
Victor
d544be2e7c
fix setState -> useState (#1116) 2022-07-22 12:11:14 +02:00
github-actions[bot]
afb41bbae3
Create rule S6442: React's setState hook should only be used in the render function or body of a component (#1102) 2022-07-22 11:38:46 +02:00
github-actions[bot]
1f4713b0df
Create rule S6440: React Hooks should be properly called (#1094) 2022-07-22 11:38:13 +02:00
github-actions[bot]
1bc8986074
Create rule S6441: Unused methods of React components should be removed (#1096) 2022-07-22 11:00:43 +02:00
SonarTech
c518e6271c update coverage information 2022-07-22 00:38:32 +00:00
dependabot[bot]
0513e0c5de
[dependabot] Bump terser from 5.10.0 to 5.14.2 in /frontend
Bumps [terser](https://github.com/terser/terser) from 5.10.0 to 5.14.2.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/commits)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-20 16:12:37 +00:00
github-actions[bot]
2254865e24
Create rule S6443: React state setter function should not be called with its matching state variable (#1103) 2022-07-20 11:09:52 +02:00
SonarTech
7f88e50a12 update coverage information 2022-07-20 00:34:27 +00:00
github-actions[bot]
937c8bb260
Create rule S6439: React components should not render non-boolean condition values (#1091)
Co-authored-by: vilchik-elena <elena.vilchik@sonarsource.com>
Co-authored-by: Victor Diez <victor.diez@sonarsource.com>
2022-07-19 17:25:11 +02:00
github-actions[bot]
bbdad51128
Create rule S5849: Setting capabilities is security-sensitive (#1026) 2022-07-19 10:46:58 +02:00
github-actions[bot]
6b9da3c3b7
Create rule S6433: Mounting sensitive file system paths is security-sensitive (#1031) 2022-07-19 10:46:41 +02:00
SonarTech
17125bf3cf update coverage information 2022-07-19 00:38:33 +00:00
chrislain-razafimahefa-sonarsource
80c96e375e
Modify rule S4830: fix example code identation for Kotlin (#1108) 2022-07-18 15:49:45 +02:00
SonarTech
df991add46 update coverage information 2022-07-16 00:34:55 +00:00
Elena Vilchik
fe415dcb66
Fix comment symbols for S6438 (#1107) 2022-07-14 13:53:16 +02:00
Pavel Mikula
e0bf31b36c
Delete S4071 rule (#1105) 2022-07-14 13:27:11 +02:00
SonarTech
99d85a6c79 update coverage information 2022-07-14 00:35:39 +00:00
github-actions[bot]
8ad7daeee9
Create rule S6431: Using host namespaces is security-sensitive (APPSEC-20) (#1021) 2022-07-13 15:47:07 +02:00
github-actions[bot]
038202115e
Create rule S6429: Exposing Docker sockets is security-sensitive (#1019) 2022-07-13 15:46:28 +02:00
Pavel Mikula
bacaac778a
Replace remediation cost time unit 'mn' with 'min' (#1104) 2022-07-13 15:02:38 +02:00
Johnny Lim
6aaf64218b Polish rule.adoc for S5838 2022-07-13 10:49:29 +02:00
SonarTech
6c604b9d76 update coverage information 2022-07-13 00:33:35 +00:00
Nils Werner
aab63394de Create rule S6428: Running a container in privileged mode is security-sensitive (APPSEC-16) 2022-07-12 10:46:23 +02:00
Nils Werner
152e0f3689 Create rule S6430: Allowing process privilege escalation is security-sensitive 2022-07-12 10:46:13 +02:00
SonarTech
8b12766d87 update coverage information 2022-07-09 00:32:47 +00:00
pedro-oliveira-sonarsource
082b3ef269
Modify: Fix old/broken embedded links (#1100) 2022-07-08 13:58:56 +02:00
pedro-oliveira-sonarsource
96d8737565
Create rule S6265: Add JS as covered language (APPSEC-39) (#1084) 2022-07-08 13:22:02 +02:00
pedro-oliveira-sonarsource
87b8cab56f
Create rule S6245: Add JS as covered language (APPSEC-41) (#1088) 2022-07-08 11:18:03 +02:00
pedro-oliveira-sonarsource
917f68ce82
Create rule S6281: Add JS as covered language (APPSEC-43) (#1089) 2022-07-08 11:17:51 +02:00
pedro-oliveira-sonarsource
aee9eba90a
Create rule S6252: Add JS as covered language (APPSEC-42) (#1093) 2022-07-08 11:17:31 +02:00
SonarTech
471360888a update coverage information 2022-07-08 00:36:25 +00:00
Elena Vilchik
312e4b4e26
Modify rule S1534: report on JSX (#1092) 2022-07-07 16:18:42 +02:00
github-actions[bot]
d75f4281a2
Create rule S6438: Comments inside JSX expressions should be enclosed in curly braces (#1085) 2022-07-07 12:02:31 +02:00
Arseniy Zaostrovnykh
e0abb5501c
BUILD-1697 enable update_coverage to run cirrus CI checks without human intervention (#1099)
following the @drautureau-sonarsource advice from https://jira.sonarsource.com/browse/BUILD-1697
2022-07-07 08:08:47 +00:00
Victor
39b281be31
Modify rule S1143: improve the description (no functional change) (#1097) 2022-07-05 16:12:41 +02:00
github-actions[bot]
76c20fcf7e
Create rule S6435: React render function must always return a value (#1075) 2022-07-05 10:29:37 +02:00
chrislain-razafimahefa-sonarsource
feab867523
Modify rule S6246: Fix quality profile, type, severity and remediation (#1082) 2022-07-04 10:06:51 +02:00
Alban Auzeill
b72d96fcb0
Modify rule S6244: Fix an unsupported uppercase tag (#1086) 2022-06-30 15:10:10 +02:00
Dorian Burihabwa
0ee527d413
Modify rule S6242 (#1074)
Relates to SONARJAVA-4134

* Set lower case aws tag
* Fix text formatting issue
2022-06-30 10:13:16 +02:00
Nils Werner
7c9770dd02 Modify rule S1854: Update Non Compliant Code Example 2022-06-29 11:44:49 +02:00
Johann Beleites
a203cccf9e
Modify rule S6263: Add info about scope of rule and correct upper-case tag to be lower-case. (#1078)
* Add info about the scope of the rule and correct the upper-case tag to be lower-case.
* Improve grammar and spelling
2022-06-28 16:58:48 +02:00
Ilia Kebets
97b8411e55
Modify rule S6295: Fix (non)compliant snippets (#1079) 2022-06-28 13:42:03 +02:00
chrislain-razafimahefa-sonarsource
f427018292
S6262: Change AWS to aws (#1069) 2022-06-27 15:06:59 +02:00
Loïc Joly
78f96067b5
Modify rule S5415: CPP-3695 Improve the RSPEC 2022-06-27 12:37:54 +00:00
Loïc Joly
d77733c1f9
CPP-2907 S1199: Rule is too strict for variables in case blocks
Make the description more C++-oriented
Change the example (the previous one is now going to be compliant)
Make rule more descriptive wrt switch cases
2022-06-24 21:37:39 +00:00
Dorian Burihabwa
7c041dea2a
Modify rule S6241 (#1067)
SONARJAVA-4133
* Change AWS tag to lower cased aws
* Fix weird text formatting
2022-06-24 15:40:34 +02:00
Čaba Šagi
4b0220d710
Remove common rule S1484 (InsufficientCommentDensity) (#1055) 2022-06-24 13:34:09 +02:00
Čaba Šagi
9905b6e128
Remove rule S3424 (#1056) 2022-06-24 13:33:08 +02:00
Čaba Šagi
affaaad60d
Remove common rule S1483 (InsufficientLineCoverage) (#1057) 2022-06-24 13:32:09 +02:00
Čaba Šagi
5bad4294fb
Remove common rule S1606 (FailedUnitTests) (#1058) 2022-06-24 13:26:50 +02:00
Čaba Šagi
2e061abfee
Remove common rule S1482 (SQ key InsufficientBranchCoverage) (#1059) 2022-06-24 13:23:23 +02:00
Johann Beleites
387552cc39 Improve message, tags, and compliant and non-compliant examples 2022-06-23 16:52:00 +02:00
SonarTech
b53aba6032 update coverage information 2022-06-23 13:58:06 +00:00
Victor
07ea1d0875
Modify rule S3616: Add exception for switch (true) (#1070) 2022-06-23 12:40:39 +00:00
Victor
36789d487d
Modify rule S1788: Add exception for Redux reducers (#1068) 2022-06-22 13:51:27 +02:00
Marco Antognini
10ea9126c2
Modify rule S5813: Improve description 2022-06-20 10:41:17 +02:00
SonarTech
a76cf7486e update coverage information 2022-06-18 00:34:22 +00:00
Čaba Šagi
b8a6a2bd15
Remove rule S1477 (#1053) 2022-06-17 16:05:10 +02:00
SonarTech
75dfcb8723 update coverage information 2022-06-17 00:32:59 +00:00
Pierre-Loup
fdb29cd2e3
Modify rule S5542: update rule description (#1050) 2022-06-16 22:54:35 +02:00
Pierre-Loup
4859b5747a
Revert "Modify rule S5542[cfamilly]: reconsider if the rule should raise when CBC mode is used (APPSEC-28) (#1046)" (#1049)
This reverts commit a5979e14153777080a3d797c109dcb0402d926ca.
2022-06-16 22:41:20 +02:00
Pierre-Loup
a5979e1415
Modify rule S5542[cfamilly]: reconsider if the rule should raise when CBC mode is used (APPSEC-28) (#1046) 2022-06-16 16:53:22 +02:00
Arseniy Zaostrovnykh
4d57064e05
Modify rule S5852: replace the broken link
Using the archived version of the page. The initial version is no longer available, but the story was so interesting that we want to be able to share it nonetheless.
2022-06-16 15:38:26 +02:00
Loïc Joly
e13f5a7313
Modify rule S3135: "sizeof" should not be called on pointer parameters (CPP-220) 2022-06-16 13:20:43 +02:00
SonarTech
98225d8ef8 update coverage information 2022-06-16 00:33:31 +00:00
SonarTech
c016b7b045 update coverage information 2022-06-14 00:36:58 +00:00
Ilia Kebets
a30f04f139
Modify rule S4125: remove types from code examples and add BigInt (#1044) 2022-06-13 15:43:02 +02:00
Costin Zaharia
ff35e55506
Modify dotnet rules to not end with a dot (#1043) 2022-06-10 16:30:52 +02:00
Nils Werner
8da222e34c Modify rule S5799: Provide quickfix information 2022-06-10 16:05:02 +02:00
Nils Werner
3860d88e4e Modify rule S5719: Provide quickfix information 2022-06-10 16:05:02 +02:00
Nils Werner
147f57e75c Modify rule S5717: Provide quickfix information 2022-06-10 16:05:02 +02:00
Nils Werner
c8e1d04f52 Modify rule S3923: Provide quickfix information 2022-06-10 16:05:02 +02:00
Nils Werner
78de262485 Modify rule S2710: Provide quickfix information 2022-06-10 16:05:02 +02:00
Nils Werner
d017c6680c Modify rule S1940: Provide quickfix information 2022-06-10 16:05:02 +02:00
Nils Werner
1a8c639fdb Modify rule S1854: Provide quickfix information 2022-06-10 16:05:02 +02:00
Alexandre Gigleux
bc56f59b85
Add missing type in the "Sensitive Code Example" (#1041) 2022-06-10 09:16:12 +02:00
dependabot[bot]
31c7e69070
[dependabot] Bump async from 2.6.3 to 2.6.4 in /frontend (#1028)
Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v2.6.3...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-10 09:09:32 +02:00
Loïc Joly
7d42256574
Modify rule S6069: Correct typo CPP-3718 2022-06-10 08:34:40 +02:00
Loïc Joly
4807df8e0e
Modify rule S5798: Correct typos CPP-3717 2022-06-10 08:32:34 +02:00
tomasz-kaminski-sonarsource
9fac6c3cb6
Modify rule S3715: Add more examples of GNU extensions 2022-06-09 17:08:49 +02:00
Amélie Renard
554915f93a
CPP-3669 S1764: Align RSPEC with implementation 2022-06-09 16:55:31 +02:00
Nils Werner
9b335e0b7f
Modify rule S6402: Align code examples with implementation (#1038) 2022-06-09 16:03:24 +02:00
Guillaume Dequenne
c7a35480a8
Modify rule S2259: Update rule description for Python (#1037) 2022-06-09 12:06:39 +02:00
Costin Zaharia
ead778a3c2
Modify rule S6354: remove ending dot (#1032) 2022-06-09 11:39:08 +02:00
Loïc Joly
39227ca884
CPP-3710 S3806 Also report include directives with a trailing space 2022-06-09 10:01:51 +02:00
Arseniy Zaostrovnykh
ec478edebc
RULEAPI-763 add an exception for medium.com links in probing script
The exceptions might be removed once RULEAPI-763 is resolved
2022-06-08 13:54:26 +02:00
Arseniy Zaostrovnykh
6800da7e05
RULEAPI-762: Fix link-probing cache: cache on failure and success 2022-06-08 13:52:21 +02:00
Loïc Joly
fedc6f1b2b
Modify rule S6234: Improve rule specification (CPP-3713) 2022-06-07 06:54:48 +00:00
SonarTech
74daa9da5a update coverage information 2022-06-07 00:33:02 +00:00
github-actions[bot]
0a6ca35327
Create rule S6427: Do not assign to a dereferenced optional CPP-3577 2022-06-06 11:29:32 +02:00
Loïc Joly
0364b938cd
Modify rule S5972 Update rule before implementation CPP-2631 2022-06-06 11:26:13 +02:00
SonarTech
b3d13b97e7 update coverage information 2022-06-04 00:32:50 +00:00
github-actions[bot]
f4807a8de3
Create rule S6420: Azure functions should reuse client instances rather than creating new ones with each function invocation. (#953) 2022-06-03 19:23:47 +02:00
github-actions[bot]
b507348cc2
Create rule S6419: Azure functions should be stateless. (#952) 2022-06-03 18:30:19 +02:00
github-actions[bot]
db35abb10b
Create rule S6422: Calls to "async" methods should not be blocking in Azure Functions (#957) 2022-06-03 18:27:26 +02:00
Loïc Joly
d8af59c2d3
Remove rule S3780 (CPP-1692)
This rule was never implemented.
A similar check was removed from clang-tidy, and the provided reasoning makes sense.
2022-06-03 18:01:06 +02:00
github-actions[bot]
d588fc1f01
Create rule S6424: Azure Functions - Entity interfaces restrictions (#964) 2022-06-03 14:49:13 +02:00
SonarTech
d7f56a330d update coverage information 2022-06-03 00:32:33 +00:00
github-actions[bot]
6c53f114d2
Modify rule S6397: Add JavaScript as covered language (#1022)
Co-authored-by: Ilia Kebets <ilia.kebets@sonarsource.com>
2022-06-02 13:35:04 +02:00
SonarTech
19cd69ebd8 update coverage information 2022-06-02 00:36:09 +00:00
Loris S
d388a5d18a
Modify rule S6258[terraform]: Clarified the rule (#928) 2022-06-01 17:19:35 +02:00
github-actions[bot]
651deafd0c
Create rule S6421 : Azure Functions should use Structured Error Handling (#956) 2022-06-01 08:40:39 +02:00
SonarTech
7fc2bda252 update coverage information 2022-06-01 00:33:21 +00:00
github-actions[bot]
e88ba79121
Create rule S6423: Always log failures in Azure Functions (#960) 2022-05-31 17:15:01 +02:00
tomverin
fc94435299
BUILD-1577 migrate to new infra and BUILD-1551 update repox credentials 2022-05-31 14:12:36 +02:00
Loïc Joly
df072e67af
Remove RSPECs that we decided not to implement for CFamily
CPP-1556, CPP-1558, CPP-1621, CPP-1944, CPP-2010
2022-05-31 11:29:25 +02:00
SonarTech
f61c2f7d56 update coverage information 2022-05-30 12:41:46 +00:00
tomasz-kaminski-sonarsource
b92b328c45
Modify rules S1774,S3358: Add exception for C++11 constexpr functions (#1009) 2022-05-30 10:46:08 +02:00
Pierre-Loup
83209561fe
[RULEAPI-761] JSON schema fails to restrict the format of security-standard items (#1013) 2022-05-25 16:36:49 +02:00
Loris S
33aaca1316
RULEAPI-760: Add a new language identifier for kubernetes rules (#992) 2022-05-25 10:04:20 +02:00
Loïc Joly
2214b8c662
Modify rule S5271: only enable the rule starting C++11 2022-05-25 09:34:33 +02:00
dependabot[bot]
9a3a511baf
[dependabot] Bump ejs from 3.1.6 to 3.1.8 in /frontend
Bumps [ejs](https://github.com/mde/ejs) from 3.1.6 to 3.1.8.
- [Release notes](https://github.com/mde/ejs/releases)
- [Changelog](https://github.com/mde/ejs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mde/ejs/compare/v3.1.6...v3.1.8)

---
updated-dependencies:
- dependency-name: ejs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-25 09:21:43 +02:00
dependabot[bot]
c2d50e0bdf
[dependabot] Bump pyjwt from 2.1.0 to 2.4.0 in /rspec-tools
Bumps [pyjwt](https://github.com/jpadilla/pyjwt) from 2.1.0 to 2.4.0.
- [Release notes](https://github.com/jpadilla/pyjwt/releases)
- [Changelog](https://github.com/jpadilla/pyjwt/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/jpadilla/pyjwt/compare/2.1.0...2.4.0)

---
updated-dependencies:
- dependency-name: pyjwt
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-25 08:18:02 +02:00
SonarTech
b1f5220946 update coverage information 2022-05-25 00:32:53 +00:00
pedro-oliveira-sonarsource
b04b29019c
[APPSEC-3] Security rules are mapped to PCI DSS 4.0 (#1007) 2022-05-24 16:19:27 +02:00
Yassin Kammoun
35ff3fadfc
Modify rule S3504: Enable in SonarWay profile (#1008) 2022-05-24 15:29:39 +02:00
github-actions[bot]
1a5045472d
Create rule S6426: Exclusive tests should not be commited to version control (#985) 2022-05-24 14:39:15 +02:00
Karim El Ouerghemmi
c34cebc122
Adapt python code example (#1012) 2022-05-24 13:56:11 +02:00
pedro-oliveira-sonarsource
4cd575af12
[APPSEC-2] New security standard - PCI DSS 3.2 (#1005) 2022-05-23 09:00:28 +02:00
tomasz-kaminski-sonarsource
5ef8bdd258
Modify rule S3230: Apply assigment and default initialization to C++03 2022-05-23 08:27:16 +02:00
SonarTech
8367b5d93d update coverage information 2022-05-17 00:33:11 +00:00
quentin-jaquier-sonarsource
2e89633b2f
Modify rule S6418: change parameter to Randomness Sensibility (#951) 2022-05-13 16:10:08 +02:00
quentin-jaquier-sonarsource
8d53d7bce3
Modify rule S1121: add example for relational expression (#988) 2022-05-13 14:43:32 +02:00
tomasz-kaminski-sonarsource
cad1d66f79
Modify rule S2738 S1181: Add exception for destructors 2022-05-13 14:38:03 +02:00
Arseniy Zaostrovnykh
d546479d27
Modify rule S864: remove stray "in" preposition 2022-05-13 10:24:14 +00:00
Jeanne
95f9f76bb8 fix typo in "unmarshaling" 2022-05-12 16:19:25 +02:00
Jeanne
64594b0d1c fix typo in "developement" 2022-05-12 16:19:25 +02:00
quentin-jaquier-sonarsource
eb2b17ea34
Fix non-capturing group characters in S6395 description (#982) 2022-05-12 11:30:46 +02:00
SonarTech
858280d7df update coverage information 2022-05-12 00:33:11 +00:00
Arseniy Zaostrovnykh
1263c4b9de
Modify rules S131 S3562: CPP-3692 clarify difference and purpose 2022-05-11 17:40:43 +02:00
Arseniy Zaostrovnykh
3bf7b62bb9
Modify rule S4524: highlight src and set quickfix to targeted
As part of the rule implementation - CPP-2004
Ticket for the quickfix: CPP-3690
2022-05-11 17:01:35 +02:00
chrislain-razafimahefa-sonarsource
a95b5bb5fd
Modify rule S4968: improve issue's title and message (#980) 2022-05-11 10:08:57 +02:00
SonarTech
dbd00789c5 update coverage information 2022-05-11 00:32:41 +00:00
marco-bearzi-sonarsource
39198d59e0
Modify rule S6265: Add Python as covered language (#969) 2022-05-10 11:09:02 +02:00
marco-bearzi-sonarsource
2ac4200691
Modify rule S6249: Add Python as covered language (#970) 2022-05-10 11:08:38 +02:00
Nils Werner
cdff544c36
Modify rule S6252: Add python as covered language (#971) 2022-05-10 11:07:30 +02:00
Nils Werner
be39a6d18f
Modify rule S6245: Add python as covered language (#972) 2022-05-10 11:07:11 +02:00
marco-bearzi-sonarsource
335f9e1963
Modify rule S6281: Add Python as covered language (#973) 2022-05-10 11:00:24 +02:00
SonarTech
7029a5e037 update coverage information 2022-05-10 06:59:39 +00:00
Michael Gumowski
7daa44bf11 Modify rule S6395: Add Java as covered language 2022-05-09 08:48:55 +02:00
SonarTech
38ceff1c14 update coverage information 2022-05-07 00:32:11 +00:00
SonarTech
98c0fa4a65 update coverage information 2022-05-06 00:32:19 +00:00
quentin-jaquier-sonarsource
8cb43cdefe Modify rule S6331: Add Java as covered language 2022-05-05 15:17:24 +02:00
Pierre-Loup
f2cde97644
Modify S2083 & S4639: update security standards and fix typo (#979) 2022-05-05 09:33:15 +02:00
quentin-jaquier-sonarsource
48d432c244 Update S1158 description 2022-05-05 09:04:16 +02:00
quentin-jaquier-sonarsource
a00ad447fa Deprecate rule S2131 2022-05-05 09:04:16 +02:00
SonarTech
8069659b03 update coverage information 2022-05-05 00:32:57 +00:00
SonarTech
999572b8b0 update coverage information 2022-05-03 00:32:42 +00:00
Quentin Jaquier
56d2d0e176 Modify rule S6396: Add Java as covered language 2022-05-02 14:22:28 +02:00
SonarTech
267aea5771 update coverage information 2022-04-30 00:33:35 +00:00
SonarTech
47b28e78ad update coverage information 2022-04-29 00:33:38 +00:00
quentin-jaquier-sonarsource
070785e128 Modify rule S6397: add code examples with metacharacters 2022-04-28 16:41:32 +02:00
Quentin Jaquier
5236289cf2 Modify rule S6397: Add Java as covered language 2022-04-28 14:56:04 +02:00
Quentin Jaquier
b48bd54bd4 Modify rule S6326: Add Java as covered language 2022-04-28 09:22:27 +02:00
SonarTech
0f20623062 update coverage information 2022-04-27 00:34:07 +00:00
github-actions[bot]
f7ddb8be30
Modify rule S1158: mark quick fix as "covered" (#968)
Co-authored-by: quentin-jaquier-sonarsource <quentin-jaquier-sonarsource@users.noreply.github.com>
2022-04-26 14:51:21 +02:00
SonarTech
37ebce38f8 update coverage information 2022-04-26 00:33:03 +00:00
quentin-jaquier-sonarsource
3164e73b89
Modify rule S6353: Add Java as covered language (#766) 2022-04-25 17:48:18 +02:00
Alban Auzeill
8ac290657c
Fix S6411 'Implementation Specification' section exported in rule description (#966) 2022-04-22 18:35:58 +02:00
Pavel Mikula
03b2d455d9
S4581 cleanup (#965) 2022-04-22 17:08:57 +02:00
tomasz-kaminski-sonarsource
ff5763ad2a
Modify rule S6018: Clarify that constexpr variables are not inline
This is leftover from CPP-3035.
2022-04-21 15:20:39 +02:00
github-actions[bot]
56ec85f13e
Create rule S6411 (#744) 2022-04-21 13:36:28 +02:00
github-actions[bot]
7cf025509e
Create rule S6417: Collections should not be modified while they are iterated (#825) 2022-04-19 17:06:27 +02:00
Hendrik Buchwald
dd68b1785b Fix typos in S6212 2022-04-19 14:04:18 +02:00
Hendrik Buchwald
decfcc38b1 Fix typos in S6212 2022-04-19 14:04:18 +02:00
SonarTech
59b21382c6 update coverage information 2022-04-14 00:32:50 +00:00
Pavel Mikula
86193354a0
Fix PL/SQL broken links (#940) 2022-04-13 11:17:01 +02:00
github-actions[bot]
eb20454117
Create rule S6418: Hard-coded secrets are security-sensitive (#911) 2022-04-13 10:10:31 +02:00
Arseniy Zaostrovnykh
bb042389fa Mock temporary rspec repo 2022-04-13 00:28:19 -07:00
Arseniy Zaostrovnykh
c475f0d6de RULEAPI-753: Use modern ids and coalesce the coverage for legacy ids 2022-04-13 00:28:19 -07:00
Alexandre Gigleux
9cb2845112
Support of PCI DSS v3.2 (#925)
* Rename "PCI DSS" to "PCI DSS 3.2" because the security standard is versioned
* Update metadata.json of one rule using the wrong "PCI DSS"
2022-04-12 21:58:21 +02:00
Alexandre Gigleux
d5d54202d0
Modify rule S6377: Enhance the Noncompliant / Compliant examples (#946) 2022-04-12 21:57:26 +02:00
hendrik-buchwald-sonarsource
3fb6748a07
Modify rule S6412: Fix tags (#924) 2022-04-12 17:11:39 +02:00
Yassin Kammoun
51c013f814
Modify rule S100: Ignore React Functional Components (#949) 2022-04-12 16:58:51 +02:00
hendrik-buchwald-sonarsource
4d44fc3fac
Adjust literals in styling guide to SC Design System (#947) 2022-04-12 08:57:59 +00:00
Yassin Kammoun
129b307b48
Modify rule S5362: Narrow down the rule scope (#948) 2022-04-12 10:30:16 +02:00
Yassin Kammoun
6b505f2465
Modify rule S4650: Activate rule by default (#944) 2022-04-11 16:19:37 +02:00
Yassin Kammoun
7d4ddb4b1d
Modify rule S138: Ignore React Functional Components (#942) 2022-04-11 15:27:40 +02:00
SonarTech
19e651a31e update coverage information 2022-04-08 00:32:11 +00:00
marco-bearzi-sonarsource
a2b1a23a1d
Modify rule S1289: rectify code example (#938) 2022-04-07 16:15:23 +02:00
jtingsanchali
96d9ddb930
RULEAPI-755 Update CWE URLs by removing .html suffix and update with https protocol (#926)
* Change affects only see.adoc and rule.adoc files, not comments-and-links.adoc files
2022-04-07 08:53:59 -05:00
Pierre-Loup
d5572cefe6
Revert "Modify rule S6249: Update issue message (#879)" (#934)
This reverts commit a6eed4fa5953db4a4b9c3f0db8b2fb6dc4e0690d.

Co-authored-by: Loris S <91723853+loris-s-sonarsource@users.noreply.github.com>
2022-04-06 14:44:06 +02:00
Alexandre Gigleux
e91aae3190
Modify rule S6377: better description (#929) 2022-04-06 12:39:18 +00:00
Pierre-Loup
f66d0df9c5
Modify rule S6317: Add message, highlighting and the list of supported privilege escalation vector details (#872) 2022-04-05 14:57:22 +02:00
Pierre-Loup
a6eed4fa59
Modify rule S6249: Update issue message (#879) 2022-04-05 14:57:08 +02:00
Pierre-Loup
99f36a41be
Modify rule S6304: Update rule title (#887) 2022-04-05 14:56:24 +02:00
Marco Antognini
a1d49e7e84
Reference the styling guide
Bring more visibility to the styling guidelines.
2022-04-05 14:48:04 +02:00
eric-therond-sonarsource
342a118ecb
Update rule S5122 [java/js] taint/user-controlled code examples (#291) 2022-04-05 12:46:33 +00:00
eric-therond-sonarsource
aea749c469
Update rule S5122 [python/php/csharp] taint/user-controlled code examples (#283) 2022-04-05 12:38:54 +00:00
eric-therond-sonarsource
d50b957627
Modify Rule S6173: add php code samples (#823) 2022-04-05 14:27:35 +02:00
hendrik-buchwald-sonarsource
2cbeca92bc
Add styling guide to docs (#930) 2022-04-05 12:13:17 +02:00
Arseniy Zaostrovnykh
1911fca994
Mock analyzer repos for the coverage test
This removes the dependency on online repositories (on GitHub)
and speeds up the test by stripping the number of versions and files to a minimum.
Prepare the ground for RULEAPI-753.
2022-04-05 09:44:09 +02:00
hendrik-buchwald-sonarsource
b9179c277f
Modify rule S6400: Fix Terraform tags (#920) 2022-04-04 18:01:08 +02:00
hendrik-buchwald-sonarsource
13c880ecfa
Modify rule S6408: Fix cwe tag (#921) 2022-04-04 18:00:43 +02:00
hendrik-buchwald-sonarsource
f71b0838f3
Modify rule S6406: Fix cwe tag (#922) 2022-04-04 18:00:26 +02:00
hendrik-buchwald-sonarsource
736d58d22b
Modify rule S5332: Fix tags (#923) 2022-04-04 18:00:00 +02:00
SonarTech
b4659b281a update coverage information 2022-04-02 00:32:12 +00:00
Marco Antognini
57ee91d8ff
Modify rule S3574: Update rule and add Sonar Way quality profile 2022-04-01 14:08:08 +02:00
Pierre-Loup
0663803eef
Add missing CWE link to See section (#919) 2022-04-01 09:54:11 +02:00
SonarTech
9691fab2b5 update coverage information 2022-04-01 00:33:31 +00:00
hendrik-buchwald-sonarsource
b9633d2e68
Modify rule S6258: Remove GCP tag from CF 2022-03-31 16:51:02 +02:00
SonarTech
a272b8ffba update coverage information 2022-03-31 00:33:12 +00:00
Pavel Mikula
bfe54e5124
Modify rule S2222: Add C# and VB.NET to SonarWay (#831) 2022-03-30 11:22:19 +02:00
SonarTech
2be107e26f update coverage information 2022-03-30 00:32:08 +00:00
Andrea Guarino
16d5ee4151
Modify rule S2190: adjust rule description for Java (#816) 2022-03-29 16:27:18 +02:00
github-actions[bot]
566b350976
Create rule S6416: Calls to methods should not trigger an IllegalArgumentException (#812) 2022-03-29 16:09:37 +02:00
Elena Vilchik
7ac4d10cf9
Modify rule S1172: activate rule by default for JS (#917) 2022-03-29 14:08:08 +02:00
Nils Werner
e3089362aa
Modify rule S5996: Add Python as covered language (#540) 2022-03-29 09:32:01 +00:00
Nils Werner
9324ef2122
Modify rule S6396: Add Python as supported language (#787) 2022-03-29 09:53:05 +02:00
Nils Werner
8d60c0c8e0
Modify rule S6397: Add Python as supported language (#788) 2022-03-29 09:52:29 +02:00
Nils Werner
ee72e0268a
Modify rule S6323: Add Python as covered language (#789) 2022-03-29 09:51:20 +02:00
Nils Werner
70f4978f2a
Modify rule S6326: Add Python as supported language (#793) 2022-03-29 09:50:18 +02:00
Nils Werner
efc845f17c
Modify rule S6328: Add Python as covered language (#797) 2022-03-29 09:49:08 +02:00
Nils Werner
e39785564d
Modify rule S6331: Add Python as covered language (#798) 2022-03-29 09:47:35 +02:00
SonarTech
f307690d5a update coverage information 2022-03-29 00:32:17 +00:00
Elena Vilchik
aade169ff6
MMF-2707 Bring quick fixes to more JS and TS existing rules (#916) 2022-03-28 12:40:01 +02:00
Arseniy Zaostrovnykh
fe2fa30973
RULEAPI-752 enable search by legacy keys 2022-03-28 11:19:58 +02:00
dependabot[bot]
8deb29c951
[dependabot] Bump minimist from 1.2.5 to 1.2.6 in /frontend (#915)
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-28 10:34:08 +02:00
dependabot[bot]
ee7dfc2e60
[dependabot] Bump node-forge from 1.2.1 to 1.3.0 in /frontend (#913)
Bumps [node-forge](https://github.com/digitalbazaar/forge) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/digitalbazaar/forge/releases)
- [Changelog](https://github.com/digitalbazaar/forge/blob/main/CHANGELOG.md)
- [Commits](https://github.com/digitalbazaar/forge/compare/v1.2.1...v1.3.0)

---
updated-dependencies:
- dependency-name: node-forge
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-28 10:19:04 +02:00
SonarTech
f295526823 update coverage information 2022-03-26 00:34:46 +00:00
Pierre-Loup
e1e2738667
Modify rule S6364: Update issue message (#896)
* Modify rule S6364: Update issue message

* Update rules/S6364/message.adoc

Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>

Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-03-25 14:37:19 +00:00
Pierre-Loup
eb01502208
Modify rule S6332: Update issue message (#893)
* Modify rule S6332: Update issue message

* Replace "file systems" by "file system"

Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-03-25 14:29:23 +00:00
Pierre-Loup
77681ee967
Modify rule S6327: Update issue message (#890)
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-03-25 14:14:29 +00:00
Pierre-Loup
982cf55708
Modify rule S6319: Update issue message (#889)
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-03-25 14:02:59 +00:00
Pierre-Loup
d368adfeac
Modify rule S6281: Update issue messages (#884)
* Add messages and highlighting

* Update code examples

Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-03-25 13:41:52 +00:00
hendrik-buchwald-sonarsource
c2a3f34aa4
Modify Rule S6364: Add Azure (#755)
* Update rule

* Add Azure example

Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-03-25 13:22:32 +00:00
Čaba Šagi
b862a6a085
Modify rule S3242: fix typo 2022-03-25 12:39:24 +00:00
SonarTech
f2b57f0b2c update coverage information 2022-03-25 00:32:03 +00:00
Nils Werner
08fbf9bfd1
Modify rule S6395: Add Python as covered language (#799)
* Modify rule S6395: Add Python as covered language

* Address review suggestions
2022-03-24 16:23:48 +00:00
Nils Werner
de5d71f75f
Modify rule S6353: Add Python as covered language (#794) 2022-03-24 16:10:57 +00:00
Pierre-Loup
aa61a85380
Modify rule S6385: update secondary location message (#908)
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-03-24 08:16:19 +00:00
Pavel Mikula
ba0d14438f
Modify rule S2222: Update C# and VB.NET description (#910) 2022-03-23 16:26:39 +00:00
github-actions[bot]
ceeab5a306
Create rule S6413: Defining a short log retention duration is security-sensitive (#758)
* Create rule S6413

* Add first draft

* Extend highlighting

* Rewrite recommended

* Rewrite recommended

* Update rules/S6413/recommended.adoc

Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>

* Add missing dot

* Add additional description

Co-authored-by: hendrik-buchwald-sonarsource <hendrik-buchwald-sonarsource@users.noreply.github.com>
Co-authored-by: Hendrik Buchwald <hendrik.buchwald@sonarsource.com>
Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>
Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Pierre-Loup <pierre-loup.tristant@sonarsource.com>
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-03-23 15:46:34 +01:00
Loïc Joly
6728384ae1
CPP-3623 S6214 S6183: Clarify the relationship between those rules 2022-03-23 14:45:29 +01:00
Andrea Guarino
c6cf79dd9a
Modify rule S3801: adjust description for Python (#834) 2022-03-22 09:37:51 +00:00
Andrea Guarino
a8af9b3d3f
Adjust S3699 description for Python (#836) 2022-03-22 10:32:09 +01:00
Andrea Guarino
4b6e5178a4
Modify rule S1172: adjust description for Python (#840) 2022-03-22 10:24:23 +01:00
marco-bearzi-sonarsource
8200d4e894
Modify rule S1291: Add non-compliant code for python (#902) 2022-03-21 08:55:09 +01:00
marco-bearzi-sonarsource
d26c72fd30
Modify rule S2761: Add more precise error message and description for python (#907)
* Add more precise error message and description

* Insert exception

* Update compliant code to take into account the bool() function
2022-03-18 17:41:25 +01:00
Pierre-Loup
e0592e8676
Modify rule S6270: Update issue message and rule title (#882)
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-03-17 13:31:48 +00:00
github-actions[bot]
72e34bab65
Modify rule S6031: mark quick fix as "partial" 2022-03-17 12:03:37 +00:00
Loïc Joly
7f8d0492b5
Remove redirecting link to cognitive complexity white-paper
Use the direct link to the pdf instead. Currently, both links are equivalent, but the redirection might not work in the future.
2022-03-17 09:53:18 +00:00
Andrea Guarino
bbf9e58d83
Modify rule S1451: adjust description for Python (#843) 2022-03-17 08:30:42 +01:00
Pierre-Loup
dfc25a812c
Modify rule S6308: Update issue message (#888)
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-03-16 13:32:29 +00:00
Pierre-Loup
2d910e276c
Modify rule S6303: Update issue message (#886)
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-03-16 12:32:37 +00:00
Pierre-Loup
19b4026a2d
Modify rule S6252: Update message and title (#880)
* Update message

* Update rule title "Ask Yourself: questions.

Ask Yourself question is update with the content from S6412

* Update code examples

* Apply suggestions from code review

Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>

Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-03-16 09:27:31 +00:00
Pierre-Loup
0236f41b98
Modify rule S6255: Update issue message (#881)
* Update message

* Update code examples

* Fix extra coma

Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-03-16 08:54:32 +00:00
Pierre-Loup
b6c6fd7320
Modify rule S6275: update issue message and code examples (#883)
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-03-15 15:46:48 +00:00
marco-bearzi-sonarsource
5f47dbbe15
Modify rule S2761: Rectify comments (#905) 2022-03-15 15:50:38 +01:00
Pierre-Loup
c54b8f8b6c
Modify rule S6329: Update issue message (#891) 2022-03-15 10:55:32 +00:00
Pierre-Loup
8088852221
Modify rule S6375: Add secondary locations (#877) 2022-03-15 10:33:40 +00:00
Pierre-Loup
f3d3c4c8e3
Modify rule S6330: Update issue message (#892) 2022-03-15 09:32:09 +00:00
SonarTech
a7a6ac40d7 update coverage information 2022-03-15 00:31:58 +00:00
Pierre-Loup
9b3d87a04b
Modify rule S6378: Update issue message (#876) 2022-03-14 15:29:40 +00:00
Pierre-Loup
856eeb79b1
Modify rule S6385: Update highlighting (#904) 2022-03-14 16:06:04 +01:00
Pierre-Loup
fde6a5f0df
Modify rule S6245: Update issue message (#875) 2022-03-14 14:41:19 +00:00
Andrea Guarino
23a9a29023
Modify rule S2761: edit title and description for Python (#837)
* Edit title and description of rule S2761 for Python

* Fix after review

* Update type to code smell

* Update message

Co-authored-by: Marco Bearzi <marco.bearzi@sonarsource.com>
2022-03-14 15:07:47 +01:00
Pierre-Loup
c3ae588343
Modify rule S5332: Update issue message (#874)
For Terraform and Cloudformation
2022-03-14 14:00:11 +00:00
Pierre-Loup
faa24755ff
Modify S4423: Fix messages for Terraform and Cloudformation 2022-03-14 13:28:34 +00:00
Pierre-Loup
d69417e02d
Modify rule S6383: Add secondary location (#895)
* Modify rule S6383: Add secondary location

* Change secondary location message

Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>

* Update message for primary location

Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>

Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>
2022-03-14 13:15:31 +00:00
Costin Zaharia
58fd91de71
Modify rule S3459: document exception (#900) 2022-03-14 12:22:38 +00:00
Costin Zaharia
cf211533a6
Modify rule S4226: document exception (#899) 2022-03-14 12:12:29 +00:00
Elena Vilchik
72c111c062
Update noncompliant code example for S1126 (JS) (#885) 2022-03-14 11:19:40 +00:00
Massimo Paladin
20d130a152
CPP-3597: Remove CFamily legacy rules id 2022-03-14 11:09:00 +00:00
marco-bearzi-sonarsource
27cf7b278f
Modify rule S1940: Add code examples for python (#897)
* Modify rule S1940: Add code examples for python

* Fix path
2022-03-14 11:23:49 +01:00
Arseniy Zaostrovnykh
a1ef6b440c
Modify Rule S6006: implement quickfix (#769) 2022-03-14 08:46:31 +00:00
SonarTech
3eaceb80f7 update coverage information 2022-03-12 00:33:02 +00:00
SonarTech
7c20cf9bce update coverage information 2022-03-11 00:32:22 +00:00
github-actions[bot]
94b673efbb
Modify rule S1659: mark quick fix as "partial" 2022-03-10 16:00:02 +00:00
Loïc Joly
8a7ecd051b
S1988 Delete never implemented duplicated rule
Removed as discussed in CPP-1071
2022-03-09 15:13:41 +00:00
github-actions[bot]
7f154a7617
Modify rule S5955: mark quick fix as "partial" (#854) 2022-03-09 11:01:23 +00:00
Arseniy Zaostrovnykh
f7353489fc
Enable rules removal: do not validate deleted rules 2022-03-08 12:26:53 +00:00
Marco Antognini
02cae0ceb0
Fix SonarQube warning about missing reference for analysis (#796) 2022-03-08 10:31:27 +00:00
github-actions[bot]
08d650ab42
Modify rule S6016: mark quick fix as "partial" 2022-03-08 10:16:18 +00:00
Fred Tingaud
0bc6aa81ce
Deprecate rule S3400: deprecate rule for CFamily (CPP-3456)
Deprecate rule for CFamily as it would have too many exceptions and brings little value.
2022-03-08 10:47:32 +01:00
SonarTech
ad709a4fe2 update coverage information 2022-03-08 00:32:29 +00:00
eric-therond-sonarsource
20d51427a0
Modify rule S6258[terraform]: Add GCP modules (#778)
* modify S6285: add terraform gcp

* add additional flags for sql logging

* fixes after review

* Add code highlighted tag to code example

Co-authored-by: Nils Werner <nils.werner@sonarsource.com>
2022-03-07 10:45:11 +00:00
Pierre-Loup
c66125093d
Modify rule S6413: Add Google Cloud Logging bucket support (#804)
* Create rule S6413

* Add first draft

* Extend highlighting

* Rewrite recommended

* Rewrite recommended

* Update rules/S6413/recommended.adoc

Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>

* Add missing dot

* Add additional description

* Add code GCP code examples

* Add missing "gcp" tag

Co-authored-by: hendrik-buchwald-sonarsource <hendrik-buchwald-sonarsource@users.noreply.github.com>
Co-authored-by: Hendrik Buchwald <hendrik.buchwald@sonarsource.com>
Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>
Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>
2022-03-07 09:14:13 +00:00
Arseniy Zaostrovnykh
89c7e09b35
Fix source history information shadowing for rspec-tools project 2022-03-07 09:47:57 +01:00
Čaba Šagi
f1c09da3ff
Modify rule S3453: Fix compliant code example for VBNet (#851) 2022-03-04 13:55:49 +00:00
Čaba Šagi
3758a4c96e
Fix doc (#866) 2022-03-04 14:49:40 +01:00
github-actions[bot]
00cae9e326
Create rule S6412[terraform]: Unversioned Google Cloud Storage buckets are security-sensitive (#749)
* Create rule S6412

* init s6412

* fixes after review

* remove one ask yourself question

* Add code highlighted tag to code example

Co-authored-by: eric-therond-sonarsource <eric-therond-sonarsource@users.noreply.github.com>
Co-authored-by: eric-therond-sonarsource <eric.therond@sonarsource.com>
Co-authored-by: Nils Werner <nils.werner@sonarsource.com>
2022-03-04 13:27:35 +00:00
github-actions[bot]
e7aa3e8c2e
Create rule S6414[terraform]: Excluding users or groups activities from audit logs is security-sensitive (#805)
* Create rule S6414

* init s6414

* fixes after review

* fix noncompliant sample

* Fix typo in the rule title

* Add code highlighted tag to code example

Co-authored-by: eric-therond-sonarsource <eric-therond-sonarsource@users.noreply.github.com>
Co-authored-by: eric-therond-sonarsource <eric.therond@sonarsource.com>
Co-authored-by: Pierre-Loup Tristant <pierre-loup.tristant@sonarsource.com>
Co-authored-by: Nils Werner <nils.werner@sonarsource.com>
2022-03-04 12:52:46 +00:00
github-actions[bot]
a0db1c44a0
Modify rule S1481: mark quick fix as "partial" (only lambda captures) 2022-03-04 13:36:32 +01:00
github-actions[bot]
e682cccbd5
Modify rule S6230: mark quick fix as "partial" 2022-03-04 13:11:56 +01:00
marco-bearzi-sonarsource
e254f3328d
Modify rule S1135: Add non-compliant code example for python (#860) 2022-03-03 17:31:30 +01:00
github-actions[bot]
4c9626049e
Modify rule S6230: mark quick fix as "covered" (#859) 2022-03-03 11:46:37 +01:00
hendrik-buchwald-sonarsource
4e659743db
Modify Rule S6329: Make generic and add GCP (#733)
* Create rule S6392

* Add first draft

* improve title

* add last commit to this PR regarding public network access

* add metadata tags

* changed title

* converted ask yourself into generic cloud

* converted description into generic cloud

* moved aws links to see

* converted recommended to generic cloud

* convertion of recommended -- added a special case

* add cwe

* add note in recommended section, not sure about this one

* add another cwe

* add first version of rule conversion

* final rule version

* removed leftover code

* Update rules/S6329/description.adoc

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>

* Update rules/S6329/terraform/rule.adoc

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>

* changed case for bulleted list

* improved specs after review

* removed potential confusion

* changed company<->organization

* Update rules/S6329/ask-yourself.adoc

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>

* Update rules/S6329/description.adoc

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>

* Make generic

* Add GCP code sample

* Update rules/S6329/terraform/rule.adoc

Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>

* Fix syntax

Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com>
Co-authored-by: Loris S <91723853+loris-s-sonarsource@users.noreply.github.com>
2022-03-03 09:41:02 +01:00
github-actions[bot]
0357b3b2df
Create rule S6409: Enabling Attribute-Based Access Control for Kubernetes is security-sensitive (#737)
* Create rule S6409

* Add description

* Update rules/S6409/terraform/rule.adoc

Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>

Co-authored-by: hendrik-buchwald-sonarsource <hendrik-buchwald-sonarsource@users.noreply.github.com>
Co-authored-by: Hendrik Buchwald <hendrik.buchwald@sonarsource.com>
Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>
Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-03-02 20:54:36 +00:00
github-actions[bot]
5e09bc9f04
Create rule S6404[terraform]: Granting public access to GCP resources is security-sensitive (#713)
* Create rule S6404

* initial draft

* new ideas

* last little fixes before draft v1

* draftv1

* final version

* improved the text

* last commit

* very last

* Add code highlighted tag to code example

Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com>
Co-authored-by: Nils Werner <nils.werner@sonarsource.com>
2022-03-02 20:31:57 +00:00
github-actions[bot]
0aeb50c127
Create rule S6400[Terraform]: Granting highly privileged GCP resource rights is security-sensitive (#685)
* Create rule S6400

* first draft

* second draft

* relecture

* last relecture du matin

* another idea, last paragraph may be overkill

* add small precision for new resources

* Add code highlighted tag to code example

Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com>
Co-authored-by: Nils Werner <nils.werner@sonarsource.com>
2022-03-02 20:25:17 +00:00
eric-therond-sonarsource
3069550d46
Modify rule S5332[terraform]: add GCP load balancers (#760)
* add GCP balancers

* rephrase sentence

* fix after review

* Add code highlighted tag to code example

Co-authored-by: Nils Werner <nils.werner@sonarsource.com>
2022-03-02 14:19:10 +00:00
github-actions[bot]
b486a5246d
Create rule S6407[terraform]: Creating App Engine handlers without requiring TLS is security-sensitive (#725)
* Create rule S6407

* add rspecs6407 terraform

* fix typo in see section

* fixes after review

* Add code highlighted tag to code example

Co-authored-by: eric-therond-sonarsource <eric-therond-sonarsource@users.noreply.github.com>
Co-authored-by: eric-therond-sonarsource <eric.therond@sonarsource.com>
Co-authored-by: Nils Werner <nils.werner@sonarsource.com>
2022-03-02 14:02:00 +00:00
github-actions[bot]
d01eb2f856
Create rule S6405[terraform] Enabling project-wide SSH keys to access VM instances is security-sensitive (#720)
* Create rule S6405

* init s6405

* fixes after review

* Add code highlighted tag to code example

Co-authored-by: eric-therond-sonarsource <eric-therond-sonarsource@users.noreply.github.com>
Co-authored-by: eric-therond-sonarsource <eric.therond@sonarsource.com>
Co-authored-by: Nils Werner <nils.werner@sonarsource.com>
2022-03-02 13:55:09 +00:00
github-actions[bot]
bf856aefb2
Create rule S6402[terraform] Creating DNS zones without DNSSEC enabled is security-sensitive (#691)
* Create rule S6402

* init s6402

* fix

* fixes after review

* fixes after new review

* Add code highlighted tag to code example

Co-authored-by: eric-therond-sonarsource <eric-therond-sonarsource@users.noreply.github.com>
Co-authored-by: eric-therond-sonarsource <eric.therond@sonarsource.com>
Co-authored-by: Nils Werner <nils.werner@sonarsource.com>
2022-03-02 14:47:12 +01:00
github-actions[bot]
1e02f0224c
Create rule S6401[terraform] Creating keys without a rotation period is security-sensitive (#687)
* Create rule S6401

* init s6401

* fix small typo

* fixes after review

* Add code highlighted tag to code example

Co-authored-by: eric-therond-sonarsource <eric-therond-sonarsource@users.noreply.github.com>
Co-authored-by: eric-therond-sonarsource <eric.therond@sonarsource.com>
Co-authored-by: Nils Werner <nils.werner@sonarsource.com>
2022-03-02 14:33:39 +01:00
github-actions[bot]
aa6068e86e
Create rule S6410: Google Cloud load balancers SSL policies should not offer weak cipher suites (#741)
* Create rule S6410

* Add custom message

* Apply suggestions from code review

Co-authored-by: eric-therond-sonarsource <56015232+eric-therond-sonarsource@users.noreply.github.com>

* Update highlighting file extension

* Add code highlighted tag to code example

Co-authored-by: pierre-loup-tristant-sonarsource <pierre-loup-tristant-sonarsource@users.noreply.github.com>
Co-authored-by: Pierre-Loup Tristant <pierre-loup.tristant@sonarsource.com>
Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>
Co-authored-by: eric-therond-sonarsource <56015232+eric-therond-sonarsource@users.noreply.github.com>
Co-authored-by: Nils Werner <nils.werner@sonarsource.com>
2022-03-02 13:20:34 +00:00
github-actions[bot]
0417b41432
Modify rule S5495: mark quick fix as "covered" 2022-03-02 13:11:27 +00:00
Pierre-Loup
378f48c68d
Modify rule S4423[terraform]:Add SSL policy for Google Cloud load balancers (#761)
* Modify rule S4423[terraform]:Add SSL policy for Google Cloud load balancers

* Add custom message and update code examples

* Add code highlighted tag to code example

Co-authored-by: Nils Werner <nils.werner@sonarsource.com>
2022-03-02 14:04:14 +01:00
tomasz-kaminski-sonarsource
0a963a89fa
Modify rules S3608,S5019: Provide quickfix information
Co-authored-by: Tomasz Kamiński <tomasz.kamiński@sonarsource.com>
2022-03-02 11:49:55 +01:00
github-actions[bot]
75e88b6dda
Modify rule S5954: mark quick fix as "partial" and update rule title 2022-03-01 14:12:42 +00:00
Čaba Šagi
6117e282f6
Modify rule S4035: Cleanup Noncompliant example (#850) 2022-02-28 15:20:24 +01:00
tomasz-kaminski-sonarsource
917b6e916e
Modify rule S6011: Provide quickfix information 2022-02-28 15:06:16 +01:00
Marco Antognini
26e3ebc7ec Refactor rspec-tools and other cleanups
The main changes are:
 * Split RuleCreator: move some of its content to RspecRepo and to
   RuleEditor in new modules.
 * Refactor tests accordingly.

Other less important changes:
 * Sort and remove unnecessary imports
 * Remove unimplemented functions and unnecessary classes
 * Make some functions private
 * Move pushd from utils to tests where it is only used
 * Reduce code duplication here and there
 * Remove unnecessary Mock in some tests
 * Improve coverage for add_language_to_rule
2022-02-28 12:08:21 +01:00
Marco Antognini
dbb8027666 RULEAPI-748: Add new workflow to update quickfix status 2022-02-28 12:08:21 +01:00
SonarTech
60b973cf44 update coverage information 2022-02-26 00:32:15 +00:00
github-actions[bot]
4a750be849
Create rule S6354: Testable date/time provider should be used (#285) 2022-02-25 14:45:53 +01:00
Loris S
424a792370
Modify multiple rules: fixing missing double quotes and other typos (#846) 2022-02-23 13:50:31 +00:00
SonarTech
37a4c3f7a7 update coverage information 2022-02-23 12:05:38 +00:00
eric-therond-sonarsource
aa8b82989c
update sensitive code samples s6249 (#845) 2022-02-22 18:09:50 +01:00
Evgeny Mandrikov
34aad572a9
BUILD-1287 Add .github/CODEOWNERS 2022-02-22 17:21:19 +01:00
Fred Tingaud
1c7fadf592 Modify rule S6023: Add an example with std::move 2022-02-22 15:05:52 +01:00
Fred Tingaud
27f3bb0963 Modify rule S6023: Mark quickfix as covered 2022-02-22 15:05:52 +01:00
github-actions[bot]
4b9ca66416
Create rule S6403[terraform] Creating GCP SQL instances without requiring TLS is security-sensitive (#712)
* Create rule S6403

* init s6403

* fixes after review

* Add message for omitted attributes. (#844)

* Add message for omitted attributes.

* Update rules/S6403/message.adoc

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>

* Add new source tags for code examples

Co-authored-by: eric-therond-sonarsource <eric-therond-sonarsource@users.noreply.github.com>
Co-authored-by: eric-therond-sonarsource <eric.therond@sonarsource.com>
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>
Co-authored-by: Nils Werner <nils.werner@sonarsource.com>
2022-02-22 11:01:40 +00:00
SonarTech
14d0ef7a8c update coverage information 2022-02-22 00:31:52 +00:00
github-actions[bot]
2c94f81cc5
Create rule S6406[terraform]: Excessive Granting Of GCP IAM Permissions Is Security-Sensitive (#724)
* Create rule S6406

* first draft

* draft part2

* user-friendly draft v3

* light fix

* add link

* fix snippets columns

* final draft

* add metadata - 15min time because it's long

* Light -> Lightweight

* modern->sophisticated

* fix punctuation

* suggestion for snippets

* Update rules/S6406/terraform/rule.adoc

* Update rules/S6406/terraform/rule.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Update rules/S6406/terraform/rule.adoc

* Update rules/S6406/terraform/rule.adoc

* Update rules/S6406/terraform/rule.adoc

* Update rules/S6406/terraform/rule.adoc

* Update rules/S6406/terraform/rule.adoc

* Update rules/S6406/terraform/rule.adoc

* Update rules/S6406/terraform/rule.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Update rules/S6406/terraform/rule.adoc

* Update rules/S6406/terraform/rule.adoc

* Update rules/S6406/terraform/rule.adoc

* Update rules/S6406/terraform/rule.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Update rules/S6406/terraform/rule.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Update rules/S6406/terraform/rule.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Update rules/S6406/terraform/rule.adoc

* Update rules/S6406/terraform/rule.adoc

* Update rules/S6406/terraform/rule.adoc

* Update rules/S6406/terraform/rule.adoc

* Update rules/S6406/terraform/rule.adoc

* Update rules/S6406/terraform/rule.adoc

Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com>
Co-authored-by: Loris S <91723853+loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-02-18 16:26:42 +00:00
Pavel Mikula
0852b8714e
Modify rule S107: Fix C# example (#839) 2022-02-18 15:53:40 +01:00
Pavel Mikula
18c48813f6
Modify rule S107: Improve C# and VB.NET examples (#835) 2022-02-18 15:03:19 +01:00
Yassin Kammoun
335c2577c8
Modify rule S4328: Clarify what kind of problems could arise (#832)
Co-authored-by: Elena Vilchik <elena.vilchik@sonarsource.com>
2022-02-18 13:26:45 +00:00
Pavel Mikula
424c6dabdb
Modify rule S107: Synchronize exception for VB.NET with C# (#833) 2022-02-18 14:15:34 +01:00
Yassin Kammoun
a4e2e09d94
Modify rule S3317: Consider dot notation in filenames (#830) 2022-02-18 08:47:39 +00:00
Elena Vilchik
f9b555a4fa
Fix code example for JavaScript/S5843 (#659) 2022-02-18 08:35:04 +00:00
Yassin Kammoun
1951cd3baa
Modify rule S3735: Ignore JavaScript promises (#722) 2022-02-18 08:28:27 +00:00
Tibor Blenessy
2e49d6f58d
Update metadata for JS quickfixes (#809) 2022-02-18 08:20:48 +00:00
Yassin Kammoun
e864c4a697
Modify rule S1172: Match the behaviour of TypeScript compiler for JS/TS (#827)
Co-authored-by: vilchik.elena <elena.vilchik@sonarsource.com>
2022-02-18 08:15:47 +00:00
SonarTech
911d9e5f42 update coverage information 2022-02-18 00:32:28 +00:00
Dorian Burihabwa
769637860e
Modify rule S4601: Improve phrasing (#829) 2022-02-17 14:34:11 +01:00
Arseniy Zaostrovnykh
2ae2a1cf69
Modify Rule S1314: add quickfix and mention character literals CPP-3223
Implementation PR: https://github.com/SonarSource/sonar-cpp/pull/1785
2022-02-17 12:09:22 +00:00
Marco Antognini
5e4eb65257
Modify rule S6004: Mark quickfix as partial 2022-02-17 10:34:33 +00:00
SonarTech
cfd0d063b1 update coverage information 2022-02-17 00:32:00 +00:00
Arseniy Zaostrovnykh
9ceab1d675
Update rule S6020: implement a quick fix
Implementation PR https://github.com/SonarSource/sonar-cpp/pull/1788
2022-02-16 16:35:50 +01:00
Yassin Kammoun
24f9a0adbe
Modify rule S1763: Remove unsupported exceptions (#822) 2022-02-16 09:37:07 +00:00
Yassin Kammoun
5b5ba6b297
Modify rule S4204: Improve rule description (#826) 2022-02-16 10:31:39 +01:00
SonarTech
b55cbdf38b update coverage information 2022-02-16 00:31:35 +00:00
eric-therond-sonarsource
6fbd1856ba
Modify rule S2755[java]: Allow setExpandEntityReferences solution for openJDK >=13 (#299) 2022-02-15 16:51:53 +00:00
hendrik-buchwald-sonarsource
2a1211dc20
Modify rule S6173: Update default severity (#667) 2022-02-15 17:40:35 +01:00
eric-therond-sonarsource
fdd602f70d
update android rule tags metadata (#824) 2022-02-15 15:33:03 +01:00
github-actions[bot]
9f08bce20d
Create rule S6408[terraform]: Creating custom roles allowing privilege escalation is security-sensitive (#731)
* Create rule S6408

* first draft

* second draft

* fix

* metadata

* line breaks

* modern->sophisticated

* fixes following the review

Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com>
2022-02-15 12:16:21 +00:00
dependabot[bot]
5fe0e12655
[dependabot] Bump follow-redirects from 1.14.7 to 1.14.8 in /frontend (#821)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.7 to 1.14.8.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.7...v1.14.8)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-15 09:19:16 +01:00
Marco Antognini
d177126a00
Modify rule S1185: Mark quickfix as covered (#801) 2022-02-14 14:56:56 +00:00
hendrik-buchwald-sonarsource
f090bdb790
Modify Rule S6302: Make generic and add GCP (#717)
* Rename rule

* Add GCP tag

* Fix typo

* Revert last commit

* Add GCP

* Add missing information

* Apply suggestions from code review

Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>

* Add more dashes

* improved old snippets (equal sign alignment)

* Add 2nd location message

Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com>
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-02-14 13:27:21 +00:00
SonarTech
7ae19bcd72 update coverage information 2022-02-14 10:54:34 +00:00
Pavel Mikula
64dab48fbc
Modify rule S1155: Add QuickFix C# (#818) 2022-02-14 10:50:24 +01:00
abbas-sabra-sonarsource
3f207d5c07
Remove S2304 from sonarway only for CFamily 2022-02-11 16:04:17 +00:00
abbas-sabra-sonarsource
e1b3c2a36e
Remove S106 S3574 S2304 S3222 S6193 S6221 from sonarway 2022-02-11 14:26:05 +01:00
Arseniy Zaostrovnykh
2d6b5df540
Define all_required_checks task as the convenient waiting point (#813)
`update_coverage` action used to wait for `validate_asciidoc` to succeed as the task that takes the longest. After #782 is merged as f21f23b9860c10d4effb00b6022917bc28e02e61 it is no longer the case. This change introduces `all_required_checks` task that depends on all checks required for a PR to be merged, thus providing a single point that is known to succeed last and can be safely waited upon.
2022-02-11 09:35:24 +01:00
hendrik-buchwald-sonarsource
f4696dbf01
Modify rule S6321: Add GCP examples (#689)
* Remove AWS specific words

* Add Azure code samples

* Add Azure link

* Add missing tags

* Add samples

* Update rules/S6321/metadata.json

Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>

* Update rules/S6321/terraform/metadata.json

Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>

* Remove AWS tag

* Make description more generic

* Update rules/S6321/description.adoc

Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>

* Remove GCP tag

* Update rules/S6321/see.adoc

Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>

* Remove Azure tag

Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-02-11 08:19:08 +00:00
Fred Tingaud
338f89628c
Modify rule S6171: Mark quickfix as covered (#810) 2022-02-10 14:57:21 +01:00
Pierre-Loup
1b061d5ff5
Fix typo in OWASP links from the See section (#807)
* Fix typos in OWASP Top 10 2017 links
* Fixing wrong URI in OWASP Top 10 2021 A4 links
2022-02-10 09:11:45 +01:00
Pierre-Loup
5e8b6c4cd3
Fix compliant code example for csharp rule (#759)
S2083
2022-02-10 09:06:19 +01:00
Pierre-Loup
e44eb16a37
Modify S2819: update message (#732) 2022-02-09 17:41:43 +01:00
Malena Ebert
92da29769f
BUILD-1337: assign LGPL license 2022-02-09 14:20:24 +01:00
Mary Georgiou
0f320d0d61
Modify rule S107: Update code example for csharp to include rule behavior in the case of constructors. (#792) 2022-02-09 08:36:26 +00:00
Fred Tingaud
9ca204f1c9
RULEAPI-744 automatically fill the template source tags with the current language 2022-02-08 17:34:53 +01:00
Nils Werner
9633e90ee4
Modify rule S6323: Fix exception for PHP (#790)
Co-authored-by: Stanislav <90248579+stanislav-jordanov-sonarsource@users.noreply.github.com>
2022-02-08 10:35:42 +00:00
Fred Tingaud
fc959bf040
Fix CI failure when no rule was changed (#791) 2022-02-08 11:00:03 +01:00
Marco Antognini
2e7f232913
RULEAPI-633: Autolink RSPECs 2022-02-07 18:16:41 +00:00
Fred Tingaud
f21f23b986
Treat all asciidoc at once to accelerate their validation 2022-02-07 18:22:30 +01:00
hendrik-buchwald-sonarsource
9bbd4c135e
Modify rule S6321: Turn into generic rule (#649)
* Remove AWS specific words

* Add Azure code samples

* Add Azure link

* Add missing tags

* Update description

* Fix asciidoc and metadata

Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
Co-authored-by: Nils Werner <nils.werner@sonarsource.com>
2022-02-07 10:08:29 +00:00
Loris S
c02499a371
Modify rule S6329: Turn into generic rule (#655)
* Create rule S6392

* Add first draft

* improve title

* add last commit to this PR regarding public network access

* add metadata tags

* changed title

* converted ask yourself into generic cloud

* converted description into generic cloud

* moved aws links to see

* converted recommended to generic cloud

* convertion of recommended -- added a special case

* add cwe

* add note in recommended section, not sure about this one

* add another cwe

* add first version of rule conversion

* final rule version

* removed leftover code

* Update rules/S6329/description.adoc

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>

* Update rules/S6329/terraform/rule.adoc

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>

* changed case for bulleted list

* improved specs after review

* removed potential confusion

* changed company<->organization

* Update rules/S6329/ask-yourself.adoc

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>

* Update rules/S6329/description.adoc

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>

Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-02-07 10:00:36 +00:00
dependabot[bot]
5a398b4da6
[dependabot] Bump node-fetch from 2.6.1 to 2.6.7 in /frontend (#786)
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.1 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.1...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Arseniy Zaostrovnykh <70532144+arseniy-sonar@users.noreply.github.com>
2022-02-04 19:47:54 +00:00
Arseniy Zaostrovnykh
96aa68e8a2
See if we can detect open handles
`frontend_tests` task sometimes gets stuck and timeouts after all the tests are actually passed. `--detectOpenHandles` option might help to investigate why the test does not finish cleanly.
2022-02-04 19:05:45 +00:00
Arseniy Zaostrovnykh
99a472ae7d
While BUILD-1339 problem presists, updating rule coverage manually 2022-02-04 18:22:46 +00:00
Dorian Burihabwa
ab44214af8 Modify rule S128: Document fall through exception for Java 2022-02-04 18:01:19 +01:00
Fred Tingaud
b4161466e6
RULEAPI-661: Add syntax coloring 2022-02-04 16:28:24 +00:00
Arseniy Zaostrovnykh
04655f1ee7
Bump mem limit for metadata validation task (#784)
1G is not enough for pipenv to install all the dependencies
2022-02-04 16:48:10 +01:00
Marco Antognini
77ebfe0984
Quick-fix for frontend testing's bad mock of fs.existsSync (#783) 2022-02-04 14:51:25 +00:00
Arseniy Zaostrovnykh
67b482b82d
Use full clone for tests to enable proper new-code detection on SonarQube (#781) 2022-02-04 14:19:53 +00:00
Marco Antognini
b181aad484
Fix code smells in index.ts (#776) 2022-02-03 17:27:40 +01:00
Marco Antognini
0dc00de844
Reduce amount of debug output in validate_asciidoc.sh 2022-02-03 12:21:42 +00:00
Marco Antognini
1e719adea0
RULEAPI-726: Add end-to-end testing
* Increase timeout for CI
2022-02-03 10:15:10 +00:00
quentin-jaquier-sonarsource
f78109d4c6
Modify rule S6328: Add exceptions for methods throwing an exception (#772) 2022-02-02 15:12:41 +01:00
Karim El Ouerghemmi
ddb9c3332b
Add PHP to S6323 (#650)
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-02-02 13:10:58 +00:00
Karim El Ouerghemmi
71cb635542
Add PHP to S6331 (#657)
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-02-02 13:02:12 +00:00
Arseniy Zaostrovnykh
571a66341a
Fix a file name 2022-02-01 16:06:24 +00:00
Fred Tingaud
f96f0aad9b
Remove JIRA's URL escaping. (#764) 2022-02-01 14:47:37 +01:00
Karim El Ouerghemmi
620e82cf5e
Modify rule S6353: Add PHP as covered language (#653) 2022-02-01 14:19:17 +01:00
Fred Tingaud
7d868d3f35
Use a more readable form to display parameters 2022-02-01 12:25:23 +00:00
github-actions[bot]
a5a9904a80
Create rule S6397: Character classes in regular expressions should not contain only one character (#648)
Co-authored-by: karim-ouerghemmi-sonarsource <karim-ouerghemmi-sonarsource@users.noreply.github.com>
2022-02-01 11:58:45 +01:00
github-actions[bot]
67aba10083
Create rule S6396: Superfluous curly brace quantifiers should be avoided (#645) 2022-02-01 11:31:53 +01:00
Fred Tingaud
500a488b04
RULEAPI-724: Strikethrough rule ID if the rule is closed, deprecated, or removed 2022-01-31 18:44:44 +00:00
github-actions[bot]
a9b58f4318
Create rule S6394: Unnecessary escaping should be prevented by using other delimiters (#643)
* Create rule S6394

* Create rule S6394: Unnecessary escaping should be prevented by using other delimiters

* Update rules/S6394/php/rule.adoc

Co-authored-by: Karim El Ouerghemmi <64004037+karim-ouerghemmi-sonarsource@users.noreply.github.com>

* Update rules/S6394/php/rule.adoc

Co-authored-by: Karim El Ouerghemmi <64004037+karim-ouerghemmi-sonarsource@users.noreply.github.com>

* Address review suggestions

* Update message and highlighting for rule

Co-authored-by: nils-werner-sonarsource <nils-werner-sonarsource@users.noreply.github.com>
Co-authored-by: Nils Werner <nils.werner@sonarsource.com>
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
Co-authored-by: Karim El Ouerghemmi <64004037+karim-ouerghemmi-sonarsource@users.noreply.github.com>
2022-01-31 15:27:58 +00:00
github-actions[bot]
2cd5a58120
Create rule S5147[python] (#680) 2022-01-31 14:14:40 +01:00
Fred Tingaud
5a68d54bbe
RULEAPI-732: Don't use chips for the status titles in search page 2022-01-31 10:46:01 +00:00
Loris S
8f7349a0af
Create rule S5147[Java]: NoSQL operations should not be vulnerable to injections (#668)
* RSPEC-S5147 Java

* Update rules/S5147/java/rule.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Update rules/S5147/java/rule.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Update rules/S5147/description.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Update rules/S5147/description.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Update rules/S5147/description.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Update rules/S5147/description.adoc

* applied some recommendations

* improved code

* message

* removed vuln odm

* split a sentence into multiple files

* removed pléonasmes

* Update rules/S5147/java/rule.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Update rules/S5147/java/rule.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* applied recommendations

* Update rules/S5147/php/rule.adoc

Co-authored-by: Marco Antognini <89914223+marco-antognini-sonarsource@users.noreply.github.com>

* Update rules/S5147/java/rule.adoc

* Update rules/S5147/java/rule.adoc

* Update rules/S5147/java/rule.adoc

* Update rules/S5147/java/rule.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>
Co-authored-by: Marco Antognini <89914223+marco-antognini-sonarsource@users.noreply.github.com>
Co-authored-by: Roberto Orlandi <71495874+roberto-orlandi-sonarsource@users.noreply.github.com>
2022-01-31 11:01:20 +01:00
github-actions[bot]
7455707a50
Create rule S6390[java]: Thread suspensions should not be vulnerable to Denial of Service attacks (#636)
* Create rule S6390

* Add rule description

* Apply suggestions from code review

Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>

* Update rule title

Co-authored-by: pierre-loup-tristant-sonarsource <pierre-loup-tristant-sonarsource@users.noreply.github.com>
Co-authored-by: Pierre-Loup Tristant <pierre-loup.tristant@sonarsource.com>
Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>
Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Roberto Orlandi <71495874+roberto-orlandi-sonarsource@users.noreply.github.com>
2022-01-31 10:00:00 +01:00
github-actions[bot]
ce39063da3
Create rule S6398[Java]: JSON operations should not be vulnerable to injection attacks (#656)
* Create rule S6398

* Apply review suggestions

Co-authored-by: Pierre-Loup Tristant <pierre-loup.tristant@sonarsource.com>
Co-authored-by: Roberto Orlandi <71495874+roberto-orlandi-sonarsource@users.noreply.github.com>
2022-01-31 09:40:36 +01:00
github-actions[bot]
c4f6ac0137
Create rule S6399[Java]: XML operations should not be vulnerable to injection attacks (#666)
* Create rule S6399

* Apply review suggestions

Co-authored-by: hendrik-buchwald-sonarsource <hendrik-buchwald-sonarsource@users.noreply.github.com>
Co-authored-by: Pierre-Loup Tristant <pierre-loup.tristant@sonarsource.com>
Co-authored-by: Roberto Orlandi <71495874+roberto-orlandi-sonarsource@users.noreply.github.com>
2022-01-31 09:25:13 +01:00
SonarTech
bcb9ef6108 update coverage information 2022-01-29 00:31:57 +00:00
Fred Tingaud
cfe0e34962
RULEAPI-729: Reduce title fonts to make the page more readable 2022-01-28 14:17:25 +00:00
Marco Antognini
65e429879f
Fix CI failure when no rules have changed
Ensure array is correctly read.
Ensure errors in subprocesses are detected and abort the script.

`shopt -s lastpipe` is used to avoid the following complex pattern:

    mapfile -t array < <(command-that-may-fail)
    pid=$!
    wait $pid || exit 1
2022-01-28 13:37:57 +00:00
github-actions[bot]
5bbf55d9d1
Create rule S6395: Non-capturing groups without quantifier should not be used (#644)
* Create rule S6395

* Create rule S6395: Non-capturing groups without quantifier should not be used

* Update rules/S6395/php/rule.adoc

Co-authored-by: Karim El Ouerghemmi <64004037+karim-ouerghemmi-sonarsource@users.noreply.github.com>

Co-authored-by: nils-werner-sonarsource <nils-werner-sonarsource@users.noreply.github.com>
Co-authored-by: Nils Werner <nils.werner@sonarsource.com>
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
Co-authored-by: Karim El Ouerghemmi <64004037+karim-ouerghemmi-sonarsource@users.noreply.github.com>
2022-01-28 12:40:19 +00:00
Marco Antognini
b2b116a8e2
RULEAPI-682: Index multiple types and rules with no languages
* Generate description and metadata for rules with no language, so that they get indexed.
* Index rules with different types in language specializations.
* Improve validation to reject new rules with no language specialization (i.e. only a predefined set of such rules is allowed because they were imported from Jira and kept for historical purposes).
* Write smaller JSON files, reduce their size by 30%.
* Improve test coverage of CLI application.
2022-01-28 09:51:13 +01:00
SonarTech
f0a6ea5537 update coverage information 2022-01-28 00:31:30 +00:00
Quentin Jaquier
b4f5a0fadb Modify Rule S6373: fix description formatting 2022-01-27 14:55:55 +01:00
Fred Tingaud
c5c784a818
RULEAPI-731: Make the search bar more compact to leave room for the results (#753) 2022-01-27 13:45:19 +00:00
abbas-sabra-sonarsource
af4c0999b6
Update S1768: it is not deprecated for C++ 2022-01-27 11:55:36 +00:00
Karim El Ouerghemmi
bfffc3219c
Modify rule S6328: Add PHP as covered language (#654)
* Add PHPto S6328

* Add description for PHP

* Add reference link

Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-01-27 08:59:26 +00:00
Arseniy Zaostrovnykh
50433083fd
RULEAPI-728: When pressing enter in the search bar and there is a perfect match, open it (#750) 2022-01-26 18:14:55 +01:00
Arseniy Zaostrovnykh
b5357b1e1a
RULEAPI-727: Add interactions tests (#746) 2022-01-26 13:39:04 +00:00
eric-therond-sonarsource
1ca56eaf42
Remove XML code sample in Java rules targeting XML (#748) 2022-01-26 10:06:59 +01:00
github-actions[bot]
37ad236302
Create rule S6393: Regular expressions should have valid delimiters (#642)
* Create rule S6393

* Add S6393 specification

* Inline highlighting and message and add tag

* Add example with bracket delimiter

Co-authored-by: karim-ouerghemmi-sonarsource <karim-ouerghemmi-sonarsource@users.noreply.github.com>
Co-authored-by: Karim El Ouerghemmi <karim.ouerghemmi@sonarsource.com>
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-01-26 07:59:38 +00:00
SonarTech
d3aa832e18 update coverage information 2022-01-26 00:31:50 +00:00
Fred Tingaud
3dbe035277
Add missing asciidoc includes 2022-01-25 17:36:46 +00:00
quentin-jaquier-sonarsource
b852464436
Document quick fixes for S2755, S6373, S6374, S6376 and S6377 (#745) 2022-01-25 13:38:33 +01:00
Karim El Ouerghemmi
a5d7d63055
Modify rule S6326: Add PHP as covered language (#651)
* Add PHP to s6326

* Address review comment

* Add exception

* Fix typo in description

Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-01-25 11:38:42 +00:00
github-actions[bot]
1ec3d570a4
Rule S6377[Java]: XML signatures must be validated securely (#567) 2022-01-25 10:52:20 +01:00
SonarTech
8ad3a74953 update coverage information 2022-01-25 00:32:14 +00:00
Jean-Yves CRONIER
64ca74fc7f Modify rule S105: add comment about smart tabs 2022-01-24 16:04:42 +01:00
github-actions[bot]
52716a212e
Create rule S6374[Java] XML parsers should not load external schemas (#551) 2022-01-24 15:54:34 +01:00
github-actions[bot]
818cb5c748
Create rule S6388: Using unencrypted cloud storages is security-sensitive (#624)
* Create rule S6388

* Add description

* Add message

* Fix message path

* Update rules/S6388/metadata.json

Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>

* Rename rule

* Update description to match title

Co-authored-by: hendrik-buchwald-sonarsource <hendrik-buchwald-sonarsource@users.noreply.github.com>
Co-authored-by: Hendrik Buchwald <hendrik.buchwald@sonarsource.com>
Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>
Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-01-24 11:24:10 +00:00
hendrik-buchwald-sonarsource
6bb423e68e
Modify rule S5332: Add cloud tags (#627)
* Add Azure tag

* Add AWS tag

* Move tags to terraform subdir

Co-authored-by: Loris S <91723853+loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-01-24 11:11:44 +00:00
Roberto Orlandi
9da3252f27
Modify rule S1102: add exception for simple tables (#739)
* Modify rule S1102: add exception for simple tables

* Modify rule S1102: address review comment
2022-01-24 11:25:53 +01:00
SonarTech
91eaf82a1a update coverage information 2022-01-22 00:31:46 +00:00
abbas-sabra-sonarsource
8ab975b2cb
Update S2815: it is not deprecated for C++ and not relevant for java and csharp 2022-01-21 15:53:41 +00:00
github-actions[bot]
3b45c5467d
Create rule S6376[Java]: XML parsers should not be vulnerable to Denial of Service attacks (#566) 2022-01-21 16:46:55 +01:00
Alban Auzeill
0e8600ae42 Modify rule S6373[java]: Add entity resolver exception 2022-01-21 16:22:40 +01:00
Yassin Kammoun
da9464e334
Modify rule S5843: Fix JavaScript compliant snippet (#730) 2022-01-20 12:20:40 +01:00
SonarTech
2ec30d66dc update coverage information 2022-01-20 00:31:33 +00:00
Fred Tingaud
171580f86a
Revert "RULEAPI-614: mark unpredictable remediation cost"
We should validate functionally this change with PMs before putting it in production.
Reverting for now.
2022-01-19 19:07:03 +00:00
Marco Antognini
d1e5484b80
Fix search per language
Rename field to clarify intent.
Index only the name of the language.
Use lunr extractor.
2022-01-19 17:12:31 +00:00
Fred Tingaud
ebfa8932d1
RULEAPI-614: mark unpredictable remediation cost 2022-01-19 16:39:02 +01:00
hendrik-buchwald-sonarsource
f3384de644
Modify rule S4423: Add cloud tags (#628)
* Add Azure tag

* Add AWS tag

* Move tags to terraform subdir

* Change order

Co-authored-by: Loris S <91723853+loris-s-sonarsource@users.noreply.github.com>
2022-01-19 10:42:40 +00:00
SonarTech
e7cb8a31ee update coverage information 2022-01-19 00:32:15 +00:00
Fred Tingaud
ecea86e876
Update dependencies and simplify predeploy (#723) 2022-01-18 15:30:19 +00:00
github-actions[bot]
aa10281f1b
Create rule S6373[Java]: XML parsers should not allow inclusion of arbitrary files (#547) 2022-01-18 08:36:38 +01:00
Pavel Mikula
d149204f4b
Create rule S1155: VB.NET (#686) 2022-01-18 07:48:34 +01:00
SonarTech
239fece4ca update coverage information 2022-01-18 00:31:35 +00:00
Fred Tingaud
c8c825feb0
RULEAPI-705 differentiate closed and obsolete rules in the UI (#704) 2022-01-17 20:13:15 +01:00
Loris S
26267dcbf0
Modify rule S2819: Fixed typos (#718) 2022-01-17 17:58:25 +01:00
Loris S
9427dac7dc
Modify S5144: Improved code samples (#719) 2022-01-17 17:57:50 +01:00
Nils Werner
b46b76025c
Rename 'Common' to 'Text' (#714) 2022-01-17 17:05:01 +01:00
Andrei Epure
11df8ffcec
Modify rule S109 for C#: new exceptions (#694) 2022-01-17 09:54:18 +00:00
SonarTech
3d7890f65b update coverage information 2022-01-15 00:31:18 +00:00
Arseniy Zaostrovnykh
4c3b75b4ce
Fix the snapshot resulted from the merge (#716)
The broken UI test on master is the result of a temporal relaxation of the policy of "merge only PRs that are up-to-date with master": a snapshot-based test was introduced in one PR (#709) and was passing, and a UI change was introduced in another PR(#715) that changed the snapshot (but was not covered by the test at the time the second PR diverged from master)
2022-01-14 17:27:24 +00:00
Arseniy Zaostrovnykh
09f8c0b9f2
RULEAPI-571: test the UI components (#709) 2022-01-14 16:07:50 +00:00
Marco Antognini
105f563bb5
RULEAPI-703: Fix warnings emitted during npm run predeploy
Parse custom string instead of file and explicitly introduce level-1
section so that asciidoctor sees it.
2022-01-14 16:06:36 +00:00
dependabot[bot]
f4eae69200
[dependabot] Bump follow-redirects from 1.13.2 to 1.14.7 in /frontend (#710)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.13.2 to 1.14.7.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.13.2...v1.14.7)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-14 15:28:52 +01:00
tomasz-kaminski-sonarsource
7f5b613ec4
RULEAPI-711: Adjust for underscore in CLOUDFORMATION inside sonar-iac sonarpedia 2022-01-14 14:21:00 +01:00
tomasz-kaminski-sonarsource
60ab75fd73
RULEAPI-722: Always cleanup temprary branch for coverage 2022-01-14 08:11:23 +01:00
Arseniy Zaostrovnykh
0223c2a00d
Fix UI warnings: <div> nested in <p> and list items lacking keys (#708)
Fix the two warnings observed when testing the SearchPage component:

- Each child in an array should have a unique "key" prop.
  -> add a key prop to list items
- <div> cannot be nested in <p> (or sth to that effect)
  -> change the relevant Typography components from "p" to "div"
2022-01-13 17:41:44 +01:00
Marco Antognini
065322db2f
RULEAPI-680: Remove the mention of [label] (#705) 2022-01-13 16:03:40 +00:00
quentin-jaquier-sonarsource
f96418e4e1
SONARJAVA-4055 Modify rule S4544 [java] Document new interface support (#682) 2022-01-13 14:37:20 +01:00
quentin-jaquier-sonarsource
a5e1121edd
SONARJAVA-4116 [java] Remove rule S2912 (IndexOfStartPositionCheck) (#681) 2022-01-13 14:36:36 +01:00
Marco Antognini
c3a07c83a5
RULEAPI-635: Document testing process 2022-01-13 10:27:30 +00:00
SonarTech
5d1098dec3 update coverage information 2022-01-13 08:56:32 +00:00
Arseniy Zaostrovnykh
d444d13593
Fix python issues raised by SQ for the old code 2022-01-13 09:25:17 +01:00
dependabot[bot]
f11201086d
[dependabot] Bump color-string from 1.5.4 to 1.9.0 in /frontend (#703)
Bumps [color-string](https://github.com/Qix-/color-string) from 1.5.4 to 1.9.0.
- [Release notes](https://github.com/Qix-/color-string/releases)
- [Changelog](https://github.com/Qix-/color-string/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Qix-/color-string/compare/1.5.4...1.9.0)

---
updated-dependencies:
- dependency-name: color-string
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-12 19:24:25 +00:00
dependabot[bot]
3cfb0cfb88
[dependabot] Bump url-parse from 1.4.7 to 1.5.4 in /frontend (#701)
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.4.7 to 1.5.4.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.4.7...1.5.4)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-12 20:18:23 +01:00
Arseniy Zaostrovnykh
b335def299
Fix the frontend warnings (#696)
Two warnings descovered when trying to test RulePage component:
- `<div>` nested in `<p>`
- `<Tabs>` component with contradictory attributes: `centered` and `scrollable`
2022-01-12 17:52:35 +00:00
dependabot[bot]
ff5c279c03
[dependabot] Bump path-parse from 1.0.6 to 1.0.7 in /frontend (#700)
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-12 16:52:38 +00:00
dependabot[bot]
fd08b091f0
[dependabot]Bump tmpl from 1.0.4 to 1.0.5 in /frontend (#697) 2022-01-12 16:38:45 +00:00
dependabot[bot]
353f6e5a61
[dependabot] Bump tar from 4.4.13 to 4.4.19 in /frontend (#698)
Bumps [tar](https://github.com/npm/node-tar) from 4.4.13 to 4.4.19.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-tar/compare/v4.4.13...v4.4.19)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-12 16:25:51 +00:00
Arseniy Zaostrovnykh
a32b29744e
RULEAPI-571: Increase test coverage of the GitHub Page (#692) 2022-01-12 15:58:15 +00:00
Loris S
2d01928240
Modify Rule S5131: Message clarity (#688) 2022-01-12 15:11:54 +00:00
tomasz-kaminski-sonarsource
fb4391ec23
RULEAPI-579: Enable project analysis in SonarQube Next (#693) 2022-01-12 14:45:44 +00:00
Loris S
fc6c52aa04
Modify rule S4423: Fix typo (#684) 2022-01-12 14:20:40 +00:00
github-actions[bot]
19cafdcdbc
Create rule S6384[Java]: Components should not be vulnerable to intent redirection (#597)
* Create rule S6384

* init rule s6384

Co-authored-by: eric-therond-sonarsource <eric-therond-sonarsource@users.noreply.github.com>
Co-authored-by: eric-therond-sonarsource <eric.therond@sonarsource.com>
Co-authored-by: Roberto Orlandi <71495874+roberto-orlandi-sonarsource@users.noreply.github.com>
2022-01-12 08:09:15 +01:00
SonarTech
1cc987dfbd update coverage information 2022-01-11 09:36:04 +00:00
Arseniy Zaostrovnykh
5829d5c422
RULEAPI-717: Make sure all rules known to be duplicates on Jira are marked as such on github (#683) 2022-01-11 09:21:43 +00:00
Loris S
488801b155
Modify rule S6387: improved message
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-01-11 07:47:33 +00:00
github-actions[bot]
b52e66370a
Create rule S6380[terraform]: Authorizing anonymous access to Azure resources is security-sensitive (#574)
* Create rule S6380

* Disabling authentication is security-sensitive

* Add Sensitive Keyword

* Add Security Standards References

* Add Message.adoc

* Clarified everything

* refreshed metadata

* Update rules/S6380/terraform/rule.adoc

* Update rules/S6380/terraform/rule.adoc

* Update rules/S6380/terraform/rule.adoc

* last update : removed cert auth, add redis infos and highlights

* replaced ad auth with app service auth

* Update rules/S6380/terraform/rule.adoc

* Update rules/S6380/terraform/rule.adoc

* added owasp 2017

* improved title

* Update rules/S6380/terraform/rule.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* added secdev reco about anonymous access

* Completed rule description

* add last tweaks

* Update rules/S6380/terraform/metadata.json

* Update rules/S6380/terraform/rule.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* applied recommendations

* Update rules/S6380/terraform/rule.adoc

* Update rules/S6380/terraform/rule.adoc

* Update rules/S6380/terraform/rule.adoc

* Update rules/S6380/terraform/rule.adoc

* Update rules/S6380/terraform/rule.adoc

* Update rules/S6380/terraform/metadata.json

* Add missing prefix to azurerm_data_factory_linked_service_odata

* Fix typo in basic_authentication

Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com>
Co-authored-by: Loris S <91723853+loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-01-10 14:46:04 +00:00
github-actions[bot]
59fe702d1a
Create rule S6383[terraform]: Disabling Role-Based Access Control on Azure resources is security-sensitive (#595)
* Create rule S6383

* Add first draft

* Update rules/S6383/terraform/rule.adoc

* rename title

* finished S6383 rule

* Update rules/S6383/terraform/rule.adoc

* Update rules/S6383/terraform/rule.adoc

* Update rules/S6383/terraform/rule.adoc

* Update rules/S6383/terraform/metadata.json

* Update rules/S6383/terraform/metadata.json

* Update rules/S6383/terraform/rule.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Update rules/S6383/terraform/rule.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Update rules/S6383/terraform/rule.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Update rules/S6383/terraform/rule.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Update rules/S6383/terraform/rule.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* c'est mon dernier mot jean pierre

* Update rules/S6383/terraform/rule.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Update rules/S6383/terraform/rule.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com>
Co-authored-by: Loris S <91723853+loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-01-10 14:01:54 +00:00
hendrik-buchwald-sonarsource
936b04b3b0
Create rule S4423[terraform]: Add AWS Elasticsearch Domain (#481)
* Add description

* Fix wrong name

* Add code sample introduction

Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-01-10 13:37:41 +00:00
Loris S
173e6c70f1
Modify rule S6387: Add newline (#678) 2022-01-07 09:50:42 +00:00
SonarTech
12b89f8540 update coverage information 2022-01-07 08:37:41 +00:00
quentin-jaquier-sonarsource
a4a6df7684
SONARJAVA-3770 Modify rule S6217[java]: Update description (#677) 2022-01-06 16:37:29 +01:00
SonarTech
8df99d19d1 update coverage information 2022-01-06 00:32:44 +00:00
SonarTech
89dd495920 update coverage information 2022-01-05 00:31:21 +00:00
Čaba Šagi
f3e7ff5de3
Modify rule S3442 [csharp]: Improve description of the rule (#676) 2022-01-04 11:58:12 +00:00
github-actions[bot]
448fb50aed
Create rule S6387[terraform]: Azure role assignments that grant access to all resources of a subscription are security-sensitive (#622)
* Create rule S6387

* Add rule description

* Apply suggestions from code review

Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>

* Fix typo in highlighting.adoc filename

Co-authored-by: pierre-loup-tristant-sonarsource <pierre-loup-tristant-sonarsource@users.noreply.github.com>
Co-authored-by: Pierre-Loup Tristant <pierre-loup.tristant@sonarsource.com>
Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-01-04 11:02:05 +00:00
github-actions[bot]
7036a47aa4
Create rule S6382[terraform]: Disabling certificate-based authentication is security-sensitive (#594)
* Create rule S6382

* Create rule S6382[terraform]: Disabling certificate-based authentication is security-sensitive

* Update rules/S6382/terraform/metadata.json

* Update rules/S6382/terraform/metadata.json

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Update rules/S6382/terraform/rule.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* improved the rule after recos and S6380 recos

* reworked the sentence for clarity

* Update rules/S6382/terraform/rule.adoc

* Update rules/S6382/terraform/rule.adoc

* Update rules/S6382/terraform/rule.adoc

* Update rules/S6382/terraform/rule.adoc

* Update rules/S6382/terraform/rule.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Update rules/S6382/terraform/rule.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Update rules/S6382/terraform/rule.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Update rules/S6382/terraform/rule.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Update rules/S6382/terraform/rule.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Update rules/S6382/terraform/metadata.json

Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com>
Co-authored-by: Loris S <91723853+loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-01-03 15:47:06 +00:00
github-actions[bot]
de0c3bc4b5
Create rule S6379[terraform]: Enabling Azure resource-specific admin accounts is security-sensitive (#573)
* Create rule S6379

* Enabling administrative permissions is security-sensitive

* Update rules/S6379/terraform/metadata.json

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Update rules/S6379/terraform/rule.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Update rules/S6379/terraform/rule.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Update rules/S6379/terraform/rule.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Update rules/S6379/terraform/rule.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Update rules/S6379/terraform/rule.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Update rules/S6379/terraform/rule.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Update rules/S6379/terraform/rule.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Update rules/S6379/terraform/metadata.json

* Update rules/S6379/terraform/rule.adoc

* improved ident

* add highlighting

* fix md link

* Update rules/S6379/terraform/rule.adoc

* Update rules/S6379/terraform/rule.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Update rules/S6379/terraform/rule.adoc

* Update rules/S6379/terraform/rule.adoc

* Add missing azure tag

Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com>
Co-authored-by: Loris S <91723853+loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>
Co-authored-by: Pierre-Loup Tristant <pierre-loup.tristant@sonarsource.com>
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-01-03 16:39:34 +01:00
github-actions[bot]
9ff6a8b388
Create rule S6375[terraform]: Assigning high privileges Azure Active Directory built-in roles is security-sensitive (#560)
* Create rule S6375

* Add rule description

* Apply review suggestions

* Apply suggestions from code review

Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>

* Update issue location

Co-authored-by: pierre-loup-tristant-sonarsource <pierre-loup-tristant-sonarsource@users.noreply.github.com>
Co-authored-by: Pierre-Loup Tristant <pierre-loup.tristant@sonarsource.com>
Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>
Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-01-03 15:23:48 +00:00
github-actions[bot]
e0109d1b26
Create rule S6385[terraform]: Azure custom roles should not grant subscription Owner capabilities (#603)
* Create rule S6385

* Add rule description

* Apply suggestions from code review

Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>

* Update rules/S6385/see.adoc

Fix CWE link

* Update rules/S6385/see.adoc

Fix CWE link

* Add missing azure tag

Co-authored-by: pierre-loup-tristant-sonarsource <pierre-loup-tristant-sonarsource@users.noreply.github.com>
Co-authored-by: Pierre-Loup Tristant <pierre-loup.tristant@sonarsource.com>
Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>
Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-01-03 15:07:46 +00:00
SonarTech
cf71238dbd update coverage information 2021-12-31 00:32:03 +00:00
Fred Tingaud
a25058afe1
Modify rule S125: support quick fix and add an exception for code documentation (#669) 2021-12-29 23:08:19 +01:00
github-actions[bot]
153d4621c3
Add CloudFormation to rule S2260 (#663) 2021-12-29 08:33:15 +00:00
github-actions[bot]
f55da18555
Create rule S6381[terraform]: Assigning high privileges Azure Resource Manager built-in roles is security-sensitive (#583)
* Create rule S6381

* Add rule description

* Apply suggestions from code review

Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>

Co-authored-by: pierre-loup-tristant-sonarsource <pierre-loup-tristant-sonarsource@users.noreply.github.com>
Co-authored-by: Pierre-Loup Tristant <pierre-loup.tristant@sonarsource.com>
Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2021-12-29 08:22:27 +00:00
Loïc Joly
173e20ad6b
S2665: Align RSPEC with implementation (#673) 2021-12-24 14:23:50 +01:00
Loïc Joly
79a2d73751
Modify Rule S1001: Revert changes introduced by CPP-1307 2021-12-24 09:58:47 +01:00
Loïc Joly
36599be9b6
S1768 Revert changes to the RSPEC that are not in sync with the implementation: (#672)
* On change was saying wrong things: Enums can have negative values
* The other one is of little value, especially for a deprecated rule.
2021-12-22 18:24:19 +01:00
Loïc Joly
460b3d7e7b
S1226: CPP-2006 Align RSPEC description with current rule implementation
The RSPEC was changed, but not the implementation. This PR re-establishes the previous RSPEC. The change will be available in another RSPEC that will only be merged together with the implementation.
2021-12-22 17:25:34 +01:00
Pavel Mikula
c8e8020780
Modify rule S4275[dotnet]: Fix VB.NET examples (#664) 2021-12-22 15:23:02 +00:00
SonarTech
918ab08104 update coverage information 2021-12-19 00:31:25 +00:00
hendrik-buchwald-sonarsource
651157eb2a
Modify rule S5131: Make description more precise (#665) 2021-12-17 13:38:57 +01:00
SonarTech
13e2b03e80 update coverage information 2021-12-17 00:31:11 +00:00
Pierre-Loup
c6f14b6a20
Add AWS tag to IaC rules (#662) 2021-12-16 15:02:01 +01:00
github-actions[bot]
2a9ea96c76
Create rule S6364: Defining a short backup retention duration is security-sensitive (#453) 2021-12-15 16:51:01 +01:00
SonarTech
e908432514 update coverage information 2021-12-15 06:43:13 +00:00
github-actions[bot]
ed8762d5ac
Create rule S6378[terraform] : Disabling Managed Identities for Azure resources is security-sensitive (#569)
* clean-up old metadata file

* Create rule S6378

* Add first draft

* added link to managed service resources list

* fix vague title

* add metadata tagging

* add metadata - sec standards

* add owasp ref

* add concise var names

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* add concise var names and reduces identity.type

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Update rules/S6378/description.adoc

* add other distinct code sample

* add down to earth recos

Clear-text credentials || third party systems

* add description - clearer on M-Identities stakes

* changed remediation cost to 1h

* add cleared reco - use system-assigned

* fix layout pb

* fix metadata 'hour' mistake: 'hour'->'h'

* reformulate ask-yourself

* fixed potential confusion

* applied review suggestions

* add highlight

* Update rules/S6378/metadata.json

* Update rules/S6378/message.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Update rules/S6378/metadata.json

* Update rules/S6378/ask-yourself.adoc

Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com>
Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Loris S <91723853+loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2021-12-14 09:37:33 +00:00
SonarTech
c6438133a0 update coverage information 2021-12-14 05:44:24 +00:00
Loris S
4774e72dc1
Modify Rules: Multiple typo on missing hyphens (#660) 2021-12-13 16:18:55 +01:00
Čaba Šagi
6c68ac52d7
Modify rule S2222[csharp, vbnet]: Change scope to Main (#658) 2021-12-13 07:52:16 +00:00
Loïc Joly
8009f3733a
Modify rule S5319: Remove reference to non-implemented rule 2021-12-12 09:47:14 +00:00
SonarTech
7da6c814c7 update coverage information 2021-12-10 00:31:27 +00:00
Loïc Joly
c9caaf840d
Remove CFamily rules that wont be implemented(S800, S1719, S1120, S1262, and S3395) and add cert link 2021-12-09 18:45:27 +00:00
Pierre-Loup
5a2828b558
Modify rule S5131: improve description (#633) 2021-12-09 11:26:12 +00:00
quentin-jaquier-sonarsource
c320b4010d
MMF-2326 [Java/XML] Move rules from Java to XML 2021-12-09 09:11:27 +01:00
SonarTech
9067e46cab update coverage information 2021-12-09 00:31:40 +00:00
github-actions[bot]
109719cd68
Create rule S6369: Coroutine should have co_return on each execution path or provide return_void 2021-12-08 17:52:58 +01:00
Čaba Šagi
03a026c8a9
Modify rule S2222[csharp, vbnet]: Improve noncompliant example (#647) 2021-12-08 15:40:25 +01:00
Čaba Šagi
280361aa11
Remove from SonarWay (#646) 2021-12-08 11:21:54 +01:00
github-actions[bot]
b006f130e4
Create rule S6365: Use symmetric transfer to switch execution between coroutines 2021-12-08 09:01:56 +00:00
SonarTech
a5bc5b1473 update coverage information 2021-12-08 08:00:20 +00:00
github-actions[bot]
90a68665a8
Create rule S6389: Using bidirectional characters is security-sensitive (#634)
* Create rule S6389

* Update metadata

* Add empty files

* First draft description

* Add recommended draft

* add first AYW draft

* Add recommended draft

* add first see draft

* add first msg dragt

* added first highlighting draft

* added highlighting

* improvement ayw

* del newlin

* Homogenize ask-yourself

* added reco suggestion

* add unicode-friendly IDEs

* fix typos see

* Add CWE-94

* Add code samples

* Add code samples

* Add missing s

* Update message

Co-authored-by: nils-werner-sonarsource <nils-werner-sonarsource@users.noreply.github.com>
Co-authored-by: Hendrik Buchwald <hendrik.buchwald@sonarsource.com>
Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com>
Co-authored-by: Loris S <91723853+loris-s-sonarsource@users.noreply.github.com>
2021-12-06 16:07:45 +01:00
github-actions[bot]
f94c32af9c
Create rule S6391: Coroutines should not take const references as parameters 2021-12-03 15:29:52 +01:00
SonarTech
85ccaacfce update coverage information 2021-12-03 00:32:29 +00:00
github-actions[bot]
1ba88256b4
Create rule S2222[vbnet] (#638) 2021-12-02 13:42:27 +00:00
github-actions[bot]
60e55cbdbe
Create rule S6366: Use conditional suspension to resume current coroutine 2021-12-02 14:35:15 +01:00
Čaba Šagi
8775aa505f
Modify rule S2222[CSharp]: improve description and code example (#635) 2021-12-02 14:29:24 +01:00
Arseniy Zaostrovnykh
ab0589ab43
fix deployment: install missing libkrb5 for the from-source build of nodegit v0.27 that is missing in the bin cache (#637) 2021-12-02 13:00:31 +01:00
SonarTech
45da6218e2 update coverage information 2021-12-02 00:31:16 +00:00
Nils Werner
0153e37597
RULEAPI-715: Add the "common" language (#632) 2021-12-01 15:18:31 +00:00
github-actions[bot]
3ab703fcd7
Create rule S6367: Thread local variables should not be used in coroutines 2021-12-01 14:13:36 +00:00
github-actions[bot]
16de2ee219
Create rule S6372: "await_suspend" should accept type-erased "coroutine_handle" when it uses it in a generic way 2021-12-01 13:32:11 +00:00
SonarTech
14ca980d79 update coverage information 2021-11-30 00:31:57 +00:00
Loïc Joly
30d637cd9e
Delete the RSPECs related to the "underlying type system"
These RSPECs rely on the "underlying type system" of MISA C++2008, which will be replaced in the next MISRA. We don't plan to implement them.
2021-11-29 17:41:02 +01:00
quentin-jaquier-sonarsource
9ed3f1764e
Modify rule S2122[Java/Kotlin]: Change code delimiter (#626) 2021-11-29 14:35:27 +00:00
quentin-jaquier-sonarsource
3c615c9fd9
Modify rule S5843: Fix duplicate description parts (#629) 2021-11-29 12:59:01 +01:00
hendrik-buchwald-sonarsource
c9cdadd72e
Modify rule S5332: Add message for missing option (#615) 2021-11-26 17:02:56 +00:00
Marco Antognini
6d274180e0
Modify rule S1763[cfamily]: cover co_return and [[noreturn]] (#605) 2021-11-26 17:18:04 +01:00
Arseniy Zaostrovnykh
643041d481
Modify rule S6194: replace Function with Coroutine 2021-11-26 15:25:18 +00:00
quentin-jaquier-sonarsource
911e9a25ff
Modify rule S4682, S4454[Java]: add quick fix (#620) 2021-11-26 15:56:17 +01:00
Arseniy Zaostrovnykh
538d799553
Modify rule S6192: infeasible quickfix; verbose param name 2021-11-26 14:19:54 +01:00
SonarTech
cede2a1e0a update coverage information 2021-11-26 00:31:02 +00:00
Arseniy Zaostrovnykh
e3e86d61c5
Modify rule S6194: mark quick fix as infeasible 2021-11-25 17:07:04 +00:00
Arseniy Zaostrovnykh
8eb774e1fc
Modify rule S6184: grammar fix (#611) 2021-11-25 16:08:21 +00:00
Arseniy Zaostrovnykh
1e4785ea2a
Modify rule S6184: quickfix is infeasible 2021-11-25 15:35:14 +01:00
Marco Antognini
6887226e5b
Modify rule S6193: mark quick fix as infeasible (#618) 2021-11-25 12:35:30 +01:00
Arseniy Zaostrovnykh
e474a185ae
Modify rule S1238[cfamily]: exception for coroutines (CPP-3317) 2021-11-24 18:38:54 +01:00
Karim El Ouerghemmi
992e8b0e53
Modify rule S1144: Add PHP enum example (#614)
* Add enum example

* Fix old examples
2021-11-23 15:13:53 +01:00
Pierre-Loup
266ed175a8
Fix broken links (#612) 2021-11-22 18:34:02 +01:00
Pierre-Loup
0f4c8ab92f
Modify S1273: Fix broken link (#613) 2021-11-22 18:00:02 +01:00
Alban Auzeill
c6430d2475
Modify rule S2755[java]: wrong method name for SchemaFactory example (#610) 2021-11-22 16:30:51 +01:00
Arseniy Zaostrovnykh
cf1930f7c5
Modify rule S6184: grammar fixes 2021-11-22 13:28:26 +01:00
Elena Vilchik
a4edd6c466
Fix description of S5843 for JavaScript (#606) 2021-11-19 09:15:00 +01:00
Marco Antognini
27a4a245d0
Modify rules S6184 S6192 S6193 S6194: add since-c++20 tag (#604) 2021-11-18 13:53:03 +01:00
SonarTech
57da77bfa4 update coverage information 2021-11-18 00:31:18 +00:00
Marco Antognini
085db4c187
Modify rule S6193: Fix typo & update metadata (#602) 2021-11-17 15:02:59 +01:00
Arseniy Zaostrovnykh
2353c91969
Modify rule S3807: add "setbuffer" function 2021-11-17 12:21:59 +01:00
Marco Antognini
58083701f3
Modify rule S6178[cfamily]: add quick fix 2021-11-17 08:04:16 +00:00
SonarTech
5cb4c7497d update coverage information 2021-11-17 00:31:13 +00:00
Nils Werner
d989c48b3f
Add sonar-iac as repository for coverage (#600) 2021-11-16 16:57:55 +00:00
Arseniy Zaostrovnykh
92c5fb5803
Modify rule S6004: CPP-3372 add exception for condition variable 2021-11-16 14:54:45 +00:00
Arseniy Zaostrovnykh
4cbbaae2c4
Modify rule S1045[cfamily]: add quick fix 2021-11-16 10:04:35 +00:00
hendrik-buchwald-sonarsource
1a962ed303 Update rules/S6258/terraform/rule.adoc 2021-11-14 13:10:50 +01:00
Loris S
1481199c13 Create rule S6258[terraform]: Add AWS API Gateway Stages (#515)
* Create rule S6258[terraform]: Add AWS API GW X-Ray Tracing

* Add access logs

Co-authored-by: Hendrik Buchwald <hendrik.buchwald@sonarsource.com>
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2021-11-14 13:10:50 +01:00
hendrik-buchwald-sonarsource
f02573de92 Create rule S6258[terraform]: Add AWS Neptune Clusters (#521)
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2021-11-14 13:10:50 +01:00
Loris S
97744b2252 Create rule S6258[terraform]: Add AWS MSK (#524)
* Create rule S6258[terraform]: Add MSK

* fixed c/p mistake

* add compliant sample

Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2021-11-14 13:10:50 +01:00
hendrik-buchwald-sonarsource
ff28cfaff1 Create rule S6258[terraform]: Add AWS MQ Broker (#527)
* Add MQ

* Fix URL

Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2021-11-14 13:10:50 +01:00
Loris S
25904fa33a Create rule S6258[terraform]: Add AWS DocDB Clusters (#529)
* Create rule S6258[terraform]: Add AWS DocDB Clusters

* Update rules/S6258/terraform/rule.adoc

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>

* Update rules/S6258/terraform/rule.adoc

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2021-11-14 13:10:50 +01:00
Loris S
69da2594e3 Create rule S6258[terraform]: Add AWS Redshift Clusters (#531)
* Create rule S6258[terraform]: Add AWS Redshift Clusters

* Update rules/S6258/terraform/rule.adoc

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>

* Update rules/S6258/terraform/rule.adoc

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>

* Update rules/S6258/terraform/rule.adoc

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>

* Update rules/S6258/terraform/rule.adoc

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2021-11-14 13:10:50 +01:00
hendrik-buchwald-sonarsource
eff069b4cb Create rule S6258[terraform]: Add AWS Accelerator (#532)
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2021-11-14 13:10:50 +01:00
Loris S
1b0a2f8687 Create rule S6258[terraform]: Add AWS ElasticSearch Domains (#544)
* Create rule S6258[terraform]: Add AWS ElasticSearch Domains

* Fix log type confusion

* fix "sensitive" location

Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2021-11-14 13:10:50 +01:00
Loris S
b4da5152d8 Create rule S6258[terraform]: Add AWS CloudFront Distributions (#549)
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2021-11-14 13:10:50 +01:00
Loris S
0fe88356f4 Create rule S6258[terraform]: Add AWS Load Balancing (#553) 2021-11-14 13:10:50 +01:00
Loris S
79c8879694 Create rule S6258[cloudformation]: Add AWS API Gateway Stages (#514)
* added new example, and fixed previous comments

* str->bool for tracing_enabled

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>

* str->bool for tracing_enabled

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>

* Add access logs

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>
Co-authored-by: Hendrik Buchwald <hendrik.buchwald@sonarsource.com>
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2021-11-14 13:03:34 +01:00
hendrik-buchwald-sonarsource
8df18a05c2 Create rule S6258[cloudformation]: Add AWS Neptune Clusters (#522)
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2021-11-14 13:03:34 +01:00
Loris S
a684769716 Create rule S6258[cloudformation]: Add AWS MSK (#523)
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2021-11-14 13:03:34 +01:00
Loris S
c81733a9c9 Create rule S6258[cloudformation]: Add AWS DocDB Clusters (#526)
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2021-11-14 13:03:34 +01:00
hendrik-buchwald-sonarsource
5f8aed8d21 Create rule S6258[cloudformation]: Add AWS MQ Broker (#528)
* Add MQ

* Add MQ

* Fix URL

* Remove Terraform

Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2021-11-14 13:03:34 +01:00
Loris S
2abc700e5a Create rule S6258[cloudformation]: Add AWS Redshift Clusters (#530)
* Create rule S6258[cloudformation]: Add AWS Redshift Clusters

* Update rules/S6258/cloudformation/rule.adoc

* Update rules/S6258/cloudformation/rule.adoc

Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2021-11-14 13:03:34 +01:00
Loris S
7b10fd610a Create rule S6258[cloudformation]: Add AWS ES/OpenSearch Domains (#533)
* Create rule S6258[cloudformation]: Add AWS OpenSearch/ElasticSearch Domains

* Update rules/S6258/cloudformation/rule.adoc

* Update rules/S6258/cloudformation/rule.adoc

* Update rules/S6258/cloudformation/rule.adoc

* Update rules/S6258/cloudformation/rule.adoc

* Update rules/S6258/cloudformation/rule.adoc

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>

* Update rules/S6258/cloudformation/rule.adoc

* Update rules/S6258/cloudformation/rule.adoc

* Update rules/S6258/cloudformation/rule.adoc

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2021-11-14 13:03:34 +01:00
Loris S
cb1083aa1f Create rule S6258[cloudformation]: Add AWS CloudFront Distributions (#548)
* Create rule S6258[terraform]: Add AWS CloudFront Distributions

* Update rules/S6258/cloudformation/rule.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2021-11-14 13:03:34 +01:00
Loris S
583d5668fd Create rule S6258[cloudformation]: Add AWS ELB Listeners (#550)
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2021-11-14 13:03:34 +01:00
Loris S
66d665f97d Create rule S6258[cloudformation]: Add AWS Load Balancing v2 (#554)
* Create rule S6258[cloudformation]: Add AWS Load Balancing v2

* added sensitive kw
2021-11-14 13:03:34 +01:00
SonarTech
45c81183f4 update coverage information 2021-11-13 00:31:09 +00:00
hendrik-buchwald-sonarsource
620da3ed4d
Modify rule S6308: Fix list in description (#593) 2021-11-12 17:55:10 +01:00
quentin-jaquier-sonarsource
458a59df94
Modify rule S2119[Java]: the rule now also detect when not assigned locally 2021-11-12 16:30:01 +00:00
quentin-jaquier-sonarsource
9b951517ed
SONARJAVA-4073 Modify Rule S3751[java]: should accept protected and package scope modifiers 2021-11-12 17:16:18 +01:00
Mary Georgiou
8bf20e47e2
Modify rule S4581: Add more non compliant examples. (#590) 2021-11-12 17:01:29 +01:00
abbas-sabra-sonarsource
2e5f931c10
Fix S1110 quickfix metadata (#591) 2021-11-12 15:04:39 +01:00
Čaba Šagi
23e49d388e
Revert scope change for missed rules (#585) 2021-11-12 12:59:46 +00:00
Čaba Šagi
1b74174c27
Update CSharp and VBNet quickfix metadata (#589) 2021-11-12 12:52:33 +00:00
abbas-sabra-sonarsource
2204ebfb43
Update CFamily quickfix metadata 2021-11-12 12:05:52 +01:00
twessendorf
1bb768c480
Modify rule S5301: Fix typo in rule description 2021-11-12 09:59:53 +00:00
Arseniy Zaostrovnykh
7ab240738e
Fix the coverage-update test failure following the CSS+JS merge (#588) 2021-11-12 09:51:39 +00:00
Čaba Šagi
72ab378e65
Revert All to Main scope change for all languages except javascript (#578) 2021-11-11 11:01:39 +01:00
Massimo Paladin
4e313ed30b Modify rule S2699: Add ResultActions.andExpectAll method 2021-11-10 17:53:59 +01:00
Karim El Ouerghemmi
3d54ce32f3
Modify rule S5332: Make absence of property clearer for CloudFormation (#579) 2021-11-10 10:38:31 +01:00
SonarTech
6905b13f9d update coverage information 2021-11-10 00:31:14 +00:00
Loris S
baf4eb7abd
Create rule S5332[cloudformation]: Add kinesis data stream (#501)
* added highlighting tips

* removed highlighting tip making no sense

* fixed french syntax

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>

* added streamencryption bloc

* Update rules/S5332/cloudformation/rule.adoc

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>
Co-authored-by: Karim El Ouerghemmi <64004037+karim-ouerghemmi-sonarsource@users.noreply.github.com>
2021-11-09 20:49:40 +01:00
hendrik-buchwald-sonarsource
3496d4bedd
Add description (#502)
Co-authored-by: Karim El Ouerghemmi <64004037+karim-ouerghemmi-sonarsource@users.noreply.github.com>
2021-11-09 19:22:37 +00:00
Loris S
0465d16d1d
Create rule S5332[terraform]: Add Kinesis Data Streams (#500)
* added skeleton

* added highlighting tip

* added kinesis recommendations

* removed template rule leftovers

* removed unnecessary clause to avoid confusion

* fixed highlighting tip mistake

* fixed french syntax

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>

* fixed french syntax

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>

* removed quotes

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2021-11-09 18:15:28 +01:00
hendrik-buchwald-sonarsource
0ac56f7279
Create rule S5332[cloudformation]: Add ECS Task Definition (#497)
* Add description

* Fix mistake introduced while fixing merge conflicts

Co-authored-by: Karim El Ouerghemmi <64004037+karim-ouerghemmi-sonarsource@users.noreply.github.com>
2021-11-09 17:12:01 +01:00
Loris S
b9070ab4be
Create rule S5332[cloudformation]: Add AWS Load Balancer Listeners (#506)
* first cloudformation draft

* fixed simple mistakes

* simplified highlighting tips

* improved highlights, yaml and sensitive comment

* simplified and concised highlights

* removed french syntax

* add AWS namespace to highlights instead of regular name

Co-authored-by: Karim El Ouerghemmi <64004037+karim-ouerghemmi-sonarsource@users.noreply.github.com>
2021-11-09 16:55:54 +01:00
hendrik-buchwald-sonarsource
122559324f
Create rule S5332[terraform]: Add ElastiCache Replication Group
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2021-11-09 14:49:28 +00:00
github-actions[bot]
76520001a7
Create rule S6350: Constructing arguments of system commands from user input is security-sensitive (#260)
* Create rule S6350

* Update description

* Add code samples

* Make stdin more verbose

* Make stdin more verbose

* Update recommended

* Improve description

* Extend ask yourself

* Add compliant solutions and rename tainted variables

* Add input var

* Add link to blog post

* Use find as example

* Update csharp example

* Add OWASP Top 10 2021 mapping

* add missing message

* fix metadata

* Use type-safe in_array for PHP

Co-authored-by: hendrik-buchwald-sonarsource <hendrik-buchwald-sonarsource@users.noreply.github.com>
Co-authored-by: Hendrik Buchwald <hendrik.buchwald@sonarsource.com>
Co-authored-by: Pierre-Loup Tristant <pierre-loup.tristant@sonarsource.com>
Co-authored-by: eric-therond-sonarsource <eric.therond@sonarsource.com>
Co-authored-by: Roberto Orlandi <71495874+roberto-orlandi-sonarsource@users.noreply.github.com>
2021-11-09 15:01:30 +01:00
Pierre-Loup
958811377b
Create rule S5332[cloudformation]: Add AWS Elasticsearch Domain (#496)
* Add rule description

* Add code examples of the EnforceHTTPS option

* Apply suggestions from code review

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>
Co-authored-by: Karim El Ouerghemmi <64004037+karim-ouerghemmi-sonarsource@users.noreply.github.com>
2021-11-09 14:26:57 +01:00
hendrik-buchwald-sonarsource
de99a4a664
Create rule S5332[terraform]: Add ECS Task Definition (#498)
* Add description

* Replace message with highlight

Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2021-11-09 10:01:19 +00:00
Alban Auzeill
966144443a
Modify rule S4288[java]: Remove the need of @Autowired as of Spring 4.3 (#576) 2021-11-08 18:54:17 +01:00
Arseniy Zaostrovnykh
ff78404b8d
Modify rule S3229: Complete the description with bases; add compliant solution 2021-11-08 18:16:03 +01:00
Loris S
a89413a349
Create rule S5332[terraform]: Add AWS Load Balancer Listeners (#508)
* added rule skeleton

* added rule snippets

* Adapted highlights to terraform

* fixed important mistake

* fixed french syntax

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2021-11-08 15:41:35 +00:00
Pierre-Loup
48354a4c9a
Create rule S5332[terraform]: Add AWS Elasticsearch Domain (#495)
* Add rule description

* Add code examples of the enforce_https option

* Apply suggestions from code review

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>
Co-authored-by: Karim El Ouerghemmi <karim.ouerghemmi@sonarsource.com>
Co-authored-by: Karim El Ouerghemmi <64004037+karim-ouerghemmi-sonarsource@users.noreply.github.com>
2021-11-08 15:31:26 +00:00
Pierre-Loup
6cf0b0580c
Add exception for KMS key policies to S6304 (#565)
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2021-11-08 15:14:55 +00:00
hendrik-buchwald-sonarsource
83025fbd36
Create rule S4423[cloudformation]: Add AWS Elasticsearch Domain (#482)
* Add description

* Move Terraform to Cloudformation

* Add code sample introduction

Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2021-11-08 14:29:05 +00:00
Nils Werner
6bed56fba9
Modify rule S5857: Add Python as covered language (#557)
* Modify rule S5857: Add Python as covered language

* Remove unsupported possessive quantifier from rule description and compliant solutions
2021-11-08 14:22:56 +00:00
github-actions[bot]
4aef8584d8
Create rule S5332[cloudformation]: Add MSK Cluster (#494)
* Add cloudformation to rule S5332

* added first draft after PR#464

* improved conciseness

* improved internal highlighting docs

Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com>
Co-authored-by: Karim El Ouerghemmi <64004037+karim-ouerghemmi-sonarsource@users.noreply.github.com>
2021-11-08 14:10:56 +01:00
github-actions[bot]
4b0f35f1e5
Create rule S4423[cloudformation]: Add AWS API Gateway Domain Name (#472)
* Improve description

* Add cloudformation to rule S4423

* Add code samples

* Update rules/S4423/description.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Update rules/S4423/cloudformation/rule.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Add API Gateway v2

* Add highlight

* Remove dots

* Add code sample introduction

Co-authored-by: Hendrik Buchwald <hendrik.buchwald@sonarsource.com>
Co-authored-by: hendrik-buchwald-sonarsource <hendrik-buchwald-sonarsource@users.noreply.github.com>
Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>
Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2021-11-08 12:24:40 +00:00
Čaba Šagi
0bc781d70d
Remove empty replacementRules for VBNet (#572) 2021-11-08 11:17:51 +00:00
github-actions[bot]
65ca2afdbb
Create rule S5332[terraform] (#464)
* Add terraform to rule S5332

* add base vuln rspec

* add details about msk in desc

* add highlighting rules

* mistaken : encryption clauses missing = defaults are secure

* Update rules/S5332/terraform/rule.adoc

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>

* Update rules/S5332/terraform/rule.adoc

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>

* removed template rule leftovers

* added mention about msk secure defaults

* fixed generalization mistake

* improved conciseness

* improved internal highlighting docs

Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com>
Co-authored-by: Loris S <91723853+loris-s-sonarsource@users.noreply.github.com>
Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>
Co-authored-by: Karim El Ouerghemmi <64004037+karim-ouerghemmi-sonarsource@users.noreply.github.com>
2021-11-08 10:49:47 +00:00
github-actions[bot]
3226c7a243
Create rule S4423[terraform]: Add AWS API Gateway Domain Name (#456)
* Add terraform to rule S4423

* Add terraform

* Include main description

* Improve description

* Update rules/S4423/description.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Update rules/S4423/terraform/rule.adoc

Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>

* Add highlight

* Add aws_api_gatewayv2_domain_name example

* Add highlight

* Change noncompliant api gateway v2

* Fix wrong apigatewayv2 name

* Add code sample introduction

Co-authored-by: hendrik-buchwald-sonarsource <hendrik-buchwald-sonarsource@users.noreply.github.com>
Co-authored-by: Hendrik Buchwald <hendrik.buchwald@sonarsource.com>
Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>
Co-authored-by: Pierre-Loup <49131563+pierre-loup-tristant-sonarsource@users.noreply.github.com>
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2021-11-08 09:10:28 +00:00
SonarTech
2cc194f7e6 update coverage information 2021-11-06 00:31:28 +00:00
Pierre-Loup
152c61d64e
Modify S4824: Fix broken link(#571) 2021-11-05 16:23:43 +01:00
Pierre-Loup
2378417fdd
Modify rule S5146 - Support Location header (#315) 2021-11-05 13:12:29 +00:00
Yassin Kammoun
b1bebf13ec
Modify rule S1121: Describe unexpected creation of global variables (#570) 2021-11-05 14:06:08 +01:00
SonarTech
f5401db6c2 update coverage information 2021-11-05 00:31:41 +00:00
Pierre-Loup
e357716d6c
Fix typo (#568) 2021-11-04 16:44:58 +01:00
Johann Beleites
2aa19bd273
Create rule S5846[kotlin]: Empty lines should not be tested with rege… (#419)
Co-authored-by: Margarita Nedzelska <margarita.nedzelska@sonarsource.com>
2021-11-03 17:07:53 +00:00
Johann Beleites
952540c4c7
Create rule S5850[kotlin]: Alternatives in regular expressions should be grouped when used with anchors (#420) 2021-11-03 16:52:55 +00:00
Johann Beleites
61eed49d2b
Create rule S5856[kotlin]: Regular expressions should be syntactically valid (#422) 2021-11-03 16:45:14 +00:00
Johann Beleites
903426703f
Create rule S5843[kotlin]: Regular expressions should not be too complicated (#416)
Co-authored-by: Margarita Nedzelska <margarita.nedzelska@sonarsource.com>
2021-11-03 16:33:50 +00:00
Johann Beleites
0b0c2e21df
Create rule S5857[kotlin]: Character classes should be preferred over reluctant quantifiers in regular expressions (#423) 2021-11-03 16:10:19 +00:00
eric-therond-sonarsource
8215e3052c
Create rule S5883[php]: OS commands should not be vulnerable to argument injection attacks (#265) 2021-11-03 10:27:45 +01:00
Nils Werner
1df31bc50c
Modify rule S5856: Add Python as covered language (#563) 2021-11-03 09:05:48 +00:00
Nils Werner
c73f0b9ef2
Modify rule S5869: Add Python as covered language (#555)
* Modify rule S5869: Add Python as covered language

* Fix typo
2021-11-03 08:18:19 +00:00
SonarTech
e357740092 update coverage information 2021-11-03 00:31:42 +00:00
Nils Werner
c3656e6cfe
Modify rule S5868: Add PHP as covered language (#556)
* Modify rule S5868: Add Python as covered language

* Remove semicolon
2021-11-02 17:00:10 +00:00
Elena Vilchik
989f11045a
[JS] Activate S2392 in Sonar way (#564) 2021-11-02 14:38:02 +00:00
Elena Vilchik
bc62329692
[JS] Improve code examples for S1488 (#559)
Co-authored-by: Tibor Blenessy <tibor.blenessy@sonarsource.com>
2021-11-02 13:47:09 +00:00
Nils Werner
0e6566fc53
Modify rule S5843: Add Python as covered language (#537)
* Modify rule S5843: Add Python as covered language

* Fix comment syntax
2021-11-02 12:57:38 +00:00
SonarTech
ce138e0713 update coverage information 2021-11-02 00:31:24 +00:00
Johann Beleites
6c86ca7739
Create rule S5842[kotlin]: Repeated patterns in regular expressions should not match the empty string (#415) 2021-11-01 16:39:09 +00:00
Costin Zaharia
e45e25fdeb
Modify rule S1172 [C#]: mention constructor (#558) 2021-11-01 15:31:47 +01:00
Pierre-Loup
e7ad1012e3
RULEAPI-709: Security rules are mapped to the OWASP Top 10 2021 security-standard (#545) 2021-11-01 15:00:32 +01:00
Pierre-Loup
56832b65c6
Fix "pipenv install" invocation to avoid update of Pipfile.lock (#561) 2021-11-01 14:43:11 +01:00
SonarTech
9590b81af2 update coverage information 2021-10-30 00:30:58 +00:00
Pierre-Loup
2eb4c50a9b
RULEAPI-710: Validate that security-standards are not shadowed 2021-10-29 16:55:50 +00:00
Nils Werner
0907628e80
Modify rule S5850: Add Python as covered language (#543) 2021-10-29 13:28:30 +00:00
Nils Werner
37e48b527c
Modify rule S6035: Add Python as covered language (#541)
* Modify rule S6035: Add Python as covered language

* Modify rule S6035: Fix description for python and php
2021-10-29 08:27:24 +00:00
Nils Werner
15ab2acd42
Modify rule S6002: Add Python as covered language (#538) 2021-10-29 08:09:08 +00:00
Nils Werner
d672beb996
Modify rule S6019: Add Python as covered language (#542) 2021-10-29 07:54:32 +00:00
SonarTech
fb27f68ba0 update coverage information 2021-10-29 00:31:36 +00:00
Nils Werner
ed41c3e0db
Modify rule S5855: Add Python as covered language (#539) 2021-10-28 15:58:38 +00:00
Nils Werner
23d7c9c90f
Modify rule S5842: Add Python as covered language (#536)
* Modify rule S5842: Add Python as covered language

* Fix inline comments
2021-10-28 12:56:25 +00:00
Pierre-Loup
547094ab3c
Update CWE mapping (#534) 2021-10-28 10:07:16 +02:00
SonarTech
38ff6e3339 update coverage information 2021-10-28 05:01:47 +00:00
Arseniy Zaostrovnykh
d4ab12d0a8
Add the missing quickfix field (#546) 2021-10-27 08:46:48 +02:00
Nils Werner
fdee957c34
Modify rule S5361: Add Python as covered language (#535)
* Modify rule S5361: Add Python as covered language

* Fix typos in S5361 rule descriptions

* Remove wrong delimiters

* Rename var and fix comment
2021-10-26 16:59:18 +02:00
github-actions[bot]
4596b4170a
Create rule S6320: Cast operations should not trigger a ClassCastException (#187) 2021-10-26 16:31:27 +02:00
github-actions[bot]
a4368afb32
Create rule S6322: Unsupported methods should not be called on some collection implementations (#193) 2021-10-26 16:29:53 +02:00
SonarTech
c48ac7abdb update coverage information 2021-10-26 00:31:11 +00:00
SonarTech
1706289ac1 update coverage information 2021-10-23 00:32:15 +00:00
Čaba Šagi
bfd8bce975
S2302: Update tag to bad-practice (#525) 2021-10-22 17:04:49 +03:00
Johann Beleites
3437bcc74d
Create rule S5867[kotlin]: Unicode-aware versions of character classe… (#439)
* Create rule S5867[kotlin]: Unicode-aware versions of character classes should be preferred

* Fix typo

Co-authored-by: margarita-nedzelska-sonarsource <70522623+margarita-nedzelska-sonarsource@users.noreply.github.com>

Co-authored-by: margarita-nedzelska-sonarsource <70522623+margarita-nedzelska-sonarsource@users.noreply.github.com>
2021-10-22 13:41:03 +00:00
Johann Beleites
98f9c35ae2
Create rule S5868[kotlin]: Unicode Grapheme Clusters should be avoided inside regex character classes (#440) 2021-10-22 15:37:50 +02:00
SonarTech
ae95c3adea update coverage information 2021-10-22 00:31:45 +00:00
Costin Zaharia
48e30f9776
S3267 - update severity and remove clumsy tag (#520) 2021-10-21 16:43:36 +02:00
Tibor Blenessy
461f9b2f60
[JS] Update description for S5958 to not raise for negation (#519) 2021-10-21 13:26:59 +02:00
Pierre-Loup
8f1e968ad7
Update CWE-489 title (#511) 2021-10-21 11:23:23 +02:00
SonarTech
b2b42dd6ec update coverage information 2021-10-21 00:31:56 +00:00
Arseniy Zaostrovnykh
5743ea2d32
Modify rule S5950[CFamily]: remove double negative 2021-10-20 14:56:55 +00:00
Arseniy Zaostrovnykh
91fe81fe58
Modify rule S5950[CFamily]: make_shared C++20 arrays 2021-10-20 13:59:16 +00:00
tomasz-kaminski-sonarsource
04d0ce6e1b
Modify rule S5950: More exceptions for make_shared 2021-10-20 13:35:04 +00:00
Johann Beleites
fba9aabf26
Create rule S5869[kotlin]: Character classes in regular expressions should not contain the same character twice (#441) 2021-10-20 12:43:34 +02:00
hendrik-buchwald-sonarsource
b35c9593c5
Modify rule S6258: Add missing hyphen in title (#513) 2021-10-20 09:36:55 +00:00
Loris S
b3530d6421
Modify rule S6258: Conversion from S3-specific to generic rule (#510) 2021-10-20 09:57:41 +02:00
tomasz-kaminski-sonarsource
b402a859ce
Modify rule S5950: Exception for placemnet new 2021-10-20 07:25:23 +00:00
SonarTech
a17fc7e11d update coverage information 2021-10-20 00:30:58 +00:00
Alexandre Gigleux
d38f238e1d
Update rule.adoc (#509) 2021-10-19 11:43:21 +02:00
geoffray-adde-sonarsource
1b787b9912
Modify rule S6225[CFamily]: cover any iterator and describe limitations 2021-10-19 09:01:49 +02:00
SonarTech
7f024e01b9 update coverage information 2021-10-19 00:31:15 +00:00
abbas-sabra-sonarsource
51195dacf3
Modify rule S1016: make the title match the description 2021-10-18 17:45:46 +02:00
quentin-jaquier-sonarsource
7045e7434b
[java] fix formatting in rules descriptions (#504) 2021-10-18 16:27:36 +02:00
SonarTech
88b19437fe update coverage information 2021-10-16 00:32:03 +00:00
Pierre-Loup
cf92b1d361
Modify rule S5332[kotlin]: support Android WebView insecure mixed content policy (#457) 2021-10-15 10:58:45 +02:00
hendrik-buchwald-sonarsource
9e6d773806
Deprecate S5167 (#352) 2021-10-15 10:56:46 +02:00
hendrik-buchwald-sonarsource
f1a29cf58c
Create rule S6363[kotlin]: Enabling file access for WebViews is security-sensitive (#462) 2021-10-15 10:09:39 +02:00
Pierre-Loup
2026ac6b8c
RULEAPI-698: Support OWASP Top 10 2021 security standard (#466) 2021-10-15 09:37:46 +02:00
SonarTech
8c4de44723 update coverage information 2021-10-15 00:31:26 +00:00
github-actions[bot]
496551bb84
Create rule S6358: Allowing application backup is security-sensitive 2021-10-14 16:51:37 +02:00
Pierre-Loup
18261edb3e
Modify rule S5332: Improve description (#474) 2021-10-14 16:12:59 +02:00
Alexandre Gigleux
f007eeb18c
Remove CWE-311 from "securityStandards" to match the "See" section (#488) 2021-10-14 15:14:07 +02:00
hendrik-buchwald-sonarsource
e8933b12e6
Modify rule S5167: Remove XSS (#483) 2021-10-14 14:03:39 +02:00
Elena Vilchik
dea6d9aecc
Do not repeat inherited data for S5867 (#492) 2021-10-14 14:03:26 +02:00
Elena Vilchik
7a5f08bd8d
Set scope 'Main' for javascript rules (#491) 2021-10-14 12:25:50 +02:00
Loris S
21195f1a78
Modify rule S6308: Improve description (#485)
* description readability re-arrangement

* Update rules/S6308/description.adoc

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>
2021-10-14 11:04:00 +02:00
SonarTech
282b4e3412 update coverage information 2021-10-14 00:31:45 +00:00
margarita-nedzelska-sonarsource
df4c1d46e0
Modify rule S2151: Fix description for Kotlin and Java (#487) 2021-10-13 15:02:16 +00:00
margarita-nedzelska-sonarsource
2ae51e8504
Create rule S1143[kotlin]: Jump statements should not occur in "final… (#319)
Co-authored-by: Dorian Burihabwa <dorian.burihabwa@sonarsource.com>
2021-10-13 16:46:48 +02:00
hendrik-buchwald-sonarsource
e68073caf3
Modify rule S5322: Add XML and update description (#404) 2021-10-13 16:07:37 +02:00
github-actions[bot]
414eaff9e5
Create rule S6361: Defining a single permission for read and write access of Content Providers is security-sensitive (#427) 2021-10-13 13:40:11 +00:00
Loïc Joly
0553b63456
Make it more explicit what a covered or a partial quickfix means 2021-10-13 15:23:02 +02:00
github-actions[bot]
2136dca525
Create rule S5332[xml] (#455) 2021-10-13 12:21:04 +02:00
Massimo Paladin
53a757223f
Modify rule S6359: Move message to implementation specification 2021-10-13 09:57:03 +00:00
SonarTech
dd5988f685 update coverage information 2021-10-13 00:32:00 +00:00
Alban Auzeill
5d16ca1d83
Modify Rule S4507[java]: update sensitive code example with Statics.setWebContentsDebuggingEnabled (#480) 2021-10-12 17:12:55 +02:00
github-actions[bot]
15f09fa985
Create rule S6359: Custom permissions should not be defined in the 'android.permission' namespace 2021-10-12 16:11:29 +02:00
hendrik-buchwald-sonarsource
66b690e5b6
Create rule S6363[java]: Enabling file access for WebViews is security-sensitive (#461) 2021-10-12 15:38:05 +02:00
hendrik-buchwald-sonarsource
faba98c05a
Use example without tainted key (#478) 2021-10-12 14:53:05 +02:00
github-actions[bot]
642f750899
Create rule S6362: Enabling JavaScript support for WebViews is security-sensitive (#433) 2021-10-12 09:46:11 +02:00
Pierre-Loup
0fd3980865
Modify rule S5332[java]: support Android WebView insecure mixed content policy (#458) 2021-10-12 09:21:31 +02:00
hendrik-buchwald-sonarsource
2a575fd3fb
Modify rule S4507: Add Java/Kotlin examples for WebView (#428) 2021-10-12 09:06:49 +02:00
SonarTech
11f50918b1 update coverage information 2021-10-12 00:31:42 +00:00
hendrik-buchwald-sonarsource
846177189b
Modify rule S4423: Improve description (#473) 2021-10-11 21:32:46 +02:00
geoffray-adde-sonarsource
1a4ba668c1
Modify rule S6231[CFamily]: Fix examples 2021-10-11 14:28:56 +02:00
geoffray-adde-sonarsource
0d6374d841
Modify rule S6225[CFamily]: Fix examples 2021-10-11 09:34:24 +02:00
SonarTech
3aac4bb15e update coverage information 2021-10-09 00:31:02 +00:00
quentin-jaquier-sonarsource
53b25a48ba
SONARJAVA-4042 Document quick fix metadata for Java 2021-10-08 15:26:25 +02:00
tomasz-kaminski-sonarsource
711ca3d3c9
Modify rule S1709: Exception for conditional explicit specifier 2021-10-08 13:20:53 +00:00
Pierre-Loup
72a1ac7423
RULEAPI-699: Support OWASP ASVS 4 security standard 2021-10-08 10:23:39 +02:00
SonarTech
9650bd917b update coverage information 2021-10-08 00:32:01 +00:00
hendrik-buchwald-sonarsource
a60040f016
Modify rule S6287: Add code samples (#336) 2021-10-07 13:41:08 +02:00
Arseniy Zaostrovnykh
54ca95619a
Fix the quickfixes section formatting (#463) 2021-10-07 10:02:31 +00:00
Arseniy Zaostrovnykh
6a0ec99e78
RULEAPI-706: Add quick fixes metadata 2021-10-07 09:23:15 +00:00
quentin-jaquier-sonarsource
b2303fd35f
Deprecate rule S2039 for java 2021-10-07 10:34:35 +02:00
SonarTech
389a6f74b5 update coverage information 2021-10-07 00:31:41 +00:00
SonarTech
ce6846cb8c update coverage information 2021-10-06 00:31:30 +00:00
DGolovinov
0b715b2806
Modify rule S2190[C#]: Add C# examples (#452) 2021-10-05 15:39:48 +02:00
Arseniy Zaostrovnykh
f786bd2603
Fix the mistakingly deleted 'See' sections in #362 (#449)
committed as f6331f7fdca7fe36e52439b927312fd5d5a455c0

The mistake was caused by the uninitialized variable "hasSeeSection" in the
automatic removal script. Fixed here:
f6331f7fdc
2021-10-05 09:49:00 +02:00
SonarTech
233213b8e7 update coverage information 2021-10-05 00:31:40 +00:00
Arseniy Zaostrovnykh
11231fb707
Fix the erroneous undeprecation of a deprecated rule without replacement rules (#450) 2021-10-04 16:04:48 +02:00
quentin-jaquier-sonarsource
e8645bce28
Modify rule S6300[java]: Add Java examples 2021-10-04 15:13:19 +02:00
quentin-jaquier-sonarsource
673fc9a1b9
Modify rule S6301[java]: Add Java examples (#409) 2021-10-04 14:29:59 +02:00
Arseniy Zaostrovnykh
2b0bf97a85
Fix coverage update: the fantom of the old rule_coverage directory (#447) 2021-10-04 10:02:36 +00:00
tomasz-kaminski-sonarsource
5ff7d15827
Modify rule S6200: Updated rspec so it works for C and ObjC 2021-10-04 09:03:08 +02:00
Elena Vilchik
af599ec877
Add comment for the rule coverage logic (#446) 2021-10-01 14:33:45 +00:00
Elena Vilchik
84fb0a245c
RULEAPI-697 Display if rule is removed for some language 2021-10-01 15:47:43 +02:00
Arseniy Zaostrovnykh
0fe8dffe85
RULEAPI-573: Clean and test script generating for each rule the list of plugins covering it (#429) 2021-10-01 14:52:12 +02:00
Arseniy Zaostrovnykh
4d6347f458
RULEAPI-701: Remove stray step (#443) 2021-10-01 14:42:07 +02:00
Tibor Blenessy
79852f587e Modify rule S1124: update docs to include default modifier 2021-10-01 14:14:42 +02:00
Arseniy Zaostrovnykh
065138d536
RULEAPI-701: document the use of the new "Add language to a rule" GH action (#438) 2021-10-01 12:30:35 +02:00
Arseniy Zaostrovnykh
dd885e0b4e
RULEAPI-606: Fix the url and raise an exception earlier. (#436) 2021-10-01 10:25:35 +02:00
Arseniy Zaostrovnykh
a774d17f29
RULEAPI-700: fix odd highlighting for selected segment of metadata (#437) 2021-10-01 09:28:57 +02:00
SonarTech
85dddfc752 update coverage information 2021-10-01 06:51:44 +00:00
Arseniy Zaostrovnykh
5f8a2e7ec1
RULEAPI-606: github action and underlying script for adding a new language to an existing rule 2021-09-30 15:47:25 +00:00
Arseniy Zaostrovnykh
8d21500f3b
RULEAPI-700 Highlight the metadata JSON on the rule page (#432) 2021-09-30 17:15:45 +02:00
Arseniy Zaostrovnykh
2d3a3098c5
Use GITHUB_TOKEN for PR crawler to escape GitHub throttling (#430) 2021-09-30 14:48:04 +02:00
Marco Antognini
22d5603950
Modify rule S6195: Fix grammar, typos and added link to S6017 2021-09-30 11:56:04 +00:00
tomasz-kaminski-sonarsource
d786ac4817
Modify rule S6225: Fixed grammar 2021-09-30 13:18:18 +02:00
Elena Vilchik
1d44a68991
RULEAPI-688 Display covered languages on search page 2021-09-30 12:20:26 +02:00
Čaba Šagi
6d8404981c
RULEAPI-642: Validate the level of section headers in asciidoc: make sure there are no level-0 2021-09-30 11:52:56 +02:00
Elena Vilchik
c357e2e7f7
RULEAPI-603 Fail ci metadata check if rule with replacement has 'ready' status (#398) 2021-09-30 11:45:09 +02:00
Arseniy Zaostrovnykh
79e776ed8d
RULEAPI-691: Rule coverage: Track the last version of an analyzer implementing a rule along with the first version 2021-09-30 10:59:30 +02:00
Arseniy Zaostrovnykh
090a5c725d
RULEAPI-696: adapt the rspec/readme.adoc narrative to not mention "coveredLanguages" and to menation -branch in rule-api (#408) 2021-09-29 16:04:43 +02:00
Quentin Jaquier
92c23dd5a0 Modify rule S6291[java]: Add Java examples 2021-09-29 14:12:39 +02:00
eric-therond-sonarsource
fcb6b521e8
Create rule S6288[java]: Authorizing non-authenticated users to use keys in the Android KeyStore is security-sensitive (#105) 2021-09-29 07:42:07 +00:00
SonarTech
c264de77ea update coverage information 2021-09-29 00:31:31 +00:00
Pierre-Loup
1876dbe269
Modify rule S5324: Add Kotlin support (#127) 2021-09-28 15:29:35 +02:00
hendrik-buchwald-sonarsource
1e3dd08570
Modify rule S6291: Generalize rule for multiple databases (#107) 2021-09-28 15:24:26 +02:00
Arseniy Zaostrovnykh
2301f5808e
RULEAPI-695: remove extra/coveredLanguages field 2021-09-28 13:36:45 +02:00
Arseniy Zaostrovnykh
456a6c745c
Improve stability of the checkout for analyzer versions(tags) (#403) 2021-09-28 09:44:33 +00:00
SonarTech
2b80966fc5 update coverage information 2021-09-28 00:30:46 +00:00
Arseniy Zaostrovnykh
daaf32ab39
RULEAPI-694: Scan the master branch for each analyzer and add covered rules 2021-09-27 16:24:44 +00:00
Nils Werner
5b467959ee
Modify rule S6002: Add PHP as covered language (#405) 2021-09-27 17:56:44 +02:00
pynicolas
a5e591bda9
Modify rule S5867: Add PHP as covered language (#345) 2021-09-27 15:21:34 +02:00
tomasz-kaminski-sonarsource
94333ddb65
Modify rule S6021: Expand to cover unordered containers 2021-09-27 15:04:56 +02:00
pynicolas
9e4c0b5eb7
Modify rule S5843: Add PHP as covered language (#395) 2021-09-27 14:38:14 +02:00
pynicolas
54f9d921e1
Modify rule S5361: fix examples for PHP (#396) 2021-09-27 14:36:24 +02:00
margarita-nedzelska-sonarsource
220ef776f2
Modify rule S5322: Add code examples for Kotlin and Java (#389) 2021-09-27 09:30:44 +02:00
SonarTech
8736e561f9 update coverage information 2021-09-26 00:30:59 +00:00
margarita-nedzelska-sonarsource
f8852845d4
Modify rule S5320: Add code examples to Kotlin and Java (#375) 2021-09-24 17:20:57 +02:00
Johann Beleites
31cb9ec1e2
Update rule S4347: "SecureRandom" seeds should not be predictable (#381) 2021-09-24 12:44:46 +00:00
Johann Beleites
78a78b6623
Update rule S2053: Hashes should include an unpredictable salt (#382) 2021-09-24 08:44:57 +00:00
Arseniy Zaostrovnykh
ec55b6ead1
RULEAPI-687: Migrate legacy keys from Jira RSPEC (#392) 2021-09-24 09:08:46 +02:00
SonarTech
3b8fe61a6c update coverage information 2021-09-24 00:30:57 +00:00
Arseniy Zaostrovnykh
b3cc331661
RULEAPI-668: Take the sonar-security analyzer into account when collecting rule coverage in the coverage script 2021-09-23 15:22:57 +00:00
Čaba Šagi
954bdb3fef
Remove quotes from title when searching for jira implementation tickets. (#391) 2021-09-23 16:14:10 +02:00
tomasz-kaminski-sonarsource
fa6c92fb7d
Modify rule S6045: Clarify required step for custom comparators (#390) 2021-09-23 14:00:25 +02:00
Elena Vilchik
6cd704a216
RULEAPI-681 Fix sqKey (stop using legacy key where it's relevant) (#383) 2021-09-23 11:56:40 +02:00
Arseniy Zaostrovnykh
9ca6bea345
RULEAPI-657: Set up a cron job for rule_coverage/coverage.py (#385) 2021-09-23 10:15:02 +02:00
tomasz-kaminski-sonarsource
e6d2d5b61b
Modify rule S6045: Cover heterogenous lookup for unordered containers in C++20 2021-09-22 15:45:32 +02:00
Elena Vilchik
f782b7a737
RULEAPI-670 Print the metadata.json path for the files that break a json parser (#387) 2021-09-22 15:33:20 +02:00
Čaba Šagi
2ec88ce0d8
RULEAPI-673: Stop displaying "Not implemented" for languages that do implement the rule (#386) 2021-09-22 13:49:19 +02:00
Sonartech
5aae9ef9e0 update coverage information 2021-09-21 14:29:34 +00:00
Arseniy Zaostrovnykh
5ba82ae371
RULEAPI-665: Remove security standards from the irrelevant language-specific rules (#362) 2021-09-21 15:40:35 +02:00
Loïc Joly
696582f9c3
Modify rule S6004 : Update after changes provided by CPP-2843 2021-09-21 12:32:03 +00:00
Arseniy Zaostrovnykh
1128d6bf84
Fix the asciidoc validation CI check (#377) 2021-09-21 11:30:38 +02:00
Arseniy Zaostrovnykh
d9aba1b296
Restore the skipped section during import from Jira (#379) 2021-09-21 11:22:09 +02:00
Čaba Šagi
322a7c4271
RULEAPI-675: When searching for a rule-id the results should start with the corresponding RSPEC (#373) 2021-09-21 10:26:06 +02:00
Čaba Šagi
2319f41151
Add back some OG and Twitter card metadata (#376) 2021-09-21 10:07:13 +02:00
Elena Vilchik
02e112133c
RULEAPI-683 Reference the default language and each language by the tag (#372) 2021-09-21 09:43:28 +02:00
Mary Georgiou
e052f499e5
Modify rule S3260 (#378) 2021-09-21 09:00:14 +02:00
Arseniy Zaostrovnykh
599557e3e0
Canonicalize the section name (#374) 2021-09-20 17:54:02 +02:00
Arseniy Zaostrovnykh
f7904cebe7
RULEAPI-666: Migrate the "List of parameters", "Highlighting" and "Message" fields from jira RSPEC (#346) 2021-09-20 13:38:42 +00:00
Čaba Šagi
99eefa300d
Revert setting of metadata (#370) 2021-09-20 15:23:53 +02:00
eric-therond-sonarsource
b67d3241e3
Modify rule S6270 to be more generic targeting all AWS resources (#161) 2021-09-20 14:23:04 +02:00
github-actions[bot]
1b8b1b1a76
Create rule S6317: AWS IAM policies should not allow privilege escalation (#183) 2021-09-20 13:56:24 +02:00
marco-antognini-sonarsource
599c058e1c
Modify rule S6226: Add exception section (#368) 2021-09-20 11:47:04 +02:00
marco-antognini-sonarsource
5187ac8402
Modify rule S6229: Fix typo (#369) 2021-09-20 09:09:52 +00:00
marco-antognini-sonarsource
a02ede9212
Modify rule S6229: Improve description (#363)
* Improve description
* Fix a few typos and add the "noncompliant solution" section.
* Reformat snippets and update example date
2021-09-20 10:47:24 +02:00
marco-antognini-sonarsource
d8936884d9
Modify rule S6226: Disable rule on Windows (#364)
* Disable rule on Windows
* Improve formatting and wording
2021-09-20 10:31:12 +02:00
Karim El Ouerghemmi
41f0b96bbd
Modify rule S6019: Modify PHP examples (#366)
* Modify rule S6019: Modify PHP examples

* Add missing slashes

Co-authored-by: pynicolas <pierre-yves.nicolas@sonarsource.com>
2021-09-17 18:43:00 +02:00
Karim El Ouerghemmi
0c85388da4
Modify rule S6019: Modify Java examples (#367)
* Modify rule S6019: Modify Java examples

* Remove unnecessary slashes
2021-09-17 16:12:02 +00:00
Karim El Ouerghemmi
f8b6388a49
Modify rule S5857: Add PHP as covered language (#358) 2021-09-17 17:52:17 +02:00
Arseniy Zaostrovnykh
11c08de44a
Revert "RULEAPI-665: Remove security standards from the irrelevant language-specific rules" (#361)
This reverts commit 892bccde8ffcdf2a6d662d97ec469cd63de87878.
2021-09-17 13:50:03 +02:00
Arseniy Zaostrovnykh
892bccde8f
RULEAPI-665: Remove security standards from the irrelevant language-specific rules 2021-09-17 13:44:41 +02:00
Čaba Šagi
a6040466de
Twitter cards support (#360) 2021-09-17 11:56:35 +02:00
Čaba Šagi
e5ab334b9b
RULEAPI-671 Remove menu button in github pages and change color theme (#359) 2021-09-17 10:51:48 +02:00
Elena Vilchik
8d5790e4cf
RULEAPI-658 Do not diplay 'default' in languages on search page (#354) 2021-09-17 09:57:00 +02:00
Elena Vilchik
07dcd27a31
RULEAPI-672 Surround new rule PR processing with try-catch 2021-09-16 16:15:34 +00:00
margarita-nedzelska-sonarsource
4c8b93de6f
Update rule S2695: "PreparedStatement" and "ResultSet" method s should be called with valid indices (#329)
Add Kotlin support
2021-09-16 15:12:24 +00:00
margarita-nedzelska-sonarsource
0c7fe579e7
Update rule S899: Return values should not be ignored when they contain the operation status code 2021-09-16 14:42:50 +00:00
Karim El Ouerghemmi
6f0f1e3094
Modify rule S6019: Add PHP as covered language (#355)
Co-authored-by: pynicolas <pierre-yves.nicolas@sonarsource.com>
2021-09-16 14:29:13 +00:00
margarita-nedzelska-sonarsource
c5345c7456
Create rule S2689[kotlin]: Files opened in append mode should not be used with ObjectOutputStream (#328) 2021-09-16 13:59:08 +00:00
margarita-nedzelska-sonarsource
08f4f27d48
Create rule S2189[kotlin]: Loops should not be infinite (#327) 2021-09-16 13:49:23 +00:00
Johann Beleites
4618d16b53
Create rule S2151[Kotlin]: "runFinalizersOnExit" should not be called (#325) 2021-09-16 13:44:59 +00:00
Costin Zaharia
e6af5d312f
Rule S3059: remove it from SonarWay profile (#353) 2021-09-16 12:50:36 +00:00
github-actions[bot]
4d54557a1f
Create rule S6304: Having AWS policies that grant access to all resources of an account is security-sensitive (#164) 2021-09-16 13:58:06 +02:00
Čaba Šagi
68e7b7bf54
RULEAPI-667: Page title should contain rule ID (#348) 2021-09-16 13:37:14 +02:00
Johann Beleites
89c3f54f65
Create rule S6202[kotlin]: Operator "is" should be used instead of "isInstance()" (#310) 2021-09-15 12:59:39 +00:00
github-actions[bot]
6611dde0fd
Create rule S6321: Administration services access should be restricted to specific IP addresses (#188)
* Create rule S6321

* init S6321

* adjust title to follow guidelines

* fix incorrect CWE link

* some fixes

* fix cis category

* fix after review

Co-authored-by: eric-therond-sonarsource <eric-therond-sonarsource@users.noreply.github.com>
Co-authored-by: eric-therond-sonarsource <eric.therond@sonarsource.com>
2021-09-15 08:10:36 +00:00
margarita-nedzelska-sonarsource
7a609641dc
Update rule S6218: Equals method should be overridden in data classes with array fields (#311) 2021-09-14 14:52:50 +00:00
Costin Zaharia
a00181e895
Rule S3059: update description and code examples (#332) 2021-09-14 14:28:32 +00:00
github-actions[bot]
fe8a029414
Create rule S6302: Having AWS policies that grant all privileges is security-sensitive (#153) 2021-09-14 16:10:45 +02:00
Karim El Ouerghemmi
0cb71fb085
Modify rule S5856: Add PHP as covered language (#338)
* Modify rule S5856: Add PHP as covered language

* Fix code example
2021-09-14 13:32:14 +00:00
github-actions[bot]
0d3d867296
Create rule S6333: Creating public APIs is security sensitive (#216)
* Create rule S6333

* init s6333

Co-authored-by: eric-therond-sonarsource <eric-therond-sonarsource@users.noreply.github.com>
Co-authored-by: eric-therond-sonarsource <eric.therond@sonarsource.com>
Co-authored-by: Karim El Ouerghemmi <64004037+karim-ouerghemmi-sonarsource@users.noreply.github.com>
2021-09-14 12:47:22 +00:00
margarita-nedzelska-sonarsource
8a067d8b39
Update rule S2123: Values should not be uselessly incremented (#318) 2021-09-14 12:34:52 +00:00
Johann Beleites
26aa80bd16
Create rule S4738[Kotlin]: Native features should be preferred to Guava (#323) 2021-09-14 12:26:32 +00:00
Johann Beleites
74b5d7b701
Create rule S6207[Kotlin]: Redundant methods should be avoided in data classes (#324) 2021-09-14 11:57:35 +00:00
Johann Beleites
c607360a48
Create rule S2122[Kotlin]: "ScheduledThreadPoolExecutor" should not have 0 core threads (#326)
* Create rule S2122[Kotlin]: "ScheduledThreadPoolExecutor" should not have 0 core threads

* Update rules/S2122/description.adoc

Co-authored-by: margarita-nedzelska-sonarsource <70522623+margarita-nedzelska-sonarsource@users.noreply.github.com>

Co-authored-by: margarita-nedzelska-sonarsource <70522623+margarita-nedzelska-sonarsource@users.noreply.github.com>
2021-09-14 10:31:55 +00:00
Johann Beleites
4aa0023da8
Create rule S6203[kotlin]: Multi-line string literals should not be used in complex expressions (#316) 2021-09-14 09:55:41 +00:00
Costin Zaharia
5cbfbdb73b
Rule S3267: fix formatting and add missing parentheses (#337) 2021-09-14 11:02:14 +02:00
pynicolas
ba0d655967
Modify rule S6001: Add PHP as covered language (#335)
* Modify rule S6001: Add PHP as covered language

* Add regexp delimiters and escape backslashes for backreferences
2021-09-13 18:05:46 +02:00
Karim El Ouerghemmi
a1a1f6647a
Modify rule S5850: Add PHP as covered language (#334) 2021-09-13 16:20:17 +02:00
Elena Vilchik
e0362987e1
RULEAPI-674 Searching for RSPEC-XXXX should return the same as searching for SXXXX 2021-09-13 13:37:44 +00:00
Loïc Joly
57060f8031
This rule was never implemented for C++, and does not really make sense... Removing C++ from the targeted languages. 2021-09-13 13:16:54 +00:00
github-actions[bot]
ab591b6b58
Create rule S6329: Assigning public IP address to an AWS resource is security-sensitive (#202) 2021-09-13 14:01:24 +02:00
github-actions[bot]
ff4ca58e61
Create rule S6338: Azure Storage Account Keys should not be disclosed (#229) 2021-09-13 09:26:12 +02:00
hendrik-buchwald-sonarsource
a2a89ede6a
Fix incorrect exceptions for error_reporting (#330) 2021-09-09 16:15:31 +02:00
Loïc Joly
fcbbc0c93f
Modify rule S1705: FP when the returned value of postfix inc is actually used (CPP-3246) 2021-09-08 13:20:45 +00:00
github-actions[bot]
4e991032ab
Create rule S6330: Using unencrypted SQS queues is security-sensitive (#205) 2021-09-08 15:01:03 +02:00
github-actions[bot]
a006d24edd
Create rule S6337: IBM API keys should not be disclosed (#226) 2021-09-08 11:37:35 +02:00
github-actions[bot]
fd0ff1ab0f
Create rule S6336: Alibaba Cloud AccessKeys should not be disclosed (#224) 2021-09-08 11:31:19 +02:00
github-actions[bot]
2fa87a7098
Create rule S6335: Google Cloud service accounts keys should not be disclosed (#220) 2021-09-08 11:26:21 +02:00
github-actions[bot]
db77bb11e9
Create rule S6334: Google API keys should not be disclosed (#218) 2021-09-08 11:20:16 +02:00
Karim El Ouerghemmi
453fde55d6
Modify rule S5996: Add PHP as covered language (#322) 2021-09-08 08:43:03 +00:00
github-actions[bot]
97fee30ff9
Create rule S6332: Using unencrypted EFS file systems is security-sensitive (#210) 2021-09-08 10:22:33 +02:00
github-actions[bot]
89c01fb164
Create rule S6327: Using unencrypted SNS topics is security-sensitive (#198) 2021-09-07 16:05:35 +02:00
Arseniy Zaostrovnykh
9eec54bb8d
Modify rule S6236: missing code-word style (#321) 2021-09-07 13:51:27 +00:00
Damien Urruty
238bc779dd Modify rule S6292: Fix typos in the description 2021-09-07 15:32:30 +02:00
Damien Urruty
cf67c3ab36 Modify rule S6290: Fix typos in the description 2021-09-07 15:32:30 +02:00
github-actions[bot]
00e9e6dd46
Create rule S6308: Using unencrypted Elasticsearch domains is security-sensitive (#174) 2021-09-07 14:12:58 +02:00
github-actions[bot]
51c43abca2
Create rule S6319: Using unencrypted SageMaker notebook instances is security-sensitive (#185) 2021-09-07 11:55:51 +02:00
Karim El Ouerghemmi
97deb14493
Modify rule S5855: Add PHP as covered language (#317)
* Modify rule S5855: Add PHP as covered language

* Address review comment
2021-09-07 11:36:39 +02:00
Arseniy Zaostrovnykh
8c505900b8
Modify rule S6236: More accessible description 2021-09-07 09:48:18 +02:00
hendrik-buchwald-sonarsource
c3fd720cfb
Modify rule S6275: Add description (#160) 2021-09-06 18:56:35 +02:00
Elena Vilchik
f6b49970f3
Create rule S6019[javascript]: Reluctant quantifiers in regular expressions should be followed by an expression that can't match the empty string (#276) 2021-09-06 16:45:18 +02:00
Loïc Joly
c7b0ebcc3e
CPP-3133 S874: Update RSPEC
- False positive when combining operations due to integer promotion
- The problem mostly disappears in C++20, where signed integers are encoded in two's complement
2021-09-06 14:00:47 +00:00
github-actions[bot]
7d377d77ea
Create rule S6303: Using unencrypted RDS databases is security-sensitive (#163) 2021-09-06 15:34:51 +02:00
Karim El Ouerghemmi
12c92a9460
Modify rule S6035: Add PHP as covered language (#309) 2021-09-06 10:51:53 +02:00
Quentin Jaquier
3503a46ff7 Modify rule S1123[java]: Update description to remove overlap with new rule 2021-09-06 09:56:31 +02:00
quentin-jaquier-sonarsource
27eacde28a Create rule S6355[java]: Deprecated annotations should include explanations 2021-09-06 09:56:31 +02:00
tomasz-kaminski-sonarsource
4423be4a1c
Modify rule S6236: Fixed typos in example 2021-09-03 15:45:55 +02:00
Yassin Kammoun
de831a5e80
Create rule S5869[javascript]: Character classes in regular expressions should not contain the same character twice (#267) 2021-09-03 14:17:40 +02:00
quentin-jaquier-sonarsource
fe53c11d24
Modify rule S3655[java]: fix compliant example (#306) 2021-09-03 13:36:27 +02:00
Yassin Kammoun
62cf2347c9
Create rule S5852[javascript]: Using slow regular expressions is security-sensitive (#269) 2021-09-03 12:15:21 +02:00
Michael Gumowski
7adb5299d2
SONARJAVA-4000 Add suport of Maps in S1168 (#304) 2021-09-03 09:17:11 +02:00
Loïc Joly
a9f498e42f
Modify rule S1235: The description was not describing C++ behavior 2021-09-03 08:37:08 +02:00
quentin-jaquier-sonarsource
5fb5cf400c
Modify rule S3655[java]: mention "isEmpty" and indirect access in code examples (#300) 2021-09-02 18:11:19 +02:00
tomasz-kaminski-sonarsource
3e606711ae
Modify rule S6236: Reduce scope to template instantions only 2021-09-02 14:45:04 +00:00
Loïc Joly
b646da5710
Modify rule S6195 into: "std::enable_if" should not be used (CPP-2918) 2021-09-02 14:42:08 +00:00
Andrei Epure
20ae5c99a1
Modify rule S3877: mention C# 9 module initializers (#231) 2021-09-02 14:00:43 +02:00
Čaba Šagi
5a8f29bd9f
Update rule S2699 [csharp]: Mention new supported frameworks (#303) 2021-09-02 13:39:52 +02:00
Čaba Šagi
5598dee814
Fix invalid links (#302) 2021-09-02 12:23:57 +02:00
Alban Auzeill
1861c988dc
Fix S1068/java Asciidoctor Syntax, missing one blank line space before list of items (#301) 2021-09-02 12:00:02 +02:00
Yassin Kammoun
5b3335ebbf
Modify rule S6353[javascript]: Mention s flag requirement for [\s\S] pattern (#297) 2021-09-02 11:50:02 +02:00
Nils Werner
231f4f19a3
Modify rule S5868: Fix regex pattern for PHP (#298) 2021-09-02 08:40:12 +00:00
Nils Werner
78b01793f8
Modify rule S5994: Add PHP as covered language (#296) 2021-09-02 10:03:52 +02:00
Čaba Šagi
6c53ff3a40
Modify rule S4000: Mention all pointer types in description (#288) 2021-09-01 17:55:00 +02:00
Nils Werner
608b6e89a7
Modify rule S5868: Add PHP as covered language (#295) 2021-09-01 15:22:49 +02:00
Nils Werner
0fc9277c2e
Modify rule S5869: Add PHP as covered language (#293) 2021-09-01 15:04:42 +02:00
Nils Werner
b200ab7bf0
Modify rule S5842: Add PHP as covered language (#292) 2021-08-31 17:17:59 +02:00
Yassin Kammoun
38a8225038
Create rule S5842[javascript]: Repeated patterns in regular expressions should not match the empty string (#277) 2021-08-31 16:57:18 +02:00
github-actions[bot]
bd1f1a33ad
Create rule S6353: Regular expression quantifiers and character classes should be used concisely (#279) 2021-08-31 14:56:55 +02:00
quentin-jaquier-sonarsource
98730f5823
.gitignore IntelliJ IDEA files (#289) 2021-08-31 13:31:58 +02:00
Dorian Burihabwa
82de518f82
Modify rule S1068: Document tolerated exceptions for Java (#284) 2021-08-31 12:10:35 +02:00
quentin-jaquier-sonarsource
7a6b82140a
Modify rule S6216[java]: change "in run-time" by "at runtime" (#286) 2021-08-31 11:52:40 +02:00
Nils Werner
f9bb064e8f
Modify rule S5361: Add PHP as covered language (#287)
* Modify rule S5361: Add PHP as covered language

* Update rules/S5361/php/metadata.json

Co-authored-by: pynicolas <pierre-yves.nicolas@sonarsource.com>

Co-authored-by: pynicolas <pierre-yves.nicolas@sonarsource.com>
2021-08-31 10:45:38 +02:00
Yassin Kammoun
672560f059
Create rule S5843[javascript]: Regular expressions should not be too complicated (#273) 2021-08-31 09:36:47 +02:00
github-actions[bot]
60c5453a9b
Create rule S6352: The return value of "std::move" should be used in a function 2021-08-30 21:43:46 +00:00
tomasz-kaminski-sonarsource
5ce2a53271
Modify rule S6321: Clarified string-view introduction and restored example (#282)
CPP-3011
2021-08-30 11:36:06 +02:00
github-actions[bot]
4b90d13af4
Create rule S6351: Regular expressions with the global flag should be used with caution (#274) 2021-08-25 14:11:47 +02:00
DGolovinov
cd2eb4c9dc
Rule S4261: undeprecate (#281) 2021-08-25 13:18:46 +02:00
Yassin Kammoun
2d4f279763
Create rule S5867[javascript]: Regular expressions using Unicode character classes or property escapes should enable the unicode flag (#280) 2021-08-25 10:44:38 +02:00
Loïc Joly
fb0dabd157
CPP-2968: Rule S6221: Concept names should comply with a naming convention
Correct typo in code examples
2021-08-19 13:58:43 +02:00
eric-therond-sonarsource
284ecc2fd8
update s2076 PHP description + common metadata (#264) 2021-08-17 19:33:04 +02:00
Johann Beleites
3e885384c4
Create rule S1128[kotlin]: Unnecessary imports should be removed (#268) 2021-08-17 16:06:47 +02:00
Nils Werner
bb8fe0b62b
Modify rule S6294: Log Groups should be declared explicitly (#165)
The relation between relevant resource and log group resource is done via Ref not Join
2021-08-16 13:01:02 +00:00
Karim El Ouerghemmi
88e29d159c
Fix alignment in S6294 CloudFormation examples (#190)
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2021-08-16 12:51:45 +00:00
pynicolas
0da133709f
Modify rule S5332: WordPress misconfigurations (#228)
Co-authored-by: Karim El Ouerghemmi <64004037+karim-ouerghemmi-sonarsource@users.noreply.github.com>
2021-08-16 11:40:21 +00:00
Karim El Ouerghemmi
0a4058b474
Delete rule S6342 (#266)
See jira comment in https://jira.sonarsource.com/browse/SONARPHP-1207 for the why.
2021-08-16 10:45:58 +02:00
Čaba Šagi
9fef1a0432
Create rule S3431[VBNET]: ExpectedException should not be used (#259) 2021-08-13 16:51:27 +02:00
github-actions[bot]
1cdcb5dc2e
Create rule S6348: Allowing unfiltered HTML content in WordPress is security-sensitive (#247)
* Create rule S6348

* Title and type

* Description

* Address review suggestions

Co-authored-by: karim-ouerghemmi-sonarsource <karim-ouerghemmi-sonarsource@users.noreply.github.com>
Co-authored-by: Karim El Ouerghemmi <64004037+karim-ouerghemmi-sonarsource@users.noreply.github.com>
Co-authored-by: Karim El Ouerghemmi <karim.ouerghemmi@sonarsource.com>
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2021-08-13 14:31:32 +00:00
github-actions[bot]
1601b6a6c7
Create rule S6339: Secret keys and salt values should be robust (#230)
* Create rule S6339

* Update description and title

* Add tag and security standard

* Add link

* Fix metada JSON

Co-authored-by: pynicolas <pynicolas@users.noreply.github.com>
Co-authored-by: Pierre-Yves Nicolas <pierre-yves.nicolas@sonarsource.com>
Co-authored-by: Karim El Ouerghemmi <64004037+karim-ouerghemmi-sonarsource@users.noreply.github.com>
2021-08-13 15:48:17 +02:00
github-actions[bot]
a9ac3f1d8a
Create rule S6343: Disabling automatic updates is security-sensitive (#240)
* Create rule S6343

* Add examples

* Add description

* Change to security hotspot

* Title

* Address review suggestions

Co-authored-by: karim-ouerghemmi-sonarsource <karim-ouerghemmi-sonarsource@users.noreply.github.com>
Co-authored-by: Karim El Ouerghemmi <64004037+karim-ouerghemmi-sonarsource@users.noreply.github.com>
Co-authored-by: Karim El Ouerghemmi <karim.ouerghemmi@sonarsource.com>
2021-08-13 14:22:23 +02:00
github-actions[bot]
7f49f6e2d6
Create rule S6346: Allowing unauthenticated database repair in WordPress is security-sensitive (#244)
* Create rule S6346

* Add description

* Type and title

* Address review comments

Co-authored-by: karim-ouerghemmi-sonarsource <karim-ouerghemmi-sonarsource@users.noreply.github.com>
Co-authored-by: Karim El Ouerghemmi <64004037+karim-ouerghemmi-sonarsource@users.noreply.github.com>
Co-authored-by: Karim El Ouerghemmi <karim.ouerghemmi@sonarsource.com>
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2021-08-13 11:56:50 +00:00
github-actions[bot]
848264934f
Create rule S6349: WordPress option names should not be misspelled (#248)
* Create rule S6349

* Update rule description

* Address review suggestion

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>

Co-authored-by: pynicolas <pynicolas@users.noreply.github.com>
Co-authored-by: Pierre-Yves Nicolas <pierre-yves.nicolas@sonarsource.com>
Co-authored-by: Karim El Ouerghemmi <64004037+karim-ouerghemmi-sonarsource@users.noreply.github.com>
Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>
2021-08-13 10:43:27 +02:00
margarita-nedzelska-sonarsource
da4590101f
Create rule S5612[kotlin]: Lambdas should not have too many lines (#263) 2021-08-13 07:52:22 +00:00
github-actions[bot]
43ab7609ad
Create rule S6344: Constants should not be redefined (#241)
* Create rule S6344

* Update rule metadata

Co-authored-by: pynicolas <pynicolas@users.noreply.github.com>
Co-authored-by: Pierre-Yves Nicolas <pierre-yves.nicolas@sonarsource.com>
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2021-08-12 14:36:09 +00:00
github-actions[bot]
9587ea2542
Create rule S6345: Allowing all external requests from a WordPress server is security-sensitive (#243)
* Create rule S6345

* Update rule description

* Address review comments

Co-authored-by: pynicolas <pynicolas@users.noreply.github.com>
Co-authored-by: Pierre-Yves Nicolas <pierre-yves.nicolas@sonarsource.com>
Co-authored-by: Karim El Ouerghemmi <64004037+karim-ouerghemmi-sonarsource@users.noreply.github.com>
2021-08-12 15:22:40 +02:00
github-actions[bot]
99d574640b
Create rule S6347: WordPress options should not be defined at the end of "wp-config.php" (#245)
* Create rule S6347

* Update rule description

Co-authored-by: pynicolas <pynicolas@users.noreply.github.com>
Co-authored-by: Pierre-Yves Nicolas <pierre-yves.nicolas@sonarsource.com>
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2021-08-12 12:20:02 +00:00
github-actions[bot]
26b281eb2a
Create rule S6341: WordPress theme and plugin editors are security-sensitive (#236) 2021-08-12 11:19:38 +02:00
github-actions[bot]
fb514b35bd
Create rule S6342: Allowing themes and plugins to be managed in WordPress admin area is security-sensitive (#238)
* Create rule S6342

* First real description

* Update rules/S6342/php/rule.adoc

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>

* Address review suggestions

Co-authored-by: pynicolas <pynicolas@users.noreply.github.com>
Co-authored-by: Pierre-Yves Nicolas <pierre-yves.nicolas@sonarsource.com>
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>
Co-authored-by: Nils Werner <nils.werner@sonarsource.com>
2021-08-12 09:06:07 +00:00
Yassin Kammoun
9e3e82beac
Modify rule S3723: Consider all multiline constructs (#262) 2021-08-12 10:58:54 +02:00
Dorian Burihabwa
00b31f1f7f
Modify rule S2479: Remove tabs exception for Java text blocks (#261)
The tabs exception is now configurable is now configurable using a
parameter and disabled by default.
2021-08-12 10:12:10 +02:00
Evgeny Mandrikov
8727e518b0
Create rule S1874[kotlin]: Code annotated as deprecated should not be used 2021-08-10 21:00:54 +00:00
Loïc Joly
b5f76d1705
Add documentation about rule deprecation (#257) 2021-08-10 16:59:12 +00:00
Evgeny Mandrikov
a3166ba6fc
Create rule S1133[kotlin]: Deprecated code should be removed 2021-08-10 17:08:36 +02:00
pynicolas
57c2681f05
Modify rule S4507: WordPress misconfigurations (#227) 2021-08-10 12:03:24 +00:00
Alban Auzeill
dac882e024 Fix S5329 typo and add noncompliant comments 2021-08-09 08:35:15 +02:00
Quentin Jaquier
b9ee74ad78 Update legacy keys for xml 2021-08-06 16:54:56 +02:00
Alban Auzeill
7d81d42672 S5329 should not be a BUG but a CODE_SMELL 2021-08-06 16:26:06 +02:00
tomasz-kaminski-sonarsource
d521e47600
Modify rule S3230: Add missing since-c++11 tag (#252) 2021-08-06 10:17:58 +02:00
Pavel Mikula
bde9d5a440
Modify rule S1764 csharp and vbnet: Change scope to Main-only (#250) 2021-08-05 15:59:48 +02:00
margarita-nedzelska-sonarsource
5663b5a34f
Fix broken links in Apex rules description (S5376 & S 5380) 2021-08-05 14:31:14 +02:00
github-actions[bot]
56ce673d3f
Create rule S6300: Using unencrypted files in mobile applications is security-sensitive (#126) 2021-08-05 12:03:23 +00:00
github-actions[bot]
a0868e9aa6
Create rule S6301: Mobile database encryption keys should not be disclosed (#129) 2021-08-05 08:11:58 +00:00
Dorian Burihabwa
1cc6413fc3 Revert "MMF-2326 Move Java rules targeting XML from Java to XML category"
This reverts commit b20fe5c6c9f3793bdc761bb3d31a839eee31cddd.
2021-08-03 16:56:14 +02:00
Johann Beleites
09ce6edecc
Use correct plural form of IVs (#246) 2021-08-02 17:01:21 +02:00
Michael Gumowski
b20fe5c6c9
MMF-2326 Move Java rules targeting XML from Java to XML category (#242)
Rules moved:
* S3281
* S3282
* S3355
* S3369
* S3373
* S3374
* S3417
* S3419
* S3420
* S3421
* S3422
* S3423
* S3438
* S3439
* S3822
2021-08-02 15:37:52 +02:00
Tibor Blenessy
9f4d298498
Modify rule S6323: Add exception when | is used for optional groups (#239) 2021-07-30 17:30:23 +02:00
Amélie Renard
75d37bb04b
Modify rule S6223: Add missing "Noncompliant Code Example" 2021-07-30 12:01:48 +02:00
Amélie Renard
fba2174078
Modify rule S6236: Fix typo 2021-07-30 07:48:08 +00:00
Yassin Kammoun
3bb15cff6c
Modify rule S5860: Describe missing non-compliant pattern (#234) 2021-07-29 18:03:39 +02:00
Amélie Renard
25e3bde913
Modify rule S6236: Fix typos 2021-07-29 14:57:11 +00:00
margarita-nedzelska-sonarsource
3d74faecbb
Update S6318 description (#222) 2021-07-28 16:04:48 +02:00
Pierre-Loup
b831b156a9
Update S6290 and S6292 (#223)
Split rule description and fix OWASP category
2021-07-28 14:08:55 +02:00
github-actions[bot]
7626f749d5
Create rule S6311: Suspending functions should be called on the caller's thread (#177)
Co-authored-by: margarita-nedzelska-sonarsource <70522623+margarita-nedzelska-sonarsource@users.noreply.github.com>
Co-authored-by: johann-beleites-sonarsource <johann-beleites-sonarsource@users.noreply.github.com>
Co-authored-by: Johann Beleites <johann.beleites@sonarsource.com>
Co-authored-by: Johann Beleites <63855942+johann-beleites-sonarsource@users.noreply.github.com>
Co-authored-by: margarita-nedzelska-sonarsource <70522623+margarita-nedzelska-sonarsource@users.noreply.github.com>
2021-07-28 08:39:39 +00:00
margarita-nedzelska-sonarsource
505c2f774a
Fix formatting in S6315 description (#221) 2021-07-28 07:57:57 +00:00
github-actions[bot]
aa67048f1c
Create rule S6307: Suspending functions should be main-safe (#173)
Co-authored-by: johann-beleites-sonarsource <johann-beleites-sonarsource@users.noreply.github.com>
Co-authored-by: Johann Beleites <johann.beleites@sonarsource.com>
Co-authored-by: Johann Beleites <63855942+johann-beleites-sonarsource@users.noreply.github.com>
Co-authored-by: margarita-nedzelska-sonarsource <70522623+margarita-nedzelska-sonarsource@users.noreply.github.com>
2021-07-28 10:30:18 +03:00
Yassin Kammoun
217e186529
Create rule S5860[javascript]: Names of regular expressions named groups should be used (#206) 2021-07-27 14:10:16 +02:00
Amélie Renard
dfbf5565f9
Modify rule S6228: Fix typos 2021-07-27 09:14:18 +00:00
github-actions[bot]
107b9a88c1
Create rule S6328: Replacement strings should reference existing regular expression groups (#200) 2021-07-27 10:33:24 +02:00
Yassin Kammoun
621be19849
Modify rule S5850: Update supported anchors for JavaScript regex (#219) 2021-07-26 09:46:02 +02:00
github-actions[bot]
3337ef0c1f
Create rule S6316: Kotlin coroutines api for timeouts should be used (#182)
* Create rule S6316

* Update metadata.json

* Update rule.adoc

* Update rules/S6316/kotlin/metadata.json

Co-authored-by: Johann Beleites <63855942+johann-beleites-sonarsource@users.noreply.github.com>

* Update rules/S6316/kotlin/rule.adoc

Co-authored-by: Johann Beleites <63855942+johann-beleites-sonarsource@users.noreply.github.com>

* Update rules/S6316/kotlin/rule.adoc

Co-authored-by: Johann Beleites <63855942+johann-beleites-sonarsource@users.noreply.github.com>

* Update rules/S6316/kotlin/rule.adoc

Co-authored-by: Johann Beleites <63855942+johann-beleites-sonarsource@users.noreply.github.com>

* Update rules/S6316/kotlin/rule.adoc

Co-authored-by: Johann Beleites <63855942+johann-beleites-sonarsource@users.noreply.github.com>

Co-authored-by: margarita-nedzelska-sonarsource <margarita-nedzelska-sonarsource@users.noreply.github.com>
Co-authored-by: margarita-nedzelska-sonarsource <70522623+margarita-nedzelska-sonarsource@users.noreply.github.com>
Co-authored-by: Johann Beleites <63855942+johann-beleites-sonarsource@users.noreply.github.com>
2021-07-23 12:31:22 +00:00
github-actions[bot]
4059052f41
Create rule S6314: Flow intermediate operation results should not be left unused (#180)
* Create rule S6314

* Update metadata.json

* Update rule.adoc

* Update rules/S6314/kotlin/rule.adoc

Co-authored-by: Johann Beleites <63855942+johann-beleites-sonarsource@users.noreply.github.com>

* Update rules/S6314/kotlin/rule.adoc

Co-authored-by: Johann Beleites <63855942+johann-beleites-sonarsource@users.noreply.github.com>

* Update metadata.json

Co-authored-by: margarita-nedzelska-sonarsource <margarita-nedzelska-sonarsource@users.noreply.github.com>
Co-authored-by: margarita-nedzelska-sonarsource <70522623+margarita-nedzelska-sonarsource@users.noreply.github.com>
Co-authored-by: Johann Beleites <63855942+johann-beleites-sonarsource@users.noreply.github.com>
2021-07-23 09:40:05 +00:00
github-actions[bot]
4b7ca0a10c
Create rule S6312: Extension functions on CoroutineScope should not be suspending (#178)
* Create rule S6312

* Update metadata.json

* Update rule.adoc

* Update metadata.json

* add link to the post

* Update metadata.json

* Update rule.adoc

* Update rules/S6312/kotlin/rule.adoc

Co-authored-by: Johann Beleites <63855942+johann-beleites-sonarsource@users.noreply.github.com>

* Update rules/S6312/kotlin/rule.adoc

Co-authored-by: Johann Beleites <63855942+johann-beleites-sonarsource@users.noreply.github.com>

Co-authored-by: margarita-nedzelska-sonarsource <margarita-nedzelska-sonarsource@users.noreply.github.com>
Co-authored-by: margarita-nedzelska-sonarsource <70522623+margarita-nedzelska-sonarsource@users.noreply.github.com>
Co-authored-by: Johann Beleites <63855942+johann-beleites-sonarsource@users.noreply.github.com>
2021-07-23 05:41:20 +00:00
github-actions[bot]
ed563b4667
Create rule S6313: ViewModel classes should create coroutines (#179)
Co-authored-by: Johann Beleites <johann.beleites@sonarsource.com>
Co-authored-by: margarita-nedzelska-sonarsource <margarita-nedzelska-sonarsource@sonarsource.com>
2021-07-22 17:36:28 +02:00
github-actions[bot]
cf3dc04639
Create rule S6309: Functions returning Flow/Channel should not be suspending (#175)
* Create rule S6309

* Update metadata.json

* Update rule.adoc

* Update metadata.json

* Update metadata.json

* Update rule.adoc

* Update metadata.json

* Update rule.adoc

* Update rules/S6309/kotlin/rule.adoc

Co-authored-by: Johann Beleites <63855942+johann-beleites-sonarsource@users.noreply.github.com>

* Update rules/S6309/kotlin/rule.adoc

Co-authored-by: Johann Beleites <63855942+johann-beleites-sonarsource@users.noreply.github.com>

* Update rule.adoc

Co-authored-by: margarita-nedzelska-sonarsource <margarita-nedzelska-sonarsource@users.noreply.github.com>
Co-authored-by: margarita-nedzelska-sonarsource <70522623+margarita-nedzelska-sonarsource@users.noreply.github.com>
Co-authored-by: Johann Beleites <63855942+johann-beleites-sonarsource@users.noreply.github.com>
2021-07-22 17:31:16 +02:00
Tibor Blenessy
9f7779cb6b
Create rule S5850[javascript]: Alternatives in regular expressions should be grouped when used with anchors (#201) 2021-07-22 10:13:35 +02:00
github-actions[bot]
f1b3fa5632
Create rule S6323: Alternation in regular expressions should not contain empty alternatives (#194) 2021-07-21 13:51:06 +02:00
github-actions[bot]
3332627c3d
Create rule S6315: The return value of "async" should be used (#181)
* Create rule S6315

* Added rule description and metadata for S6315

* Improved description

* Changed rule to cover async vs. launch instead. Rule 6307 already covers launching tasks with the correcd dispatcher.

* Changed rule to encompass all functions returning 'Deferred'

* Improved description

* Adjusted cost

Co-authored-by: johann-beleites-sonarsource <johann-beleites-sonarsource@users.noreply.github.com>
Co-authored-by: Johann Beleites <johann.beleites@sonarsource.com>
Co-authored-by: margarita-nedzelska-sonarsource <70522623+margarita-nedzelska-sonarsource@users.noreply.github.com>
Co-authored-by: Johann Beleites <63855942+johann-beleites-sonarsource@users.noreply.github.com>
2021-07-21 13:38:37 +02:00
github-actions[bot]
97317c3880
Create rule S6305: Don’t expose MutableStateFlow & MutableSharedFlow (#166)
* Create rule S6305

* Update metadata.json

* Update rule.adoc

* Update metadata.json

* Update rules/S6305/kotlin/rule.adoc

Co-authored-by: Johann Beleites <63855942+johann-beleites-sonarsource@users.noreply.github.com>

* Update metadata.json

* Update rule.adoc

* Update metadata.json

* Update rules/S6305/kotlin/rule.adoc

Co-authored-by: Johann Beleites <63855942+johann-beleites-sonarsource@users.noreply.github.com>

* Update rules/S6305/kotlin/rule.adoc

Co-authored-by: Johann Beleites <63855942+johann-beleites-sonarsource@users.noreply.github.com>

* Update rules/S6305/kotlin/rule.adoc

Co-authored-by: Johann Beleites <63855942+johann-beleites-sonarsource@users.noreply.github.com>

Co-authored-by: margarita-nedzelska-sonarsource <margarita-nedzelska-sonarsource@users.noreply.github.com>
Co-authored-by: margarita-nedzelska-sonarsource <70522623+margarita-nedzelska-sonarsource@users.noreply.github.com>
Co-authored-by: Johann Beleites <63855942+johann-beleites-sonarsource@users.noreply.github.com>
2021-07-21 10:07:20 +02:00
Yassin Kammoun
4130dab23a
Create rule S5856[javascript]: Regular expressions should be syntactically valid (#207) 2021-07-20 17:49:33 +02:00
github-actions[bot]
2bc799ceac
Create rule S6331: Regular expressions should not contain empty groups (#208) 2021-07-20 15:52:54 +02:00
Yassin Kammoun
3ca4fce4c6
Create rule S6035[javascript]: Single-character alternations in regular expressions should be replaced with character classes (#204)
Co-authored-by: Tibor Blenessy <tibor.blenessy@sonarsource.com>
2021-07-20 11:22:26 +02:00
Tibor Blenessy
b632aaa6b5
Create rule S5868[javascript]: Unicode Grapheme Clusters should be av… (#212) 2021-07-20 10:29:46 +02:00
github-actions[bot]
55fb3e4d3a
Create rule S6326: Regular expressions should not contain multiple spaces (#197) 2021-07-20 09:35:34 +02:00
github-actions[bot]
10403f11b4
Create rule S6324: Regular expressions should not contain control characters (#195) 2021-07-19 22:20:52 +02:00
github-actions[bot]
b141724b14
Create rule S6325: Regular expression literals should be used when possible (#196) 2021-07-19 18:13:03 +02:00
github-actions[bot]
81f1f076be
Create rule S6306: Coroutine usage should adhere to structured concurrency principles (#167) 2021-07-19 17:44:47 +02:00
eric-therond-sonarsource
b011d5c853
Update S5542 description: ECB mode for RSA (#215)
* Update S5542 description: ECB mode for RSA

* fix after review
2021-07-19 09:33:36 +02:00
DGolovinov
bef940e0ae
Update rule S3247 description with the information about redundant cast (#214) 2021-07-16 14:41:01 +02:00
Dorian Burihabwa
42d04dee44
Modify rule S6210: Rephrase requirement on private element access (#213) 2021-07-14 19:25:24 +03:00
github-actions[bot]
deb97adb76
Create rule S6310: Dispatchers should be injectable (#176) 2021-07-14 16:10:55 +02:00
github-actions[bot]
b3bb991c9e
Create rule S6318: "suspend" modifier should not be redundant (#184) 2021-07-14 16:33:39 +03:00
margarita-nedzelska-sonarsource
44f66b23bb
Fix broken link in rule description for S4502 (#209) 2021-07-14 10:17:26 +02:00
Amélie Renard
07911c53be
Clean-up C++ tags 2021-07-13 16:10:23 +02:00
Dorian Burihabwa
cccd2cd46a Modify rule S6207: Replace unbreakable spaces with regular spaces 2021-07-13 10:32:16 +02:00
Sebastian Hungerecker
ccd2ec0e34
Modify rule S5854: Fix noncompliant example (#192)
The comment showing the output used the wrong accent.
2021-07-09 17:34:46 +02:00
Sebastian Hungerecker
c9be6ad4f8
Modify rule S5994: fix formatting (#191) 2021-07-09 17:19:48 +02:00
Loïc Joly
20c0cfb993
Modify rule S954: Mention the allowed use of #include within extern "C" 2021-07-09 10:31:11 +02:00
Michael Gumowski
cdd4eee00b Modify rule S6206: "no setters" condition is redundant with having only private final fields 2021-07-07 11:04:08 +02:00
Dorian Burihabwa
8748b36ee1 Modify rule S2057: Update link to version 16 of the java documentation 2021-07-06 18:24:31 +02:00
Sebastian Hungerecker
83f050a954
Modify rule S1234: Amend list of supported methods for Java (#170) 2021-07-06 17:25:44 +02:00
Michael Gumowski
28a0f5679d
Update Java 16 rules documentation to link released documentation (#169) 2021-07-06 17:15:17 +02:00
Michael Gumowski
c600cdb1da Update rule S6206 to mention released java specification 2021-07-06 16:09:33 +02:00
Dorian Burihabwa
d5cdeb38f7 Modify rule S2057: Add Records to the list of exceptions
Add Records to the list of cases where S2057 should not raise any issue.
Contributes to SONARJAVA-3755.
2021-07-06 10:01:46 +02:00
Pierre-Loup
49aa2dcd4f
RULEAPI-653: Add a new language identifier for secrets detection rules (#154) 2021-07-01 12:26:02 +00:00
Amélie Renard
582f2720ad
Clean-up "covered languages" of cfamily rules (#159) 2021-07-01 09:28:14 +00:00
github-actions[bot]
45046ce708
Create rule S6293: Using a biometric authentication independent of a cryptographic solution is security-sensitive (#92)
* Create rule S6293

* init rspec s6293

* improve description and add java subtask

* fixes after review

Co-authored-by: eric-therond-sonarsource <eric-therond-sonarsource@users.noreply.github.com>
Co-authored-by: eric-therond-sonarsource <eric.therond@sonarsource.com>
2021-07-01 09:16:41 +00:00
Arseniy Zaostrovnykh
1f46fa68b9
Fix the template for multi-lang rule metadata (#157) 2021-07-01 10:00:14 +02:00
eric-therond-sonarsource
1031cf8130
Modify rule S6270 [terraform] to properly use jsonencode (#158)
* Modify rule S6270 [terraform] to properly use jsonencode

* remove incorrect comments
2021-06-30 13:38:51 +02:00
23849 changed files with 399216 additions and 179758 deletions

4
.cirrus.star Normal file
View File

@ -0,0 +1,4 @@
load("github.com/SonarSource/cirrus-modules@v3", "load_features")
def main(ctx):
return load_features(ctx)

View File

@ -1,38 +1,60 @@
gcp_credentials: ENCRYPTED[!17c59813193e86cc337bce848b358412b90f50bc5fe1b8b39d363cdf14a41ebe76cfba0482e7f81d076994b9f6dbfb4c!]
env:
CIRRUS_CLONE_DEPTH: 1
GITHUB_TOKEN: VAULT[development/github/token/${CIRRUS_REPO_OWNER}-${CIRRUS_REPO_NAME}-ro token]
SONAR_HOST_URL: VAULT[development/kv/data/next data.url]
SONAR_TOKEN: VAULT[development/kv/data/next data.token]
SONAR_SCANNER_VERSION: 5.0.1.3006
SONAR_SCANNER_HOME: ${HOME}/.sonar/sonar-scanner-${SONAR_SCANNER_VERSION}-linux
PATH: ${SONAR_SCANNER_HOME}/bin:$PATH
# Need to clone full depth to track the changed files: for SQ analysis and for validation tasks
CIRRUS_CLONE_DEPTH: 0
# Use bash (instead of sh on linux or cmd.exe on windows)
CIRRUS_SHELL: bash
BASE_BRANCH: ${CIRRUS_BASE_BRANCH}
DEFAULT_BRANCH: ${CIRRUS_DEFAULT_BRANCH}
container_definition: &CONTAINER_DEFINITION
builder_image_project: language-team
builder_image_name: docker-builder-lt-v1
cluster_name: cirrus-ci-lt-cluster
zone: us-central1-a
cluster_name: ${CIRRUS_CLUSTER_NAME}
builder_role: cirrus-builder
builder_image: docker-builder-v*
builder_instance_type: t3.small
builder_subnet_id: ${CIRRUS_AWS_SUBNET}
region: eu-central-1
namespace: default
use_in_memory_disk: true
setup_sonar_scanner: &SETUP_SONAR_SCANNER
setup_sonar_scanner_script:
- apt update -y && apt upgrade -y && apt update -y && apt install -y unzip
- curl --create-dirs -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip
- unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
tooling_tests_task:
gke_container:
eks_container:
<<: *CONTAINER_DEFINITION
dockerfile: ci/Dockerfile
cpu: 1
memory: 1G
memory: 2G
env:
PYTHONPATH: .
install_dependencies_script:
- ci/install_rspec_tools_dependencies.sh
tests_script:
- bash ci/fetch_branches.sh
- cd rspec-tools
- pipenv install -e .
- pipenv run pip install pytest
- pipenv run pytest
- pipenv run pytest --cov=rspec_tools --cov-report=xml
<<: *SETUP_SONAR_SCANNER
analyze_script:
- cd rspec-tools
- sonar-scanner
frontend_tests_task:
gke_container:
eks_container:
<<: *CONTAINER_DEFINITION
dockerfile: ci/frontend-tests-dockerfile
cpu: 1
memory: 2G
memory: 3G
node_modules_cache:
folder: frontend/node_modules
reupload_on_changes: false # since there is a fingerprint script
@ -44,33 +66,42 @@ frontend_tests_task:
- cd frontend
- npm install
tests_script:
- bash ci/fetch_branches.sh
- cd frontend
- npm run build
- npm test
- npm test -- --detectOpenHandles --coverage .
<<: *SETUP_SONAR_SCANNER
analyze_script:
- cd frontend
- sonar-scanner
validate_metadata_task:
gke_container:
validate_ci_tests_task:
skip: "!changesInclude('ci_tests/**', 'ci/**')"
eks_container:
<<: *CONTAINER_DEFINITION
dockerfile: ci/Dockerfile
cpu: 1
memory: 1G
metadata_tests_script:
memory: 2G
ci_tests_script:
- ./ci_tests/asciidoc_validation/run_tests.sh
validate_rules_task:
eks_container:
<<: *CONTAINER_DEFINITION
dockerfile: ci/Dockerfile
cpu: 1
memory: 2G
metadata_validation_script:
- ./ci/validate_metadata.sh
validate_asciidoc_task:
gke_container:
<<: *CONTAINER_DEFINITION
dockerfile: ci/Dockerfile
cpu: 1
memory: 1G
env:
CIRRUS_CLONE_DEPTH: 0
asciidoc_tests_script:
file_extensions_validation_script:
- ./ci/validate_file_extensions.sh
asciidoc_validation_script:
- ./ci/validate_asciidoc.sh
validate_links_task:
timeout_in: 120m
gke_container:
execution_lock: RSPEC_validate_links
eks_container:
<<: *CONTAINER_DEFINITION
dockerfile: ci/Dockerfile
cpu: 1
@ -78,8 +109,29 @@ validate_links_task:
env:
LINK_CACHE_NAME: link-probing-status
LINK_CACHE_PATH: /root/link-probing-history.cache
tests_script:
cache_download_script:
- bash ci/cirrus-cache.sh download ${LINK_CACHE_NAME} ${LINK_CACHE_PATH}
- md5sum /root/link-probing-history.cache/link_probes.history || true
tests_script:
- ./ci/validate_links.sh ${LINK_CACHE_PATH}
- bash ci/cirrus-cache.sh upload ${LINK_CACHE_NAME} ${LINK_CACHE_PATH}
always:
cache_upload_script:
- md5sum /root/link-probing-history.cache/link_probes.history || true
- bash ci/cirrus-cache.sh upload ${LINK_CACHE_NAME} ${LINK_CACHE_PATH}
all_required_checks_task:
depends_on:
- tooling_tests
- frontend_tests
- validate_rules
- validate_ci_tests
eks_container:
<<: *CONTAINER_DEFINITION
dockerfile: ci/Dockerfile
cpu: 1
memory: 1G
clone_script:
- echo 'This is a dummy task used to wait on other tasks. Clone is not necessary.'
print_message_script:
- echo 'All required checks have passed'

View File

@ -0,0 +1,16 @@
{
"build": {
"dockerfile": "../ci/Dockerfile"
},
// https://code.visualstudio.com/docs/devcontainers/create-dev-container#_rebuild
"postCreateCommand": ".devcontainer/finalize-container.sh",
"waitFor": "postCreateCommand",
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"asciidoctor.asciidoctor-vscode"
]
}
}
}

View File

@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
TOP_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)/..
$TOP_DIR/ci/install_rspec_tools_dependencies.sh

1
.github/CODEOWNERS vendored Normal file
View File

@ -0,0 +1 @@
.github/CODEOWNERS @sonarsource/quality-cfamily-squad

18
.github/pull_request_template.md vendored Normal file
View File

@ -0,0 +1,18 @@
<!--
Jira Automation:
* Mention existing issue in the PR title to move it around automatically.
* Mention existing issue in the PR description and a sub-task will be created for you to track this rspec PR separately.
No issue is created by default.
-->
## 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)

28
.github/workflows/PullRequestClosed.yml vendored Normal file
View File

@ -0,0 +1,28 @@
name: Pull Request Closed
on:
pull_request:
types: [closed]
jobs:
PullRequestMerged_job:
name: Pull Request Merged
runs-on: ubuntu-latest
permissions:
id-token: write
pull-requests: read
# For external PR, ticket should be moved manually
if: |
github.event.pull_request.head.repo.full_name == github.repository
steps:
- id: secrets
uses: SonarSource/vault-action-wrapper@v3
with:
secrets: |
development/kv/data/jira user | JIRA_USER;
development/kv/data/jira token | JIRA_TOKEN;
- uses: sonarsource/gh-action-lt-backlog/PullRequestClosed@v2
with:
github-token: ${{secrets.GITHUB_TOKEN}}
jira-user: ${{ fromJSON(steps.secrets.outputs.vault).JIRA_USER }}
jira-token: ${{ fromJSON(steps.secrets.outputs.vault).JIRA_TOKEN }}

View File

@ -0,0 +1,28 @@
name: Pull Request Created
on:
pull_request:
types: ["opened"]
jobs:
PullRequestCreated_job:
name: Pull Request Created
runs-on: ubuntu-latest
permissions:
id-token: write
# For external PR, ticket should be created manually
if: |
github.event.pull_request.head.repo.full_name == github.repository
steps:
- id: secrets
uses: SonarSource/vault-action-wrapper@v3
with:
secrets: |
development/github/token/{REPO_OWNER_NAME_DASH}-jira token | GITHUB_TOKEN;
development/kv/data/jira user | JIRA_USER;
development/kv/data/jira token | JIRA_TOKEN;
- uses: sonarsource/gh-action-lt-backlog/PullRequestCreated@v2
with:
github-token: ${{ fromJSON(steps.secrets.outputs.vault).GITHUB_TOKEN }}
jira-user: ${{ fromJSON(steps.secrets.outputs.vault).JIRA_USER }}
jira-token: ${{ fromJSON(steps.secrets.outputs.vault).JIRA_TOKEN }}

28
.github/workflows/RequestReview.yml vendored Normal file
View File

@ -0,0 +1,28 @@
name: Request review
on:
pull_request:
types: ["review_requested"]
jobs:
RequestReview_job:
name: Request review
runs-on: ubuntu-latest
permissions:
id-token: write
# For external PR, ticket should be moved manually
if: |
github.event.pull_request.head.repo.full_name == github.repository
steps:
- id: secrets
uses: SonarSource/vault-action-wrapper@v3
with:
secrets: |
development/github/token/{REPO_OWNER_NAME_DASH}-jira token | GITHUB_TOKEN;
development/kv/data/jira user | JIRA_USER;
development/kv/data/jira token | JIRA_TOKEN;
- uses: sonarsource/gh-action-lt-backlog/RequestReview@v2
with:
github-token: ${{ fromJSON(steps.secrets.outputs.vault).GITHUB_TOKEN }}
jira-user: ${{ fromJSON(steps.secrets.outputs.vault).JIRA_USER }}
jira-token: ${{ fromJSON(steps.secrets.outputs.vault).JIRA_TOKEN }}

30
.github/workflows/SubmitReview.yml vendored Normal file
View File

@ -0,0 +1,30 @@
name: Submit Review
on:
pull_request_review:
types: [submitted]
jobs:
SubmitReview_job:
name: Submit Review
runs-on: ubuntu-latest
permissions:
id-token: write
pull-requests: read
# For external PR, ticket should be moved manually
if: |
github.event.pull_request.head.repo.full_name == github.repository
&& (github.event.review.state == 'changes_requested'
|| github.event.review.state == 'approved')
steps:
- id: secrets
uses: SonarSource/vault-action-wrapper@v3
with:
secrets: |
development/kv/data/jira user | JIRA_USER;
development/kv/data/jira token | JIRA_TOKEN;
- uses: sonarsource/gh-action-lt-backlog/SubmitReview@v2
with:
github-token: ${{secrets.GITHUB_TOKEN}}
jira-user: ${{ fromJSON(steps.secrets.outputs.vault).JIRA_USER }}
jira-token: ${{ fromJSON(steps.secrets.outputs.vault).JIRA_TOKEN }}

45
.github/workflows/add_language.yml vendored Normal file
View File

@ -0,0 +1,45 @@
name: Add language to a rule
# Workflow runs when manually triggered using the UI or API.
on:
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
rule:
description: 'ID of an existing rule (e.g., S1234).'
required: true
language:
description: 'Language to be added to the rule, (e.g., cfamily)'
required: true
jobs:
add_language_to_rule:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: true
ref: master
path: 'rspec'
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: 'Install Pipenv'
run: |
pip install pipenv
- name: 'Install rspec-tools'
working-directory: 'rspec/rspec-tools'
run: pipenv install
- name: 'Add Language'
working-directory: 'rspec/rspec-tools'
run: pipenv run rspec-tools add-lang-to-rule --user ${{ github.actor }} --language "${{ github.event.inputs.language }}" --rule "${{ github.event.inputs.rule }}"

View File

@ -12,17 +12,20 @@ on:
jobs:
create_new_rule:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
persist-credentials: true
ref: master
path: 'rspec'
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: '3.9'
@ -32,7 +35,7 @@ jobs:
- name: 'Install rspec-tools'
working-directory: 'rspec/rspec-tools'
run: pipenv install -e .
run: pipenv install
- name: 'Create Rule'
working-directory: 'rspec/rspec-tools'

20
.github/workflows/ensure_label.yml vendored Normal file
View File

@ -0,0 +1,20 @@
name: PR should have a language label
on:
pull_request:
types: [opened, labeled, unlabeled, synchronize]
jobs:
label:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: mheap/github-action-required-labels@v5
with:
mode: minimum
count: 1
add_comment: true
use_regex: true
labels: ".*"
message: "Please add a label with the relevant language(s) to be able to merge this PR"

View File

@ -8,9 +8,12 @@ on:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
pull-requests: read # Get the list and metadata of open new-rule PRs
contents: write # Get the contents of open new-rule PRs, the 'master'; write to 'gh-pages' branch
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly.
uses: actions/checkout@v4 # If you're using actions/checkout you must set persist-credentials to false in most cases for the deployment to work correctly.
with:
persist-credentials: false
ref: 'master'
@ -18,10 +21,13 @@ jobs:
- name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.
working-directory: frontend
run: |
sudo apt-get update
sudo apt-get install libkrb5-dev -y
npm install
npm run predeploy
env:
NODE_OPTIONS: "--max-old-space-size=3048"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@releases/v3
with:

141
.github/workflows/update_coverage.yml vendored Normal file
View File

@ -0,0 +1,141 @@
name: Update rule coverage
on:
schedule:
- cron: '17 2 * * *'
workflow_dispatch: # When manually triggered from a non-default branch, the results will not be pushed
jobs:
update_coverage:
runs-on: ubuntu-latest
permissions:
id-token: write # required by SonarSource/vault-action-wrapper
contents: write
actions: write # required by andymckay/cancel-action
env:
TMP_BRANCH: temporary/coverage_update
steps:
- name: 'get secrets'
id: secrets
uses: SonarSource/vault-action-wrapper@v3
with:
secrets: |
development/github/token/SonarSource-rspec-coverage token | coverage_github_token;
development/kv/data/slack token | slack_token;
- uses: actions/checkout@v4
with:
persist-credentials: true
fetch-depth: 0
path: 'rspec'
token: ${{ fromJSON(steps.secrets.outputs.vault).coverage_github_token }}
ref: 'master'
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: 'Install Pipenv'
run: pip install pipenv
- name: 'Install coverage script dependencies'
working-directory: 'rspec/rspec-tools'
run: |
pipenv --python python3.9 install
- name: 'Regenerate coverage information'
env:
GITHUB_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).coverage_github_token }}
id: gen-coverage
working-directory: 'rspec/rspec-tools'
run: |
pipenv run rspec-tools update-coverage --rulesdir ../rules
mv ./covered_rules.json ../frontend/public/covered_rules.json
if git diff --exit-code ../frontend/public/covered_rules.json; then
echo "new_coverage=false" >> "$GITHUB_OUTPUT"
else
echo "new_coverage=true" >> "$GITHUB_OUTPUT"
fi
- name: 'Cancel if coverage did not change'
if: steps.gen-coverage.outputs.new_coverage != 'true'
uses: andymckay/cancel-action@0.2
- name: 'Push the updated coverage file to a new branch'
id: create-temp-branch
if: steps.gen-coverage.outputs.new_coverage == 'true'
working-directory: 'rspec'
run: |
git config --global user.name "SonarTech"
git config --global user.email "sonartech@sonarsource.com"
git checkout -b $TMP_BRANCH
git add frontend/public/covered_rules.json
git commit -m "update coverage information"
git push --force-with-lease origin $TMP_BRANCH
- name: 'Create a PR'
id: create-github-pr
working-directory: 'rspec'
env:
GH_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).coverage_github_token }}
run: |
PR_URL=$(gh pr create --head ${{ env.TMP_BRANCH }} --title "Update coverage information" --body "" --label "rspec system")
gh pr merge $PR_URL
- name: 'Wait until the PR is merged'
id: wait-for-pr-to-merge
env:
GH_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).coverage_github_token }}
working-directory: 'rspec'
run: |
set -ueo pipefail
# Implicitly referring to the PR corresponding to current branch
# Set timeout (20 minutes in seconds)
TIMEOUT=1200 # seconds
START_TIME=$(date +%s)
INTERVAL=20 # seconds
while true; do
# Check if the PR is merged
PR_STATE=$(gh pr view --json state,mergedAt -q '.state')
MERGED_AT=$(gh pr view --json state,mergedAt -q '.mergedAt')
if [[ "${PR_STATE}" == "MERGED" ]]; then
echo "PR merged at: $MERGED_AT"
exit 0
fi
echo "PR state is ${PR_STATE}"
# Check for timeout
CURRENT_TIME=$(date +%s)
ELAPSED_TIME=$((CURRENT_TIME - START_TIME))
if [[ "${ELAPSED_TIME}" -gt "${TIMEOUT}" ]]; then
echo "Timeout waiting for PR to merge."
exit 1
fi
# Wait for $INTERVAL seconds before checking again
sleep "$INTERVAL"
done
- name: 'Close PR and delete branch upon failure to merge'
if: ${{ failure() }}
env:
GH_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).coverage_github_token }}
working-directory: 'rspec'
run: |
PR_URL=$(gh pr view --json url --jq '.url')
gh pr close "$PR_URL" --delete-branch
- name: 'Notify on slack about the failure'
if: ${{ failure() }}
env:
SLACK_API_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).slack_token }}
working-directory: 'rspec/rspec-tools'
run: |
pipenv run rspec-tools notify-failure-on-slack \
--message "ERROR: failed to update rule coverage. See https://github.com/SonarSource/rspec/actions/runs/$GITHUB_RUN_ID" \
--channel team-analysis-rspec

View File

@ -0,0 +1,55 @@
name: Update quick fix status
on:
workflow_dispatch:
inputs:
rule:
description: 'ID of an existing rule (e.g., S1234).'
required: true
type: string
language:
description: 'Language to be updated for the given rule, (e.g., cfamily)'
required: true
type: string
status:
description: 'The new status for quick fix (e.g., covered)'
required: true
type: choice
options:
- covered
- partial
- targeted
- infeasible
- unknown
jobs:
update_quickfix_status:
name: Update quick fix status
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
with:
persist-credentials: true
ref: master
path: 'rspec'
- uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: 'Install Pipenv'
run: |
pip install pipenv
- name: 'Install rspec-tools'
working-directory: 'rspec/rspec-tools'
run: pipenv install
- name: 'Update quickfix status'
working-directory: 'rspec/rspec-tools'
run: pipenv run rspec-tools update-quickfix-status --user ${{ github.actor }} --rule "${{ github.event.inputs.rule }}" --language "${{ github.event.inputs.language }}" --status "${{ github.event.inputs.status }}"

11
.gitignore vendored
View File

@ -1,11 +1,22 @@
# IDE
.vs/
# IntelliJ IDEA
*.iws
*.iml
*.ipr
.idea/
# generated files
/rules/**/*.html
/frontend/public/rules
rspec-tools/link_probes.history
# compiled files
*.out
*.obj
*.pyc
# Eclipse
.project
.settings/

20
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,20 @@
{
"grammarly.selectors": [
{
"language": "markdown",
"scheme": "file"
},
{
"language": "asciidoc",
"scheme": "file"
}
],
"json.schemas": [
{
"fileMatch": [
"/rules/**/metadata.json"
],
"url": "./rspec-tools/rspec_tools/validation/rule-metadata-schema.json"
}
]
}

184
LICENSE Normal file
View File

@ -0,0 +1,184 @@
SONAR Source-Available License v1.0
Last Updated November 13, 2024
1. DEFINITIONS
"Agreement" means this Sonar Source-Available License v1.0
"Competing" means marketing a product or service as a substitute for the
functionality or value of SonarQube. A product or service may compete regardless
of how it is designed or deployed. For example, a product or service may compete
even if it provides its functionality via any kind of interface (including
services, libraries, or plug-ins), even if it is ported to a different platform
or programming language, and even if it is provided free of charge.
"Contribution" means:
a) in the case of the initial Contributor, the initial content Distributed under
this Agreement, and
b) in the case of each subsequent Contributor:
i) changes to the Program, and
ii) additions to the Program;
where such changes and/or additions to the Program originate from and are
Distributed by that particular Contributor. A Contribution "originates" from a
Contributor if it was added to the Program by such Contributor itself or anyone
acting on such Contributor's behalf. Contributions do not include changes or
additions to the Program that are not Modified Works.
"Contributor" means any person or entity that Distributes the Program.
"Derivative Works" shall mean any work, whether in Source Code or other form,
that is based on (or derived from) the Program and for which the editorial
revisions, annotations, elaborations, or other modifications represent, as a
whole, an original work of authorship.
"Distribute" means the acts of a) distributing or b) making available in any
manner that enables the transfer of a copy.
"Licensed Patents" mean patent claims licensable by a Contributor that are
necessarily infringed by the use or sale of its Contribution alone or when
combined with the Program.
"Modified Works" shall mean any work in Source Code or other form that results
from an addition to, deletion from, or modification of the contents of the
Program, including, for purposes of clarity, any new file in Source Code form
that contains any contents of the Program. Modified Works shall not include
works that contain only declarations, interfaces, types, classes, structures, or
files of the Program solely in each case in order to link to, bind by name, or
subclass the Program or Modified Works thereof.
"Non-competitive Purpose" means any purpose except for (a) providing to others
any product or service that includes or offers the same or substantially similar
functionality as SonarQube, (b) Competing with SonarQube, and/or (c) employing,
using, or engaging artificial intelligence technology that is not part of the
Program to ingest, interpret, analyze, train on, or interact with the data
provided by the Program, or to engage with the Program in any manner.
"Notices" means any legal statements or attributions included with the Program,
including, without limitation, statements concerning copyright, patent,
trademark, disclaimers of warranty, or limitations of liability
"Program" means the Contributions Distributed in accordance with this Agreement.
"Recipient" means anyone who receives the Program under this Agreement,
including Contributors.
"SonarQube" means an open-source or commercial edition of software offered by
SonarSource that is branded "SonarQube".
"SonarSource" means SonarSource SA, a Swiss company registered in Switzerland
under UID No. CHE-114.587.664.
"Source Code" means the form of a Program preferred for making modifications,
including but not limited to software source code, documentation source, and
configuration files.
2. GRANT OF RIGHTS
a) Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide, royalty-free copyright license, for any
Non-competitive Purpose, to reproduce, prepare Derivative Works of, publicly
display, publicly perform, Distribute and sublicense the Contribution of such
Contributor, if any, and such Derivative Works.
b) Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed
Patents, for any Non-competitive Purpose, to make, use, sell, offer to sell,
import, and otherwise transfer the Contribution of such Contributor, if any, in
Source Code or other form. This patent license shall apply to the combination of
the Contribution and the Program if, at the time the Contribution is added by
the Contributor, such addition of the Contribution causes such combination to be
covered by the Licensed Patents. The patent license shall not apply to any other
combinations that include the Contribution.
c) Recipient understands that although each Contributor grants the licenses to
its Contributions set forth herein, no assurances are provided by any
Contributor that the Program does not infringe the patent or other intellectual
property rights of any other entity. Each Contributor disclaims any liability to
Recipient for claims brought by any other entity based on infringement of
intellectual property rights or otherwise. As a condition to exercising the
rights and licenses granted hereunder, each Recipient hereby assumes sole
responsibility to secure any other intellectual property rights needed, if any.
For example, if a third-party patent license is required to allow Recipient to
Distribute the Program, it is Recipient's responsibility to acquire that license
before distributing the Program.
d) Each Contributor represents that to its knowledge it has sufficient copyright
rights in its Contribution, if any, to grant the copyright license set forth in
this Agreement.
3. REQUIREMENTS
3.1 If a Contributor Distributes the Program in any form, then the Program must
also be made available as Source Code, in accordance with section 3.2, and the
Contributor must accompany the Program with a statement that the Source Code for
the Program is available under this Agreement, and inform Recipients how to
obtain it in a reasonable manner on or through a medium customarily used for
software exchange; and
3.2 When the Program is Distributed as Source Code:
a) it must be made available under this Agreement, and
b) a copy of this Agreement must be included with each copy of the Program.
3.3 Contributors may not remove or alter any Notices contained within the
Program from any copy of the Program which they Distribute, provided that
Contributors may add their own appropriate Notices.
4. NO WARRANTY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED BY
APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES
OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT
LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
responsible for determining the appropriateness of using and distributing the
Program and assumes all risks associated with its exercise of rights under this
Agreement, including but not limited to the risks and costs of program errors,
compliance with applicable laws, damage to or loss of data, programs or
equipment, and unavailability or interruption of operations.
5. DISCLAIMER OF LIABILITY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED BY
APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGES.
6. GENERAL
If any provision of this Agreement is invalid or unenforceable under applicable
law, it shall not affect the validity or enforceability of the remainder of the
terms of this Agreement, and without further action by the parties hereto, such
provision shall be reformed to the minimum extent necessary to make such
provision valid and enforceable.
If Recipient institutes patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Program itself
(excluding combinations of the Program with other software or hardware)
infringes such Recipients patent(s), then such Recipients rights granted under
Section 2(b) shall terminate as of the date such litigation is filed.
All Recipients rights under this Agreement shall terminate if it fails to
comply with any of the material terms or conditions of this Agreement and does
not cure such failure in a reasonable period of time after becoming aware of
such noncompliance. If all Recipients rights under this Agreement terminate,
Recipient agrees to cease use and distribution of the Program as soon as
reasonably practicable. However, Recipients obligations under this Agreement
and any licenses granted by Recipient relating to the Program shall continue and
survive.
Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives
no rights or licenses to the intellectual property of any Contributor under this
Agreement, whether expressly, by implication, estoppel, or otherwise. All rights
in the Program not expressly granted under this Agreement are reserved. Nothing
in this Agreement is intended to be enforceable by any entity that is not a
Contributor or Recipient. No third-party beneficiary rights are created under
this Agreement.

12
Pipfile
View File

@ -1,12 +0,0 @@
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[packages]
bs4 = "*"
[dev-packages]
[requires]
python_version = "3.9"

44
Pipfile.lock generated
View File

@ -1,44 +0,0 @@
{
"_meta": {
"hash": {
"sha256": "ca135d1c374d151103c79210965fbdd3250adfffa99b016cc8a1f14dc035338d"
},
"pipfile-spec": 6,
"requires": {
"python_version": "3.9"
},
"sources": [
{
"name": "pypi",
"url": "https://pypi.python.org/simple",
"verify_ssl": true
}
]
},
"default": {
"beautifulsoup4": {
"hashes": [
"sha256:4c98143716ef1cb40bf7f39a8e3eec8f8b009509e74904ba3a7b315431577e35",
"sha256:84729e322ad1d5b4d25f805bfa05b902dd96450f43842c4e99067d5e1369eb25",
"sha256:fff47e031e34ec82bf17e00da8f592fe7de69aeea38be00523c04623c04fb666"
],
"version": "==4.9.3"
},
"bs4": {
"hashes": [
"sha256:36ecea1fd7cc5c0c6e4a1ff075df26d50da647b75376626cc186e2212886dd3a"
],
"index": "pypi",
"version": "==0.0.1"
},
"soupsieve": {
"hashes": [
"sha256:4bb21a6ee4707bf43b61230e80740e71bfe56e55d1f1f50924b087bb2975c851",
"sha256:6dc52924dc0bc710a5d16794e6b3480b2c7c08b07729505feab2b2c16661ff6e"
],
"markers": "python_version >= '3.0'",
"version": "==2.1"
}
},
"develop": {}
}

View File

@ -8,6 +8,8 @@ This repository contains the specification of every static-analysis rule availab
It also contains rules which have been dropped and rules which will one day be implemented.
The content of this repository is covered by the link:LICENSE[SONAR Source-Available License v1.0].
== Rules directory structure
* https://github.com/SonarSource/rspec/tree/master/rules[rules] directory: contains every specified rule.
@ -15,11 +17,31 @@ It also contains rules which have been dropped and rules which will one day be i
*** `rules/Sxxxx/*.adoc`: Asciidoc files which can be reused by multiple language-specific descriptions.
*** `rules/Sxxxx/metadata.json`: rule metadata shared between language-specific RSPECs. Each language can override fields in its own `metadata.json` file. +
It is thanks to this file that you can add `tags`, `securityStandards` etc... to your rule.
*** `rules/Sxxxx/common`: contains common content shared by all the supported languages. It is organized in the following subdirectories:
**** `rules/Sxxxx/common/fix`
**** `rules/Sxxxx/common/images`
**** `rules/Sxxxx/common/pitfalls`
**** `rules/Sxxxx/common/resources`
*** `rules/Sxxxx/[LANGUAGE]`: contains the language-specific RSPEC. For every rule, there must be at least one `[LANGUAGE]` subdirectory. +
`[LANGUAGE]` can be any of the following:
include::supported_languages.adoc[]
**** `rules/Sxxxx/[LANGUAGE]/rule.adoc`: asciidoc file used to generate the `Sxxxx` rule description for programming language `[LANGUAGE]`. It can include parts from `*.adoc` files located in the parent directory.
**** `rules/Sxxxx/[LANGUAGE]/metadata.json`: metadatas for the specific language. Each key at the top will completely override the key of the `metadata.json` file of the parent directory.
* https://github.com/SonarSource/rspec/tree/master/shared_content[shared_content] directory: contains content that needs to be shared among multiple rules. Subfolders are currently not standardized.
== Rule description file
Refer to the <<docs/description.adoc#,documentation about rules description>> for the content of the rule.adoc file.
== Metadata file
Refer to the <<docs/metadata.adoc#,documentation about the metadata file>> for the content of the metadata.json file.
== Non-content modifications
Refer to the <<docs/testing.adoc#,documentation about testing>> if you plan to change something else than rules.
== Search rules
@ -28,10 +50,11 @@ All specified rules (implemented or not) are listed in the https://sonarsource.g
For each rule, you can find the languages it covers, the descriptions for each language as well as the related open tickets and pull requests. +
There will be a red warning with a link to the rule pull request if the rule has not been implemented yet (i.e. is not present on the main branch yet).
You can use the "Search in unimplemented" link on the Search Page to repeat your search in the PRs.
You can also use GitHub search among unmerged PRs https://github.com/SonarSource/rspec/pulls[here].
WARNING: Unlike the Search Page, the GitHub search across the PRs for unimplemented rules considers only the PR summary and title. It does not search the content of the proposed rule (i.e. it does not look into `rule.adoc` nor into `metadata.json`).
[[AddModifyRule]]
== Create or modify a rule
Before, the Languages Team used Jira to host both implemented and unimplemented rules. This is why the `rules` directory contains both too.
@ -46,10 +69,9 @@ Thus every newly created rule or modification of rule should follow these steps:
. Ask for a review
. Create an implementation ticket
. Implement the new rule or the change in the existing rule
. Merge the RSPEC PR as soon as the implementation is ready (unless the implementation needs access to the RSPEC before it is ready, see RULEAPI-660).
* Here "ready" means it is tested/validated/tuned/discussed and lacks only the rule metadata to be merged into analyzer's main branch.
. Fetch the updated metadata with `rule-api`
. Fetch the updated metadata with `rule-api` by pointing it to the PR branch with `-branch` parameter
. Merge the implementation PR
. Merge the RSPEC PR
A <<multi-language-rule-creation>> is somewhat more involved.
@ -60,12 +82,15 @@ A <<multi-language-rule-creation>> is somewhat more involved.
. click on the grey _Run wokflow_ button (on the right).
. in the field _"Comma-separated list of targeted languages"_ write the list of languages you want to specify this rule for. +
They can be any of the following:
include::supported_languages.adoc[]
. click on the green _Run workflow_ button.
image::img/new-rule-workflow.png[]
You should see https://github.com/pulls/assigned[a new pull request assigned to you]. It might take up to a few minutes to appear.
You should see https://github.com/pulls/assigned[a new pull request assigned to you] with the appropriate language labels.
It might take up to a few minutes to appear.
It contains a scaffolding of files for the new rule. Feel free to modify it as you please.
The title of the PR for a new rule will say only "Create rule Sxxxx", which is not very informative. +
@ -81,7 +106,7 @@ Add the description of the PR to further increase its discoverability
(GitHub PR search does not see the `rule.adoc`).
To do that, click on the three dots (next to the smile) on the first comment (created by github-actions bot) and select "Edit".
The rule must contain subdirectories corresponding to all the languages this rule will be implemented for (by the time the PR is merged).
The rule must contain subdirectories corresponding to all the languages this rule will be implemented for.
Each language subdirectory contains the `rule.adoc` that is the root document used to render the specification.
The rule specification in `rule.adoc` can include other `*.adoc` files that are in the language subdirectory or in the parent directory by using the `include::content.adoc[]` syntax.
@ -91,25 +116,36 @@ Otherwise, you can use https://asciidoclive.com/[AsciiDocLIVE] and this https://
==== To add language to an existing rule
If the rule exists on the main branch, create a PR named "Create rule Sxxxx[_language_]: _rule title_". For example:
Similar to adding a new rule, if the rule exists on the main branch, trigger the "Add language to a rule" GitHub action.
. go to the https://github.com/SonarSource/rspec/actions/workflows/add_language.yml[Add language to a rule] GitHub action
. click on the grey _Run workflow_ button (on the right).
. in the field _"ID of an existing rule"_ write the ID of the existing rule you want to add language to.
It must be in a form `Sxxxx` where `xxxx` is the number of the rule.
For example: `S100`, `S1234`, or `S6000`.
. in the field _"Language to be added to the rule"_ specify one language you want to add to the rule. +
It can be any of the following:
include::supported_languages.adoc[]
. click on the green _Run workflow_ button.
image::img/add-language-workflow.png[]
You should see https://github.com/pulls/assigned[a new pull request assigned to you] with the appropriate language label.
It might take up to a few minutes to appear.
It contains a scaffolding of files for the new rule. Feel free to modify it as you please.
The title of the PR for a new rule will say only "Create rule Sxxxx", which is not very informative. +
Modify the title to better summarize the nature or the rule, so that it is easier to find when searching through unimplemented rules.
Do preserve the "Create rule Sxxxx" prefix, as it is used by our tooling.
For example:
----
Create rule S100[java]: Method names should comply with a naming convention
Create rule S100: Method names should comply with a naming convention
----
Otherwise, if the rule has not been merged yet (i.e. the rule has not been implemented by any plugin), you can use the already existing PR corresponding to this rule. +
Then,
* Create a subdirectory with the name of the language you want to add. +
It can be any of the following:
include::supported_languages.adoc[]
* Add two files in this subdirectory:
** `rule.adoc`: write down the whole description of the rule. If you want to include already existing parts (that are in the current or the parent directory), use the `include::` syntax.
** `metadata.json`: it automatically inherits from the `metadata.json` of the parent directory so you only need to write the parts that need to be overwritten. +
Please note that in any case this file should at least contain two curly braces (`{ }`)
==== To modify an existing rule
Create a branch for your modifications manually.
Then open a pull request manually.
@ -137,22 +173,32 @@ In the `metadata.json` of the rule you want to deprecate:
* Remove all tags
* Remove all quality profiles
* Change the status to `deprecated`
* Fill in the `replacementRules` field with the rules that deprecate this one, if any
* Fill in the `replacementRules` array with strings in the form `"RSPEC-xxxx"` with the rules that deprecate this one, if any
NOTE: use a GitHub hot-key `t` in the source view to navigate to an existing rule specification.
See link:rules/S1212/metadata.json[S1212] for an example.
==== To delete a rule
If the rule has never been implemented and is still defined in an open pull request, just close the pull request. +
Otherwise, create a pull request to change the status of the rule to "closed".
NOTE: use a GitHub hot-key `t` in the source view to navigate to an existing rule specification.
=== 2. Ask for a review
Every PR that is creating or modifying a rule should be reviewed.
Exceptions can be made for small PRs that only resolve simple spelling mistakes.
If it is a new rule, or if it requires the analyzer to change its implementation, do not merge the pull request yet.
If the change does not require an implementation, merge the pull request after the review.
Following the submission of every PR, an automatic checklist will be generated.
This checklist is intended for the reviewer and serves as a guide to ensure comprehensive evaluation of the PR.
As the reviewer navigates through the review process, each fulfilled item on the checklist should be marked off.
A PR should not be merged before the checklist is fully completed.
This ensures that all necessary checks have been made, and all requirements have been met before merging, fostering a systematic and thorough review process.
=== 3. Create an implementation ticket
Create an implementation ticket as it is usually done for your plugin (i.e. as a Jira ticket or a Github issue). +
@ -171,78 +217,53 @@ Implementation ticket: SonarSource/sonar-dotnet/issues/1234 (for a sonar-dotnet
=== 4. Implement the rule
Implement the rule or the modification as usual.
Only once the implementation is complete, but before it is merged on the analyzer side, merge the RSPEC PR.
The RSPEC PR has to be merged before the implementation PR to enable `rule-api` to fetch the correct metadata in the analyzer.
The RSPEC PR has to be merged as close as possible to the merge of the implementation PR to shorten the time span of the inconsistency in the rule status
("active" in the RSPEC metadata, and not implemented on the analyzer side).
Finally, merge the rule implementation in your analyzer repository.
Implement the rule or the modification as usual, generate the rule metadata,
and merge the rule implementation in your analyzer repository.
==== Generate/Update rule metadata for the analyzer
==== Generate rule metadata for the analyzer
* Download the last version of https://github.com/SonarSource/sonar-rule-api[rule-api].
* call `generate` if you are adding a rule, or `update` if you just want the last specification version.
* Run `generate` and specify the RSPEC-repository branch with the modified version of the rule specification.
Example:
[source,shell]
----
$ java -jar rule-api-1.24.3.jar generate -rule S4328
# or
$ java -jar rule-api-1.24.3.jar update
$ java -jar rule-api-2.1.0.jar generate -branch <RSPEC branch> -rule S4328
----
NOTE: If you generate rules in an empty directory,
you have to run `update` immediately after,
because rule-api relies on the files in the directory to determine the covered set of rules
when generating the deprecation notes for superseded rules.
=== 5. Merge the RSPEC PR
Once the corresponding implementation is done you can merge the PR containing the new rule
(or the new version of the existing rule).
=== Multi-Language Rule Creation
Multi-language rule creation is more involved than the default process because it involves multiple roles that typically do not coincide.
Multi-language rule creation has more steps than the default process because it involves multiple roles that typically do not coincide.
It is infeasible to synchronize the implementation of the rule for all the languages it covers.
The special metadata field `"extra"."coveredLanguages"` enables asynchrous implementation in multiple analyzers.
`"extra"."coveredLanguages"` contains the languages the rule is implemented for.
The workflow below makes sure that all rules on the main branch are implemented for all languages they are specified for or for all languages listed in `"coveredLanguages"`.
. An RSPECator creates a PR and specifies the multi-language rule.
* The RSPECator asks for a review for the PR.
* The RSPECator does not merge the PR, even after the review is done.
* The rule metadata.json contains an empty `"extra": {"coveredLanguages": []}` field.
. The RSPECator opens implementation tickets for all the targeted languages.
. An Ada analyzer developer Alice implements the rule first. Alice prepares the PR with the implementation.
. As soon as the implementation of the rule is ready for Ada analyzer, Alice merges both PRs:
.. Alice adds `"Ada"` to `"coveredLanguages"` in the RSPEC PR (`"extra": {"coveredLanguages": ["Ada"]}`).
.. Alice merges the RSPEC PR.
.. Alice fetches the rule metadata with `rule-api` into Ada analyzer.
.. Alice fetches the rule metadata with `rule-api` into Ada analyzer. She needs to specify the PR branch in the `-branch` argument of `rule-api`.
.. Alice merges the rule implementation in Ada analyzer.
.. Alice merges the RSPEC PR opened by the RSPECator.
. A Cobol analyzer developer Bob implements the rule some time later. Bob prepares the PR with the implementation.
. Bob opens a new RSPEC PR "Modify rule S1234: Add Cobol support" to add `"Cobol"` to `"coveredLangauges"` (`"extra": {"coveredLanguages": ["Ada", "Cobol"]}`).
. As soon as the Cobol implementation is ready, Bob merges both PRs:
.. Bob merges his RSPEC PR.
. As soon as the Cobol implementation is ready:
.. If Bob needs to change the rule specification, he opens an RSPEC PR and uses the PR branch in the `-branch` argument of `rule-api`.
.. Bob fetches the rule metadata with `rule-api` into Cobol analyzer.
.. Bob merges the rule implementation in Cobol analyzer.
== Comment a rule
Comments and links that were created on Jira have been gathered in a `comments-and-links.adoc` file for each concerned rule. +
You can add a comment anywhere in a rule by adding the following lines in the `*.adoc` file:
[source]
----
\ifdef::env-github,rspecator-view[]
John Doe (9 Jun 2021, 15:49): my comment on the rule
\endif::env-github,rspecator-view[]
----
This way, your comment will only be visible in GitHub preview and on the Search Page (and will not be visible for the user).
.. If Bob had opened an RSPEC PR with changes, he merges it once the rule is implemented in the analyzer.
== Untriaged Pull Requests
Untriaged PRs are the ones without any label. You can easily see all of them with the filter https://github.com/SonarSource/rspec/pulls?q=is%3Aopen+is%3Apr+no%3Alabel[`Label > Unlabeled`]. +
All triaged PRs should have at least one label that corresponds to the bubble(s) the PR is related to. This allows bubbles to easily filter out the PRs they are interested in.
Untriaged PRs are the ones without any GitHub label assigned to them.
You can easily see all of them with the filter https://github.com/SonarSource/rspec/pulls?q=is%3Aopen+is%3Apr+no%3Alabel[`no:label`].
All triaged PRs should have at least one label that corresponds to the bubble(s) the PR is related to.
This allows bubbles to easily filter the PRs they are interested in.
== Tooling
https://github.com/SonarSource/rspec/tree/master/rspec-tools[rspec-tools]::

View File

@ -1,426 +0,0 @@
/* Asciidoctor default stylesheet | MIT License | https://asciidoctor.org */
/* Uncomment @import statement to use as custom stylesheet */
/*@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700";*/
article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}
audio,video{display:inline-block}
audio:not([controls]){display:none;height:0}
html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}
a{background:none}
a:focus{outline:thin dotted}
a:active,a:hover{outline:0}
h1{font-size:2em;margin:.67em 0}
abbr[title]{border-bottom:1px dotted}
b,strong{font-weight:bold}
dfn{font-style:italic}
hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}
mark{background:#ff0;color:#000}
code,kbd,pre,samp{font-family:monospace;font-size:1em}
pre{white-space:pre-wrap}
q{quotes:"\201C" "\201D" "\2018" "\2019"}
small{font-size:80%}
sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}
sup{top:-.5em}
sub{bottom:-.25em}
img{border:0}
svg:not(:root){overflow:hidden}
figure{margin:0}
fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}
legend{border:0;padding:0}
button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}
button,input{line-height:normal}
button,select{text-transform:none}
button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}
button[disabled],html input[disabled]{cursor:default}
input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}
button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}
textarea{overflow:auto;vertical-align:top}
table{border-collapse:collapse;border-spacing:0}
*,*::before,*::after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}
html,body{font-size:100%}
body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;font-weight:400;font-style:normal;line-height:1;position:relative;cursor:auto;tab-size:4;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}
a:hover{cursor:pointer}
img,object,embed{max-width:100%;height:auto}
object,embed{height:100%}
img{-ms-interpolation-mode:bicubic}
.left{float:left!important}
.right{float:right!important}
.text-left{text-align:left!important}
.text-right{text-align:right!important}
.text-center{text-align:center!important}
.text-justify{text-align:justify!important}
.hide{display:none}
img,object,svg{display:inline-block;vertical-align:middle}
textarea{height:auto;min-height:50px}
select{width:100%}
.center{margin-left:auto;margin-right:auto}
.stretch{width:100%}
.subheader,.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{line-height:1.45;color:#7a2518;font-weight:400;margin-top:0;margin-bottom:.25em}
div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0;direction:ltr}
a{color:#2156a5;text-decoration:underline;line-height:inherit}
a:hover,a:focus{color:#1d4b8f}
a img{border:0}
p{font-family:inherit;font-weight:400;font-size:1em;line-height:1.6;margin-bottom:1.25em;text-rendering:optimizeLegibility}
p aside{font-size:.875em;line-height:1.35;font-style:italic}
h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{font-family:"Open Sans","DejaVu Sans",sans-serif;font-weight:300;font-style:normal;color:#ba3925;text-rendering:optimizeLegibility;margin-top:1em;margin-bottom:.5em;line-height:1.0125em}
h1 small,h2 small,h3 small,#toctitle small,.sidebarblock>.content>.title small,h4 small,h5 small,h6 small{font-size:60%;color:#e99b8f;line-height:0}
h1{font-size:2.125em}
h2{font-size:1.6875em}
h3,#toctitle,.sidebarblock>.content>.title{font-size:1.375em}
h4,h5{font-size:1.125em}
h6{font-size:1em}
hr{border:solid #dddddf;border-width:1px 0 0;clear:both;margin:1.25em 0 1.1875em;height:0}
em,i{font-style:italic;line-height:inherit}
strong,b{font-weight:bold;line-height:inherit}
small{font-size:60%;line-height:inherit}
code{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;color:rgba(0,0,0,.9)}
ul,ol,dl{font-size:1em;line-height:1.6;margin-bottom:1.25em;list-style-position:outside;font-family:inherit}
ul,ol{margin-left:1.5em}
ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0;font-size:1em}
ul.square li ul,ul.circle li ul,ul.disc li ul{list-style:inherit}
ul.square{list-style-type:square}
ul.circle{list-style-type:circle}
ul.disc{list-style-type:disc}
ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0}
dl dt{margin-bottom:.3125em;font-weight:bold}
dl dd{margin-bottom:1.25em}
abbr,acronym{text-transform:uppercase;font-size:90%;color:rgba(0,0,0,.8);border-bottom:1px dotted #ddd;cursor:help}
abbr{text-transform:none}
blockquote{margin:0 0 1.25em;padding:.5625em 1.25em 0 1.1875em;border-left:1px solid #ddd}
blockquote cite{display:block;font-size:.9375em;color:rgba(0,0,0,.6)}
blockquote cite::before{content:"\2014 \0020"}
blockquote cite a,blockquote cite a:visited{color:rgba(0,0,0,.6)}
blockquote,blockquote p{line-height:1.6;color:rgba(0,0,0,.85)}
@media screen and (min-width:768px){h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2}
h1{font-size:2.75em}
h2{font-size:2.3125em}
h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em}
h4{font-size:1.4375em}}
table{background:#fff;margin-bottom:1.25em;border:solid 1px #dedede}
table thead,table tfoot{background:#f7f8f7}
table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;color:rgba(0,0,0,.8);text-align:left}
table tr th,table tr td{padding:.5625em .625em;font-size:inherit;color:rgba(0,0,0,.8)}
table tr.even,table tr.alt{background:#f8f8f7}
table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{display:table-cell;line-height:1.6}
h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-spacing:-.05em}
h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock>.content>.title strong,h4 strong,h5 strong,h6 strong{font-weight:400}
.clearfix::before,.clearfix::after,.float-group::before,.float-group::after{content:" ";display:table}
.clearfix::after,.float-group::after{clear:both}
:not(pre):not([class^=L])>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background:#f7f7f8;-webkit-border-radius:4px;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed;word-wrap:break-word}
:not(pre)>code.nobreak{word-wrap:normal}
:not(pre)>code.nowrap{white-space:nowrap}
pre{color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;line-height:1.45;text-rendering:optimizeSpeed}
pre code,pre pre{color:inherit;font-size:inherit;line-height:inherit}
pre>code{display:block}
pre.nowrap,pre.nowrap pre{white-space:pre;word-wrap:normal}
em em{font-style:normal}
strong strong{font-weight:400}
.keyseq{color:rgba(51,51,51,.8)}
kbd{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;display:inline-block;color:rgba(0,0,0,.8);font-size:.65em;line-height:1.45;background:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em white inset;box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em #fff inset;margin:0 .15em;padding:.2em .5em;vertical-align:middle;position:relative;top:-.1em;white-space:nowrap}
.keyseq kbd:first-child{margin-left:0}
.keyseq kbd:last-child{margin-right:0}
.menuseq,.menuref{color:#000}
.menuseq b:not(.caret),.menuref{font-weight:inherit}
.menuseq{word-spacing:-.02em}
.menuseq b.caret{font-size:1.25em;line-height:.8}
.menuseq i.caret{font-weight:bold;text-align:center;width:.45em}
b.button::before,b.button::after{position:relative;top:-1px;font-weight:400}
b.button::before{content:"[";padding:0 3px 0 2px}
b.button::after{content:"]";padding:0 2px 0 3px}
p a>code:hover{color:rgba(0,0,0,.9)}
#header,#content,#footnotes,#footer{width:100%;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;max-width:62.5em;*zoom:1;position:relative;padding-left:.9375em;padding-right:.9375em}
#header::before,#header::after,#content::before,#content::after,#footnotes::before,#footnotes::after,#footer::before,#footer::after{content:" ";display:table}
#header::after,#content::after,#footnotes::after,#footer::after{clear:both}
#content{margin-top:1.25em}
#content::before{content:none}
#header>h1:first-child{color:rgba(0,0,0,.85);margin-top:2.25rem;margin-bottom:0}
#header>h1:first-child+#toc{margin-top:8px;border-top:1px solid #dddddf}
#header>h1:only-child,body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #dddddf;padding-bottom:8px}
#header .details{border-bottom:1px solid #dddddf;line-height:1.45;padding-top:.25em;padding-bottom:.25em;padding-left:.25em;color:rgba(0,0,0,.6);display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-flow:row wrap;-webkit-flex-flow:row wrap;flex-flow:row wrap}
#header .details span:first-child{margin-left:-.125em}
#header .details span.email a{color:rgba(0,0,0,.85)}
#header .details br{display:none}
#header .details br+span::before{content:"\00a0\2013\00a0"}
#header .details br+span.author::before{content:"\00a0\22c5\00a0";color:rgba(0,0,0,.85)}
#header .details br+span#revremark::before{content:"\00a0|\00a0"}
#header #revnumber{text-transform:capitalize}
#header #revnumber::after{content:"\00a0"}
#content>h1:first-child:not([class]){color:rgba(0,0,0,.85);border-bottom:1px solid #dddddf;padding-bottom:8px;margin-top:0;padding-top:1rem;margin-bottom:1.25rem}
#toc{border-bottom:1px solid #e7e7e9;padding-bottom:.5em}
#toc>ul{margin-left:.125em}
#toc ul.sectlevel0>li>a{font-style:italic}
#toc ul.sectlevel0 ul.sectlevel1{margin:.5em 0}
#toc ul{font-family:"Open Sans","DejaVu Sans",sans-serif;list-style-type:none}
#toc li{line-height:1.3334;margin-top:.3334em}
#toc a{text-decoration:none}
#toc a:active{text-decoration:underline}
#toctitle{color:#7a2518;font-size:1.2em}
@media screen and (min-width:768px){#toctitle{font-size:1.375em}
body.toc2{padding-left:15em;padding-right:0}
#toc.toc2{margin-top:0!important;background:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #e7e7e9;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto}
#toc.toc2 #toctitle{margin-top:0;margin-bottom:.8rem;font-size:1.2em}
#toc.toc2>ul{font-size:.9em;margin-bottom:0}
#toc.toc2 ul ul{margin-left:0;padding-left:1em}
#toc.toc2 ul.sectlevel0 ul.sectlevel1{padding-left:0;margin-top:.5em;margin-bottom:.5em}
body.toc2.toc-right{padding-left:0;padding-right:15em}
body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #e7e7e9;left:auto;right:0}}
@media screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0}
#toc.toc2{width:20em}
#toc.toc2 #toctitle{font-size:1.375em}
#toc.toc2>ul{font-size:.95em}
#toc.toc2 ul ul{padding-left:1.25em}
body.toc2.toc-right{padding-left:0;padding-right:20em}}
#content #toc{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px}
#content #toc>:first-child{margin-top:0}
#content #toc>:last-child{margin-bottom:0}
#footer{max-width:100%;background:rgba(0,0,0,.8);padding:1.25em}
#footer-text{color:rgba(255,255,255,.8);line-height:1.44}
#content{margin-bottom:.625em}
.sect1{padding-bottom:.625em}
@media screen and (min-width:768px){#content{margin-bottom:1.25em}
.sect1{padding-bottom:1.25em}}
.sect1:last-child{padding-bottom:0}
.sect1+.sect1{border-top:1px solid #e7e7e9}
#content h1>a.anchor,h2>a.anchor,h3>a.anchor,#toctitle>a.anchor,.sidebarblock>.content>.title>a.anchor,h4>a.anchor,h5>a.anchor,h6>a.anchor{position:absolute;z-index:1001;width:1.5ex;margin-left:-1.5ex;display:block;text-decoration:none!important;visibility:hidden;text-align:center;font-weight:400}
#content h1>a.anchor::before,h2>a.anchor::before,h3>a.anchor::before,#toctitle>a.anchor::before,.sidebarblock>.content>.title>a.anchor::before,h4>a.anchor::before,h5>a.anchor::before,h6>a.anchor::before{content:"\00A7";font-size:.85em;display:block;padding-top:.1em}
#content h1:hover>a.anchor,#content h1>a.anchor:hover,h2:hover>a.anchor,h2>a.anchor:hover,h3:hover>a.anchor,#toctitle:hover>a.anchor,.sidebarblock>.content>.title:hover>a.anchor,h3>a.anchor:hover,#toctitle>a.anchor:hover,.sidebarblock>.content>.title>a.anchor:hover,h4:hover>a.anchor,h4>a.anchor:hover,h5:hover>a.anchor,h5>a.anchor:hover,h6:hover>a.anchor,h6>a.anchor:hover{visibility:visible}
#content h1>a.link,h2>a.link,h3>a.link,#toctitle>a.link,.sidebarblock>.content>.title>a.link,h4>a.link,h5>a.link,h6>a.link{color:#ba3925;text-decoration:none}
#content h1>a.link:hover,h2>a.link:hover,h3>a.link:hover,#toctitle>a.link:hover,.sidebarblock>.content>.title>a.link:hover,h4>a.link:hover,h5>a.link:hover,h6>a.link:hover{color:#a53221}
details,.audioblock,.imageblock,.literalblock,.listingblock,.stemblock,.videoblock{margin-bottom:1.25em}
details>summary:first-of-type{cursor:pointer;display:list-item;outline:none;margin-bottom:.75em}
.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{text-rendering:optimizeLegibility;text-align:left;font-family:"Noto Serif","DejaVu Serif",serif;font-size:1rem;font-style:italic}
table.tableblock.fit-content>caption.title{white-space:nowrap;width:0}
.paragraph.lead>p,#preamble>.sectionbody>[class="paragraph"]:first-of-type p{font-size:1.21875em;line-height:1.6;color:rgba(0,0,0,.85)}
table.tableblock #preamble>.sectionbody>[class="paragraph"]:first-of-type p{font-size:inherit}
.admonitionblock>table{border-collapse:separate;border:0;background:none;width:100%}
.admonitionblock>table td.icon{text-align:center;width:80px}
.admonitionblock>table td.icon img{max-width:none}
.admonitionblock>table td.icon .title{font-weight:bold;font-family:"Open Sans","DejaVu Sans",sans-serif;text-transform:uppercase}
.admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #dddddf;color:rgba(0,0,0,.6)}
.admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0}
.exampleblock>.content{border-style:solid;border-width:1px;border-color:#e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;-webkit-border-radius:4px;border-radius:4px}
.exampleblock>.content>:first-child{margin-top:0}
.exampleblock>.content>:last-child{margin-bottom:0}
.sidebarblock{border-style:solid;border-width:1px;border-color:#dbdbd6;margin-bottom:1.25em;padding:1.25em;background:#f3f3f2;-webkit-border-radius:4px;border-radius:4px}
.sidebarblock>:first-child{margin-top:0}
.sidebarblock>:last-child{margin-bottom:0}
.sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center}
.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0}
.literalblock pre,.listingblock>.content>pre{-webkit-border-radius:4px;border-radius:4px;word-wrap:break-word;overflow-x:auto;padding:1em;font-size:.8125em}
@media screen and (min-width:768px){.literalblock pre,.listingblock>.content>pre{font-size:.90625em}}
@media screen and (min-width:1280px){.literalblock pre,.listingblock>.content>pre{font-size:1em}}
.literalblock pre,.listingblock>.content>pre:not(.highlight),.listingblock>.content>pre[class="highlight"],.listingblock>.content>pre[class^="highlight "]{background:#f7f7f8}
.literalblock.output pre{color:#f7f7f8;background:rgba(0,0,0,.9)}
.listingblock>.content{position:relative}
.listingblock code[data-lang]::before{display:none;content:attr(data-lang);position:absolute;font-size:.75em;top:.425rem;right:.5rem;line-height:1;text-transform:uppercase;color:inherit;opacity:.5}
.listingblock:hover code[data-lang]::before{display:block}
.listingblock.terminal pre .command::before{content:attr(data-prompt);padding-right:.5em;color:inherit;opacity:.5}
.listingblock.terminal pre .command:not([data-prompt])::before{content:"$"}
.listingblock pre.highlightjs{padding:0}
.listingblock pre.highlightjs>code{padding:1em;-webkit-border-radius:4px;border-radius:4px}
.listingblock pre.prettyprint{border-width:0}
.prettyprint{background:#f7f7f8}
pre.prettyprint .linenums{line-height:1.45;margin-left:2em}
pre.prettyprint li{background:none;list-style-type:inherit;padding-left:0}
pre.prettyprint li code[data-lang]::before{opacity:1}
pre.prettyprint li:not(:first-child) code[data-lang]::before{display:none}
table.linenotable{border-collapse:separate;border:0;margin-bottom:0;background:none}
table.linenotable td[class]{color:inherit;vertical-align:top;padding:0;line-height:inherit;white-space:normal}
table.linenotable td.code{padding-left:.75em}
table.linenotable td.linenos{border-right:1px solid currentColor;opacity:.35;padding-right:.5em}
pre.pygments .lineno{border-right:1px solid currentColor;opacity:.35;display:inline-block;margin-right:.75em}
pre.pygments .lineno::before{content:"";margin-right:-.125em}
.quoteblock{margin:0 1em 1.25em 1.5em;display:table}
.quoteblock:not(.excerpt)>.title{margin-left:-1.5em;margin-bottom:.75em}
.quoteblock blockquote,.quoteblock p{color:rgba(0,0,0,.85);font-size:1.15rem;line-height:1.75;word-spacing:.1em;letter-spacing:0;font-style:italic;text-align:justify}
.quoteblock blockquote{margin:0;padding:0;border:0}
.quoteblock blockquote::before{content:"\201c";float:left;font-size:2.75em;font-weight:bold;line-height:.6em;margin-left:-.6em;color:#7a2518;text-shadow:0 1px 2px rgba(0,0,0,.1)}
.quoteblock blockquote>.paragraph:last-child p{margin-bottom:0}
.quoteblock .attribution{margin-top:.75em;margin-right:.5ex;text-align:right}
.verseblock{margin:0 1em 1.25em}
.verseblock pre{font-family:"Open Sans","DejaVu Sans",sans;font-size:1.15rem;color:rgba(0,0,0,.85);font-weight:300;text-rendering:optimizeLegibility}
.verseblock pre strong{font-weight:400}
.verseblock .attribution{margin-top:1.25rem;margin-left:.5ex}
.quoteblock .attribution,.verseblock .attribution{font-size:.9375em;line-height:1.45;font-style:italic}
.quoteblock .attribution br,.verseblock .attribution br{display:none}
.quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.025em;color:rgba(0,0,0,.6)}
.quoteblock.abstract blockquote::before,.quoteblock.excerpt blockquote::before,.quoteblock .quoteblock blockquote::before{display:none}
.quoteblock.abstract blockquote,.quoteblock.abstract p,.quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{line-height:1.6;word-spacing:0}
.quoteblock.abstract{margin:0 1em 1.25em;display:block}
.quoteblock.abstract>.title{margin:0 0 .375em;font-size:1.15em;text-align:center}
.quoteblock.excerpt>blockquote,.quoteblock .quoteblock{padding:0 0 .25em 1em;border-left:.25em solid #dddddf}
.quoteblock.excerpt,.quoteblock .quoteblock{margin-left:0}
.quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{color:inherit;font-size:1.0625rem}
.quoteblock.excerpt .attribution,.quoteblock .quoteblock .attribution{color:inherit;text-align:left;margin-right:0}
table.tableblock{max-width:100%;border-collapse:separate}
p.tableblock:last-child{margin-bottom:0}
td.tableblock>.content>:last-child{margin-bottom:-1.25em}
td.tableblock>.content>:last-child.sidebarblock{margin-bottom:0}
table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede}
table.grid-all>thead>tr>.tableblock,table.grid-all>tbody>tr>.tableblock{border-width:0 1px 1px 0}
table.grid-all>tfoot>tr>.tableblock{border-width:1px 1px 0 0}
table.grid-cols>*>tr>.tableblock{border-width:0 1px 0 0}
table.grid-rows>thead>tr>.tableblock,table.grid-rows>tbody>tr>.tableblock{border-width:0 0 1px}
table.grid-rows>tfoot>tr>.tableblock{border-width:1px 0 0}
table.grid-all>*>tr>.tableblock:last-child,table.grid-cols>*>tr>.tableblock:last-child{border-right-width:0}
table.grid-all>tbody>tr:last-child>.tableblock,table.grid-all>thead:last-child>tr>.tableblock,table.grid-rows>tbody>tr:last-child>.tableblock,table.grid-rows>thead:last-child>tr>.tableblock{border-bottom-width:0}
table.frame-all{border-width:1px}
table.frame-sides{border-width:0 1px}
table.frame-topbot,table.frame-ends{border-width:1px 0}
table.stripes-all tr,table.stripes-odd tr:nth-of-type(odd),table.stripes-even tr:nth-of-type(even),table.stripes-hover tr:hover{background:#f8f8f7}
th.halign-left,td.halign-left{text-align:left}
th.halign-right,td.halign-right{text-align:right}
th.halign-center,td.halign-center{text-align:center}
th.valign-top,td.valign-top{vertical-align:top}
th.valign-bottom,td.valign-bottom{vertical-align:bottom}
th.valign-middle,td.valign-middle{vertical-align:middle}
table thead th,table tfoot th{font-weight:bold}
tbody tr th{display:table-cell;line-height:1.6;background:#f7f8f7}
tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{color:rgba(0,0,0,.8);font-weight:bold}
p.tableblock>code:only-child{background:none;padding:0}
p.tableblock{font-size:1em}
ol{margin-left:1.75em}
ul li ol{margin-left:1.5em}
dl dd{margin-left:1.125em}
dl dd:last-child,dl dd:last-child>:last-child{margin-bottom:0}
ol>li p,ul>li p,ul dd,ol dd,.olist .olist,.ulist .ulist,.ulist .olist,.olist .ulist{margin-bottom:.625em}
ul.checklist,ul.none,ol.none,ul.no-bullet,ol.no-bullet,ol.unnumbered,ul.unstyled,ol.unstyled{list-style-type:none}
ul.no-bullet,ol.no-bullet,ol.unnumbered{margin-left:.625em}
ul.unstyled,ol.unstyled{margin-left:0}
ul.checklist{margin-left:.625em}
ul.checklist li>p:first-child>.fa-square-o:first-child,ul.checklist li>p:first-child>.fa-check-square-o:first-child{width:1.25em;font-size:.8em;position:relative;bottom:.125em}
ul.checklist li>p:first-child>input[type="checkbox"]:first-child{margin-right:.25em}
ul.inline{display:-ms-flexbox;display:-webkit-box;display:flex;-ms-flex-flow:row wrap;-webkit-flex-flow:row wrap;flex-flow:row wrap;list-style:none;margin:0 0 .625em -1.25em}
ul.inline>li{margin-left:1.25em}
.unstyled dl dt{font-weight:400;font-style:normal}
ol.arabic{list-style-type:decimal}
ol.decimal{list-style-type:decimal-leading-zero}
ol.loweralpha{list-style-type:lower-alpha}
ol.upperalpha{list-style-type:upper-alpha}
ol.lowerroman{list-style-type:lower-roman}
ol.upperroman{list-style-type:upper-roman}
ol.lowergreek{list-style-type:lower-greek}
.hdlist>table,.colist>table{border:0;background:none}
.hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none}
td.hdlist1,td.hdlist2{vertical-align:top;padding:0 .625em}
td.hdlist1{font-weight:bold;padding-bottom:1.25em}
.literalblock+.colist,.listingblock+.colist{margin-top:-.5em}
.colist td:not([class]):first-child{padding:.4em .75em 0;line-height:1;vertical-align:top}
.colist td:not([class]):first-child img{max-width:none}
.colist td:not([class]):last-child{padding:.25em 0}
.thumb,.th{line-height:0;display:inline-block;border:solid 4px #fff;-webkit-box-shadow:0 0 0 1px #ddd;box-shadow:0 0 0 1px #ddd}
.imageblock.left{margin:.25em .625em 1.25em 0}
.imageblock.right{margin:.25em 0 1.25em .625em}
.imageblock>.title{margin-bottom:0}
.imageblock.thumb,.imageblock.th{border-width:6px}
.imageblock.thumb>.title,.imageblock.th>.title{padding:0 .125em}
.image.left,.image.right{margin-top:.25em;margin-bottom:.25em;display:inline-block;line-height:0}
.image.left{margin-right:.625em}
.image.right{margin-left:.625em}
a.image{text-decoration:none;display:inline-block}
a.image object{pointer-events:none}
sup.footnote,sup.footnoteref{font-size:.875em;position:static;vertical-align:super}
sup.footnote a,sup.footnoteref a{text-decoration:none}
sup.footnote a:active,sup.footnoteref a:active{text-decoration:underline}
#footnotes{padding-top:.75em;padding-bottom:.75em;margin-bottom:.625em}
#footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em;border-width:1px 0 0}
#footnotes .footnote{padding:0 .375em 0 .225em;line-height:1.3334;font-size:.875em;margin-left:1.2em;margin-bottom:.2em}
#footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none;margin-left:-1.05em}
#footnotes .footnote:last-of-type{margin-bottom:0}
#content #footnotes{margin-top:-.625em;margin-bottom:0;padding:.75em 0}
.gist .file-data>table{border:0;background:#fff;width:100%;margin-bottom:0}
.gist .file-data>table td.line-data{width:99%}
div.unbreakable{page-break-inside:avoid}
.big{font-size:larger}
.small{font-size:smaller}
.underline{text-decoration:underline}
.overline{text-decoration:overline}
.line-through{text-decoration:line-through}
.aqua{color:#00bfbf}
.aqua-background{background:#00fafa}
.black{color:#000}
.black-background{background:#000}
.blue{color:#0000bf}
.blue-background{background:#0000fa}
.fuchsia{color:#bf00bf}
.fuchsia-background{background:#fa00fa}
.gray{color:#606060}
.gray-background{background:#7d7d7d}
.green{color:#006000}
.green-background{background:#007d00}
.lime{color:#00bf00}
.lime-background{background:#00fa00}
.maroon{color:#600000}
.maroon-background{background:#7d0000}
.navy{color:#000060}
.navy-background{background:#00007d}
.olive{color:#606000}
.olive-background{background:#7d7d00}
.purple{color:#600060}
.purple-background{background:#7d007d}
.red{color:#bf0000}
.red-background{background:#fa0000}
.silver{color:#909090}
.silver-background{background:#bcbcbc}
.teal{color:#006060}
.teal-background{background:#007d7d}
.white{color:#bfbfbf}
.white-background{background:#fafafa}
.yellow{color:#bfbf00}
.yellow-background{background:#fafa00}
span.icon>.fa{cursor:default}
a span.icon>.fa{cursor:inherit}
.admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,.5);cursor:default}
.admonitionblock td.icon .icon-note::before{content:"\f05a";color:#19407c}
.admonitionblock td.icon .icon-tip::before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111}
.admonitionblock td.icon .icon-warning::before{content:"\f071";color:#bf6900}
.admonitionblock td.icon .icon-caution::before{content:"\f06d";color:#bf3400}
.admonitionblock td.icon .icon-important::before{content:"\f06a";color:#bf0000}
.conum[data-value]{display:inline-block;color:#fff!important;background:rgba(0,0,0,.8);-webkit-border-radius:100px;border-radius:100px;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold}
.conum[data-value] *{color:#fff!important}
.conum[data-value]+b{display:none}
.conum[data-value]::after{content:attr(data-value)}
pre .conum[data-value]{position:relative;top:-.125em}
b.conum *{color:inherit!important}
.conum:not([data-value]):empty{display:none}
dt,th.tableblock,td.content,div.footnote{text-rendering:optimizeLegibility}
h1,h2,p,td.content,span.alt{letter-spacing:-.01em}
p strong,td.content strong,div.footnote strong{letter-spacing:-.005em}
p,blockquote,dt,td.content,span.alt{font-size:1.0625rem}
p{margin-bottom:1.25rem}
.sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em}
.exampleblock>.content{background:#fffef7;border-color:#e0e0dc;-webkit-box-shadow:0 1px 4px #e0e0dc;box-shadow:0 1px 4px #e0e0dc}
.print-only{display:none!important}
@page{margin:1.25cm .75cm}
@media print{*{-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:none!important}
html{font-size:80%}
a{color:inherit!important;text-decoration:underline!important}
a.bare,a[href^="#"],a[href^="mailto:"]{text-decoration:none!important}
a[href^="http:"]:not(.bare)::after,a[href^="https:"]:not(.bare)::after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em}
abbr[title]::after{content:" (" attr(title) ")"}
pre,blockquote,tr,img,object,svg{page-break-inside:avoid}
thead{display:table-header-group}
svg{max-width:100%}
p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3}
h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid}
#toc,.sidebarblock,.exampleblock>.content{background:none!important}
#toc{border-bottom:1px solid #dddddf!important;padding-bottom:0!important}
body.book #header{text-align:center}
body.book #header>h1:first-child{border:0!important;margin:2.5em 0 1em}
body.book #header .details{border:0!important;display:block;padding:0!important}
body.book #header .details span:first-child{margin-left:0!important}
body.book #header .details br{display:block}
body.book #header .details br+span::before{content:none!important}
body.book #toc{border:0!important;text-align:left!important;padding:0!important;margin:0!important}
body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-break-before:always}
.listingblock code[data-lang]::before{display:block}
#footer{padding:0 .9375em}
.hide-on-print{display:none!important}
.print-only{display:block!important}
.hide-for-print{display:none!important}
.show-for-print{display:inherit!important}}
@media print,amzn-kf8{#header>h1:first-child{margin-top:1.25rem}
.sect1{padding:0!important}
.sect1+.sect1{border:0}
#footer{background:none}
#footer-text{color:rgba(0,0,0,.6);font-size:.9em}}
@media amzn-kf8{#header,#content,#footnotes,#footer{padding:0}}

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,17 @@
FROM python:3.9-slim-buster
FROM public.ecr.aws/docker/library/python:3.9-slim-buster
# Also install NodeJS 16 to run Sonar analysis
RUN apt-get update && \
apt-get install -y --no-install-recommends jq php-json-schema asciidoctor pipenv git curl
apt-get install -y --no-install-recommends jq php-json-schema asciidoctor pipenv git curl \
ca-certificates gnupg && \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | \
gpg --dearmor -o /etc/apt/nodesource-keyring.gpg && \
echo "deb [signed-by=/etc/apt/nodesource-keyring.gpg] https://deb.nodesource.com/node_20.x nodistro main" \
> /etc/apt/sources.list.d/nodesource.list && \
apt-get update && \
apt-get -y install nodejs && \
rm -rf /var/lib/apt/lists/*
CMD ["bash"]

View File

@ -0,0 +1,165 @@
#!/usr/bin/env ruby
# Based on asciidoctor main ruby script.
# This is only meant to introspect and log which asciidoc files were used.
require 'asciidoctor'
require 'asciidoctor/cli'
MAIN_FILE_REGEX = /^.*\/rules\/(?<id>S\d+)\/(?:(?<lang>\w+)\/)?rule.adoc$/
class MainFileLogger < Asciidoctor::Extensions::Preprocessor
include Asciidoctor::Logging
def process document, reader
# Enable sourcemap to track source location.
# This is useful to report more accurate errors in other loggers.
document.sourcemap = true
main_file = document.normalize_system_path(reader.file, document.reader.dir)
# This assumes unix-style path separator.
if nil == main_file.match(MAIN_FILE_REGEX)
abort("Main file does not follow expected pattern: #{main_file}")
end
logger.info("ASCIIDOC LOGGER MAIN FILE:#{main_file}")
reader
end
end
class IncludeLogger < Asciidoctor::Extensions::IncludeProcessor
include Asciidoctor::Logging
def initialize document
@config = {} # Defined in parent class; will be updated by the extension registry mechanism.
@document = document
# @document.reader.file is not defined yet at this stage.
# Therefore we cannot compute the main file path and cache it.
# This cannot be done once in handles? because the object is then frozen.
# For these reasons, we end up recomputing the rule directory path each time.
end
def get_main_file reader
# See how include_stack is used:
# https://github.com/asciidoctor/asciidoctor/blob/f3800cc9c92faf8370041b2b27a61124318ed289/lib/asciidoctor/reader.rb#L669
if reader.include_stack.empty?
reader.file
else
main_frame = reader.include_stack.fetch(0)
main_frame.fetch(1)
end
end
def handles? target
include_path = @document.normalize_system_path(target, @document.reader.dir)
main_file = get_main_file(@document.reader)
main_file = @document.normalize_system_path(main_file, @document.reader.dir)
rule_dir = File.dirname(File.dirname(main_file))
rule_id = File.basename(rule_dir)
if rule_id == 'rules'
# This is a language-agnostic rule description.
rule_dir = File.dirname(main_file)
rule_id = File.basename(rule_dir)
end
git_dir = File.dirname(File.dirname(rule_dir))
shared_dir = File.join(git_dir, 'shared_content')
rule_dir = rule_dir + '/' # Don't allow S100 to include things from S1000.
if !include_path.start_with?(rule_dir) && !include_path.start_with?(shared_dir)
logger.info("ASCIIDOC LOGGER CROSSREFERENCE:#{rule_id} cross-references #{include_path}")
end
logger.info("ASCIIDOC LOGGER INCLUDE:#{include_path}")
false # Actually, this include processor does nothing.
end
# Intentionnaly no process function here.
end
class SourceLogger < Asciidoctor::Extensions::TreeProcessor
include Asciidoctor::Logging
def get_source_location block
loc = block.source_location # Asciidoctor::Reader::Cursor.
return "#{loc.file}:#{loc.lineno}"
end
def get_rule document
main_file = document.normalize_system_path(document.reader.file, document.reader.dir)
res = main_file.match(MAIN_FILE_REGEX)
lang = res[:lang] || 'default'
"#{res[:id]}/#{lang}"
end
def process document
rule = get_rule(document)
source_blocks = document.find_by(context: :listing, style: 'source')
# Collect individually valid blocks per diff-id.
blocks_per_id = Hash.new { |hash, key| hash[key] = Array.new }
# Find blocks with only diff-id but no diff-type, or vice-versa, or invalid diff-type.
source_blocks.each do |block|
id = block.attr('diff-id', nil)
type = block.attr('diff-type', nil)
if !id and !type
next # Nothing to validate
end
loc = get_source_location(block)
if !id
logger.info("ASCIIDOC LOGGER DIFF:[#{rule}] diff-id is missing in #{loc}")
next
end
if !type
logger.info("ASCIIDOC LOGGER DIFF:[#{rule}] diff-type is missing in #{loc}")
next
elsif !['compliant', 'noncompliant'].include?(type)
logger.info("ASCIIDOC LOGGER DIFF:[#{rule}] diff-type '#{type}' is not valid in #{loc}")
next
end
# The block is valid on its own.
blocks_per_id[id].push(block)
end
# Each diff-id should have:
# * exactly 1 noncompliant block, and
# * 1 or more compliant blocks.
# Find blocks that break this rule.
blocks_per_id.each do |id, blocks|
# Sort to ensure deterministic output.
blocks.sort_by! { |block| get_source_location(block) }
locs = blocks.map { |block| get_source_location(block) }.join(', ')
compliant = blocks.count { |block| block.attr('diff-type') == 'compliant' }
if compliant == 0
logger.info("ASCIIDOC LOGGER DIFF:[#{rule}] diff-id=#{id} has zero compliant example: #{locs}")
end
noncompliant = blocks.count { |block| block.attr('diff-type') == 'noncompliant' }
if noncompliant != 1
message = noncompliant == 0 ? "zero noncompliant example" : "too many noncompliant examples"
logger.info("ASCIIDOC LOGGER DIFF:[#{rule}] diff-id=#{id} has #{message}: #{locs}")
end
end
end
end
Asciidoctor::Extensions.register do
preprocessor MainFileLogger
include_processor IncludeLogger.new @document
treeprocessor SourceLogger
end
invoker = Asciidoctor::Cli::Invoker.new ARGV
GC.start
invoker.invoke!
exit invoker.code

View File

@ -0,0 +1,86 @@
#!/usr/bin/env bash
#
# Validate file inclusion and cross-references.
#
# This script is parametrized by this environment variable:
# * TOPLEVEL: $TOPLEVEL/rules and $TOPLEVEL/shared_content will be validated.
#
# The script exists with a non-zero value when an unexpected error happened or
# there are asciidoc validation errors.
#
# Validation errors are reported on stderr.
#
# Implementation details:
#
# The validation of file inclusion and cross-references needs to be done
# on all rule descriptions, including the default, language-agnostic
# description, with rspecator-view. Otherwise, a rule could drop an include
# of a shared_content asciidoc and that file could become unused.
#
# We use a custom asciidoctor with extra logging for this purpose.
# The format for the interesting log entries are:
# asciidoctor: INFO: ASCIIDOC LOGGER MAIN FILE: $PATH
# asciidoctor: INFO: ASCIIDOC LOGGER INCLUDED: $PATH
# asciidoctor: INFO: ASCIIDOC LOGGER CROSSREFERENCE: $RULEID cross-references $PATH
# asciidoctor: INFO: ASCIIDOC LOGGER DIFF: $VALIDATION_FAILURE_MESSAGE
set -euo pipefail
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)"
TOPLEVEL="$(realpath "${TOPLEVEL}")"
RULES_DIR="${TOPLEVEL}/rules"
SHARED_CONTENT_DIR="${TOPLEVEL}/shared_content"
TMPOUT_DIR="$(mktemp -d)"
exit_code=0
grep_nofail() {
# Grep but always exit with 0 when there are no matches.
# Yet, exit with non-zero if an error occured.
grep "$@" || [ "$?" == "1" ]
}
extract_messages_from_log() {
# The first 3 columns of the log are not relevant.
# The 4th (and any that follows if ':' is used in the message)
# provides the relevant validation error message.
cut -d ':' -f 4- | sort -u
}
find "${RULES_DIR}" -name 'rule.adoc' \
| xargs "${SCRIPT_DIR}/custom-asciidoctor" -a rspecator-view --verbose -R "${RULES_DIR}" -D "${TMPOUT_DIR}" 2>&1 \
| grep_nofail -e 'ASCIIDOC LOGGER' \
> "${TMPOUT_DIR}/asciidoc_introspection"
cross_references=$(grep_nofail -e 'CROSSREFERENCE' "${TMPOUT_DIR}/asciidoc_introspection" | extract_messages_from_log)
if [[ -n "$cross_references" ]]; then
echo >&2 'ERROR: Some rules try to include content from unallowed directories.'
echo >&2 'To share content between rules, you should use the "shared_content" folder at the root of the repository.'
echo >&2 'List of errors:'
echo >&2 "${cross_references}"
exit_code=1
fi
grep_nofail -Pe '(INCLUDE|MAIN FILE)' "${TMPOUT_DIR}/asciidoc_introspection" \
| extract_messages_from_log \
> "${TMPOUT_DIR}/used_asciidoc_files"
git ls-files --cached -- "${RULES_DIR}/**.adoc" "${SHARED_CONTENT_DIR}/**.adoc" \
| xargs realpath \
> "${TMPOUT_DIR}/all_asciidoc_files"
orphans=$(comm -1 -3 <(sort -u "${TMPOUT_DIR}/used_asciidoc_files") <(sort -u "${TMPOUT_DIR}/all_asciidoc_files"))
if [[ -n "$orphans" ]]
then
printf >&2 'ERROR: These adoc files are not included anywhere:\n-----\n%s\n-----\n' "$orphans"
exit_code=1
fi
bad_diffs=$(grep_nofail -e 'DIFF' "${TMPOUT_DIR}/asciidoc_introspection" | extract_messages_from_log)
if [[ -n "$bad_diffs" ]]
then
printf >&2 'ERROR: Diff highlighting is used incorrectly:\n-----\n%s\n-----\n' "$bad_diffs"
exit_code=1
fi
exit $exit_code

View File

@ -6,38 +6,38 @@ ACTION=${1}
CACHE_NAME=${2}
PATH_TO_CACHE=${3}
CACHE_KEY=${CACHE_NAME}
DEFAULT_CACHE_KEY=${CACHE_NAME}
CACHE_URL="http://${CIRRUS_HTTP_CACHE_HOST}/${CACHE_NAME}"
CACHE_URL=http://${CIRRUS_HTTP_CACHE_HOST}/${CACHE_KEY}
TMP_PATH=/tmp/tmp-cache.tgz
TMP_PATH="/tmp/tmp-cache.tgz"
case "${ACTION}" in
download)
echo "Download cache with key ${CACHE_KEY}"
echo " -> try ${CACHE_URL}"
curl -sfSL -o ${TMP_PATH} ${CACHE_URL} || {
echo "Cache download failed";
exit 0;
echo "Download cache with key ${CACHE_NAME} from ${CACHE_URL}"
curl --silent --show-error --fail --location --output "${TMP_PATH}" "${CACHE_URL}" || {
echo "Cache download failed" >&2
exit 0
}
du -hs ${TMP_PATH}
tar -Pxzf ${TMP_PATH}
rm ${TMP_PATH}
du -hs "${TMP_PATH}"
tar -Pxzf "${TMP_PATH}"
rm "${TMP_PATH}"
;;
upload)
echo "Upload cache to ${CACHE_URL}"
tar -Pczf ${TMP_PATH} ${PATH_TO_CACHE}
du -hs ${TMP_PATH}
curl -s -X POST --data-binary @${TMP_PATH} ${CACHE_URL}
tar -Pczf "${TMP_PATH}" "${PATH_TO_CACHE}"
du -hs "${TMP_PATH}"
curl --silent --show-error -X POST --data-binary "@${TMP_PATH}" "${CACHE_URL}" || {
echo "Cache upload failed" >&2
exit 0
}
;;
*)
echo "Unexpected cache ACTION: ${ACTION}"
echo "Unexpected cache ACTION: ${ACTION}" >&2
exit 1
;;
esac
echo "Cache ${ACTION}ed succeeded."

7
ci/fetch_branches.sh Normal file
View File

@ -0,0 +1,7 @@
#!/bin/bash
set -euo pipefail
# When neither BASE_BRANCH nor DEFAULT_BRANCH are defined, fall back to "master".
BRANCH="${BASE_BRANCH:-${DEFAULT_BRANCH:-master}}"
git fetch --force origin "refs/heads/${BRANCH}:refs/remotes/origin/${BRANCH}"

View File

@ -1,3 +1,3 @@
FROM node:14.17.0
FROM public.ecr.aws/docker/library/node:20.9.0
CMD ["bash"]
CMD ["bash"]

View File

@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
cd rspec-tools
pipenv install --dev
pipenv run pip install pytest pytest-cov

View File

@ -2,37 +2,56 @@
set -uo pipefail
# Install script dependencies
set -e
cd rspec-tools && pipenv install && cd ..
set +e
# This script runs all tests; it doesn't exit at the first failure.
exit_code=0
readonly ALLOWED_RULE_SUB_FOLDERS=['common'];
# Validate user-visible rule descriptions
# i.e., without rspecator-view.
./ci/generate_html.sh
cd rspec-tools
pipenv install
if pipenv run rspec-tools check-description --d ../out; then
echo "Rule descriptions are fine"
else
echo "ERROR: There are invalid rule descriptions"
exit_code=1
fi
cd ..
# Compute the set of affected rules
git fetch origin $CIRRUS_DEFAULT_BRANCH
git fetch origin "$CIRRUS_DEFAULT_BRANCH"
branch_base_sha=$(git merge-base FETCH_HEAD HEAD)
echo "Comparing against the merge-base: $branch_base_sha"
changeset=$(git diff --name-only $branch_base_sha..HEAD)
changeset=$(git diff --name-only "$branch_base_sha"..HEAD)
affected_rules=$(printf '%s\n' "$changeset" | grep '/S[0-9]\+/' | sed 's:\(.*/S[0-9]\+\)/.*:\1:' | sort | uniq)
affected_tooling=$(printf '%s\n' "$changeset" | grep -v '/S[0-9]\+/')
if [ ! -z "$affected_tooling" ]; then
echo "Some rpec tools are changed, validating all rules"
affected_rules=rules/*
if printf '%s\n' "$changeset" | grep -qv '/S[0-9]\+/'; then
echo "Some rpec tools or shared_content changed, validating all rules"
affected_rules=rules/*
fi
./ci/generate_html.sh
cd rspec-tools
# validate sections in asciidoc
if pipenv run rspec-tools check-sections --d ../out; then
echo "Sections are fine"
else
echo "ERROR: incorrect section names"
exit_code=1
fi
cd ..
exit_code=0
# Validate some properties of the asciidoc:
#
# [properties validated only on affected rules]
# * Rules should have at least one language specification,
# unless they are closed or deprecated.
# * The include:: should have an empty line before and after them.
# * Only valid languages can be used as subdirectories in rule directories,
# with the exception of ALLOWED_RULE_SUB_FOLDERS.
# * Asciidoc files are free or errors and warnings.
# * ifdef/endif are used appropriatedly.
#
# [properties validated always on all rules]
# * Rule descriptions can include other asciidoc files from the same rule
# directory or from shared_content.
# * All asciidoc files are used/included.
echo "Testing the following rules: ${affected_rules}"
supportedLanguages=$(sed 's/ or//' supported_languages.adoc | tr -d '`,')
for dir in $affected_rules
do
if [ ! -d "$dir" ]; then
@ -40,56 +59,91 @@ do
continue
fi
dir=${dir%*/}
echo ${dir##*/}
subdircount=$(find $dir -maxdepth 1 -type d | wc -l)
# check if there are language specializations
if [[ "$subdircount" -eq 1 ]]
subdircount=$(find "$dir" -maxdepth 1 -mindepth 1 -type d | wc -l)
if [[ "$subdircount" -eq 0 ]]
then
# no specializations, that's fine if the rule is deprecated
if grep -q '"status": "deprecated"\|"status": "closed"' "$dir/metadata.json"; then
if grep -Pq '"status": "(deprecated|closed)"' "$dir/metadata.json"; then
echo "INFO: deprecated generic rule $dir with no language specializations"
else
echo "ERROR: non-deprecated generic rule $dir with no language specializations"
exit_code=1
fi
else
#validate asciidoc
supportedLanguages=$(sed 's/ or//' supported_languages.adoc | tr -d '`,')
for language in $dir/*/
# Add the full path of all adoc files that were affected for sanitization
find ~+/"${dir}" -name '*.adoc' >> all_asciidocs
for language in "${dir}"/*/
do
language=${language%*/}
echo ${language##*/}
if [[ ! "${supportedLanguages[@]}" =~ "${language##*/}" ]]; then
echo "ERROR: ${language##*/} is not a supported language"
exit_code=1
fi
RULE="$language/rule.adoc"
if test -f $RULE; then
echo "$RULE exists."
TMP_ADOC="$language/tmp.adoc"
echo "== Description" > $TMP_ADOC
cat $RULE >> $TMP_ADOC
if asciidoctor --failure-level=WARNING -o /dev/null $TMP_ADOC; then
echo "$RULE syntax is fine"
else
echo "ERROR: $RULE has incorrect asciidoc"
if [[ ! "${supportedLanguages[*]}" == *"${language##*/}"* ]]; then
if [[ ! "${ALLOWED_RULE_SUB_FOLDERS[*]}" == *"${language##*/}"* ]]; then
echo "ERROR: ${language##*/} is not a supported language"
exit_code=1
fi
rm $TMP_ADOC
else
echo "ERROR: no asciidoc file $RULE"
exit_code=1
RULE="$language/rule.adoc"
if test -f "$RULE"; then
# Errors emitted by asciidoctor don't include the full path.
# https://github.com/asciidoctor/asciidoctor/issues/3414
# To ease debugging, we copy the rule.adoc into tmp_SXYZ_language.adoc
# and run asciidoctor on them instead.
# We add the implicit header "Description" to prevent an asciidoctor warning.
TMP_ADOC="$language/tmp_$(basename "${dir}")_${language##*/}.adoc"
echo "== Description" > "$TMP_ADOC"
cat "$RULE" >> "$TMP_ADOC"
else
echo "ERROR: no asciidoc file $RULE"
exit_code=1
fi
fi
done
fi
done
echo "Finished."
if (( $exit_code == 0 )); then
echo "Success"
cd rspec-tools
cat ../all_asciidocs | xargs pipenv run rspec-tools check-asciidoc >validate_asciidoc 2>&1
if [ -s validate_asciidoc ]; then
echo "ERROR: Invalid asciidoc description:"
cat validate_asciidoc
exit_code=1
fi
rm -f validate_asciidoc ../all_asciidocs
cd ..
# Run asciidoctor and fail if a warning is emitted.
# Use the tmp_SXYZ_language.adoc files (see note above).
ADOC_COUNT=$(find rules -name "tmp*.adoc" | wc -l)
if (( ADOC_COUNT > 0 )); then
if asciidoctor --failure-level=WARNING -o /dev/null rules/*/*/tmp*.adoc; then
if asciidoctor -a rspecator-view --failure-level=WARNING -o /dev/null rules/*/*/tmp*.adoc; then
echo "${ADOC_COUNT} documents checked with success"
else
echo "ERROR: malformed asciidoc files in rspecator-view"
exit_code=1
fi
else
echo "ERROR: malformed asciidoc files"
exit_code=1
fi
else
echo "There were errors"
echo "No new asciidoc file changed"
fi
find rules -name "tmp*.adoc" -delete
# Validate file inclusion, cross-references, and other properties.
#
# This part of the validation is extracted in a separate script,
# which is covered by tests unlike what is above this line.
TOPLEVEL=. ./ci/asciidoc_validation/validate.sh || exit_code=1
if (( exit_code == 0 )); then
echo "Success"
else
echo "There were errors"
fi
exit $exit_code

25
ci/validate_file_extensions.sh Executable file
View File

@ -0,0 +1,25 @@
#!/bin/bash
#
# Validates that there are no files with .cs, .vb, .razor or .cshtml extensions present inside rules folder.
#
# As part of the new DotNet squad rule specification sprint guidelines, test case files similar to the ones
# used for unit tests in sonar-dotnet should be temporarely added under the rule folder on RSPEC repository.
# Those files can be of any number for both C# (*.cs, *.razor, *.cshtml) and VB.NET (.*vb).
# The test case files will be copied to the sonar-dotnet repository during the initial phases of implementation
# and will serve as an initial test bed.
# Before merging the PR on the RSPEC side, it is important to ensure that these test case files are deleted.
# The script make sure to fail the CI if any of those previously mentioned files are present inside the rules folder.
set -euxo pipefail
TOPLEVEL="$(realpath .)"
RULES_DIR="${TOPLEVEL}/rules"
CSVB_FILES=($(find "${RULES_DIR}" -type f -name "*.cs" -o -name "*.vb" -o -name "*.razor" -o -name "*.cshtml"))
if [ ${#CSVB_FILES[@]} -gt 0 ]; then
echo "ERROR: '.cs','.vb','.razor' or '.cshtml' files are detected."
printf '%s\n' "${CSVB_FILES[@]}"
exit 1
else
echo "SUCCESS: no '.cs' or '.vb' files detected."
exit 0
fi

View File

@ -1,5 +1,5 @@
#!/bin/bash
set -euo pipefail
set -euxo pipefail
CACHE_PATH=$1
echo "CACHE_PATH: $CACHE_PATH"
@ -10,10 +10,15 @@ ls -al $CACHE_PATH
./ci/generate_html.sh
#validate links in asciidoc
# validate the links in asciidoc
cd rspec-tools
pipenv install -e .
pipenv run rspec-tools check-links --d ../out
if pipenv install && pipenv run rspec-tools check-links --d ../out ; then
EXIT_CODE=0
else
EXIT_CODE=1
fi
cd ..
cp ./rspec-tools/link_probes.history "$CACHE_PATH/"
exit $EXIT_CODE

View File

@ -1,7 +1,33 @@
# Validate metadata
cd rspec-tools
pipenv install
pipenv run rspec-tools validate-rules-metadata
if [[ $? -ne 0 ]]; then
exit 1
#!/bin/bash
set -ueo pipefail
shopt -s lastpipe # To pipe command result into mapfile and have the array variable available in the main shell process.
git fetch --quiet "${CIRRUS_DEFAULT_ORIGIN:-origin}" "${CIRRUS_DEFAULT_BRANCH:-master}"
base="$(git merge-base FETCH_HEAD HEAD)"
echo "Comparing against the merge-base: ${base}"
if ! git diff --name-only --exit-code "${base}" -- rspec-tools/
then
basename --multiple rules/* | mapfile -t affected_rules
echo "Change in the tools, revalidating all rules"
else
git diff --name-only "${base}" -- rules/ | # Get all the changes in rules
sed -Ee 's#(rules/S[0-9]+)/.*#\1#' | # extract the rule directories
sort -u | # deduplicate
while IFS= read -r rule; do if [[ -d "$rule" ]]; then echo "$rule"; fi done | # filter out deleted rules
sed 's#rules/##' | # get rule ids
mapfile -t affected_rules # store them in the `affected_rules` array
echo "Validating ${affected_rules[*]}"
fi
printf '\n\n\n'
# Validate metadata
if [[ "${#affected_rules[@]}" -gt 0 ]]
then
cd rspec-tools
pipenv install
printf '\n\n\n'
pipenv run rspec-tools validate-rules-metadata "${affected_rules[@]}"
else
echo "No rule changed or added"
fi

View File

@ -0,0 +1,99 @@
#!/usr/bin/env bash
#
# Run integration tests for ci/asciidoc_validation.
set -uo pipefail
# We could write complex checks to ensure only specific commands fail and emit
# a specific error message. Instead, we rely on `set -xe` to consistently and
# reliably exit with non-zero if any command fails and pinpoint which command
# failed in the trace output. We also use a trap on ERR to give users a short
# hint, and `set -E` to propagate this trap to shell functions and subshells.
#
# This allows use to write tests as simple commands, such as
# test -f file_exists
#
# When we want to ensure a command fails, we use this pattern:
# { ! command; }
set -xeE
err_trap() {
set +x # Disable tracing when displaying stackframe.
echo "Some test failed; look at the trace for more. Here is the stackframe:" >&2
i=0
while caller $i >&2
do
(( i++ )) || :
done
}
trap err_trap ERR
# Ensure the script we test exists and is executable.
GIT_TOPLEVEL_DIR="$(git rev-parse --show-toplevel)"
VALIDATE_SCRIPT="${GIT_TOPLEVEL_DIR}/ci/asciidoc_validation/validate.sh"
test -f "${VALIDATE_SCRIPT}"
test -x "${VALIDATE_SCRIPT}"
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)"
run_test() {
# Run validation script on $1.
# Ensure the output contains $2...$N.
tmp="$(mktemp -d)"
stderr_log="${tmp}/stderr_log"
stdout_log="${tmp}/stdout_log"
if TOPLEVEL="${SCRIPT_DIR}/$1" "${VALIDATE_SCRIPT}" 2> "${stderr_log}" > "${stdout_log}"
then
# The validation succeeded. We expect nothing in the output.
[ $# -eq 1 ] # no tests
test -f "${stderr_log}"
{ ! test -s "${stderr_log}"; }
else
# We expect at least on check of the stderr content.
[ $# -gt 1 ]
shift
for query in "$@"
do
test -n "${query}"
grep -q -e "${query}" "${stderr_log}"
done
fi
# Regardless of success or failure, the stdout is expected to be empty.
test -f "${stdout_log}"
{ ! test -s "${stdout_log}"; }
}
run_test "test_valid"
run_test "test_unused_adoc" \
"ERROR: These adoc files are not included anywhere:" \
"rules/S100/java/unused.adoc" \
"rules/S100/unused.adoc" \
"shared_content/unused.adoc"
run_test "test_bad_cross_ref" \
"ERROR: Some rules try to include content from unallowed directories." \
"S100 cross-references .*rules/S1000/bad.adoc" \
"S1000 cross-references .*rules/S100/java/bad.adoc"
run_test "test_diff_source" \
"ERROR: Diff highlighting is used incorrectly:" \
"\[S100/cfamily] diff-type is missing in .*/rules/S100/cfamily/rule.adoc:3" \
"\[S100/cfamily] diff-id is missing in .*/rules/S100/cfamily/rule.adoc:8" \
"\[S100/cfamily] diff-type 'bad' is not valid in .*/rules/S100/cfamily/rule.adoc:13" \
"\[S100/cfamily] diff-type is missing in .*/rules/S100/cfamily/local.adoc:3" \
"\[S100/cfamily] diff-id is missing in .*/rules/S100/cfamily/local.adoc:8" \
"\[S100/cfamily] diff-type 'local' is not valid in .*/rules/S100/cfamily/local.adoc:13" \
"\[S100/cfamily] diff-type is missing in .*/shared_content/cfamily/shared.adoc:3" \
"\[S100/cfamily] diff-id is missing in .*/shared_content/cfamily/shared.adoc:8" \
"\[S100/cfamily] diff-type 'shared' is not valid in .*/shared_content/cfamily/shared.adoc:13" \
"\[S100/java] diff-id=1 has zero noncompliant example: .*/rules/S100/java/rule.adoc:3" \
"\[S100/java] diff-id=2 has zero compliant example: .*/rules/S100/java/rule.adoc:8" \
"\[S100/java] diff-id=3 has zero noncompliant example: .*/shared_content/java/example.adoc:3" \
"\[S100/java] diff-id=4 has too many noncompliant examples: .*/rules/S100/java/rule.adoc:15, .*/shared_content/java/example.adoc:13, .*/shared_content/java/example.adoc:8" \
"\[S200/default] diff-id=1 has too many noncompliant examples: .*/rules/S200/rule.adoc:12, .*/rules/S200/rule.adoc:2, .*/rules/S200/rule.adoc:7" \
"\[S200/default] diff-id=2 has too many noncompliant examples: .*/rules/S200/rule.adoc:17, .*/rules/S200/rule.adoc:22" \
"\[S200/default] diff-id=2 has zero compliant example: .*/rules/S200/rule.adoc:17, .*/rules/S200/rule.adoc:22"
echo "All tests passed"

View File

@ -0,0 +1,3 @@
Bad include from S100
include::../../S1000/bad.adoc[]

View File

@ -0,0 +1 @@
java S100

View File

@ -0,0 +1,3 @@
This include is fine
include::./bad.adoc[]

View File

@ -0,0 +1 @@
File from S1000

View File

@ -0,0 +1 @@
include::../../../shared_content/java/shared.adoc[]

View File

@ -0,0 +1 @@
include::../../rules/S100/java/bad.adoc[]

View File

@ -0,0 +1,15 @@
[source,cpp,diff-id=1]
----
Missing diff-type
----
[source,cpp,diff-type=compliant]
----
Missing diff-id
----
[source,c,diff-id=1,diff-type=local]
----
Bad diff-type
----

View File

@ -0,0 +1,19 @@
[source,cpp,diff-id=1]
----
Missing diff-type
----
[source,cpp,diff-type=compliant]
----
Missing diff-id
----
[source,c,diff-id=1,diff-type=bad]
----
Bad diff-type
----
include::./local.adoc[]
include::../../../shared_content/cfamily/shared.adoc[]

View File

@ -0,0 +1,17 @@
[source,java,diff-id=1,diff-type=compliant]
----
1. compliant but missing noncompliant
----
[source,java,diff-id=2,diff-type=noncompliant]
----
2. noncompliant but missing compliant
----
include::../../../shared_content/java/example.adoc[]
[source,java,diff-id=4,diff-type=noncompliant]
----
4. noncompliant B
----

View File

@ -0,0 +1,24 @@
[source,diff-id=1,diff-type=compliant]
----
1. compliant
----
[source,diff-id=1,diff-type=noncompliant]
----
1. noncompliant A
----
[source,diff-id=1,diff-type=noncompliant]
----
1. noncompliant B
----
[source,diff-id=2,diff-type=noncompliant]
----
2. noncompliant A
----
[source,diff-id=2,diff-type=noncompliant]
----
2. noncompliant B
----

View File

@ -0,0 +1,15 @@
[source,cpp,diff-id=1]
----
Missing diff-type
----
[source,cpp,diff-type=compliant]
----
Missing diff-id
----
[source,c,diff-id=1,diff-type=shared]
----
Bad diff-type
----

View File

@ -0,0 +1,15 @@
[source,java,diff-id=3,diff-type=compliant]
----
3. compliant but missing noncompliant
----
[source,java,diff-id=4,diff-type=compliant]
----
4. compliant but too many noncompliant
----
[source,java,diff-id=4,diff-type=noncompliant]
----
4. noncompliant A
----

View File

@ -0,0 +1,3 @@
I am a main file.
include::./used.adoc[]

View File

@ -0,0 +1 @@
I am included.

View File

@ -0,0 +1,3 @@
I am a main file.
include::../../../shared_content/java/included.adoc[]

View File

@ -0,0 +1 @@
I got included.

View File

@ -0,0 +1 @@
another

View File

@ -0,0 +1,32 @@
S100 cfamily
include::./another.adoc[]
include::../../../shared_content/anything.adoc[]
[source,cpp,diff-id=1,diff-type=noncompliant]
----
noncompliant
----
[source,cpp,diff-id=1,diff-type=compliant]
----
compliant
----
[source,cpp,diff-id=2,diff-type=noncompliant]
----
noncompliant
----
[source,cpp,diff-id=2,diff-type=compliant]
----
compliant A
----
[source,cpp,diff-id=2,diff-type=compliant]
----
compliant B
----

View File

@ -0,0 +1,3 @@
generic description
include::../../shared_content/anything.adoc[]

View File

@ -0,0 +1,3 @@
S200 java
include::../../../shared_content/anything.adoc[]

View File

@ -0,0 +1 @@
anything

View File

@ -0,0 +1,24 @@
= AsciiDoc Dos & Don'ts
=== Include
Make sure that `include` statements are surrounded by blank lines.
AsciiDoc will sometimes (depending on the version) trim whitespaces at the beginning and end of the included files. Any adjacent text will thus be stuck to the inlined content, which could lead to display issues like swallowed title tags.
==== Write
----
== Title
include::how-to-fix-it/core.adoc[]
include::how-to-fix-it/symfony.adoc[]
----
==== Avoid
----
== Title
include::how-to-fix-it/core.adoc[]
include::how-to-fix-it/symfony.adoc[]
----

51
docs/benchmarks.adoc Normal file
View File

@ -0,0 +1,51 @@
= Benchmarks
When writing a rule that has to do with performance, you might need to showcase some benchmarks as proof of potential improvements. This should be included in a separate section called `Benchmarks`, under `Resources`.
The format of the benchmarks section is as follows:
* Benchmark table
* Benchmarking code
* Hardware configuration
== Benchmark table
- Do not use abbreviations for statistical terms, not everyone is familiar with them.
- In the `Benchmarks` section, add a subsection called `Glossary` right after the benchmark table and add links to Wikipedia to explain statistical terms used in the header of each column:
==== Glossary
* https://en.wikipedia.org/wiki/Arithmetic_mean[Mean]
* https://en.wikipedia.org/wiki/Standard_deviation[Standard Deviation]
* https://en.wikipedia.org/wiki/Memory_management[Allocated]
Ideally, the columns should look like in the following example:
|===
| <What is being measured> | Mean | Standard Deviation | Allocated
| <This> | 5.042 ms | 0.1049 ms | 125 KB
| <That> | 2.691 ms | 0.0334 ms | 85.94 KB
|===
== Benchmarking code
The code that was used to generate the benchmarks should be included to provide transparency and allow others to reproduce and verify the results. Preferably, the code snippet should include the sample size, the number of iterations, and the framework/library used to run the benchmarks.
If the code is not showcasing how the results were generated, consider prefixing it with an explanation that links to the framework/library used, for example:
----
The results were generated by running the following snippet with https://github.com/dotnet/BenchmarkDotNet[BenchmarkDotNet].
----
== Hardware configuration
The hardware configuration used to run the benchmarks should be included, for example:
[source]
----
BenchmarkDotNet=v0.13.5, OS=Windows 10 (10.0.19045.2846/22H2/2022Update)
11th Gen Intel Core i7-11850H 2.50GHz, 1 CPU, 16 logical and 8 physical cores
[Host] : .NET Framework 4.8 (4.8.4614.0), X64 RyuJIT VectorSize=256
.NET 7.0 : .NET 7.0.5 (7.0.523.17405), X64 RyuJIT AVX2
.NET Framework 4.6.2 : .NET Framework 4.8 (4.8.4614.0), X64 RyuJIT VectorSize=256
----

21
docs/deprecation.adoc Normal file
View File

@ -0,0 +1,21 @@
= Deprecation
== In the RSPEC
The rule status (`/status` in the metadata) should be set to `deprecated`, and its tags should be removed. If the rule is in `SonarWay`, it should be removed from this profile.
Optionally, `/extra/replacementRules` can list the rules that replace this rule.
The `superseded` status from Jira has been superseded by the `deprecated` status during transition to RSPEC V2.
== When running ruleAPI
We detect if replacement rules are specified and if they have been implemented or not.
* If they don't exist, the rule is exported as `deprecated`, and a text is added to the description
* If they are specified, but have not been implemented, the rule is not considered as deprecated (its status is set to `ready` during the export).
* If they are specified and implemented, the status remains `deprecated`, and a text mentioning the replacement rules is added to the description.
In all cases, the `/extra/replacementRules` is removed from the metadata available to the analyzer.

378
docs/description.adoc Normal file
View File

@ -0,0 +1,378 @@
= Rule Description
:toc:
This document describes how `+rule.adoc+` and its dependencies should be structured.
See also the <<styling_guide.adoc#,Styling Guidelines>>, <<tone_guide.adoc#,Tone Guide>> and https://docs.sonarqube.org/latest/extension-guide/adding-coding-rules/#coding-rule-guidelines[Coding rule guidelines].
For technical support, see also
* Rule <<../rules/S6620/java/rule.adoc#,S6620>>, which showcases asciidoc features that are available when writing a rule description.
* Rule <<../rules/S6778/java/rule.adoc#,S6778>>, which showcases multi-framework rules.
== Sections
There should be no first level titles (`+= Title+`) in your adoc.
The allowed second level titles and lower are described in their respective sections below, for each type of rule description.
== Types of rule description
There are currently 2 types of rule descriptions, each having a specific structure.
=== 1. Hotspot
The possible sections for this format are the following:
. Description (no title)
. Ask Yourself Whether
. Recommended Secure Coding Practices
. Sensitive Code Example
. Compliant Solution
. Exceptions
. See
. See Also
Third-level and fourth-level titles (`+=== Title t3+` and `+==== Title t4+`) are not checked for this type of rule.
=== 2. Learn as You Code Rule Format
This format is defined as follows:
* Short description (no title)
// This needs to be kept in sync with the [maps in the validation script](https://github.com/SonarSource/rspec/blob/master/rspec-tools/rspec_tools/validation/description.py#L32-L39).
* Why is this an issue? (mandatory)
** What is the potential impact?
** Exceptions
** (any other titles)
* How to fix it
** Code examples
*** Noncompliant code example
*** Compliant solution
** How does this work?
** Pitfalls
** Going the extra mile
** (any other titles)
* How to fix it in {Framework Display Name}
** Code examples
*** Noncompliant code example
*** Compliant solution
** How does this work?
** Pitfalls
** Going the extra mile
** (any other titles)
* Resources
** Documentation
** Articles & blog posts
** Conference presentations
** Standards
** External coding guidelines
** Benchmarks
** Related rules
Where the `How to fix it in {Framework Display Name}` section can be repeated multiple times when the rule description is defined per-framework.
The sections and subsections for this format are defined as follows:
* Short description (no title) [Optional]
+
A short introduction/summary of the topic, only a few sentences. +
Goal: The title (or message) of a rule might not always be clear due to its shortness, and this should make it clear to our users what the issue is about. Experienced developers will immediately understand what it is about, and developers not yet familiar with the issue at hand can dig deeper into the `Why is this an issue?` section.
+
* *Why is this an issue?* (level 2 title) *[Mandatory]*
+
Start at the basics and go into more depth to explain the concepts behind this type of issue. This is most likely the place where a lot of the content will be. +
This is the place to tell the “story” of the rule, including the impact of leaving it unfixed. We should include code samples wherever needed to make it easier to understand
what is going on. This can be in the form of noncompliant and compliant code in a single code box (noncompliant lines should always be highlighted with the corresponding comment
“// Noncompliant” optionally followed by some explanation) if that is clearer. This first tab could use a freeform 'story-telling' style explaining what the rule is
detecting and why. Feel free to use the “What is the potential impact?” title if it makes sense, or any other titles you find useful. +
Goal: Understand the concepts behind an issue and why it matters.
+
** *What is the potential impact?* (level 3 title) [Optional]
+
This subsection aims to address questions such as the following: +
What is the risk for me? What is the risk for my organization? What is the risk for the users? What can go wrong? +
This section aims to talk about the impacts on the software, depending on the code qualities this issue is linked to: security, reliability, or maintainability. **(see <<metadata.adoc#code-field,Impacts>>.)**
+
Consequently, this section can also talk about the impacts on the ecosystem of this software. For example, impacts on the organization, on the users, and impact in terms of regulations.
https://github.com/SonarSource/rspec/blob/a51217c6d91abfa5e1d77d0ae0843e3903adf2d0/rules/S3649/impact.adoc[_Example._] +
Goal: Our users should understand the impact of this issue on their project.
+
* *How to fix it* or *How to fix it in `{Framework Display Name}`* (level 2 title) [Optional; the title depends on whether the description is generic or framework-specifc. See examples below.]
+
This section consists of one or multiple fixes for this type of issue (`Noncompliant code example` vs. `Compliant solution`). There can be multiple fixes for different libraries and/or frameworks.
If the fix for the rule is trivial (quickfix is available, it is easily inferred from the title and/or message), this section should be omitted and the fix could be mentioned in the previous section.
This tab could also use a freeform 'story-telling' style if that makes it clearer for the user. Feel free to use any of the titles below, or any other titles you find useful. +
Goal: Get an idea of how this issue can be fixed for my project/framework, why this works, what to look out for, and also how to continue improving on this topic.
+
** *How does this work?* (level 3 title) [Optional]
+
Explain why this fixes the problem.
+
** *Pitfalls* (level 3 title) [Optional]
+
One or multiple pitfalls to take into account when working on fixing this issue.
https://github.com/SonarSource/rspec/blob/a51217c6d91abfa5e1d77d0ae0843e3903adf2d0/rules/S6096/common/pitfalls/partial-path-traversal.adoc[_Example._]
+
** *Going the extra mile* (level 3 title) [Optional]
+
Even though the issue might be fixed, most of the time there can be way/s to further improve on this issue or to harden your project.
The subsection should be concise.
https://github.com/SonarSource/rspec/blob/a51217c6d91abfa5e1d77d0ae0843e3903adf2d0/rules/S5131/common/extra-mile/csp.adoc[_Example._]
+
* *Resources* (level 2 title) [Optional]
+
Include resources if our users want to dig even deeper, that can be presented in the different categories.
https://github.com/SonarSource/rspec/tree/a51217c6d91abfa5e1d77d0ae0843e3903adf2d0/rules/S5131/common/resources[_Example._] +
Goal: Allow the user to dig deeper by providing a curated list of resources.
+
** *Documentation* (level 3 title) [Optional]
** *Articles & blog posts* (level 3 title) [Optional]
** *Conference presentations* (level 3 title) [Optional]
** *Standards* (level 3 title) [Optional]
** *External coding guidelines* (level 3 title) [Optional]
** *Benchmarks* (level 3 title) [Optional]
** *Related rules* (level 3 title) [Optional]
+
This section lists Sonar rules related to the current one. The rule ID(s) should be followed by the rule title(s) or a sentence explaining the relation between the rules, e.g.: "_S2275 and S3457 specialize in detecting type mismatches with format strings._".
+
xref:link_formatting.adoc[Standard for links is defined in this document.]
Content of the section "_How to fix it_ / _How to fix it in {Framework Display Name}_" can either be generic or framework specific.
When the content is generic, the "_How to fix it_" title must be used, and the section should only appear once. Example:
....
== Why is this an issue?
Explanation of why this is bad.
== How to fix it
=== Code examples
==== Noncompliant code example
[source,js,diff-id=1,diff-type=noncompliant]
----
var myExample;
----
==== Compliant solution
[source,js,diff-id=1,diff-type=compliant]
----
var myExample = 0;
----
=== How does this work?
We added something.
== Resources
=== Documentation
http-address-of-documentation[My doc name]
....
Note that you can see two special attributes (`diff-id` and `diff-type`) used in the code examples above, these attributes are explained in the <<Diff view,Diff view>>
section below.
When the content is framework-specific, one or more "_How to fix it in `{Framework Display Name}`_" sections (with their respective subsections) must be present.
Each repetition will represent the specific _How to fix it_ section of a given framework.
For example:
....
== How to fix it in Spring
=== Code examples
... Some generic text and code examples for Spring...
=== How does this work?
... Explanation about how the exploit works in Spring...
=== Pitfalls
... Generic and Spring-specific pitfalls to avoid when fixing the issue...
== How to fix it in JSP
=== Code examples
... Some generic text and code examples for JSP...
=== How does this work?
... Explanation about how the exploit works in JSP...
=== Pitfalls
... Generic and JSP-specific pitfalls to avoid when fixing the issue...
....
Ideally, by convention and for maintainability, each framework _How to fix it_ section will be defined in separate files.
Ex:
....
== Why is this an issue?
... Explanation ...
# How to fix it sections
include::./how-to-fix-it/framework-1.adoc[]
include::./how-to-fix-it/framework-2.adoc[]
== Resources
=== Documentation
http-address-of-documentation[My doc name]
....
Note that each framework-specific _How to fix it_ subsection must start with an H2 title following the given format:
`== How to fix it in [an|a|the]? {Framework name}`.
This is important, as this format will be expected by the analyzers when loading the rule content to recognize the different subsections.
Furthermore, the display name of the framework has to match an allowed framework
display name, as defined in <<header_names/allowed_framework_names.adoc#,this allowed framework names file>>.
==== General guidance
Most sections and subsections of the Learn as You Code rule format are optional, only the `Why is this an issue?` main section is mandatory.
The goal is to provide the right level of guidance so that users get the right information from the rules at the right time.
Do not feel obliged to use every section or sub-section if omitting them would lead to a better user experience.
==== Guidelines if you arent sure where something belongs in a rule
* If you need the information to fix the issue, but only the first time, it probably belongs in Why is this an issue?
* If you need the information to fix the issue every time, it probably belongs in How to fix it?
* If you dont need the information to fix the issue, but it will help users grow their knowledge, it probably belongs in Resources (this maps to the 'More Info' tab in the products)
By being careful about what goes where, we help to ensure that users get exactly what they need, when they need it.
==== Guidelines on content focus
We want to help users to create Clean Code. Rule content should focus on the manner in which the code is not clean, why this is an issue, and how to remedy this.
Rules should talk about the potential impact on software quality in the 'What is the potential impact?' sub-section.
For example, if you are talking about a locking issue, it makes sense to focus on the logical issues that could lead to a deadlock and how to fix that in the main rule content.
The implications of a deadlock on the application reliability would then go into the 'What is the potential impact?' sub-section.
== Code Examples
Whenever possible, prefix your code blocks with `[source,language]`, in order to get syntax coloring.
....
[source,cpp]
----
int main(int argc, const char** argv) {
return 0;
}
----
....
That is mandatory for the Noncompliant and Compliant code example sections, just recommended - at the moment - for other sections.
The language names accepted are usually the name we already use for the language folders in RSPEC. Exceptions are:
cfamily:: use `cpp`, `c`, or `objectivec`
plsql:: use `sql`
tsql:: use `sql`
In case no language is appropriate for a code block (for example shared examples between multiple languages), you can use `text` as the language.
=== Comments within code blocks
Colon (`:`) should be used as separator between `Noncompliant`/`Compliant` comments and the text explanation that follows, if any.
[source,cpp]
----
int X = 2; // Noncompliant: variable should be in lowercase
----
When referencing a name within a comment in a code example, use double quotes to make it clear it refers to an existing element in the code.
[source,cpp]
----
int i = 0;
cout << noexcept(++i); // Noncompliant: "i" is not incremented
----
=== Diff view
Additionally, you can also use two attributes to let the products know your code examples should be highlighted with a diff view when possible
(showing the changes in the code examples as red/green).
These attributes are optional and if a product does not yet support the diff view feature, these attributes will simply be ignored.
These attributes are `diff-id=X` and `diff-type=[noncompliant|compliant]`. The `diff-id` attributes describe which code examples should
be compared together, and the `diff-type` attribute explain how it should be displayed `Noncompliant` (red) vs. `Compliant` (green).
A single and unique diff-id should be used only once for each type of code example as shown in the description of a rule.
....
==== Noncompliant code example
[source,js,diff-id=1,diff-type=noncompliant]
----
var myExample;
----
==== Compliant solution
[source,js,diff-id=1,diff-type=compliant]
----
var myExample = 0;
----
....
== Parameters
Parameters should be listed in a subsection as follow:
....
=== Parameters
.name
****
_TYPE_
----
default value
----
Description of what the parameter does.
****
.name2
****
----
another default value
----
Description of what this second parameter does.
****
.name3
****
_TYPE_
Description of what this third parameter does.
****
.name4
****
Description of what this fourth parameter does.
****
....
The parameter name and the description are mandatory. The type and default value are not.
The parameter name with a `.` before will be the title of the block below marked by `****`.
We always use `----` around the default parameter to avoid having a special character confuse AsciiDoctor and to create a visual consistency for all parameters.
== Comment a rule
Comments and links that were created on Jira have been gathered in a `comments-and-links.adoc` file for each concerned rule. +
You can add a comment anywhere in a rule by adding the following lines in the `*.adoc` file:
[source]
----
\ifdef::env-github,rspecator-view[]
John Doe (9 Jun 2021, 15:49): my comment on the rule
\endif::env-github,rspecator-view[]
----
This way, your comment will only be visible in GitHub preview and on the Search Page (and will not be visible for the user).
== Share content between rules
You can share content between rules by using the `shared_content` folder at the root of the repository.
Any included content for a rule can only come from the folder of the rule being described, `shared_content`, or any of their subfolders.

View File

@ -0,0 +1,165 @@
// Ansible
// C#
* ASP.NET
* ASP.NET Core
* ASP.NET MVC 4.x
* Razor
* .NET
* Entity Framework Core
* Dapper
* BouncyCastle
* Jwt.Net
* Blazor
// C-Family
* Botan
* CryptoPP
* OpenSSL
* cURL
* MSTest
* NUnit
* xUnit
* Fluent Assertions
* NFluent
* NSubstitute
* MSTest
* NUnit
* Xerces
* libxml2
// Java
* Android
* Android WebView
* Apache Commons
* Apache Commons
* Apache Commons Email
* Apache HttpClient
* Auth0 JWT
* Commons Compiler
* Dom4j
* FasterXML
* Groovy
* Gson
* Hibernate
* Java Cryptography Extension
* Java EE
* Java JWT
* Java SE
* Java JDBC API
* Java I/O API
* Jdom2
* JSP
* Legacy Mongo Java API
* OkHttp
* Realm
* Apache HttpClient
* Couchbase
* SAX
* Servlet
* Spring
* Spring Data MongoDB
* Spring Data Cassandra
* Spring Data Redis
* Spring Data Neo4j
* SQLCipher
* Thymeleaf
// JS
* Jasmine
* Jest
* Flow.js
* Node.js
* Express.js
* SSH2
* Mocha
* MongoDB
* Mongoose
* Sequelize
* Knex
* DOM API
* jsonwebtoken
* libxmljs
* Formidable
* Multer
* Passport
* Request
* TypeScript
* PropTypes
* JSX
* Electron
// PHP
* Core PHP
* Guzzle
* Laminas
* Laravel
* Symfony
* WordPress
* Mcrypt
// Python
* aiohttp
* Amazon DynamoDB
* Argon2-cffi
* Bcrypt
* Cryptodome
* databases
* Django
* Django Templates
* FastAPI
* Flask
* HTTPX
* Jinja
* lxml
* MySQL Connector/Python
* Numpy
* Paramiko
* pyca
* PyCrypto
* pyDes
* PyJWT
* pyOpenSSL
* python-jose
* python-jwt
* python-ldap
* Python SQLite
* Python Standard Library
* PyTorch
* PyYAML
* Requests
* Scrypt
* Scikit-Learn
* SignXML
* SQLAlchemy
* ssl
* TensorFlow
// Docker
* Wget
// Cloudformation
* API Gateway
* OpenSearch
* Identity and Access Management
// Azure Resource Manager
* Storage Accounts
* Databases
* ARM Templates
* Bicep
// Terraform
* AWS API Gateway
* AWS OpenSearch
* Azure Databases
* Azure Storage Accounts
* GCP Load Balancers
* AWS Identity and Access Management
// CDK
* AWS CDK
// Swift
* CommonCrypto
* CryptoSwift
* IDZSwiftCommonCrypto
// Azure resource manager
* JSON templates
* Bicep
// PL/SQL
* DBMS_CRYPTO
// Go
* Go Standard Library
// Kubernetes
* Helm
// Kotlin
Jetpack Compose

View File

@ -0,0 +1,6 @@
* Ask Yourself Whether
* Sensitive Code Example
* Recommended Secure Coding Practices
* Compliant Solution
* Exceptions
* See

83
docs/link_formatting.adoc Normal file
View File

@ -0,0 +1,83 @@
== Why is it important to define a standard for links?
We often want to provide links in the 'Resources' section of a rule that point to blog posts, documentation, and other rules. To provide a consistent experience across the Sonar solution, we want to define standard ways to write these links in our rules. This document aims to do that. This guidance does not apply to links that appear within continuous text elsewhere in a rule.
== How should you write links?
=== Link formatting:
* Links to documentation: <source> - <title> e.g. SonarQube Documentation - SonarScanner for Gradle
* Links to framework documentation <source> - <member name and kind> e.g. Microsoft Learn - Object.ToString Method
* Links to blog posts / news articles: <source> - <title> e.g. Google Security Blog - Moving towards a more secure web
* Links to Stack Overflow answers (similar comments in a blog)e.g. Stack Overflow - Answer by Stephen Cleary for Best way to handle null task inside async method?
* Links to another Sonar rule: <rulenumber> - <title> e.g. S2755 - XML parsers should not be vulnerable to XXE attacks.
Note that rule-ids (`<rulenumber>`) are automatically hyperlinked in our products to point to the rule description in that product.
_Do not add any hyperlink yourself._
The hyperlink to anything apart from other Sonar rules should be applied to just the document name, with the 'source' being left as plain text. The idea is that this makes it really easy for a user to understand the source before they click on anything.
For Sonar rules, the whole entry (<rulenumber> - <title>) should be a hyperlink.
Here is how the above links should look like:
* SonarQube Documentation - https://docs.sonarqube.org/9.7/analyzing-source-code/scanners/sonarscanner-for-gradle/[SonarScanner for Gradle]
* Microsoft Learn - https://learn.microsoft.com/en-us/dotnet/api/system.object.tostring[`Object.ToString` Method]
* Google Security Blog - https://security.googleblog.com/2016/09/moving-towards-more-secure-web.html[Moving towards a more secure web]
* Stack Overflow - Answer by Stephen Cleary for https://stackoverflow.com/a/27551261[Best way to handle null task inside async method?]
* S2755 - XML parsers should not be vulnerable to XXE attacks +
_Note, no link here, this is the intended behavior. In the products the "S2755" part will be automatically hyperlinked._
=== Additional things to consider when adding a link to a rule:
* Is the article (particularly blog posts) likely to be around for at least 6 months?
* Do you trust this source as an 'expert'?
* Link to en_US versions where there is a choice
=== Short form names for sources we regularly use
When web pages have massively long names like "Java™ Platform, Standard Edition 8 API Specification", we will provide short form names that we will use instead. Feel free to add new ones below:
==== Short form names to use:
* Android Documentation - https://developer.android.com/docs
* Apex Developers Guide - https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_keywords_sharing.htm
* AWS Documentation - https://docs.aws.amazon.com/
* AWS blog - https://aws.amazon.com/blogs
* Azure Documentation - https://learn.microsoft.com/en-us/azure/?product=popular
* CERT - https://wiki.sei.cmu.edu/confluence/display/seccode
* Clippy Lints - https://rust-lang.github.io/rust-clippy/master/index.html
* {cpp} reference - https://en.cppreference.com/w/
* {cpp} Core Guidelines - https://github.com/isocpp/CppCoreGuidelines/blob/e49158a/CppCoreGuidelines.md
* CVE - https://cve.mitre.org
* CWE - https://cwe.mitre.org
* Docker Documentation - https://docs.docker.com/
* Google Cloud - https://cloud.google.com/docs
* Java Documentation - https://docs.oracle.com/en/java/
* Kotlin Documentation - https://kotlinlang.org/docs/home.html
* Kubernetes Documentation - https://kubernetes.io/docs/home/
* Microsoft Learn - https://learn.microsoft.com/en-us/
* Microsoft Developer Blog - https://devblogs.microsoft.com/
* MDN web docs - https://developer.mozilla.org/en-US/
* Medium - https://medium.com/
* MITRE - https://attack.mitre.org/
* Mockito - https://site.mockito.org/javadoc/current/overview-summary.html
* The Open Group - https://www.opengroup.org/
* OWASP - https://owasp.org/
* PEP - https://peps.python.org/
* PHP Documentation - https://www.php.net/docs.php
* PHP Tutorials - https://www.phptutorial.net/
* PEP 8 - Style Guide for Python Code - https://peps.python.org/pep-0008/
* Python Documentation - https://docs.python.org/
* React Documentation - https://reactjs.org/
* Rhino Security Labs - https://rhinosecuritylabs.com/
* SAP Documentation - http://help.sap.com/abapdocu_702/en/abenabap.htm
* SonarQube Documentation - https://docs.sonarqube.org/latest/
* Sonar - https://www.sonarsource.com/
* Sonar Blog - https://www.sonarsource.com/blog/
* Stack Overflow - https://stackoverflow.com/
* Symfony - https://symfony.com/doc/current/index.html
* Test NG Documentation - https://testng.org/doc/documentation-main.html
* W3Schools - https://www.w3schools.com/
* WCAG - https://www.w3.org/WAI/standards-guidelines/wcag/
* Wikipedia - https://en.wikipedia.org

45
docs/metadata.adoc Normal file
View File

@ -0,0 +1,45 @@
ifdef::env-github[]
:tip-caption: :bulb:
:note-caption: :information_source:
endif::[]
= Rule Metadata
This document describes how `+metadata.json+` should be structured.
== `title`, `type`, `tags`, `remediation`, and `defaultSeverity`
These fields are described in the https://docs.sonarqube.org/latest/extension-guide/adding-coding-rules/#coding-rule-guidelines[SonarQube documentation].
== `quickfix` field
Every active rule that is not a security hotspot must specify the availability of a quick fix for its issues.
`metadata.json` must feature a `quickfix` field with one of the following values:
* `unknown`: the feasibility of producing a quick fix is not evaluated.
* `infeasible`: it is not feasible to propose a quick fix for any of the issues, for whatever reason.
* `targeted`: it is possible to implement quick fixes for this rule, but none are implemented right now.
* `partial`: some of the issues produced by the rule propose a quick fix, but not all.
* `covered`: all the issues produced by the rule propose a quick fix.
[NOTE]
====
A `covered` rule is still not guaranteed to provide a quick fix for a particular issue (for instance, if a fix location would be inside a macro expansion or in a different file from the issue location). The rule is said to have a `partial` quick fix only if there exists a family of issues that cannot have a quick fix.
For instance, on one hand, if a rule detects two functions that are dangerous to use, `A` and `B`, and `A` has an obvious replacement (and therefore a quick fix) while `B` does not, the field should be set to `partial`.
On the other hand, if a quick fix could be easily proposed for both `A` and `B`, but the fix location might be inside a macro expansion, or in a different file from the issue location (and hence not feasible given the current SonarLint capabilities), this should not prevent the rule from being tagged as `covered`.
====
[TIP]
====
You can update the quickfix field using this GitHub Workflow: https://github.com/SonarSource/rspec/actions/workflows/update_quickfix_status.yml
====
== `code` field
The code field is an object that contains information related to the clean code taxonomy. It is an object with two required properties:
* `impacts`: A nested object that is treated as a mapping from a software quality to a level (`"INFO"`, `"LOW"`, `"MEDIUM"`, `"HIGH"` or `"BLOCKER"`). Note that at least one software quality has to be specified. The current list of allowed software qualities is `"MAINTAINABILITY"`, `"RELIABILITY"` and `"SECURITY"`.
* `attribute`: A single clean code attribute that the rule aims to achieve. This has to be one of the following values: `"FORMATTED"`, `"CONVENTIONAL"`, `"IDENTIFIABLE"`, `"CLEAR"`, `"LOGICAL"`, `"COMPLETE"`, `"EFFICIENT"`, `"FOCUSED"`, `"DISTINCT"`, `"MODULAR"`, `"TESTED"`, `"LAWFUL"`, `"TRUSTWORTHY"`, `"RESPECTFUL"`.

125
docs/styling_guide.adoc Normal file
View File

@ -0,0 +1,125 @@
= Styling Guide
This document provides styling guidelines for `+rule.adoc+` and its dependencies.
See also the <<description.adoc#,Description Guidelines>> for information about the rule structure and the <<tone_guide.adoc#,Tone Guide>> for guidance on the tone of voice to use.
The RSPEC styling guide is loosely based on the Associated Press Style and geared to rule descriptions.
The official Associated Press Style should be used as a fall-back for topics not defined here.
The guide might be extended in the future when unanimities emerge.
Following it should be considered a goal to work towards to get more homogenous texts.
This will be a long process consisting of many baby steps, such as adjusting the style when rule descriptions are rewritten for the Progressive Education Framework.
It is acceptable not to have 100% consistency across all texts. The higher the consistency, the better, but differences are expected.
== Language
Use _American English_ and its notation.
== Acronyms
Do not use acronyms without defining them first unless they are considered well known by the target audience.
For example, the acronym _JDK_ can be considered common knowledge for a Java developer and does not have to be defined.
The definition of what is and is not a well-known acronym is somewhat subjective.
It is up to the reviewers of RSPEC pull requests to challenge the use of acronyms that might not be well known.
If possible and sensible, spell out the acronym on first use and use generic terms on subsequent mentions.
For example, refer to _Cross-Site Scripting_ as _the vulnerability_.
Write:: Cross-Site Scripting allows to inject JavaScript code in the context of a website. The vulnerability can be abused to hijack sessions.
Avoid:: XSS allows to inject JS code in the context of a website. XSS can be abused to hijack sessions.
== Contractions
Contractions are considered informal writing and therefore should not be used.
Write:: It is the right way!
Avoid:: It's not the right way!
== Numbers
In general, spell out numbers one through nine. Use digits for numbers 10 and higher.
Be aware that there are many exceptions to this rule. For instance, use digits for units or percentages.
Write:: 5°C is 9% warmer than yesterday. The condition checks if the value is greater than eight and smaller than 100.
Avoid:: The condition checks if the value is greater than 8 and smaller than one hundred.
Commas should be used to group three digits of numbers larger than 999.
Write:: My program creates 1,000,000 forks.
Avoid:: My program creates 1000000 forks.
== Punctuation
=== Colon
Do not capitalize the first word after a colon unless it is the start of a sentence or a proper noun.
Write:: There is only one thing we can do: rewrite.
Avoid:: There is only one thing we can do: Rewrite.
=== Comma
To avoid ambiguity, add the Oxford comma after the penultimate term in a series of three or more terms.
Write:: My code is slick and works. My code is not slow, unreliable, and full of bugs.
Avoid:: My code is slick, and works. My code is not slow, unreliable and full of bugs.
=== Parentheses
Parentheses should be avoided. If the information is relevant, it is preferred to incorporate it directly in a sentence.
Write:: This is a test that forms an example.
Avoid:: This is a test (example).
== Lists
Do not capitalize the first word of list entries unless it is the start of a sentence or a proper noun.
Write::
Check the values:
* size
* length
Avoid::
Check the values:
* Size
* Length
Do not add punctuation for enumerations.
Write::
Check the values:
* size
* length
Avoid::
Check the values:
* size,
* length.
== Literals
Inline literals (backticks) should be used to highlight short values.
Use it when referencing variable names, file names, tokens, and all kinds of specific strings of text that should be visually extracted from the surrounding default text.
Write:: Compiling source file `src/generic_file.py` breaks an `assert` call in pytest framework.
Avoid:: Compiling source file "src/generic_file.py" breaks an `assert` call in `pytest` framework.
== Referencing elements from the code
When referencing elements from the code within a normal sentence, use the `backticks` (```) to format it. This includes variable names, function names, class names, and so on.
When referencing the same elements within a comment in a code block, surrpond it with double quotes.
[source,cpp]
----
int i = 0;
// Write
cout << noexcept(++i); // Noncompliant, "i" is not incremented -> Double quotes
// Avoid
cout << noexcept(++i); // Noncompliant, i is not incremented -> No quotes
cout << noexcept(++i); // Noncompliant, `i` is not incremented -> Backticks
----

66
docs/testing.adoc Normal file
View File

@ -0,0 +1,66 @@
= Testing changes
This document explains how to test changes to the frontend, CI, and rspec-tools.
Refer to the <<../README.adoc#AddModifyRule,main documentation>> if you want to modify rules.
== Testing the frontend
If your changes are small and noncontroversial, you can directly create a branch in this repository.
However, when you need to show reviewers how the website will look with your changes,
you can use a fork with your own GitHub Pages.
See <<forking>> for more details.
To test your changes locally, you can start a local HTTP server, such as ``npm start``.
Refer to the frontend documentation for more details.
== Testing the rspec-tools
Modifications to the rspec-tools do not require any special process.
You can therefore use a regular PR from a branch in this repository.
== Testing GitHub Actions
There are two strategies to test GitHub Actions: either use your own branch in this repository, or create a fork.
Choose the solution your need based on the impact your changes can have.
For example, if the changes may spam/modify other Pull Requests, it is wiser to use your own fork.
Note that GitHub will pick the workflow definitions from your branch whether it is in a fork or not.
It will also run new workflow scripts automatically (i.e. there is no configuration to change on GitHub).
When working on a new workflow or updating existing ones, since it may confuse other people to see unexpected results,
it is preferable to use your own fork while iterating on your work.
See <<forking>> for more details.
== Testing Cirrus CI
To test modification to the Cirrus CI script, you need to create your own branch in this repository (not a fork).
Cirrus CI will automatically pick up the version of the scripts on that branch.
[[forking]]
== Forking
Forking this repository is fairly trivial.
. Click "Fork" on the top right and select your own account.
. If needed, enable GitHub Actions:
.. in your fork, go to the "Actions" page,
.. click on the green button to enable workflows,
.. and, if needed, additionally enable the "Update rule coverage" workflow,
which is disabled by default because it executes on a schedule.
. If needed, enable GitHub Pages:
.. enable the GitHub Actions so that the ``gh-pages`` branch is properly populated,
.. go to "Settings" > "Pages" and under "Source"
*** set "Branch" to "gh-pages",
*** select "/ (root)" as the source folder,
*** and click "save".
If you need to rely on GitHub Actions, you can work on your fork's ``master`` branch to ensure that
the "Build and Deploy" workflow gets triggered out of the box.
Once you are done with your feature and your PR was merged, you can delete your fork.
If you prefer to keep the fork alive, don't forget to merge the upstream changes before working on your next feature.

37
docs/tone_guide.adoc Normal file
View File

@ -0,0 +1,37 @@
= Tone Guide
When writing a rule, we must consider who we are talking to, what they are trying to achieve, and what their mindset is likely to be.
== Who are we talking to?
We will be talking to a range of people; experienced engineers fixing something for the 10th time, people very new to the language, working on code they don't know well, and everyone in between. It is also important to realize that many of our users are not native English speakers.
What might they be doing, and how do they feel?
* They want to merge a PR and have a failing quality gate
** They may be tired, stressed, embarrassed, or under pressure to finish
*** Now is the time for a calm, well-informed mentor or coach, not for criticism, fear, or excessive humor
* They just saw they have a potential security hole
** They may be worrying about the implications for their job or getting a reprimand from a stern boss or security owner. They may be thinking this is yet another false positive and hovering over the wont fix button.
*** We need to be calm and factual. There is no need to scare them unduly and a friendly tone will definitely be helpful.
* They got that green quality gate, are basking in their success, and considering what to do next
** How can we help them turn that cheerful glow into motivation to learn more?
== Guidelines
*Tone:* We are your coding mentor. We are friendly and trustworthy but reasonably serious; we know what we are talking about, and we want to help you make the right change and grow in the process, at the right time for you.
* Aim for brevity and clarity in the 'Why is this an issue' and 'How to fix it' sections.
** Aim for just enough to make it clear what the key points are and no more. You can always add interesting stuff to the 'more info' section for when they have some spare time and want to learn more.
** Try to use simple English and avoid slang. Assume users have high school-level English, equivalent to CEFR levels B1/B2, at best. How easy can we make it to understand complex ideas?
* Write in the active voice rather than the passive.
** 'The user logged into their account,' not 'The account was logged into by the user.'
* Try to avoid unnecessary jargon
** If in doubt, explain it or link to a good explanation
* Try to be positive
** We want them to understand the facts but not scare them unnecessarily. We are part of the solution, not the problem.

50
frontend/README.adoc Normal file
View File

@ -0,0 +1,50 @@
= Search page for the rule repository
This is a single-page React application that indexes the rule repository and
allows you to run flexible search through all of the rules and rule drafts,
and render the rule specifications in HTML.
The render is not guaranteed to match the rule rendering in the products,
but it is a good proxy.
== Local deployment
Make sure you have NodeJs and `npm` available. Tested with NPM v10.2.3 and NodeJS v18.19.0.
Install dependencies
[source,shell]
----
npm install
----
If you have some non-js dependencies missing, this might fail.
Possibly missing non-js dependencies include OpenSSL, libuv, libssh2, KRB5.
Once you succeed in installing the dependencies you are ready to predeploy.
[source,shell]
----
npm run predeploy
----
This command builds the database of the rule specifications.
NOTE: If the script fails to clone or fetch due to an SSL certificate failure
and your network uses a custom CA certificate you might need to make sure it is installed
in the accessible place.
As a workaround you can https://github.com/nodegit/nodegit/issues/1742[disable the certificate check].
NOTE: In the predeploy step (specifically the `prepare-rules` part of it) the script fetches all the open PRs locally.
You might want to set `GITHUB_TOKEN` to your personal GitHub token
to avoid GitHub throttling your requests during the predeploy stage.
Now you can run it locally:
[source,shell]
----
npm start
----
This should open https://localhost:3000/rspec in your default browser with the rule search page.

View File

@ -1,61 +0,0 @@
# Getting Started with Create React App
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
## Available Scripts
In the project directory, you can run:
### `npm start`
Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
The page will reload if you make edits.\
You will also see any lint errors in the console.
### `npm test`
Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
### `npm run predeploy`
Custom command to build the search index.
**Note:** For this command to work on Windows, you would need to replace in `package.json`
```json
"prepare-rules": "ts-node -O '{\"module\":\"commonjs\"}' ./src/deployment/index.ts"
```
with
```json
"prepare-rules": "ts-node -O {\"\"\"module\"\"\":\"\"\"commonjs\"\"\"} ./src/deployment/index.ts"
```
### `npm run build`
Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
### `npm run eject`
**Note: this is a one-way operation. Once you `eject`, you cant go back!**
If you arent satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point youre on your own.
You dont have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldnt feel obligated to use this feature. However we understand that this tool wouldnt be useful if you couldnt customize it when you are ready for it.
## Learn More
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
To learn React, check out the [React documentation](https://reactjs.org/).
**Note:** To easily use the `npm` commands on Windows, you can use VSCode with a `npm` support extension.

32014
frontend/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -4,30 +4,34 @@
"private": true,
"homepage": "http://sonarsource.github.io/rspec",
"dependencies": {
"@material-ui/core": "^4.11.3",
"@material-ui/icons": "^4.11.2",
"@material-ui/lab": "^4.0.0-alpha.57",
"@octokit/rest": "^18.5.3",
"@testing-library/jest-dom": "^5.11.9",
"@testing-library/react": "^11.2.3",
"@testing-library/user-event": "^12.6.2",
"@types/jest": "^26.0.20",
"@types/node": "^12.19.15",
"@types/react": "^16.14.2",
"@types/react-dom": "^16.9.10",
"asciidoctor": "^2.2.1",
"@material-ui/core": "^4.12.4",
"@material-ui/icons": "^4.11.3",
"@material-ui/lab": "^4.0.0-alpha.61",
"@octokit/rest": "^18.12.0",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^11.2.7",
"@testing-library/user-event": "^12.8.3",
"@types/jest": "^26.0.24",
"@types/node": "^12.20.55",
"@types/react": "^16.14.49",
"@types/react-dom": "^16.9.20",
"asciidoctor": "^2.2.6",
"html-react-parser": "^1.4.14",
"lunr": "^2.3.9",
"nodegit": "^0.27.0",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.1",
"string-strip-html": "^8.0.1",
"ts-node": "^9.1.1",
"typescript": "^4.1.3",
"verror": "^1.10.0",
"node-html-parser": "^5.4.2",
"nodegit": "^0.28.0-alpha.24",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-highlight": "^0.14.0",
"react-router-dom": "^5.3.4",
"react-scripts": "^5.0.1",
"setimmediate": "^1.0.5",
"string-strip-html": "^8.5.0",
"ts-node": "^10.9.1",
"typescript": "^4.9.5",
"verror": "^1.10.1",
"web-vitals": "^0.2.4",
"winston": "^3.3.3",
"winston": "^3.11.0",
"yargs": "^16.2.0"
},
"scripts": {
@ -35,7 +39,7 @@
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"prepare-rules": "ts-node -O '{\"module\":\"commonjs\"}' ./src/deployment/index.ts",
"prepare-rules": "ts-node -P tsconfig-rules.json ./src/deployment/index.ts",
"predeploy": "npm run prepare-rules && npm run build",
"deploy": "gh-pages -d build"
},
@ -58,9 +62,11 @@
]
},
"devDependencies": {
"@types/lunr": "^2.3.3",
"@types/nodegit": "^0.27.1",
"@types/react-router-dom": "^5.1.7",
"tmp-promise": "^3.0.2"
"@testing-library/react-hooks": "^7.0.2",
"@types/lunr": "^2.3.5",
"@types/nodegit": "^0.27.10",
"@types/react-highlight": "^0.12.6",
"@types/react-router-dom": "^5.3.3",
"tmp-promise": "^3.0.3"
}
}

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

BIN
frontend/public/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 832 B

View File

@ -1,15 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<html prefix="og: https://ogp.me/ns#" lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<link rel="icon" href="%PUBLIC_URL%/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
content="Rules Repository Search Page"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo128.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
@ -20,11 +20,22 @@
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
Unlike "/favicon.png" or "favicon.png", "%PUBLIC_URL%/favicon.png" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<title>RSPEC</title>
<!-- Twitter Card -->
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:image" content="%PUBLIC_URL%/favicon.png" />
<meta name="twitter:title" content="RSPEC" />
<meta name="twitter:description" content="Rules Repository Search Page" />
<!-- Open Graph -->
<meta property="og:title" content="RSPEC" />
<meta property="og:description" content="Rules Repository Search Page" />
<meta property="og:type" content="website" />
<meta property="og:url" content="%PUBLIC_URL%" />
<meta property="og:image" content="%PUBLIC_URL%/favicon.png" />
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>

BIN
frontend/public/logo128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

View File

@ -1,16 +1,16 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"short_name": "RSPEC",
"name": "Rules Repository Search Page",
"icons": [
{
"src": "favicon.ico",
"src": "favicon.png",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"src": "logo128.png",
"type": "image/png",
"sizes": "192x192"
"sizes": "128x128"
},
{
"src": "logo512.png",

View File

@ -0,0 +1,10 @@
sonar.projectKey=rspec-frontend
sonar.projectName=rspec-frontend
sonar.sources=src
sonar.exclusions=**/*.test.js,**/*.test.jsx,**/*.test.ts,**/*.test.tsx
sonar.tests=src
sonar.test.inclusions=**/*.test.js,**/*.test.jsx,**/*.test.ts,**/*.test.tsx
sonar.javascript.coveragePlugin=lcov
sonar.javascript.lcov.reportPaths=coverage/lcov.info
sonar.cpd.exclusions=src/deployment/__tests__/resources/**

View File

@ -1,11 +0,0 @@
import React from 'react';
import { render } from '@testing-library/react';
import App from './App';
test('renders see the GH PR link', () => {
const { getByText } = render(<App />);
const linkElement = getByText(/Unimplemented rules/i);
expect(linkElement).toBeInTheDocument();
const searchLinkElement = getByText(/Search in unimplemented/i);
expect(searchLinkElement).toBeInTheDocument();
});

View File

@ -6,16 +6,56 @@ import Typography from '@material-ui/core/Typography';
import Tabs from '@material-ui/core/Tabs';
import Tab from '@material-ui/core/Tab';
import Box from '@material-ui/core/Box';
import { Link } from '@material-ui/core';
import { useHistory } from "react-router-dom";
import { useRuleCoverage } from './utils/useRuleCoverage';
import Tooltip from '@material-ui/core/Tooltip';
import { createTheme, Link, ThemeProvider } from '@material-ui/core';
import Highlight from 'react-highlight';
import { Link as RouterLink, useHistory } from 'react-router-dom';
import { RULE_STATE, useRuleCoverage } from './utils/useRuleCoverage';
import { useFetch } from './utils/useFetch';
import { RuleMetadata } from './types';
import RuleMetadata, { Version, Coverage } from './types/RuleMetadata';
import parse, { attributesToProps, domToReact, DOMNode, Element } from 'html-react-parser';
import VisibilityOffOutlinedIcon from '@material-ui/icons/VisibilityOffOutlined';
import './hljs-humanoid-light.css';
const PARAMETER_INTERNAL_MARGIN = 0.5;
const useStyles = makeStyles((theme) => ({
'@global': {
h1: {
fontSize: '1.6rem',
fontWeight: 500,
marginTop: theme.spacing(3),
marginBottom: theme.spacing(3)
},
h2: {
color: '#0B3C62',
fontSize: '1.2rem'
},
h3: {
fontSize: '1rem',
color: '#25699D'
},
hr: {
color: '#F9F9FB'
},
'.sidebarblock': {
'& .title': {
marginTop: theme.spacing(2),
color: '#25699D'
},
'& pre': {
marginLeft: '1rem',
marginTop: theme.spacing(PARAMETER_INTERNAL_MARGIN),
marginBottom: theme.spacing(PARAMETER_INTERNAL_MARGIN)
},
'& p': {
marginLeft: '1rem',
marginTop: theme.spacing(PARAMETER_INTERNAL_MARGIN),
marginBottom: theme.spacing(PARAMETER_INTERNAL_MARGIN)
}
}
},
ruleBar: {
borderBottom: '1px solid lightgrey',
},
@ -23,12 +63,19 @@ const useStyles = makeStyles((theme) => ({
textAlign: 'center',
marginTop: theme.spacing(3),
marginBottom: theme.spacing(3),
color: 'black'
},
ruleidLink: {
color: 'inherit',
},
title: {
textAlign: 'justify',
marginTop: theme.spacing(4),
marginBottom: theme.spacing(4),
},
avoid: {
textDecoration: 'line-through'
},
coverage: {
marginBottom: theme.spacing(3),
},
@ -39,69 +86,135 @@ const useStyles = makeStyles((theme) => ({
// style used to center the tabs when there too few of them to fill the container
tabRoot: {
justifyContent: "center"
justifyContent: 'center'
},
tabScroller: {
flexGrow: 0
},
unimplemented: {
color: 'red'
}
},
tab: {
display: 'flex',
'&::before': {
content: '""',
display: 'block',
width: theme.spacing(1),
height: theme.spacing(1),
marginRight: theme.spacing(1),
borderRadius: theme.spacing(1),
},
'& > .MuiTab-wrapper': {
width: 'auto',
}
},
coveredTab: {
'&::before': {
backgroundColor: RULE_STATE['covered'].color,
}
},
targetedTab: {
'&::before': {
borderColor: RULE_STATE['targeted'].color,
border: '1px solid',
backgroundColor: 'transparent'
}
},
removedTab: {
'&::before': {
backgroundColor: RULE_STATE['removed'].color,
}
},
closedTab: {
'&::before': {
backgroundColor: RULE_STATE['closed'].color,
}
},
deprecatedTab: {
'&::before': {
backgroundColor: RULE_STATE['deprecated'].color,
}
},
}));
const theme = createTheme({});
type UsedStyles = ReturnType<typeof useStyles>;
const languageToJiraProject = new Map(Object.entries({
"PYTHON": "SONARPY",
"ABAP": "SONARABAP",
"CFAMILY": "CPP",
"JAVA": "SONARJAVA",
"COBOL": "SONARCOBOL",
"FLEX": "SONARFLEX",
"HTML": "SONARHTML",
"PHP": "SONARPHP",
"PLI": "SONARPLI",
"PLSQL": "SONARPLSQL",
"RPG": "SONARRPG",
"APEX": "SONARSLANG",
"RUBY": "SONARSLANG",
"KOTLIN": "SONARKT",
"SCALA": "SONARSLANG",
"GO": "SONARSLANG",
"SWIFT": "SONARSWIFT",
"TSQL": "SONARTSQL",
"VB6": "SONARVBSIX",
"XML": "SONARXML",
"CLOUDFORMATION": "SONARIAC",
"TERRAFORM": "SONARIAC",
'PYTHON': 'SONARPY',
'ABAP': 'SONARABAP',
'AZURE_RESOURCE_MANAGER': 'SONARIAC',
'CFAMILY': 'CPP',
'DART': 'DART',
'DOCKER': 'SONARIAC',
'JAVA': 'SONARJAVA',
'JCL': 'SONARJCL',
'COBOL': 'SONARCOBOL',
'FLEX': 'SONARFLEX',
'HTML': 'SONARHTML',
'PHP': 'SONARPHP',
'PLI': 'SONARPLI',
'PLSQL': 'PLSQL',
'RPG': 'SONARRPG',
'APEX': 'SONARAPEX',
'RUBY': 'SONARRUBY',
'RUST': 'SKUNK',
'KOTLIN': 'SONARKT',
'SCALA': 'SONARSCALA',
'GO': 'SONARGO',
'SECRETS': 'SONARTEXT',
'SWIFT': 'SONARSWIFT',
'TSQL': 'TSQL',
'VB6': 'VB6',
'XML': 'SONARXML',
'CLOUDFORMATION': 'SONARIAC',
'TERRAFORM': 'SONARIAC',
'KUBERNETES': 'SONARIAC',
'TEXT': 'SONARTEXT',
'ANSIBLE': 'SONARIAC',
}));
const languageToGithubProject = new Map(Object.entries({
"ABAP": "sonar-abap",
"CSHARP": "sonar-dotnet",
"VBNET": "sonar-dotnet",
"JAVASCRIPT": "SonarJS",
"TYPESCRIPT": "SonarJS",
"SWIFT": "sonar-swift",
"KOTLIN": "sonar-kotlin",
"GO": "slang-enterprise",
"SCALA": "slang-enterprise",
"RUBY": "slang-enterprise",
"APEX": "slang-enterprise",
"HTML": "sonar-html",
"COBOL": "sonar-cobol",
"VB6": "sonar-vb",
"JAVA": "sonar-java",
"PLI": "sonar-pli",
"CFAMILY": "sonar-cpp",
"CSS": "sonar-css",
"FLEX": "sonar-flex",
"PHP": "sonar-php",
"PLSQL": "sonar-plsql",
"PYTHON": "sonar-python",
"RPG": "sonar-rpg",
"TSQL": "sonar-tsql",
"XML": "sonar-xml",
"CLOUDFORMATION": "sonar-iac",
"TERRAFORM": "sonar-iac",
'ABAP': 'sonar-abap',
'AZURE_RESOURCE_MANAGER': 'sonar-iac',
'CSHARP': 'sonar-dotnet',
'DART': 'sonar-dart',
'DOCKER': 'sonar-iac',
'VBNET': 'sonar-dotnet',
'JAVASCRIPT': 'SonarJS',
'TYPESCRIPT': 'SonarJS',
'SWIFT': 'sonar-swift',
'KOTLIN': 'sonar-kotlin',
'GO': 'sonar-go',
'SCALA': 'sonar-scala',
'RUBY': 'sonar-ruby',
'RUST': 'sonar-rust',
'APEX': 'sonar-apex',
'HTML': 'sonar-html',
'COBOL': 'sonar-cobol',
'VB6': 'sonar-vb',
'JAVA': 'sonar-java',
'JCL': 'sonar-jcl',
'PLI': 'sonar-pli',
'CFAMILY': 'sonar-cpp',
'CSS': 'sonar-css',
'FLEX': 'sonar-flex',
'PHP': 'sonar-php',
'PLSQL': 'sonar-plsql',
'PYTHON': 'sonar-python',
'RPG': 'sonar-rpg',
'TSQL': 'sonar-tsql',
'XML': 'sonar-xml',
'CLOUDFORMATION': 'sonar-iac',
'TERRAFORM': 'sonar-iac',
'KUBERNETES': 'sonar-iac',
'SECRETS': 'sonar-text',
'TEXT': 'sonar-text',
'ANSIBLE': 'sonar-iac-enterprise',
}));
function ticketsAndImplementationPRsLinks(ruleNumber: string, title: string, language?: string) {
@ -109,6 +222,7 @@ function ticketsAndImplementationPRsLinks(ruleNumber: string, title: string, lan
const upperCaseLanguage = language.toUpperCase();
const jiraProject = languageToJiraProject.get(upperCaseLanguage);
const githubProject = languageToGithubProject.get(upperCaseLanguage);
const titleWihoutQuotes = title.replace(/"/g, "'");
const implementationPRsLink = (
<Link href={`https://github.com/SonarSource/${githubProject}/pulls?q=is%3Apr+"S${ruleNumber}"+OR+"RSPEC-${ruleNumber}"`}>
@ -118,7 +232,7 @@ function ticketsAndImplementationPRsLinks(ruleNumber: string, title: string, lan
if (jiraProject !== undefined) {
const ticketsLink = (
<Link href={`https://jira.sonarsource.com/issues/?jql=project%20%3D%20${jiraProject}%20AND%20(text%20~%20%22S${ruleNumber}%22%20OR%20text%20~%20%22RSPEC-${ruleNumber}%22%20OR%20text%20~%20"${title}")`}>
<Link href={`https://jira.sonarsource.com/issues/?jql=project%20%3D%20${jiraProject}%20AND%20(text%20~%20%22S${ruleNumber}%22%20OR%20text%20~%20%22RSPEC-${ruleNumber}%22%20OR%20text%20~%20"${titleWihoutQuotes}")`}>
Implementation tickets on Jira
</Link>
);
@ -138,10 +252,133 @@ function ticketsAndImplementationPRsLinks(ruleNumber: string, title: string, lan
}
}
const RuleThemeProvider: React.FC = ({ children }) => {
useStyles();
return <ThemeProvider theme={theme}>{children}</ThemeProvider>;
}
interface PageMetadata {
title: string;
languagesTabs: JSX.Element[] | null;
avoid: boolean;
prUrl: string | undefined;
branch: string;
coverage: Coverage;
isInQualityProfile: boolean;
jsonString: string | undefined;
}
function usePageMetadata(ruleid: string, language: string, classes: UsedStyles): PageMetadata {
const metadataUrl = `${process.env.PUBLIC_URL}/rules/${ruleid}/${language ?? 'default'}-metadata.json`;
let [metadataJSON, metadataError, metadataIsLoading] = useFetch<RuleMetadata>(metadataUrl);
let coverage: Coverage = 'Loading...';
let title = 'Loading...';
let avoid = false;
let isInQualityProfile = false;
let metadataJSONString;
let languagesTabs = null;
let prUrl: string | undefined = undefined;
let branch = 'master';
const { ruleCoverage, allLangsRuleCoverage, ruleStateInAnalyzer } = useRuleCoverage();
if (metadataJSON && !metadataIsLoading && !metadataError) {
title = metadataJSON.title;
if ('prUrl' in metadataJSON) {
prUrl = metadataJSON.prUrl;
}
branch = metadataJSON.branch;
metadataJSON.languagesSupport.sort((a, b) => a.name.localeCompare(b.name));
const ruleStates = metadataJSON.languagesSupport.map(({ name, status }) => ({
name,
ruleState: ruleStateInAnalyzer(name, metadataJSON!.allKeys, status)
}));
languagesTabs = ruleStates.map(({ name, ruleState }) => {
const classNames = classes.tab + ' ' + (classes as any)[ruleState + 'Tab'];
return <Tab key={name} label={name} value={name} className={classNames} />;
});
avoid = !ruleStates.some(({ ruleState }) => ruleState === 'covered' || ruleState === 'targeted');
metadataJSONString = JSON.stringify(metadataJSON, null, 2);
const coverageMapper = (key: string, range: Version ): JSX.Element => {
if (typeof range === 'string') {
return (
<li key={key} >{key}: {range}</li>
);
} else {
return (
<li key={key} >Not covered for {key} anymore. Was covered from {range.since} to {range.until}.</li>
);
}
};
if (language) {
coverage = ruleCoverage(language, metadataJSON.allKeys, coverageMapper);
} else {
coverage = allLangsRuleCoverage(metadataJSON.allKeys, coverageMapper);
}
isInQualityProfile = metadataJSON.defaultQualityProfiles.length > 0;
}
if (coverage !== 'Not Covered') {
prUrl = undefined;
branch = 'master';
}
return {
title,
languagesTabs,
avoid,
prUrl,
branch,
coverage,
isInQualityProfile,
jsonString: metadataJSONString
};
}
function getRspecPath(rspecId: string, language?: string) {
return '/rspec#/rspec/' + rspecId;
}
function useDescription(metadata: PageMetadata, ruleid: string, language?: string) {
const editOnGithubUrl =
`https://github.com/SonarSource/rspec/blob/${metadata.branch}/rules/${ruleid}${language ? '/' + language : ''}`;
function htmlReplacement(domNode: Element) {
if (domNode.name === 'a' && domNode.attribs?.['data-rspec-id']) {
const props = attributesToProps(domNode.attribs);
return <a href={getRspecPath(domNode.attribs['data-rspec-id'], language)} {...props}>
{domToReact(domNode.children)}
</a>;
}
if (domNode.name === 'code' && domNode.attribs?.['data-lang']) {
return <Highlight className={domNode.attribs['data-lang']}>
{domToReact(domNode.children)}
</Highlight>;
}
return undefined; // No modification.
}
const descUrl = `${process.env.PUBLIC_URL}/rules/${ruleid}/${language ?? 'default'}-description.html`;
const [descHTML, descError, descIsLoading] = useFetch<string>(descUrl, false);
if (descHTML !== null && !descIsLoading && !descError) {
return <div>
{parse(descHTML, { replace: (d: DOMNode) => htmlReplacement(d as Element) })}
<hr />
<a href={editOnGithubUrl}>Edit on Github</a><br />
<hr />
<Highlight className='json'>{metadata.jsonString}</Highlight>
</div>;
}
return <div>Loading...</div>;
}
export function RulePage(props: any) {
const ruleid = props.match.params.ruleid;
// language can be absent
const language = props.match.params.language;
const {ruleid, language} = props.match.params;
document.title = ruleid;
const history = useHistory();
@ -150,59 +387,15 @@ export function RulePage(props: any) {
}
const classes = useStyles();
let branch = 'master'
let descUrl = process.env.PUBLIC_URL + '/rules/' + ruleid + "/" + (language ?? "default") + "-description.html";
let metadataUrl = process.env.PUBLIC_URL + '/rules/' + ruleid + "/" + (language ?? "default") + "-metadata.json";
const metadata = usePageMetadata(ruleid, language, classes);
const description = useDescription(metadata, ruleid, language);
let [descHTML, descError, descIsLoading] = useFetch<string>(descUrl, false);
let [metadataJSON, metadataError, metadataIsLoading] = useFetch<RuleMetadata>(metadataUrl);
const {ruleCoverage, allLangsRuleCoverage} = useRuleCoverage();
let coverage: any = "Loading...";
let title = "Loading..."
let metadataJSONString;
let languagesTabs = null;
let prUrl: string | undefined = undefined;
if (metadataJSON && !metadataIsLoading && !metadataError) {
title = metadataJSON.title;
if ('prUrl' in metadataJSON) {
prUrl = metadataJSON.prUrl;
}
branch = metadataJSON.branch;
metadataJSON.all_languages.sort();
languagesTabs = metadataJSON.all_languages.map(lang => <Tab label={lang} value={lang}/>);
metadataJSONString = JSON.stringify(metadataJSON, null, 2);
const coverageMapper = (key: any, version: any) => {
return (
<li>{key}: {version}</li>
)
};
if (language) {
coverage = ruleCoverage(language, metadataJSON.allKeys, coverageMapper);
} else {
coverage = allLangsRuleCoverage(metadataJSON.allKeys, coverageMapper);
}
}
let editOnGithubUrl = 'https://github.com/SonarSource/rspec/blob/' +
branch + '/rules/' + ruleid + (language ? '/' + language : '');
let description = <div>Loading...</div>;
if (descHTML !== null && !descIsLoading && !descError) {
description = <div>
<div dangerouslySetInnerHTML={{__html: descHTML}}/>
<hr />
<a href={editOnGithubUrl}>Edit on Github</a><br/>
<hr />
<pre>{metadataJSONString}</pre>
</div>;
}
let prLink = <></>;
if (prUrl) {
prLink = <div><span className={classes.unimplemented}>Not implemented (see <a href={prUrl}>PR</a>)</span></div>
if (metadata.prUrl) {
prLink = <div>
<span className={classes.unimplemented}>Not implemented (see <a href={metadata.prUrl}>PR</a>)</span>
</div>;
}
const ruleNumber = ruleid.substring(1);
@ -212,60 +405,66 @@ export function RulePage(props: any) {
</Link>
);
const {ticketsLink, implementationPRsLink} = ticketsAndImplementationPRsLinks(ruleNumber, title, language);
const {ticketsLink, implementationPRsLink} = ticketsAndImplementationPRsLinks(ruleNumber, metadata.title, language);
const tabsValue = language ? {'value' : language} : {'value': false};
return (
<div>
<div className={classes.ruleBar}>
<Container>
<Typography variant="h2" classes={{root: classes.ruleid}}>{ruleid}</Typography>
<Typography variant="h4" classes={{root: classes.ruleid}}>{prLink}</Typography>
<Tabs
{...tabsValue}
onChange={handleLanguageChange}
indicatorColor="primary"
textColor="primary"
centered
variant="scrollable"
scrollButtons="auto"
classes={{ root: classes.tabRoot, scroller: classes.tabScroller }}
>
{languagesTabs}
</Tabs>
</Container>
<div className={classes.ruleBar}>
<Container>
<Typography variant="h2" classes={{ root: classes.ruleid }}>
<Link className={`${classes.ruleidLink} ${metadata.avoid ? classes.avoid : ''}`}
component={RouterLink} to={`/${ruleid}`} underline="none">{ruleid}</Link>
</Typography>
<Typography variant="h4" classes={{ root: classes.ruleid }}>{prLink}</Typography>
<Tabs
{...tabsValue}
onChange={handleLanguageChange}
indicatorColor="primary"
textColor="primary"
variant="scrollable"
scrollButtons="auto"
classes={{ root: classes.tabRoot, scroller: classes.tabScroller }}
>
{metadata.languagesTabs}
</Tabs>
</Container>
</div>
<RuleThemeProvider>
<Container maxWidth="md">
<h1>
{metadata.isInQualityProfile ? <></> : <><Tooltip title="Not in any Quality Profile"><VisibilityOffOutlinedIcon /></Tooltip> </>}
{metadata.title}
</h1>
<hr />
<Box className={classes.coverage}>
<h2>Covered Since</h2>
<ul>
{metadata.coverage}
</ul>
</Box>
<Box className={classes.coverage}>
<h2>Related Tickets and Pull Requests</h2>
<ul>
{specificationPRsLink}
</ul>
<ul>
{implementationPRsLink}
</ul>
<ul>
{ticketsLink}
</ul>
</Box>
<Box>
<Typography component={'span'} className={classes.description}>
{description}
</Typography>
</Box>
</Container>
</RuleThemeProvider>
</div>
<Container maxWidth="md">
<Typography variant="h3" classes={{root: classes.title}}>{title}</Typography>
<Box className={classes.coverage}>
<Typography variant="h4" >Covered Since</Typography>
<ul>
{coverage}
</ul>
</Box>
<Box className={classes.coverage}>
<Typography variant="h4" >Related Tickets and Pull Requests</Typography>
<ul>
{specificationPRsLink}
</ul>
<ul>
{implementationPRsLink}
</ul>
<ul>
{ticketsLink}
</ul>
</Box>
<Box>
<Typography variant="h4">Description</Typography>
<Typography className={classes.description}>
{description}
</Typography>
</Box>
</Container>
</div>
);
}

View File

@ -5,11 +5,19 @@ import Typography from '@material-ui/core/Typography';
import Card from '@material-ui/core/Card';
import CardContent from '@material-ui/core/CardContent';
import Chip from '@material-ui/core/Chip';
import Table from '@material-ui/core/Table';
import TableBody from '@material-ui/core/TableBody';
import TableCell from '@material-ui/core/TableCell';
import TableContainer from '@material-ui/core/TableContainer';
import TableRow from '@material-ui/core/TableRow';
import { Link as RouterLink } from 'react-router-dom';
import { Link } from '@material-ui/core';
import { IndexedRule } from './types/IndexStore';
import { RULE_STATE, useRuleCoverage } from './utils/useRuleCoverage';
const CHIP_V_MARGIN = 0.5;
const TABLE_PADDING = 1;
const useStyles = makeStyles((theme) => ({
searchHit: {
@ -20,15 +28,99 @@ const useStyles = makeStyles((theme) => ({
flexDirection: 'row',
justifyContent: 'space-between'
},
// languages: {
// },
avoid: {
textDecoration: 'line-through'
},
language: {
marginRight: theme.spacing(1),
marginTop: theme.spacing(2),
},
unimplementedMarker: {
coveredLanguageChip: {
marginRight: theme.spacing(1),
marginTop: theme.spacing(2)
marginTop: theme.spacing(CHIP_V_MARGIN),
marginBottom: theme.spacing(CHIP_V_MARGIN),
backgroundColor: RULE_STATE['covered'].color,
'&:hover, &:focus': {
backgroundColor: RULE_STATE['covered'].darker
},
},
targetedLanguageChip: {
marginRight: theme.spacing(1),
marginTop: theme.spacing(CHIP_V_MARGIN),
marginBottom: theme.spacing(CHIP_V_MARGIN),
color: RULE_STATE['targeted'].color,
borderColor: RULE_STATE['targeted'].color,
'&:hover, &:focus': {
color: RULE_STATE['targeted'].darker,
borderColor: RULE_STATE['covered'].darker,
},
},
removedLanguageChip: {
marginRight: theme.spacing(1),
marginTop: theme.spacing(CHIP_V_MARGIN),
marginBottom: theme.spacing(CHIP_V_MARGIN),
backgroundColor: RULE_STATE['removed'].color,
'&:hover, &:focus': {
backgroundColor: RULE_STATE['removed'].darker
},
},
deprecatedLanguageChip: {
marginRight: theme.spacing(1),
marginTop: theme.spacing(CHIP_V_MARGIN),
marginBottom: theme.spacing(CHIP_V_MARGIN),
backgroundColor: RULE_STATE['deprecated'].color,
'&:hover, &:focus': {
backgroundColor: RULE_STATE['deprecated'].darker
},
},
closedLanguageChip: {
marginRight: theme.spacing(1),
marginTop: theme.spacing(CHIP_V_MARGIN),
marginBottom: theme.spacing(CHIP_V_MARGIN),
backgroundColor: RULE_STATE['closed'].color,
'&:hover, &:focus': {
backgroundColor: RULE_STATE['closed'].darker
},
},
coveredTitle: {
borderColor: RULE_STATE['covered'].color,
padding: theme.spacing(TABLE_PADDING)
},
coveredMarker: {
padding: theme.spacing(TABLE_PADDING),
width: '100%'
},
targetedTitle: {
borderColor: RULE_STATE['covered'].color,
padding: theme.spacing(TABLE_PADDING)
},
targetedMarker: {
padding: theme.spacing(TABLE_PADDING),
width: '100%'
},
removedTitle: {
borderColor: RULE_STATE['removed'].color,
padding: theme.spacing(TABLE_PADDING)
},
removedMarker: {
padding: theme.spacing(TABLE_PADDING),
width: '100%'
},
deprecatedTitle: {
borderColor: RULE_STATE['deprecated'].color,
padding: theme.spacing(TABLE_PADDING)
},
deprecatedMarker: {
padding: theme.spacing(TABLE_PADDING),
width: '100%'
},
closedTitle: {
borderColor: RULE_STATE['closed'].color,
padding: theme.spacing(TABLE_PADDING)
},
closedMarker: {
padding: theme.spacing(TABLE_PADDING),
width: '100%'
}
}));
@ -37,37 +129,112 @@ type SearchHitProps = {
}
export function SearchHit(props: SearchHitProps) {
const { ruleStateInAnalyzer } = useRuleCoverage();
const classes = useStyles();
const languages = props.data.languages.map(lang => (
<Chip
classes={{root: classes.language}}
label={lang}
color="primary"
/>
));
const coveredLanguages: JSX.Element[] = [];
const targetedLanguages: JSX.Element[] = [];
const removedLanguages: JSX.Element[] = [];
const deprecatedLanguages: JSX.Element[] = [];
const closedLanguages: JSX.Element[] = [];
const actualLanguages = props.data.supportedLanguages.filter(l => l.name !== 'default');
const ruleStates = actualLanguages.map(l => ({
lang: l.name,
ruleState: ruleStateInAnalyzer(l.name, props.data.all_keys, l.status)
}));
ruleStates.forEach(({lang, ruleState}) => {
const chip = <Link key={lang} component={RouterLink} to={`/${props.data.id}/${lang}`}
style={{ textDecoration: 'none' }}>
<Chip
classes={{root: (classes as any)[ruleState + 'LanguageChip']}}
label={lang}
color="primary"
variant={ruleState === 'targeted' ? 'outlined' : 'default'}
clickable
key="{lang}"
/>
</Link>;
switch(ruleState) {
case 'targeted':
targetedLanguages.push(chip);
break;
case 'removed':
removedLanguages.push(chip);
break;
case 'deprecated':
deprecatedLanguages.push(chip);
break;
case 'closed':
closedLanguages.push(chip);
break;
case 'covered':
default:
coveredLanguages.push(chip);
break;
}
});
const avoid = !ruleStates.some(({ ruleState }) => ruleState === 'targeted' || ruleState === 'covered');
const titles = props.data.titles.map(title => (
<Typography variant="body1" component="p" gutterBottom>
<Typography key={title} variant="body1" component="p" gutterBottom>
{title}
</Typography>
));
let unimplementedMarker = <></>;
if (props.data.prUrl) {
unimplementedMarker = <Chip classes={{root: classes.unimplementedMarker}} label="Not implemented" color="secondary" />
}
const coveredRow = coveredLanguages.length === 0 ? <></>
: <TableRow>
<TableCell classes={{ root: classes.coveredTitle }}>Covered</TableCell>
<TableCell classes={{ root: classes.coveredMarker }}>{coveredLanguages}</TableCell>
</TableRow>;
const targetedRow = targetedLanguages.length === 0 ? <></>
: <TableRow>
<TableCell classes={{ root: classes.targetedTitle }}>Targeted</TableCell>
<TableCell classes={{ root: classes.targetedMarker }}>{targetedLanguages}</TableCell>
</TableRow>;
const deprecatedRow = deprecatedLanguages.length === 0 ? <></>
: <TableRow>
<TableCell classes={{ root: classes.deprecatedTitle }}>Deprecated</TableCell>
<TableCell classes={{ root: classes.deprecatedMarker }}>{deprecatedLanguages}</TableCell>
</TableRow>;
const removedRow = removedLanguages.length === 0 ? <></>
: <TableRow>
<TableCell classes={{ root: classes.removedTitle }}>Removed</TableCell>
<TableCell classes={{ root: classes.removedMarker }}>{removedLanguages}</TableCell>
</TableRow>;
const closedRow = closedLanguages.length === 0 ? <></>
: <TableRow>
<TableCell classes={{ root: classes.closedTitle }}>Closed</TableCell>
<TableCell classes={{ root: classes.closedMarker }}>{closedLanguages}</TableCell>
</TableRow>;
return (
<Link component={RouterLink} to={`/${props.data.id}/${props.data.languages[0]}`}>
<Card variant="outlined" classes={{root: classes.searchHit}}>
<Card variant="outlined" classes={{ root: classes.searchHit }}>
<CardContent>
<Typography classes={{root: classes.ruleid}} variant="h5" component="h5" gutterBottom>
<div> Rule {props.data.id} </div>
{unimplementedMarker}
<Typography key="rule-id" classes={{ root: `${classes.ruleid} ${avoid ? classes.avoid : ''}` }}
variant="h5" component="h5" gutterBottom>
<Link component={RouterLink} to={`/${props.data.id}`} data-testid={`search-hit-${props.data.id}`}>
<div> Rule {props.data.id} </div>
</Link>
</Typography>
{titles}
<Typography variant="body2" component="p" classes={{root: classes.language}}>
{languages}
</Typography>
<TableContainer>
<Table >
<TableBody>
{coveredRow}
{targetedRow}
{removedRow}
{deprecatedRow}
{closedRow}
</TableBody>
</Table>
</TableContainer>
</CardContent>
</Card>
</Link>
)
}

View File

@ -11,7 +11,7 @@ export default makeStyles((theme) => ({
searchBar: {
// backgroundColor: 'white'
borderBottom: '1px solid lightgrey',
paddingBottom: theme.spacing(2),
paddingBottom: theme.spacing(1),
},
searchResults: {
marginTop: theme.spacing(3),
@ -23,5 +23,9 @@ export default makeStyles((theme) => ({
},
resultsCount: {
marginBottom: theme.spacing(2),
},
fullWidth: {
maxWidth: '120%',
flexBasis: '120%'
}
}));

View File

@ -1,4 +1,4 @@
import React from 'react';
import React, { KeyboardEvent } from 'react';
import Typography from '@material-ui/core/Typography';
import TextField from '@material-ui/core/TextField';
@ -17,14 +17,31 @@ import {
useLocationSearchState
} from './utils/routing';
import { SearchHit } from './SearchHit';
import { IndexAggregates } from './types/IndexStore'
import { IndexedRule, IndexAggregates } from './types/IndexStore';
import { useHistory } from 'react-router-dom';
function correctResultsOrder(results: IndexedRule[], query: string): IndexedRule[] {
const upperCaseQuery = query.toLocaleUpperCase();
const reorderedResults: IndexedRule[] = [];
results.forEach(indexedRule => {
if (indexedRule.all_keys.includes(upperCaseQuery)) {
reorderedResults.unshift(indexedRule);
} else {
reorderedResults.push(indexedRule);
}
});
return reorderedResults;
}
export const SearchPage = () => {
document.title = "Search"
document.title = 'Search';
const classes = useStyles();
const pageSize = 20;
const [query, setQuery] = useLocationSearchState('query', '');
const history = useHistory();
const [ruleType, setRuleType] = useLocationSearchState('types', 'ANY');
const allRuleTypes: Record<string,string> = {
@ -62,16 +79,13 @@ export const SearchPage = () => {
allQualityProfiles = Object.keys(aggregatesData.qualityProfiles).sort();
}
let resultsDisplay: string|JSX.Element[] = "No rule found...";
let resultsDisplay: string|JSX.Element[] = 'No rule found...';
if (loading) {
resultsDisplay = "Searching";
}
else if (results.length > 0) {
resultsDisplay = results.map(result =>
<Box className={classes.searchHitBox}>
<SearchHit key={result.id} data={result}/>
</Box>
)
resultsDisplay = 'Searching';
} else if (results.length > 0) {
resultsDisplay = correctResultsOrder(results, query).map(indexedRule => <Box key={indexedRule.id} className={classes.searchHitBox}>
<SearchHit key={indexedRule.id} data={indexedRule}/>
</Box>);
}
const paramSetters: Record<string, SearchParamSetter<any>> = {
@ -94,141 +108,160 @@ export const SearchPage = () => {
}
}
}
function handleKeyup(event: KeyboardEvent<HTMLInputElement>) {
if (event.key === 'Enter') {
const query = (event.target as HTMLTextAreaElement).value;
if (/^(S|RSPEC-?)?\d{3,}$/i.exec(query)) {
if (0 < results.length) {
history.push(correctResultsOrder(results, query)[0].id);
}
} else if (1 === results.length) {
history.push(results[0].id);
}
}
}
return (
<div className={classes.root}>
<div className={classes.searchBar}>
<Container maxWidth="md">
<Grid container spacing={3}>
<Grid item xs={12}>
<Typography variant="h4">Search Rule Specifications</Typography>
</Grid>
<Grid item xs={12}>
<TextField
id="title-query"
label="Rule Title and Description"
placeholder="Search in rule titles and descriptions"
fullWidth
margin="normal"
InputLabelProps={{
shrink: true,
}}
variant="outlined"
value={query}
onChange={handleUpdate('query')}
error={!!error}
helperText={error}
/>
</Grid>
<Grid item xs={3}>
<TextField
select
fullWidth
margin="normal"
variant="outlined"
label="Rule type"
value={ruleType}
onChange={handleUpdate('types')}
>
<MenuItem key="Any" value="ANY">
Any
</MenuItem>
{Object.keys(allRuleTypes).map((ruleType) => (
<MenuItem key={ruleType} value={ruleType}>
{allRuleTypes[ruleType]}
</MenuItem>
))}
</TextField>
</Grid>
<Grid item xs={5}>
<TextField
select
fullWidth
SelectProps={{
multiple: true,
renderValue: (selected: any) => {
return selected.join(', ');
}
}}
margin="normal"
variant="outlined"
label="Rule Tags"
value={ruleTags}
onChange={handleUpdate('tags')}
>
{allRuleTags.map((ruleTag) => (
<MenuItem key={ruleTag} value={ruleTag}>
{ruleTag}
</MenuItem>
))}
</TextField>
</Grid>
<Grid item xs={4}>
<TextField
select
fullWidth
margin="normal"
variant="outlined"
label="Language"
value={ruleLang}
onChange={handleUpdate('lang')}
>
<MenuItem key="Any" value="ANY">
Any
</MenuItem>
{allLangs.map((lang) => (
<MenuItem key={lang} value={lang}>
{lang}
</MenuItem>
))}
</TextField>
</Grid>
<Grid item xs={12}>
<TextField
select
fullWidth
SelectProps={{
multiple: true,
renderValue: (selected: any) => {
return selected.join(', ');
}
}}
margin="normal"
variant="outlined"
label="Default Quality Profiles"
value={qualityProfiles}
onChange={handleUpdate('qualityProfiles')}
>
{allQualityProfiles.map((qualityProfile) => (
<MenuItem key={qualityProfile} value={qualityProfile}>
{qualityProfile}
</MenuItem>
))}
</TextField>
</Grid>
</Grid>
</Container>
</div>
<div className={classes.searchResults}>
<Container maxWidth="md">
<Grid container spacing={3}>
<Grid item xs={12}>
<Box className={classes.topRow}>
<Box className={classes.resultsCount}>
<Typography variant="subtitle1">Number of rules found: {numberOfHits}</Typography>
</Box>
<Typography variant="subtitle1">
<a href={"https://github.com/SonarSource/rspec/pulls?q=is%3Aopen+is%3Apr+%22Create+rule%22+" + query}>Search in unimplemented</a>
</Typography>
</Box>
{resultsDisplay}
<Pagination count={totalPages} page={pageNumber} siblingCount={2}
onChange={(event, value) => setPageNumber(value)}
/>
</Grid>
</Grid>
</Container>
</div>
</div>
<div className={classes.searchBar}>
<Container maxWidth="md">
<Grid container>
<Grid item xs={12}>
<TextField
id="title-query"
label="Rule Title and Description"
placeholder="Search in rule titles and descriptions"
fullWidth
margin="normal"
InputLabelProps={{
shrink: true,
}}
variant="outlined"
value={query}
onChange={handleUpdate('query')}
onKeyUp={handleKeyup}
error={!!error}
helperText={error}
autoFocus
/>
</Grid>
<Grid item xs={12} container spacing={3} className={classes.fullWidth}>
<Grid item xs={3}>
<TextField
select
fullWidth
margin="normal"
variant="outlined"
size="small"
label="Rule type"
value={ruleType}
onChange={handleUpdate('types')}
data-testid="rule-type"
>
<MenuItem key="Any" value="ANY">
Any
</MenuItem>
{Object.keys(allRuleTypes).map((ruleType) => (
<MenuItem key={ruleType} value={ruleType} data-testid={`rule-type-${ruleType}`}>
{allRuleTypes[ruleType]}
</MenuItem>
))}
</TextField>
</Grid>
<Grid item xs={5}>
<TextField
select
fullWidth
size="small"
SelectProps={{
multiple: true,
renderValue: (selected: any) => {
return selected.join(', ');
}
}}
margin="normal"
variant="outlined"
label="Rule Tags"
value={ruleTags}
onChange={handleUpdate('tags')}
data-testid="rule-tags"
>
{allRuleTags.map((ruleTag) => (
<MenuItem key={ruleTag} value={ruleTag} data-testid={`rule-tag-${ruleTag}`}>
{ruleTag}
</MenuItem>
))}
</TextField>
</Grid>
<Grid item xs={4}>
<TextField
select
fullWidth
margin="normal"
size="small"
variant="outlined"
label="Language"
value={allLangs.length === 0 ? '' : ruleLang}
onChange={handleUpdate('lang')}
data-testid="rule-language"
>
<MenuItem key="Any" value="ANY">
Any
</MenuItem>
{allLangs.map((lang) => (
<MenuItem key={lang} value={lang} data-testid={`rule-language-${lang}`}>
{lang}
</MenuItem>
))}
</TextField>
</Grid>
</Grid>
<Grid item xs={12}>
<TextField
select
fullWidth
size="small"
SelectProps={{
multiple: true,
renderValue: (selected: any) => {
return selected.join(', ');
}
}}
margin="normal"
variant="outlined"
label="Default Quality Profiles"
value={qualityProfiles}
onChange={handleUpdate('qualityProfiles')}
data-testid="rule-default-quality-profile"
>
{allQualityProfiles.map((qualityProfile) => (
<MenuItem key={qualityProfile} value={qualityProfile}
data-testid={`rule-qual-profile-${qualityProfile}`}>
{qualityProfile}
</MenuItem>
))}
</TextField>
</Grid>
</Grid>
</Container>
</div>
<div className={classes.searchResults}>
<Container maxWidth="md">
<Grid container spacing={3}>
<Grid item xs={12}>
<Box key="total-num" className={classes.topRow}>
<Box className={classes.resultsCount}>
<Typography variant="subtitle1">Number of rules found: {numberOfHits}</Typography>
</Box>
</Box>
{resultsDisplay}
<Pagination count={totalPages} page={pageNumber} siblingCount={2}
onChange={(event, value) => setPageNumber(value)}
/>
</Grid>
</Grid>
</Container>
</div>
</div>
)
}

View File

@ -4,11 +4,15 @@ export default makeStyles((theme) => ({
root: {
flexGrow: 1,
marginBottom: '13px', // Quickfix. For some reason the topbar overlaps on the content.
backgroundColor: '#c72b28',
},
menuButton: {
homeButton: {
marginRight: theme.spacing(2),
},
title: {
flexGrow: 1,
},
unimplemented: {
color: '#FFFFFF',
},
}));

View File

@ -4,7 +4,7 @@ import Toolbar from '@material-ui/core/Toolbar';
import Typography from '@material-ui/core/Typography';
import IconButton from '@material-ui/core/IconButton';
import Button from '@material-ui/core/Button';
import MenuIcon from '@material-ui/icons/Menu';
import HomeIcon from '@material-ui/icons/Home';
import useStyles from './TopBar.style';
@ -14,17 +14,15 @@ export default function TopBar() {
return (
<AppBar position="static" className={classes.root}>
<Toolbar>
<IconButton edge="start" className={classes.menuButton} color="inherit" aria-label="menu">
<MenuIcon />
<IconButton edge="start" className={classes.homeButton} color="inherit" aria-label="menu" href="/rspec">
<HomeIcon />
</IconButton>
<Typography variant="h6" className={classes.title}>
SonarSource Rule Specifications
</Typography>
<a href="https://github.com/SonarSource/rspec/pulls?q=is%3Aopen+is%3Apr+%22Create+rule%22">
<Button>
<span> Unimplemented rules </span>
<Button href="https://github.com/SonarSource/rspec/pulls?q=is%3Aopen+is%3Apr+%22Create+rule%22">
<span className={classes.unimplemented} > Rules under specification </span>
</Button>
</a>
</Toolbar>
</AppBar>
);

View File

@ -0,0 +1,13 @@
import React from 'react';
import { render, screen } from '@testing-library/react';
import App from '../App';
beforeEach(() => {
window.history.pushState({}, 'RSPEC Search Page', '/rspec/#/rspec/');
});
test('renders see the GH PR link', () => {
const { getByText } = render(<App />);
const linkElement = getByText(/Rules under specification/i);
expect(linkElement).toBeInTheDocument();
});

View File

@ -0,0 +1,230 @@
import fs from 'fs';
import os from 'os';
import path from 'path';
import { Location, createMemoryHistory } from 'history';
import { render } from '@testing-library/react';
import { Router } from 'react-router-dom';
import { generateRulesDescription } from '../deployment/description';
import { generateRulesMetadata } from '../deployment/metadata';
import { createIndexFiles } from '../deployment/searchIndex';
import { createFiles } from '../deployment/testutils';
import { fetchMock, normalize, FetchResult } from '../testutils';
import { SearchPage } from '../SearchPage';
// The CI system is a bit slow. Increase timeout to avoid random failures.
jest.setTimeout(20000);
function readJson(filepath: string) {
const content = fs.readFileSync(filepath);
return JSON.parse(content.toString());
}
const Paths = {
src: '',
dst: '',
index: '',
store: '',
aggregates: '',
};
beforeAll(() => {
Paths.src = fs.mkdtempSync(path.join(os.tmpdir(), 'end-to-end-testing-src-'));
Paths.dst = fs.mkdtempSync(path.join(os.tmpdir(), 'end-to-end-testing-dst-'));
createFiles(Paths.src, {
'S100/rule.adoc': 'Generic content',
'S100/metadata.json': JSON.stringify({
title: 'Generic Rule S100 Title',
tags: ['confusing'],
type: 'CODE_SMELL',
defaultQualityProfiles: [
'Sonar way'
],
}),
'S100/java/rule.adoc': 'Java Content',
'S100/java/metadata.json': JSON.stringify({
title: 'Java Rule S100 Title',
status: 'ready',
}),
'S200/rule.adoc': 'Generic content',
'S200/metadata.json': JSON.stringify({
title: 'Generic Rule S200 Title',
tags: ['confusing'],
type: 'CODE_SMELL',
}),
'S200/python/rule.adoc': 'Python content',
'S200/python/metadata.json': JSON.stringify({
title: 'Python Rule S200 Title',
tags: ['pep8'],
status: 'ready',
}),
'S200/java/rule.adoc': 'Java Content',
'S200/java/metadata.json': JSON.stringify({
title: 'Java Rule S200 Title',
type: 'BUG',
status: 'ready',
}),
'S501/rule.adoc': 'Generic content, no active language',
'S501/metadata.json': JSON.stringify({
title: 'Rule S501 Rule is closed with no language-specific specification',
type: 'CODE_SMELL',
status: 'closed',
}),
});
generateRulesMetadata(Paths.src, Paths.dst);
generateRulesDescription(Paths.src, Paths.dst);
createIndexFiles(Paths.dst);
Paths.index = path.join(Paths.dst, 'rule-index.json');
Paths.store = path.join(Paths.dst, 'rule-index-store.json');
Paths.aggregates = path.join(Paths.dst, 'rule-index-aggregates.json');
expect(fs.existsSync(Paths.index)).toBeTruthy();
expect(fs.existsSync(Paths.store)).toBeTruthy();
expect(fs.existsSync(Paths.aggregates)).toBeTruthy();
});
afterAll(() => {
// FIXME replace with fs.rm(path, { recursive: true, force: true }) when upgrading node to 14.14 or later.
fs.rmdirSync(Paths.dst, { recursive: true });
fs.rmdirSync(Paths.src, { recursive: true });
});
beforeEach(() => {
const index = readJson(Paths.index);
const indexStore = readJson(Paths.store);
const indexAggregates = readJson(Paths.aggregates);
const rootUrl = process.env.PUBLIC_URL;
const mockUrls = {} as Record<string, FetchResult>;
mockUrls[`${rootUrl}/rules/rule-index.json`] = { json: normalize(index) };
mockUrls[`${rootUrl}/rules/rule-index-store.json`] = { json: normalize(indexStore) };
mockUrls[`${rootUrl}/rules/rule-index-aggregates.json`] = { json: normalize(indexAggregates) };
mockUrls[`${rootUrl}/covered_rules.json`] = {
json: {
'JAVA': { 'S100': 'ver1', 'S200': 'ver2' },
'PY': { 'S200': 'ver1' },
}
};
jest.spyOn(global, 'fetch').mockImplementation(fetchMock(mockUrls));
});
afterEach(() => {
(global.fetch as any).mockClear();
});
const defaultUseLocation = jest.requireActual('react-router-dom').useLocation;
let fakeLocation: Location | undefined = undefined;
function mockUseLocation() {
return fakeLocation ?? defaultUseLocation();
}
jest.mock('react-router-dom', () => ({
...jest.requireActual('react-router-dom') as {},
useLocation: mockUseLocation,
}));
beforeEach(() => {
fakeLocation = undefined;
});
function generateFakeLocation(search: string): Location {
return {
pathname: '/somepath',
search: search,
state: null,
hash: 'somehash',
key: undefined,
};
}
const history = createMemoryHistory();
describe('The main search page display correct results', () => {
test('Empty query', async () => {
expect(fakeLocation).toBeUndefined();
const { findByText, findAllByText } = render(<Router history={history} > <SearchPage /></Router >);
expect(await findAllByText(/Rule Title and Description/)).toHaveLength(1 + 1); // <label> + <span>
await findByText(/Number of rules found: 3\b/);
await findByText(/Java Rule S100 Title/);
await findByText(/Python Rule S200 Title/);
await findByText(/Java Rule S200 Title/);
await findByText(/Rule S501 Rule is closed with no language-specific specification/);
});
test('Query by title: Java.', async () => {
fakeLocation = generateFakeLocation('query=Java');
const { findByText, findAllByText } = render(<Router history={history}> <SearchPage /></Router >);
expect(await findAllByText(/Rule Title and Description/)).toHaveLength(1 + 1); // <label> + <span>
await findByText(/Number of rules found: 2/);
await findByText(/Java Rule S100 Title/);
await findByText(/Python Rule S200 Title/);
await findByText(/Java Rule S200 Title/);
});
test('Query by title: S501.', async () => {
fakeLocation = generateFakeLocation('query=S501');
const { findByText, findAllByText } = render(<Router history={history}> <SearchPage /></Router >);
expect(await findAllByText(/Rule Title and Description/)).toHaveLength(1 + 1); // <label> + <span>
await findByText(/Number of rules found: 1/);
await findByText(/Rule S501 Rule is closed with no language-specific specification/);
});
test('Query by type: BUG', async () => {
fakeLocation = generateFakeLocation('types=BUG');
const { findByText, findAllByText } = render(<Router history={history}> <SearchPage /></Router >);
expect(await findAllByText(/Rule Title and Description/)).toHaveLength(1 + 1); // <label> + <span>
await findByText(/Number of rules found: 1/);
await findByText(/Python Rule S200 Title/);
await findByText(/Java Rule S200 Title/);
});
test('Query by type: VULNERABILITY', async () => {
fakeLocation = generateFakeLocation('types=VULNERABILITY');
const { findByText, findAllByText } = render(<Router history={history}> <SearchPage /></Router >);
expect(await findAllByText(/Rule Title and Description/)).toHaveLength(1 + 1); // <label> + <span>
await findByText(/Number of rules found: 0/);
});
test('Query by tag: confusing', async () => {
fakeLocation = generateFakeLocation('tags=confusing');
const { findByText, findAllByText } = render(<Router history={history}> <SearchPage /></Router >);
expect(await findAllByText(/Rule Title and Description/)).toHaveLength(1 + 1); // <label> + <span>
await findByText(/Number of rules found: 2/);
await findByText(/Java Rule S100 Title/);
await findByText(/Python Rule S200 Title/);
await findByText(/Java Rule S200 Title/);
});
test('Query by tag: confusing & pep8', async () => {
fakeLocation = generateFakeLocation('tags=confusing,pep8');
const { findByText, findAllByText } = render(<Router history={history}> <SearchPage /></Router >);
expect(await findAllByText(/Rule Title and Description/)).toHaveLength(1 + 1); // <label> + <span>
await findByText(/Number of rules found: 1/);
await findByText(/Python Rule S200 Title/);
await findByText(/Java Rule S200 Title/);
});
test('Query by language: python', async () => {
fakeLocation = generateFakeLocation('lang=python');
const { findByText, findAllByText } = render(<Router history={history}> <SearchPage /></Router >);
expect(await findAllByText(/Rule Title and Description/)).toHaveLength(1 + 1); // <label> + <span>
await findByText(/Number of rules found: 1/);
await findByText(/Python Rule S200 Title/);
await findByText(/Java Rule S200 Title/);
});
test('Advanced query', async () => {
fakeLocation = generateFakeLocation('qualityProfiles=Sonar way&query=Java&tags=confusing');
const { findByText, findAllByText } = render(<Router history={history}> <SearchPage /></Router >);
expect(await findAllByText(/Rule Title and Description/)).toHaveLength(1 + 1); // <label> + <span>
await findByText(/Number of rules found: 1/);
await findByText(/Java Rule S100 Title/);
});
});

View File

@ -0,0 +1,95 @@
import React from 'react';
import fs from 'fs';
import path from 'path';
import { render } from '@testing-library/react';
import { RulePage } from '../RulePage';
import { Router } from 'react-router-dom';
import { createMemoryHistory } from 'history';
import { fetchMock } from '../testutils'
const rulesPath = path.join(__dirname, '..', 'deployment', '__tests__', 'resources', 'metadata');
function readRuleFile(ruleId: string, filename: string) {
return fs.readFileSync(path.join(rulesPath, ruleId, filename)).toString();
}
beforeEach(() => {
const specS1000 = readRuleFile('S1000', 'cfamily-description.html');
const metadataS1000 = readRuleFile('S1000', 'cfamily-metadata.json');
const specS1007 = readRuleFile('S1007', 'default-description.html');
const metadataS1007 = readRuleFile('S1007', 'default-metadata.json');
const specS3457 = readRuleFile('S3457', 'csharp-description.html');
const metadataS3457 = readRuleFile('S3457', 'csharp-metadata.json');
const rootUrl = process.env.PUBLIC_URL;
let mockUrls: {[index: string]:any} = {};
mockUrls[`${rootUrl}/rules/S1000/cfamily-description.html`] = {text: specS1000};
mockUrls[`${rootUrl}/rules/S1000/cfamily-metadata.json`] = {json: JSON.parse(metadataS1000)};
mockUrls[`${rootUrl}/rules/S1007/default-description.html`] = {text: specS1007};
mockUrls[`${rootUrl}/rules/S1007/default-metadata.json`] = {json: JSON.parse(metadataS1007)};
mockUrls[`${rootUrl}/rules/S3457/csharp-description.html`] = {text: specS3457};
mockUrls[`${rootUrl}/rules/S3457/csharp-metadata.json`] = {json: JSON.parse(metadataS3457)};
mockUrls[`${rootUrl}/rules/S3457/default-description.html`] = {text: specS3457};
mockUrls[`${rootUrl}/rules/S3457/default-metadata.json`] = {json: JSON.parse(metadataS3457)};
mockUrls[`${rootUrl}/covered_rules.json`] = {json:
{'ABAP': {'S100': 'ver1', 'S200': 'ver2'},
'CSH' : {'S3457': 'c#1'},
'C': {'S100': 'c1', 'S234': {'since': 'c2', 'until': 'c3'}}}
};
jest.spyOn(global, 'fetch').mockImplementation(fetchMock(mockUrls) as jest.Mocked<typeof fetch>);
});
afterEach(() => {
global.fetch.mockClear();
});
test('renders cfamily version of S1000', async () => {
const history = createMemoryHistory();
history.push('/rspec/#/rspec/S1000/cfamily');
const match = {params: {ruleid: "S1000", language: "cfamily"}};
const { findByText, asFragment } = render(<Router history={history}>
<RulePage match={match} />
</Router>);
await findByText(/S1000/);
await findByText(/Implementation tickets on Jira/);
// some random phrase from the rule specification
await findByText(/7-3-3 - There shall be no unnamed namespaces in header files./);
expect(asFragment()).toMatchSnapshot();
});
test('renders C# version of S3457 (using GH for issues instead of Jira)', async () => {
const history = createMemoryHistory();
history.push('/rspec/#/rspec/S3457/csharp');
const match = {params: {ruleid: "S3457", language: "csharp"}};
const { findByText, asFragment } = render(<Router history={history}>
<RulePage match={match} />
</Router>);
await findByText(/S3457/);
await findByText(/Implementation issues on GitHub/);
expect(asFragment()).toMatchSnapshot();
});
test('renders generic version of S3457', async () => {
const history = createMemoryHistory();
history.push('/rspec/#/rspec/S3457');
const match = {params: {ruleid: "S3457"}};
const { findAllByText, asFragment } = render(<Router history={history}>
<RulePage match={match} />
</Router>);
await findAllByText(/S3457/);
await findAllByText(/cfamily/);
await findAllByText(/csharp/);
expect(asFragment()).toMatchSnapshot();
});
test('renders closed rule S1007', async () => {
const history = createMemoryHistory();
history.push('/rspec/#/rspec/S1007');
const match = {params: {ruleid: "S1007"}};
const { findAllByText, asFragment } = render(<Router history={history}>
<RulePage match={match} />
</Router>);
await findAllByText(/S1007/);
await findAllByText(/cfamily/);
await findAllByText(/closed/);
expect(asFragment()).toMatchSnapshot();
});

View File

@ -0,0 +1,220 @@
import path from 'path';
import { render, waitFor, fireEvent, within } from '@testing-library/react';
import { SearchPage } from '../SearchPage';
import { buildIndexStore, buildSearchIndex } from '../deployment/searchIndex';
import { Router } from 'react-router-dom';
import { createMemoryHistory } from 'history';
import { fetchMockObject, normalize } from '../testutils';
// The CI system is a bit slow. Increase timeout to avoid random failures.
jest.setTimeout(20000);
function genMockUrls() {
const rulePath = path.join(__dirname, '..', 'deployment', '__tests__', 'resources', 'metadata');
const [indexStore, indexAggregates] = buildIndexStore(rulePath);
const searchIndex: lunr.Index = buildSearchIndex(indexStore);
const rootUrl = process.env.PUBLIC_URL;
let mockUrls: {[index: string]: any} = {};
mockUrls[`${rootUrl}/rules/rule-index.json`] = {json: normalize(searchIndex)};
mockUrls[`${rootUrl}/rules/rule-index-store.json`] = {json: normalize(indexStore)};
mockUrls[`${rootUrl}/rules/rule-index-aggregates.json`] = {json: normalize(indexAggregates)};
mockUrls[`${rootUrl}/covered_rules.json`] = {json:
{'CPP': {'S1000': 'ver1', 'S987': 'ver2', 'S3457': 'ver1'},
'C': {'S1000': 'c1', 'S234': {'since': 'c2', 'until': 'c3'}},
'PY': {'S3457': {'since': 'p2', 'until': 'p3'}}}
};
return mockUrls;
}
let fetchMocker = fetchMockObject(genMockUrls());
beforeEach(() => {
jest.spyOn(global, 'fetch').mockImplementation(fetchMocker.mock as jest.Mocked<typeof fetch>);
});
afterEach(() => {
fetchMocker.reset();
global.fetch.mockClear();
});
async function renderDefaultSearchPageWithHistory() {
const history = createMemoryHistory();
history.push('/rspec/#/rspec/');
const renderResult = render(<Router history={history}><SearchPage /></Router>);
// Finish rendering after fetching all the data
await waitFor(() => fetchMocker.finished());
return {renderResult, history};
}
async function renderDefaultSearchPage() {
const { renderResult } = await renderDefaultSearchPageWithHistory();
expect(renderResult.queryByTestId('search-hit-S1000')).not.toBeNull();
expect(renderResult.queryByText(/rules found: 5/i)).not.toBeNull();
return renderResult;
}
test('renders the list of all rules', async () => {
const { findByText, asFragment } = await renderDefaultSearchPage();
await findByText(/rules found/i);
expect(asFragment()).toMatchSnapshot();
});
test('narrows search by title', async () => {
const { queryByText, queryByTestId, getByRole } = await renderDefaultSearchPage();
// Enter a search query
const searchBox = getByRole('textbox');
fireEvent.change(searchBox, { target: { value: 'should not be used' } });
expect(queryByTestId('search-hit-S987')).not.toBeNull();
expect(queryByTestId('search-hit-S1000')).toBeNull();
expect(queryByTestId('search-hit-S1007')).not.toBeNull();
expect(queryByTestId('search-hit-S3457')).not.toBeNull();
expect(queryByText(/rules found: 3/i)).not.toBeNull();
});
test('on enter navigates to the ruleid', async () => {
const { renderResult: { getByRole }, history } = await renderDefaultSearchPageWithHistory();
// Enter a search query
const searchBox = getByRole('textbox');
fireEvent.change(searchBox, { target: { value: 'S1000' } });
fireEvent.keyUp(searchBox, { key: 'Enter', code: 'Enter', charCode: 13});
await waitFor(() => fetchMocker.finished());
expect(history.entries[history.entries.length - 1].pathname).toBe('/rspec/S1000');
});
test('on enter does not navigate to the wrong ruleid', async () => {
const { renderResult: { getByRole }, history } = await renderDefaultSearchPageWithHistory();
// Enter a search query
const searchBox = getByRole('textbox');
fireEvent.change(searchBox, { target: { value: 'S10000' } });
fireEvent.keyUp(searchBox, { key: 'Enter', code: 'Enter', charCode: 13});
await waitFor(() => fetchMocker.finished());
expect(history.entries[history.entries.length - 1].pathname).toBe('/rspec/');
});
test('does nothing on keyup other than enter', async () => {
const { renderResult: { getByRole }, history } = await renderDefaultSearchPageWithHistory();
// Enter a search query
const searchBox = getByRole('textbox');
fireEvent.change(searchBox, { target: { value: 'S1000' } });
fireEvent.keyUp(searchBox, { key: 'A', code: 'KeyA'});
expect(history.entries[history.entries.length - 1].pathname).toBe('/rspec/');
});
test('on enter navigates to the singular result', async () => {
const { renderResult: {queryByText, getByRole}, history } = await renderDefaultSearchPageWithHistory();
// Enter a search query
const searchBox = getByRole('textbox');
fireEvent.change(searchBox, { target: { value: 'rather validated compiler' } });
expect(queryByText(/rules found: 1/i)).not.toBeNull();
fireEvent.keyUp(searchBox, { key: 'Enter', code: 'Enter', charCode: 13});
await waitFor(() => fetchMocker.finished());
expect(history.entries[history.entries.length - 1].pathname).toBe('/rspec/S3457');
});
test('shows the exact match first', async () => {
const { queryByText, queryByTestId, getAllByTestId, getByRole } = await renderDefaultSearchPage();
// Search for S1000
const searchBox = getByRole('textbox');
fireEvent.change(searchBox, { target: { value: 'S1000' } });
expect(queryByText(/rules found: 2/i)).not.toBeNull();
expect(queryByTestId('search-hit-S1000')).not.toBeNull();
expect(queryByTestId('search-hit-S987')).not.toBeNull();
expect(queryByTestId('search-hit-S3457')).toBeNull();
// Make sure S1000 comes before S987
let hitsS1000 = getAllByTestId(/search-hit/i).map((hit) => hit.getAttribute('data-testid'));
expect(hitsS1000.indexOf('search-hit-S1000')).toBeLessThan(hitsS1000.indexOf('search-hit-S987'));
// Search for S987
fireEvent.change(searchBox, { target: { value: 'S987' } });
expect(queryByText(/rules found: 2/i)).not.toBeNull();
expect(queryByTestId('search-hit-S1000')).not.toBeNull();
expect(queryByTestId('search-hit-S987')).not.toBeNull();
expect(queryByTestId('search-hit-S3457')).toBeNull();
// Make sure S987 comes before S1000
let hitsS987 = getAllByTestId(/search-hit/i).map((hit) => hit.getAttribute('data-testid'));
expect(hitsS987.indexOf('search-hit-S987')).toBeLessThan(hitsS987.indexOf('search-hit-S1000'));
});
test('narrows search by rule type', async () => {
const { queryByText, queryByTestId, getByRole, getByTestId } = await renderDefaultSearchPage();
// Select the rule type
fireEvent.mouseDown(within(getByTestId('rule-type')).getByRole('button'));
const listbox = within(getByRole('listbox'));
fireEvent.click(listbox.getByTestId('rule-type-CODE_SMELL'));
expect(queryByTestId('search-hit-S987')).toBeNull();
expect(queryByTestId('search-hit-S1000')).not.toBeNull();
expect(queryByTestId('search-hit-S1007')).not.toBeNull();
expect(queryByTestId('search-hit-S3457')).not.toBeNull();
expect(queryByText(/rules found: 3/i)).not.toBeNull();
});
test('narrows search by rule tags', async () => {
const { queryByText, queryByTestId, getByRole, getByTestId } = await renderDefaultSearchPage();
// Select the 'clumsy' tag
fireEvent.mouseDown(within(getByTestId('rule-tags')).getByRole('button'));
const listbox = within(getByRole('listbox'));
fireEvent.click(listbox.getByTestId('rule-tag-clumsy'));
expect(queryByText(/rules found: 2/i)).not.toBeNull();
expect(queryByTestId('search-hit-S987')).toBeNull();
expect(queryByTestId('search-hit-S1000')).not.toBeNull();
expect(queryByTestId('search-hit-S3457')).not.toBeNull();
// Also select the 'pitfall' tag
fireEvent.click(listbox.getByTestId('rule-tag-pitfall'));
expect(queryByText(/rules found: 1/i)).not.toBeNull();
expect(queryByTestId('search-hit-S987')).toBeNull();
expect(queryByTestId('search-hit-S1000')).not.toBeNull();
expect(queryByTestId('search-hit-S3457')).toBeNull();
});
test('narrows search by language', async () => {
const { queryByText, queryByTestId, getByRole, getByTestId } = await renderDefaultSearchPage();
// Select the cfamily language, should keep all the rules: they all are specified for cfamily
fireEvent.mouseDown(within(getByTestId('rule-language')).getByRole('button'));
const listbox = within(getByRole('listbox'));
fireEvent.click(listbox.getByTestId('rule-language-cfamily'));
expect(queryByText(/rules found: 4/i)).not.toBeNull();
expect(queryByTestId('search-hit-S987')).not.toBeNull();
expect(queryByTestId('search-hit-S1000')).not.toBeNull();
expect(queryByTestId('search-hit-S3457')).not.toBeNull();
// Select the java language: should keep only S3457
fireEvent.click(listbox.getByTestId('rule-language-java'));
expect(queryByText(/rules found: 2/i)).not.toBeNull();
expect(queryByTestId('search-hit-S987')).toBeNull();
expect(queryByTestId('search-hit-S1000')).toBeNull();
expect(queryByTestId('search-hit-S3457')).not.toBeNull();
});
test('narrows search by quality profile', async () => {
const { queryByText, queryByTestId, getByRole, getByTestId } = await renderDefaultSearchPage();
// Select Sonar way profile - S1000, S1007, S3457 and S3649 are in this profile
fireEvent.mouseDown(within(getByTestId('rule-default-quality-profile')).getByRole('button'));
const listbox = within(getByRole('listbox'));
fireEvent.click(listbox.getByTestId('rule-qual-profile-Sonar way'));
expect(queryByText(/rules found: 3/i)).not.toBeNull();
expect(queryByTestId('search-hit-S987')).toBeNull();
expect(queryByTestId('search-hit-S1000')).not.toBeNull();
expect(queryByTestId('search-hit-S3457')).not.toBeNull();
});

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,866 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders the list of all rules 1`] = `
<DocumentFragment>
<div
class="makeStyles-root-1"
>
<div
class="makeStyles-searchBar-3"
>
<div
class="MuiContainer-root MuiContainer-maxWidthMd"
>
<div
class="MuiGrid-root MuiGrid-container"
>
<div
class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12"
>
<div
class="MuiFormControl-root MuiTextField-root MuiFormControl-marginNormal MuiFormControl-fullWidth"
>
<label
class="MuiFormLabel-root MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-shrink MuiInputLabel-outlined Mui-focused Mui-focused"
data-shrink="true"
for="title-query"
id="title-query-label"
>
Rule Title and Description
</label>
<div
class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-fullWidth Mui-focused Mui-focused MuiInputBase-formControl"
>
<input
aria-invalid="false"
class="MuiInputBase-input MuiOutlinedInput-input"
id="title-query"
placeholder="Search in rule titles and descriptions"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
class="PrivateNotchedOutline-root-8 MuiOutlinedInput-notchedOutline"
>
<legend
class="PrivateNotchedOutline-legendLabelled-10 PrivateNotchedOutline-legendNotched-11"
>
<span>
Rule Title and Description
</span>
</legend>
</fieldset>
</div>
</div>
</div>
<div
class="MuiGrid-root makeStyles-fullWidth-7 MuiGrid-container MuiGrid-spacing-xs-3 MuiGrid-item MuiGrid-grid-xs-12"
>
<div
class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-3"
>
<div
class="MuiFormControl-root MuiTextField-root MuiFormControl-marginNormal MuiFormControl-fullWidth"
data-testid="rule-type"
>
<label
class="MuiFormLabel-root MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-shrink MuiInputLabel-marginDense MuiInputLabel-outlined MuiFormLabel-filled"
data-shrink="true"
>
Rule type
</label>
<div
class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-fullWidth MuiInputBase-formControl MuiInputBase-marginDense MuiOutlinedInput-marginDense"
>
<div
aria-haspopup="listbox"
class="MuiSelect-root MuiSelect-select MuiSelect-selectMenu MuiSelect-outlined MuiInputBase-input MuiOutlinedInput-input MuiInputBase-inputMarginDense MuiOutlinedInput-inputMarginDense"
role="button"
tabindex="0"
>
Any
</div>
<input
aria-hidden="true"
class="MuiSelect-nativeInput"
tabindex="-1"
value="ANY"
/>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSelect-icon MuiSelect-iconOutlined"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M7 10l5 5 5-5z"
/>
</svg>
<fieldset
aria-hidden="true"
class="PrivateNotchedOutline-root-8 MuiOutlinedInput-notchedOutline"
>
<legend
class="PrivateNotchedOutline-legendLabelled-10 PrivateNotchedOutline-legendNotched-11"
>
<span>
Rule type
</span>
</legend>
</fieldset>
</div>
</div>
</div>
<div
class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-5"
>
<div
class="MuiFormControl-root MuiTextField-root MuiFormControl-marginNormal MuiFormControl-fullWidth"
data-testid="rule-tags"
>
<label
class="MuiFormLabel-root MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-marginDense MuiInputLabel-outlined"
data-shrink="false"
>
Rule Tags
</label>
<div
class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-fullWidth MuiInputBase-formControl MuiInputBase-marginDense MuiOutlinedInput-marginDense"
>
<div
aria-haspopup="listbox"
class="MuiSelect-root MuiSelect-select MuiSelect-selectMenu MuiSelect-outlined MuiInputBase-input MuiOutlinedInput-input MuiInputBase-inputMarginDense MuiOutlinedInput-inputMarginDense"
role="button"
tabindex="0"
>
<span>
</span>
</div>
<input
aria-hidden="true"
class="MuiSelect-nativeInput"
tabindex="-1"
value=""
/>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSelect-icon MuiSelect-iconOutlined"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M7 10l5 5 5-5z"
/>
</svg>
<fieldset
aria-hidden="true"
class="PrivateNotchedOutline-root-8 MuiOutlinedInput-notchedOutline"
>
<legend
class="PrivateNotchedOutline-legendLabelled-10"
>
<span>
Rule Tags
</span>
</legend>
</fieldset>
</div>
</div>
</div>
<div
class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-4"
>
<div
class="MuiFormControl-root MuiTextField-root MuiFormControl-marginNormal MuiFormControl-fullWidth"
data-testid="rule-language"
>
<label
class="MuiFormLabel-root MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-shrink MuiInputLabel-marginDense MuiInputLabel-outlined MuiFormLabel-filled"
data-shrink="true"
>
Language
</label>
<div
class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-fullWidth MuiInputBase-formControl MuiInputBase-marginDense MuiOutlinedInput-marginDense"
>
<div
aria-haspopup="listbox"
class="MuiSelect-root MuiSelect-select MuiSelect-selectMenu MuiSelect-outlined MuiInputBase-input MuiOutlinedInput-input MuiInputBase-inputMarginDense MuiOutlinedInput-inputMarginDense"
role="button"
tabindex="0"
>
Any
</div>
<input
aria-hidden="true"
class="MuiSelect-nativeInput"
tabindex="-1"
value="ANY"
/>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSelect-icon MuiSelect-iconOutlined"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M7 10l5 5 5-5z"
/>
</svg>
<fieldset
aria-hidden="true"
class="PrivateNotchedOutline-root-8 MuiOutlinedInput-notchedOutline"
>
<legend
class="PrivateNotchedOutline-legendLabelled-10 PrivateNotchedOutline-legendNotched-11"
>
<span>
Language
</span>
</legend>
</fieldset>
</div>
</div>
</div>
</div>
<div
class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12"
>
<div
class="MuiFormControl-root MuiTextField-root MuiFormControl-marginNormal MuiFormControl-fullWidth"
data-testid="rule-default-quality-profile"
>
<label
class="MuiFormLabel-root MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-marginDense MuiInputLabel-outlined"
data-shrink="false"
>
Default Quality Profiles
</label>
<div
class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-fullWidth MuiInputBase-formControl MuiInputBase-marginDense MuiOutlinedInput-marginDense"
>
<div
aria-haspopup="listbox"
class="MuiSelect-root MuiSelect-select MuiSelect-selectMenu MuiSelect-outlined MuiInputBase-input MuiOutlinedInput-input MuiInputBase-inputMarginDense MuiOutlinedInput-inputMarginDense"
role="button"
tabindex="0"
>
<span>
</span>
</div>
<input
aria-hidden="true"
class="MuiSelect-nativeInput"
tabindex="-1"
value=""
/>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSelect-icon MuiSelect-iconOutlined"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M7 10l5 5 5-5z"
/>
</svg>
<fieldset
aria-hidden="true"
class="PrivateNotchedOutline-root-8 MuiOutlinedInput-notchedOutline"
>
<legend
class="PrivateNotchedOutline-legendLabelled-10"
>
<span>
Default Quality Profiles
</span>
</legend>
</fieldset>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class="makeStyles-searchResults-4"
>
<div
class="MuiContainer-root MuiContainer-maxWidthMd"
>
<div
class="MuiGrid-root MuiGrid-container MuiGrid-spacing-xs-3"
>
<div
class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12"
>
<div
class="MuiBox-root MuiBox-root-12 makeStyles-topRow-5"
>
<div
class="MuiBox-root MuiBox-root-13 makeStyles-resultsCount-6"
>
<h6
class="MuiTypography-root MuiTypography-subtitle1"
>
Number of rules found: 5
</h6>
</div>
</div>
<div
class="MuiBox-root MuiBox-root-14 makeStyles-searchHitBox-2"
>
<div
class="MuiPaper-root MuiCard-root makeStyles-searchHit-15 MuiPaper-outlined MuiPaper-rounded"
>
<div
class="MuiCardContent-root"
>
<h5
class="MuiTypography-root makeStyles-ruleid-16 MuiTypography-h5 MuiTypography-gutterBottom"
>
<a
class="MuiTypography-root MuiLink-root MuiLink-underlineHover MuiTypography-colorPrimary"
data-testid="search-hit-S1000"
href="/S1000"
>
<div>
Rule S1000
</div>
</a>
</h5>
<p
class="MuiTypography-root MuiTypography-body1 MuiTypography-gutterBottom"
>
Header files should not contain unnamed namespaces
</p>
<div
class="MuiTableContainer-root"
>
<table
class="MuiTable-root"
>
<tbody
class="MuiTableBody-root"
>
<tr
class="MuiTableRow-root"
>
<td
class="MuiTableCell-root makeStyles-coveredTitle-24 MuiTableCell-body"
>
Covered
</td>
<td
class="MuiTableCell-root makeStyles-coveredMarker-25 MuiTableCell-body"
>
<a
class="MuiTypography-root MuiLink-root MuiLink-underlineHover MuiTypography-colorPrimary"
href="/S1000/cfamily"
style="text-decoration: none;"
>
<div
class="MuiButtonBase-root MuiChip-root makeStyles-coveredLanguageChip-19 MuiChip-colorPrimary MuiChip-clickableColorPrimary MuiChip-clickable"
role="button"
tabindex="0"
>
<span
class="MuiChip-label"
>
cfamily
</span>
<span
class="MuiTouchRipple-root"
/>
</div>
</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div
class="MuiBox-root MuiBox-root-34 makeStyles-searchHitBox-2"
>
<div
class="MuiPaper-root MuiCard-root makeStyles-searchHit-15 MuiPaper-outlined MuiPaper-rounded"
>
<div
class="MuiCardContent-root"
>
<h5
class="MuiTypography-root makeStyles-ruleid-16 makeStyles-avoid-17 MuiTypography-h5 MuiTypography-gutterBottom"
>
<a
class="MuiTypography-root MuiLink-root MuiLink-underlineHover MuiTypography-colorPrimary"
data-testid="search-hit-S1007"
href="/S1007"
>
<div>
Rule S1007
</div>
</a>
</h5>
<p
class="MuiTypography-root MuiTypography-body1 MuiTypography-gutterBottom"
>
When the absolute positioning of bits representing a bit-field is required, then the behaviour and packing of bit-fields shall be documented
</p>
<div
class="MuiTableContainer-root"
>
<table
class="MuiTable-root"
>
<tbody
class="MuiTableBody-root"
>
<tr
class="MuiTableRow-root"
>
<td
class="MuiTableCell-root makeStyles-closedTitle-32 MuiTableCell-body"
>
Closed
</td>
<td
class="MuiTableCell-root makeStyles-closedMarker-33 MuiTableCell-body"
>
<a
class="MuiTypography-root MuiLink-root MuiLink-underlineHover MuiTypography-colorPrimary"
href="/S1007/cfamily"
style="text-decoration: none;"
>
<div
class="MuiButtonBase-root MuiChip-root makeStyles-closedLanguageChip-23 MuiChip-colorPrimary MuiChip-clickableColorPrimary MuiChip-clickable"
role="button"
tabindex="0"
>
<span
class="MuiChip-label"
>
cfamily
</span>
<span
class="MuiTouchRipple-root"
/>
</div>
</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div
class="MuiBox-root MuiBox-root-35 makeStyles-searchHitBox-2"
>
<div
class="MuiPaper-root MuiCard-root makeStyles-searchHit-15 MuiPaper-outlined MuiPaper-rounded"
>
<div
class="MuiCardContent-root"
>
<h5
class="MuiTypography-root makeStyles-ruleid-16 MuiTypography-h5 MuiTypography-gutterBottom"
>
<a
class="MuiTypography-root MuiLink-root MuiLink-underlineHover MuiTypography-colorPrimary"
data-testid="search-hit-S3457"
href="/S3457"
>
<div>
Rule S3457
</div>
</a>
</h5>
<p
class="MuiTypography-root MuiTypography-body1 MuiTypography-gutterBottom"
>
Composite format strings should be used correctly
</p>
<p
class="MuiTypography-root MuiTypography-body1 MuiTypography-gutterBottom"
>
Printf-style format strings should be used correctly
</p>
<p
class="MuiTypography-root MuiTypography-body1 MuiTypography-gutterBottom"
>
String formatting should be used correctly
</p>
<div
class="MuiTableContainer-root"
>
<table
class="MuiTable-root"
>
<tbody
class="MuiTableBody-root"
>
<tr
class="MuiTableRow-root"
>
<td
class="MuiTableCell-root makeStyles-coveredTitle-24 MuiTableCell-body"
>
Covered
</td>
<td
class="MuiTableCell-root makeStyles-coveredMarker-25 MuiTableCell-body"
>
<a
class="MuiTypography-root MuiLink-root MuiLink-underlineHover MuiTypography-colorPrimary"
href="/S3457/cfamily"
style="text-decoration: none;"
>
<div
class="MuiButtonBase-root MuiChip-root makeStyles-coveredLanguageChip-19 MuiChip-colorPrimary MuiChip-clickableColorPrimary MuiChip-clickable"
role="button"
tabindex="0"
>
<span
class="MuiChip-label"
>
cfamily
</span>
<span
class="MuiTouchRipple-root"
/>
</div>
</a>
</td>
</tr>
<tr
class="MuiTableRow-root"
>
<td
class="MuiTableCell-root makeStyles-targetedTitle-26 MuiTableCell-body"
>
Targeted
</td>
<td
class="MuiTableCell-root makeStyles-targetedMarker-27 MuiTableCell-body"
>
<a
class="MuiTypography-root MuiLink-root MuiLink-underlineHover MuiTypography-colorPrimary"
href="/S3457/csharp"
style="text-decoration: none;"
>
<div
class="MuiButtonBase-root MuiChip-root makeStyles-targetedLanguageChip-20 MuiChip-colorPrimary MuiChip-clickableColorPrimary MuiChip-outlined MuiChip-outlinedPrimary MuiChip-clickable"
role="button"
tabindex="0"
>
<span
class="MuiChip-label"
>
csharp
</span>
<span
class="MuiTouchRipple-root"
/>
</div>
</a>
</td>
</tr>
<tr
class="MuiTableRow-root"
>
<td
class="MuiTableCell-root makeStyles-removedTitle-28 MuiTableCell-body"
>
Removed
</td>
<td
class="MuiTableCell-root makeStyles-removedMarker-29 MuiTableCell-body"
>
<a
class="MuiTypography-root MuiLink-root MuiLink-underlineHover MuiTypography-colorPrimary"
href="/S3457/python"
style="text-decoration: none;"
>
<div
class="MuiButtonBase-root MuiChip-root makeStyles-removedLanguageChip-21 MuiChip-colorPrimary MuiChip-clickableColorPrimary MuiChip-clickable"
role="button"
tabindex="0"
>
<span
class="MuiChip-label"
>
python
</span>
<span
class="MuiTouchRipple-root"
/>
</div>
</a>
</td>
</tr>
<tr
class="MuiTableRow-root"
>
<td
class="MuiTableCell-root makeStyles-closedTitle-32 MuiTableCell-body"
>
Closed
</td>
<td
class="MuiTableCell-root makeStyles-closedMarker-33 MuiTableCell-body"
>
<a
class="MuiTypography-root MuiLink-root MuiLink-underlineHover MuiTypography-colorPrimary"
href="/S3457/java"
style="text-decoration: none;"
>
<div
class="MuiButtonBase-root MuiChip-root makeStyles-closedLanguageChip-23 MuiChip-colorPrimary MuiChip-clickableColorPrimary MuiChip-clickable"
role="button"
tabindex="0"
>
<span
class="MuiChip-label"
>
java
</span>
<span
class="MuiTouchRipple-root"
/>
</div>
</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div
class="MuiBox-root MuiBox-root-36 makeStyles-searchHitBox-2"
>
<div
class="MuiPaper-root MuiCard-root makeStyles-searchHit-15 MuiPaper-outlined MuiPaper-rounded"
>
<div
class="MuiCardContent-root"
>
<h5
class="MuiTypography-root makeStyles-ruleid-16 MuiTypography-h5 MuiTypography-gutterBottom"
>
<a
class="MuiTypography-root MuiLink-root MuiLink-underlineHover MuiTypography-colorPrimary"
data-testid="search-hit-S3649"
href="/S3649"
>
<div>
Rule S3649
</div>
</a>
</h5>
<p
class="MuiTypography-root MuiTypography-body1 MuiTypography-gutterBottom"
>
Database queries should not be vulnerable to injection attacks
</p>
<div
class="MuiTableContainer-root"
>
<table
class="MuiTable-root"
>
<tbody
class="MuiTableBody-root"
>
<tr
class="MuiTableRow-root"
>
<td
class="MuiTableCell-root makeStyles-targetedTitle-26 MuiTableCell-body"
>
Targeted
</td>
<td
class="MuiTableCell-root makeStyles-targetedMarker-27 MuiTableCell-body"
>
<a
class="MuiTypography-root MuiLink-root MuiLink-underlineHover MuiTypography-colorPrimary"
href="/S3649/java"
style="text-decoration: none;"
>
<div
class="MuiButtonBase-root MuiChip-root makeStyles-targetedLanguageChip-20 MuiChip-colorPrimary MuiChip-clickableColorPrimary MuiChip-outlined MuiChip-outlinedPrimary MuiChip-clickable"
role="button"
tabindex="0"
>
<span
class="MuiChip-label"
>
java
</span>
<span
class="MuiTouchRipple-root"
/>
</div>
</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div
class="MuiBox-root MuiBox-root-37 makeStyles-searchHitBox-2"
>
<div
class="MuiPaper-root MuiCard-root makeStyles-searchHit-15 MuiPaper-outlined MuiPaper-rounded"
>
<div
class="MuiCardContent-root"
>
<h5
class="MuiTypography-root makeStyles-ruleid-16 MuiTypography-h5 MuiTypography-gutterBottom"
>
<a
class="MuiTypography-root MuiLink-root MuiLink-underlineHover MuiTypography-colorPrimary"
data-testid="search-hit-S987"
href="/S987"
>
<div>
Rule S987
</div>
</a>
</h5>
<p
class="MuiTypography-root MuiTypography-body1 MuiTypography-gutterBottom"
>
"&lt;signal.h&gt;" should not be used
</p>
<div
class="MuiTableContainer-root"
>
<table
class="MuiTable-root"
>
<tbody
class="MuiTableBody-root"
>
<tr
class="MuiTableRow-root"
>
<td
class="MuiTableCell-root makeStyles-coveredTitle-24 MuiTableCell-body"
>
Covered
</td>
<td
class="MuiTableCell-root makeStyles-coveredMarker-25 MuiTableCell-body"
>
<a
class="MuiTypography-root MuiLink-root MuiLink-underlineHover MuiTypography-colorPrimary"
href="/S987/cfamily"
style="text-decoration: none;"
>
<div
class="MuiButtonBase-root MuiChip-root makeStyles-coveredLanguageChip-19 MuiChip-colorPrimary MuiChip-clickableColorPrimary MuiChip-clickable"
role="button"
tabindex="0"
>
<span
class="MuiChip-label"
>
cfamily
</span>
<span
class="MuiTouchRipple-root"
/>
</div>
</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<nav
aria-label="pagination navigation"
class="MuiPagination-root"
>
<ul
class="MuiPagination-ul"
>
<li>
<button
aria-label="Go to previous page"
class="MuiButtonBase-root MuiPaginationItem-root MuiPaginationItem-page Mui-disabled Mui-disabled"
disabled=""
tabindex="-1"
type="button"
>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiPaginationItem-icon"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"
/>
</svg>
</button>
</li>
<li>
<button
aria-current="true"
aria-label="page 1"
class="MuiButtonBase-root MuiPaginationItem-root MuiPaginationItem-page Mui-selected"
tabindex="0"
type="button"
>
1
<span
class="MuiTouchRipple-root"
/>
</button>
</li>
<li>
<button
aria-label="Go to next page"
class="MuiButtonBase-root MuiPaginationItem-root MuiPaginationItem-page Mui-disabled Mui-disabled"
disabled=""
tabindex="-1"
type="button"
>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiPaginationItem-icon"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"
/>
</svg>
</button>
</li>
</ul>
</nav>
</div>
</div>
</div>
</div>
</div>
</DocumentFragment>
`;

View File

@ -1,29 +1,226 @@
import fs from 'fs';
import path from 'path';
import { generate_rules_description } from '../description';
import { generateOneRuleDescription, generateRulesDescription } from '../description';
import { withTestDir, createFiles } from '../testutils';
describe('description generation', () => {
test('generates html from asciidoc', () => {
test('generates html from asciidoc', () => {
return withTestDir((srcPath) => {
createFiles(srcPath, {
'S100/description.adoc': 'Generic content',
'S100/java/rule.adoc':
['include::../description.adoc[]',
'Specific content'].join('\n')
});
return withTestDir(async (dstPath) => {
generate_rules_description(srcPath, dstPath);
'S100/rule.adoc': 'Generic content',
'S100/java/rule.adoc': `
include::../rule.adoc[]
Specific content
const ruleHtml = fs.readFileSync(path.join(dstPath, 'S100', 'java-description.html'));
expect(ruleHtml.toString()).toEqual(
['<div class="paragraph">',
'<p>Generic content',
'Specific content</p>',
'</div>'].join('\n')
);
== Test various forms of auto-link for RSPEC. S100
* See S100, S101,S102.
* See RSPEC-101
* But not S103badref.
* This is a code literal \`+S234+\` but this isn't S567.
\\https://sonarsource.github.io/rspec/#/rspec/S100
https://sonarsource.github.io/rspec/#/rspec/S100/cfamily
https://sonarsource.github.io/rspec/#/rspec/S100/cfamily[]
[source,cpp]
----
int foo() {
// No auto-links in code!
auto S100 = 100;
auto U100 = 100u;
return S100 + U100;
}
----
After snippet, See S100.
[source,cpp]
----
int goo() {
// No auto-links in code!
// S100
}
----
more ref: RSPEC-200.
`,
'S101/rule.adoc': 'Generic content',
'S101/java/rule.adoc': `
include::../rule.adoc[]
Specific content
See S100.
`,
'S501/rule.adoc': 'Generic content, no active language',
});
return withTestDir(async (dstPath) => {
generateRulesDescription(srcPath, dstPath);
const s100Java = path.join(dstPath, 'S100', 'java-description.html');
expect(fs.existsSync(s100Java)).toBeTruthy();
const htmlS100Java = fs.readFileSync(s100Java);
expect(htmlS100Java.toString()).toMatchInlineSnapshot(`
"<div class=\\"sect1\\">
<h2 id=\\"_description\\">Description</h2>
<div class=\\"sectionbody\\">
<div class=\\"paragraph\\">
<p>Generic content
Specific content</p>
</div>
</div>
</div>
<div class=\\"sect1\\">
<h2 id=\\"_test_various_forms_of_auto_link_for_rspec_s100\\">Test various forms of auto-link for RSPEC. <a data-rspec-id=\\"S100\\" class=\\"rspec-auto-link\\">S100</a></h2>
<div class=\\"sectionbody\\">
<div class=\\"ulist\\">
<ul>
<li>
<p>See <a data-rspec-id=\\"S100\\" class=\\"rspec-auto-link\\">S100</a>, <a data-rspec-id=\\"S101\\" class=\\"rspec-auto-link\\">S101</a>,<a data-rspec-id=\\"S102\\" class=\\"rspec-auto-link\\">S102</a>.</p>
</li>
<li>
<p>See <a data-rspec-id=\\"S101\\" class=\\"rspec-auto-link\\">RSPEC-101</a></p>
</li>
<li>
<p>But not S103badref.</p>
</li>
<li>
<p>This is a code literal <code>S234</code> but this isn&#8217;t <a data-rspec-id=\\"S567\\" class=\\"rspec-auto-link\\">S567</a>.</p>
</li>
</ul>
</div>
<div class=\\"paragraph\\">
<p>https://sonarsource.github.io/rspec/#/rspec/S100</p>
</div>
<div class=\\"paragraph\\">
<p><a href=\\"https://sonarsource.github.io/rspec/#/rspec/S100/cfamily\\" class=\\"bare\\">https://sonarsource.github.io/rspec/#/rspec/S100/cfamily</a></p>
</div>
<div class=\\"paragraph\\">
<p><a href=\\"https://sonarsource.github.io/rspec/#/rspec/S100/cfamily\\" class=\\"bare\\">https://sonarsource.github.io/rspec/#/rspec/S100/cfamily</a></p>
</div>
<div class=\\"listingblock\\">
<div class=\\"content\\">
<pre class=\\"highlight\\"><code class=\\"language-cpp\\" data-lang=\\"cpp\\">int foo() {
// No auto-links in code!
auto S100 = 100;
auto U100 = 100u;
return S100 + U100;
}</code></pre>
</div>
</div>
<div class=\\"paragraph\\">
<p>After snippet, See <a data-rspec-id=\\"S100\\" class=\\"rspec-auto-link\\">S100</a>.</p>
</div>
<div class=\\"listingblock\\">
<div class=\\"content\\">
<pre class=\\"highlight\\"><code class=\\"language-cpp\\" data-lang=\\"cpp\\">int goo() {
// No auto-links in code!
// S100
}</code></pre>
</div>
</div>
<div class=\\"paragraph\\">
<p>more ref: <a data-rspec-id=\\"S200\\" class=\\"rspec-auto-link\\">RSPEC-200</a>.</p>
</div>
</div>
</div>"
`);
const s101Java = path.join(dstPath, 'S101', 'java-description.html');
expect(fs.existsSync(s101Java)).toBeTruthy();
const htmlS101Java = fs.readFileSync(s101Java);
expect(htmlS101Java.toString()).toMatchInlineSnapshot(`
"<div class=\\"sect1\\">
<h2 id=\\"_description\\">Description</h2>
<div class=\\"sectionbody\\">
<div class=\\"paragraph\\">
<p>Generic content
Specific content
See <a data-rspec-id=\\"S100\\" class=\\"rspec-auto-link\\">S100</a>.</p>
</div>
</div>
</div>"
`);
const s501Default = path.join(dstPath, 'S501', 'default-description.html');
expect(fs.existsSync(s501Default)).toBeTruthy();
const htmlS501Default = fs.readFileSync(s501Default);
expect(htmlS501Default.toString()).toMatchInlineSnapshot(`
"<div class=\\"sect1\\">
<h2 id=\\"_description\\">Description</h2>
<div class=\\"sectionbody\\">
<div class=\\"paragraph\\">
<p>Generic content, no active language</p>
</div>
</div>
</div>"
`);
});
});
});
});
function normalizeString(str: string) {
// Ignore \n\r vs \n differences, and ignore extra whitespace.
return str.replace(/\r\n/g, '\n').trimEnd();
}
expect.extend({
toBeSameAsFile(received: string, expectedPath: string) {
if (!fs.existsSync(expectedPath)) {
return {
message: () => `File ${expectedPath} was not found.`,
pass: false
};
}
const expected = fs.readFileSync(expectedPath).toString();
if (normalizeString(expected) === normalizeString(received)) {
return {
// This message is used in case of test negation `expect(a).not.toBeSameAsFile(f)`
message: () => `Identity check failed on ${expectedPath}.\nExpected:\n${expected}\n\nReceived:\n${received}`,
pass: true
};
} else {
const receivedPath = path.join(path.dirname(expectedPath), 'received-' + path.basename(expectedPath));
fs.writeFileSync(receivedPath, received);
return {
message: () => `Identity check failed on ${expectedPath}.\nReceived file saved in ${receivedPath}`,
pass: false
};
}
}
});
test('generates description for active rules', () => {
return withTestDir(async (dstPath) => {
generateRulesDescription(path.join(__dirname, 'resources', 'rules'), dstPath);
const rules = fs.readdirSync(dstPath);
expect(rules.length).toEqual(5);
let treated = 0;
rules.forEach(ruleDir => {
const languages = fs.readdirSync(`${dstPath}/${ruleDir}`);
expect(languages.length).toBeGreaterThanOrEqual(1);
languages.forEach(file => {
const actual = fs.readFileSync(`${dstPath}/${ruleDir}/${file}`).toString();
const expectedPath = path.join(__dirname, 'resources', 'metadata', ruleDir, file);
expect(actual).toBeSameAsFile(expectedPath);
treated++;
});
});
expect(treated).toBe(13);
});
});
test('Generate one rule description for a rule with a "common" directory', () => {
return withTestDir(async (dstPath) => {
generateOneRuleDescription(path.join(__dirname, 'resources', 'rules', 'S3649'), dstPath);
const s3649Java = path.join(dstPath, 'java-description.html');
expect(fs.existsSync(s3649Java)).toBeTruthy();
const actual = fs.readFileSync(s3649Java).toString();
const expectedPath = path.join(__dirname, 'resources', 'metadata', 'S3649', 'java-description.html');
expect(actual).toBeSameAsFile(expectedPath);
});
})
});

View File

@ -1,7 +1,7 @@
import fs from 'fs';
import path from 'path';
import { generate_one_rule_metadata, generate_rules_metadata } from '../metadata';
import { generateOneRuleMetadata, generateRulesMetadata } from '../metadata';
import { withTestDir, createFiles } from '../testutils';
describe('metadata generation', () => {
@ -21,7 +21,7 @@ describe('metadata generation', () => {
}),
});
return withTestDir(async (dstPath) => {
generate_rules_metadata(srcPath, dstPath);
generateRulesMetadata(srcPath, dstPath);
const javaStrMetadata = fs.readFileSync(`${dstPath}/S100/java-metadata.json`);
const javaMetadata = JSON.parse(javaStrMetadata.toString());
expect(javaMetadata).toMatchObject({
@ -39,6 +39,85 @@ describe('metadata generation', () => {
});
});
test('check status computation', () => {
return withTestDir((srcPath) => {
createFiles(srcPath, {
'S100/metadata.json': JSON.stringify({
title: 'Rule S100',
status: 'ready'
}),
'S100/java/metadata.json': JSON.stringify({
title: 'Java Rule S100'
}),
'S100/python/metadata.json': JSON.stringify({
status: 'closed'
}),
});
return withTestDir(async (dstPath) => {
generateRulesMetadata(srcPath, dstPath);
const javaStrMetadata = fs.readFileSync(`${dstPath}/S100/java-metadata.json`);
const pythonStrMetadata = fs.readFileSync(`${dstPath}/S100/python-metadata.json`);
const javaMetadata = JSON.parse(javaStrMetadata.toString());
const pythonMetadata = JSON.parse(pythonStrMetadata.toString());
expect(pythonMetadata).toMatchObject({
title: 'Rule S100',
languagesSupport: [
{name: 'java', status: 'ready'},
{name: 'python', status: 'closed'}
]
});
expect(javaMetadata.languagesSupport).toStrictEqual(pythonMetadata.languagesSupport);
});
});
});
test('computes rule types correctly', () => {
return withTestDir((srcPath) => {
createFiles(srcPath, {
'S100/metadata.json': JSON.stringify({
title: 'Rule S100',
type: 'CODE_SMELL',
}),
'S100/java/metadata.json': JSON.stringify({
title: 'Java Rule S100',
}),
'S100/python/metadata.json': JSON.stringify({
type: 'CODE_SMELL',
}),
'S100/cfamily/metadata.json': JSON.stringify({
type: 'BUG',
}),
});
return withTestDir(async (dstPath) => {
generateRulesMetadata(srcPath, dstPath);
const javaStrMetadata = fs.readFileSync(`${dstPath}/S100/java-metadata.json`);
const pythonStrMetadata = fs.readFileSync(`${dstPath}/S100/python-metadata.json`);
const cfamilyStrMetadata = fs.readFileSync(`${dstPath}/S100/cfamily-metadata.json`);
const javaMetadata = JSON.parse(javaStrMetadata.toString());
const pythonMetadata = JSON.parse(pythonStrMetadata.toString());
const cfamilyMetadata = JSON.parse(cfamilyStrMetadata.toString());
expect(javaMetadata).toMatchObject({
title: 'Java Rule S100',
type: 'CODE_SMELL',
});
expect(pythonMetadata).toMatchObject({
title: 'Rule S100',
type: 'CODE_SMELL',
});
expect(cfamilyMetadata).toMatchObject({
title: 'Rule S100',
type: 'BUG',
});
});
});
});
test('generates only requested rules if a list of rule is provided', () => {
return withTestDir((srcPath) => {
createFiles(srcPath, {
@ -50,7 +129,7 @@ describe('metadata generation', () => {
}),
});
return withTestDir(async (dstPath) => {
generate_rules_metadata(srcPath, dstPath, ['S100']);
generateRulesMetadata(srcPath, dstPath, ['S100']);
const s100Exists = fs.existsSync(`${dstPath}/S100/java-metadata.json`);
expect(s100Exists).toBeTruthy();
@ -72,7 +151,7 @@ describe('metadata generation', () => {
}),
});
return withTestDir(async (dstPath) => {
generate_one_rule_metadata(path.join(srcPath, 'S100'), path.join(dstPath, 'S100'), 'master');
generateOneRuleMetadata(path.join(srcPath, 'S100'), path.join(dstPath, 'S100'), 'master');
const s100StrMetadata = fs.readFileSync(`${dstPath}/S100/java-metadata.json`);
const s100Metadata = JSON.parse(s100StrMetadata.toString());
@ -80,16 +159,153 @@ describe('metadata generation', () => {
expect(s100Metadata.branch).toEqual('master');
expect(Object.keys(s100Metadata)).not.toContain('prUrl');
generate_one_rule_metadata(path.join(srcPath, 'S200'), path.join(dstPath, 'S200'), 'add-my-rule', 'https://some.pr/url');
generateOneRuleMetadata(path.join(srcPath, 'S200'), path.join(dstPath, 'S200'), 'add-my-rule', 'https://some.pr/url');
const s200StrMetadata = fs.readFileSync(`${dstPath}/S200/java-metadata.json`);
const s200Metadata = JSON.parse(s200StrMetadata.toString());
console.log(s200Metadata);
expect(Object.keys(s200Metadata)).toContain('prUrl');
expect(s200Metadata.branch).toEqual('add-my-rule');
expect(s200Metadata.prUrl).toEqual('https://some.pr/url');
});
});
});
test('generates metadata for active rules', () => {
return withTestDir(async (dstPath) => {
generateRulesMetadata(path.join(__dirname, 'resources', 'rules'), dstPath);
const rules = fs.readdirSync(dstPath);
expect(rules.length).toEqual(5);
let treated = 0;
rules.forEach(ruleDir => {
const languages = fs.readdirSync(`${dstPath}/${ruleDir}`);
expect(languages.length).toBeGreaterThanOrEqual(1);
languages.forEach(file => {
const actual = JSON.parse(fs.readFileSync(`${dstPath}/${ruleDir}/${file}`).toString());
const expectedPath = path.join(__dirname, 'resources', 'metadata', ruleDir, file);
const expected = JSON.parse(fs.readFileSync(expectedPath).toString());
expect(actual).toStrictEqual(expected);
treated++;
})
});
expect(treated).toBe(13);
});
});
test('generates metadata for closed rules', () => {
return withTestDir(srcPath => {
createFiles(srcPath, {
'S01/metadata.json': JSON.stringify({
title: 'Rule is closed and has no language-specific specification',
type: 'CODE_SMELL',
status: 'closed',
sqKey: 'S01',
extra: {
legacyKeys: ['OldS01'],
},
}),
'S02/metadata.json': JSON.stringify({
title: 'Rule is closed and has one closed language-specific specification',
type: 'CODE_SMELL',
status: 'closed',
sqKey: 'S02',
}),
'S02/cfamily/metadata.json': JSON.stringify({
title: 'Language specification is closed',
status: 'closed',
extra: {
legacyKeys: ['OldS02'],
},
}),
});
return withTestDir(async dstPath => {
generateRulesMetadata(srcPath, dstPath);
const rules = fs.readdirSync(dstPath).sort();
expect(rules).toEqual(['S01', 'S02'].sort());
{
const rule = 'S01';
const rulePath = path.join(dstPath, rule);
// Verify that the expected files are generated and no others
const entries = fs.readdirSync(rulePath).sort();
expect(entries).toEqual(['default-metadata.json'].sort());
// Check the top-level metadata
const defaultFile = path.join(rulePath, 'default-metadata.json');
const defaultData = JSON.parse(fs.readFileSync(defaultFile, 'utf8'));
expect(defaultData).toMatchObject({
title: 'Rule is closed and has no language-specific specification',
type: 'CODE_SMELL',
status: 'closed',
languagesSupport: [],
allKeys: ['S01', 'OldS01'],
});
}
{
const rule = 'S02';
const rulePath = path.join(dstPath, rule);
// Verify that the expected files are generated and no others
const entries = fs.readdirSync(rulePath).sort();
expect(entries).toEqual(['default-metadata.json', 'cfamily-metadata.json'].sort());
// Check the top-level metadata
const defaultFile = path.join(rulePath, 'default-metadata.json');
const defaultData = JSON.parse(fs.readFileSync(defaultFile, 'utf8'));
// Generic data is overriden by the first language-specific specification.
expect(defaultData).toMatchObject({
title: 'Language specification is closed',
type: 'CODE_SMELL',
status: 'closed',
languagesSupport: [{ name: 'cfamily', status: 'closed', }],
allKeys: ['S02', 'OldS02'],
});
// Check the language-specific metadata
const cfamilyFile = path.join(rulePath, 'cfamily-metadata.json');
const cfamilyData = JSON.parse(fs.readFileSync(cfamilyFile, 'utf8'));
expect(cfamilyData).toMatchObject({
title: 'Language specification is closed',
type: 'CODE_SMELL',
status: 'closed',
languagesSupport: [{ name: 'cfamily', status: 'closed', }],
allKeys: ['S02', 'OldS02'],
});
}
});
});
});
test('allKeys include the sqKey overridden in all languages', () => {
return withTestDir((srcPath) => {
createFiles(srcPath, {
'S100/metadata.json': JSON.stringify({
sqKey: 'S100',
}),
'S100/java/metadata.json': JSON.stringify({
sqKey: 'S100-Java'
}),
'S100/python/metadata.json': JSON.stringify({
sqKey: 'S100-python'
}),
});
return withTestDir(async (dstPath) => {
generateRulesMetadata(srcPath, dstPath);
const javaStrMetadata = fs.readFileSync(`${dstPath}/S100/java-metadata.json`);
const javaMetadata = JSON.parse(javaStrMetadata.toString());
expect(javaMetadata).toMatchObject({
allKeys: ['S100-Java', 'S100-python', 'S100']
});
const pythonStrMetadata = fs.readFileSync(`${dstPath}/S100/python-metadata.json`);
const pythonMetadata = JSON.parse(pythonStrMetadata.toString());
expect(pythonMetadata).toMatchObject({
allKeys: ['S100-Java', 'S100-python', 'S100']
});
});
});
});
});

View File

@ -0,0 +1,59 @@
import fs from 'fs';
import { process_incomplete_rspecs, PullRequest } from '../pullRequestIndexing';
import Git from 'nodegit';
import 'setimmediate';
jest.mock('@octokit/rest', () => {
return {Octokit: function() {
this.rest = {pulls: {list: jest.fn(() => {
return { data: [
{ title: 'Irrelevant S832' },
{ title: 'Create rule S343: Be friendly',
html_url: 'https://pull.request/url',
head: {ref: 'gh:rspec/branches/friendly-branch'},
number: 42, },
{ title: 'Create rule S01, and friends',
html_url: 'example.com',
head: {ref: 'gh:rspec/branches/some-other-branch'},
number: 1, },
] }
})}};
}};
});
beforeEach(() => {
Git.Clone.clone = jest.fn();
let repo = {
config: () => ({ setString: (name: string, value: string) => {} }),
fetch: (remote: string) => {},
getBranch: (name: string) => {},
checkoutRef: (ref) => {}
};
Git.Clone.clone.mockReturnValueOnce(repo);
jest.spyOn(fs, 'existsSync').mockImplementation((fname) => {
return fname.replace(/\\/g, '/').includes('rules/S');
});
});
afterEach(() => {
jest.restoreAllMocks();
});
describe('pull request enumeration', () => {
test('clones repository and lists only relevant PRs', () => {
const nonExistingDir = 'not-existing-directory';
let processedPRs = [];
return process_incomplete_rspecs(nonExistingDir, (srcDir: string, pr: PullRequest) => {
processedPRs.push(pr.pull_id);
}).then(() => {
expect(Git.Clone.clone.mock.calls.length).toBe(1);
expect(Git.Clone.clone.mock.calls[0][1]).toBe(nonExistingDir);
expect(processedPRs).toHaveLength(2);
expect(processedPRs).toContain(1);
expect(processedPRs).toContain(42);
});
});
});

Some files were not shown because too many files have changed in this diff Show More