Compare commits

...

885 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
3297 changed files with 66993 additions and 11142 deletions

View File

@ -1,4 +1,4 @@
load("github.com/SonarSource/cirrus-modules@v2", "load_features")
load("github.com/SonarSource/cirrus-modules@v3", "load_features")
def main(ctx):
return load_features(ctx)

View File

@ -1,5 +1,5 @@
env:
COVERAGE_GITHUB_TOKEN: VAULT[development/github/token/${CIRRUS_REPO_OWNER}-${CIRRUS_REPO_NAME}-ro token]
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
@ -25,7 +25,7 @@ container_definition: &CONTAINER_DEFINITION
setup_sonar_scanner: &SETUP_SONAR_SCANNER
setup_sonar_scanner_script:
- apt update -y && apt upgrade -y && apt update -y && apt install -y unzip
- 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/
@ -38,9 +38,7 @@ tooling_tests_task:
env:
PYTHONPATH: .
install_dependencies_script:
- cd rspec-tools
- pipenv install --dev
- pipenv run pip install pytest pytest-cov
- ci/install_rspec_tools_dependencies.sh
tests_script:
- bash ci/fetch_branches.sh
- cd rspec-tools
@ -77,15 +75,6 @@ frontend_tests_task:
- cd frontend
- sonar-scanner
validate_metadata_task:
eks_container:
<<: *CONTAINER_DEFINITION
dockerfile: ci/Dockerfile
cpu: 1
memory: 2G
metadata_tests_script:
- ./ci/validate_metadata.sh
validate_ci_tests_task:
skip: "!changesInclude('ci_tests/**', 'ci/**')"
eks_container:
@ -96,17 +85,22 @@ validate_ci_tests_task:
ci_tests_script:
- ./ci_tests/asciidoc_validation/run_tests.sh
validate_asciidoc_task:
validate_rules_task:
eks_container:
<<: *CONTAINER_DEFINITION
dockerfile: ci/Dockerfile
cpu: 1
memory: 2G
asciidoc_tests_script:
metadata_validation_script:
- ./ci/validate_metadata.sh
file_extensions_validation_script:
- ./ci/validate_file_extensions.sh
asciidoc_validation_script:
- ./ci/validate_asciidoc.sh
validate_links_task:
timeout_in: 120m
execution_lock: RSPEC_validate_links
eks_container:
<<: *CONTAINER_DEFINITION
dockerfile: ci/Dockerfile
@ -117,31 +111,20 @@ validate_links_task:
LINK_CACHE_PATH: /root/link-probing-history.cache
cache_download_script:
- bash ci/cirrus-cache.sh download ${LINK_CACHE_NAME} ${LINK_CACHE_PATH}
tests_script:
- md5sum /root/link-probing-history.cache/link_probes.history || true
tests_script:
- ./ci/validate_links.sh ${LINK_CACHE_PATH}
- md5sum /root/link-probing-history.cache/link_probes.history
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}
validate_file_extensions_task:
eks_container:
<<: *CONTAINER_DEFINITION
dockerfile: ci/Dockerfile
cpu: 1
memory: 2G
file_extension_tests_script:
- bash ./ci/validate_file_extensions.sh
all_required_checks_task:
depends_on:
- tooling_tests
- frontend_tests
- validate_metadata
- validate_asciidoc
- validate_rules
- validate_ci_tests
- validate_file_extensions
eks_container:
<<: *CONTAINER_DEFINITION
dockerfile: ci/Dockerfile

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

2
.github/CODEOWNERS vendored
View File

@ -1 +1 @@
.github/CODEOWNERS @sonarsource/analysis-cfamily-squad
.github/CODEOWNERS @sonarsource/quality-cfamily-squad

View File

@ -1,3 +1,12 @@
<!--
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:

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 }}

View File

@ -16,17 +16,12 @@ jobs:
add_language_to_rule:
runs-on: ubuntu-latest
permissions:
id-token: write # OIDC auth for Vault
contents: read # checkout
contents: write
pull-requests: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: 'get secrets'
id: secrets
uses: SonarSource/vault-action-wrapper@v3
with:
secrets: |
development/github/token/SonarSource-rspec-coverage token | COVERAGE_GITHUB_TOKEN;
- uses: actions/checkout@v4
with:
persist-credentials: true
@ -46,7 +41,5 @@ jobs:
run: pipenv install
- name: 'Add Language'
env:
COVERAGE_GITHUB_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).COVERAGE_GITHUB_TOKEN }}
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

@ -13,17 +13,12 @@ jobs:
create_new_rule:
runs-on: ubuntu-latest
permissions:
id-token: write # OIDC auth for Vault
contents: read # checkout
contents: write
pull-requests: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: 'get secrets'
id: secrets
uses: SonarSource/vault-action-wrapper@v3
with:
secrets: |
development/github/token/SonarSource-rspec-coverage token | COVERAGE_GITHUB_TOKEN;
- uses: actions/checkout@v4
with:
persist-credentials: true
@ -43,7 +38,5 @@ jobs:
run: pipenv install
- name: 'Create Rule'
env:
COVERAGE_GITHUB_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).COVERAGE_GITHUB_TOKEN }}
working-directory: 'rspec/rspec-tools'
run: pipenv run rspec-tools create-rule --user ${{ github.actor }} --languages "${{ github.event.inputs.languages }}"

View File

@ -7,20 +7,11 @@ on:
jobs:
build-and-deploy:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
permissions:
id-token: write # OIDC auth for Vault
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
pages: write # for github-pages-deploy-action
steps:
- name: 'get secrets'
id: secrets
uses: SonarSource/vault-action-wrapper@v3
with:
secrets: |
development/github/token/SonarSource-rspec-coverage token | COVERAGE_GITHUB_TOKEN;
- name: Checkout 🛎️
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:
@ -36,7 +27,7 @@ jobs:
npm run predeploy
env:
NODE_OPTIONS: "--max-old-space-size=3048"
COVERAGE_GITHUB_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).COVERAGE_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@releases/v3
with:

View File

@ -2,13 +2,15 @@ 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 # OIDC auth for Vault
contents: read # checkout
id-token: write # required by SonarSource/vault-action-wrapper
contents: write
actions: write # required by andymckay/cancel-action
env:
TMP_BRANCH: temporary/coverage_update
@ -18,15 +20,17 @@ jobs:
uses: SonarSource/vault-action-wrapper@v3
with:
secrets: |
development/github/token/SonarSource-rspec-coverage token | COVERAGE_GITHUB_TOKEN;
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
ref: master
fetch-depth: 0
path: 'rspec'
token: ${{ fromJSON(steps.secrets.outputs.vault).COVERAGE_GITHUB_TOKEN }}
token: ${{ fromJSON(steps.secrets.outputs.vault).coverage_github_token }}
ref: 'master'
- uses: actions/setup-python@v4
with:
python-version: '3.9'
@ -41,7 +45,7 @@ jobs:
- name: 'Regenerate coverage information'
env:
COVERAGE_GITHUB_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).COVERAGE_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).coverage_github_token }}
id: gen-coverage
working-directory: 'rspec/rspec-tools'
run: |
@ -69,39 +73,62 @@ jobs:
git commit -m "update coverage information"
git push --force-with-lease origin $TMP_BRANCH
- name: 'Wait for CI to succeed'
if: steps.gen-coverage.outputs.new_coverage == 'true'
uses: fountainhead/action-wait-for-check@v1.0.0
id: wait-for-build
with:
token: ${{ secrets.COVERAGE_GITHUB_TOKEN }}
checkName: all_required_checks
ref: ${{ env.TMP_BRANCH }}
timeoutSeconds: 2400
intervalSeconds: 30
- 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: 'Push the updated coverage to master'
if: |
steps.gen-coverage.outputs.new_coverage == 'true' &&
steps.wait-for-build.outputs.conclusion == 'success'
- 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: |
git checkout master
git merge $TMP_BRANCH
git push origin master
set -ueo pipefail
- name: 'Delete the temporary branch'
if: always() && steps.create-temp-branch.conclusion == 'success'
uses: dawidd6/action-delete-branch@v3
with:
COVERAGE_GITHUB_TOKEN: ${{ secrets.COVERAGE_GITHUB_TOKEN}}
branches: ${{ env.TMP_BRANCH}}
# Implicitly referring to the PR corresponding to current branch
- name: 'Fail if the change breaks CI'
if: |
steps.gen-coverage.outputs.new_coverage == 'true' &&
steps.wait-for-build.outputs.conclusion != 'success'
run: exit 1
# 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() }}

View File

@ -1,6 +1,6 @@
name: Update quick fix status
on:
on:
workflow_dispatch:
inputs:
rule:
@ -25,17 +25,13 @@ on:
jobs:
update_quickfix_status:
name: Update quick fix status
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
permissions:
id-token: write # OIDC auth for Vault
contents: read # checkout
contents: write
pull-requests: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: 'get secrets'
id: secrets
uses: SonarSource/vault-action-wrapper@v3
with:
secrets: |
development/github/token/SonarSource-rspec-coverage token | COVERAGE_GITHUB_TOKEN;
- uses: actions/checkout@v2
with:
persist-credentials: true
@ -56,6 +52,4 @@ jobs:
- name: 'Update quickfix status'
working-directory: 'rspec/rspec-tools'
env:
COVERAGE_GITHUB_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).COVERAGE_GITHUB_TOKEN }}
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 }}"

1
.gitignore vendored
View File

@ -10,6 +10,7 @@
# generated files
/rules/**/*.html
/frontend/public/rules
rspec-tools/link_probes.history
# compiled files
*.out

275
LICENSE
View File

@ -1,165 +1,184 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
SONAR Source-Available License v1.0
Last Updated November 13, 2024
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
1. DEFINITIONS
"Agreement" means this Sonar Source-Available License v1.0
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
"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.
0. Additional Definitions.
"Contribution" means:
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
a) in the case of the initial Contributor, the initial content Distributed under
this Agreement, and
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
b) in the case of each subsequent Contributor:
i) changes to the Program, and
ii) additions to the Program;
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
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.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
"Contributor" means any person or entity that Distributes the Program.
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
"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.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
"Distribute" means the acts of a) distributing or b) making available in any
manner that enables the transfer of a copy.
1. Exception to Section 3 of the GNU GPL.
"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.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
"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.
2. Conveying Modified Versions.
"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.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
"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
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
"Program" means the Contributions Distributed in accordance with this Agreement.
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
"Recipient" means anyone who receives the Program under this Agreement,
including Contributors.
3. Object Code Incorporating Material from Library Header Files.
"SonarQube" means an open-source or commercial edition of software offered by
SonarSource that is branded "SonarQube".
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
"SonarSource" means SonarSource SA, a Swiss company registered in Switzerland
under UID No. CHE-114.587.664.
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
"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.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
2. GRANT OF RIGHTS
4. Combined Works.
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.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
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.
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
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.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
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.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
3. REQUIREMENTS
d) Do one of the following:
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
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
3.2 When the Program is Distributed as Source Code:
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
a) it must be made available under this Agreement, and
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
b) a copy of this Agreement must be included with each copy of the Program.
5. Combined Libraries.
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.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
4. NO WARRANTY
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
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.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
5. DISCLAIMER OF LIABILITY
6. Revised Versions of the GNU Lesser General Public License.
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.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
6. GENERAL
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
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 the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
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.

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.

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."

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

0
ci/validate_file_extensions.sh Normal file → Executable file
View File

View File

@ -13,17 +13,20 @@ 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 [[ -d "$rule" ]] && echo "$rule" || true; done | # filter non-deleted rules
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[@]}"
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"

View File

@ -2,7 +2,7 @@
== In the RSPEC
The rule status (`/status` in the metadata) should be set to `deprecated`.
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.

View File

@ -271,6 +271,24 @@ 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

View File

@ -1,3 +1,4 @@
// Ansible
// C#
* ASP.NET
* ASP.NET Core
@ -8,6 +9,7 @@
* Dapper
* BouncyCastle
* Jwt.Net
* Blazor
// C-Family
* Botan
* CryptoPP
@ -25,6 +27,7 @@
* libxml2
// Java
* Android
* Android WebView
* Apache Commons
* Apache Commons
* Apache Commons Email
@ -40,14 +43,16 @@
* Java EE
* Java JWT
* Java SE
* Java JDBC API
* Java I/O API
* Jdom2
* JSP
* Legacy Mongo Java API
* OkHttp
* Realm
* Java Cryptography Extension
* Apache HttpClient
* Couchbase
* SAX
* Servlet
* Spring
* Spring Data MongoDB
@ -57,10 +62,13 @@
* SQLCipher
* Thymeleaf
// JS
* Jasmine
* Jest
* Flow.js
* Node.js
* Express.js
* SSH2
* Mocha
* MongoDB
* Mongoose
* Sequelize
@ -75,6 +83,7 @@
* TypeScript
* PropTypes
* JSX
* Electron
// PHP
* Core PHP
* Guzzle
@ -89,6 +98,7 @@
* Argon2-cffi
* Bcrypt
* Cryptodome
* databases
* Django
* Django Templates
* FastAPI
@ -109,6 +119,7 @@
* python-ldap
* Python SQLite
* Python Standard Library
* PyTorch
* PyYAML
* Requests
* Scrypt
@ -116,6 +127,7 @@
* SignXML
* SQLAlchemy
* ssl
* TensorFlow
// Docker
* Wget
// Cloudformation
@ -141,7 +153,7 @@
* CryptoSwift
* IDZSwiftCommonCrypto
// Azure resource manager
* ARM templates
* JSON templates
* Bicep
// PL/SQL
* DBMS_CRYPTO
@ -149,3 +161,5 @@
* Go Standard Library
// Kubernetes
* Helm
// Kotlin
Jetpack Compose

View File

@ -45,6 +45,7 @@ When web pages have massively long names like "Java™ Platform, Standard Editio
* 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

View File

@ -40,6 +40,6 @@ You can update the quickfix field using this GitHub Workflow: https://github.com
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 (`"LOW"`, `"MEDIUM"` or `"HIGH"`). Note that at least one software quality has to be specified. The current list of allowed software qualities is `"MAINTAINABILITY"`, `"RELIABILITY"` and `"SECURITY"`.
* `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"`.

View File

@ -109,3 +109,17 @@ Use it when referencing variable names, file names, tokens, and all kinds of spe
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
----

View File

@ -36,7 +36,7 @@ NOTE: If the script fails to clone or fetch due to an SSL certificate failure
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 `COVERAGE_GITHUB_TOKEN` to your personal GitHub token
You might want to set `GITHUB_TOKEN` to your personal GitHub token
to avoid GitHub throttling your requests during the predeploy stage.

File diff suppressed because it is too large Load Diff

View File

@ -158,22 +158,24 @@ const languageToJiraProject = new Map(Object.entries({
'HTML': 'SONARHTML',
'PHP': 'SONARPHP',
'PLI': 'SONARPLI',
'PLSQL': 'SONARPLSQL',
'PLSQL': 'PLSQL',
'RPG': 'SONARRPG',
'APEX': 'SONARSLANG',
'RUBY': 'SONARSLANG',
'APEX': 'SONARAPEX',
'RUBY': 'SONARRUBY',
'RUST': 'SKUNK',
'KOTLIN': 'SONARKT',
'SCALA': 'SONARSLANG',
'GO': 'SONARSLANG',
'SECRETS': 'SECRETS',
'SCALA': 'SONARSCALA',
'GO': 'SONARGO',
'SECRETS': 'SONARTEXT',
'SWIFT': 'SONARSWIFT',
'TSQL': 'SONARTSQL',
'VB6': 'SONARVBSIX',
'TSQL': 'TSQL',
'VB6': 'VB6',
'XML': 'SONARXML',
'CLOUDFORMATION': 'SONARIAC',
'TERRAFORM': 'SONARIAC',
'KUBERNETES': 'SONARIAC',
'TEXT': 'SONARTEXT',
'ANSIBLE': 'SONARIAC',
}));
const languageToGithubProject = new Map(Object.entries({
@ -187,10 +189,11 @@ const languageToGithubProject = new Map(Object.entries({
'TYPESCRIPT': 'SonarJS',
'SWIFT': 'sonar-swift',
'KOTLIN': 'sonar-kotlin',
'GO': 'slang-enterprise',
'SCALA': 'slang-enterprise',
'RUBY': 'slang-enterprise',
'APEX': 'slang-enterprise',
'GO': 'sonar-go',
'SCALA': 'sonar-scala',
'RUBY': 'sonar-ruby',
'RUST': 'sonar-rust',
'APEX': 'sonar-apex',
'HTML': 'sonar-html',
'COBOL': 'sonar-cobol',
'VB6': 'sonar-vb',
@ -209,8 +212,9 @@ const languageToGithubProject = new Map(Object.entries({
'CLOUDFORMATION': 'sonar-iac',
'TERRAFORM': 'sonar-iac',
'KUBERNETES': 'sonar-iac',
'SECRETS': 'sonar-secrets',
'SECRETS': 'sonar-text',
'TEXT': 'sonar-text',
'ANSIBLE': 'sonar-iac-enterprise',
}));
function ticketsAndImplementationPRsLinks(ruleNumber: string, title: string, language?: string) {
@ -316,7 +320,7 @@ function usePageMetadata(ruleid: string, language: string, classes: UsedStyles):
if (coverage !== 'Not Covered') {
prUrl = undefined;
branch = 'master';
branch = 'master';
}
return {

View File

@ -24,14 +24,14 @@ export interface PullRequest {
*/
export async function process_incomplete_rspecs(tmpRepoDir: string,
callback: (srcDir: string, pr: PullRequest)=>void) {
const octokit = process.env.COVERAGE_GITHUB_TOKEN ?
new Octokit({userAgent: 'rspec-tools', auth: process.env.COVERAGE_GITHUB_TOKEN}):
const octokit = process.env.GITHUB_TOKEN ?
new Octokit({userAgent: 'rspec-tools', auth: process.env.GITHUB_TOKEN}):
new Octokit({userAgent: 'rspec-tools'});
const repo = await (() => {
if (!fs.existsSync(path.join(tmpRepoDir, '.git'))) {
if (process.env.COVERAGE_GITHUB_TOKEN) {
return Git.Clone.clone(`https://${process.env.COVERAGE_GITHUB_TOKEN}@github.com/SonarSource/rspec/`, tmpRepoDir);
if (process.env.GITHUB_TOKEN) {
return Git.Clone.clone(`https://${process.env.GITHUB_TOKEN}@github.com/SonarSource/rspec/`, tmpRepoDir);
} else {
return Git.Clone.clone('https://github.com/SonarSource/rspec/', tmpRepoDir);
}

View File

@ -27,6 +27,7 @@ const languageToSonarpedia = new Map<string, string[]>(Object.entries({
'plsql': ['PLSQL'],
'python': ['PY'],
'rpg': ['RPG'],
'rust': ['RUST'],
'secrets': ['SECRETS'],
'swift': ['SWIFT'],
'tsql': ['TSQL'],
@ -37,7 +38,8 @@ const languageToSonarpedia = new Map<string, string[]>(Object.entries({
'cloudformation': ['CLOUDFORMATION'],
'terraform': ['TERRAFORM'],
'kubernetes': ['KUBERNETES'],
'text': ['TEXT']
'text': ['TEXT'],
'ansible': ['ANSIBLE']
}));
export function useRuleCoverage() {

View File

@ -55,5 +55,5 @@ In order to generate an HTML file from the ASCIIdoc, you can use [asciidoctor](h
[source,sh]
----
$ asciidoctor -e rule.adoc
$ asciidoctor rule.adoc
----

View File

@ -3,11 +3,11 @@
"type": "VULNERABILITY",
"code": {
"impacts": {
"SECURITY": "HIGH"
"SECURITY": "BLOCKER"
},
"attribute": "TRUSTWORTHY"
},
"status": "ready",
"status": "beta",
"remediation": {
"func": "Constant\/Issue",
"constantCost": "30min"
@ -45,7 +45,7 @@
"3.5.2",
"6.4.1"
],
"STIG ASD 2023-06-08": [
"STIG ASD_V5R3": [
"V-222642"
]
},

View File

@ -1,3 +1,11 @@
:example_env: ENV_VAR_NAME
:example_name: java-property-name
:example_secret: example_secret_value
// Set value that can be used to refer to the type of secret in, for example:
// "An attacker can use this {secret_type} to ..."
// Commonly used values: access token, api key, application secret, application key or consumer key, service password, OAuth token, deployment password
:secret_type: secret
include::../../../shared_content/secrets/description.adoc[]
@ -9,31 +17,96 @@ include::../../../shared_content/secrets/rationale.adoc[]
// Optional: Give a general description of the secret and what it's used for.
Below are some real-world scenarios that illustrate some impacts of an attacker
exploiting the secret.
include::../../../shared_content/secrets/impact/generic_impact.adoc[]
// Set value that can be used to refer to the type of secret in, for example:
// "An attacker can use this {secret_type} to ..."
:secret_type: secret
// Uncomment the following line, if specifying detailed impacts from below (also make sure to have new lines around the uncommented includes):
// include::../../../shared_content/secrets/impact/specific_impact_intro.adoc[]
// Where possible, use predefined content for common impacts. This content can
// be found in the folder "shared_content/secrets/impact".
// When using predefined content, search for any required variables to be set and include them in this file.
// Not adding them will not trigger warnings.
// Secret may allow hosting arbitrary files
// include::../../../shared_content/secrets/impact/malware_distribution.adoc[]
//include::../../../shared_content/secrets/impact/some_impact.adoc[]
// Secret may allow accessing or compromising sensitive data
// include::../../../shared_content/secrets/impact/data_compromise.adoc[]
// Secret may allow uploading artifacts to services used elsewhere in the supply chain
// This is specific for code and artifact repositories
// include::../../../shared_content/secrets/impact/supply_chain_attack.adoc[]
// Secret may be used to trigger workflows
// This is webhook-specific
// include::../../../shared_content/secrets/impact/codeless_vulnerability_chaining.adoc[]
// OAuth tokens may allow accessing 3rd party services
// include::../../../shared_content/secrets/impact/oauth_token_compromise.adoc[]
// Mailing service compromise may allow sending spam, which may result in account termination
// include::../../../shared_content/secrets/impact/suspicious_activities_termination.adoc[]
// Sensitive information leak / identity impersonation, e.g., through leaked signing secret
// include::../../../shared_content/secrets/impact/security_downgrade.adoc[]
// Audit trail discrepancies
// include::../../../shared_content/secrets/impact/non_repudiation.adoc[]
// Package repository secrets may allow access to source code etc.
// include::../../../shared_content/secrets/impact/source_code_compromise.adoc[]
// Spamming automated calls may cause large bills and rate limited service access
// include::../../../shared_content/secrets/impact/exceed_rate_limits.adoc[]
// For blockchain specific tokens
// include::../../../shared_content/secrets/impact/blockchain_data_exposure.adoc[]
// Specific for banking / financial transaction tokens, causing financial loss
// include::../../../shared_content/secrets/impact/banking_financial_loss.adoc[]
// Secret can be used to send spam or phish users
// include::../../../shared_content/secrets/impact/phishing.adoc[]
// Secret may allow modifying application data (object stores etc.)
// include::../../../shared_content/secrets/impact/data_modification.adoc[]
// Specific to services that are used to share PII (personal infos, chat logs, ..)
// include::../../../shared_content/secrets/impact/personal_data_compromise.adoc[]
// Secret may allow accessing financial data, like CC information or confidential financial reports
// include::../../../shared_content/secrets/impact/disclosure_of_financial_data.adoc[]
// Secret may allow occurring financial losses through 3rd party API usage
// include::../../../shared_content/secrets/impact/financial_loss.adoc[]
// Secret may be used to modify dashboards to corrupt shown data
// Requires setting service_name variable
// :service_name: secret service
// include::../../../shared_content/secrets/impact/dataviz_takeover.adoc[]
// Secret is related to IaaS providers and can be used to change DNS, launch VMs, etc.
// Requires setting service_name variable
// :service_name: secret service
// include::../../../shared_content/secrets/impact/infrastructure_takeover.adoc[]
== How to fix it
// 1. Revoke leaked secrets
include::../../../shared_content/secrets/fix/revoke.adoc[]
// 2. Analyze recent use to identify misuse
include::../../../shared_content/secrets/fix/recent_use.adoc[]
// 3. Use a secret vault in the future
include::../../../shared_content/secrets/fix/vault.adoc[]
=== Code examples
// 4. Never hard-code secrets
:example_secret: example_secret_value
:example_name: java-property-name
:example_env: ENV_VAR_NAME
include::../../../shared_content/secrets/fix/default.adoc[]
// OAuth PKCE is very specific to OAuth 2.0
// include::../../../shared_content/secrets/fix/oauth_pkce.adoc[]
=== Code examples
include::../../../shared_content/secrets/examples.adoc[]

View File

@ -1,21 +1,28 @@
import os,io
import re
import requests
import json
import random
import datetime
from bs4 import BeautifulSoup
from socket import timeout
import json
import pathlib
import random
import socket
import requests
from bs4 import BeautifulSoup
TOLERABLE_LINK_DOWNTIME = datetime.timedelta(days=7)
LINK_PROBES_HISTORY_FILE = './link_probes.history'
PROBING_COOLDOWN = datetime.timedelta(days=1)
PROBING_SPREAD = 100 # minutes
PROBING_COOLDOWN = datetime.timedelta(days=2)
PROBING_SPREAD = 60 * 24 # in minutes, 1 day
link_probes_history = {}
# These links consistently fail in CI, but work-on-my-machine
EXCEPTIONS = [
EXCEPTION_PREFIXES = [
# It seems the server certificate was renewed on 2nd of August 2024.
# The server is sending only its certificate, without including the
# Intermediate certificate used to issue the server cert. Because of that
# some application are not able to verify the complete chain of trust.
"https://wiki.sei.cmu.edu/",
# The CI reports 403 on drupal.org while it works locally.
# Maybe the CI's IP is blocklisted...
"https://www.drupal.org/",
]
def show_files(filenames):
@ -65,7 +72,7 @@ def live_url(url: str, timeout=5):
req = requests.Request('GET', url, headers = {'sec-ch-ua': '" Not A;Brand";v="99", "Chromium";v="90"',
'sec-ch-ua-mobile': '?0',
'Upgrade-Insecure-Requests': '1',
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 GLS/100.10.9939.100',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
'Sec-Fetch-Site':'none',
'Sec-Fetch-Mode':'navigate',
@ -94,13 +101,13 @@ def live_url(url: str, timeout=5):
print(f"ERROR: Too many redirects: {rr}")
return False
except requests.Timeout as t:
print(f"ERROR: timeout ", t)
print(f"ERROR: Request timeout {t}")
return False
except timeout as t:
print(f"ERROR: timeout ", t)
except socket.timeout as t:
print(f"ERROR: Socket timeout {t}")
return False
except Exception as e:
print(f"ERROR: ", e)
print(f"ERROR: {e}")
return False
def findurl_in_html(filename,urls):
@ -145,20 +152,51 @@ def get_all_links_from_htmls(dir):
print("All html files crawled")
return urls
def probe_links(urls):
def url_is_exception(url: str) -> bool:
return any(
url.startswith(e) for e in EXCEPTION_PREFIXES
)
def probe_links(urls: dict) -> bool:
errors = []
link_cache_exception = 0
link_cache_hit = 0
link_cache_miss = 0
print("Testing links")
for url in urls:
print(f"{url} in {len(urls[url])} files")
if url in EXCEPTIONS:
link_count = len(urls)
for idx, url in enumerate(urls):
print(f"[{idx+1}/{link_count}] {url} in {len(urls[url])} files")
if url_is_exception(url):
link_cache_exception += 1
print("skip as an exception")
elif url_was_reached_recently(url):
link_cache_hit += 1
print("skip probing because it was reached recently")
elif live_url(url, timeout=5):
link_cache_miss += 1
rejuvenate_url(url)
elif url_is_long_dead(url):
link_cache_miss += 1
errors.append(url)
return errors
else:
link_cache_miss += 1
confirmed_errors = confirm_errors(errors, urls)
print(f"\n\n\n{'=' * 80}\n\n\n")
if confirmed_errors:
report_errors(confirmed_errors, urls)
print(f"{len(confirmed_errors)}/{len(urls)} links are dead, see above ^^ the list and the related files\n\n")
print("Cache statistics:")
print(f"\t{link_cache_hit=}")
print(f"\t{link_cache_miss=}")
link_cache_hit_ratio = (link_cache_hit) / (link_cache_hit + link_cache_miss)
print(f"\t{link_cache_hit_ratio:03.2%} hits")
print(f"\t{link_cache_exception=}")
print(f"\n\n\n{'=' * 80}\n\n\n")
success = len(confirmed_errors) == 0
return success
def confirm_errors(presumed_errors, urls):
confirmed_errors = []
@ -180,16 +218,9 @@ def report_errors(errors, urls):
def check_html_links(dir):
load_url_probing_history()
urls = get_all_links_from_htmls(dir)
errors = probe_links(urls)
exit_code = 0
if errors:
confirmed_errors = confirm_errors(errors, urls)
if confirmed_errors:
report_errors(confirmed_errors, urls)
print(f"{len(confirmed_errors)}/{len(urls)} links are dead, see above ^^ the list and the related files")
exit_code = 1
if exit_code == 0:
success = probe_links(urls)
if success:
print(f"All {len(urls)} links are good")
save_url_probing_history()
exit(exit_code)
exit(0 if success else 1)

View File

@ -45,7 +45,7 @@ def check_links(d):
@click.option('--user', required=False)
def create_rule(languages: str, user: Optional[str]):
'''Create a new rule.'''
token = os.environ.get('COVERAGE_GITHUB_TOKEN')
token = os.environ.get('GITHUB_TOKEN')
rspec_tools.create_rule.create_new_rule(languages, token, user)
@ -55,7 +55,7 @@ def create_rule(languages: str, user: Optional[str]):
@click.option('--user', required=False)
def add_lang_to_rule(language: str, rule: str, user: Optional[str]):
'''Add a new language to rule.'''
token = os.environ.get('COVERAGE_GITHUB_TOKEN')
token = os.environ.get('GITHUB_TOKEN')
rspec_tools.create_rule.add_language_to_rule(language, rule, token, user)
@ -66,7 +66,7 @@ def add_lang_to_rule(language: str, rule: str, user: Optional[str]):
@click.option('--user', required=False)
def update_quickfix_status(language: str, rule: str, status: str, user: Optional[str]):
'''Update the status of quick fix for the given rule/language'''
token = os.environ.get('COVERAGE_GITHUB_TOKEN')
token = os.environ.get('GITHUB_TOKEN')
rspec_tools.modify_rule.update_rule_quickfix_status(language, rule, status, token, user)

View File

@ -1,14 +1,43 @@
import os
import sys
import json
import collections
from git import Repo
from git import Git
import json
import os
import re
import sys
from pathlib import Path
from rspec_tools.utils import (load_json, pushd)
from git import Git, Repo
from rspec_tools.utils import load_json, pushd
REPOS = ['sonar-abap','sonar-cpp','sonar-cobol','sonar-dotnet','sonar-css','sonar-flex','slang-enterprise','sonar-java','SonarJS','sonar-php','sonar-pli','sonar-plsql','sonar-python','sonar-rpg','sonar-swift','sonar-text','sonar-tsql','sonar-vb','sonar-html','sonar-xml','sonar-kotlin', 'sonar-secrets', 'sonar-security', 'sonar-dataflow-bug-detection', 'sonar-iac']
REPOS = [
'sonar-abap',
'sonar-apex',
'sonar-architecture',
'sonar-cobol',
'sonar-cpp',
'sonar-dart',
'sonar-dataflow-bug-detection',
'sonar-dotnet-enterprise',
'sonar-flex',
'sonar-go-enterprise',
'sonar-html',
'sonar-iac-enterprise',
'sonar-java',
'SonarJS',
'sonar-kotlin',
'sonar-php',
'sonar-pli',
'sonar-plsql',
'sonar-python-enterprise',
'sonar-rpg',
'sonar-ruby',
'sonar-scala',
'sonar-security',
'sonar-swift',
'sonar-text-enterprise',
'sonar-tsql',
'sonar-vb',
'sonar-xml'
]
CANONICAL_NAMES = {
'CLOUD_FORMATION': 'CLOUDFORMATION',
@ -17,14 +46,14 @@ CANONICAL_NAMES = {
'WEB': 'HTML'
}
RULES_FILENAME = 'covered_rules.json'
def get_rule_id(filename):
rule_id = filename[:-5]
if '_' in rule_id:
return rule_id[:rule_id.find('_')]
else:
return rule_id
return rule_id.removesuffix('_abap').removesuffix('_java')
def compatible_languages(rule, languages_from_sonarpedia):
'''
@ -43,7 +72,7 @@ def get_implemented_rules(path, languages_from_sonarpedia):
for lang in languages_from_sonarpedia:
implemented_rules[lang] = []
for filename in os.listdir(path):
if filename.endswith(".json") and not filename.startswith("Sonar_way"):
if filename.endswith(".json") and 'profile' not in filename:
rule = load_json(os.path.join(path, filename))
rule_id = get_rule_id(filename)
for language in compatible_languages(rule, languages_from_sonarpedia):
@ -153,19 +182,31 @@ def all_implemented_rules():
def checkout_repo(repo):
git_url=f"https://github.com/SonarSource/{repo}"
token=os.getenv('COVERAGE_GITHUB_TOKEN')
token=os.getenv('GITHUB_TOKEN')
if token:
git_url=f"https://${token}@github.com/SonarSource/{repo}"
git_url=f"https://oauth2:{token}@github.com/SonarSource/{repo}"
if not os.path.exists(repo):
return Repo.clone_from(git_url, repo)
else:
return Repo(repo)
VERSION_RE = re.compile(r'\d[\d\.]+')
def is_version_tag(name):
return bool(re.fullmatch(VERSION_RE, name))
def comparable_version(key):
if not is_version_tag(key):
return [0]
return list(map(int, key.split('.')))
def collect_coverage_for_all_versions(repo, coverage):
git_repo = checkout_repo(repo)
tags = git_repo.tags
tags.sort(key = lambda t: t.commit.committed_date)
versions = [tag.name for tag in tags if '-' not in tag.name]
versions = [tag.name for tag in tags if is_version_tag(tag.name)]
versions.sort(key = comparable_version)
for version in versions:
collect_coverage_for_version(repo, git_repo, version, coverage)
collect_coverage_for_version(repo, git_repo, 'master', coverage)

View File

@ -19,7 +19,7 @@ LANG_TO_LABEL = {'abap': 'abap',
'dart': 'dart',
'docker': 'iac',
'flex': 'flex',
'go': 'slang',
'go': 'go',
'html': 'html',
'java': 'java',
'javascript': 'jsts',
@ -40,6 +40,7 @@ LANG_TO_LABEL = {'abap': 'abap',
'tsql': 'tsql',
'vb6': 'vb6',
'vbnet': 'dotnet',
'ansible': 'iac',
'cloudformation': 'iac',
'terraform': 'iac',
'kubernetes': 'iac',
@ -76,6 +77,7 @@ LANG_TO_SOURCE = {
'c': 'c',
'objectivec': 'objectivec',
'vb': 'vb',
'ansible': 'yaml',
# these languages are not supported by highlight.js as the moment:
'apex': 'apex',
'azureresourcemanager': 'bicep',

View File

@ -1,6 +1,6 @@
import re
from pathlib import Path
from typing import Final, Dict, List
from typing import Dict, Final, List, Union
from bs4 import BeautifulSoup
from rspec_tools.errors import RuleValidationError
@ -78,15 +78,26 @@ def intersection(list1, list2):
def difference(list1, list2):
return list(set(list1) - set(list2))
def validate_titles_are_not_misclassified_as_subtitles(rule_language: LanguageSpecificRule, subtitles: list[str], allowed_h2_sections: list[str]):
# TODO This does not validate "How to fix it" section for frameworks as the section names are a bit special.
misclassified = intersection(subtitles, allowed_h2_sections)
if misclassified:
misclassified.sort()
misclassified_str = ', '.join(misclassified)
raise RuleValidationError(f'Rule {rule_language.id} has some sections misclassified. Ensure there are not too many `=` in the asciidoc file for: {misclassified_str}')
def validate_section_names(rule_language: LanguageSpecificRule):
"""Validates all h2-level section names"""
def get_titles(level: Union[str, list[str]]) -> list[str]:
return list(map(lambda x: x.text.strip(), rule_language.description.find_all(level)))
descr = rule_language.description
h2_titles = list(map(lambda x: x.text.strip(), descr.find_all('h2')))
h2_titles = get_titles('h2')
subtitles = get_titles(['h3', 'h4', 'h5', 'h6'])
allowed_h2_sections = list(MANDATORY_SECTIONS) + list(OPTIONAL_SECTIONS.keys())
validate_titles_are_not_misclassified_as_subtitles(rule_language, subtitles, allowed_h2_sections)
validate_duplications(h2_titles, rule_language)
education_titles = intersection(h2_titles, list(MANDATORY_SECTIONS) + list(OPTIONAL_SECTIONS.keys()))
education_titles = intersection(h2_titles, allowed_h2_sections)
if education_titles:
# Using the education format.
validate_how_to_fix_it_sections_names(rule_language, h2_titles)
@ -234,7 +245,7 @@ def validate_security_standard_links(rule_language: LanguageSpecificRule):
# Avoid raising mismatch issues on deprecated or closed rules
if metadata.get('status') != 'ready':
return
security_standards_metadata = metadata.get('securityStandards', {})
for standard in SECURITY_STANDARD_URL.keys():
@ -244,7 +255,7 @@ def validate_security_standard_links(rule_language: LanguageSpecificRule):
extra_links = difference(links_mapping, metadata_mapping)
if len(extra_links) > 0:
raise RuleValidationError(f'Rule {rule_language.id} has a mismatch for the {standard} security standards. Remove links from the Resources/See section ({extra_links}) or fix the rule metadata')
missing_links = difference(metadata_mapping, links_mapping)
if len(missing_links) > 0:
raise RuleValidationError(f'Rule {rule_language.id} has a mismatch for the {standard} security standards. Add links to the Resources/See section ({missing_links}) or fix the rule metadata')

View File

@ -156,6 +156,15 @@
},
"uniqueItems": true
},
"OWASP Mobile Top 10 2024": {
"type": "array",
"minItems": 0,
"items": {
"type": "string",
"pattern": "^M([1-9]|10)$"
},
"uniqueItems": true
},
"PCI DSS 3.2": {
"type": "array",
"minItems": 0,
@ -219,7 +228,7 @@
},
"uniqueItems": true
},
"STIG ASD 2023-06-08": {
"STIG ASD_V5R3": {
"type": "array",
"minItems": 0,
"items": {
@ -267,15 +276,15 @@
"properties": {
"MAINTAINABILITY": {
"type": "string",
"enum": ["LOW", "MEDIUM", "HIGH"]
"enum": ["INFO", "LOW", "MEDIUM", "HIGH", "BLOCKER"]
},
"RELIABILITY": {
"type": "string",
"enum": ["LOW", "MEDIUM", "HIGH"]
"enum": ["INFO", "LOW", "MEDIUM", "HIGH", "BLOCKER"]
},
"SECURITY": {
"type": "string",
"enum": ["LOW", "MEDIUM", "HIGH"]
"enum": ["INFO", "LOW", "MEDIUM", "HIGH", "BLOCKER"]
}
}
},

View File

@ -0,0 +1,6 @@
{
"title": "Function names should comply with a naming convention",
"defaultQualityProfiles": [
]
}

View File

@ -0,0 +1,5 @@
== Why is this an issue?
=== How to fix it
=== Resources

View File

@ -0,0 +1,457 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]-->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="Asciidoctor 1.5.8">
<title>Why is this an issue?</title>
<link rel="stylesheet" href="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">
<style>
/* Asciidoctor default stylesheet | MIT License | http://asciidoctor.org */
/* Uncomment @import statement below 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,summary{display:block}
audio,canvas,video{display:inline-block}
audio:not([controls]){display:none;height:0}
script{display:none!important}
html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}
a{background:transparent}
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:none}
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,table tr:nth-of-type(even){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)>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background-color:#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,pre>code{line-height:1.45;color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;text-rendering:optimizeSpeed}
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-color:#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-color:#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-color: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}
.audioblock,.imageblock,.literalblock,.listingblock,.stemblock,.videoblock{margin-bottom:1.25em}
.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:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-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 pre:not(.highlight),.listingblock pre[class="highlight"],.listingblock pre[class^="highlight "],.listingblock pre.CodeRay,.listingblock pre.prettyprint{background:#f7f7f8}
.sidebarblock .literalblock pre,.sidebarblock .listingblock pre:not(.highlight),.sidebarblock .listingblock pre[class="highlight"],.sidebarblock .listingblock pre[class^="highlight "],.sidebarblock .listingblock pre.CodeRay,.sidebarblock .listingblock pre.prettyprint{background:#f2f1f1}
.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{-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,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:.90625em}}
@media screen and (min-width:1280px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:1em}}
.literalblock pre.nowrap,.literalblock pre.nowrap pre,.listingblock pre.nowrap,.listingblock pre.nowrap pre{white-space:pre;word-wrap:normal}
.literalblock.output pre{color:#f7f7f8;background-color:rgba(0,0,0,.9)}
.listingblock pre.highlightjs{padding:0}
.listingblock pre.highlightjs>code{padding:1em;-webkit-border-radius:4px;border-radius:4px}
.listingblock pre.prettyprint{border-width:0}
.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:#999}
.listingblock:hover code[data-lang]::before{display:block}
.listingblock.terminal pre .command::before{content:attr(data-prompt);padding-right:.5em;color:#999}
.listingblock.terminal pre .command:not([data-prompt])::before{content:"$"}
table.pyhltable{border-collapse:separate;border:0;margin-bottom:0;background:none}
table.pyhltable td{vertical-align:top;padding-top:0;padding-bottom:0;line-height:1.45}
table.pyhltable td.code{padding-left:.75em;padding-right:0}
pre.pygments .lineno,table.pyhltable td:not(.code){color:#999;padding-left:0;padding-right:.5em;border-right:1px solid #dddddf}
pre.pygments .lineno{display:inline-block;margin-right:.25em}
table.pyhltable .linenodiv{background:none!important;padding-right:0!important}
.quoteblock{margin:0 1em 1.25em 1.5em;display:table}
.quoteblock>.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,.quoteblock .quoteblock{margin:0 0 1.25em;padding:0 0 .25em 1em;border-left:.25em solid #dddddf}
.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{margin-bottom:-1.25em}
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){background:#f8f8f7}
table.stripes-none tr,table.stripes-odd tr:nth-of-type(even){background:none}
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}
td>div.verse{white-space:pre}
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-color:#00fafa}
.black{color:#000}
.black-background{background-color:#000}
.blue{color:#0000bf}
.blue-background{background-color:#0000fa}
.fuchsia{color:#bf00bf}
.fuchsia-background{background-color:#fa00fa}
.gray{color:#606060}
.gray-background{background-color:#7d7d7d}
.green{color:#006000}
.green-background{background-color:#007d00}
.lime{color:#00bf00}
.lime-background{background-color:#00fa00}
.maroon{color:#600000}
.maroon-background{background-color:#7d0000}
.navy{color:#000060}
.navy-background{background-color:#00007d}
.olive{color:#606000}
.olive-background{background-color:#7d7d00}
.purple{color:#600060}
.purple-background{background-color:#7d007d}
.red{color:#bf0000}
.red-background{background-color:#fa0000}
.silver{color:#909090}
.silver-background{background-color:#bcbcbc}
.teal{color:#006060}
.teal-background{background-color:#007d7d}
.white{color:#bfbfbf}
.white-background{background-color:#fafafa}
.yellow{color:#bfbf00}
.yellow-background{background-color:#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-color: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-color:#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}}
</style>
</head>
<body class="article">
<div id="header">
</div>
<div id="content">
<div class="sect1">
<h2 id="_why_is_this_an_issue">Why is this an issue?</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_how_to_fix_it">How to fix it</h3>
</div>
<div class="sect2">
<h3 id="_resources">Resources</h3>
</div>
</div>
</div>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2024-10-10 12:53:12 UTC
</div>
</div>
</body>
</html>

View File

@ -12,7 +12,7 @@ from rspec_tools.rules import RulesRepository
class TestCLIUpdateQuickfixStatus:
'''Unit test for quickfix status update through Command Line Interface.'''
@patch.dict(os.environ, {'COVERAGE_GITHUB_TOKEN': 'TOKEN'})
@patch.dict(os.environ, {'GITHUB_TOKEN': 'TOKEN'})
@patch('rspec_tools.modify_rule.update_rule_quickfix_status')
def test_basic_cli_usage(self, mock):
arguments = [

View File

@ -39,6 +39,11 @@ def test_unexpected_section_fails_validation(invalid_rule):
with pytest.raises(RuleValidationError, match=fr'^Rule {rule.id} has an unconventional header "Invalid header"'):
validate_section_names(rule)
def test_sections_with_wrong_level_fails_validation(invalid_rule):
rule = invalid_rule('S100', 'php')
with pytest.raises(RuleValidationError, match=fr'^Rule {rule.id} has some sections misclassified. Ensure there are not too many `=` in the asciidoc file for: How to fix it, Resources'):
validate_section_names(rule)
def test_valid_section_levels_passes_validation(rule_language):
'''Check that description with correct formatting is considered valid.'''
validate_section_levels(rule_language('S100', 'cfamily'))

View File

@ -82,7 +82,7 @@ def test_rule_with_invalid_impacts(invalid_rules: RulesRepository):
def test_rule_with_invalid_impact_level(invalid_rules: RulesRepository):
s506 = invalid_rules.get_rule('S506')
with pytest.raises(RuleValidationError, match=re.escape("Rule S506 failed validation for these reasons:\n - Rule scala:S506 has invalid metadata in MAINTAINABILITY: 'INVALID' is not one of ['LOW', 'MEDIUM', 'HIGH']")):
with pytest.raises(RuleValidationError, match=re.escape("Rule S506 failed validation for these reasons:\n - Rule scala:S506 has invalid metadata in MAINTAINABILITY: 'INVALID' is not one of ['INFO', 'LOW', 'MEDIUM', 'HIGH', 'BLOCKER']")):
validate_rule_metadata(s506)

View File

@ -1,5 +1,9 @@
{
"title": "Function and method names should comply with a naming convention",
"defaultQualityProfiles": [],
"scope": "Main"
}
"scope": "Main",
"compatibleLanguages": [
"js",
"ts"
]
}

View File

@ -2,7 +2,7 @@ include::../rule.adoc[]
For example, with the default provided regular expression ``++^[a-z][a-zA-Z0-9]*$++``, the function:
[source,php]
[source,php,diff-id=1,diff-type=noncompliant]
----
function DoSomething(){ // Noncompliant
// ...
@ -11,13 +11,31 @@ function DoSomething(){ // Noncompliant
should be renamed to
[source,php]
[source,php,diff-id=1,diff-type=compliant]
----
function doSomething(){
// ...
}
----
In case the Drupal framework is detected and the default regex is not replaced, it will follow the PHP coding standards for Drupal.
[source,php,diff-id=2,diff-type=noncompliant]
----
function doSomething(){ // Noncompliant
// ...
}
----
should be renamed to
[source,php,diff-id=2,diff-type=compliant]
----
function do_something(){
// ...
}
----
=== Exceptions
Methods with an ``++@inheritdoc++`` annotation, as well as magic methods (``++__construct()++``, ``++__destruct()++``, ``++__call()++``, ``++__callStatic()++``, ``++__get()++``, ``++__set()++``, ``++__isset()++``, ``++__unset()++``, ``++__sleep()++``, ``++__wakeup()++``, ``++__toString()++``, ``++__invoke()++``, ``++__set_state()++``, ``++__clone()++``, ``++__debugInfo()++``) are ignored.
@ -34,6 +52,10 @@ function __destruct(){...} // Compliant by exception
function myFunc(){...} // Compliant by exception
----
== References
* https://www.drupal.org/docs/develop/standards/php/php-coding-standards#s-functions-and-variables[Drupal - Naming Conventions - Functions and variables]
ifdef::env-github,rspecator-view[]
'''

View File

@ -1,6 +1,6 @@
== Why is this an issue?
Shared naming conventions allow teams to collaborate efficiently. In Dart the convention is that all type names should be in camel-case starting with a capital letter (aka Pascal case).
Shared naming conventions allow teams to collaborate efficiently. In Dart, the convention is that all type names should be in camel-case starting with a capital letter (aka Pascal case).
This rule raises an issue when a class name does not comply with this convention.
@ -12,18 +12,45 @@ This rule raises an issue when a class name does not comply with this convention
[source,dart]
----
class My_Class // Noncompliant,contains dash
class myClass // Noncompliant, starts with lovercase
class myclass // Noncompliant, all in lowercase
class My_Class { } // Noncompliant: contains a dash
class myClass { } // Noncompliant: starts with a lowercase
class myclass { } // Noncompliant: all in lowercase
----
==== Compliant solution
[source,dart]
----
class MyClass
class MyClass { }
----
== Resources
* https://dart.dev/tools/linter-rules/camel_case_types[Dart Lint rule]
* Dart Docs - https://dart.dev/tools/linter-rules/camel_case_types[Dart Linter rule - camel_case_types]
=== Related rules
* S7046 - Extension identifiers should comply with a naming convention
* S7075 - Non-constant names should comply with a naming convention
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
* The type name '<typeName>' isn't an UpperCamelCase identifier.
=== Highlighting
The type name (without generic parameters, or representation type declaration).
'''
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]

View File

@ -2,5 +2,9 @@
"defaultQualityProfiles": [
"Sonar way"
],
"scope": "Main"
}
"scope": "Main",
"compatibleLanguages": [
"js",
"ts"
]
}

View File

@ -2,5 +2,9 @@
"scope": "Main",
"defaultQualityProfiles": [],
"status": "deprecated",
"tags": []
}
"tags": [],
"compatibleLanguages": [
"js",
"ts"
]
}

View File

@ -3,7 +3,7 @@
"type": "CODE_SMELL",
"code": {
"impacts": {
"MAINTAINABILITY": "HIGH"
"MAINTAINABILITY": "BLOCKER"
},
"attribute": "CLEAR"
},
@ -17,19 +17,13 @@
"based-on-misra"
],
"extra": {
"replacementRules": [
],
"legacyKeys": [
]
"replacementRules": [],
"legacyKeys": []
},
"defaultSeverity": "Blocker",
"ruleSpecification": "RSPEC-1032",
"sqKey": "S1032",
"scope": "Main",
"defaultQualityProfiles": [
],
"defaultQualityProfiles": [],
"quickfix": "unknown"
}

View File

@ -3,7 +3,7 @@
"type": "CODE_SMELL",
"code": {
"impacts": {
"MAINTAINABILITY": "HIGH"
"MAINTAINABILITY": "BLOCKER"
},
"attribute": "CLEAR"
},
@ -19,12 +19,8 @@
"pitfall"
],
"extra": {
"replacementRules": [
],
"legacyKeys": [
]
"replacementRules": [],
"legacyKeys": []
},
"defaultSeverity": "Blocker",
"ruleSpecification": "RSPEC-1036",

View File

@ -1,3 +1,7 @@
{
"scope": "Main"
}
"scope": "Main",
"compatibleLanguages": [
"js",
"ts"
]
}

View File

@ -1,3 +1,6 @@
{
"title": "All \"except\" blocks should be able to catch exceptions"
"title": "All \"except\" blocks should be able to catch exceptions",
"tags": [
"suspicious"
]
}

View File

@ -2,7 +2,7 @@
"title": "Finalizers should not throw exceptions",
"code": {
"impacts": {
"RELIABILITY": "HIGH"
"RELIABILITY": "BLOCKER"
},
"attribute": "LOGICAL"
},

View File

@ -2,7 +2,7 @@
"title": "Finalize method should not throw exceptions",
"code": {
"impacts": {
"RELIABILITY": "HIGH"
"RELIABILITY": "BLOCKER"
},
"attribute": "LOGICAL"
},

View File

@ -18,8 +18,8 @@ void foo () // no exceptions specified
throw ( 21 ); // anything can be thrown
}
void goo ( ) throw ( Exception )
{
void goo ( ) throw ( Exception )
{
foo ( ); // Noncompliant; an int could be thrown
}
----
@ -34,8 +34,8 @@ void foo () // no exceptions specified
throw ( 21 ); // this is legal; anything can be thrown
}
void goo ( ) throw ( Exception, int )
{
void goo ( ) throw ( Exception, int )
{
foo ( );
}
----
@ -45,7 +45,6 @@ void goo ( ) throw ( Exception, int )
* MISRA {cpp}:2008, 15-5-2
* CWE - https://cwe.mitre.org/data/definitions/391[CWE-391 - Unchecked Error Condition]
* https://www.securecoding.cert.org/confluence/x/EADTAQ[CERT, ERR55-CPP.] - Honor exception specifications
ifdef::env-github,rspecator-view[]

View File

@ -2,5 +2,9 @@
"scope": "Main",
"defaultQualityProfiles": [],
"status": "deprecated",
"tags": []
}
"tags": [],
"compatibleLanguages": [
"js",
"ts"
]
}

View File

@ -3,7 +3,7 @@
"type": "BUG",
"code": {
"impacts": {
"RELIABILITY": "HIGH"
"RELIABILITY": "BLOCKER"
},
"attribute": "COMPLETE"
},

View File

@ -3,7 +3,7 @@
"type": "BUG",
"code": {
"impacts": {
"RELIABILITY": "HIGH"
"RELIABILITY": "BLOCKER"
},
"attribute": "LOGICAL"
},
@ -12,13 +12,9 @@
"func": "Constant\/Issue",
"constantCost": "30min"
},
"tags": [
],
"tags": [],
"extra": {
"replacementRules": [
],
"replacementRules": [],
"legacyKeys": [
"PipelinedFunctionsWithoutPipeRow"
]

View File

@ -1,3 +1,5 @@
{
"defaultQualityProfiles": [
]
}

View File

@ -1,4 +1,4 @@
:language_std_outputs: std::cout, std::cerr, printf, std::print
:language_std_outputs: print
== Why is this an issue?
@ -8,9 +8,9 @@ If you are using Flutter, you can use `debugPrint` or surround print calls with
=== Code examples
The following noncompliant code:
==== Noncompliant code example
[source,dart,diff-id=1,diff-type=noncompliant]
[source,dart]
----
void doSomething(int x) {
// ...
@ -19,12 +19,11 @@ void doSomething(int x) {
}
----
Could be replaced by:
==== Compliant solution
[source,dart,diff-id=1,diff-type=compliant]
[source,dart]
----
void doSomething(int x)
{
void doSomething(int x) {
// ...
debugPrint('debug: $x');
// ...
@ -33,10 +32,9 @@ void doSomething(int x)
or
[source,dart,diff-id=1,diff-type=compliant]
[source,dart]
----
void doSomething(int x)
{
void doSomething(int x) {
// ...
if (kDebugMode) {
print('debug: $x');
@ -47,10 +45,9 @@ void doSomething(int x)
or
[source,dart,diff-id=1,diff-type=compliant]
[source,dart]
----
void doSomething(int x)
{
void doSomething(int x) {
// ...
log('log: $x');
// ...
@ -61,4 +58,27 @@ void doSomething(int x)
* OWASP - https://owasp.org/Top10/A09_2021-Security_Logging_and_Monitoring_Failures/[Top 10 2021 Category A9 - Security Logging and Monitoring Failures]
* OWASP - https://owasp.org/www-project-top-ten/2017/A3_2017-Sensitive_Data_Exposure[Top 10 2017 Category A3 - Sensitive Data Exposure]
* Dart Linter - https://dart.dev/tools/linter-rules/avoid_print[Dart Linter - avoid_print]
* Dart Docs - https://dart.dev/tools/linter-rules/avoid_print[Dart Linter rule - avoid_print]
* Flutter API Docs - https://api.flutter.dev/flutter/foundation/kDebugMode-constant.html[kDebugMode top-level constant]
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
* Don't invoke 'print' in production code.
=== Highlighting
The identifier of the `print` method, without argument list.
'''
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]

View File

@ -3,7 +3,9 @@
"bad-practice",
"user-experience"
],
"defaultQualityProfiles": [
"defaultQualityProfiles": [],
"compatibleLanguages": [
"js",
"ts"
]
}
}

View File

@ -0,0 +1,7 @@
{
"defaultQualityProfiles": [],
"tags": [
"bad-practice",
"clippy"
]
}

39
rules/S106/rust/rule.adoc Normal file
View File

@ -0,0 +1,39 @@
:language_std_outputs: print!, println!
== Why is this an issue?
include::../description.adoc[]
=== Code examples
==== Noncompliant code example
[source,rust,diff-id=1,diff-type=noncompliant]
----
fn do_something() {
println!("my message"); // Noncompliant, output directly to stdout without a logger
}
----
==== Compliant solution
[source,rust,diff-id=1,diff-type=compliant]
----
use log::{info, LevelFilter};
use simple_logger::SimpleLogger;
fn do_something() {
SimpleLogger::new().with_level(LevelFilter::Info).init().unwrap();
// ...
info!("my message"); // Compliant, output via logger
// ...
}
----
== Resources
=== Documentation
* Clippy Lints - https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
* OWASP - https://owasp.org/Top10/A09_2021-Security_Logging_and_Monitoring_Failures/[Top 10 2021 Category A9 - Security Logging and Monitoring Failures]
* OWASP - https://owasp.org/www-project-top-ten/2017/A3_2017-Sensitive_Data_Exposure[Top 10 2017 Category A3 - Sensitive Data Exposure]

View File

@ -4,7 +4,7 @@ include::../description.adoc[]
=== Noncompliant code example
[source,dart]
[source,dart,diff-id=1,diff-type=noncompliant]
----
void foo() {
outer: //label is not used.
@ -16,7 +16,7 @@ void foo() {
=== Compliant solution
[source,dart]
[source,dart,diff-id=1,diff-type=compliant]
----
void foo() {
for(int i = 0; i < 10; i++) {
@ -27,5 +27,31 @@ void foo() {
== Resources
* https://wiki.sei.cmu.edu/confluence/x/5dUxBQ[CERT, MSC12-C.] - Detect and remove code that has no effect or is never executed
* https://dart.dev/tools/diagnostic-messages?utm_source=dartdev&utm_medium=redir&utm_id=diagcode&utm_content=unnecessary_cast#unused_label[Dart Linter - unused label]
=== Documentation
* CERT - https://wiki.sei.cmu.edu/confluence/x/5dUxBQ[CERT, MSC12-C.] - Detect and remove code that has no effect or is never executed
* Dart Docs - https://dart.dev/tools/diagnostic-messages?utm_source=dartdev&utm_medium=redir&utm_id=diagcode&utm_content=unnecessary_cast#unused_label[Dart Linter rule - unused_label]
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
* The label '<labelName>' isn't used.
`<labelName>` doesn't include the semicolon.
=== Highlighting
The label name, including the semicolon.
'''
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]

View File

@ -1,4 +1,8 @@
{
"defaultQualityProfiles": [],
"scope": "Main"
}
"scope": "Main",
"compatibleLanguages": [
"js",
"ts"
]
}

View File

@ -1,3 +1,7 @@
{
"scope": "Main"
}
"scope": "Main",
"compatibleLanguages": [
"js",
"ts"
]
}

View File

@ -1,4 +1,8 @@
{
"title": "Unused private class members should be removed",
"quickfix": "covered"
"title": "Unused private class members should be removed",
"quickfix": "covered",
"compatibleLanguages": [
"js",
"ts"
]
}

View File

@ -3,7 +3,7 @@
"type": "CODE_SMELL",
"code": {
"impacts": {
"MAINTAINABILITY": "HIGH"
"MAINTAINABILITY": "BLOCKER"
},
"attribute": "CONVENTIONAL"
},
@ -17,12 +17,8 @@
"sql"
],
"extra": {
"replacementRules": [
],
"legacyKeys": [
]
"replacementRules": [],
"legacyKeys": []
},
"defaultSeverity": "Blocker",
"ruleSpecification": "RSPEC-1069",

View File

@ -0,0 +1,6 @@
[source,dart]
----
void setCoordinates(int x1, int y1, int z1, int x2, int y2, int z2) { // Noncompliant
// ...
}
----

21
rules/S107/dart/rule.adoc Normal file
View File

@ -0,0 +1,21 @@
:language: dart
include::../rule.adoc[]
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
include::../parameters.adoc[]
'''
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]

View File

@ -0,0 +1,11 @@
[source,dart]
----
// Each function does a part of what the original setCoordinates function was doing, so confusion risks are lower
void setOrigin(int x, int y, int z) {
// ...
}
void setSize(int width, int height, int depth) {
// ...
}
----

View File

@ -0,0 +1,13 @@
[source,dart]
----
class Point { // In geometry, Point is a logical structure to group data
int x;
int y;
Point(this.x, this.y);
}
void setCoordinates(Point p1, Point p2) {
// ...
}
----

View File

@ -2,5 +2,9 @@
"defaultQualityProfiles": [
"Sonar way"
],
"scope": "Main"
}
"scope": "Main",
"compatibleLanguages": [
"js",
"ts"
]
}

View File

@ -0,0 +1,6 @@
{
"tags": [
"brain-overload",
"clippy"
]
}

View File

@ -0,0 +1,6 @@
[source,rust]
----
fn set_coordinates(x1: i32, y1: i32, z1: i32, x2: i32, y2: i32, z2: i32) { // Noncompliant
// ...
}
----

27
rules/S107/rust/rule.adoc Normal file
View File

@ -0,0 +1,27 @@
:language: rust
include::../rule.adoc[]
== Resources
=== Documentation
* Clippy Lints - https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
include::../parameters.adoc[]
'''
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]

View File

@ -0,0 +1,11 @@
[source,rust]
----
// Each function does a part of what the original setCoordinates function was doing, so confusion risks are lower
fn set_origin(x: i32, y: i32, z: i32) {
// ...
}
fn set_size(width: i32, height: i32, depth: i32) {
// ...
}
----

View File

@ -0,0 +1,17 @@
[source,rust]
----
struct Point {
x: i32,
y: i32,
}
impl Point {
fn new(x: i32, y: i32) -> Point {
Point { x, y }
}
}
fn set_coordinates(p1: &mut Point, p2: &Point) {
// ...
}
----

View File

@ -3,7 +3,7 @@
"type": "BUG",
"code": {
"impacts": {
"RELIABILITY": "HIGH"
"RELIABILITY": "BLOCKER"
},
"attribute": "COMPLETE"
},
@ -12,13 +12,9 @@
"func": "Constant\/Issue",
"constantCost": "1h"
},
"tags": [
],
"tags": [],
"extra": {
"replacementRules": [
],
"replacementRules": [],
"legacyKeys": [
"ForallStatementShouldUseSaveExceptionsClause"
]

View File

@ -1,5 +1,13 @@
include::../description.adoc[]
=== Exceptions
This rule does not raise an issue when:
* A constant path is relative and contains at most two parts.
* A constant path is used in an annotation
* A path is annotated
== How to fix it
=== Code examples
@ -9,6 +17,8 @@ include::../description.adoc[]
[source,java,diff-id=1,diff-type=noncompliant]
----
public class Foo {
public static final String FRIENDS_ENDPOINT = "/user/friends"; // Compliant path is relative and has only two parts
public Collection<User> listUsers() {
File userList = new File("/home/mylogin/Dev/users.txt"); // Noncompliant
Collection<User> users = parse(userList);
@ -38,6 +48,24 @@ public class Foo {
}
----
Exceptions examples:
[source,java]
----
public class Foo {
public static final String FRIENDS_ENDPOINT = "/user/friends"; // Compliant path is relative and has only two parts
public static final String ACCOUNT = "/account/group/list.html"; // Compliant path is used in an annotation
@Value("${base.url}" + ACCOUNT)
private String groupUrl;
@MyAnnotation()
String path = "/default/url/for/site"; // Compliant path is annotated
}
----
ifdef::env-github,rspecator-view[]
'''

View File

@ -3,5 +3,9 @@
"accessibility",
"wcag2-a",
"react"
],
"compatibleLanguages": [
"js",
"ts"
]
}
}

View File

@ -46,7 +46,7 @@
"14.1.2",
"5.4.1"
],
"STIG ASD 2023-06-08": [
"STIG ASD_V5R3": [
"V-222612"
]
},

View File

@ -1,4 +1,8 @@
{
"scope": "Main",
"quickfix": "covered"
}
"quickfix": "covered",
"compatibleLanguages": [
"js",
"ts"
]
}

View File

@ -42,7 +42,7 @@
"CERT": [
"STR07-C."
],
"STIG ASD 2023-06-08": [
"STIG ASD_V5R3": [
"V-222612"
]
},

View File

@ -1,25 +1,31 @@
{
"title": "Mouse events should have corresponding keyboard events",
"type": "BUG",
"status": "ready",
"remediation": {
"func": "Constant\/Issue",
"constantCost": "5min"
"title": "Mouse events should have corresponding keyboard events",
"type": "BUG",
"status": "ready",
"remediation": {
"func": "Constant/Issue",
"constantCost": "5min"
},
"tags": [
"accessibility",
"react"
],
"defaultSeverity": "Minor",
"ruleSpecification": "RSPEC-1082",
"sqKey": "S1082",
"scope": "Main",
"defaultQualityProfiles": [
"Sonar way"
],
"quickfix": "unknown",
"code": {
"impacts": {
"RELIABILITY": "LOW"
},
"tags": [
"accessibility",
"react"
],
"defaultSeverity": "Minor",
"ruleSpecification": "RSPEC-1082",
"sqKey": "S1082",
"scope": "Main",
"defaultQualityProfiles": ["Sonar way"],
"quickfix": "unknown",
"code": {
"impacts": {
"RELIABILITY": "LOW"
},
"attribute": "COMPLETE"
}
}
"attribute": "COMPLETE"
},
"compatibleLanguages": [
"js",
"ts"
]
}

View File

@ -1,3 +1,6 @@
{
}
"compatibleLanguages": [
"js",
"ts"
]
}

View File

@ -3,7 +3,7 @@
"type": "CODE_SMELL",
"status": "ready",
"remediation": {
"func": "Constant\/Issue",
"func": "Constant/Issue",
"constantCost": "5min"
},
"tags": [
@ -14,12 +14,18 @@
"ruleSpecification": "RSPEC-1090",
"sqKey": "S1090",
"scope": "All",
"defaultQualityProfiles": ["Sonar way"],
"defaultQualityProfiles": [
"Sonar way"
],
"quickfix": "infeasible",
"code": {
"impacts": {
"RELIABILITY": "LOW"
},
"attribute": "CONVENTIONAL"
}
}
},
"compatibleLanguages": [
"js",
"ts"
]
}

View File

@ -2,5 +2,9 @@
"scope": "Main",
"defaultQualityProfiles": [],
"status": "deprecated",
"tags": []
}
"tags": [],
"compatibleLanguages": [
"js",
"ts"
]
}

View File

@ -3,5 +3,9 @@
"quickfix": "covered",
"defaultQualityProfiles": [],
"status": "deprecated",
"tags": []
}
"tags": [],
"compatibleLanguages": [
"js",
"ts"
]
}

View File

@ -9,18 +9,28 @@ include::../description.adoc[]
[source,dart,diff-id=1,diff-type=noncompliant]
----
void doSomething() {
; // Noncompliant - was used as a kind of TODO marker
; // Noncompliant - was used as a kind of TODO marker
}
----
[source,dart,diff-id=2,diff-type=noncompliant]
----
void f() {
if (complicated.expression.foo()); // Noncompliant - the condition doesn't make sense
if (complicated.expression.foo()); // Noncompliant - the condition doesn't apply to bar
bar();
}
----
[source,dart,diff-id=3,diff-type=noncompliant]
----
void f() {
if (complicated.expression.foo())
bar();
else ; // Noncompliant else is empty
buzz();
}
----
==== Compliant solution
[source,dart,diff-id=1,diff-type=compliant]
@ -38,6 +48,38 @@ void f() {
}
----
[source,dart,diff-id=3,diff-type=compliant]
----
void f() {
if (complicated.expression.foo())
bar();
else
buzz();
}
----
== Resources
* https://dart.dev/tools/linter-rules/empty_statements[Dart Lint rule]
* Dart Docs - https://dart.dev/tools/linter-rules/empty_statements[Dart Linter rule - empty_statements]
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
* Unnecessary empty statement.
=== Highlighting
The `;` character.
'''
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]

View File

@ -4,5 +4,9 @@
"quickfix": "covered",
"defaultQualityProfiles": [],
"status": "deprecated",
"tags": []
}
"tags": [],
"compatibleLanguages": [
"js",
"ts"
]
}

View File

@ -0,0 +1,6 @@
{
"tags": [
"unused",
"clippy"
]
}

View File

@ -0,0 +1,49 @@
== Why is this an issue?
include::../description.adoc[]
=== Code examples
==== Noncompliant code example
[source,rust,diff-id=1,diff-type=noncompliant]
----
fn main() {
let x = 5;
if x > 0 {
println!("x is positive");
}; // Noncompliant
match x {
1 => println!("x is one"),
2 => println!("x is two"),
_ => println!("x is something else"),
}; // Noncompliant
}
----
==== Compliant solution
[source,rust,diff-id=1,diff-type=compliant]
----
fn main() {
let x = 5;
if x > 0 {
println!("x is positive");
}
match x {
1 => println!("x is one"),
2 => println!("x is two"),
_ => println!("x is something else"),
}
}
----
== Resources
=== Documentation
* Clippy Lints - https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_semicolon

View File

@ -1,6 +1,9 @@
{
"title": "Variables should not be shadowed",
"defaultQualityProfiles": [
],
"scope": "Main"
}
"defaultQualityProfiles": [],
"scope": "Main",
"compatibleLanguages": [
"js",
"ts"
]
}

Some files were not shown because too many files have changed in this diff Show More